@salla.sa/twilight-components 2.14.164 → 2.14.166
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/{Helper-CNYy9P5b.js → Helper-u2kVaP5K.js} +15 -10
- package/dist/cjs/{Helper-CNYy9P5b.js.map → Helper-u2kVaP5K.js.map} +1 -1
- package/dist/cjs/{app-globals-B0FX8nrF.js → app-globals-BvFSBfoT.js} +3 -3
- package/dist/cjs/{app-globals-B0FX8nrF.js.map → app-globals-BvFSBfoT.js.map} +1 -1
- package/dist/cjs/{index-BQogR_9w.js → index-iU0iVUza.js} +4 -4
- package/dist/cjs/index-iU0iVUza.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-add-product-button_49.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- 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-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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.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/collection/Helpers/Helper.js +13 -8
- package/dist/collection/Helpers/Helper.js.map +1 -1
- package/dist/components/Helper.js +13 -8
- package/dist/components/Helper.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{Helper-BrCHOtZG.js → Helper-MNQx5g4A.js} +15 -10
- package/dist/{esm-es5/Helper-BrCHOtZG.js.map → esm/Helper-MNQx5g4A.js.map} +1 -1
- package/dist/esm/{app-globals-IYG3dX-R.js → app-globals-sE_ZSx6e.js} +3 -3
- package/dist/esm/{app-globals-IYG3dX-R.js.map → app-globals-sE_ZSx6e.js.map} +1 -1
- package/dist/esm/{index-BFfNxHPV.js → index-BJcojI6v.js} +4 -4
- package/dist/esm/index-BJcojI6v.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-add-product-button_49.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- package/dist/esm/salla-social.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/{Helper-BrCHOtZG.js → Helper-MNQx5g4A.js} +3 -3
- package/dist/{esm/Helper-BrCHOtZG.js.map → esm-es5/Helper-MNQx5g4A.js.map} +1 -1
- package/dist/esm-es5/{app-globals-IYG3dX-R.js → app-globals-sE_ZSx6e.js} +2 -2
- package/dist/esm-es5/{app-globals-IYG3dX-R.js.map → app-globals-sE_ZSx6e.js.map} +1 -1
- package/dist/esm-es5/{index-BFfNxHPV.js → index-BJcojI6v.js} +3 -3
- package/dist/esm-es5/index-BJcojI6v.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-add-product-button_49.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-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 +2 -2
- package/dist/esm-es5/salla-orders.entry.js +2 -2
- 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-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-37904a9d.system.entry.js → p-041cfdc6.system.entry.js} +2 -2
- package/dist/twilight/{p-a57e5439.system.entry.js → p-04acb9d5.system.entry.js} +2 -2
- package/dist/twilight/{p-fde43494.system.entry.js → p-08c7235b.system.entry.js} +2 -2
- package/dist/twilight/{p-34e55241.system.entry.js → p-09d4e21c.system.entry.js} +2 -2
- package/dist/twilight/{p-C5EBG2Xg.system.js.map → p-0Xmugzgq.system.js.map} +1 -1
- package/dist/twilight/{p-d30e3efe.entry.js → p-0c7e997f.entry.js} +2 -2
- package/dist/twilight/{p-0df2ce1c.entry.js → p-1593ada3.entry.js} +2 -2
- package/dist/twilight/{p-fe73d1f4.entry.js → p-1b069f5c.entry.js} +2 -2
- package/dist/twilight/{p-2f7a8fd5.system.entry.js → p-1fcbf6bb.system.entry.js} +3 -3
- package/dist/twilight/{p-35130be1.entry.js → p-2139323e.entry.js} +2 -2
- package/dist/twilight/{p-489c4e43.system.entry.js → p-263f39a8.system.entry.js} +2 -2
- package/dist/twilight/{p-bef3244d.entry.js → p-26849df9.entry.js} +2 -2
- package/dist/twilight/{p-77aa48a9.entry.js → p-26a83313.entry.js} +2 -2
- package/dist/twilight/{p-70db2fda.system.entry.js → p-277a736d.system.entry.js} +2 -2
- package/dist/twilight/{p-2ce0a07a.entry.js → p-2984d7ee.entry.js} +2 -2
- package/dist/twilight/{p-f14d4763.entry.js → p-3f973235.entry.js} +2 -2
- package/dist/twilight/{p-28d837ee.entry.js → p-4163dbb9.entry.js} +2 -2
- package/dist/twilight/{p-0bfcfa47.system.entry.js → p-4526ac8e.system.entry.js} +2 -2
- package/dist/twilight/{p-9900d67e.entry.js → p-50baf30c.entry.js} +2 -2
- package/dist/twilight/{p-cf17e7f5.system.entry.js → p-5237da49.system.entry.js} +2 -2
- package/dist/twilight/{p-ea2a8ec3.system.entry.js → p-551f5ae2.system.entry.js} +2 -2
- package/dist/twilight/{p-325e8a3e.entry.js → p-55cef941.entry.js} +2 -2
- package/dist/twilight/{p-e0f20b16.system.entry.js → p-5c3c4081.system.entry.js} +2 -2
- package/dist/twilight/{p-87eef8f5.system.entry.js → p-689aca0e.system.entry.js} +2 -2
- package/dist/twilight/{p-b45186d2.entry.js → p-6984531d.entry.js} +8 -8
- package/dist/twilight/{p-f047dc2e.system.entry.js → p-6993e228.system.entry.js} +2 -2
- package/dist/twilight/{p-1fe13a36.system.entry.js → p-718df47e.system.entry.js} +6 -6
- package/dist/twilight/{p-e803e9c9.system.entry.js → p-7b1212df.system.entry.js} +2 -2
- package/dist/twilight/{p-0a352565.entry.js → p-8177ab73.entry.js} +2 -2
- package/dist/twilight/{p-d9e539ba.system.entry.js → p-8c1eca80.system.entry.js} +2 -2
- package/dist/twilight/{p-652c3a18.system.entry.js → p-8c5e2cf8.system.entry.js} +2 -2
- package/dist/twilight/{p-Cbt3VvMx.system.js.map → p-8ewm7cmP.system.js.map} +1 -1
- package/dist/twilight/{p-c8fa97ee.system.entry.js → p-905c335e.system.entry.js} +2 -2
- package/dist/twilight/{p-801b8cf5.entry.js → p-9ddaf4b2.entry.js} +2 -2
- package/dist/twilight/{p-2c742cef.system.entry.js → p-9f151920.system.entry.js} +2 -2
- package/dist/twilight/{p-60e44e99.system.entry.js → p-9f64a8a7.system.entry.js} +2 -2
- package/dist/twilight/{p-CorPzHaH.system.js → p-BDAthD3J.system.js} +3 -3
- package/dist/twilight/{p-CorPzHaH.system.js.map → p-BDAthD3J.system.js.map} +1 -1
- package/dist/twilight/{p-DHMPrdpB.system.js.map → p-BE4Tntj5.system.js.map} +1 -1
- package/dist/twilight/{p-CV1L1K1F.js → p-BEBnH0T8.js} +2 -2
- package/dist/twilight/{p-CV1L1K1F.js.map → p-BEBnH0T8.js.map} +1 -1
- package/dist/twilight/{p-BmBnW84t.system.js.map → p-BEz4dPyy.system.js.map} +1 -1
- package/dist/twilight/{p-BFfNxHPV.js → p-BJcojI6v.js} +3 -3
- package/dist/twilight/p-BJcojI6v.js.map +1 -0
- package/dist/twilight/{p-B8H8Zffc.system.js.map → p-BMEAfpcQ.system.js.map} +1 -1
- package/dist/twilight/{p-t7kMTbsj.system.js.map → p-BNfhCOep.system.js.map} +1 -1
- package/dist/twilight/{p-UtROhnoT.system.js.map → p-BPHisSBS.system.js.map} +1 -1
- package/dist/twilight/{p-BC573MOT.system.js.map → p-BRFHsZkg.system.js.map} +1 -1
- package/dist/twilight/{p-wVh4stgZ.system.js.map → p-BRNwBf6q.system.js.map} +1 -1
- package/dist/twilight/{p-Bx-N-s4Y.system.js.map → p-B_ARsANj.system.js.map} +1 -1
- package/dist/twilight/{p-D06Xx0Te.system.js.map → p-Be9PHZ6-.system.js.map} +1 -1
- package/dist/twilight/{p-Bco_IRd2.system.js.map → p-Bf0LxwB7.system.js.map} +1 -1
- package/dist/twilight/{p-Cb1UIzZb.system.js → p-BoU3rP9-.system.js} +3 -3
- package/dist/twilight/p-BoU3rP9-.system.js.map +1 -0
- package/dist/twilight/{p-8lfy7oMG.system.js.map → p-Bp3Jex-u.system.js.map} +1 -1
- package/dist/twilight/{p-B4QYa22q.system.js.map → p-BxiSZFuT.system.js.map} +1 -1
- package/dist/twilight/{p-LTc0kKzI.system.js.map → p-ByPmVcaW.system.js.map} +1 -1
- package/dist/twilight/{p-DW6tScyV.system.js.map → p-CQJr95JP.system.js.map} +1 -1
- package/dist/twilight/{p-nlqrWEsa.system.js.map → p-CUrjp7xM.system.js.map} +1 -1
- package/dist/twilight/{p-DGrVZP6D.system.js.map → p-Ck-MMoh4.system.js.map} +1 -1
- package/dist/twilight/{p-CerWahQp.system.js.map → p-Cv3L1tRD.system.js.map} +1 -1
- package/dist/twilight/{p-DQ6WGq9O.system.js.map → p-DMEPVSYJ.system.js.map} +1 -1
- package/dist/twilight/{p-D1_lKraG.js → p-DPqQW4oH.js} +2 -2
- package/dist/twilight/{p-D1_lKraG.js.map → p-DPqQW4oH.js.map} +1 -1
- package/dist/twilight/{p-Dz_hUkbF.system.js → p-D_NAqNa-.system.js} +2 -2
- package/dist/twilight/{p-Dz_hUkbF.system.js.map → p-D_NAqNa-.system.js.map} +1 -1
- package/dist/twilight/{p-DyiYfLs6.system.js.map → p-DdgccFjk.system.js.map} +1 -1
- package/dist/twilight/{p-DD-NUH5O.system.js.map → p-DiIWpMR9.system.js.map} +1 -1
- package/dist/twilight/{p-C6uUYgzy.system.js.map → p-NnKijTrt.system.js.map} +1 -1
- package/dist/twilight/{p-DeLChKCk.system.js.map → p-X_JjG62r.system.js.map} +1 -1
- package/dist/twilight/{p-fIRBYbgk.system.js → p-_Df6_reQ.system.js} +2 -2
- package/dist/twilight/{p-fIRBYbgk.system.js.map → p-_Df6_reQ.system.js.map} +1 -1
- package/dist/twilight/{p-66f5c6cb.entry.js → p-a8128d9a.entry.js} +2 -2
- package/dist/twilight/{p-679bcc4c.entry.js → p-b3df8eba.entry.js} +2 -2
- package/dist/twilight/{p-bced4dd5.system.entry.js → p-b66ce34c.system.entry.js} +2 -2
- package/dist/twilight/{p-18cad003.system.entry.js → p-b93f8a7b.system.entry.js} +2 -2
- package/dist/twilight/{p-15ac73d8.entry.js → p-bd675f34.entry.js} +2 -2
- package/dist/twilight/{p-8128a6af.system.entry.js → p-c5f58299.system.entry.js} +2 -2
- package/dist/twilight/{p-3fc226d0.entry.js → p-c76c05ff.entry.js} +2 -2
- package/dist/twilight/{p-94338a6a.entry.js → p-ca989cdf.entry.js} +2 -2
- package/dist/twilight/{p-283e5d2a.system.entry.js → p-cac0a37c.system.entry.js} +2 -2
- package/dist/twilight/{p-6f789c6a.system.entry.js → p-cc93cc27.system.entry.js} +2 -2
- package/dist/twilight/{p-f2fb025f.system.entry.js → p-cdfb75e6.system.entry.js} +2 -2
- package/dist/twilight/{p-a6ab5583.entry.js → p-dae66c49.entry.js} +2 -2
- package/dist/twilight/{p-07be7362.entry.js → p-e75ddf6b.entry.js} +2 -2
- package/dist/twilight/{p-feb47683.system.entry.js → p-ea45208a.system.entry.js} +2 -2
- package/dist/twilight/{p-acd4ad3d.entry.js → p-eb859ac0.entry.js} +2 -2
- package/dist/twilight/{p-112a3593.entry.js → p-eb86070c.entry.js} +2 -2
- package/dist/twilight/{p-a4335e96.entry.js → p-efb54461.entry.js} +2 -2
- package/dist/twilight/{p-594e29ef.system.entry.js → p-f1493561.system.entry.js} +2 -2
- package/dist/twilight/{p-03eeed12.entry.js → p-f192ed81.entry.js} +2 -2
- package/dist/twilight/{p-780e11a1.entry.js → p-f5534187.entry.js} +2 -2
- package/dist/twilight/{p-73c55156.entry.js → p-fa752787.entry.js} +2 -2
- package/dist/twilight/{p-f1f76cad.entry.js → p-fc5309ad.entry.js} +2 -2
- package/dist/twilight/{p-CCj5pPN3.system.js.map → p-lA-1m-p5.system.js.map} +1 -1
- package/dist/twilight/{p-CJdQn5Cx.system.js.map → p-oYwTKzyC.system.js.map} +1 -1
- package/dist/twilight/{p-BEq2XgoL.system.js.map → p-pX5I3INC.system.js.map} +1 -1
- package/dist/twilight/{p-CSzSey6x.system.js.map → p-qgRft6ys.system.js.map} +1 -1
- package/dist/twilight/{p-B8TjwvAx.system.js.map → p-vJ_LeDO0.system.js.map} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +6 -4
- package/package.json +5 -5
- package/dist/cjs/index-BQogR_9w.js.map +0 -1
- package/dist/esm/index-BFfNxHPV.js.map +0 -1
- package/dist/esm-es5/index-BFfNxHPV.js.map +0 -1
- package/dist/twilight/p-BFfNxHPV.js.map +0 -1
- package/dist/twilight/p-Cb1UIzZb.system.js.map +0 -1
- /package/dist/twilight/{p-37904a9d.system.entry.js.map → p-041cfdc6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a57e5439.system.entry.js.map → p-04acb9d5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-fde43494.system.entry.js.map → p-08c7235b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-34e55241.system.entry.js.map → p-09d4e21c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d30e3efe.entry.js.map → p-0c7e997f.entry.js.map} +0 -0
- /package/dist/twilight/{p-0df2ce1c.entry.js.map → p-1593ada3.entry.js.map} +0 -0
- /package/dist/twilight/{p-fe73d1f4.entry.js.map → p-1b069f5c.entry.js.map} +0 -0
- /package/dist/twilight/{p-2f7a8fd5.system.entry.js.map → p-1fcbf6bb.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-35130be1.entry.js.map → p-2139323e.entry.js.map} +0 -0
- /package/dist/twilight/{p-489c4e43.system.entry.js.map → p-263f39a8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bef3244d.entry.js.map → p-26849df9.entry.js.map} +0 -0
- /package/dist/twilight/{p-77aa48a9.entry.js.map → p-26a83313.entry.js.map} +0 -0
- /package/dist/twilight/{p-70db2fda.system.entry.js.map → p-277a736d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2ce0a07a.entry.js.map → p-2984d7ee.entry.js.map} +0 -0
- /package/dist/twilight/{p-f14d4763.entry.js.map → p-3f973235.entry.js.map} +0 -0
- /package/dist/twilight/{p-28d837ee.entry.js.map → p-4163dbb9.entry.js.map} +0 -0
- /package/dist/twilight/{p-0bfcfa47.system.entry.js.map → p-4526ac8e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9900d67e.entry.js.map → p-50baf30c.entry.js.map} +0 -0
- /package/dist/twilight/{p-cf17e7f5.system.entry.js.map → p-5237da49.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ea2a8ec3.system.entry.js.map → p-551f5ae2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-325e8a3e.entry.js.map → p-55cef941.entry.js.map} +0 -0
- /package/dist/twilight/{p-e0f20b16.system.entry.js.map → p-5c3c4081.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-87eef8f5.system.entry.js.map → p-689aca0e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b45186d2.entry.js.map → p-6984531d.entry.js.map} +0 -0
- /package/dist/twilight/{p-f047dc2e.system.entry.js.map → p-6993e228.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-1fe13a36.system.entry.js.map → p-718df47e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e803e9c9.system.entry.js.map → p-7b1212df.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0a352565.entry.js.map → p-8177ab73.entry.js.map} +0 -0
- /package/dist/twilight/{p-d9e539ba.system.entry.js.map → p-8c1eca80.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-652c3a18.system.entry.js.map → p-8c5e2cf8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c8fa97ee.system.entry.js.map → p-905c335e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-801b8cf5.entry.js.map → p-9ddaf4b2.entry.js.map} +0 -0
- /package/dist/twilight/{p-2c742cef.system.entry.js.map → p-9f151920.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-60e44e99.system.entry.js.map → p-9f64a8a7.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-66f5c6cb.entry.js.map → p-a8128d9a.entry.js.map} +0 -0
- /package/dist/twilight/{p-679bcc4c.entry.js.map → p-b3df8eba.entry.js.map} +0 -0
- /package/dist/twilight/{p-bced4dd5.system.entry.js.map → p-b66ce34c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-18cad003.system.entry.js.map → p-b93f8a7b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-15ac73d8.entry.js.map → p-bd675f34.entry.js.map} +0 -0
- /package/dist/twilight/{p-8128a6af.system.entry.js.map → p-c5f58299.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3fc226d0.entry.js.map → p-c76c05ff.entry.js.map} +0 -0
- /package/dist/twilight/{p-94338a6a.entry.js.map → p-ca989cdf.entry.js.map} +0 -0
- /package/dist/twilight/{p-283e5d2a.system.entry.js.map → p-cac0a37c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6f789c6a.system.entry.js.map → p-cc93cc27.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f2fb025f.system.entry.js.map → p-cdfb75e6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a6ab5583.entry.js.map → p-dae66c49.entry.js.map} +0 -0
- /package/dist/twilight/{p-07be7362.entry.js.map → p-e75ddf6b.entry.js.map} +0 -0
- /package/dist/twilight/{p-feb47683.system.entry.js.map → p-ea45208a.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-acd4ad3d.entry.js.map → p-eb859ac0.entry.js.map} +0 -0
- /package/dist/twilight/{p-112a3593.entry.js.map → p-eb86070c.entry.js.map} +0 -0
- /package/dist/twilight/{p-a4335e96.entry.js.map → p-efb54461.entry.js.map} +0 -0
- /package/dist/twilight/{p-594e29ef.system.entry.js.map → p-f1493561.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-03eeed12.entry.js.map → p-f192ed81.entry.js.map} +0 -0
- /package/dist/twilight/{p-780e11a1.entry.js.map → p-f5534187.entry.js.map} +0 -0
- /package/dist/twilight/{p-73c55156.entry.js.map → p-fa752787.entry.js.map} +0 -0
- /package/dist/twilight/{p-f1f76cad.entry.js.map → p-fc5309ad.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{a as e}from"./p-CgtvEd63.js";salla.event.setMaxListeners(100);class t{setIncludes(e){this.includes=e;return this}toggleElementClassIf(e,t,a,r){t=Array.isArray(t)?t:t.split(" ");a=Array.isArray(a)?a:a.split(" ");let n=r(e);e===null||e===void 0?void 0:e.classList.remove(...n?a:t);e===null||e===void 0?void 0:e.classList.add(...n?t:a);return this}toggleClassIf(e,t,a,r){document.querySelectorAll(e).forEach((e=>this.toggleElementClassIf(e,t,a,r)));return this}isValidEmail(e){const t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(String(e).toLowerCase())}filterEmojies(e){var t=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;return e.replace(t,"")}debounce(e,...t){if(!this.debounce_){this.debounce_=salla.helpers.debounce(((e,...t)=>e(...t)),500)}return this.debounce_(e,...t)}getProductsSource(e){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","customer.wishlist":"wishlist","landing-page":"landing-page","product.index.tag":"tags","product.index.sales":"sales","components.most_sales_products":"sales"}[e||salla.config.get("page.slug")]||e||"latest"}getPageTitleForSource(e){e={brands:"common.titles.brands",latest:"blocks.home.latest_products",offers:"common.titles.discounts",sales:"common.titles.most_sales"}[e];return e?salla.lang.get(e):""}getProductsSourceValue(e,t){const a=this.getProductsSource(e);let r=null;if(t){try{r=typeof t==="string"?JSON.parse(t):t}catch(e){console.error("Failed to parse JSON string in sourceValue:",e)}}if(!["search","json","offers","latest","sales","related"].includes(a)){if(Array.isArray(r)&&r.length){return r}if(Array.isArray(r)&&!r.length){return""}if(typeof r==="number"){return[r]}if(!t&&["categories","tags","brands"].includes(e)){return[salla.config.get("page.id")]}}if(r||t){return r||t}if(a==="search"){return new URLSearchParams(window.location.search).get("q")||""}return salla.config.get("page.id")}extractFiltersFromUrl(e){let t={};e.forEach(((e,a)=>{const r=a.match(/^filters\[(.*?)\](\[(.*?)\])?$/u);if(r){const a=r[1];const n=r[3];if(n){t[a]=t[a]||{};t[a][n]=e}else{t[a]=e}}else{const r=a.match(/^(.*?)$/u);if(r){t[r[1]]=e}}}));return t}async injectExtraFieldsToResponse(e){if(!e||!this.includes)return e;const t=e.data.map((e=>e.id));try{const{data:a}=await this.fetchImagesAndOptions(t);this.injectOptionsAndImages(e.data,a);if(!this.includes.includes("metadata")){return e}const r=await salla.api.metadata.fetchValues("product",t);e.data.forEach((e=>{e["metadata"]=r.data.find((t=>parseInt(t.entity_id)===parseInt(e.id)))}));return e}catch(e){console.error("Error in injectExtraFieldsToResponse:",e);throw e}}fetchImagesAndOptions(e){return this.productsIncludes().length?salla.api.product.fetchOptions(e,{with:this.productsIncludes()}):Promise.resolve({data:[]})}injectOptionsAndImages(e,t){return t.length?e.map((e=>{this.includes.filter((e=>e!=="metadata")).forEach((a=>{const r=t.find((t=>parseInt(t.id)===parseInt(e.id)));e[a]=r?r[a]:null}));return e})):null}productsIncludes(){var e;return(e=this.includes)===null||e===void 0?void 0:e.filter((e=>e!="metadata"))}parseJson(e){if(typeof e!=="string"){return e}try{return JSON.parse(e)}catch(e){salla.logger.error("Failed to parse includes as JSON:",e)}return null}getProductSchemaMarkupScript(e){var t,a;const r=document.createElement("script");r.type="application/ld+json";const n={"@context":"http://schema.org","@type":"Product",name:e===null||e===void 0?void 0:e.name,image:((t=e===null||e===void 0?void 0:e.image)===null||t===void 0?void 0:t.url)||(e===null||e===void 0?void 0:e.thumbnail),description:e===null||e===void 0?void 0:e.description,brand:{"@type":"Brand",logo:(a=e===null||e===void 0?void 0:e.brand)===null||a===void 0?void 0:a.logo},offers:{"@type":"Offer",price:e===null||e===void 0?void 0:e.price}};r.text=JSON.stringify(n);return r}createProductSchema(e,t){var a;let r={productID:`${e.id}`,"@type":"Product",name:e.name,url:e.url,image:e.image.url||e.image,description:e.description||e.subtitle||e.name,offers:{"@type":"Offer",url:e.url,priceCurrency:e.currency,price:e.price,itemCondition:"NewCondition",availability:e.is_available?"InStock":"OutOfStock",priceValidUntil:e.discount_ends||new Date((new Date).setDate((new Date).getDate()+7)).toISOString().split("T")[0],priceSpecification:{"@type":"PriceSpecification",price:e.regular_price,priceCurrency:e.currency,valueAddedTaxIncluded:e.is_taxable},seller:{"@type":"Organization",name:salla.config.get("store.name")}}};if((a=e.rating)===null||a===void 0?void 0:a.stars){r.aggregateRating={"@type":"AggregateRating",ratingValue:e.rating.stars,reviewCount:e.rating.count}}return{"@type":"ListItem",position:t,item:r}}generateProductSchema(e){const t="salla-product-schema-script";if(document.getElementById(t)){salla.logger.warn(`already added schema-script with id (${t})!`);return}const a=document.createElement("script");a.type="application/ld+json";a.id=t;const r={"@context":"https://schema.org","@type":"ItemList",name:salla.config.get("page.title"),itemListElement:e.map(((e,t)=>this.createProductSchema(e,t+1)))};a.textContent=JSON.stringify(r);document.head.appendChild(a)}formatDateFromString(e,t,a="en"){const r=new Date(e);const n={en:"Invalid Date",ar:"تاريخ غير صالح"};if(isNaN(r.getTime())){return n[a]}const s={en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]};const
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{a as e}from"./p-CgtvEd63.js";salla.event.setMaxListeners(100);class t{setIncludes(e){this.includes=e;return this}toggleElementClassIf(e,t,a,r){t=Array.isArray(t)?t:t.split(" ");a=Array.isArray(a)?a:a.split(" ");let n=r(e);e===null||e===void 0?void 0:e.classList.remove(...n?a:t);e===null||e===void 0?void 0:e.classList.add(...n?t:a);return this}toggleClassIf(e,t,a,r){document.querySelectorAll(e).forEach((e=>this.toggleElementClassIf(e,t,a,r)));return this}isValidEmail(e){const t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(String(e).toLowerCase())}filterEmojies(e){var t=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;return e.replace(t,"")}debounce(e,...t){if(!this.debounce_){this.debounce_=salla.helpers.debounce(((e,...t)=>e(...t)),500)}return this.debounce_(e,...t)}getProductsSource(e){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","customer.wishlist":"wishlist","landing-page":"landing-page","product.index.tag":"tags","product.index.sales":"sales","components.most_sales_products":"sales"}[e||salla.config.get("page.slug")]||e||"latest"}getPageTitleForSource(e){e={brands:"common.titles.brands",latest:"blocks.home.latest_products",offers:"common.titles.discounts",sales:"common.titles.most_sales"}[e];return e?salla.lang.get(e):""}getProductsSourceValue(e,t){const a=this.getProductsSource(e);let r=null;if(t){try{r=typeof t==="string"?JSON.parse(t):t}catch(e){console.error("Failed to parse JSON string in sourceValue:",e)}}if(!["search","json","offers","latest","sales","related"].includes(a)){if(Array.isArray(r)&&r.length){return r}if(Array.isArray(r)&&!r.length){return""}if(typeof r==="number"){return[r]}if(!t&&["categories","tags","brands"].includes(e)){return[salla.config.get("page.id")]}}if(r||t){return r||t}if(a==="search"){return new URLSearchParams(window.location.search).get("q")||""}return salla.config.get("page.id")}extractFiltersFromUrl(e){let t={};e.forEach(((e,a)=>{const r=a.match(/^filters\[(.*?)\](\[(.*?)\])?$/u);if(r){const a=r[1];const n=r[3];if(n){t[a]=t[a]||{};t[a][n]=e}else{t[a]=e}}else{const r=a.match(/^(.*?)$/u);if(r){t[r[1]]=e}}}));return t}async injectExtraFieldsToResponse(e){if(!e||!this.includes)return e;const t=e.data.map((e=>e.id));try{const{data:a}=await this.fetchImagesAndOptions(t);this.injectOptionsAndImages(e.data,a);if(!this.includes.includes("metadata")){return e}const r=await salla.api.metadata.fetchValues("product",t);e.data.forEach((e=>{e["metadata"]=r.data.find((t=>parseInt(t.entity_id)===parseInt(e.id)))}));return e}catch(e){console.error("Error in injectExtraFieldsToResponse:",e);throw e}}fetchImagesAndOptions(e){return this.productsIncludes().length?salla.api.product.fetchOptions(e,{with:this.productsIncludes()}):Promise.resolve({data:[]})}injectOptionsAndImages(e,t){return t.length?e.map((e=>{this.includes.filter((e=>e!=="metadata")).forEach((a=>{const r=t.find((t=>parseInt(t.id)===parseInt(e.id)));e[a]=r?r[a]:null}));return e})):null}productsIncludes(){var e;return(e=this.includes)===null||e===void 0?void 0:e.filter((e=>e!="metadata"))}parseJson(e){if(typeof e!=="string"){return e}try{return JSON.parse(e)}catch(e){salla.logger.error("Failed to parse includes as JSON:",e)}return null}getProductSchemaMarkupScript(e){var t,a;const r=document.createElement("script");r.type="application/ld+json";const n={"@context":"http://schema.org","@type":"Product",name:e===null||e===void 0?void 0:e.name,image:((t=e===null||e===void 0?void 0:e.image)===null||t===void 0?void 0:t.url)||(e===null||e===void 0?void 0:e.thumbnail),description:e===null||e===void 0?void 0:e.description,brand:{"@type":"Brand",logo:(a=e===null||e===void 0?void 0:e.brand)===null||a===void 0?void 0:a.logo},offers:{"@type":"Offer",price:e===null||e===void 0?void 0:e.price}};r.text=JSON.stringify(n);return r}createProductSchema(e,t){var a;let r={productID:`${e.id}`,"@type":"Product",name:e.name,url:e.url,image:e.image.url||e.image,description:e.description||e.subtitle||e.name,offers:{"@type":"Offer",url:e.url,priceCurrency:e.currency,price:e.price,itemCondition:"NewCondition",availability:e.is_available?"InStock":"OutOfStock",priceValidUntil:e.discount_ends||new Date((new Date).setDate((new Date).getDate()+7)).toISOString().split("T")[0],priceSpecification:{"@type":"PriceSpecification",price:e.regular_price,priceCurrency:e.currency,valueAddedTaxIncluded:e.is_taxable},seller:{"@type":"Organization",name:salla.config.get("store.name")}}};if((a=e.rating)===null||a===void 0?void 0:a.stars){r.aggregateRating={"@type":"AggregateRating",ratingValue:e.rating.stars,reviewCount:e.rating.count}}return{"@type":"ListItem",position:t,item:r}}generateProductSchema(e){const t="salla-product-schema-script";if(document.getElementById(t)){salla.logger.warn(`already added schema-script with id (${t})!`);return}const a=document.createElement("script");a.type="application/ld+json";a.id=t;const r={"@context":"https://schema.org","@type":"ItemList",name:salla.config.get("page.title"),itemListElement:e.map(((e,t)=>this.createProductSchema(e,t+1)))};a.textContent=JSON.stringify(r);document.head.appendChild(a)}formatDateFromString(e,t,a="en"){const r=new Date(e);const n={en:"Invalid Date",ar:"تاريخ غير صالح"};if(isNaN(r.getTime())){return n[a]}const s={en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]};const u={en:["January","February","March","April","May","June","July","August","September","October","November","December"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]};const i=s[a][r.getDay()];const o=t(r.getDate(),a==="en");const d=u[a][r.getMonth()];const c=t(r.getFullYear(),a==="en");return`${i} ${o} ${d} ${c}`}copyToClipboard(e){var t=e.target.innerText;navigator.clipboard.writeText(t).then((()=>{console.log("Text copied to clipboard: "+t)})).catch((e=>{console.error("Unable to copy text to clipboard",e)}))}animateItems(t){if(!t)return;e({targets:t,opacity:[0,1],duration:1200,translateY:[20,0],delay:function(e,t){return t*100},easing:"easeOutExpo",complete:function(e){t.forEach((e=>{e.classList.add("animated")}))}})}createReviewObject(e){return{"@type":"Review",author:{"@type":"Person",name:e.name},reviewBody:e.content,reviewRating:{"@type":"Rating",bestRating:"5",ratingValue:e.stars,worstRating:"1"}}}generateReviewSchema(e){const t=document.createElement("script");t.type="application/ld+json";const a={"@context":"http://schema.org/","@type":"Store",name:salla.config.get("store.name"),url:salla.config.get("store.url"),review:e.map((e=>this.createReviewObject(e))),aggregateRating:{"@type":"AggregateRating",ratingValue:e.reduce(((e,t)=>e+t.stars),0)/e.length,reviewCount:e.length}};t.textContent=JSON.stringify(a);document.head.appendChild(t)}}var a=new t;export{a as H};
|
|
5
|
+
//# sourceMappingURL=p-DPqQW4oH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-D1_lKraG.js","sources":["src/Helpers/Helper.ts"],"sourcesContent":["import { ProductDetail } from \"@salla.sa/twilight/types/api/product\";\nimport { Review } from \"../../src/components/salla-reviews/interfaces\";\nimport { Product as SallaProduct } from \"@salla.sa/twilight/types/common\";\nimport { ListItem, ItemList, Product as SchemaProduct, WithContext } from 'schema-dts';\nimport { Product } from '@salla.sa/twilight/types/common';\nimport anime from 'animejs';\n\n//TODO::reduce it to 10\nsalla.event.setMaxListeners(100);\n\nclass Helper {\n private debounce_: any;\n private includes;\n\n setIncludes(includes:string[]){\n this.includes = includes;\n return this;\n }\n\n toggleElementClassIf(element, classes1, classes2, callback) {\n classes1 = Array.isArray(classes1) ? classes1 : classes1.split(' ');\n classes2 = Array.isArray(classes2) ? classes2 : classes2.split(' ');\n let isClasses1 = callback(element);\n element?.classList.remove(...(isClasses1 ? classes2 : classes1));\n element?.classList.add(...(isClasses1 ? classes1 : classes2));\n return this;\n }\n\n toggleClassIf(selector, classes1, classes2, callback) {\n document.querySelectorAll(selector).forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));\n return this;\n }\n\n isValidEmail(email) {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n filterEmojies(text) {\n var characterFilter = /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|\\ud83c[\\ude32-\\ude3a]|\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])/g;\n return text.replace(characterFilter, \"\");\n }\n\n debounce(fn, ...data) {\n if (!this.debounce_) {\n this.debounce_ = salla.helpers.debounce((callback, ...innerData) => callback(...innerData), 500);\n }\n //@ts-ignore\n return this.debounce_(fn, ...data);\n }\n\n getProductsSource(source) {\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'customer.wishlist': 'wishlist',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n 'product.index.sales': 'sales',\n 'components.most_sales_products': 'sales',//temporary, delete it after two days from now\n }[source || salla.config.get('page.slug')] || source || 'latest';\n }\n\n getPageTitleForSource(source) {\n\n source = {\n 'brands': 'common.titles.brands',\n // 'categories':'',\n 'latest': 'blocks.home.latest_products',\n 'offers': 'common.titles.discounts',\n // 'search':'',\n // 'landing-page':'',\n // 'tags':'',\n 'sales': 'common.titles.most_sales',\n }[source];\n\n return source ? salla.lang.get(source) : '';\n }\n\n getProductsSourceValue(source, sourceValue) {\n const parsedSource = this.getProductsSource(source);\n\n // Validate if the source value is a valid JSON string\n let parsedSourceValue: any = null;\n if (sourceValue) {\n try {\n parsedSourceValue = typeof sourceValue === 'string' ? JSON.parse(sourceValue) : sourceValue;\n } catch (error) {\n console.error('Failed to parse JSON string in sourceValue:', error);\n }\n }\n\n // Handle different source types\n if (!['search', 'json', 'offers', 'latest', 'sales', 'related'].includes(parsedSource)) {\n\n if (Array.isArray(parsedSourceValue) && parsedSourceValue.length) {\n return parsedSourceValue;\n }\n\n\n if (Array.isArray(parsedSourceValue) && !parsedSourceValue.length) {\n return '';\n }\n\n if (typeof parsedSourceValue === 'number') {\n return [parsedSourceValue];\n }\n\n if (!sourceValue && ['categories', 'tags', 'brands'].includes(source)) {\n return [salla.config.get('page.id')];\n }\n }\n\n // Return sourceValue if it exists and is a valid JSON object/array\n if (parsedSourceValue || sourceValue) {\n return parsedSourceValue || sourceValue;\n }\n\n if (parsedSource === 'search') {\n return new URLSearchParams(window.location.search).get('q') || '';\n }\n\n // Return page id as default value\n return salla.config.get('page.id');\n }\n\n extractFiltersFromUrl(searchParams) {\n let filters = {};\n searchParams.forEach((value, key) => {\n // Handle filters[xxx] format\n const matchesNested = key.match(/^filters\\[(.*?)\\](\\[(.*?)\\])?$/u);\n\n if (matchesNested) {\n const filterName = matchesNested[1];\n const nestedKey = matchesNested[3];\n\n if (nestedKey) {\n // Handle nested object\n filters[filterName] = filters[filterName] || {};\n filters[filterName][nestedKey] = value;\n } else {\n // Handle regular key\n filters[filterName] = value;\n }\n } else {\n // Handle simple key-value pairs\n const matchesSimple = key.match(/^(.*?)$/u);\n\n if (matchesSimple) {\n filters[matchesSimple[1]] = value;\n }\n }\n });\n return filters;\n }\n\n async injectExtraFieldsToResponse(response: { data: Product[] }) {\n if (!response || !this.includes) return response;\n \n const productIds = response.data.map(product => product.id);\n \n try {\n const { data: product } = await this.fetchImagesAndOptions(productIds);\n this.injectOptionsAndImages(response.data, product);\n \n if (!this.includes.includes('metadata')) {\n return response;\n }\n \n const metadataResponse = await salla.api.metadata.fetchValues('product', productIds);\n response.data.forEach(product => {\n //@ts-ignore\n product['metadata'] = metadataResponse.data.find(meta => parseInt(meta.entity_id) === parseInt(product.id));\n });\n \n return response;\n } catch (error) {\n console.error('Error in injectExtraFieldsToResponse:', error);\n throw error;\n }\n }\n\n /**\n * This to make sure we will not request the options endpoint unless we have to.\n */\n fetchImagesAndOptions(productIds){\n return this.productsIncludes().length\n ? salla.api.product.fetchOptions(productIds, { with: this.productsIncludes() })\n : Promise.resolve({data:[]}); //fake the endpoint, to reduce unwanted query if developer wants metadata only\n }\n\n\n injectOptionsAndImages( productList: Product[], newData: Product[] ): Product[] {\n return newData.length\n ? productList.map(product => {\n this.includes\n .filter(field => field !== 'metadata')\n .forEach(field => {\n //@ts-ignore\n const foundProduct = newData.find((prod: Product) => parseInt(prod.id) === parseInt(product.id));\n product[field] = foundProduct ? foundProduct[field] : null; // Assign null or a default value if not found\n });\n return product;\n })\n :null;\n }\n\n productsIncludes(){\n return this.includes?.filter(field => field != 'metadata');\n }\n\n parseJson(includes: string | string[]): null | string[] {\n if (typeof includes !== 'string') {\n return includes;\n }\n try {\n return JSON.parse(includes);\n } catch (e) {\n salla.logger.error('Failed to parse includes as JSON:', e);\n }\n\n return null;\n }\n\n getProductSchemaMarkupScript(product: any): HTMLScriptElement {\n const scriptElement = document.createElement('script');\n scriptElement.type = 'application/ld+json';\n // TODO: This json object MIGHT need mode data or properties.\n const jsonData = {\n \"@context\": \"http://schema.org\",\n \"@type\": \"Product\",\n \"name\": product?.name,\n \"image\": product?.image?.url || product?.thumbnail,\n \"description\": product?.description,\n \"brand\": {\n \"@type\": \"Brand\",\n \"logo\": product?.brand?.logo\n },\n \"offers\": {\n \"@type\": \"Offer\",\n \"price\": product?.price\n }\n };\n scriptElement.text = JSON.stringify(jsonData);\n return scriptElement\n }\n\n createProductSchema(product: SallaProduct | ProductDetail, position: number): ListItem {\n let ProductSchema: SchemaProduct = {\n \"productID\": `${product.id}`,\n \"@type\": 'Product',\n \"name\": product.name,\n \"url\": product.url,\n \"image\": product.image.url || (product.image as string),\n \"description\": product.description || product.subtitle || product.name,\n \"offers\": {\n \"@type\": \"Offer\",\n \"url\": product.url,\n \"priceCurrency\": product.currency,\n \"price\": product.price,\n \"itemCondition\": \"NewCondition\",\n \"availability\": product.is_available ? \"InStock\" : \"OutOfStock\",\n //if there is no product.discount_ends, will set it to be valid until the end of this week\n \"priceValidUntil\": product.discount_ends || (new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0]),\n \"priceSpecification\": {\n \"@type\": \"PriceSpecification\",\n \"price\": product.regular_price,\n \"priceCurrency\": product.currency,\n \"valueAddedTaxIncluded\": product.is_taxable,\n },\n \"seller\": {\n \"@type\": \"Organization\",\n \"name\": salla.config.get('store.name'),\n },\n }\n };\n //@ts-ignore\n if (product.rating?.stars) {\n ProductSchema.aggregateRating = {\n \"@type\": \"AggregateRating\",\n //@ts-ignore\n \"ratingValue\": product.rating.stars,\n \"reviewCount\": product.rating.count,\n };\n }\n\n\n return {\n \"@type\": \"ListItem\",\n \"position\": position,\n \"item\": ProductSchema,\n\n };\n }\n \n generateProductSchema(productList: Array<SallaProduct | ProductDetail>) {\n const schemaId = 'salla-product-schema-script';\n if (document.getElementById(schemaId)) {\n salla.logger.warn(`already added schema-script with id (${schemaId})!`)\n return;\n }\n\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n script.id = schemaId;\n\n\n const schema: WithContext<ItemList> = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"ItemList\",\n \"name\": salla.config.get('page.title'),\n \"itemListElement\": productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),\n };\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n\n /**\n * Format date in the form of `Monday 13 November 2023`\n */\n formatDateFromString(dateString: string, numberCb: Function, lang: string = 'en'): string {\n const dateObject = new Date(dateString);\n\n const errors = {\n en: \"Invalid Date\",\n ar: \"تاريخ غير صالح\"\n }\n\n if (isNaN(dateObject.getTime())) {\n return errors[lang];\n }\n\n const daysOfWeek = {\n en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت']\n };\n const months = {\n en: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n ar: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']\n };\n\n const dayOfWeek = daysOfWeek[lang][dateObject.getDay()];\n const dayOfMonth = numberCb(dateObject.getDate(), lang === 'en');\n const month = months[lang][dateObject.getMonth()];\n const year = numberCb(dateObject.getFullYear(), lang === 'en');\n\n return `${dayOfWeek} ${dayOfMonth} ${month} ${year}`;\n }\n\n /**\n * Copy text into clipboard.\n * @param event \n */\n copyToClipboard(event) {\n // Get the text content from the clicked div\n var textToCopy = event.target.innerText;\n\n // Use the Clipboard API to copy text to the clipboard\n navigator.clipboard.writeText(textToCopy)\n .then(() => {\n console.log('Text copied to clipboard: ' + textToCopy);\n })\n .catch(err => {\n console.error('Unable to copy text to clipboard', err);\n });\n\n }\n\n animateItems(items: NodeListOf<Element>) {\n if (!items) return;\n anime({\n targets: items,\n opacity: [0, 1],\n duration: 1200,\n translateY: [20, 0],\n delay: function (_el, i) {\n return i * 100;\n },\n easing: 'easeOutExpo',\n complete: function (_anim) {\n items.forEach((item: Element) => {\n item.classList.add('animated');\n })\n }\n\n })\n }\n\n createReviewObject(reviewData: Review) {\n return {\n \"@type\": \"Review\",\n \"author\": reviewData.name,\n \"datePublished\": reviewData.date * 1000,\n \"description\": reviewData.content,\n \"reviewRating\": {\n \"@type\": \"Rating\",\n \"bestRating\": \"5\",\n \"ratingValue\": \"5\",\n \"worstRating\": \"1\"\n }\n };\n }\n\n generateReviewSchema(reviews: Array<Review>){\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n\n\n const schema = {\n \"@context\": \"http://schema.org/\",\n \"@type\": \"CollectionPage\",\n \"name\": \"Category Name\", // TODO: check for the correct value here\n \"description\": \"Description of the category\", // TODO: here too\n \"review\": reviews.map((review) => this.createReviewObject(review))\n }\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n}\n\nexport default new Helper;\n"],"names":[],"mappings":";;;;;AAOA;AACA,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC;AAEhC,MAAM,MAAM,CAAA;AAIV,IAAA,WAAW,CAAC,QAAiB,EAAA;AAC3B,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ;AACxB,QAAA,OAAO,IAAI;;AAGb,IAAA,oBAAoB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAA;QACxD,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;QACnE,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;AACnE,QAAA,IAAI,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC;QAClC,OAAO,KAAA,IAAA,IAAP,OAAO,KAAP,MAAA,GAAA,MAAA,GAAA,OAAO,CAAE,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC;QAChE,OAAO,KAAA,IAAA,IAAP,OAAO,KAAP,MAAA,GAAA,MAAA,GAAA,OAAO,CAAE,SA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O,EAAE,QAAQ;YACjB,QAAQ,EAAE,UAAU,CAAC,IAAI;AACzB,YAAA,eAAe,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI;YACvC,aAAa,EAAE,UAAU,CAAC,OAAO;AACjC,YAAA,cAAc,EAAE;AACd,gBAAA,OAAO,EAAE,QAAQ;AACjB,gBAAA,YAAY,EAAE,GAAG;AACjB,gBAAA,aAAa,EAAE,GAAG;AAClB,gBAAA,aAAa,EAAE;AAChB;SACF;;AAGH,IAAA,oBAAoB,CAAC,OAAsB,EAAA;QACzC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,QAAA,MAAM,CAAC,IAAI,GAAG,qBAAqB;AAGnC,QAAA,MAAM,MAAM,GAAG;AACb,YAAA,UAAU,EAAE,oBAAoB;AAChC,YAAA,OAAO,EAAE,gBAAgB;YACzB,MAAM,EAAE,eAAe;YACvB,aAAa,EAAE,6BAA6B;AAC5C,YAAA,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;SAClE;QAED,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3C,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;;AAEpC;AAED,eAAe,IAAI,MAAM;;;;"}
|
|
1
|
+
{"version":3,"file":"p-DPqQW4oH.js","sources":["src/Helpers/Helper.ts"],"sourcesContent":["import { ProductDetail } from \"@salla.sa/twilight/types/api/product\";\nimport { Review } from \"../../src/components/salla-reviews/interfaces\";\nimport { Product as SallaProduct } from \"@salla.sa/twilight/types/common\";\nimport { ListItem, ItemList, Product as SchemaProduct, WithContext } from 'schema-dts';\nimport { Product } from '@salla.sa/twilight/types/common';\nimport anime from 'animejs';\n\n//TODO::reduce it to 10\nsalla.event.setMaxListeners(100);\n\nclass Helper {\n private debounce_: any;\n private includes;\n\n setIncludes(includes:string[]){\n this.includes = includes;\n return this;\n }\n\n toggleElementClassIf(element, classes1, classes2, callback) {\n classes1 = Array.isArray(classes1) ? classes1 : classes1.split(' ');\n classes2 = Array.isArray(classes2) ? classes2 : classes2.split(' ');\n let isClasses1 = callback(element);\n element?.classList.remove(...(isClasses1 ? classes2 : classes1));\n element?.classList.add(...(isClasses1 ? classes1 : classes2));\n return this;\n }\n\n toggleClassIf(selector, classes1, classes2, callback) {\n document.querySelectorAll(selector).forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));\n return this;\n }\n\n isValidEmail(email) {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n filterEmojies(text) {\n var characterFilter = /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|\\ud83c[\\ude32-\\ude3a]|\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])/g;\n return text.replace(characterFilter, \"\");\n }\n\n debounce(fn, ...data) {\n if (!this.debounce_) {\n this.debounce_ = salla.helpers.debounce((callback, ...innerData) => callback(...innerData), 500);\n }\n //@ts-ignore\n return this.debounce_(fn, ...data);\n }\n\n getProductsSource(source) {\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'customer.wishlist': 'wishlist',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n 'product.index.sales': 'sales',\n 'components.most_sales_products': 'sales',//temporary, delete it after two days from now\n }[source || salla.config.get('page.slug')] || source || 'latest';\n }\n\n getPageTitleForSource(source) {\n\n source = {\n 'brands': 'common.titles.brands',\n // 'categories':'',\n 'latest': 'blocks.home.latest_products',\n 'offers': 'common.titles.discounts',\n // 'search':'',\n // 'landing-page':'',\n // 'tags':'',\n 'sales': 'common.titles.most_sales',\n }[source];\n\n return source ? salla.lang.get(source) : '';\n }\n\n getProductsSourceValue(source, sourceValue) {\n const parsedSource = this.getProductsSource(source);\n\n // Validate if the source value is a valid JSON string\n let parsedSourceValue: any = null;\n if (sourceValue) {\n try {\n parsedSourceValue = typeof sourceValue === 'string' ? JSON.parse(sourceValue) : sourceValue;\n } catch (error) {\n console.error('Failed to parse JSON string in sourceValue:', error);\n }\n }\n\n // Handle different source types\n if (!['search', 'json', 'offers', 'latest', 'sales', 'related'].includes(parsedSource)) {\n\n if (Array.isArray(parsedSourceValue) && parsedSourceValue.length) {\n return parsedSourceValue;\n }\n\n\n if (Array.isArray(parsedSourceValue) && !parsedSourceValue.length) {\n return '';\n }\n\n if (typeof parsedSourceValue === 'number') {\n return [parsedSourceValue];\n }\n\n if (!sourceValue && ['categories', 'tags', 'brands'].includes(source)) {\n return [salla.config.get('page.id')];\n }\n }\n\n // Return sourceValue if it exists and is a valid JSON object/array\n if (parsedSourceValue || sourceValue) {\n return parsedSourceValue || sourceValue;\n }\n\n if (parsedSource === 'search') {\n return new URLSearchParams(window.location.search).get('q') || '';\n }\n\n // Return page id as default value\n return salla.config.get('page.id');\n }\n\n extractFiltersFromUrl(searchParams) {\n let filters = {};\n searchParams.forEach((value, key) => {\n // Handle filters[xxx] format\n const matchesNested = key.match(/^filters\\[(.*?)\\](\\[(.*?)\\])?$/u);\n\n if (matchesNested) {\n const filterName = matchesNested[1];\n const nestedKey = matchesNested[3];\n\n if (nestedKey) {\n // Handle nested object\n filters[filterName] = filters[filterName] || {};\n filters[filterName][nestedKey] = value;\n } else {\n // Handle regular key\n filters[filterName] = value;\n }\n } else {\n // Handle simple key-value pairs\n const matchesSimple = key.match(/^(.*?)$/u);\n\n if (matchesSimple) {\n filters[matchesSimple[1]] = value;\n }\n }\n });\n return filters;\n }\n\n async injectExtraFieldsToResponse(response: { data: Product[] }) {\n if (!response || !this.includes) return response;\n \n const productIds = response.data.map(product => product.id);\n \n try {\n const { data: product } = await this.fetchImagesAndOptions(productIds);\n this.injectOptionsAndImages(response.data, product);\n \n if (!this.includes.includes('metadata')) {\n return response;\n }\n \n const metadataResponse = await salla.api.metadata.fetchValues('product', productIds);\n response.data.forEach(product => {\n //@ts-ignore\n product['metadata'] = metadataResponse.data.find(meta => parseInt(meta.entity_id) === parseInt(product.id));\n });\n \n return response;\n } catch (error) {\n console.error('Error in injectExtraFieldsToResponse:', error);\n throw error;\n }\n }\n\n /**\n * This to make sure we will not request the options endpoint unless we have to.\n */\n fetchImagesAndOptions(productIds){\n return this.productsIncludes().length\n ? salla.api.product.fetchOptions(productIds, { with: this.productsIncludes() })\n : Promise.resolve({data:[]}); //fake the endpoint, to reduce unwanted query if developer wants metadata only\n }\n\n\n injectOptionsAndImages( productList: Product[], newData: Product[] ): Product[] {\n return newData.length\n ? productList.map(product => {\n this.includes\n .filter(field => field !== 'metadata')\n .forEach(field => {\n //@ts-ignore\n const foundProduct = newData.find((prod: Product) => parseInt(prod.id) === parseInt(product.id));\n product[field] = foundProduct ? foundProduct[field] : null; // Assign null or a default value if not found\n });\n return product;\n })\n :null;\n }\n\n productsIncludes(){\n return this.includes?.filter(field => field != 'metadata');\n }\n\n parseJson(includes: string | string[]): null | string[] {\n if (typeof includes !== 'string') {\n return includes;\n }\n try {\n return JSON.parse(includes);\n } catch (e) {\n salla.logger.error('Failed to parse includes as JSON:', e);\n }\n\n return null;\n }\n\n getProductSchemaMarkupScript(product: any): HTMLScriptElement {\n const scriptElement = document.createElement('script');\n scriptElement.type = 'application/ld+json';\n // TODO: This json object MIGHT need mode data or properties.\n const jsonData = {\n \"@context\": \"http://schema.org\",\n \"@type\": \"Product\",\n \"name\": product?.name,\n \"image\": product?.image?.url || product?.thumbnail,\n \"description\": product?.description,\n \"brand\": {\n \"@type\": \"Brand\",\n \"logo\": product?.brand?.logo\n },\n \"offers\": {\n \"@type\": \"Offer\",\n \"price\": product?.price\n }\n };\n scriptElement.text = JSON.stringify(jsonData);\n return scriptElement\n }\n\n createProductSchema(product: SallaProduct | ProductDetail, position: number): ListItem {\n let ProductSchema: SchemaProduct = {\n \"productID\": `${product.id}`,\n \"@type\": 'Product',\n \"name\": product.name,\n \"url\": product.url,\n \"image\": product.image.url || (product.image as string),\n \"description\": product.description || product.subtitle || product.name,\n \"offers\": {\n \"@type\": \"Offer\",\n \"url\": product.url,\n \"priceCurrency\": product.currency,\n \"price\": product.price,\n \"itemCondition\": \"NewCondition\",\n \"availability\": product.is_available ? \"InStock\" : \"OutOfStock\",\n //if there is no product.discount_ends, will set it to be valid until the end of this week\n \"priceValidUntil\": product.discount_ends || (new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0]),\n \"priceSpecification\": {\n \"@type\": \"PriceSpecification\",\n \"price\": product.regular_price,\n \"priceCurrency\": product.currency,\n \"valueAddedTaxIncluded\": product.is_taxable,\n },\n \"seller\": {\n \"@type\": \"Organization\",\n \"name\": salla.config.get('store.name'),\n },\n }\n };\n //@ts-ignore\n if (product.rating?.stars) {\n ProductSchema.aggregateRating = {\n \"@type\": \"AggregateRating\",\n //@ts-ignore\n \"ratingValue\": product.rating.stars,\n \"reviewCount\": product.rating.count,\n };\n }\n\n\n return {\n \"@type\": \"ListItem\",\n \"position\": position,\n \"item\": ProductSchema,\n\n };\n }\n \n generateProductSchema(productList: Array<SallaProduct | ProductDetail>) {\n const schemaId = 'salla-product-schema-script';\n if (document.getElementById(schemaId)) {\n salla.logger.warn(`already added schema-script with id (${schemaId})!`)\n return;\n }\n\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n script.id = schemaId;\n\n\n const schema: WithContext<ItemList> = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"ItemList\",\n \"name\": salla.config.get('page.title'),\n \"itemListElement\": productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),\n };\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n\n /**\n * Format date in the form of `Monday 13 November 2023`\n */\n formatDateFromString(dateString: string, numberCb: Function, lang: string = 'en'): string {\n const dateObject = new Date(dateString);\n\n const errors = {\n en: \"Invalid Date\",\n ar: \"تاريخ غير صالح\"\n }\n\n if (isNaN(dateObject.getTime())) {\n return errors[lang];\n }\n\n const daysOfWeek = {\n en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت']\n };\n const months = {\n en: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n ar: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']\n };\n\n const dayOfWeek = daysOfWeek[lang][dateObject.getDay()];\n const dayOfMonth = numberCb(dateObject.getDate(), lang === 'en');\n const month = months[lang][dateObject.getMonth()];\n const year = numberCb(dateObject.getFullYear(), lang === 'en');\n\n return `${dayOfWeek} ${dayOfMonth} ${month} ${year}`;\n }\n\n /**\n * Copy text into clipboard.\n * @param event \n */\n copyToClipboard(event) {\n // Get the text content from the clicked div\n var textToCopy = event.target.innerText;\n\n // Use the Clipboard API to copy text to the clipboard\n navigator.clipboard.writeText(textToCopy)\n .then(() => {\n console.log('Text copied to clipboard: ' + textToCopy);\n })\n .catch(err => {\n console.error('Unable to copy text to clipboard', err);\n });\n\n }\n\n animateItems(items: NodeListOf<Element>) {\n if (!items) return;\n anime({\n targets: items,\n opacity: [0, 1],\n duration: 1200,\n translateY: [20, 0],\n delay: function (_el, i) {\n return i * 100;\n },\n easing: 'easeOutExpo',\n complete: function (_anim) {\n items.forEach((item: Element) => {\n item.classList.add('animated');\n })\n }\n\n })\n }\n\n createReviewObject(reviewData: Review) {\n return {\n \"@type\": \"Review\",\n \"author\": { \"@type\": \"Person\", \"name\": reviewData.name },\n // \"datePublished\": reviewData.date * 1000,\n \"reviewBody\": reviewData.content,\n \"reviewRating\": {\n \"@type\": \"Rating\",\n \"bestRating\": \"5\",\n \"ratingValue\": reviewData.stars,\n \"worstRating\": \"1\"\n }\n };\n }\n\n generateReviewSchema(reviews: Array<Review>){\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n\n\n const schema = {\n \"@context\": \"http://schema.org/\",\n \"@type\": \"Store\",\n \"name\": salla.config.get('store.name'),\n \"url\": salla.config.get('store.url'),\n \"review\": reviews.map((review) => this.createReviewObject(review)),\n \"aggregateRating\": {\n \"@type\": \"AggregateRating\",\n \"ratingValue\": reviews.reduce((acc, review) => acc + review.stars, 0) / reviews.length,\n \"reviewCount\": reviews.length\n }\n }\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n}\n\nexport default new Helper;\n"],"names":[],"mappings":";;;;;AAOA;AACA,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC;AAEhC,MAAM,MAAM,CAAA;AAIV,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OAAO;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;YACtC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;AACpC,YAAA,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAClE,YAAA,iBAAiB,EAAE;AACjB,gBAAA,OAAO,EAAE,iBAAiB;gBAC1B,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM;gBACtF,aAAa,EAAE,OAAO,CAAC;AACxB;SACF;QAED,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3C,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;;AAEpC;AAED,eAAe,IAAI,MAAM;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,a,o){function l(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,i){function s(e){try{n(o.next(e))}catch(e){i(e)}}function r(e){try{n(o["throw"](e))}catch(e){i(e)}}function n(e){e.done?a(e.value):l(e.value).then(s,r)}n((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,l,i,s;return s={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(e){return function(t){return n([e,t])}}function n(r){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(a=0)),a)try{if(o=1,l&&(i=r[0]&2?l["return"]:r[0]?l["throw"]||((i=l["return"])&&i.call(l),0):l.next)&&!(i=i.call(l,r[1])).done)return i;if(l=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:a.label++;return{value:r[1],done:false};case 5:a.label++;l=r[1];r=[0];continue;case 7:r=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){a=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(r[0]===6&&a.label<i[1]){a.label=i[1];i=r;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(r);break}if(i[2])a.ops.pop();a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e];l=0}finally{o=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-Cb1UIzZb.system.js","./p-fIRBYbgk.system.js"],(function(e,t){"use strict";var a,o,l;return{setters:[function(t){a=t.p;o=t.b;e("setNonce",t.s)},function(e){l=e.g}],execute:function(){var e=this;var i=function(){var e=t.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return a(o)};i().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,l()];case 1:e.sent();return[2,o(JSON.parse('[["p-e0f20b16.system",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"showOffer":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"multipleBankOfferTitleText":[32],"multipleBankOfferTitleDescription":[32],"buy_quantity_text":[32]}]]],["p-fde43494.system",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"hideOutLabel":[1,"hide-out-label"],"uniqueKey":[1,"unique-key"],"config":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"disableCardValue":[32],"availableDigitalCardValues":[32],"setOptionsData":[64],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-cf17e7f5.system",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-bced4dd5.system",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["p-594e29ef.system",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-f047dc2e.system",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-652c3a18.system",[[0,"salla-reviews",{"displayAllLink":[516,"display-all-link"],"source":[513],"sourceValue":[513,"source-value"],"limit":[514],"type":[1],"sort":[1],"hideCustomerInfo":[4,"hide-customer-info"],"reviews":[32],"isRTL":[32],"showReviews":[32],"testimonialText":[32],"displayAllLinkText":[32]}]]],["p-6f789c6a.system",[[0,"salla-reviews-page",{"reviews":[32],"isLoading":[32],"pagination":[32],"sort":[32]}]]],["p-489c4e43.system",[[0,"salla-wallet",{"transactionsArray":[32],"balance":[32],"isLoading":[32],"nextPageUrl":[32]}]]],["p-87eef8f5.system",[[0,"salla-conditional-offer",{"offer":[32],"products":[32],"isLoading":[32],"canRender":[32]}]]],["p-70db2fda.system",[[0,"salla-orders",{"params":[16],"loadMoreText":[1,"load-more-text"],"orderNumberText":[32],"totalOrderText":[32],"orderDateText":[32],"orderStatusText":[32],"noOrderText":[32],"load_more_text_trans":[32],"languageCode":[32],"orders":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"nextPage":[32],"showPlaceholder":[32]}]]],["p-a57e5439.system",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-d9e539ba.system",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-37904a9d.system",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-2f7a8fd5.system",[[0,"salla-cart-item-offers",{"quantity":[2],"offers":[1],"itemId":[2,"item-id"],"productPrice":[2,"product-price"],"internalQuantity":[32],"internalOffers":[32],"internalProductPrice":[32],"showAll":[32],"freeLabel":[32],"receivedOffer":[32],"discountAmountLabel":[32],"showMoreOffers":[32]}]]],["p-c8fa97ee.system",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-18cad003.system",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"country":[1],"tabbyIsActive":[32],"spotiiIsActive":[32],"tamaraIsActive":[32],"mispayActive":[32],"emkanIsActive":[32],"madfuActive":[32],"rajehiIsActive":[32],"installment_sheria_text":[32]}]]],["p-8128a6af.system",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-f2fb025f.system",[[0,"salla-metadata",{"entity":[1],"entityId":[8,"entity-id"],"specs":[32],"download":[32]}]]],["p-283e5d2a.system",[[0,"salla-payments",{"exclude":[1040]}]]],["p-60e44e99.system",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-e803e9c9.system",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16,"filters-data"],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-ea2a8ec3.system",[[0,"salla-notification-item",{"notification":[16]}]]],["p-feb47683.system",[[0,"salla-review-card",{"review":[16],"currentSlide":[32],"purchasedCount":[32],"showPurchaseCount":[32]}]]],["p-0bfcfa47.system",[[4,"salla-tooltip",{"text":[1],"targetId":[1,"target-id"],"show":[32]},[[9,"mouseover","handleMouseOver"],[9,"mouseout","handleMouseOut"]]]]],["p-1fe13a36.system",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"physicalProducts":[4,"physical-products"],"vertical":[4],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverCountryFieldLabel":[32],"ksa":[32],"selectCity":[32],"selectCityInfo":[32],"receiverCityFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"hostId":[32],"receiverCity":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"blockTitle":[1,"block-title"],"hideTitle":[4,"hide-title"],"type":[1],"showFormAvatar":[4,"show-form-avatar"],"hideBought":[4,"hide-bought"],"sort":[1],"testimonials":[4],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"mostHelpfulLabel":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32],"showRatingSummary":[32],"allowLikes":[32],"reload":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"showContactWidget":[32],"errorMessage":[32],"dragAndDropFilesLabel":[32],"contactSubjectLabel":[32],"editReviewLabel":[32],"allowedImagesTypesLabel":[32],"addImagesLabel":[32],"editImagesLabel":[32],"threeImagesMax":[32],"areYouSureLabel":[32],"confirmDeletionLabel":[32],"cancelLabel":[32],"confirmDeleteBtn":[32],"updatedSuccessfullyLabel":[32],"deletedSuccessfullyLabel":[32],"allowAttachImages":[32],"allowContactSupport":[32],"contactUsLabel":[32],"images":[32],"productImages":[32],"editItemImages":[32],"contact_body":[32],"editMode":[32],"defaultMode":[32],"deleteMode":[32],"shouldOpenDeleteModal":[32],"editType":[32],"editFeedbackId":[32],"deleteFeedbackId":[32],"editItem":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-user-profile",{"customFields":[1,"custom-fields"],"minAge":[2,"min-age"],"userData":[32],"isEditable":[32],"userDefinedFields":[32],"disableAction":[32],"isLoading":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"deactivateAccount":[32],"promotionalMsgs":[32],"hideMyName":[32],"hideMyNameDesc":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32],"canHideName":[32],"isHiddenName":[32],"isNotifiable":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]],{"search_term":["handleSearch"]}],[0,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"storeId":[1032,"store-id"],"api":[1],"headers":[1025],"withoutReload":[1028,"without-reload"],"messages":[32],"isClosable":[32],"iframeLoaded":[32],"scrolling":[32],"direction":[32],"canRenderIframe":[32],"open":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"limit":[2],"menus":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[0,"salla-breadcrumb",{"breadcrumbs":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]},null,{"quantity":["watchPropHandler"]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"wallet":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[0,"salla-reviews-summary",{"itemId":[2,"item-id"],"data":[32],"canRender":[32],"basedOnLabel":[32],"recommendedLabel":[32],"showRatingSummary":[32],"recommendationOnly":[32],"showRecommendation":[32]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"rowCards":[516,"row-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"switchToNormalBehavior":[32],"parsedFilters":[32],"filtersSnapshot":[32],"setFilters":[64],"reload":[64]}],[0,"salla-comment-item",{"comment":[16],"hideBought":[16,"hide-bought"],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32],"allowLikes":[32],"allowAttachImages":[32],"helpfulLabel":[32],"likesCount":[32],"likedComments":[32]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16,"append-to"],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16,"format-date"],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16,"date-parser"],"position":[1],"positionElement":[16,"position-element"],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4],"disabled":[4]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32],"isApplePayActive":[32],"buyNowText":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-file-upload",{"value":[1544],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"type":[1],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"allowImagePreview":[4,"allow-image-preview"],"imagePreviewHeight":[2,"image-preview-height"],"filePosterHeight":[2,"file-poster-height"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16,"ignored-files"],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16,"chunk-retry-delays"],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"max_images_count":[32],"max_count_hint":[32],"uploadedFiles":[32],"isListScrollerListenerAdded":[32],"showMaxCountHint":[32],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]},null,{"channels":["channelsWatcher"]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025],"hideUnits":[4,"hide-units"]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2],"withLabel":[4,"with-label"],"editable":[4],"translationsLoaded":[32],"labels":[32],"reviewLabel":[32],"selectedStar":[32]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"sliderInstance":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64],"updateSize":[64],"sliderInit":[64],"thumbsSliderInstance":[64],"thumbsSliderInit":[64],"thumbsSliderUpdate":[64],"thumbsSliderUpdateSlides":[64],"getThumbsUpdateSize":[64],"thumbsSlideTo":[64],"getThumbsSlides":[64]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"disabled":[4],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]],{"visible":["handleVisible"]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-2c742cef.system",[[0,"salla-booking-field",{"option":[16],"productId":[2,"product-id"],"bookNowLabel":[32],"editLabel":[32],"bookedLabel":[32],"selectDate":[32],"bookingUrl":[32],"iframeReady":[32],"reservations":[32],"reservationsInput":[32]}],[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-34e55241.system",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"isMin":[32],"isRTL":[32],"reset":[64]}]]]]'),t)]}}))}))}))}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-BoU3rP9-.system.js","./p-_Df6_reQ.system.js"],(function(e,t){"use strict";var a,o,l;return{setters:[function(t){a=t.p;o=t.b;e("setNonce",t.s)},function(e){l=e.g}],execute:function(){var e=this;var i=function(){var e=t.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return a(o)};i().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,l()];case 1:e.sent();return[2,o(JSON.parse('[["p-5c3c4081.system",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"showOffer":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"multipleBankOfferTitleText":[32],"multipleBankOfferTitleDescription":[32],"buy_quantity_text":[32]}]]],["p-08c7235b.system",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"hideOutLabel":[1,"hide-out-label"],"uniqueKey":[1,"unique-key"],"config":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"disableCardValue":[32],"availableDigitalCardValues":[32],"setOptionsData":[64],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-5237da49.system",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-b66ce34c.system",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["p-f1493561.system",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-6993e228.system",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-8c5e2cf8.system",[[0,"salla-reviews",{"displayAllLink":[516,"display-all-link"],"source":[513],"sourceValue":[513,"source-value"],"limit":[514],"type":[1],"sort":[1],"hideCustomerInfo":[4,"hide-customer-info"],"reviews":[32],"isRTL":[32],"showReviews":[32],"testimonialText":[32],"displayAllLinkText":[32]}]]],["p-cc93cc27.system",[[0,"salla-reviews-page",{"reviews":[32],"isLoading":[32],"pagination":[32],"sort":[32]}]]],["p-263f39a8.system",[[0,"salla-wallet",{"transactionsArray":[32],"balance":[32],"isLoading":[32],"nextPageUrl":[32]}]]],["p-689aca0e.system",[[0,"salla-conditional-offer",{"offer":[32],"products":[32],"isLoading":[32],"canRender":[32]}]]],["p-277a736d.system",[[0,"salla-orders",{"params":[16],"loadMoreText":[1,"load-more-text"],"orderNumberText":[32],"totalOrderText":[32],"orderDateText":[32],"orderStatusText":[32],"noOrderText":[32],"load_more_text_trans":[32],"languageCode":[32],"orders":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"nextPage":[32],"showPlaceholder":[32]}]]],["p-04acb9d5.system",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-8c1eca80.system",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-041cfdc6.system",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-1fcbf6bb.system",[[0,"salla-cart-item-offers",{"quantity":[2],"offers":[1],"itemId":[2,"item-id"],"productPrice":[2,"product-price"],"internalQuantity":[32],"internalOffers":[32],"internalProductPrice":[32],"showAll":[32],"freeLabel":[32],"receivedOffer":[32],"discountAmountLabel":[32],"showMoreOffers":[32]}]]],["p-905c335e.system",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-b93f8a7b.system",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"country":[1],"tabbyIsActive":[32],"spotiiIsActive":[32],"tamaraIsActive":[32],"mispayActive":[32],"emkanIsActive":[32],"madfuActive":[32],"rajehiIsActive":[32],"installment_sheria_text":[32]}]]],["p-c5f58299.system",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-cdfb75e6.system",[[0,"salla-metadata",{"entity":[1],"entityId":[8,"entity-id"],"specs":[32],"download":[32]}]]],["p-cac0a37c.system",[[0,"salla-payments",{"exclude":[1040]}]]],["p-9f64a8a7.system",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-7b1212df.system",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16,"filters-data"],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-551f5ae2.system",[[0,"salla-notification-item",{"notification":[16]}]]],["p-ea45208a.system",[[0,"salla-review-card",{"review":[16],"currentSlide":[32],"purchasedCount":[32],"showPurchaseCount":[32]}]]],["p-4526ac8e.system",[[4,"salla-tooltip",{"text":[1],"targetId":[1,"target-id"],"show":[32]},[[9,"mouseover","handleMouseOver"],[9,"mouseout","handleMouseOut"]]]]],["p-718df47e.system",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"physicalProducts":[4,"physical-products"],"vertical":[4],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverCountryFieldLabel":[32],"ksa":[32],"selectCity":[32],"selectCityInfo":[32],"receiverCityFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"hostId":[32],"receiverCity":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"blockTitle":[1,"block-title"],"hideTitle":[4,"hide-title"],"type":[1],"showFormAvatar":[4,"show-form-avatar"],"hideBought":[4,"hide-bought"],"sort":[1],"testimonials":[4],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"mostHelpfulLabel":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32],"showRatingSummary":[32],"allowLikes":[32],"reload":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"showContactWidget":[32],"errorMessage":[32],"dragAndDropFilesLabel":[32],"contactSubjectLabel":[32],"editReviewLabel":[32],"allowedImagesTypesLabel":[32],"addImagesLabel":[32],"editImagesLabel":[32],"threeImagesMax":[32],"areYouSureLabel":[32],"confirmDeletionLabel":[32],"cancelLabel":[32],"confirmDeleteBtn":[32],"updatedSuccessfullyLabel":[32],"deletedSuccessfullyLabel":[32],"allowAttachImages":[32],"allowContactSupport":[32],"contactUsLabel":[32],"images":[32],"productImages":[32],"editItemImages":[32],"contact_body":[32],"editMode":[32],"defaultMode":[32],"deleteMode":[32],"shouldOpenDeleteModal":[32],"editType":[32],"editFeedbackId":[32],"deleteFeedbackId":[32],"editItem":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-user-profile",{"customFields":[1,"custom-fields"],"minAge":[2,"min-age"],"userData":[32],"isEditable":[32],"userDefinedFields":[32],"disableAction":[32],"isLoading":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"deactivateAccount":[32],"promotionalMsgs":[32],"hideMyName":[32],"hideMyNameDesc":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32],"canHideName":[32],"isHiddenName":[32],"isNotifiable":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]],{"search_term":["handleSearch"]}],[0,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"storeId":[1032,"store-id"],"api":[1],"headers":[1025],"withoutReload":[1028,"without-reload"],"messages":[32],"isClosable":[32],"iframeLoaded":[32],"scrolling":[32],"direction":[32],"canRenderIframe":[32],"open":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"limit":[2],"menus":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[0,"salla-breadcrumb",{"breadcrumbs":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]},null,{"quantity":["watchPropHandler"]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"wallet":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[0,"salla-reviews-summary",{"itemId":[2,"item-id"],"data":[32],"canRender":[32],"basedOnLabel":[32],"recommendedLabel":[32],"showRatingSummary":[32],"recommendationOnly":[32],"showRecommendation":[32]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"rowCards":[516,"row-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"switchToNormalBehavior":[32],"parsedFilters":[32],"filtersSnapshot":[32],"setFilters":[64],"reload":[64]}],[0,"salla-comment-item",{"comment":[16],"hideBought":[16,"hide-bought"],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32],"allowLikes":[32],"allowAttachImages":[32],"helpfulLabel":[32],"likesCount":[32],"likedComments":[32]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16,"append-to"],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16,"format-date"],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16,"date-parser"],"position":[1],"positionElement":[16,"position-element"],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4],"disabled":[4]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32],"isApplePayActive":[32],"buyNowText":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-file-upload",{"value":[1544],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"type":[1],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"allowImagePreview":[4,"allow-image-preview"],"imagePreviewHeight":[2,"image-preview-height"],"filePosterHeight":[2,"file-poster-height"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16,"ignored-files"],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16,"chunk-retry-delays"],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"max_images_count":[32],"max_count_hint":[32],"uploadedFiles":[32],"isListScrollerListenerAdded":[32],"showMaxCountHint":[32],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]},null,{"channels":["channelsWatcher"]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025],"hideUnits":[4,"hide-units"]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2],"withLabel":[4,"with-label"],"editable":[4],"translationsLoaded":[32],"labels":[32],"reviewLabel":[32],"selectedStar":[32]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"sliderInstance":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64],"updateSize":[64],"sliderInit":[64],"thumbsSliderInstance":[64],"thumbsSliderInit":[64],"thumbsSliderUpdate":[64],"thumbsSliderUpdateSlides":[64],"getThumbsUpdateSize":[64],"thumbsSlideTo":[64],"getThumbsSlides":[64]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"disabled":[4],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]],{"visible":["handleVisible"]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-9f151920.system",[[0,"salla-booking-field",{"option":[16],"productId":[2,"product-id"],"bookNowLabel":[32],"editLabel":[32],"bookedLabel":[32],"selectDate":[32],"bookingUrl":[32],"iframeReady":[32],"reservations":[32],"reservationsInput":[32]}],[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-09d4e21c.system",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"isMin":[32],"isRTL":[32],"reset":[64]}]]]]'),t)]}}))}))}))}}}));
|
|
5
|
+
//# sourceMappingURL=p-D_NAqNa-.system.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-
|
|
1
|
+
{"version":3,"file":"p-D_NAqNa-.system.js","sources":["../../node_modules/.pnpm/@stencil+core@4.35.1/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.35.1 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAAA;MACA;MACA;;MAKA,IAAI,YAAY,GAAG,MAAM;MAUzB,EAAE,MAAM,UAAU,GAAG,eAAe;MACpC,EAAE,MAAM,IAAI,GAAiE,EAAE;MAC/E,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;MACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI;MACrD;MACA,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC;MAC7B,CAAC;;MCnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;MACvC,EAAE,MAAM,aAAa,EAAE;MACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;MAC7D,CAAC,CAAC;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-
|
|
1
|
+
{"version":3,"file":"p-DdgccFjk.system.js","sources":["src/components/salla-apps-icons/salla-apps-icons.scss?tag=salla-apps-icons","src/components/salla-apps-icons/salla-apps-icons.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, State, h, Element } from '@stencil/core';\n/**\n * @slot app - Replaces app item, has replaceable props `{icon}`, `{name}`.\n */\n@Component({\n tag: 'salla-apps-icons',\n styleUrl: 'salla-apps-icons.scss',\n})\nexport class SallaAppsIcons {\n constructor() {\n this.appSlot = this.host.querySelector('[slot=\"app\"]')?.innerHTML || `<img alt={name} src={icon} />`;\n salla.onReady(() => {\n this.apps = salla.config.get('store.apps');\n });\n\n salla.lang.onLoaded(() => {\n this.appsTitle = salla.lang.get('blocks.footer.download_apps');\n });\n }\n private readonly appSlot: string;\n @Element() host: HTMLElement;\n @State() apps = salla.config.get('store.apps');\n\n /**\n * Flag to show or hide title.\n */\n @Prop() hideTitle: boolean;\n\n /**\n * The title to display.\n */\n @Prop() appsTitle: string;\n\n /**\n * Display flag to horizontal/vertical.\n */\n @Prop() vertical: boolean;\n\n private getAppsArray() {\n return Object.entries(this.apps)\n .map(([name, value]) => ({ name, value }));\n }\n\n componentWillLoad() {\n return new Promise(resolve => salla.onReady(resolve));\n }\n\n render() {\n const appsArray = this.getAppsArray();\n if (Array.isArray(appsArray) && !appsArray.length) {\n return;\n }\n return (\n <Host class=\"s-apps-icons\">\n {!this.hideTitle && <h3>{this.appsTitle}</h3>}\n <div class={{\"s-apps-icons-list\": true, \"vertical\": this.vertical}}>\n {appsArray.map((app, index) => (\n <a key={index} href={app.value as string} rel=\"noreferrer\" target=\"_blank\" class=\"s-apps-icons-item\" id=\"app-slot\" innerHTML={this.appSlot\n .replace(/\\{icon\\}/g, salla.url.cdn(`images/${app.name}.png`))\n .replace(/\\{name\\}/g, app.name)}>\n </a>\n ))}\n </div>\n </Host>\n );\n }\n componentDidRender() {\n this.host.querySelector('[slot=\"app\"]')?.remove();\n }\n}\n"],"names":[],"mapp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AAS,CAAM,EAC7C,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,EAAC,mBAAmB,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAC,IAC/D,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,MACvB,CAAG,CAAA,GAAA,EAAA,EAAA,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,KAAe,EAAE,GAAG,EAAC,YAAY,EAAC,MAAM,EAAC,QAAQ,EAAC,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAC,UAAU,EAAC,SAAS,EAAE,IAAI,CAAC;MACjI,iBAAA,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,IAAI,CAAA,IAAA,CAAM,CAAC;MAC5D,iBAAA,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA,CAC7B,CACL,CAAC,CACE,CACH;;UAGX,kBAAkB,GAAA;;MAChB,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,MAAM,EAAE;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-DD-NUH5O.system.js","sources":["src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h, Method, State, Prop, Event, Element } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.scrollHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${value}`} key={`${option.key}-option-${value}`}>\n <input\n id={`${option.key}-option-${value}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}</a>\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAAA,MAAM,qBAAqB,GAAG,sBAAsB;;YCQvC,kBAAkB,mCAAA,MAAA;MAJ/B,IAAA,WAAA,CAAA,OAAA,EAAA;;;MA4BU,QAAA,IAAU,CAAA,UAAA,GAAW,GAAG;MAEvB,QAAA,IAAM,CAAA,MAAA,GAAY,IAAI;MACtB,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;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AAI,CAAC,MAAM;oBACnC,CAAmB,CAAA,mBAAA,EAAA,EAAA,SAAS,EAAE,CAAC,KAAK,KAAI;0BACxC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;MACjC,iBAAC,EACC,GAAG,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,GAAG,KAAK,EACrC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAA,CAAI,CAEzB,EACL,IAAI,CAAC,YAAY;MAChB,YAAA,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,uBAAuB,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAA,EAAG,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAK,CAEhG,CACD;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-DiIWpMR9.system.js","sources":["src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h, Method, State, Prop, Event, Element } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.scrollHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${value}`} key={`${option.key}-option-${value}`}>\n <input\n id={`${option.key}-option-${value}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}</a>\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAAA,MAAM,qBAAqB,GAAG,sBAAsB;;YCQvC,kBAAkB,mCAAA,MAAA;MAJ/B,IAAA,WAAA,CAAA,OAAA,EAAA;;;MA4BU,QAAA,IAAU,CAAA,UAAA,GAAW,GAAG;MAEvB,QAAA,IAAM,CAAA,MAAA,GAAY,IAAI;MACtB,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;MAC3B,QAAA,IAAa,CAAA,aAAA,GAAW,YAAY;MACpC,QAAA,IAAa,CAAA,aAAA,GAAW,SAAS;cACjC,IAAI,CAAA,IAAA,GAAQ,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;MAwK9C;UAjKC,iBAAiB,GAAA;;MAEf,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAA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E,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAA,CAAI,CAEzB,EACL,IAAI,CAAC,YAAY;MAChB,YAAA,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,uBAAuB,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAA,EAAG,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAK,CAEhG,CACD;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-C6uUYgzy.system.js","sources":["src/components/salla-review-card/salla-review-card.css?tag=salla-review-card","src/components/salla-review-card/salla-review-card.tsx"],"sourcesContent":[":host {\n display: block\n}\n\n","import { Component, h, Element, State, Prop } from \"@stencil/core\";\nimport type { Review } from \"./interfaces\";\nimport IconVerified from '../../assets/svg/check.svg'\nimport IconStar2 from '../../assets/svg/star-02.svg'\nimport IconStar2Muted from '../../assets/svg/star-02-muted.svg'\nimport IconFire2 from '../../assets/svg/fire-02.svg'\n\ninterface SwipeEvent {\n x: number;\n y: number;\n}\n\n@Component({\n tag: \"salla-review-card\",\n styleUrl: \"salla-review-card.css\",\n})\nexport class SallaReviewCard {\n @Element() el!: HTMLElement;\n @Prop() review: Partial<Review>;\n @State() currentSlide = 0;\n @State() purchasedCount: string\n @State() showPurchaseCount = false;\n\n private startPoint: SwipeEvent = { x: 0, y: 0 };\n private isSwiping = false;\n private sliderElement?: HTMLElement;\n private isRTL = \"rtl\"\n\n async componentDidLoad() {\n await salla.onReady()\n\n this.showPurchaseCount = !!salla.config.get('store.settings.product.total_sold_enabled', false);\n this.isRTL = salla.config.get('theme.is_rtl', true)\n\n this.purchasedCount = salla.lang.getWithDefault('blocks.home.reviews.purchased_count',\n this.isRTL ? ` تم شراءه ${this.review.product?.sold_quantity} مرة`\n : `Purchased ${this.review.product.sold_quantity} times`,\n { count: this.review.product?.sold_quantity })\n\n this.initializeSlider();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n private get images(): Review[\"product\"][\"images\"] {\n const { review } = this;\n return review?.images?.length > 1\n ? review.images.map((image, idx) => ({ url: image, alt: '', id: idx }))\n : review?.product?.images || []\n }\n\n private get hasMultipleImages(): boolean {\n return this.images.length > 1;\n }\n\n private get slideTransform(): string {\n const direction = this.isRTL ? 1 : -1;\n return `translateX(${this.currentSlide * 100 * direction}%)`;\n }\n\n private initializeSlider() {\n if (!this.hasMultipleImages) return;\n\n this.sliderElement = this.el.querySelector(\".s-review-card-slider-container\") as HTMLElement;\n if (!this.sliderElement) return;\n\n // Enable pointer events and set touch-action\n this.sliderElement.style.touchAction = 'pan-y pinch-zoom';\n this.addEventListeners();\n }\n\n private addEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.addEventListener(\"pointerdown\", this.handlePointerDown, { passive: false });\n this.sliderElement.addEventListener(\"pointermove\", this.handlePointerMove, { passive: false });\n this.sliderElement.addEventListener(\"pointerup\", this.handlePointerUp, { passive: true });\n this.sliderElement.addEventListener(\"pointercancel\", this.handlePointerCancel, { passive: true });\n }\n\n private removeEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.removeEventListener(\"pointerdown\", this.handlePointerDown);\n this.sliderElement.removeEventListener(\"pointermove\", this.handlePointerMove);\n this.sliderElement.removeEventListener(\"pointerup\", this.handlePointerUp);\n this.sliderElement.removeEventListener(\"pointercancel\", this.handlePointerCancel);\n }\n\n private handlePointerDown = (e: PointerEvent) => {\n // Only handle primary pointer (first touch/mouse)\n if (!e.isPrimary) return;\n\n this.sliderElement?.setPointerCapture(e.pointerId);\n\n this.startSwipe(e.clientX, e.clientY);\n e.preventDefault();\n };\n\n private handlePointerMove = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n e.preventDefault();\n };\n\n private handlePointerUp = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.endSwipe(e.clientX, e.clientY);\n };\n\n private handlePointerCancel = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.isSwiping = false;\n };\n\n private startSwipe(x: number, y: number) {\n this.startPoint = { x, y };\n this.isSwiping = true;\n }\n\n componentDidRender() {\n this.removeEventListeners()\n this.addEventListeners();\n }\n\n private endSwipe(x: number, y: number) {\n this.isSwiping = false;\n const dx = x - this.startPoint.x;\n const dy = y - this.startPoint.y;\n this.processSwipe(dx, dy);\n }\n\n private processSwipe(dx: number, dy: number) {\n const MIN_SWIPE_DISTANCE = 10;\n\n if (Math.abs(dx) < MIN_SWIPE_DISTANCE || Math.abs(dy) > Math.abs(dx)) return;\n\n const isLeftSwipe = dx < 0;\n const shouldGoNext = this.isRTL ? !isLeftSwipe : isLeftSwipe;\n\n if (shouldGoNext) {\n this.goToNextSlide();\n } else {\n this.goToPrevSlide();\n }\n }\n\n private goToNextSlide() {\n if (this.currentSlide < this.images.length - 1) {\n this.currentSlide++;\n }\n }\n\n private goToPrevSlide() {\n if (this.currentSlide > 0) {\n this.currentSlide--;\n }\n }\n\n private goToSlide = (index: number) => {\n this.currentSlide = Math.max(0, Math.min(index, this.images.length - 1));\n };\n\n private renderStars() {\n return Array(5)\n .fill(null)\n .map((_, index) => <span key={index} innerHTML={this.review.stars >= index + 1 ? IconStar2 : IconStar2Muted} />);\n }\n\n private renderDots() {\n return this.images.map(({ url }, index) => (\n <button\n key={url || index}\n type=\"button\"\n class={`s-review-card-slider-dot ${this.currentSlide === index ? \"active\" : \"\"}`}\n onClick={() => this.goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n onPointerDown={() => this.goToSlide(index)}\n />\n ));\n }\n\n private renderSlider() {\n if (!this.hasMultipleImages) return null;\n\n return (\n <div class=\"s-review-card-slider-container\">\n <div class=\"s-review-card-slides\" style={{ transform: this.slideTransform }}>\n {this.images.map((image) => (\n <div key={image?.id} class=\"s-review-card-slider-slide\">\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n width={275}\n height={275}\n loading=\"lazy\"\n draggable={false}\n />\n </div>\n ))}\n </div>\n <div class=\"s-review-card-slider-dots\">{this.renderDots()}</div>\n </div>\n );\n }\n\n private renderSingleImage() {\n const image = this.review?.product?.image;\n if (!image || this.hasMultipleImages) return null;\n\n return (\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n class=\"s-review-card-image\"\n width={275}\n height={275}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n\n );\n }\n\n private renderHeader() {\n return (\n <div class=\"s-review-card-header\">\n <div class=\"s-review-card-reviewer-name\">\n <p>{this.review?.name}</p>\n {this.review?.has_order && <span class=\"s-review-card-verified-icon\" innerHTML={IconVerified} />}\n </div>\n <div class=\"s-review-card-stars\">{this.renderStars()}</div>\n </div>\n );\n }\n\n private renderProductInfo() {\n const product = this.review?.product;\n if (!product) return null;\n\n return (\n <a href={this.review?.product?.url} class=\"s-review-card-product-container\">\n <img\n alt={product.image?.alt || \"Product\"}\n src={product.image?.url}\n class=\"s-review-card-product-image\"\n width={60}\n height={60}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n <div class=\"s-review-card-product-details\">\n <p class=\"s-review-card-product-details-name\">{product.name}</p>\n {this.showPurchaseCount ? <p class=\"s-review-card-product-details-purchase-count\">\n <span innerHTML={IconFire2} />\n {this.purchasedCount}\n </p> : null}\n </div>\n </a>\n );\n }\n\n render() {\n return <div class=\"s-review-card-container\">\n {this.renderSlider()}\n {this.renderSingleImage()}\n {renderDivider()}\n <div class=\"s-review-card-content\">\n {this.renderHeader()}\n <p\n class=\"s-review-card-review-content\"\n innerHTML={this.review?.content}\n />\n {renderDivider()}\n {this.renderProductInfo()}\n </div>\n </div>\n }\n}\n\nconst renderDivider = (className?: string) => (\n <div class={`s-review-card-divider ${className || \"\"}`} />\n)"],"names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;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-NnKijTrt.system.js","sources":["src/components/salla-review-card/salla-review-card.css?tag=salla-review-card","src/components/salla-review-card/salla-review-card.tsx"],"sourcesContent":[":host {\n display: block\n}\n\n","import { Component, h, Element, State, Prop } from \"@stencil/core\";\nimport type { Review } from \"./interfaces\";\nimport IconVerified from '../../assets/svg/check.svg'\nimport IconStar2 from '../../assets/svg/star-02.svg'\nimport IconStar2Muted from '../../assets/svg/star-02-muted.svg'\nimport IconFire2 from '../../assets/svg/fire-02.svg'\n\ninterface SwipeEvent {\n x: number;\n y: number;\n}\n\n@Component({\n tag: \"salla-review-card\",\n styleUrl: \"salla-review-card.css\",\n})\nexport class SallaReviewCard {\n @Element() el!: HTMLElement;\n @Prop() review: Partial<Review>;\n @State() currentSlide = 0;\n @State() purchasedCount: string\n @State() showPurchaseCount = false;\n\n private startPoint: SwipeEvent = { x: 0, y: 0 };\n private isSwiping = false;\n private sliderElement?: HTMLElement;\n private isRTL = \"rtl\"\n\n async componentDidLoad() {\n await salla.onReady()\n\n this.showPurchaseCount = !!salla.config.get('store.settings.product.total_sold_enabled', false);\n this.isRTL = salla.config.get('theme.is_rtl', true)\n\n this.purchasedCount = salla.lang.getWithDefault('blocks.home.reviews.purchased_count',\n this.isRTL ? ` تم شراءه ${this.review.product?.sold_quantity} مرة`\n : `Purchased ${this.review.product.sold_quantity} times`,\n { count: this.review.product?.sold_quantity })\n\n this.initializeSlider();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n private get images(): Review[\"product\"][\"images\"] {\n const { review } = this;\n return review?.images?.length > 1\n ? review.images.map((image, idx) => ({ url: image, alt: '', id: idx }))\n : review?.product?.images || []\n }\n\n private get hasMultipleImages(): boolean {\n return this.images.length > 1;\n }\n\n private get slideTransform(): string {\n const direction = this.isRTL ? 1 : -1;\n return `translateX(${this.currentSlide * 100 * direction}%)`;\n }\n\n private initializeSlider() {\n if (!this.hasMultipleImages) return;\n\n this.sliderElement = this.el.querySelector(\".s-review-card-slider-container\") as HTMLElement;\n if (!this.sliderElement) return;\n\n // Enable pointer events and set touch-action\n this.sliderElement.style.touchAction = 'pan-y pinch-zoom';\n this.addEventListeners();\n }\n\n private addEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.addEventListener(\"pointerdown\", this.handlePointerDown, { passive: false });\n this.sliderElement.addEventListener(\"pointermove\", this.handlePointerMove, { passive: false });\n this.sliderElement.addEventListener(\"pointerup\", this.handlePointerUp, { passive: true });\n this.sliderElement.addEventListener(\"pointercancel\", this.handlePointerCancel, { passive: true });\n }\n\n private removeEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.removeEventListener(\"pointerdown\", this.handlePointerDown);\n this.sliderElement.removeEventListener(\"pointermove\", this.handlePointerMove);\n this.sliderElement.removeEventListener(\"pointerup\", this.handlePointerUp);\n this.sliderElement.removeEventListener(\"pointercancel\", this.handlePointerCancel);\n }\n\n private handlePointerDown = (e: PointerEvent) => {\n // Only handle primary pointer (first touch/mouse)\n if (!e.isPrimary) return;\n\n this.sliderElement?.setPointerCapture(e.pointerId);\n\n this.startSwipe(e.clientX, e.clientY);\n e.preventDefault();\n };\n\n private handlePointerMove = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n e.preventDefault();\n };\n\n private handlePointerUp = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.endSwipe(e.clientX, e.clientY);\n };\n\n private handlePointerCancel = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.isSwiping = false;\n };\n\n private startSwipe(x: number, y: number) {\n this.startPoint = { x, y };\n this.isSwiping = true;\n }\n\n componentDidRender() {\n this.removeEventListeners()\n this.addEventListeners();\n }\n\n private endSwipe(x: number, y: number) {\n this.isSwiping = false;\n const dx = x - this.startPoint.x;\n const dy = y - this.startPoint.y;\n this.processSwipe(dx, dy);\n }\n\n private processSwipe(dx: number, dy: number) {\n const MIN_SWIPE_DISTANCE = 10;\n\n if (Math.abs(dx) < MIN_SWIPE_DISTANCE || Math.abs(dy) > Math.abs(dx)) return;\n\n const isLeftSwipe = dx < 0;\n const shouldGoNext = this.isRTL ? !isLeftSwipe : isLeftSwipe;\n\n if (shouldGoNext) {\n this.goToNextSlide();\n } else {\n this.goToPrevSlide();\n }\n }\n\n private goToNextSlide() {\n if (this.currentSlide < this.images.length - 1) {\n this.currentSlide++;\n }\n }\n\n private goToPrevSlide() {\n if (this.currentSlide > 0) {\n this.currentSlide--;\n }\n }\n\n private goToSlide = (index: number) => {\n this.currentSlide = Math.max(0, Math.min(index, this.images.length - 1));\n };\n\n private renderStars() {\n return Array(5)\n .fill(null)\n .map((_, index) => <span key={index} innerHTML={this.review.stars >= index + 1 ? IconStar2 : IconStar2Muted} />);\n }\n\n private renderDots() {\n return this.images.map(({ url }, index) => (\n <button\n key={url || index}\n type=\"button\"\n class={`s-review-card-slider-dot ${this.currentSlide === index ? \"active\" : \"\"}`}\n onClick={() => this.goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n onPointerDown={() => this.goToSlide(index)}\n />\n ));\n }\n\n private renderSlider() {\n if (!this.hasMultipleImages) return null;\n\n return (\n <div class=\"s-review-card-slider-container\">\n <div class=\"s-review-card-slides\" style={{ transform: this.slideTransform }}>\n {this.images.map((image) => (\n <div key={image?.id} class=\"s-review-card-slider-slide\">\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n width={275}\n height={275}\n loading=\"lazy\"\n draggable={false}\n />\n </div>\n ))}\n </div>\n <div class=\"s-review-card-slider-dots\">{this.renderDots()}</div>\n </div>\n );\n }\n\n private renderSingleImage() {\n const image = this.review?.product?.image;\n if (!image || this.hasMultipleImages) return null;\n\n return (\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n class=\"s-review-card-image\"\n width={275}\n height={275}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n\n );\n }\n\n private renderHeader() {\n return (\n <div class=\"s-review-card-header\">\n <div class=\"s-review-card-reviewer-name\">\n <p>{this.review?.name}</p>\n {this.review?.has_order && <span class=\"s-review-card-verified-icon\" innerHTML={IconVerified} />}\n </div>\n <div class=\"s-review-card-stars\">{this.renderStars()}</div>\n </div>\n );\n }\n\n private renderProductInfo() {\n const product = this.review?.product;\n if (!product) return null;\n\n return (\n <a href={this.review?.product?.url} class=\"s-review-card-product-container\">\n <img\n alt={product.image?.alt || \"Product\"}\n src={product.image?.url}\n class=\"s-review-card-product-image\"\n width={60}\n height={60}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n <div class=\"s-review-card-product-details\">\n <p class=\"s-review-card-product-details-name\">{product.name}</p>\n {this.showPurchaseCount ? <p class=\"s-review-card-product-details-purchase-count\">\n <span innerHTML={IconFire2} />\n {this.purchasedCount}\n </p> : null}\n </div>\n </a>\n );\n }\n\n render() {\n return <div class=\"s-review-card-container\">\n {this.renderSlider()}\n {this.renderSingleImage()}\n {renderDivider()}\n <div class=\"s-review-card-content\">\n {this.renderHeader()}\n <p\n class=\"s-review-card-review-content\"\n innerHTML={this.review?.content}\n />\n {renderDivider()}\n {this.renderProductInfo()}\n </div>\n </div>\n }\n}\n\nconst renderDivider = (className?: string) => (\n <div class={`s-review-card-divider ${className || \"\"}`} />\n)"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA,MAAM,kBAAkB,GAAG,sBAAsB;;wBCgBpC,eAAe,gCAAA,MAAA;kBAJ5B,IAAA,WAAA,CAAA,OAAA,EAAA;;kBAOW,QAAA,IAAY,CAAA,YAAA,GAAG,CAAC;kBAEhB,QAAA,IAAiB,CAAA,iBAAA,GAAG,KAAK;kBAE1B,QAAA,IAAU,CAAA,UAAA,GAAe,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;kBACvC,QAAA,IAAS,CAAA,SAAA,GAA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