@salla.sa/twilight-theme-engine 1.0.185 → 1.0.187
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/{AddToCartForm-LCSBAN3M.js → AddToCartForm-G4US2K7W.js} +3 -3
- package/dist/{AddToCartForm-LCSBAN3M.js.map → AddToCartForm-G4US2K7W.js.map} +1 -1
- package/dist/{BlogAuthorPage-ZYBQYUV7.js → BlogAuthorPage-222QDUPB.js} +19 -19
- package/dist/{BlogAuthorPage-ZYBQYUV7.js.map → BlogAuthorPage-222QDUPB.js.map} +1 -1
- package/dist/{BlogCategoryPage-O2ORXWYL.js → BlogCategoryPage-NHFUGGXZ.js} +19 -19
- package/dist/{BlogCategoryPage-O2ORXWYL.js.map → BlogCategoryPage-NHFUGGXZ.js.map} +1 -1
- package/dist/{BlogPage-RXWT2CV3.js → BlogPage-J3EMWHJL.js} +17 -17
- package/dist/{BlogPage-RXWT2CV3.js.map → BlogPage-J3EMWHJL.js.map} +1 -1
- package/dist/{BlogSinglePage-QY42WRDZ.js → BlogSinglePage-S3ZVQB4O.js} +17 -17
- package/dist/{BlogSinglePage-QY42WRDZ.js.map → BlogSinglePage-S3ZVQB4O.js.map} +1 -1
- package/dist/{BlogTagPage-P7B3CFAO.js → BlogTagPage-WMO6LP6V.js} +19 -19
- package/dist/{BlogTagPage-P7B3CFAO.js.map → BlogTagPage-WMO6LP6V.js.map} +1 -1
- package/dist/{BrandsPage-FV57PLGZ.js → BrandsPage-N77PNHAY.js} +18 -18
- package/dist/{BrandsPage-FV57PLGZ.js.map → BrandsPage-N77PNHAY.js.map} +1 -1
- package/dist/{Breadcrumb-TM4EXKTO.js → Breadcrumb-CH35SNV3.js} +17 -17
- package/dist/{Breadcrumb-TM4EXKTO.js.map → Breadcrumb-CH35SNV3.js.map} +1 -1
- package/dist/{CanvasOverlay-YNXYF27N.js → CanvasOverlay-OTXDNGBZ.js} +3 -3
- package/dist/{CanvasOverlay-YNXYF27N.js.map → CanvasOverlay-OTXDNGBZ.js.map} +1 -1
- package/dist/{CartItem-DVQET7SW.js → CartItem-UPANY4SI.js} +17 -17
- package/dist/{CartItem-DVQET7SW.js.map → CartItem-UPANY4SI.js.map} +1 -1
- package/dist/{CartSummary-XGMWN6PP.js → CartSummary-CSNEFF4A.js} +17 -17
- package/dist/{CartSummary-XGMWN6PP.js.map → CartSummary-CSNEFF4A.js.map} +1 -1
- package/dist/{Copyright-OTQZENUE.js → Copyright-6GQAFJLC.js} +3 -3
- package/dist/{Copyright-OTQZENUE.js.map → Copyright-6GQAFJLC.js.map} +1 -1
- package/dist/{CustomerLayout-IMI4SJDO.js → CustomerLayout-FHYJ2LCS.js} +17 -17
- package/dist/{CustomerLayout-IMI4SJDO.js.map → CustomerLayout-FHYJ2LCS.js.map} +1 -1
- package/dist/{Footer-JUHWLQCI.js → Footer-AZZTIGG2.js} +3 -3
- package/dist/{Footer-JUHWLQCI.js.map → Footer-AZZTIGG2.js.map} +1 -1
- package/dist/GoogleTag-UYTAI5BS.js +15 -0
- package/dist/{GoogleTag-VBFDNEU6.js.map → GoogleTag-UYTAI5BS.js.map} +1 -1
- package/dist/{Header-P46ZDWIQ.js → Header-QMMLLHII.js} +8 -8
- package/dist/{Header-P46ZDWIQ.js.map → Header-QMMLLHII.js.map} +1 -1
- package/dist/{LatestProducts-QWTQZVBJ.js → LatestProducts-NRHWV3GJ.js} +19 -19
- package/dist/{LatestProducts-QWTQZVBJ.js.map → LatestProducts-NRHWV3GJ.js.map} +1 -1
- package/dist/{LoyaltyPage-LJOJRJB5.js → LoyaltyPage-HWQSXH75.js} +17 -17
- package/dist/{LoyaltyPage-LJOJRJB5.js.map → LoyaltyPage-HWQSXH75.js.map} +1 -1
- package/dist/{LoyaltyPointsPage-4JYLRGKN.js → LoyaltyPointsPage-6WAVG4LY.js} +6 -6
- package/dist/{LoyaltyPointsPage-4JYLRGKN.js.map → LoyaltyPointsPage-6WAVG4LY.js.map} +1 -1
- package/dist/{MainMenu-LK22UWZO.js → MainMenu-SLR7KZNZ.js} +5 -5
- package/dist/{MainMenu-LK22UWZO.js.map → MainMenu-SLR7KZNZ.js.map} +1 -1
- package/dist/{MasterLayout-ZA32NBT4.js → MasterLayout-WRDTHUZD.js} +17 -17
- package/dist/{MasterLayout-ZA32NBT4.js.map → MasterLayout-WRDTHUZD.js.map} +1 -1
- package/dist/{MobileMenu-MMDICOBU.js → MobileMenu-N7XUYRY7.js} +18 -18
- package/dist/{MobileMenu-MMDICOBU.js.map → MobileMenu-N7XUYRY7.js.map} +1 -1
- package/dist/{NotificationsPage-V5JAFDFP.js → NotificationsPage-D3M5HSOT.js} +17 -17
- package/dist/{NotificationsPage-V5JAFDFP.js.map → NotificationsPage-D3M5HSOT.js.map} +1 -1
- package/dist/{OrderSinglePage-EKJ5Q4EM.js → OrderSinglePage-SJGZX2PX.js} +18 -18
- package/dist/{OrderSinglePage-EKJ5Q4EM.js.map → OrderSinglePage-SJGZX2PX.js.map} +1 -1
- package/dist/{OrdersPage-JGTRYEST.js → OrdersPage-SVAHMVKY.js} +17 -17
- package/dist/{OrdersPage-JGTRYEST.js.map → OrdersPage-SVAHMVKY.js.map} +1 -1
- package/dist/{PageSingle-J6JBAD45.js → PageSingle-FC6OZBXQ.js} +3 -3
- package/dist/{PageSingle-J6JBAD45.js.map → PageSingle-FC6OZBXQ.js.map} +1 -1
- package/dist/ProductDetails-GJQH2SYY.js +24 -0
- package/dist/ProductDetails-GJQH2SYY.js.map +1 -0
- package/dist/{ProfilePage-SWFGEY5Y.js → ProfilePage-OWWPOUBQ.js} +17 -17
- package/dist/{ProfilePage-SWFGEY5Y.js.map → ProfilePage-OWWPOUBQ.js.map} +1 -1
- package/dist/{ReviewsPage-A733RD4D.js → ReviewsPage-7BUBNVNY.js} +3 -3
- package/dist/{ReviewsPage-A733RD4D.js.map → ReviewsPage-7BUBNVNY.js.map} +1 -1
- package/dist/{SeoCartWidget-DIOS62BL.js → SeoCartWidget-L6BGLQ5D.js} +17 -17
- package/dist/{SeoCartWidget-DIOS62BL.js.map → SeoCartWidget-L6BGLQ5D.js.map} +1 -1
- package/dist/{SettingsPage-FZBUPLLA.js → SettingsPage-Q5IDLYYH.js} +17 -17
- package/dist/{SettingsPage-FZBUPLLA.js.map → SettingsPage-Q5IDLYYH.js.map} +1 -1
- package/dist/{StoreClosedNotification-ZWRTPUPP.js → StoreClosedNotification-N7CYMV76.js} +18 -18
- package/dist/{StoreClosedNotification-ZWRTPUPP.js.map → StoreClosedNotification-N7CYMV76.js.map} +1 -1
- package/dist/{TestimonialsPage-6TSZIUZX.js → TestimonialsPage-7PJLORJ3.js} +3 -3
- package/dist/{TestimonialsPage-6TSZIUZX.js.map → TestimonialsPage-7PJLORJ3.js.map} +1 -1
- package/dist/{ThankYouPage-RPZK6SRW.js → ThankYouPage-52YKBIXF.js} +17 -17
- package/dist/{ThankYouPage-RPZK6SRW.js.map → ThankYouPage-52YKBIXF.js.map} +1 -1
- package/dist/{WalletPage-42RFDAUY.js → WalletPage-EWRWZM7U.js} +18 -18
- package/dist/{WalletPage-42RFDAUY.js.map → WalletPage-EWRWZM7U.js.map} +1 -1
- package/dist/{WebMcpTools-DLW67GJM.js → WebMcpTools-4M2KPD5D.js} +5 -5
- package/dist/{WebMcpTools-DLW67GJM.js.map → WebMcpTools-4M2KPD5D.js.map} +1 -1
- package/dist/{WishlistPage-HW3ZQSGB.js → WishlistPage-YI3BJJBG.js} +19 -19
- package/dist/{WishlistPage-HW3ZQSGB.js.map → WishlistPage-YI3BJJBG.js.map} +1 -1
- package/dist/api/advertisement.js +2 -2
- package/dist/api/apps.js +2 -2
- package/dist/api/blog.js +3 -3
- package/dist/api/brands.js +3 -3
- package/dist/api/cart.js +3 -3
- package/dist/api/category.js +3 -3
- package/dist/api/client.js +1 -1
- package/dist/api/custom-url.js +2 -2
- package/dist/api/home.js +2 -2
- package/dist/api/loyalty.js +3 -3
- package/dist/api/menu.js +2 -2
- package/dist/api/notification.js +2 -2
- package/dist/api/order.js +3 -3
- package/dist/api/page.js +3 -3
- package/dist/api/product.js +3 -3
- package/dist/api/profile.js +1 -1
- package/dist/api/store.js +2 -2
- package/dist/api/translations.js +2 -2
- package/dist/api/user.js +2 -2
- package/dist/api/wallet.js +2 -2
- package/dist/api/wishlist.js +4 -4
- package/dist/{chunk-JZOBRBDY.js → chunk-25NSKD6D.js} +3 -3
- package/dist/{chunk-JZOBRBDY.js.map → chunk-25NSKD6D.js.map} +1 -1
- package/dist/{chunk-GYHZYJUL.js → chunk-2SKYTGSD.js} +3 -3
- package/dist/{chunk-GYHZYJUL.js.map → chunk-2SKYTGSD.js.map} +1 -1
- package/dist/{chunk-CSR5SCSP.js → chunk-2XVF3P7U.js} +4 -4
- package/dist/{chunk-CSR5SCSP.js.map → chunk-2XVF3P7U.js.map} +1 -1
- package/dist/chunk-35JSGMTO.js +53 -0
- package/dist/chunk-35JSGMTO.js.map +1 -0
- package/dist/{chunk-QHF66D3P.js → chunk-3MCICPB3.js} +4 -4
- package/dist/{chunk-QHF66D3P.js.map → chunk-3MCICPB3.js.map} +1 -1
- package/dist/{chunk-P65YIT3J.js → chunk-3NFAXTIG.js} +3 -3
- package/dist/{chunk-P65YIT3J.js.map → chunk-3NFAXTIG.js.map} +1 -1
- package/dist/{chunk-J3RK2CPN.js → chunk-3QAVHZBT.js} +3 -3
- package/dist/{chunk-J3RK2CPN.js.map → chunk-3QAVHZBT.js.map} +1 -1
- package/dist/{chunk-R2J4BECK.js → chunk-3QTCAC7A.js} +4 -4
- package/dist/{chunk-R2J4BECK.js.map → chunk-3QTCAC7A.js.map} +1 -1
- package/dist/{chunk-CDO7VXWO.js → chunk-5F2LF3P4.js} +4 -4
- package/dist/{chunk-CDO7VXWO.js.map → chunk-5F2LF3P4.js.map} +1 -1
- package/dist/{chunk-VEUY4U3G.js → chunk-7SVJZ6VQ.js} +3 -3
- package/dist/{chunk-VEUY4U3G.js.map → chunk-7SVJZ6VQ.js.map} +1 -1
- package/dist/{chunk-53IXAXYU.js → chunk-A3NSQLNV.js} +3 -3
- package/dist/{chunk-53IXAXYU.js.map → chunk-A3NSQLNV.js.map} +1 -1
- package/dist/{chunk-5BICYVE3.js → chunk-A7VR5G2M.js} +4 -4
- package/dist/{chunk-5BICYVE3.js.map → chunk-A7VR5G2M.js.map} +1 -1
- package/dist/{chunk-LKITJWSS.js → chunk-BG7GNCYV.js} +3 -3
- package/dist/{chunk-LKITJWSS.js.map → chunk-BG7GNCYV.js.map} +1 -1
- package/dist/{chunk-L3DCK3MF.js → chunk-CKQGZDW7.js} +3 -3
- package/dist/{chunk-L3DCK3MF.js.map → chunk-CKQGZDW7.js.map} +1 -1
- package/dist/{chunk-KFF5J6JN.js → chunk-E5HZTOWZ.js} +19 -19
- package/dist/{chunk-KFF5J6JN.js.map → chunk-E5HZTOWZ.js.map} +1 -1
- package/dist/{chunk-EV3MX2ZF.js → chunk-EFQJXQVA.js} +3 -3
- package/dist/{chunk-EV3MX2ZF.js.map → chunk-EFQJXQVA.js.map} +1 -1
- package/dist/{chunk-E6SPIMQ5.js → chunk-EIDJUUBN.js} +5 -5
- package/dist/{chunk-E6SPIMQ5.js.map → chunk-EIDJUUBN.js.map} +1 -1
- package/dist/{chunk-CZHLGKXR.js → chunk-FKXP7SNP.js} +5 -5
- package/dist/{chunk-CZHLGKXR.js.map → chunk-FKXP7SNP.js.map} +1 -1
- package/dist/{chunk-5YLKWMNP.js → chunk-GIHEV2RT.js} +3 -3
- package/dist/{chunk-5YLKWMNP.js.map → chunk-GIHEV2RT.js.map} +1 -1
- package/dist/{chunk-5KEYJA77.js → chunk-GUEKZN22.js} +4 -4
- package/dist/{chunk-5KEYJA77.js.map → chunk-GUEKZN22.js.map} +1 -1
- package/dist/{chunk-EXPUSY6B.js → chunk-GZWEIGZP.js} +3 -3
- package/dist/{chunk-EXPUSY6B.js.map → chunk-GZWEIGZP.js.map} +1 -1
- package/dist/{chunk-KMAKPTHT.js → chunk-HZ2YCYJ5.js} +4 -4
- package/dist/{chunk-KMAKPTHT.js.map → chunk-HZ2YCYJ5.js.map} +1 -1
- package/dist/{chunk-Q2Z4IPAT.js → chunk-J3456BT4.js} +7 -7
- package/dist/{chunk-Q2Z4IPAT.js.map → chunk-J3456BT4.js.map} +1 -1
- package/dist/{chunk-MHSASWOS.js → chunk-K7F7U5NR.js} +4 -4
- package/dist/{chunk-MHSASWOS.js.map → chunk-K7F7U5NR.js.map} +1 -1
- package/dist/{chunk-V5FXJ6RG.js → chunk-KHIEGO2C.js} +3 -3
- package/dist/{chunk-V5FXJ6RG.js.map → chunk-KHIEGO2C.js.map} +1 -1
- package/dist/{chunk-TQ4UZJSG.js → chunk-KZ3MXRA7.js} +7 -7
- package/dist/{chunk-TQ4UZJSG.js.map → chunk-KZ3MXRA7.js.map} +1 -1
- package/dist/{chunk-QY77WLK3.js → chunk-MQ6TJ4AJ.js} +3 -3
- package/dist/{chunk-QY77WLK3.js.map → chunk-MQ6TJ4AJ.js.map} +1 -1
- package/dist/{chunk-OOZ7R5J6.js → chunk-NB5A65PP.js} +5 -5
- package/dist/{chunk-OOZ7R5J6.js.map → chunk-NB5A65PP.js.map} +1 -1
- package/dist/{chunk-SD4TYJN3.js → chunk-NE5XQJLZ.js} +3 -3
- package/dist/{chunk-SD4TYJN3.js.map → chunk-NE5XQJLZ.js.map} +1 -1
- package/dist/{chunk-JMJTCJGX.js → chunk-NEPSTGF6.js} +4 -4
- package/dist/{chunk-JMJTCJGX.js.map → chunk-NEPSTGF6.js.map} +1 -1
- package/dist/{chunk-7GUKPZQ6.js → chunk-NMVC5IGS.js} +3 -3
- package/dist/{chunk-7GUKPZQ6.js.map → chunk-NMVC5IGS.js.map} +1 -1
- package/dist/{chunk-QXAUEOHK.js → chunk-NUURM3QI.js} +2 -2
- package/dist/{chunk-QXAUEOHK.js.map → chunk-NUURM3QI.js.map} +1 -1
- package/dist/{ProductDetails-XLM3FGBY.js → chunk-OTJ3K76X.js} +5 -18
- package/dist/chunk-OTJ3K76X.js.map +1 -0
- package/dist/{chunk-XYVU5KGN.js → chunk-RRJZJHZK.js} +3 -3
- package/dist/{chunk-XYVU5KGN.js.map → chunk-RRJZJHZK.js.map} +1 -1
- package/dist/{chunk-DECKE4BB.js → chunk-SGEJUTTK.js} +3 -3
- package/dist/{chunk-DECKE4BB.js.map → chunk-SGEJUTTK.js.map} +1 -1
- package/dist/{chunk-CDMXPX4Z.js → chunk-TLE6US5E.js} +14 -14
- package/dist/{chunk-CDMXPX4Z.js.map → chunk-TLE6US5E.js.map} +1 -1
- package/dist/{chunk-2XFHSSMR.js → chunk-UVUG2YMJ.js} +4 -4
- package/dist/{chunk-2XFHSSMR.js.map → chunk-UVUG2YMJ.js.map} +1 -1
- package/dist/{chunk-XG2LXO24.js → chunk-V33YXUJZ.js} +7 -7
- package/dist/{chunk-XG2LXO24.js.map → chunk-V33YXUJZ.js.map} +1 -1
- package/dist/{chunk-R2ZCGB4G.js → chunk-VUQICWEC.js} +6 -6
- package/dist/{chunk-R2ZCGB4G.js.map → chunk-VUQICWEC.js.map} +1 -1
- package/dist/{chunk-HHZ7HY3D.js → chunk-VYPVJ4C6.js} +5 -5
- package/dist/{chunk-HHZ7HY3D.js.map → chunk-VYPVJ4C6.js.map} +1 -1
- package/dist/{chunk-CRW77N4M.js → chunk-W43EOOMR.js} +3 -3
- package/dist/{chunk-CRW77N4M.js.map → chunk-W43EOOMR.js.map} +1 -1
- package/dist/{chunk-53CWWIKH.js → chunk-WDIKLUO5.js} +4 -4
- package/dist/{chunk-53CWWIKH.js.map → chunk-WDIKLUO5.js.map} +1 -1
- package/dist/{chunk-AYZ6MRDT.js → chunk-WZDQRIFK.js} +4 -4
- package/dist/{chunk-AYZ6MRDT.js.map → chunk-WZDQRIFK.js.map} +1 -1
- package/dist/{chunk-5TGDSE64.js → chunk-XK2T6G6A.js} +4 -4
- package/dist/{chunk-5TGDSE64.js.map → chunk-XK2T6G6A.js.map} +1 -1
- package/dist/{chunk-N2346B57.js → chunk-XN6OZJHX.js} +3 -3
- package/dist/{chunk-N2346B57.js.map → chunk-XN6OZJHX.js.map} +1 -1
- package/dist/{chunk-3TZIFRGC.js → chunk-XRZ43AAK.js} +4 -4
- package/dist/{chunk-3TZIFRGC.js.map → chunk-XRZ43AAK.js.map} +1 -1
- package/dist/{chunk-5VWFGJS2.js → chunk-XWHSTFSB.js} +3 -3
- package/dist/{chunk-5VWFGJS2.js.map → chunk-XWHSTFSB.js.map} +1 -1
- package/dist/{chunk-3C55I5FU.js → chunk-YD7DCIWM.js} +3 -3
- package/dist/{chunk-3C55I5FU.js.map → chunk-YD7DCIWM.js.map} +1 -1
- package/dist/{chunk-MHA726OF.js → chunk-ZCD73EGZ.js} +4 -4
- package/dist/{chunk-MHA726OF.js.map → chunk-ZCD73EGZ.js.map} +1 -1
- package/dist/{chunk-3AOC4XPC.js → chunk-ZYL6NQ75.js} +3 -3
- package/dist/{chunk-3AOC4XPC.js.map → chunk-ZYL6NQ75.js.map} +1 -1
- package/dist/components/cart/index.js +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/drawer/index.js +15 -15
- package/dist/components/home/index.js +20 -20
- package/dist/components/layout/index.js +4 -4
- package/dist/components/product/ProductDetails.d.ts +3 -0
- package/dist/components/product/ProductDetails.d.ts.map +1 -1
- package/dist/components/product/index.js +17 -17
- package/dist/components/store/index.js +16 -16
- package/dist/components/tracking/index.js +6 -6
- package/dist/{custom-urls-DTRBRO4J.js → custom-urls-SBDPEIAR.js} +7 -7
- package/dist/{custom-urls-DTRBRO4J.js.map → custom-urls-SBDPEIAR.js.map} +1 -1
- package/dist/dev/editor/index.js +1 -1
- package/dist/dev/index.js +1 -1
- package/dist/{document-class-34BKJ6VD.js → document-class-LPVE4BRZ.js} +17 -17
- package/dist/{document-class-34BKJ6VD.js.map → document-class-LPVE4BRZ.js.map} +1 -1
- package/dist/hooks/index.js +15 -15
- package/dist/hooks/useGtm.js +15 -15
- package/dist/hooks/useMoney.js +15 -15
- package/dist/hooks/useStore.js +15 -15
- package/dist/hooks/useUser.js +3 -3
- package/dist/index.js +15 -15
- package/dist/{navigation-5ACP47I3.js → navigation-43FATW7U.js} +4 -4
- package/dist/{navigation-5ACP47I3.js.map → navigation-43FATW7U.js.map} +1 -1
- package/dist/{navigation-VVCRXGCD.js → navigation-SCBNHPBD.js} +5 -5
- package/dist/{navigation-VVCRXGCD.js.map → navigation-SCBNHPBD.js.map} +1 -1
- package/dist/{not-found-ABDLLYDO.js → not-found-DW3ZCJZW.js} +18 -18
- package/dist/{not-found-ABDLLYDO.js.map → not-found-DW3ZCJZW.js.map} +1 -1
- package/dist/providers/index.js +15 -15
- package/dist/routes/account/orders.js +4 -4
- package/dist/routes/account.js +13 -13
- package/dist/routes/blog.js +8 -8
- package/dist/routes/brands/loader.d.ts.map +1 -1
- package/dist/routes/brands.js +13 -5
- package/dist/routes/brands.js.map +1 -1
- package/dist/routes/cart.js +26 -24
- package/dist/routes/cart.js.map +1 -1
- package/dist/routes/home.js +21 -21
- package/dist/routes/index.js +8 -8
- package/dist/routes/loyalty.js +5 -5
- package/dist/routes/page.js +4 -4
- package/dist/routes/product/ProductPendingPreview.d.ts +19 -0
- package/dist/routes/product/ProductPendingPreview.d.ts.map +1 -0
- package/dist/routes/product-listing.js +25 -25
- package/dist/routes/product.js +24 -24
- package/dist/routes/seo-redirects.js +8 -8
- package/dist/routes/testimonials.js +2 -2
- package/dist/routes/thank-you.js +4 -4
- package/dist/skeleton.d.ts +1 -0
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +24 -22
- package/dist/{store-lookup-RKU4RHPS.js → store-lookup-5BYEW5GZ.js} +8 -8
- package/dist/{store-lookup-RKU4RHPS.js.map → store-lookup-5BYEW5GZ.js.map} +1 -1
- package/dist/tanstack.js +17 -17
- package/dist/utils/index.js +3 -3
- package/dist/vite/index.js +1 -1
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
- package/tailwind/components/product/ProductDetails.tsx.txt +1 -1
- package/tailwind/routes/brands/loader.ts.txt +19 -1
- package/tailwind/routes/product/ProductPendingPreview.tsx.txt +85 -0
- package/dist/GoogleTag-VBFDNEU6.js +0 -15
- package/dist/ProductDetails-XLM3FGBY.js.map +0 -1
- package/dist/chunk-N7CCSGZF.js +0 -3
- package/dist/chunk-N7CCSGZF.js.map +0 -1
|
@@ -2,24 +2,24 @@ import { lazyComponent } from './chunk-VYGA5AT5.js';
|
|
|
2
2
|
|
|
3
3
|
// src/components/layout/lazy.ts
|
|
4
4
|
var LazyHeader = lazyComponent(
|
|
5
|
-
() => import('./Header-
|
|
5
|
+
() => import('./Header-QMMLLHII.js').then((m) => ({ default: m.Header }))
|
|
6
6
|
);
|
|
7
7
|
var LazyFooter = lazyComponent(
|
|
8
|
-
() => import('./Footer-
|
|
8
|
+
() => import('./Footer-AZZTIGG2.js').then((m) => ({ default: m.Footer }))
|
|
9
9
|
);
|
|
10
10
|
var LazyCopyright = lazyComponent(
|
|
11
|
-
() => import('./Copyright-
|
|
11
|
+
() => import('./Copyright-6GQAFJLC.js').then((m) => ({ default: m.Copyright }))
|
|
12
12
|
);
|
|
13
13
|
var LazyMasterLayout = lazyComponent(
|
|
14
|
-
() => import('./MasterLayout-
|
|
14
|
+
() => import('./MasterLayout-WRDTHUZD.js').then((m) => ({ default: m.MasterLayout }))
|
|
15
15
|
);
|
|
16
16
|
var LazyWidgetHead = lazyComponent(
|
|
17
17
|
() => import('./WidgetHead-BCRIXIJQ.js').then((m) => ({ default: m.WidgetHead }))
|
|
18
18
|
);
|
|
19
19
|
var LazyCustomerLayout = lazyComponent(
|
|
20
|
-
() => import('./CustomerLayout-
|
|
20
|
+
() => import('./CustomerLayout-FHYJ2LCS.js').then((m) => ({ default: m.CustomerLayout }))
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
export { LazyCopyright, LazyCustomerLayout, LazyFooter, LazyHeader, LazyMasterLayout, LazyWidgetHead };
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-J3456BT4.js.map
|
|
25
|
+
//# sourceMappingURL=chunk-J3456BT4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/lazy.ts"],"names":[],"mappings":";;;AAMO,IAAM,UAAA,GAAa,aAAA;AAAA,EAAc,MACtC,OAAO,sBAAU,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE;AACxD;AAEO,IAAM,UAAA,GAAa,aAAA;AAAA,EAAc,MACtC,OAAO,sBAAU,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE;AACxD;AAEO,IAAM,aAAA,GAAgB,aAAA;AAAA,EAAc,MACzC,OAAO,yBAAa,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,SAAA,EAAU,CAAE;AAC9D;AAEO,IAAM,gBAAA,GAAmB,aAAA;AAAA,EAAc,MAC5C,OAAO,4BAAgB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,YAAA,EAAa,CAAE;AACpE;AAEO,IAAM,cAAA,GAAiB,aAAA;AAAA,EAAc,MAC1C,OAAO,0BAAc,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,UAAA,EAAW,CAAE;AAChE;AAEO,IAAM,kBAAA,GAAqB,aAAA;AAAA,EAAc,MAC9C,OAAO,8BAAkB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,cAAA,EAAe,CAAE;AACxE","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/lazy.ts"],"names":[],"mappings":";;;AAMO,IAAM,UAAA,GAAa,aAAA;AAAA,EAAc,MACtC,OAAO,sBAAU,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE;AACxD;AAEO,IAAM,UAAA,GAAa,aAAA;AAAA,EAAc,MACtC,OAAO,sBAAU,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE;AACxD;AAEO,IAAM,aAAA,GAAgB,aAAA;AAAA,EAAc,MACzC,OAAO,yBAAa,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,SAAA,EAAU,CAAE;AAC9D;AAEO,IAAM,gBAAA,GAAmB,aAAA;AAAA,EAAc,MAC5C,OAAO,4BAAgB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,YAAA,EAAa,CAAE;AACpE;AAEO,IAAM,cAAA,GAAiB,aAAA;AAAA,EAAc,MAC1C,OAAO,0BAAc,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,UAAA,EAAW,CAAE;AAChE;AAEO,IAAM,kBAAA,GAAqB,aAAA;AAAA,EAAc,MAC9C,OAAO,8BAAkB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,cAAA,EAAe,CAAE;AACxE","file":"chunk-J3456BT4.js","sourcesContent":["import { lazyComponent } from '../../utils/lazy-component';\n\n/**\n * Lazy-loaded layout components\n * Use these for code-splitting layout sections\n */\nexport const LazyHeader = lazyComponent(() =>\n import('./Header').then((m) => ({ default: m.Header }))\n);\n\nexport const LazyFooter = lazyComponent(() =>\n import('./Footer').then((m) => ({ default: m.Footer }))\n);\n\nexport const LazyCopyright = lazyComponent(() =>\n import('./Copyright').then((m) => ({ default: m.Copyright }))\n);\n\nexport const LazyMasterLayout = lazyComponent(() =>\n import('./MasterLayout').then((m) => ({ default: m.MasterLayout }))\n);\n\nexport const LazyWidgetHead = lazyComponent(() =>\n import('./WidgetHead').then((m) => ({ default: m.WidgetHead }))\n);\n\nexport const LazyCustomerLayout = lazyComponent(() =>\n import('./CustomerLayout').then((m) => ({ default: m.CustomerLayout }))\n);\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseShortLinkPath } from './chunk-6T7N5FOL.js';
|
|
2
2
|
import { PRODUCT_SLUG_ROUTE_ID, CATEGORY_SLUG_ROUTE_ID } from './chunk-NV4PF3O3.js';
|
|
3
3
|
import { productKeyOfId } from './chunk-SDBR4X3K.js';
|
|
4
|
-
import { redirect, isMissingResource } from './chunk-
|
|
4
|
+
import { redirect, isMissingResource } from './chunk-25NSKD6D.js';
|
|
5
5
|
import { clearAuthTokenCookie } from './chunk-4OZIBANF.js';
|
|
6
6
|
import { FALLBACK_LOCALE, isLocale } from './chunk-T72DAX7R.js';
|
|
7
7
|
import { useEffect } from 'react';
|
|
@@ -91,7 +91,7 @@ async function twigUrlRedirect(pathname, search, page, options = {}) {
|
|
|
91
91
|
throw redirect(`${locale ? `/${locale}` : ""}${target.path}${search}`, { statusCode: 301 });
|
|
92
92
|
}
|
|
93
93
|
if (!options.queryClient || twigPageUrl(pathname)) return;
|
|
94
|
-
const { customUrlRedirect } = await import('./custom-urls-
|
|
94
|
+
const { customUrlRedirect } = await import('./custom-urls-SBDPEIAR.js');
|
|
95
95
|
await customUrlRedirect(pathname, search, {
|
|
96
96
|
queryClient: options.queryClient,
|
|
97
97
|
targetLocale: options.targetLocale
|
|
@@ -106,5 +106,5 @@ function LogoutRedirect() {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export { LogoutRedirect, accountRedirectLoader, orderRatingRedirectLoader, pendingOrdersRedirectLoader, productsSourceRedirectLoader, ratingRedirectLoader, slugBrandRedirectLoader, twigUrlRedirect };
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
110
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-K7F7U5NR.js.map
|
|
110
|
+
//# sourceMappingURL=chunk-K7F7U5NR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes/seo-redirects.ts"],"names":["id"],"mappings":";;;;;;;;AAkBA,eAAsB,wBAAwB,GAAA,EAAkD;AAC9F,EAAA,MAAM,MAAA,GAAS,GAAA,CAAI,MAAA,CAAO,MAAA,IAAU,eAAA;AACpC,EAAA,MAAM,SAAS,CAAA,CAAA,EAAI,MAAM,WAAW,GAAA,CAAI,MAAA,CAAO,EAAE,CAAA,CAAE,CAAA;AACrD;AAOA,eAAsB,4BACpB,GAAA,GAA+C,EAAE,MAAA,EAAQ,IAAG,EAC5C;AAChB,EAAA,MAAM,MAAA,GAAS,GAAA,CAAI,MAAA,CAAO,MAAA,IAAU,eAAA;AACpC,EAAA,MAAM,QAAA,CAAS,CAAA,CAAA,EAAI,MAAM,CAAA,8BAAA,CAAgC,CAAA;AAC3D;AAGA,eAAsB,qBACpB,GAAA,GAA+C,EAAE,MAAA,EAAQ,IAAG,EAC5C;AAChB,EAAA,MAAM,MAAA,GAAS,GAAA,CAAI,MAAA,CAAO,MAAA,IAAU,eAAA;AACpC,EAAA,MAAM,QAAA,CAAS,CAAA,CAAA,EAAI,MAAM,CAAA,eAAA,CAAiB,CAAA;AAC5C;AAOA,eAAsB,0BAA0B,GAAA,EAI7B;AACjB,EAAA,MAAM,MAAA,GAAS,IAAI,MAAA,CAAO,MAAA,GAAS,IAAI,GAAA,CAAI,MAAA,CAAO,MAAM,CAAA,CAAA,GAAK,EAAA;AAC7D,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,GAAA,CAAI,MAAM,CAAA;AAC5C,EAAA,KAAA,CAAM,GAAA,CAAI,qBAAqB,MAAM,CAAA;AACrC,EAAA,MAAM,QAAA,CAAS,CAAA,EAAG,MAAM,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CAAS,QAAQ,MAAA,CAAO,QAAA,CAAS,KAAK,OAAA,CAAQ,8BAAA,EAAgC,EAAE,CAAC,CAAA;AAAA,EAC1F,CAAA,EAAG,EAAE,CAAA;AACL,EAAA,OAAO,IAAA;AACT","file":"chunk-MHSASWOS.js","sourcesContent":["import { useEffect } from 'react';\nimport type { QueryClient } from '@tanstack/react-query';\nimport { isMissingResource, redirect } from '../providers/NavigationProvider';\nimport { FALLBACK_LOCALE, isLocale } from '../providers/locale-constants';\nimport { productKeyOfId } from '../router/product-key-urls';\nimport { CATEGORY_SLUG_ROUTE_ID, PRODUCT_SLUG_ROUTE_ID } from '../router/slug-routes';\nimport { clearAuthTokenCookie } from '../utils/cookies';\nimport { parseShortLinkPath } from './short-link-path';\n\nexport interface SlugBrandParams {\n /** SEO slug segment (ignored — only here to match the route pattern). */\n slug: string;\n /** Brand numeric ID to redirect to. */\n id: string;\n /** Active locale from the `/$locale` parent layout (e.g. `'ar'`, `'en'`). */\n locale?: string;\n}\n\nexport async function slugBrandRedirectLoader(ctx: { params: SlugBrandParams }): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/brands/${ctx.params.id}`);\n}\n\nexport interface PendingOrdersRedirectParams {\n /** Active locale from the `/$locale` parent layout (e.g. `'ar'`, `'en'`). */\n locale?: string;\n}\n\nexport async function pendingOrdersRedirectLoader(\n ctx: { params: PendingOrdersRedirectParams } = { params: {} }\n): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/account/orders?status=pending`);\n}\n\n/** `/account/rating`: the loyalty \"rate your orders\" link. Twig Raed has no rating page and sends it to the orders list. */\nexport async function ratingRedirectLoader(\n ctx: { params: PendingOrdersRedirectParams } = { params: {} }\n): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/account/orders`);\n}\n\n/**\n * `/rating/{id}` and `/account/rating/{id}`: the rate-your-order link in the order email and SMS,\n * sent like Twig to the order with its rating popup. The id goes as it came: the orders API\n * decodes it the way Store's `rateOrder` does (optimus when numeric, else the hash).\n */\nexport async function orderRatingRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams & { id: string };\n /** The incoming query string, `token` included: the SDK signs the visitor in with it. */\n search?: string;\n}): Promise<never> {\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n const query = new URLSearchParams(ctx.search);\n query.set('show-rating-popup', 'true');\n throw redirect(`${prefix}/account/orders/${encodeURIComponent(ctx.params.id)}?${query}`);\n}\n\n/** A Twig customer URL (`/profile`, `/orders`, …) kept working as its `/account/…` page. */\nexport async function accountRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams;\n page: string;\n /** The incoming query string (`?status=pending`), kept on the account page. */\n search?: string;\n}): Promise<never> {\n // No locale in the URL stays without one: the locale layout adds it only where the store has several.\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n throw redirect(`${prefix}/account/${ctx.page}${ctx.search ?? ''}`, { statusCode: 301 });\n}\n\n/** `/latest-products`, `/most-sales-products` and `/offers` now live at `/products?source=`. */\nexport async function productsSourceRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams;\n source: 'latest' | 'sales' | 'offers';\n search?: string;\n}): Promise<never> {\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n const query = new URLSearchParams(ctx.search);\n query.delete('source');\n const rest = query.toString();\n throw redirect(`${prefix}/products?source=${ctx.source}${rest ? `&${rest}` : ''}`, {\n statusCode: 301,\n });\n}\n\nexport { resolveProductKeyPage } from './product/key';\nexport { publicProductKeyPath } from '../router/product-key-urls';\n\n/** Routes a Twig URL lands on by accident: a locale bound as `$slug`, or an id that is no number. */\nconst SLUG_ROUTES = new Set([PRODUCT_SLUG_ROUTE_ID, CATEGORY_SLUG_ROUTE_ID]);\n\n/** `/p{id}` or `/p{id}-{name}`, with or without a leading segment; the id capped as in `./product/id`. */\nconst TWIG_PRODUCT_URL = /^(?:\\/([^/]+))?\\/p(\\d{1,18})(?:-[^/]*)?\\/?$/;\n/** `/category/{hash}`, with or without a leading segment. */\nconst TWIG_CATEGORY_URL = /^(?:\\/([^/]+))?\\/category\\/([A-Za-z0-9]+)\\/?$/;\n\n/** The page the router matched, as the locale layout's `beforeLoad` sees it. */\nexport interface MatchedPage {\n routeId: string;\n params: Record<string, string | undefined>;\n}\n\nfunction rendersNoPage({ routeId, params }: MatchedPage): boolean {\n // A first segment that is no language binds as the locale, of the layout or of the home page.\n if (routeId === '/{-$locale}' || (params.locale && !isLocale(params.locale))) return true;\n if (!SLUG_ROUTES.has(routeId)) return false;\n // A SKU-link address the router's rewrite gave the product route (`router/product-key-urls`).\n if (productKeyOfId(params.id)) return false;\n return (!params.locale && isLocale(params.slug)) || !/^\\d+$/.test(params.id ?? '');\n}\n\nexport interface TwigUrlRedirectOptions {\n /**\n * The language segment the target takes, given the one the address had. The locale layout\n * knows how the store addresses its pages, so the redirect lands there in one hop: `/-/p1`\n * on a store with several languages was sent on again to `/ar/-/p1`, and that second request\n * also fetched the product, because the server starts every loader at once. Without it the\n * address's own segment is kept.\n */\n targetLocale?: (addressLocale: string | undefined) => Promise<string | undefined>;\n /**\n * The request's query client. The category lookup is then shared between a hover preload and\n * the click.\n */\n queryClient?: QueryClient;\n}\n\n/** The category's numeric id for its Twig hash, or `undefined` when the API has no such category. */\nasync function categoryIdOf(hash: string, queryClient?: QueryClient): Promise<string | undefined> {\n const { category } = await import('../api/category');\n try {\n const found = queryClient\n ? await queryClient.ensureQueryData(category.queries.detail(hash))\n : await category.find(hash);\n // Only the id is taken. The category is never filed under its id for the category page:\n // this lookup ran in the address's language (Arabic when it has none, the fallback), and\n // the page may be in another (`/en/-/c…` on an English-only store), while a category's\n // cache key carries no language.\n return String(found.id_ ?? found.id);\n } catch (error) {\n if (isMissingResource(error)) return undefined;\n throw error;\n }\n}\n\n/**\n * The product id behind a short link (`/KjQrpE`). A store without SEO URLs gives every product\n * that address, in its sitemap and in the API's `url`, and the API takes the code in place of\n * the id. Any failure counts as \"no such product\": a bare `/{code}` is also every scanner's\n * `/admin`, so an API error must not turn those into 500s. The not-found page's\n * `useProductShortLink` asks again from the browser, as it did before.\n */\nasync function shortLinkProductId(\n code: string,\n queryClient?: QueryClient\n): Promise<string | undefined> {\n const { product } = await import('../api/product');\n try {\n const found = queryClient\n ? await queryClient.ensureQueryData(product.queries.detail(code))\n : await product.find(code);\n return found?.id ? String(found.id) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** Where a Twig URL's page is now, and the language its address carried. */\n/**\n * A Twig product or category URL: `/p{id}…` or `/category/{hash}`, bare or under a language. Under\n * any other first segment it is no Twig route, so the Store's catch-all would have it.\n */\nfunction twigPageUrl(\n pathname: string\n): { kind: 'p' | 'c'; ref: string; locale?: string } | undefined {\n const productUrl = TWIG_PRODUCT_URL.exec(pathname);\n const match = productUrl ?? TWIG_CATEGORY_URL.exec(pathname);\n if (!match || (match[1] && !isLocale(match[1]))) return undefined;\n return { kind: productUrl ? 'p' : 'c', ref: match[2], locale: match[1] };\n}\n\nasync function twigTarget(\n pathname: string,\n queryClient?: QueryClient\n): Promise<{ path: string; locale?: string } | undefined> {\n const pageUrl = twigPageUrl(pathname);\n if (pageUrl) {\n if (pageUrl.kind === 'p') return { path: `/-/p${pageUrl.ref}`, locale: pageUrl.locale };\n const id = await categoryIdOf(pageUrl.ref, queryClient);\n return id ? { path: `/-/c${id}`, locale: pageUrl.locale } : undefined;\n }\n const shortLink = parseShortLinkPath(pathname);\n if (!shortLink) return undefined;\n const id = await shortLinkProductId(shortLink.code, queryClient);\n return id ? { path: `/-/p${id}`, locale: shortLink.locale } : undefined;\n}\n\n/**\n * Twig's product and category URLs, each with or without a locale, sent to the page that has\n * them now: `/p{id}`, `/p{id}-{name}`, `/category/{hash}` and the product short link `/{code}`.\n * Run by the locale layout's `beforeLoad`, only for an address no page answers: the router binds\n * `/ar/p1` to `$slug/p{$id}` (slug `ar`) and `/p1` to the locale.\n *\n * A product URL carries its id, so it is redirected without asking the API: a product that is\n * gone is the product page's not-found, one hop on. A category hash or a short code only the API\n * can turn into the id; one that is gone stays the not-found page at its address.\n *\n * Any other address no page answers, a short code that names no product included, may be one of\n * the merchant's custom URLs, which Twig's catch-all answers last (`./custom-urls`). A gone\n * category's Twig URL is not: Twig's category route answers it.\n */\nexport async function twigUrlRedirect(\n pathname: string,\n search: string,\n page: MatchedPage | undefined,\n options: TwigUrlRedirectOptions = {}\n): Promise<void> {\n if (!page || !rendersNoPage(page)) return;\n const target = await twigTarget(pathname, options.queryClient);\n if (target) {\n const locale = options.targetLocale ? await options.targetLocale(target.locale) : target.locale;\n throw redirect(`${locale ? `/${locale}` : ''}${target.path}${search}`, { statusCode: 301 });\n }\n if (!options.queryClient || twigPageUrl(pathname)) return;\n const { customUrlRedirect } = await import('./custom-urls');\n await customUrlRedirect(pathname, search, {\n queryClient: options.queryClient,\n targetLocale: options.targetLocale,\n });\n}\n\n/**\n * `/logout` — where the SDK sends the browser once `salla.auth.logout()` has run\n * (`salla.url.get('logout?from=…')`). The Twig storefront serves that URL server-side. Here\n * it renders nothing and, in the browser, removes the theme's own `token` cookie (the SDK's\n * `cookie.clearAll()` leaves it) and then does a full navigation home. It has to be a\n * component, not a loader redirect: a loader runs during server rendering, where the cookie\n * can't be cleared, so the redirect would leave the visitor signed in on the next request.\n */\nexport function LogoutRedirect(): null {\n useEffect(() => {\n clearAuthTokenCookie();\n // `/{store base}/{locale}/logout?from=…` → `/{store base}/{locale}`\n window.location.replace(window.location.href.replace(/\\/logout\\/?(\\?[^#]*)?(#.*)?$/, ''));\n }, []);\n return null;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/routes/seo-redirects.ts"],"names":["id"],"mappings":";;;;;;;;AAkBA,eAAsB,wBAAwB,GAAA,EAAkD;AAC9F,EAAA,MAAM,MAAA,GAAS,GAAA,CAAI,MAAA,CAAO,MAAA,IAAU,eAAA;AACpC,EAAA,MAAM,SAAS,CAAA,CAAA,EAAI,MAAM,W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Ac,IAAI,CAAA,EAAG;AACnC,EAAA,MAAM,MAAA,GAAS,MAAM,UAAA,CAAW,QAAA,EAAU,QAAQ,WAAW,CAAA;AAC7D,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,MAAM,MAAA,GAAS,QAAQ,YAAA,GAAe,MAAM,QAAQ,YAAA,CAAa,MAAA,CAAO,MAAM,CAAA,GAAI,MAAA,CAAO,MAAA;AACzF,IAAA,MAAM,SAAS,CAAA,EAAG,MAAA,GAAS,CAAA,CAAA,EAAI,MAAM,KAAK,EAAE,CAAA,EAAG,MAAA,CAAO,IAAI,GAAG,MAAM,CAAA,CAAA,EAAI,EAAE,UAAA,EAAY,KAAK,CAAA;AAAA,EAC5F;AACA,EAAA,IAAI,CAAC,OAAA,CAAQ,WAAA,IAAe,WAAA,CAAY,QAAQ,CAAA,EAAG;AACnD,EAAA,MAAM,EAAE,iBAAA,EAAkB,GAAI,MAAM,OAAO,2BAAe,CAAA;AAC1D,EAAA,MAAM,iBAAA,CAAkB,UAAU,MAAA,EAAQ;AAAA,IACxC,aAAa,OAAA,CAAQ,WAAA;AAAA,IACrB,cAAc,OAAA,CAAQ;AAAA,GACvB,CAAA;AACH;AAUO,SAAS,cAAA,GAAuB;AACrC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,oBAAA,EAAqB;AAErB,IAAA,MAAA,CAAO,QAAA,CAAS,QAAQ,MAAA,CAAO,QAAA,CAAS,KAAK,OAAA,CAAQ,8BAAA,EAAgC,EAAE,CAAC,CAAA;AAAA,EAC1F,CAAA,EAAG,EAAE,CAAA;AACL,EAAA,OAAO,IAAA;AACT","file":"chunk-K7F7U5NR.js","sourcesContent":["import { useEffect } from 'react';\nimport type { QueryClient } from '@tanstack/react-query';\nimport { isMissingResource, redirect } from '../providers/NavigationProvider';\nimport { FALLBACK_LOCALE, isLocale } from '../providers/locale-constants';\nimport { productKeyOfId } from '../router/product-key-urls';\nimport { CATEGORY_SLUG_ROUTE_ID, PRODUCT_SLUG_ROUTE_ID } from '../router/slug-routes';\nimport { clearAuthTokenCookie } from '../utils/cookies';\nimport { parseShortLinkPath } from './short-link-path';\n\nexport interface SlugBrandParams {\n /** SEO slug segment (ignored — only here to match the route pattern). */\n slug: string;\n /** Brand numeric ID to redirect to. */\n id: string;\n /** Active locale from the `/$locale` parent layout (e.g. `'ar'`, `'en'`). */\n locale?: string;\n}\n\nexport async function slugBrandRedirectLoader(ctx: { params: SlugBrandParams }): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/brands/${ctx.params.id}`);\n}\n\nexport interface PendingOrdersRedirectParams {\n /** Active locale from the `/$locale` parent layout (e.g. `'ar'`, `'en'`). */\n locale?: string;\n}\n\nexport async function pendingOrdersRedirectLoader(\n ctx: { params: PendingOrdersRedirectParams } = { params: {} }\n): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/account/orders?status=pending`);\n}\n\n/** `/account/rating`: the loyalty \"rate your orders\" link. Twig Raed has no rating page and sends it to the orders list. */\nexport async function ratingRedirectLoader(\n ctx: { params: PendingOrdersRedirectParams } = { params: {} }\n): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/account/orders`);\n}\n\n/**\n * `/rating/{id}` and `/account/rating/{id}`: the rate-your-order link in the order email and SMS,\n * sent like Twig to the order with its rating popup. The id goes as it came: the orders API\n * decodes it the way Store's `rateOrder` does (optimus when numeric, else the hash).\n */\nexport async function orderRatingRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams & { id: string };\n /** The incoming query string, `token` included: the SDK signs the visitor in with it. */\n search?: string;\n}): Promise<never> {\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n const query = new URLSearchParams(ctx.search);\n query.set('show-rating-popup', 'true');\n throw redirect(`${prefix}/account/orders/${encodeURIComponent(ctx.params.id)}?${query}`);\n}\n\n/** A Twig customer URL (`/profile`, `/orders`, …) kept working as its `/account/…` page. */\nexport async function accountRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams;\n page: string;\n /** The incoming query string (`?status=pending`), kept on the account page. */\n search?: string;\n}): Promise<never> {\n // No locale in the URL stays without one: the locale layout adds it only where the store has several.\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n throw redirect(`${prefix}/account/${ctx.page}${ctx.search ?? ''}`, { statusCode: 301 });\n}\n\n/** `/latest-products`, `/most-sales-products` and `/offers` now live at `/products?source=`. */\nexport async function productsSourceRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams;\n source: 'latest' | 'sales' | 'offers';\n search?: string;\n}): Promise<never> {\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n const query = new URLSearchParams(ctx.search);\n query.delete('source');\n const rest = query.toString();\n throw redirect(`${prefix}/products?source=${ctx.source}${rest ? `&${rest}` : ''}`, {\n statusCode: 301,\n });\n}\n\nexport { resolveProductKeyPage } from './product/key';\nexport { publicProductKeyPath } from '../router/product-key-urls';\n\n/** Routes a Twig URL lands on by accident: a locale bound as `$slug`, or an id that is no number. */\nconst SLUG_ROUTES = new Set([PRODUCT_SLUG_ROUTE_ID, CATEGORY_SLUG_ROUTE_ID]);\n\n/** `/p{id}` or `/p{id}-{name}`, with or without a leading segment; the id capped as in `./product/id`. */\nconst TWIG_PRODUCT_URL = /^(?:\\/([^/]+))?\\/p(\\d{1,18})(?:-[^/]*)?\\/?$/;\n/** `/category/{hash}`, with or without a leading segment. */\nconst TWIG_CATEGORY_URL = /^(?:\\/([^/]+))?\\/category\\/([A-Za-z0-9]+)\\/?$/;\n\n/** The page the router matched, as the locale layout's `beforeLoad` sees it. */\nexport interface MatchedPage {\n routeId: string;\n params: Record<string, string | undefined>;\n}\n\nfunction rendersNoPage({ routeId, params }: MatchedPage): boolean {\n // A first segment that is no language binds as the locale, of the layout or of the home page.\n if (routeId === '/{-$locale}' || (params.locale && !isLocale(params.locale))) return true;\n if (!SLUG_ROUTES.has(routeId)) return false;\n // A SKU-link address the router's rewrite gave the product route (`router/product-key-urls`).\n if (productKeyOfId(params.id)) return false;\n return (!params.locale && isLocale(params.slug)) || !/^\\d+$/.test(params.id ?? '');\n}\n\nexport interface TwigUrlRedirectOptions {\n /**\n * The language segment the target takes, given the one the address had. The locale layout\n * knows how the store addresses its pages, so the redirect lands there in one hop: `/-/p1`\n * on a store with several languages was sent on again to `/ar/-/p1`, and that second request\n * also fetched the product, because the server starts every loader at once. Without it the\n * address's own segment is kept.\n */\n targetLocale?: (addressLocale: string | undefined) => Promise<string | undefined>;\n /**\n * The request's query client. The category lookup is then shared between a hover preload and\n * the click.\n */\n queryClient?: QueryClient;\n}\n\n/** The category's numeric id for its Twig hash, or `undefined` when the API has no such category. */\nasync function categoryIdOf(hash: string, queryClient?: QueryClient): Promise<string | undefined> {\n const { category } = await import('../api/category');\n try {\n const found = queryClient\n ? await queryClient.ensureQueryData(category.queries.detail(hash))\n : await category.find(hash);\n // Only the id is taken. The category is never filed under its id for the category page:\n // this lookup ran in the address's language (Arabic when it has none, the fallback), and\n // the page may be in another (`/en/-/c…` on an English-only store), while a category's\n // cache key carries no language.\n return String(found.id_ ?? found.id);\n } catch (error) {\n if (isMissingResource(error)) return undefined;\n throw error;\n }\n}\n\n/**\n * The product id behind a short link (`/KjQrpE`). A store without SEO URLs gives every product\n * that address, in its sitemap and in the API's `url`, and the API takes the code in place of\n * the id. Any failure counts as \"no such product\": a bare `/{code}` is also every scanner's\n * `/admin`, so an API error must not turn those into 500s. The not-found page's\n * `useProductShortLink` asks again from the browser, as it did before.\n */\nasync function shortLinkProductId(\n code: string,\n queryClient?: QueryClient\n): Promise<string | undefined> {\n const { product } = await import('../api/product');\n try {\n const found = queryClient\n ? await queryClient.ensureQueryData(product.queries.detail(code))\n : await product.find(code);\n return found?.id ? String(found.id) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** Where a Twig URL's page is now, and the language its address carried. */\n/**\n * A Twig product or category URL: `/p{id}…` or `/category/{hash}`, bare or under a language. Under\n * any other first segment it is no Twig route, so the Store's catch-all would have it.\n */\nfunction twigPageUrl(\n pathname: string\n): { kind: 'p' | 'c'; ref: string; locale?: string } | undefined {\n const productUrl = TWIG_PRODUCT_URL.exec(pathname);\n const match = productUrl ?? TWIG_CATEGORY_URL.exec(pathname);\n if (!match || (match[1] && !isLocale(match[1]))) return undefined;\n return { kind: productUrl ? 'p' : 'c', ref: match[2], locale: match[1] };\n}\n\nasync function twigTarget(\n pathname: string,\n queryClient?: QueryClient\n): Promise<{ path: string; locale?: string } | undefined> {\n const pageUrl = twigPageUrl(pathname);\n if (pageUrl) {\n if (pageUrl.kind === 'p') return { path: `/-/p${pageUrl.ref}`, locale: pageUrl.locale };\n const id = await categoryIdOf(pageUrl.ref, queryClient);\n return id ? { path: `/-/c${id}`, locale: pageUrl.locale } : undefined;\n }\n const shortLink = parseShortLinkPath(pathname);\n if (!shortLink) return undefined;\n const id = await shortLinkProductId(shortLink.code, queryClient);\n return id ? { path: `/-/p${id}`, locale: shortLink.locale } : undefined;\n}\n\n/**\n * Twig's product and category URLs, each with or without a locale, sent to the page that has\n * them now: `/p{id}`, `/p{id}-{name}`, `/category/{hash}` and the product short link `/{code}`.\n * Run by the locale layout's `beforeLoad`, only for an address no page answers: the router binds\n * `/ar/p1` to `$slug/p{$id}` (slug `ar`) and `/p1` to the locale.\n *\n * A product URL carries its id, so it is redirected without asking the API: a product that is\n * gone is the product page's not-found, one hop on. A category hash or a short code only the API\n * can turn into the id; one that is gone stays the not-found page at its address.\n *\n * Any other address no page answers, a short code that names no product included, may be one of\n * the merchant's custom URLs, which Twig's catch-all answers last (`./custom-urls`). A gone\n * category's Twig URL is not: Twig's category route answers it.\n */\nexport async function twigUrlRedirect(\n pathname: string,\n search: string,\n page: MatchedPage | undefined,\n options: TwigUrlRedirectOptions = {}\n): Promise<void> {\n if (!page || !rendersNoPage(page)) return;\n const target = await twigTarget(pathname, options.queryClient);\n if (target) {\n const locale = options.targetLocale ? await options.targetLocale(target.locale) : target.locale;\n throw redirect(`${locale ? `/${locale}` : ''}${target.path}${search}`, { statusCode: 301 });\n }\n if (!options.queryClient || twigPageUrl(pathname)) return;\n const { customUrlRedirect } = await import('./custom-urls');\n await customUrlRedirect(pathname, search, {\n queryClient: options.queryClient,\n targetLocale: options.targetLocale,\n });\n}\n\n/**\n * `/logout` — where the SDK sends the browser once `salla.auth.logout()` has run\n * (`salla.url.get('logout?from=…')`). The Twig storefront serves that URL server-side. Here\n * it renders nothing and, in the browser, removes the theme's own `token` cookie (the SDK's\n * `cookie.clearAll()` leaves it) and then does a full navigation home. It has to be a\n * component, not a loader redirect: a loader runs during server rendering, where the cookie\n * can't be cleared, so the redirect would leave the visitor signed in on the next request.\n */\nexport function LogoutRedirect(): null {\n useEffect(() => {\n clearAuthTokenCookie();\n // `/{store base}/{locale}/logout?from=…` → `/{store base}/{locale}`\n window.location.replace(window.location.href.replace(/\\/logout\\/?(\\?[^#]*)?(#.*)?$/, ''));\n }, []);\n return null;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getActiveScope, api } from './chunk-
|
|
1
|
+
import { getActiveScope, api } from './chunk-SGEJUTTK.js';
|
|
2
2
|
import { getTwilightContext } from './chunk-MWUAHDQL.js';
|
|
3
3
|
import { queryOptions } from '@tanstack/react-query';
|
|
4
4
|
|
|
@@ -25,5 +25,5 @@ var advertisement = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export { advertisement, advertisementsFor };
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-KHIEGO2C.js.map
|
|
29
|
+
//# sourceMappingURL=chunk-KHIEGO2C.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/advertisement.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,iBAAA,CACd,KACA,QAAA,EACiB;AACjB,EAAA,OAAO,GAAA,CAAI,MAAA;AAA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AAA,EAAK,GAAI,MAAM,GAAA,CACpB,GAAA,CAAI,gBAAA,EAAkB,EAAE,OAAA,EAAS,GAAA,EAAM,CAAA,CACvC,IAAA,EAAiC;AACpC,IAAA,OAAO,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,GAAI,OAAO,EAAC;AAAA,EACvC,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MACJ,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,gBAAA,EAAkB,kBAAA,EAAmB,CAAE,QAAQ,EAAE,KAAA,EAAO,cAAA,EAAe,EAAG,CAAA;AAAA,MACrF,OAAA,EAAS,MAAM,aAAA,CAAc,IAAA,EAAK;AAAA,MAClC,SAAA,EAAW,QAAA;AAAA;AAAA,MAEX,KAAA,EAAO;AAAA,KACR;AAAA;AAEP","file":"chunk-KHIEGO2C.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api, getActiveScope } from './client';\nimport { getTwilightContext } from '../twilight/context';\n\n/** A merchant's announcement bar, as `GET advertisements` returns it. */\nexport interface Advertisement {\n id: number;\n title?: string;\n description?: string;\n icon?: string | null;\n url?: string | null;\n target?: string | null;\n colors?: { bg?: string; text?: string };\n /** Page slugs the ad shows on (`salla.config` `page.slug`), or `all`. */\n pages?: string[];\n}\n\n/** The ads a page shows: the rule the API applies to `?page=`, run on the full list. */\nexport function advertisementsFor(\n ads: readonly Advertisement[],\n pageSlug: string | null | undefined\n): Advertisement[] {\n return ads.filter(\n (ad) =>\n Array.isArray(ad.pages) &&\n (ad.pages.includes('all') || (!!pageSlug && ad.pages.includes(pageSlug)))\n );\n}\n\nexport const advertisement = {\n /** Every active ad, unfiltered: one request serves all pages, filtered with `advertisementsFor`. */\n list: async (): Promise<Advertisement[]> => {\n // Short timeout: it is fetched with the store settings on every server render.\n const { data } = await api\n .get('advertisements', { timeout: 3000 })\n .json<{ data?: Advertisement[] }>();\n return Array.isArray(data) ? data : [];\n },\n\n queries: {\n list: () =>\n queryOptions({\n queryKey: ['advertisements', getTwilightContext().locale, { scope: getActiveScope() }],\n queryFn: () => advertisement.list(),\n staleTime: Infinity,\n // Awaited in rootBeforeLoad: a retry would double the 3s budget. `PageAdvertisements` retries.\n retry: 0,\n }),\n },\n};\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { home } from './chunk-
|
|
2
|
-
import { product } from './chunk-
|
|
3
|
-
import { ProductCard } from './chunk-
|
|
1
|
+
import { home } from './chunk-XWHSTFSB.js';
|
|
2
|
+
import { product } from './chunk-XRZ43AAK.js';
|
|
3
|
+
import { ProductCard } from './chunk-MQ6TJ4AJ.js';
|
|
4
4
|
import { registry } from './chunk-Y32RHCOH.js';
|
|
5
5
|
import { liveBlockIdOf } from './chunk-ELGZOQEY.js';
|
|
6
6
|
import { useTranslation } from './chunk-TYNZ5B2B.js';
|
|
7
7
|
import { Image } from './chunk-IVO6YRRK.js';
|
|
8
8
|
import { Link } from './chunk-3GFD7WTJ.js';
|
|
9
|
-
import { LazyRenderWhenVisible } from './chunk-
|
|
9
|
+
import { LazyRenderWhenVisible } from './chunk-GIHEV2RT.js';
|
|
10
10
|
import { whenSallaLoaded } from './chunk-MZPX4EPS.js';
|
|
11
11
|
import { getTwilightContext } from './chunk-MWUAHDQL.js';
|
|
12
12
|
import { useTwilight, TwilightContext } from './chunk-DF6FBKDN.js';
|
|
@@ -500,7 +500,7 @@ var BundleComponent = memo(function BundleComponent2(props) {
|
|
|
500
500
|
|
|
501
501
|
// src/components/home/lazy.ts
|
|
502
502
|
var LazyLatestProducts = lazyComponent(
|
|
503
|
-
() => import('./LatestProducts-
|
|
503
|
+
() => import('./LatestProducts-NRHWV3GJ.js').then((m) => ({ default: m.LatestProducts }))
|
|
504
504
|
);
|
|
505
505
|
var LazyTestimonials = lazyComponent(
|
|
506
506
|
() => import('./Testimonials-MZCVP66E.js').then((m) => ({ default: m.Testimonials }))
|
|
@@ -837,5 +837,5 @@ var ReorderProducts = memo(function ReorderProducts2() {
|
|
|
837
837
|
});
|
|
838
838
|
|
|
839
839
|
export { BundleComponent, ComponentErrorBoundary, DefaultHomeComponents, FeaturedProductsStyle1, FeaturedProductsStyle2, FeaturedProductsStyle3, FixedBanner, FixedProducts, HomeComponentRenderer, LazyTestimonials, PageBlocks, ParallaxBackground, PhotosSlider, ProductsSlider, ReorderProducts, SquarePhotos, StoreFeatures, Youtube, registerHomeComponentConfig, registerHomeComponents, useReorderButtons };
|
|
840
|
-
//# sourceMappingURL=chunk-
|
|
841
|
-
//# sourceMappingURL=chunk-
|
|
840
|
+
//# sourceMappingURL=chunk-KZ3MXRA7.js.map
|
|
841
|
+
//# sourceMappingURL=chunk-KZ3MXRA7.js.map
|