@billgangcom/theme-lib 1.127.0 → 1.128.0

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.
Files changed (51) hide show
  1. package/dist/{builder-DbBnEh3U.js → builder-CNebwPFm.js} +890 -881
  2. package/dist/{builder-FlfTMOiQ.cjs → builder-Dy7RSMJ7.cjs} +12 -12
  3. package/dist/builder-components-C-sRGuDw.cjs +5 -0
  4. package/dist/{builder-components-BApQHlfu.js → builder-components-CvwDC4WU.js} +2322 -2391
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +34 -34
  7. package/dist/{charge-DQqXA24M.cjs → charge-BaFC9CGT.cjs} +1 -1
  8. package/dist/{charge-CEnroh9b.js → charge-Bz7t9N9W.js} +6 -6
  9. package/dist/{checkout-DpOpLTYJ.js → checkout-DAO9n_bN.js} +5 -5
  10. package/dist/{checkout-CKWBwYzA.cjs → checkout-NyApNNAm.cjs} +1 -1
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-CNl0hs7D.cjs → index-BABt7BrX.cjs} +1 -1
  14. package/dist/{index-QEntiOo_.js → index-BHe4V2uc.js} +5 -5
  15. package/dist/{index-CAhSMxcR.cjs → index-Bkv9sQSH.cjs} +1 -1
  16. package/dist/index-C1JFjFgn.cjs +1 -0
  17. package/dist/{index-5AMPUrPw.js → index-CKUu7lB5.js} +5 -5
  18. package/dist/{index-GUvAgH0Q.cjs → index-Cnx1ZMfy.cjs} +1 -1
  19. package/dist/{index-DlvpmC0X.js → index-DN5QEFqV.js} +33 -32
  20. package/dist/{index--4kpy6DG.js → index-DPcCnjju.js} +5 -5
  21. package/dist/{index-DuhU_G_L.js → index-DS0QHCBx.js} +1 -1
  22. package/dist/{index-BWqwYf77.cjs → index-H3n_s-qw.cjs} +1 -1
  23. package/dist/{index-BvPCswts.cjs → index-S8Pzv9Y6.cjs} +1 -1
  24. package/dist/{index-YcPB7Mhe.js → index-TBAsOkdy.js} +2 -2
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.es.js +6 -6
  27. package/dist/{order-2yMPhYdK.cjs → order-D9bZsw6j.cjs} +1 -1
  28. package/dist/{order-DA6bx3MX.js → order-FDCc_xoh.js} +5 -5
  29. package/dist/src/builder/components/Navbar/index.d.ts +1 -0
  30. package/dist/src/builder/constants/block-icons.d.ts +30 -0
  31. package/dist/src/ui/ButtonSettings/index.d.ts +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/{subscription-Gua672Jm.js → subscription-BCxznt8S.js} +5 -5
  34. package/dist/{subscription-hSsSCaMq.cjs → subscription-HzlEomWK.cjs} +1 -1
  35. package/dist/{ticket-Bo8KyxXg.js → ticket-Bokxlwru.js} +6 -6
  36. package/dist/{ticket-CjHl2fUT.cjs → ticket-DbTulR68.cjs} +1 -1
  37. package/dist/{top-up-TXCm0-cC.cjs → top-up-D55gc7sC.cjs} +1 -1
  38. package/dist/{top-up-DaR2Khtl.js → top-up-DmvN2ae_.js} +5 -5
  39. package/dist/{ui-components-vOXufedG.js → ui-components-C0algo6I.js} +1048 -1039
  40. package/dist/ui-components-CmbdJIOh.cjs +1 -0
  41. package/dist/ui.cjs.js +1 -1
  42. package/dist/ui.es.js +1 -1
  43. package/dist/{validation-DMRsjClx.js → validation-BrJf4NbL.js} +5 -5
  44. package/dist/{validation-DRUFbc2c.cjs → validation-maeHixvI.cjs} +1 -1
  45. package/package.json +1 -1
  46. package/dist/builder-components-C6nG2kYo.cjs +0 -5
  47. package/dist/index-beXlgnJA.cjs +0 -1
  48. package/dist/src/builder/components/HeaderSettings/index.d.ts +0 -4
  49. package/dist/src/builder/components/HeaderSwitchTheme/index.d.ts +0 -4
  50. package/dist/src/builder/components/PreviewHeader/index.d.ts +0 -2
  51. package/dist/ui-components-BAslp_hx.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./builder-FlfTMOiQ.cjs"),m=require("./ticket-CjHl2fUT.cjs"),o=require("react"),D=require("./charge-DQqXA24M.cjs"),_=require("./ui-components-BAslp_hx.cjs"),e=require("@phosphor-icons/react"),Q=({children:r,shopDomain:d,shopId:h,shopPassword:g,shopLogo:I})=>{const{setShopDomain:x,setShopId:P,setShopPassword:y,setShopTerms:p,setShopPrivacyPolicy:l,setShopRefundPolicy:f,setShopLogo:A}=i.useStorefrontStore();return o.useLayoutEffect(()=>{const s=async()=>{const{data:u}=await D.fetchTerms();p(u)},C=async()=>{const{data:u}=await D.fetchPrivacyPolicy();l(u)},w=async()=>{const{data:u}=await D.fetchRefundPolicy();f(u)};x(d),P(h),g&&y(g),I&&A(I),s(),C(),w()},[d,h,g]),t.jsx(t.Fragment,{children:r})},X="_wrapper_1xuz3_18",L={wrapper:X};function J(){_.registerIcons({X:e.XIcon,Plus:e.PlusIcon,Minus:e.MinusIcon,Check:e.CheckIcon,Clock:e.ClockIcon,Info:e.InfoIcon,Copy:e.CopyIcon,Trash:e.TrashIcon,Sliders:e.SlidersIcon,Image:e.ImageIcon,List:e.ListIcon,Handbag:e.HandbagIcon,Bag:e.BagIcon,Eye:e.EyeIcon,Crown:e.CrownIcon,ArrowUp:e.ArrowUpIcon,ArrowDown:e.ArrowDownIcon,Confetti:e.ConfettiIcon,ArrowLeft:e.ArrowLeftIcon,ArrowRight:e.ArrowRightIcon,ArrowLineUpRight:e.ArrowLineUpRightIcon,ArrowUpRight:e.ArrowUpRightIcon,ArrowUUpLeft:e.ArrowUUpLeftIcon,ArrowUUpRight:e.ArrowUUpRightIcon,CaretRight:e.CaretRightIcon,CaretDown:e.CaretDownIcon,CaretUp:e.CaretUpIcon,CaretLeft:e.CaretLeftIcon,MagnifyingGlass:e.MagnifyingGlassIcon,MagnifyingGlassMinus:e.MagnifyingGlassMinusIcon,ArrowLineDown:e.ArrowLineDownIcon,Selection:e.SelectionIcon,CloudArrowUpIcon:e.CloudArrowUpIcon,ArrowsHorizontal:e.ArrowsHorizontalIcon,ArrowsVertical:e.ArrowsVerticalIcon,CheckCircle:e.CheckCircleIcon,XCircle:e.XCircleIcon,Star:e.StarIcon,Fire:e.FireIcon,Lightning:e.LightningIcon,AlignCenterHorizontal:e.AlignCenterHorizontalIcon,File:e.FileIcon,FileText:e.FileTextIcon,BookOpen:e.BookOpenIcon,DownloadSimple:e.DownloadSimpleIcon,DiscordLogo:e.DiscordLogoIcon,TelegramLogo:e.TelegramLogoIcon,SignOut:e.SignOutIcon,Wallet:e.WalletIcon,PaperPlaneRight:e.PaperPlaneRightIcon,ChatsTeardrop:e.ChatsTeardropIcon,DotsSixVertical:e.DotsSixVerticalIcon,Share:e.ShareIcon,Shield:e.ShieldIcon,ShieldCheck:e.ShieldCheckIcon,FileCloud:e.FileCloudIcon,Lock:e.LockIcon,Heart:e.HeartIcon,User:e.UserIcon,Calendar:e.CalendarIcon,Smiley:e.SmileyIcon,Globe:e.GlobeIcon,House:e.HouseIcon,HouseSimple:e.HouseSimpleIcon,CurrencyCircleDollar:e.CurrencyCircleDollarIcon,Medal:e.MedalIcon,CalendarCheck:e.CalendarCheckIcon,Question:e.QuestionIcon,Warning:e.WarningIcon,WarningDiamond:e.WarningDiamondIcon,TreeStructure:e.TreeStructureIcon,Palette:e.PaletteIcon,Gear:e.GearIcon,PaintBrushBroad:e.PaintBrushBroadIcon,TextAa:e.TextAaIcon,TextB:e.TextBIcon,TextH:e.TextHIcon,CornersOut:e.CornersOutIcon,ArrowSquareIn:e.ArrowSquareInIcon,Textbox:e.TextboxIcon,SquaresFour:e.SquaresFourIcon,SealQuestion:e.SealQuestionIcon,ChatCentered:e.ChatCenteredIcon,Ticket:e.TicketIcon,UserCircleGear:e.UserCircleGearIcon,Desktop:e.DesktopIcon,DeviceTabletCamera:e.DeviceTabletCameraIcon,DeviceMobileCamera:e.DeviceMobileCameraIcon,Cards:e.CardsIcon,PushPin:e.PushPinIcon,TextAlignLeft:e.TextAlignLeftIcon,TextAlignRight:e.TextAlignRightIcon,TextAlignCenter:e.TextAlignCenterIcon,AlignLeft:e.AlignLeftIcon,AlignRight:e.AlignRightIcon,AlignTop:e.AlignTopIcon,AlignBottom:e.AlignBottomIcon,TextItalic:e.TextItalicIcon,TextStrikethrough:e.TextStrikethroughIcon,TextUnderline:e.TextUnderlineIcon})}const $=o.lazy(()=>Promise.resolve().then(()=>require("./builder-FlfTMOiQ.cjs")).then(r=>r.index).then(r=>({default:r.BuilderPage}))),K=o.lazy(()=>Promise.resolve().then(()=>require("./index-beXlgnJA.cjs")).then(r=>({default:r.ErrorPage}))),Y=o.lazy(()=>Promise.resolve().then(()=>require("./index-BvPCswts.cjs")).then(r=>({default:r.ActivePage}))),Z=o.lazy(()=>Promise.resolve().then(()=>require("./validation-DRUFbc2c.cjs")).then(r=>({default:r.ValidationPage}))),ee=o.lazy(()=>Promise.resolve().then(()=>require("./index-CAhSMxcR.cjs")).then(r=>({default:r.WrapperPage}))),te=o.lazy(()=>Promise.resolve().then(()=>require("./index-BWqwYf77.cjs")).then(r=>({default:r.RouterErrorPage}))),c=o.lazy(()=>Promise.resolve().then(()=>require("./index-GUvAgH0Q.cjs")).then(r=>({default:r.DynamicErrorPage}))),re=o.lazy(()=>Promise.resolve().then(()=>require("./checkout-CKWBwYzA.cjs")).then(r=>({default:r.Checkout}))),oe=o.lazy(()=>Promise.resolve().then(()=>require("./charge-DQqXA24M.cjs")).then(r=>r.index$1).then(r=>({default:r.ChargePage}))),ne=o.lazy(()=>Promise.resolve().then(()=>require("./ticket-CjHl2fUT.cjs")).then(r=>r.index).then(r=>({default:r.TicketItem}))),se=o.lazy(()=>Promise.resolve().then(()=>require("./subscription-hSsSCaMq.cjs")).then(r=>r.index).then(r=>({default:r.Subscription}))),ce=o.lazy(()=>Promise.resolve().then(()=>require("./top-up-TXCm0-cC.cjs")).then(r=>({default:r.TopUpBalance}))),ie=o.lazy(()=>Promise.resolve().then(()=>require("./order-2yMPhYdK.cjs")).then(r=>r.index).then(r=>({default:r.OrderPage}))),ae=o.lazy(()=>Promise.resolve().then(()=>require("./index-CNl0hs7D.cjs")).then(r=>({default:r.TermsPage}))),le=o.lazy(()=>Promise.resolve().then(()=>require("./charge-DQqXA24M.cjs")).then(r=>r.index).then(r=>({default:r.CustomerDashboard}))),U=o.lazy(()=>Promise.resolve().then(()=>require("./charge-DQqXA24M.cjs")).then(r=>r.recapcha).then(r=>({default:r.ReCaptchaProvider}))),ue=()=>null,n=({children:r})=>t.jsx(o.Suspense,{fallback:t.jsx(ue,{}),children:r}),B=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-C6nG2kYo.cjs")).then(r=>r.index).then(r=>({default:r.RenderAnnouncement}))),R=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-C6nG2kYo.cjs")).then(r=>r.index).then(r=>({default:r.RenderFooter}))),b=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-C6nG2kYo.cjs")).then(r=>r.index).then(r=>({default:r.RenderHeader}))),de=r=>{var E;const{blocks:d,settings:h,header:g,footer:I,announcement:x,routes:P=[],shopLogo:y,apiURLs:p,isAntistock:l=!1}=r,[f,A]=o.useState(null),{general:s,setIsAntistock:C}=i.useGeneralStore(),{setApiUrls:w}=i.useApiStore(),u=((E=s==null?void 0:s.info)==null?void 0:E.customerAccountSettings)??"OPTIONAL",z=u==="DISABLED",{setBlocks:H,setSourceBlocks:F,setHeader:O,setFooter:M,setAnnouncement:G,setSettings:W}=i.useBlocksStore(),{themeSettings:S}=i.useThemeSettingsStore(),{settings:T,setSettings:V}=i.useSettingsStore(),k=i.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"":window.location.hostname,N=localStorage.getItem("shopPassword"),q=localStorage.getItem("shopId")||"";return o.useEffect(()=>{if(C(l),l){const a=document.documentElement;getComputedStyle(a).getPropertyValue("--brand-color").trim()==="#ff3f19"&&a.style.setProperty("--brand-color","#a13dff")}},[l,C]),o.useEffect(()=>{!q&&(s!=null&&s.info.id)&&localStorage.setItem("shopId",s==null?void 0:s.info.id)},[s]),o.useEffect(()=>{!k&&!l&&localStorage.setItem("fakeDomain","drafts-ca18cf24-6659-4015-b1ab-9ebe9fa64e74.bgng.io")},[k]),o.useEffect(()=>{if(S&&T){const a=m.generateDynamicStyles(S,T);m.loadCustomFonts(),m.setupDynamicFonts(S),m.injectStylesToDOM(a)}},[S,JSON.stringify(T),window.location.hostname]),o.useEffect(()=>{const j=new h().blockSettings;V(j)},[]),o.useEffect(()=>{J()},[]),o.useLayoutEffect(()=>{const a={};Object.keys(d).map(v=>{a[v]=d[v]}),F(a),H(a),O(g),M(I),G(x),W(h),p&&w(p);const j=i.createBrowserRouter([{element:t.jsx(Q,{shopDomain:k,shopId:q,shopPassword:N||void 0,shopLogo:y,children:t.jsx(U,{children:t.jsx(ee,{children:t.jsx(i.Outlet,{})})})}),errorElement:t.jsx(n,{children:t.jsx(te,{})}),children:[{path:"/admin/builder/*",element:t.jsx(n,{children:t.jsx(Y,{children:t.jsx($,{blocks:d,settings:h,header:g,footer:I,announcement:x})})}),errorElement:t.jsx(n,{children:t.jsx(K,{})})},...P,{path:"/checkout",element:t.jsx(n,{children:t.jsx(re,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Checkout",!0)},{path:"/top-up",element:t.jsx(n,{children:t.jsx(ce,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Top Up Balance",!0)},{path:"/charges/:id",element:t.jsx(n,{children:t.jsx(oe,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Charges",!0)},{path:"/orders/:id/:accessToken?",element:t.jsx(n,{children:t.jsx(ie,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Orders",!0)},{path:"/subscriptions/:id/:accessToken?",element:t.jsx(n,{children:t.jsx(se,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Subscriptions",!0)},...z?[]:[{path:l?"/account":"/customer-dash",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(B,{}),t.jsx(b,{}),t.jsx("div",{style:{flex:"1 1 auto"},children:t.jsx(le,{})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title=l?"Account":"Customer Dashboard",!0)}],{path:"/validation",element:t.jsx(n,{children:t.jsx(Z,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Validation",!0)},{path:"/ticket/:id/:accessToken",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(b,{}),t.jsx("div",{style:{flex:1,width:"100%",height:"100%"},children:t.jsx(U,{children:t.jsx(ne,{})})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Ticket",!0)},{path:"/terms",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(B,{}),t.jsx(b,{}),t.jsx("div",{style:{flex:1,width:"100%"},children:t.jsx(ae,{})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Terms of Service",!0)},{path:"*",element:t.jsx(m.DynamicRouteWrapper,{}),errorElement:t.jsx(n,{children:t.jsx(c,{})})}]}]);A(j)},[s,u]),t.jsx(o.Suspense,{fallback:null,children:f&&t.jsx(i.RouterProvider,{router:f})})};exports.App=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./builder-Dy7RSMJ7.cjs"),g=require("./ticket-DbTulR68.cjs"),o=require("react"),D=require("./charge-BaFC9CGT.cjs"),_=require("./ui-components-CmbdJIOh.cjs"),e=require("@phosphor-icons/react"),Q=({children:r,shopDomain:d,shopId:h,shopPassword:m,shopLogo:I})=>{const{setShopDomain:x,setShopId:P,setShopPassword:y,setShopTerms:p,setShopPrivacyPolicy:l,setShopRefundPolicy:f,setShopLogo:A}=i.useStorefrontStore();return o.useLayoutEffect(()=>{const s=async()=>{const{data:u}=await D.fetchTerms();p(u)},C=async()=>{const{data:u}=await D.fetchPrivacyPolicy();l(u)},w=async()=>{const{data:u}=await D.fetchRefundPolicy();f(u)};x(d),P(h),m&&y(m),I&&A(I),s(),C(),w()},[d,h,m]),t.jsx(t.Fragment,{children:r})},X="_wrapper_1xuz3_18",L={wrapper:X};function J(){_.registerIcons({X:e.XIcon,Plus:e.PlusIcon,Minus:e.MinusIcon,Check:e.CheckIcon,Clock:e.ClockIcon,Info:e.InfoIcon,Copy:e.CopyIcon,Trash:e.TrashIcon,Sliders:e.SlidersIcon,Image:e.ImageIcon,List:e.ListIcon,Handbag:e.HandbagIcon,Bag:e.BagIcon,Eye:e.EyeIcon,Crown:e.CrownIcon,ArrowUp:e.ArrowUpIcon,ArrowDown:e.ArrowDownIcon,Confetti:e.ConfettiIcon,ArrowLeft:e.ArrowLeftIcon,ArrowRight:e.ArrowRightIcon,ArrowLineUpRight:e.ArrowLineUpRightIcon,ArrowUpRight:e.ArrowUpRightIcon,ArrowUUpLeft:e.ArrowUUpLeftIcon,ArrowUUpRight:e.ArrowUUpRightIcon,CaretRight:e.CaretRightIcon,CaretDown:e.CaretDownIcon,CaretUp:e.CaretUpIcon,CaretLeft:e.CaretLeftIcon,MagnifyingGlass:e.MagnifyingGlassIcon,MagnifyingGlassMinus:e.MagnifyingGlassMinusIcon,ArrowLineDown:e.ArrowLineDownIcon,Selection:e.SelectionIcon,CloudArrowUpIcon:e.CloudArrowUpIcon,ArrowsHorizontal:e.ArrowsHorizontalIcon,ArrowsVertical:e.ArrowsVerticalIcon,CheckCircle:e.CheckCircleIcon,XCircle:e.XCircleIcon,Star:e.StarIcon,Fire:e.FireIcon,Lightning:e.LightningIcon,AlignCenterHorizontal:e.AlignCenterHorizontalIcon,File:e.FileIcon,FileText:e.FileTextIcon,BookOpen:e.BookOpenIcon,DownloadSimple:e.DownloadSimpleIcon,DiscordLogo:e.DiscordLogoIcon,TelegramLogo:e.TelegramLogoIcon,SignOut:e.SignOutIcon,Wallet:e.WalletIcon,PaperPlaneRight:e.PaperPlaneRightIcon,ChatsTeardrop:e.ChatsTeardropIcon,DotsSixVertical:e.DotsSixVerticalIcon,Share:e.ShareIcon,Shield:e.ShieldIcon,ShieldCheck:e.ShieldCheckIcon,FileCloud:e.FileCloudIcon,Lock:e.LockIcon,Heart:e.HeartIcon,User:e.UserIcon,Calendar:e.CalendarIcon,Smiley:e.SmileyIcon,Globe:e.GlobeIcon,House:e.HouseIcon,HouseSimple:e.HouseSimpleIcon,CurrencyCircleDollar:e.CurrencyCircleDollarIcon,Medal:e.MedalIcon,CalendarCheck:e.CalendarCheckIcon,Question:e.QuestionIcon,Warning:e.WarningIcon,WarningDiamond:e.WarningDiamondIcon,TreeStructure:e.TreeStructureIcon,Palette:e.PaletteIcon,Gear:e.GearIcon,PaintBrushBroad:e.PaintBrushBroadIcon,TextAa:e.TextAaIcon,TextB:e.TextBIcon,TextH:e.TextHIcon,CornersOut:e.CornersOutIcon,ArrowSquareIn:e.ArrowSquareInIcon,Textbox:e.TextboxIcon,SquaresFour:e.SquaresFourIcon,SealQuestion:e.SealQuestionIcon,ChatCentered:e.ChatCenteredIcon,Ticket:e.TicketIcon,UserCircleGear:e.UserCircleGearIcon,Desktop:e.DesktopIcon,DeviceTabletCamera:e.DeviceTabletCameraIcon,DeviceMobileCamera:e.DeviceMobileCameraIcon,Cards:e.CardsIcon,PushPin:e.PushPinIcon,TextAlignLeft:e.TextAlignLeftIcon,TextAlignRight:e.TextAlignRightIcon,TextAlignCenter:e.TextAlignCenterIcon,AlignLeft:e.AlignLeftIcon,AlignRight:e.AlignRightIcon,AlignTop:e.AlignTopIcon,AlignBottom:e.AlignBottomIcon,TextItalic:e.TextItalicIcon,TextStrikethrough:e.TextStrikethroughIcon,TextUnderline:e.TextUnderlineIcon})}const $=o.lazy(()=>Promise.resolve().then(()=>require("./builder-Dy7RSMJ7.cjs")).then(r=>r.index).then(r=>({default:r.BuilderPage}))),K=o.lazy(()=>Promise.resolve().then(()=>require("./index-C1JFjFgn.cjs")).then(r=>({default:r.ErrorPage}))),Y=o.lazy(()=>Promise.resolve().then(()=>require("./index-S8Pzv9Y6.cjs")).then(r=>({default:r.ActivePage}))),Z=o.lazy(()=>Promise.resolve().then(()=>require("./validation-maeHixvI.cjs")).then(r=>({default:r.ValidationPage}))),ee=o.lazy(()=>Promise.resolve().then(()=>require("./index-Bkv9sQSH.cjs")).then(r=>({default:r.WrapperPage}))),te=o.lazy(()=>Promise.resolve().then(()=>require("./index-H3n_s-qw.cjs")).then(r=>({default:r.RouterErrorPage}))),c=o.lazy(()=>Promise.resolve().then(()=>require("./index-Cnx1ZMfy.cjs")).then(r=>({default:r.DynamicErrorPage}))),re=o.lazy(()=>Promise.resolve().then(()=>require("./checkout-NyApNNAm.cjs")).then(r=>({default:r.Checkout}))),oe=o.lazy(()=>Promise.resolve().then(()=>require("./charge-BaFC9CGT.cjs")).then(r=>r.index$1).then(r=>({default:r.ChargePage}))),ne=o.lazy(()=>Promise.resolve().then(()=>require("./ticket-DbTulR68.cjs")).then(r=>r.index).then(r=>({default:r.TicketItem}))),se=o.lazy(()=>Promise.resolve().then(()=>require("./subscription-HzlEomWK.cjs")).then(r=>r.index).then(r=>({default:r.Subscription}))),ce=o.lazy(()=>Promise.resolve().then(()=>require("./top-up-D55gc7sC.cjs")).then(r=>({default:r.TopUpBalance}))),ie=o.lazy(()=>Promise.resolve().then(()=>require("./order-D9bZsw6j.cjs")).then(r=>r.index).then(r=>({default:r.OrderPage}))),ae=o.lazy(()=>Promise.resolve().then(()=>require("./index-BABt7BrX.cjs")).then(r=>({default:r.TermsPage}))),le=o.lazy(()=>Promise.resolve().then(()=>require("./charge-BaFC9CGT.cjs")).then(r=>r.index).then(r=>({default:r.CustomerDashboard}))),U=o.lazy(()=>Promise.resolve().then(()=>require("./charge-BaFC9CGT.cjs")).then(r=>r.recapcha).then(r=>({default:r.ReCaptchaProvider}))),ue=()=>null,n=({children:r})=>t.jsx(o.Suspense,{fallback:t.jsx(ue,{}),children:r}),B=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-C-sRGuDw.cjs")).then(r=>r.index).then(r=>({default:r.RenderAnnouncement}))),R=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-C-sRGuDw.cjs")).then(r=>r.index).then(r=>({default:r.RenderFooter}))),b=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-C-sRGuDw.cjs")).then(r=>r.index).then(r=>({default:r.RenderHeader}))),de=r=>{var E;const{blocks:d,settings:h,header:m,footer:I,announcement:x,routes:P=[],shopLogo:y,apiURLs:p,isAntistock:l=!1}=r,[f,A]=o.useState(null),{general:s,setIsAntistock:C}=i.useGeneralStore(),{setApiUrls:w}=i.useApiStore(),u=((E=s==null?void 0:s.info)==null?void 0:E.customerAccountSettings)??"OPTIONAL",z=u==="DISABLED",{setBlocks:H,setSourceBlocks:F,setHeader:O,setFooter:M,setAnnouncement:G,setSettings:W}=i.useBlocksStore(),{themeSettings:S}=i.useThemeSettingsStore(),{settings:T,setSettings:V}=i.useSettingsStore(),k=i.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"":window.location.hostname,N=localStorage.getItem("shopPassword"),q=localStorage.getItem("shopId")||"";return o.useEffect(()=>{if(C(l),l){const a=document.documentElement;getComputedStyle(a).getPropertyValue("--brand-color").trim()==="#ff3f19"&&a.style.setProperty("--brand-color","#a13dff")}},[l,C]),o.useEffect(()=>{!q&&(s!=null&&s.info.id)&&localStorage.setItem("shopId",s==null?void 0:s.info.id)},[s]),o.useEffect(()=>{!k&&!l&&localStorage.setItem("fakeDomain","richtheme.astck.com")},[k]),o.useEffect(()=>{if(S&&T){const a=g.generateDynamicStyles(S,T);g.loadCustomFonts(),g.setupDynamicFonts(S),g.injectStylesToDOM(a)}},[S,JSON.stringify(T),window.location.hostname]),o.useEffect(()=>{const j=new h().blockSettings;V(j)},[]),o.useEffect(()=>{J()},[]),o.useLayoutEffect(()=>{const a={};Object.keys(d).map(v=>{a[v]=d[v]}),F(a),H(a),O(m),M(I),G(x),W(h),p&&w(p);const j=i.createBrowserRouter([{element:t.jsx(Q,{shopDomain:k,shopId:q,shopPassword:N||void 0,shopLogo:y,children:t.jsx(U,{children:t.jsx(ee,{children:t.jsx(i.Outlet,{})})})}),errorElement:t.jsx(n,{children:t.jsx(te,{})}),children:[{path:"/admin/builder/*",element:t.jsx(n,{children:t.jsx(Y,{children:t.jsx($,{blocks:d,settings:h,header:m,footer:I,announcement:x})})}),errorElement:t.jsx(n,{children:t.jsx(K,{})})},...P,{path:"/checkout",element:t.jsx(n,{children:t.jsx(re,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Checkout",!0)},{path:"/top-up",element:t.jsx(n,{children:t.jsx(ce,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Top Up Balance",!0)},{path:"/charges/:id",element:t.jsx(n,{children:t.jsx(oe,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Charges",!0)},{path:"/orders/:id/:accessToken?",element:t.jsx(n,{children:t.jsx(ie,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Orders",!0)},{path:"/subscriptions/:id/:accessToken?",element:t.jsx(n,{children:t.jsx(se,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Subscriptions",!0)},...z?[]:[{path:l?"/account":"/customer-dash",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(B,{}),t.jsx(b,{}),t.jsx("div",{style:{flex:"1 1 auto"},children:t.jsx(le,{})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title=l?"Account":"Customer Dashboard",!0)}],{path:"/validation",element:t.jsx(n,{children:t.jsx(Z,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Validation",!0)},{path:"/ticket/:id/:accessToken",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(b,{}),t.jsx("div",{style:{flex:1,width:"100%",height:"100%"},children:t.jsx(U,{children:t.jsx(ne,{})})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Ticket",!0)},{path:"/terms",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(B,{}),t.jsx(b,{}),t.jsx("div",{style:{flex:1,width:"100%"},children:t.jsx(ae,{})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Terms of Service",!0)},{path:"*",element:t.jsx(g.DynamicRouteWrapper,{}),errorElement:t.jsx(n,{children:t.jsx(c,{})})}]}]);A(j)},[s,u]),t.jsx(o.Suspense,{fallback:null,children:f&&t.jsx(i.RouterProvider,{router:f})})};exports.App=de;
@@ -1,10 +1,10 @@
1
1
  import { jsx as e, Fragment as j, jsxs as D } from "react/jsx-runtime";
2
- import { M as _, y as N, j as q, c as Q, m as X, a as J, K, ai as $, aj as Y, ak as Z } from "./builder-DbBnEh3U.js";
3
- import { f as ee, l as te, j as oe, k as ne, D as re } from "./ticket-Bo8KyxXg.js";
2
+ import { M as _, y as N, j as q, c as Q, m as X, a as J, K, ai as $, aj as Y, ak as Z } from "./builder-CNebwPFm.js";
3
+ import { f as ee, l as te, j as oe, k as ne, D as re } from "./ticket-Bokxlwru.js";
4
4
  import o, { Suspense as ce } from "react";
5
- import { $ as ae, a0 as ie, a1 as le } from "./charge-CEnroh9b.js";
6
- import { w as se } from "./ui-components-vOXufedG.js";
7
- import { TextUnderlineIcon as de, TextStrikethroughIcon as ue, TextItalicIcon as he, AlignBottomIcon as me, AlignTopIcon as pe, AlignRightIcon as Ie, AlignLeftIcon as ge, TextAlignCenterIcon as fe, TextAlignRightIcon as Ce, TextAlignLeftIcon as Se, PushPinIcon as ye, CardsIcon as Ae, DeviceMobileCameraIcon as we, DeviceTabletCameraIcon as Te, DesktopIcon as Pe, UserCircleGearIcon as ke, TicketIcon as De, ChatCenteredIcon as Le, SealQuestionIcon as Re, SquaresFourIcon as xe, TextboxIcon as be, ArrowSquareInIcon as Ee, CornersOutIcon as Be, TextHIcon as Ue, TextBIcon as ze, TextAaIcon as ve, PaintBrushBroadIcon as He, GearIcon as Fe, PaletteIcon as Oe, TreeStructureIcon as Me, WarningDiamondIcon as Ge, WarningIcon as We, QuestionIcon as Ve, CalendarCheckIcon as je, MedalIcon as _e, CurrencyCircleDollarIcon as Ne, HouseSimpleIcon as qe, HouseIcon as Qe, GlobeIcon as Xe, SmileyIcon as Je, CalendarIcon as Ke, UserIcon as $e, HeartIcon as Ye, LockIcon as Ze, FileCloudIcon as et, ShieldCheckIcon as tt, ShieldIcon as ot, ShareIcon as nt, DotsSixVerticalIcon as rt, ChatsTeardropIcon as ct, PaperPlaneRightIcon as at, WalletIcon as it, SignOutIcon as lt, TelegramLogoIcon as st, DiscordLogoIcon as dt, DownloadSimpleIcon as ut, BookOpenIcon as ht, FileTextIcon as mt, FileIcon as pt, AlignCenterHorizontalIcon as It, LightningIcon as gt, FireIcon as ft, StarIcon as Ct, XCircleIcon as St, CheckCircleIcon as yt, ArrowsVerticalIcon as At, ArrowsHorizontalIcon as wt, CloudArrowUpIcon as Tt, SelectionIcon as Pt, ArrowLineDownIcon as kt, MagnifyingGlassMinusIcon as Dt, MagnifyingGlassIcon as Lt, CaretLeftIcon as Rt, CaretUpIcon as xt, CaretDownIcon as bt, CaretRightIcon as Et, ArrowUUpRightIcon as Bt, ArrowUUpLeftIcon as Ut, ArrowUpRightIcon as zt, ArrowLineUpRightIcon as vt, ArrowRightIcon as Ht, ArrowLeftIcon as Ft, ConfettiIcon as Ot, ArrowDownIcon as Mt, ArrowUpIcon as Gt, CrownIcon as Wt, EyeIcon as Vt, BagIcon as jt, HandbagIcon as _t, ListIcon as Nt, ImageIcon as qt, SlidersIcon as Qt, TrashIcon as Xt, CopyIcon as Jt, InfoIcon as Kt, ClockIcon as $t, CheckIcon as Yt, MinusIcon as Zt, PlusIcon as eo, XIcon as to } from "@phosphor-icons/react";
5
+ import { $ as ae, a0 as ie, a1 as le } from "./charge-Bz7t9N9W.js";
6
+ import { w as se } from "./ui-components-C0algo6I.js";
7
+ import { TextUnderlineIcon as de, TextStrikethroughIcon as ue, TextItalicIcon as he, AlignBottomIcon as me, AlignTopIcon as pe, AlignRightIcon as Ie, AlignLeftIcon as ge, TextAlignCenterIcon as fe, TextAlignRightIcon as Ce, TextAlignLeftIcon as Se, PushPinIcon as ye, CardsIcon as Ae, DeviceMobileCameraIcon as we, DeviceTabletCameraIcon as Te, DesktopIcon as Pe, UserCircleGearIcon as ke, TicketIcon as De, ChatCenteredIcon as Le, SealQuestionIcon as Re, SquaresFourIcon as xe, TextboxIcon as Ee, ArrowSquareInIcon as be, CornersOutIcon as Be, TextHIcon as Ue, TextBIcon as ze, TextAaIcon as ve, PaintBrushBroadIcon as He, GearIcon as Fe, PaletteIcon as Oe, TreeStructureIcon as Me, WarningDiamondIcon as Ge, WarningIcon as We, QuestionIcon as Ve, CalendarCheckIcon as je, MedalIcon as _e, CurrencyCircleDollarIcon as Ne, HouseSimpleIcon as qe, HouseIcon as Qe, GlobeIcon as Xe, SmileyIcon as Je, CalendarIcon as Ke, UserIcon as $e, HeartIcon as Ye, LockIcon as Ze, FileCloudIcon as et, ShieldCheckIcon as tt, ShieldIcon as ot, ShareIcon as nt, DotsSixVerticalIcon as rt, ChatsTeardropIcon as ct, PaperPlaneRightIcon as at, WalletIcon as it, SignOutIcon as lt, TelegramLogoIcon as st, DiscordLogoIcon as dt, DownloadSimpleIcon as ut, BookOpenIcon as ht, FileTextIcon as mt, FileIcon as pt, AlignCenterHorizontalIcon as It, LightningIcon as gt, FireIcon as ft, StarIcon as Ct, XCircleIcon as St, CheckCircleIcon as yt, ArrowsVerticalIcon as At, ArrowsHorizontalIcon as wt, CloudArrowUpIcon as Tt, SelectionIcon as Pt, ArrowLineDownIcon as kt, MagnifyingGlassMinusIcon as Dt, MagnifyingGlassIcon as Lt, CaretLeftIcon as Rt, CaretUpIcon as xt, CaretDownIcon as Et, CaretRightIcon as bt, ArrowUUpRightIcon as Bt, ArrowUUpLeftIcon as Ut, ArrowUpRightIcon as zt, ArrowLineUpRightIcon as vt, ArrowRightIcon as Ht, ArrowLeftIcon as Ft, ConfettiIcon as Ot, ArrowDownIcon as Mt, ArrowUpIcon as Gt, CrownIcon as Wt, EyeIcon as Vt, BagIcon as jt, HandbagIcon as _t, ListIcon as Nt, ImageIcon as qt, SlidersIcon as Qt, TrashIcon as Xt, CopyIcon as Jt, InfoIcon as Kt, ClockIcon as $t, CheckIcon as Yt, MinusIcon as Zt, PlusIcon as eo, XIcon as to } from "@phosphor-icons/react";
8
8
  const oo = ({
9
9
  children: t,
10
10
  shopDomain: s,
@@ -64,8 +64,8 @@ function ro() {
64
64
  ArrowUpRight: zt,
65
65
  ArrowUUpLeft: Ut,
66
66
  ArrowUUpRight: Bt,
67
- CaretRight: Et,
68
- CaretDown: bt,
67
+ CaretRight: bt,
68
+ CaretDown: Et,
69
69
  CaretUp: xt,
70
70
  CaretLeft: Rt,
71
71
  MagnifyingGlass: Lt,
@@ -127,8 +127,8 @@ function ro() {
127
127
  TextB: ze,
128
128
  TextH: Ue,
129
129
  CornersOut: Be,
130
- ArrowSquareIn: Ee,
131
- Textbox: be,
130
+ ArrowSquareIn: be,
131
+ Textbox: Ee,
132
132
  SquaresFour: xe,
133
133
  SealQuestion: Re,
134
134
  ChatCentered: Le,
@@ -154,51 +154,51 @@ function ro() {
154
154
  });
155
155
  }
156
156
  const co = o.lazy(
157
- () => import("./builder-DbBnEh3U.js").then((t) => t.ao).then((t) => ({ default: t.BuilderPage }))
157
+ () => import("./builder-CNebwPFm.js").then((t) => t.ao).then((t) => ({ default: t.BuilderPage }))
158
158
  ), ao = o.lazy(
159
- () => import("./index-DlvpmC0X.js").then((t) => ({ default: t.ErrorPage }))
159
+ () => import("./index-DN5QEFqV.js").then((t) => ({ default: t.ErrorPage }))
160
160
  ), io = o.lazy(
161
- () => import("./index-DuhU_G_L.js").then((t) => ({ default: t.ActivePage }))
161
+ () => import("./index-DS0QHCBx.js").then((t) => ({ default: t.ActivePage }))
162
162
  ), lo = o.lazy(
163
- () => import("./validation-DMRsjClx.js").then((t) => ({ default: t.ValidationPage }))
163
+ () => import("./validation-BrJf4NbL.js").then((t) => ({ default: t.ValidationPage }))
164
164
  ), so = o.lazy(
165
- () => import("./index-5AMPUrPw.js").then((t) => ({ default: t.WrapperPage }))
165
+ () => import("./index-CKUu7lB5.js").then((t) => ({ default: t.WrapperPage }))
166
166
  ), uo = o.lazy(
167
- () => import("./index-QEntiOo_.js").then((t) => ({ default: t.RouterErrorPage }))
167
+ () => import("./index-BHe4V2uc.js").then((t) => ({ default: t.RouterErrorPage }))
168
168
  ), c = o.lazy(
169
- () => import("./index--4kpy6DG.js").then((t) => ({ default: t.DynamicErrorPage }))
169
+ () => import("./index-DPcCnjju.js").then((t) => ({ default: t.DynamicErrorPage }))
170
170
  ), ho = o.lazy(
171
- () => import("./checkout-DpOpLTYJ.js").then((t) => ({ default: t.Checkout }))
171
+ () => import("./checkout-DAO9n_bN.js").then((t) => ({ default: t.Checkout }))
172
172
  ), mo = o.lazy(
173
- () => import("./charge-CEnroh9b.js").then((t) => t.a9).then((t) => ({ default: t.ChargePage }))
173
+ () => import("./charge-Bz7t9N9W.js").then((t) => t.a9).then((t) => ({ default: t.ChargePage }))
174
174
  ), po = o.lazy(
175
- () => import("./ticket-Bo8KyxXg.js").then((t) => t.m).then((t) => ({ default: t.TicketItem }))
175
+ () => import("./ticket-Bokxlwru.js").then((t) => t.m).then((t) => ({ default: t.TicketItem }))
176
176
  ), Io = o.lazy(
177
- () => import("./subscription-Gua672Jm.js").then((t) => t.i).then((t) => ({ default: t.Subscription }))
177
+ () => import("./subscription-BCxznt8S.js").then((t) => t.i).then((t) => ({ default: t.Subscription }))
178
178
  ), go = o.lazy(
179
- () => import("./top-up-DaR2Khtl.js").then((t) => ({ default: t.TopUpBalance }))
179
+ () => import("./top-up-DmvN2ae_.js").then((t) => ({ default: t.TopUpBalance }))
180
180
  ), fo = o.lazy(
181
- () => import("./order-DA6bx3MX.js").then((t) => t.i).then((t) => ({ default: t.OrderPage }))
181
+ () => import("./order-FDCc_xoh.js").then((t) => t.i).then((t) => ({ default: t.OrderPage }))
182
182
  ), Co = o.lazy(
183
- () => import("./index-YcPB7Mhe.js").then((t) => ({ default: t.TermsPage }))
183
+ () => import("./index-TBAsOkdy.js").then((t) => ({ default: t.TermsPage }))
184
184
  ), So = o.lazy(
185
- () => import("./charge-CEnroh9b.js").then((t) => t.a8).then((t) => ({ default: t.CustomerDashboard }))
185
+ () => import("./charge-Bz7t9N9W.js").then((t) => t.a8).then((t) => ({ default: t.CustomerDashboard }))
186
186
  ), B = o.lazy(
187
- () => import("./charge-CEnroh9b.js").then((t) => t.a7).then((t) => ({ default: t.ReCaptchaProvider }))
187
+ () => import("./charge-Bz7t9N9W.js").then((t) => t.a7).then((t) => ({ default: t.ReCaptchaProvider }))
188
188
  ), yo = () => null, n = ({ children: t }) => /* @__PURE__ */ e(ce, { fallback: /* @__PURE__ */ e(yo, {}), children: t }), U = o.lazy(
189
- () => import("./builder-components-BApQHlfu.js").then((t) => t.i).then((t) => ({
189
+ () => import("./builder-components-CvwDC4WU.js").then((t) => t.i).then((t) => ({
190
190
  default: t.RenderAnnouncement
191
191
  }))
192
192
  ), R = o.lazy(
193
- () => import("./builder-components-BApQHlfu.js").then((t) => t.i).then((t) => ({
193
+ () => import("./builder-components-CvwDC4WU.js").then((t) => t.i).then((t) => ({
194
194
  default: t.RenderFooter
195
195
  }))
196
196
  ), x = o.lazy(
197
- () => import("./builder-components-BApQHlfu.js").then((t) => t.i).then((t) => ({
197
+ () => import("./builder-components-CvwDC4WU.js").then((t) => t.i).then((t) => ({
198
198
  default: t.RenderHeader
199
199
  }))
200
200
  ), xo = (t) => {
201
- var E;
201
+ var b;
202
202
  const {
203
203
  blocks: s,
204
204
  settings: d,
@@ -209,23 +209,23 @@ const co = o.lazy(
209
209
  shopLogo: y,
210
210
  apiURLs: p,
211
211
  isAntistock: i = !1
212
- } = t, [I, A] = o.useState(null), { general: r, setIsAntistock: g } = N(), { setApiUrls: w } = q(), l = ((E = r == null ? void 0 : r.info) == null ? void 0 : E.customerAccountSettings) ?? "OPTIONAL", z = l === "DISABLED", {
212
+ } = t, [I, A] = o.useState(null), { general: r, setIsAntistock: g } = N(), { setApiUrls: w } = q(), l = ((b = r == null ? void 0 : r.info) == null ? void 0 : b.customerAccountSettings) ?? "OPTIONAL", z = l === "DISABLED", {
213
213
  setBlocks: v,
214
214
  setSourceBlocks: H,
215
215
  setHeader: F,
216
216
  setFooter: O,
217
217
  setAnnouncement: M,
218
218
  setSettings: G
219
- } = Q(), { themeSettings: f } = X(), { settings: T, setSettings: W } = J(), P = K ? localStorage.getItem("fakeDomain") || "" : window.location.hostname, V = localStorage.getItem("shopPassword"), b = localStorage.getItem("shopId") || "";
219
+ } = Q(), { themeSettings: f } = X(), { settings: T, setSettings: W } = J(), P = K ? localStorage.getItem("fakeDomain") || "" : window.location.hostname, V = localStorage.getItem("shopPassword"), E = localStorage.getItem("shopId") || "";
220
220
  return o.useEffect(() => {
221
221
  if (g(i), i) {
222
222
  const a = document.documentElement;
223
223
  getComputedStyle(a).getPropertyValue("--brand-color").trim() === "#ff3f19" && a.style.setProperty("--brand-color", "#a13dff");
224
224
  }
225
225
  }, [i, g]), o.useEffect(() => {
226
- !b && (r != null && r.info.id) && localStorage.setItem("shopId", r == null ? void 0 : r.info.id);
226
+ !E && (r != null && r.info.id) && localStorage.setItem("shopId", r == null ? void 0 : r.info.id);
227
227
  }, [r]), o.useEffect(() => {
228
- !P && !i && localStorage.setItem("fakeDomain", "drafts-ca18cf24-6659-4015-b1ab-9ebe9fa64e74.bgng.io");
228
+ !P && !i && localStorage.setItem("fakeDomain", "richtheme.astck.com");
229
229
  }, [P]), o.useEffect(() => {
230
230
  if (f && T) {
231
231
  const a = ee(f, T);
@@ -247,7 +247,7 @@ const co = o.lazy(
247
247
  oo,
248
248
  {
249
249
  shopDomain: P,
250
- shopId: b,
250
+ shopId: E,
251
251
  shopPassword: V || void 0,
252
252
  shopLogo: y,
253
253
  children: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(so, { children: /* @__PURE__ */ e(Y, {}) }) })
@@ -1,4 +1,4 @@
1
- "use strict";const g=require("./builder-FlfTMOiQ.cjs"),s=require("react/jsx-runtime"),P=require("react"),v=require("./ui-components-BAslp_hx.cjs"),tl=require("./builder-components-C6nG2kYo.cjs");require("react-dom");const nl=require("./ticket-CjHl2fUT.cjs"),rl=require("./order-2yMPhYdK.cjs"),r2=require("./subscription-hSsSCaMq.cjs");function u2(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _e=u2(P);async function a2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await g.request({method:"get",url:r,withToken:!1})).data}const s2=async()=>{const e=g.useApiStore.getState().apiUrls,t=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await g.request({url:n,withToken:!0,method:"get"})},i2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},o2=async(e,t)=>{const r=`${g.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await g.request({url:r,method:"post",body:e,withToken:!1})},vr=async e=>{const t=g.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},c2=()=>vr("dash/info"),ul=()=>vr("dash/dashboard/home"),l2=()=>vr("rewards"),d2=()=>vr("balance"),f2=()=>vr("balance/top-up/settings"),h2=()=>vr("referral-system"),Gs=e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return g.request({url:r,withToken:!1,method:"get"})},p2=()=>Gs("terms"),m2=()=>Gs("refund-policy"),g2=()=>Gs("privacy-policy"),Yu=10,sa=async({url:e,PageNumber:t})=>{var o;const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${Yu}`,a=await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),i=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:i}},ia=async(e,t="get",n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await g.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},b2=e=>ia("","post",e),_2=({PageNumber:e})=>sa({url:"customers/orders",PageNumber:e}),x2=e=>ia(e),C2=e=>ia(e),E2=(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v2/orders/${u}/${e}/${t}/replacement-requests`;return g.request({url:a,method:"post",withToken:!0,body:n,typeToken:"customer"})},y2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/public/${n}/images`,u=new FormData;return u.append("file",e),g.request({url:r,method:"post",withToken:!1,body:u})},T2=(e,t,n)=>ia(`${e}/${t}/replacement-requests/${n}/cancel`,"post"),k2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await g.request({url:r,method:"post",withToken:!1,body:e})},A2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},S2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await g.request({url:u,method:"get",withToken:!1})},I2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await g.request({url:a,method:"post",withToken:!1,body:n})},v2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await g.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},N2=({PageNumber:e})=>sa({url:"customers/subscriptions",PageNumber:e}),w2=async({id:e,accessToken:t})=>await S2(e,t),D2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await g.request({url:u,method:"post",withToken:!1,body:t})},L2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},P2=async(e,t,n,r,u,a)=>{const i=g.useApiStore.getState().apiUrls,o=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,c=`${i.slApi}/v1/public/${o}/tickets/${e}/${t}/answer`;return(await g.request({url:c,method:"post",body:{message:n,recaptcha:r,tsId:u,...a&&a.length>0&&{imageIds:a.map(h=>h.imageId)}},withToken:!1})).data},R2=({PageNumber:e})=>sa({url:"customers/tickets",PageNumber:e}),M2=({PageNumber:e})=>sa({url:"customers/balance/transactions",PageNumber:e}),O2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},j2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await g.request({url:r,method:"get",withToken:!1})},B2=async e=>{const t=g.useApiStore.getState().apiUrls,n=e.map(i=>["names",i]),r=new URLSearchParams(n),u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await g.request({url:a,method:"get",withToken:!1})},Au=new Map,al=async e=>{const t=g.useApiStore.getState().apiUrls,r=Array.from(new Set(e)).sort().map(l=>["names",l]),u=new URLSearchParams(r),a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${t.slApi}/v2/checkout?shopDomain=${a}&${u.toString()}`,o=`${i}`;if(Au.has(o))return Au.get(o);const c=g.request({url:i,method:"get",withToken:!1}).catch(l=>{throw Au.delete(o),l});return Au.set(o,c),c},sl=async({email:e,recaptcha:t,tsId:n})=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await g.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},il=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=g.useApiStore.getState().apiUrls,a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await g.request({url:i,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return g.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},ys=async()=>{g.useStorefrontStore.getState().setToken(""),g.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},F2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:il,logoutCustomer:ys,requestOtp:sl},Symbol.toStringTag,{value:"Module"})),H2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await g.request({url:r,method:"post",body:e,withToken:!1})},U2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await g.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},V2=async()=>{const{data:e}=await h2();return e},$2=async e=>{const{data:t}=await U2(e);return t},z2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},q2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await g.request({url:r,method:"get",withToken:!1})};async function Z2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return g.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const W2=async(e,t,n,r)=>{const a=`${g.useApiStore.getState().apiUrls.slApi}/v1/vouches/${t}/${n}/${r}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},ol=()=>g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,Y2=async()=>{const e=g.useApiStore.getState().apiUrls,t=ol(),n=`${e.customersApi}/v2/${t}/api-key`;return g.request({url:n,method:"get",withToken:!0,typeToken:"customer"})},G2=async()=>{const e=g.useApiStore.getState().apiUrls,t=ol(),n=`${e.customersApi}/v2/${t}/api-key/regenerate`;return g.request({url:n,method:"post",withToken:!0,typeToken:"customer"})},X2=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,cl=({children:e,className:t,as:n="span",...r})=>{const[u,a]=P.useState(!1);return P.useEffect(()=>{typeof window<"u"&&a(X2())},[]),u?s.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):s.jsx(n,{className:t,...r,children:e})},K2="_statItem_fzeec_1",Q2="_content_fzeec_44",J2="_withChildren_fzeec_50",ef="_info_fzeec_56",tf="_iconWrapper_fzeec_68",nf="_text_fzeec_78",rf="_title_fzeec_84",uf="_value_fzeec_88",af="_emptyImage_fzeec_94",sf="_image_fzeec_11",of="_imageTitle_fzeec_112",cf="_emptyImageText_fzeec_122",lf="_hoverable_fzeec_147",ut={statItem:K2,content:Q2,withChildren:J2,info:ef,iconWrapper:tf,text:nf,title:rf,value:uf,emptyImage:af,image:sf,imageTitle:of,emptyImageText:cf,hoverable:lf},wt=({iconName:e,title:t,value:n,image:r,imageName:u,children:a,className:i,logo:o,customLogo:c,productSlug:l})=>{const h=g.useNavigate();return s.jsxs("div",{className:`${ut.statItem} ${i}`,children:[r&&r!=="empty"&&s.jsxs("div",{style:{position:"relative"},onClick:()=>{l&&h(`/${l}`)},children:[s.jsx("div",{style:{background:"#000000"},children:s.jsx("img",{src:r,alt:u,className:g.clx(ut.image,ut.emptyImage,{[ut.hoverable]:l})})}),s.jsx("div",{className:ut.emptyImageText,children:s.jsx("div",{className:g.clx(ut.title,ut.imageTitle),id:"h5",children:u})})]}),r==="empty"&&s.jsx("div",{style:{background:"#000000"},children:s.jsxs("div",{className:g.clx(ut.emptyImage,{[ut.hoverable]:l}),onClick:()=>{l&&h(`/${l}`)},children:[s.jsx(v.Icon,{name:"Image",width:64,height:64,fill:"var(--text-secondary)"}),s.jsx("div",{className:ut.emptyImageText,children:s.jsx("div",{className:ut.title,id:"h5",children:u||"No Product"})})]})}),s.jsxs("div",{className:`${ut.content} ${a?ut.withChildren:""}`,children:[s.jsxs("div",{className:ut.info,children:[c?s.jsx("div",{style:{color:"var(--text-action)"},children:c}):o?s.jsx("div",{className:ut.iconWrapper,children:s.jsx("img",{src:o,width:28,height:28,style:{objectFit:"contain"}})}):s.jsx(v.Icon,{name:e||"File",className:ut.iconWrapper,width:28,height:28,fill:"var(--text-action)"}),s.jsxs("div",{className:ut.text,children:[s.jsx("div",{className:ut.title,id:"h5",children:t}),s.jsx("div",{className:ut.value,id:"h5-bold",children:n})]})]}),a]})]})},df="_card_8m277_2",ff="_mobile_8m277_15",hf="_email_8m277_19",pf="_balance_8m277_25",mf="_sidebar_8m277_32",gf="_sidebarAntistock_8m277_33",bf="_navList_8m277_68",_f="_navListAntistock_8m277_86",xf="_navItem_8m277_91",Cf="_antistockNavItem_8m277_92",Ef="_activeNavItem_8m277_116",yf="_antistockActiveNavItem_8m277_121",Tf="_antistockInactiveNavItem_8m277_139",kf="_inactiveNavItem_8m277_140",Af="_logoutNavItem_8m277_150",Sf="_logoutNavItemAntistock_8m277_159",If="_logoutNavItemContentAntistock_8m277_173",vf="_iconWrapper_8m277_185",Nf="_skeleton_8m277_190",Ze={card:df,mobile:ff,email:hf,balance:pf,sidebar:mf,sidebarAntistock:gf,navList:bf,navListAntistock:_f,navItem:xf,antistockNavItem:Cf,activeNavItem:Ef,antistockActiveNavItem:yf,antistockInactiveNavItem:Tf,inactiveNavItem:kf,logoutNavItem:Af,logoutNavItemAntistock:Sf,logoutNavItemContentAntistock:If,iconWrapper:vf,skeleton:Nf},wf=({email:e,balance:t,adaptiveStyles:n})=>s.jsxs("div",{className:g.clx(Ze.card,{[Ze.mobile]:n!=="desktop"}),children:[s.jsx("div",{className:Ze.email,id:"h5",children:e}),s.jsxs("div",{className:Ze.balance,id:"md",children:["Balance: ",t]})]}),Df=()=>typeof g.Routes>"u"||!g.Routes.Home?(console.warn("Routes not available"),[]):[[g.Routes.Home,"House"],[g.Routes.Orders,"CurrencyCircleDollar"],[g.Routes.Rewards,"Medal"],[g.Routes.Balance,"Wallet"],[g.Routes.Subscriptions,"CalendarCheck"],[g.Routes.Tickets,"Question"],[g.Routes.Api,"Code"]],Lf=()=>typeof g.AntistockRoutes>"u"||!g.AntistockRoutes.Home?(console.warn("AntistockRoutes not available"),[]):[[g.AntistockRoutes.Home,"House"],[g.AntistockRoutes.Orders,"CurrencyCircleDollar"],[g.AntistockRoutes.Rewards,"Medal"],[g.AntistockRoutes.Balance,"Wallet"],[g.AntistockRoutes.Tickets,"Question"],[g.AntistockRoutes.Api,"Code"]],qi=({children:e,className:t="",onClick:n})=>{const{isAntistock:r}=g.useGeneralStore();return s.jsx("button",{type:"button",className:g.clx(r?Ze.antistockNavItem:Ze.navItem,t),onClick:n,children:e})},Pf=({adaptiveStyles:e})=>{const{route:t,setRoute:n,dashboardSettings:r}=g.useCustomerDashboardStore(),{resetPage:u}=g.usePaginationPagesStore(),{isAntistock:a}=g.useGeneralStore(),i=P.useMemo(()=>{if(a){const l=Lf();return r!=null&&r.isApiPageEnabled?l:l.filter(([h])=>h!==g.AntistockRoutes.Api)}const c=Df();return r!=null&&r.isApiPageEnabled?c:c.filter(([l])=>l!==g.Routes.Api)},[a,r]),o=c=>{t!==c&&u(),n(c)};return s.jsxs("div",{className:g.clx(Ze.navList,{[Ze.mobile]:e!=="desktop",[Ze.navListAntistock]:a}),children:[i.map(([c,l])=>{const h=c===t;return s.jsxs(qi,{onClick:()=>o(c),className:g.clx(h?a?Ze.antistockActiveNavItem:Ze.activeNavItem:a?Ze.antistockInactiveNavItem:Ze.inactiveNavItem),children:[a?null:s.jsx("div",{className:Ze.iconWrapper,children:s.jsx(v.Icon,{name:l})}),s.jsx("div",{children:c})]},c)}),s.jsx(qi,{className:g.clx(Ze.logoutNavItem,{[Ze.logoutNavItemAntistock]:a}),onClick:()=>{a||ys()},children:a?s.jsxs("div",{className:g.clx({[Ze.logoutNavItemContentAntistock]:a}),onClick:()=>{ys()},children:[s.jsx("div",{className:Ze.iconWrapper,children:s.jsx(v.Icon,{name:"SignOut"})}),s.jsx("div",{children:"Sign Out"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Ze.iconWrapper,children:s.jsx(v.Icon,{name:"SignOut"})}),s.jsx("div",{children:"Sign Out"})]})})]})};var Ce=(e=>(e.New="NEW",e.Pending="PENDING",e.Processing="PROCESSING",e.Completed="COMPLETED",e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.FullDeliveryFailure="FULL_DELIVERY_FAILURE",e.PartiallyDelivered="PARTIALLY_DELIVERED",e.PartiallyRefunded="PARTIALLY_REFUNDED",e.Refunded="REFUNDED",e.Failed="FAILED",e))(Ce||{}),ge=(e=>(e.PENDING="PENDING",e.APPROVED="APPROVED",e.DECLINED="DECLINED",e.AUTO_APPROVED="AUTO_APPROVED",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.PROCESSING="PROCESSING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e))(ge||{}),Re=(e=>(e.Text="TEXT",e.Serial="SERIALS",e.Ebook="EBOOK",e.Link="LINK",e.Download="DOWNLOAD",e.Discord="DISCORD",e.Telegram="TELEGRAM",e.Custom="CUSTOM",e))(Re||{}),kn=(e=>(e.RIAL="RIAL",e.AWAITING_PAYMENT="AWAITING_PAYMENT",e.ACTIVE="ACTIVE",e.PAST_DUE="PAST_DUE",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.CHANGED_GATEWAY="CHANGED_GATEWAY",e.REPLACED="REPLACED",e))(kn||{});const fu=async e=>(await B2(e)).data,ll=async()=>{var n;const t=(await f2()).data;if(t.isEnabled){const r=(n=t==null?void 0:t.topUpSettings)==null?void 0:n.gateways;r&&fu(r)}return t},oa=async()=>{const t=(await d2()).data;return{amount:t.realBalance+t.manualBalance,currency:t.currency}};var qr=(e=>(e.ADDED="ADDED",e.REMOVED="REMOVED",e))(qr||{}),he=(e=>(e.New="NEW",e.NotPaid="NOT_PAID",e.Pending="PENDING",e.Paid="PAID",e.Expired="EXPIRED",e.Cancelled="CANCELLED",e.Refunded="REFUNDED",e.Underpaid="UNDERPAID",e))(he||{}),ru=(e=>(e.Balance="BALANCE",e.Product="PRODUCT",e))(ru||{}),xt=(e=>(e.Spend="SPEND_AMOUNT",e.Order="ORDER_COUNT",e.Referral="REFER_FRIEND",e.Review="LEAVE_REVIEW",e.Vouch="LEAVE_VOUCH",e))(xt||{});const Rf=async()=>(await l2()).data;/*! *****************************************************************************
1
+ "use strict";const g=require("./builder-Dy7RSMJ7.cjs"),s=require("react/jsx-runtime"),P=require("react"),v=require("./ui-components-CmbdJIOh.cjs"),tl=require("./builder-components-C-sRGuDw.cjs");require("react-dom");const nl=require("./ticket-DbTulR68.cjs"),rl=require("./order-D9bZsw6j.cjs"),r2=require("./subscription-HzlEomWK.cjs");function u2(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _e=u2(P);async function a2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await g.request({method:"get",url:r,withToken:!1})).data}const s2=async()=>{const e=g.useApiStore.getState().apiUrls,t=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await g.request({url:n,withToken:!0,method:"get"})},i2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},o2=async(e,t)=>{const r=`${g.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await g.request({url:r,method:"post",body:e,withToken:!1})},vr=async e=>{const t=g.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},c2=()=>vr("dash/info"),ul=()=>vr("dash/dashboard/home"),l2=()=>vr("rewards"),d2=()=>vr("balance"),f2=()=>vr("balance/top-up/settings"),h2=()=>vr("referral-system"),Gs=e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return g.request({url:r,withToken:!1,method:"get"})},p2=()=>Gs("terms"),m2=()=>Gs("refund-policy"),g2=()=>Gs("privacy-policy"),Yu=10,sa=async({url:e,PageNumber:t})=>{var o;const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${Yu}`,a=await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),i=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:i}},ia=async(e,t="get",n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await g.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},b2=e=>ia("","post",e),_2=({PageNumber:e})=>sa({url:"customers/orders",PageNumber:e}),x2=e=>ia(e),C2=e=>ia(e),E2=(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v2/orders/${u}/${e}/${t}/replacement-requests`;return g.request({url:a,method:"post",withToken:!0,body:n,typeToken:"customer"})},y2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/public/${n}/images`,u=new FormData;return u.append("file",e),g.request({url:r,method:"post",withToken:!1,body:u})},T2=(e,t,n)=>ia(`${e}/${t}/replacement-requests/${n}/cancel`,"post"),k2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await g.request({url:r,method:"post",withToken:!1,body:e})},A2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},S2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await g.request({url:u,method:"get",withToken:!1})},I2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await g.request({url:a,method:"post",withToken:!1,body:n})},v2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await g.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},N2=({PageNumber:e})=>sa({url:"customers/subscriptions",PageNumber:e}),w2=async({id:e,accessToken:t})=>await S2(e,t),D2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await g.request({url:u,method:"post",withToken:!1,body:t})},L2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},P2=async(e,t,n,r,u,a)=>{const i=g.useApiStore.getState().apiUrls,o=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,c=`${i.slApi}/v1/public/${o}/tickets/${e}/${t}/answer`;return(await g.request({url:c,method:"post",body:{message:n,recaptcha:r,tsId:u,...a&&a.length>0&&{imageIds:a.map(h=>h.imageId)}},withToken:!1})).data},R2=({PageNumber:e})=>sa({url:"customers/tickets",PageNumber:e}),M2=({PageNumber:e})=>sa({url:"customers/balance/transactions",PageNumber:e}),O2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},j2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await g.request({url:r,method:"get",withToken:!1})},B2=async e=>{const t=g.useApiStore.getState().apiUrls,n=e.map(i=>["names",i]),r=new URLSearchParams(n),u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await g.request({url:a,method:"get",withToken:!1})},Au=new Map,al=async e=>{const t=g.useApiStore.getState().apiUrls,r=Array.from(new Set(e)).sort().map(l=>["names",l]),u=new URLSearchParams(r),a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${t.slApi}/v2/checkout?shopDomain=${a}&${u.toString()}`,o=`${i}`;if(Au.has(o))return Au.get(o);const c=g.request({url:i,method:"get",withToken:!1}).catch(l=>{throw Au.delete(o),l});return Au.set(o,c),c},sl=async({email:e,recaptcha:t,tsId:n})=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await g.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},il=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=g.useApiStore.getState().apiUrls,a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await g.request({url:i,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return g.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},ys=async()=>{g.useStorefrontStore.getState().setToken(""),g.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},F2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:il,logoutCustomer:ys,requestOtp:sl},Symbol.toStringTag,{value:"Module"})),H2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await g.request({url:r,method:"post",body:e,withToken:!1})},U2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await g.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},V2=async()=>{const{data:e}=await h2();return e},$2=async e=>{const{data:t}=await U2(e);return t},z2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},q2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await g.request({url:r,method:"get",withToken:!1})};async function Z2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return g.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const W2=async(e,t,n,r)=>{const a=`${g.useApiStore.getState().apiUrls.slApi}/v1/vouches/${t}/${n}/${r}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},ol=()=>g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,Y2=async()=>{const e=g.useApiStore.getState().apiUrls,t=ol(),n=`${e.customersApi}/v2/${t}/api-key`;return g.request({url:n,method:"get",withToken:!0,typeToken:"customer"})},G2=async()=>{const e=g.useApiStore.getState().apiUrls,t=ol(),n=`${e.customersApi}/v2/${t}/api-key/regenerate`;return g.request({url:n,method:"post",withToken:!0,typeToken:"customer"})},X2=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,cl=({children:e,className:t,as:n="span",...r})=>{const[u,a]=P.useState(!1);return P.useEffect(()=>{typeof window<"u"&&a(X2())},[]),u?s.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):s.jsx(n,{className:t,...r,children:e})},K2="_statItem_fzeec_1",Q2="_content_fzeec_44",J2="_withChildren_fzeec_50",ef="_info_fzeec_56",tf="_iconWrapper_fzeec_68",nf="_text_fzeec_78",rf="_title_fzeec_84",uf="_value_fzeec_88",af="_emptyImage_fzeec_94",sf="_image_fzeec_11",of="_imageTitle_fzeec_112",cf="_emptyImageText_fzeec_122",lf="_hoverable_fzeec_147",ut={statItem:K2,content:Q2,withChildren:J2,info:ef,iconWrapper:tf,text:nf,title:rf,value:uf,emptyImage:af,image:sf,imageTitle:of,emptyImageText:cf,hoverable:lf},wt=({iconName:e,title:t,value:n,image:r,imageName:u,children:a,className:i,logo:o,customLogo:c,productSlug:l})=>{const h=g.useNavigate();return s.jsxs("div",{className:`${ut.statItem} ${i}`,children:[r&&r!=="empty"&&s.jsxs("div",{style:{position:"relative"},onClick:()=>{l&&h(`/${l}`)},children:[s.jsx("div",{style:{background:"#000000"},children:s.jsx("img",{src:r,alt:u,className:g.clx(ut.image,ut.emptyImage,{[ut.hoverable]:l})})}),s.jsx("div",{className:ut.emptyImageText,children:s.jsx("div",{className:g.clx(ut.title,ut.imageTitle),id:"h5",children:u})})]}),r==="empty"&&s.jsx("div",{style:{background:"#000000"},children:s.jsxs("div",{className:g.clx(ut.emptyImage,{[ut.hoverable]:l}),onClick:()=>{l&&h(`/${l}`)},children:[s.jsx(v.Icon,{name:"Image",width:64,height:64,fill:"var(--text-secondary)"}),s.jsx("div",{className:ut.emptyImageText,children:s.jsx("div",{className:ut.title,id:"h5",children:u||"No Product"})})]})}),s.jsxs("div",{className:`${ut.content} ${a?ut.withChildren:""}`,children:[s.jsxs("div",{className:ut.info,children:[c?s.jsx("div",{style:{color:"var(--text-action)"},children:c}):o?s.jsx("div",{className:ut.iconWrapper,children:s.jsx("img",{src:o,width:28,height:28,style:{objectFit:"contain"}})}):s.jsx(v.Icon,{name:e||"File",className:ut.iconWrapper,width:28,height:28,fill:"var(--text-action)"}),s.jsxs("div",{className:ut.text,children:[s.jsx("div",{className:ut.title,id:"h5",children:t}),s.jsx("div",{className:ut.value,id:"h5-bold",children:n})]})]}),a]})]})},df="_card_8m277_2",ff="_mobile_8m277_15",hf="_email_8m277_19",pf="_balance_8m277_25",mf="_sidebar_8m277_32",gf="_sidebarAntistock_8m277_33",bf="_navList_8m277_68",_f="_navListAntistock_8m277_86",xf="_navItem_8m277_91",Cf="_antistockNavItem_8m277_92",Ef="_activeNavItem_8m277_116",yf="_antistockActiveNavItem_8m277_121",Tf="_antistockInactiveNavItem_8m277_139",kf="_inactiveNavItem_8m277_140",Af="_logoutNavItem_8m277_150",Sf="_logoutNavItemAntistock_8m277_159",If="_logoutNavItemContentAntistock_8m277_173",vf="_iconWrapper_8m277_185",Nf="_skeleton_8m277_190",Ze={card:df,mobile:ff,email:hf,balance:pf,sidebar:mf,sidebarAntistock:gf,navList:bf,navListAntistock:_f,navItem:xf,antistockNavItem:Cf,activeNavItem:Ef,antistockActiveNavItem:yf,antistockInactiveNavItem:Tf,inactiveNavItem:kf,logoutNavItem:Af,logoutNavItemAntistock:Sf,logoutNavItemContentAntistock:If,iconWrapper:vf,skeleton:Nf},wf=({email:e,balance:t,adaptiveStyles:n})=>s.jsxs("div",{className:g.clx(Ze.card,{[Ze.mobile]:n!=="desktop"}),children:[s.jsx("div",{className:Ze.email,id:"h5",children:e}),s.jsxs("div",{className:Ze.balance,id:"md",children:["Balance: ",t]})]}),Df=()=>typeof g.Routes>"u"||!g.Routes.Home?(console.warn("Routes not available"),[]):[[g.Routes.Home,"House"],[g.Routes.Orders,"CurrencyCircleDollar"],[g.Routes.Rewards,"Medal"],[g.Routes.Balance,"Wallet"],[g.Routes.Subscriptions,"CalendarCheck"],[g.Routes.Tickets,"Question"],[g.Routes.Api,"Code"]],Lf=()=>typeof g.AntistockRoutes>"u"||!g.AntistockRoutes.Home?(console.warn("AntistockRoutes not available"),[]):[[g.AntistockRoutes.Home,"House"],[g.AntistockRoutes.Orders,"CurrencyCircleDollar"],[g.AntistockRoutes.Rewards,"Medal"],[g.AntistockRoutes.Balance,"Wallet"],[g.AntistockRoutes.Tickets,"Question"],[g.AntistockRoutes.Api,"Code"]],qi=({children:e,className:t="",onClick:n})=>{const{isAntistock:r}=g.useGeneralStore();return s.jsx("button",{type:"button",className:g.clx(r?Ze.antistockNavItem:Ze.navItem,t),onClick:n,children:e})},Pf=({adaptiveStyles:e})=>{const{route:t,setRoute:n,dashboardSettings:r}=g.useCustomerDashboardStore(),{resetPage:u}=g.usePaginationPagesStore(),{isAntistock:a}=g.useGeneralStore(),i=P.useMemo(()=>{if(a){const l=Lf();return r!=null&&r.isApiPageEnabled?l:l.filter(([h])=>h!==g.AntistockRoutes.Api)}const c=Df();return r!=null&&r.isApiPageEnabled?c:c.filter(([l])=>l!==g.Routes.Api)},[a,r]),o=c=>{t!==c&&u(),n(c)};return s.jsxs("div",{className:g.clx(Ze.navList,{[Ze.mobile]:e!=="desktop",[Ze.navListAntistock]:a}),children:[i.map(([c,l])=>{const h=c===t;return s.jsxs(qi,{onClick:()=>o(c),className:g.clx(h?a?Ze.antistockActiveNavItem:Ze.activeNavItem:a?Ze.antistockInactiveNavItem:Ze.inactiveNavItem),children:[a?null:s.jsx("div",{className:Ze.iconWrapper,children:s.jsx(v.Icon,{name:l})}),s.jsx("div",{children:c})]},c)}),s.jsx(qi,{className:g.clx(Ze.logoutNavItem,{[Ze.logoutNavItemAntistock]:a}),onClick:()=>{a||ys()},children:a?s.jsxs("div",{className:g.clx({[Ze.logoutNavItemContentAntistock]:a}),onClick:()=>{ys()},children:[s.jsx("div",{className:Ze.iconWrapper,children:s.jsx(v.Icon,{name:"SignOut"})}),s.jsx("div",{children:"Sign Out"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Ze.iconWrapper,children:s.jsx(v.Icon,{name:"SignOut"})}),s.jsx("div",{children:"Sign Out"})]})})]})};var Ce=(e=>(e.New="NEW",e.Pending="PENDING",e.Processing="PROCESSING",e.Completed="COMPLETED",e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.FullDeliveryFailure="FULL_DELIVERY_FAILURE",e.PartiallyDelivered="PARTIALLY_DELIVERED",e.PartiallyRefunded="PARTIALLY_REFUNDED",e.Refunded="REFUNDED",e.Failed="FAILED",e))(Ce||{}),ge=(e=>(e.PENDING="PENDING",e.APPROVED="APPROVED",e.DECLINED="DECLINED",e.AUTO_APPROVED="AUTO_APPROVED",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.PROCESSING="PROCESSING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e))(ge||{}),Re=(e=>(e.Text="TEXT",e.Serial="SERIALS",e.Ebook="EBOOK",e.Link="LINK",e.Download="DOWNLOAD",e.Discord="DISCORD",e.Telegram="TELEGRAM",e.Custom="CUSTOM",e))(Re||{}),kn=(e=>(e.RIAL="RIAL",e.AWAITING_PAYMENT="AWAITING_PAYMENT",e.ACTIVE="ACTIVE",e.PAST_DUE="PAST_DUE",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.CHANGED_GATEWAY="CHANGED_GATEWAY",e.REPLACED="REPLACED",e))(kn||{});const fu=async e=>(await B2(e)).data,ll=async()=>{var n;const t=(await f2()).data;if(t.isEnabled){const r=(n=t==null?void 0:t.topUpSettings)==null?void 0:n.gateways;r&&fu(r)}return t},oa=async()=>{const t=(await d2()).data;return{amount:t.realBalance+t.manualBalance,currency:t.currency}};var qr=(e=>(e.ADDED="ADDED",e.REMOVED="REMOVED",e))(qr||{}),he=(e=>(e.New="NEW",e.NotPaid="NOT_PAID",e.Pending="PENDING",e.Paid="PAID",e.Expired="EXPIRED",e.Cancelled="CANCELLED",e.Refunded="REFUNDED",e.Underpaid="UNDERPAID",e))(he||{}),ru=(e=>(e.Balance="BALANCE",e.Product="PRODUCT",e))(ru||{}),xt=(e=>(e.Spend="SPEND_AMOUNT",e.Order="ORDER_COUNT",e.Referral="REFER_FRIEND",e.Review="LEAVE_REVIEW",e.Vouch="LEAVE_VOUCH",e))(xt||{});const Rf=async()=>(await l2()).data;/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -1,13 +1,13 @@
1
- import { j as He, K as Ye, r as Ue, M as qt, N as Zt, p as hn, f as ee, O as La, y as Re, Q as Pt, U as dt, V as $e, W as br, e as vt, J as Je, X as kt, v as we, b as A2, u as I2, a as ys, Y as S2, Z as _n, _ as Ts, $ as ks, a0 as N2, a1 as v2, a2 as vu, a3 as Wi, a4 as w2, a5 as Io, a6 as Ol, a7 as xs, a8 as Pa, a9 as D2 } from "./builder-DbBnEh3U.js";
1
+ import { j as He, K as Ye, r as Ue, M as qt, N as Zt, p as hn, f as ee, O as La, y as Re, Q as Pt, U as dt, V as $e, W as br, e as vt, J as Je, X as kt, v as we, b as A2, u as I2, a as ys, Y as S2, Z as _n, _ as Ts, $ as ks, a0 as N2, a1 as v2, a2 as vu, a3 as Wi, a4 as w2, a5 as Io, a6 as Ol, a7 as xs, a8 as Pa, a9 as D2 } from "./builder-CNebwPFm.js";
2
2
  import { jsx as o, jsxs as b, Fragment as ze } from "react/jsx-runtime";
3
3
  import * as Ee from "react";
4
4
  import $, { createElement as lt, isValidElement as L2, useEffect as yn, forwardRef as Fl, Component as P2, useState as Te, useRef as er, useMemo as Qn } from "react";
5
- import { I as B, e as Ct, f as Tn, g as te, h as Ea, M as Bt, W as R2, i as As, j as Bl, k as Hl, l as Hu, m as ma, R as M2 } from "./ui-components-vOXufedG.js";
6
- import { F as Ul } from "./builder-components-BApQHlfu.js";
5
+ import { I as B, e as Ct, f as Tn, g as te, h as Ea, M as Bt, W as R2, i as As, j as Bl, k as Hl, l as Hu, m as ma, R as M2 } from "./ui-components-C0algo6I.js";
6
+ import { F as Ul } from "./builder-components-CvwDC4WU.js";
7
7
  import "react-dom";
8
- import { T as Vl } from "./ticket-Bo8KyxXg.js";
9
- import { O as $l } from "./order-DA6bx3MX.js";
10
- import { S as O2 } from "./subscription-Gua672Jm.js";
8
+ import { T as Vl } from "./ticket-Bokxlwru.js";
9
+ import { O as $l } from "./order-FDCc_xoh.js";
10
+ import { S as O2 } from "./subscription-BCxznt8S.js";
11
11
  async function SR(e) {
12
12
  const t = He.getState().apiUrls, n = Ye ? localStorage.getItem("fakeDomain") : window.location.hostname, r = `${t.storeApi}/shops/${n}/general` + (e ? `?password=${e}` : "");
13
13
  return (await Ue({
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as j } from "react/jsx-runtime";
2
- import { u as D, C as N, a as x } from "./charge-CEnroh9b.js";
3
- import { y as A, p as G } from "./builder-DbBnEh3U.js";
2
+ import { u as D, C as N, a as x } from "./charge-Bz7t9N9W.js";
3
+ import { y as A, p as G } from "./builder-CNebwPFm.js";
4
4
  import c from "react";
5
- import { e as P } from "./ui-components-vOXufedG.js";
6
- import "./builder-components-BApQHlfu.js";
5
+ import { e as P } from "./ui-components-C0algo6I.js";
6
+ import "./builder-components-CvwDC4WU.js";
7
7
  import "react-dom";
8
- import "./ticket-Bo8KyxXg.js";
8
+ import "./ticket-Bokxlwru.js";
9
9
  const S = "_checkoutContainer_thje1_1", b = "_loaderContainer_thje1_20", s = {
10
10
  checkoutContainer: S,
11
11
  loaderContainer: b
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-DQqXA24M.cjs"),u=require("./builder-FlfTMOiQ.cjs"),l=require("react"),_=require("./ui-components-BAslp_hx.cjs");require("./builder-components-C6nG2kYo.cjs");require("react-dom");require("./ticket-CjHl2fUT.cjs");const b="_checkoutContainer_thje1_1",S="_loaderContainer_thje1_20",s={checkoutContainer:b,loaderContainer:S},D=()=>{const{isAntistock:r}=u.useGeneralStore(),{cart:t,products:c,pending:d,getTotalAndDiscount:C,getPossibleGateways:h,submitCart:p,setGateway:m,applyCoupon:g,setDiscordSocialConnectId:j,setCustomFields:k,applyCouponPending:y,coupon:i,removeCoupon:q,getDiscordSettings:v,setPaymentMethod:x,reset:f}=n.useCart(),a=l.useMemo(()=>C(),[i,t]),o=u.useNavigate();return l.useEffect(()=>{if(t.parts.length===0){if(r){o("/");return}try{o(-1)}catch{o("/")}}},[t.parts]),d?e.jsx("div",{className:s.checkoutContainer,children:e.jsx("div",{className:s.loaderContainer,children:e.jsx(_.Loader,{})})}):e.jsxs("div",{className:s.checkoutContainer,children:[e.jsx(n.CheckoutItems,{cart:t,products:c,applyCoupon:g,applyCouponPending:y,coupon:i,removeCoupon:q,totalAndDiscount:a}),e.jsx(n.CheckoutOperational,{cart:t,getPossibleGateways:h,setGateway:m,getDiscordSettings:v,products:c,submitCart:p,totalAndDiscount:a,setCustomFieldsToCart:k,setDiscordSocialConnectId:j,setPaymentMethod:x,reset:f,isAntistock:r})]})};exports.Checkout=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-BaFC9CGT.cjs"),u=require("./builder-Dy7RSMJ7.cjs"),l=require("react"),_=require("./ui-components-CmbdJIOh.cjs");require("./builder-components-C-sRGuDw.cjs");require("react-dom");require("./ticket-DbTulR68.cjs");const b="_checkoutContainer_thje1_1",S="_loaderContainer_thje1_20",s={checkoutContainer:b,loaderContainer:S},D=()=>{const{isAntistock:r}=u.useGeneralStore(),{cart:t,products:c,pending:d,getTotalAndDiscount:C,getPossibleGateways:h,submitCart:p,setGateway:m,applyCoupon:g,setDiscordSocialConnectId:j,setCustomFields:k,applyCouponPending:y,coupon:i,removeCoupon:q,getDiscordSettings:v,setPaymentMethod:x,reset:f}=n.useCart(),a=l.useMemo(()=>C(),[i,t]),o=u.useNavigate();return l.useEffect(()=>{if(t.parts.length===0){if(r){o("/");return}try{o(-1)}catch{o("/")}}},[t.parts]),d?e.jsx("div",{className:s.checkoutContainer,children:e.jsx("div",{className:s.loaderContainer,children:e.jsx(_.Loader,{})})}):e.jsxs("div",{className:s.checkoutContainer,children:[e.jsx(n.CheckoutItems,{cart:t,products:c,applyCoupon:g,applyCouponPending:y,coupon:i,removeCoupon:q,totalAndDiscount:a}),e.jsx(n.CheckoutOperational,{cart:t,getPossibleGateways:h,setGateway:m,getDiscordSettings:v,products:c,submitCart:p,totalAndDiscount:a,setCustomFieldsToCart:k,setDiscordSocialConnectId:j,setPaymentMethod:x,reset:f,isAntistock:r})]})};exports.Checkout=D;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-FlfTMOiQ.cjs"),a=require("./ui-components-BAslp_hx.cjs"),t=require("./charge-DQqXA24M.cjs");require("./builder-components-C6nG2kYo.cjs");const e=require("./ticket-CjHl2fUT.cjs"),r=require("./checkout-CKWBwYzA.cjs");require("react-dom");exports.AntistockRoutes=o.AntistockRoutes;exports.Routes=o.Routes;exports.formatPrice=o.formatPrice;exports.ImagesLoader=a.ImagesLoader;exports.MarkdownText=t.MarkdownText;exports.ReCaptchaProvider=t.ReCaptchaProvider;exports.parseDraftJsText=t.parseDraftJsText;exports.useCart=t.useCart;exports.useGeneralInfo=t.useGeneralInfo;exports.useMarkdownIt=t.useMarkdownIt;exports.useReCaptcha=t.useReCaptcha;exports.ColorVariables=e.ColorVariables;exports.aspectRatioOptions=e.aspectRatioOptions;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.splitTextIntoSpans=e.splitTextIntoSpans;exports.useAdaptiveStyles=e.useAdaptiveStyles;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.Checkout=r.Checkout;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-Dy7RSMJ7.cjs"),a=require("./ui-components-CmbdJIOh.cjs"),t=require("./charge-BaFC9CGT.cjs");require("./builder-components-C-sRGuDw.cjs");const e=require("./ticket-DbTulR68.cjs"),r=require("./checkout-NyApNNAm.cjs");require("react-dom");exports.AntistockRoutes=o.AntistockRoutes;exports.Routes=o.Routes;exports.formatPrice=o.formatPrice;exports.ImagesLoader=a.ImagesLoader;exports.MarkdownText=t.MarkdownText;exports.ReCaptchaProvider=t.ReCaptchaProvider;exports.parseDraftJsText=t.parseDraftJsText;exports.useCart=t.useCart;exports.useGeneralInfo=t.useGeneralInfo;exports.useMarkdownIt=t.useMarkdownIt;exports.useReCaptcha=t.useReCaptcha;exports.ColorVariables=e.ColorVariables;exports.aspectRatioOptions=e.aspectRatioOptions;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.splitTextIntoSpans=e.splitTextIntoSpans;exports.useAdaptiveStyles=e.useAdaptiveStyles;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.Checkout=r.Checkout;
@@ -1,11 +1,11 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { Q as i, U as p, V as u } from "./builder-DbBnEh3U.js";
4
- import { k as c } from "./ui-components-vOXufedG.js";
5
- import { M as f, G as d, J as l, u as x, I as C, K as h, H as k } from "./charge-CEnroh9b.js";
6
- import "./builder-components-BApQHlfu.js";
7
- import { C as I, c as T, h as v, i as w, r as M, d as N, s as P, u as b, e as g, b as A, a as B } from "./ticket-Bo8KyxXg.js";
8
- import { Checkout as J } from "./checkout-DpOpLTYJ.js";
3
+ import { Q as i, U as p, V as u } from "./builder-CNebwPFm.js";
4
+ import { k as c } from "./ui-components-C0algo6I.js";
5
+ import { M as f, G as d, J as l, u as x, I as C, K as h, H as k } from "./charge-Bz7t9N9W.js";
6
+ import "./builder-components-CvwDC4WU.js";
7
+ import { C as I, c as T, h as v, i as w, r as M, d as N, s as P, u as b, e as g, b as A, a as B } from "./ticket-Bokxlwru.js";
8
+ import { Checkout as J } from "./checkout-DAO9n_bN.js";
9
9
  import "react-dom";
10
10
  export {
11
11
  i as AntistockRoutes,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./builder-FlfTMOiQ.cjs"),n=require("./charge-DQqXA24M.cjs"),l="_wrapper_x27n6_1",m="_content_x27n6_10",x="_title_x27n6_18",d="_text_x27n6_24",p="_empty_x27n6_42",r={wrapper:l,content:m,title:x,text:d,empty:p},_=()=>{const{shopTerms:t}=c.useStorefrontStore(),{isAntistock:o}=c.useGeneralStore(),a=!!(t!=null&&t.termsOfService&&t.termsOfService.length>0);return e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Terms of Service"}),a?o?e.jsx("div",{className:r.text,children:e.jsx(n.MarkdownText,{text:t.termsOfService})}):e.jsx(n.Markdown,{remarkPlugins:[n.remarkGfm],rehypePlugins:[n.rehypeRaw],className:r.text,components:{a:({node:i,...s})=>e.jsx("a",{...s,target:"_blank",rel:"noopener noreferrer",id:"md"}),p:({node:i,...s})=>e.jsx("p",{...s,id:"md"})},children:t==null?void 0:t.termsOfService}):e.jsx("p",{className:r.empty,children:"No terms of service."})]})})};exports.TermsPage=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./builder-Dy7RSMJ7.cjs"),n=require("./charge-BaFC9CGT.cjs"),l="_wrapper_x27n6_1",m="_content_x27n6_10",x="_title_x27n6_18",d="_text_x27n6_24",p="_empty_x27n6_42",r={wrapper:l,content:m,title:x,text:d,empty:p},_=()=>{const{shopTerms:t}=c.useStorefrontStore(),{isAntistock:o}=c.useGeneralStore(),a=!!(t!=null&&t.termsOfService&&t.termsOfService.length>0);return e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Terms of Service"}),a?o?e.jsx("div",{className:r.text,children:e.jsx(n.MarkdownText,{text:t.termsOfService})}):e.jsx(n.Markdown,{remarkPlugins:[n.remarkGfm],rehypePlugins:[n.rehypeRaw],className:r.text,components:{a:({node:i,...s})=>e.jsx("a",{...s,target:"_blank",rel:"noopener noreferrer",id:"md"}),p:({node:i,...s})=>e.jsx("p",{...s,id:"md"})},children:t==null?void 0:t.termsOfService}):e.jsx("p",{className:r.empty,children:"No terms of service."})]})})};exports.TermsPage=_;
@@ -1,11 +1,11 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import "./builder-DbBnEh3U.js";
2
+ import "./builder-CNebwPFm.js";
3
3
  import e from "react";
4
- import { e as r } from "./ui-components-vOXufedG.js";
5
- import "./charge-CEnroh9b.js";
6
- import "./builder-components-BApQHlfu.js";
4
+ import { e as r } from "./ui-components-C0algo6I.js";
5
+ import "./charge-Bz7t9N9W.js";
6
+ import "./builder-components-CvwDC4WU.js";
7
7
  import "react-dom";
8
- import "./ticket-Bo8KyxXg.js";
8
+ import "./ticket-Bokxlwru.js";
9
9
  const f = () => (e.useEffect(() => {
10
10
  setTimeout(() => {
11
11
  window.location.reload();
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-DQqXA24M.cjs"),t=require("./builder-FlfTMOiQ.cjs"),J=require("./ticket-CjHl2fUT.cjs"),g=require("./ui-components-BAslp_hx.cjs");require("./builder-components-C6nG2kYo.cjs");require("react-dom");const _="_notifications_1ntnm_1",F="_wrapper_1ntnm_12",j={notifications:_,wrapper:F},z=()=>(i.useEffect(()=>{document.title="Temporarily Unavailable"},[]),s.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",overflowY:"scroll",overflowX:"hidden",background:"var(--surface-primary)",color:"var(--text-primary)"},children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1",justifyContent:"center",alignItems:"center",gap:"24px"},children:[s.jsx("h2",{style:{color:"var(--text-primary)",fontSize:"var(--font-heading-h2-size)"},children:"Temporarily Unavailable"}),s.jsx("span",{style:{color:"var(--text-secondary)",fontSize:"var(--font-heading-h3-size)",width:"85%",textAlign:"center"},children:"We're making some quick updates to improve your shopping experience. During this time, browsing and checkout are temporarily unavailable."})]})}));function R(){const c=new URLSearchParams(document.location.search),n=c.get("customerAccessToken"),{setToken:d}=t.useStorefrontStore.getState(),{setDashInfo:u}=t.useCustomerDashboardStore.getState();n&&(c.delete("customerAccessToken"),localStorage.setItem("token",n),d(n),u(null))}const U=({children:c})=>{const n=t.useLocation(),{token:d,setToken:u}=t.useStorefrontStore(),{dashInfo:S,setDashInfo:y}=t.useCustomerDashboardStore(),{shopPassword:f}=t.useStorefrontStore(),v=t.useNavigate(),[l,b]=t.useSearchParams(),{notifications:x}=t.useNotificationStore(),[T,h]=i.useState(!0),{setCustomerEmail:I}=t.useCartStore(),{setThemeSettings:w,themeSettings:N}=t.useThemeSettingsStore(),{settings:C,setSettings:k}=t.useSettingsStore(),{setHeader:D,setFooter:q,setAnnouncement:A}=t.useLayersStore(),{general:o,setGeneral:E,isAntistock:p}=t.useGeneralStore(),{pageContext:L,setPageContext:O}=t.usePagesStore();t.useTrackingAnalytics((o==null?void 0:o.info.id)||localStorage.getItem("shopId")||null,"production",p);const W=async()=>{const e=await J.getDynamicPage(encodeURIComponent("/products"),o==null?void 0:o.info.passwordProtected);if(e){const{data:a}=e;O({...L,listings:a.listings})}};return i.useEffect(()=>{R()},[]),i.useEffect(()=>{const e=localStorage.getItem("token");if(e&&(!d||!S))try{const a=t.jwtDecode(e);y(a),u(e),I(a.email)}catch(a){console.error("Failed to decode token:",a),localStorage.removeItem("token"),u(""),y(null)}},[d,S]),i.useEffect(()=>{const e=l.get("r");e&&(localStorage.setItem("referralCode",e),l.delete("r"),b(l),v({pathname:n.pathname,search:l.toString()},{replace:!0}))},[l,n]),i.useEffect(()=>{!n.pathname.startsWith("/products")&&!n.pathname.startsWith("/admin/builder")&&o&&(o.info.passwordProtected&&f||o.isPasswordValid)&&W()},[o,f]),i.useLayoutEffect(()=>{const e=async()=>{if(h(!0),!o){const r=await P.fetchGeneral(f);if(!r.isPasswordValid&&!n.pathname.includes("/admin/builder")){v("/validation",{state:{from:n.pathname}});return}if(!r.info.passwordProtected){localStorage.removeItem("shopPassword");const{setShopPassword:m}=t.useStorefrontStore.getState();m("")}E(r)}},a=async()=>{h(!0);const{settings:r,theme:m}=(await P.fetchThemeAndSettings()).data;r?(r.settings&&k(r.settings),r.header&&D(JSON.parse(JSON.stringify(r.header))),r.footer&&q(JSON.parse(JSON.stringify(r.footer))),r.announcement&&A(JSON.parse(JSON.stringify(r.announcement)))):k(C),w(m||N),h(!1)};n.pathname.startsWith("/validation")||e(),a()},[]),p&&(o!=null&&o.info.onHold)?s.jsx(z,{}):n.pathname.startsWith("/admin/builder")?s.jsx(s.Fragment,{children:c}):s.jsx(s.Fragment,{children:T?s.jsx("div",{className:j.wrapper,children:s.jsx(g.Loader,{})}):s.jsxs(s.Fragment,{children:[c,x.length>0&&s.jsx("div",{className:j.notifications,children:x.map(e=>s.jsx(g.NotificationBuilder,{type:e.status,message:e.message,timer:e.timer||10,id:e.id,element:p?g.NotificationAntistock:e.component,label:e.label},e.id))})]})})};exports.WrapperPage=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-BaFC9CGT.cjs"),t=require("./builder-Dy7RSMJ7.cjs"),J=require("./ticket-DbTulR68.cjs"),g=require("./ui-components-CmbdJIOh.cjs");require("./builder-components-C-sRGuDw.cjs");require("react-dom");const _="_notifications_1ntnm_1",F="_wrapper_1ntnm_12",j={notifications:_,wrapper:F},z=()=>(i.useEffect(()=>{document.title="Temporarily Unavailable"},[]),s.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",overflowY:"scroll",overflowX:"hidden",background:"var(--surface-primary)",color:"var(--text-primary)"},children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1",justifyContent:"center",alignItems:"center",gap:"24px"},children:[s.jsx("h2",{style:{color:"var(--text-primary)",fontSize:"var(--font-heading-h2-size)"},children:"Temporarily Unavailable"}),s.jsx("span",{style:{color:"var(--text-secondary)",fontSize:"var(--font-heading-h3-size)",width:"85%",textAlign:"center"},children:"We're making some quick updates to improve your shopping experience. During this time, browsing and checkout are temporarily unavailable."})]})}));function R(){const c=new URLSearchParams(document.location.search),n=c.get("customerAccessToken"),{setToken:d}=t.useStorefrontStore.getState(),{setDashInfo:u}=t.useCustomerDashboardStore.getState();n&&(c.delete("customerAccessToken"),localStorage.setItem("token",n),d(n),u(null))}const U=({children:c})=>{const n=t.useLocation(),{token:d,setToken:u}=t.useStorefrontStore(),{dashInfo:S,setDashInfo:y}=t.useCustomerDashboardStore(),{shopPassword:f}=t.useStorefrontStore(),v=t.useNavigate(),[l,b]=t.useSearchParams(),{notifications:x}=t.useNotificationStore(),[T,h]=i.useState(!0),{setCustomerEmail:I}=t.useCartStore(),{setThemeSettings:w,themeSettings:N}=t.useThemeSettingsStore(),{settings:C,setSettings:k}=t.useSettingsStore(),{setHeader:D,setFooter:q,setAnnouncement:A}=t.useLayersStore(),{general:o,setGeneral:E,isAntistock:p}=t.useGeneralStore(),{pageContext:L,setPageContext:O}=t.usePagesStore();t.useTrackingAnalytics((o==null?void 0:o.info.id)||localStorage.getItem("shopId")||null,"production",p);const W=async()=>{const e=await J.getDynamicPage(encodeURIComponent("/products"),o==null?void 0:o.info.passwordProtected);if(e){const{data:a}=e;O({...L,listings:a.listings})}};return i.useEffect(()=>{R()},[]),i.useEffect(()=>{const e=localStorage.getItem("token");if(e&&(!d||!S))try{const a=t.jwtDecode(e);y(a),u(e),I(a.email)}catch(a){console.error("Failed to decode token:",a),localStorage.removeItem("token"),u(""),y(null)}},[d,S]),i.useEffect(()=>{const e=l.get("r");e&&(localStorage.setItem("referralCode",e),l.delete("r"),b(l),v({pathname:n.pathname,search:l.toString()},{replace:!0}))},[l,n]),i.useEffect(()=>{!n.pathname.startsWith("/products")&&!n.pathname.startsWith("/admin/builder")&&o&&(o.info.passwordProtected&&f||o.isPasswordValid)&&W()},[o,f]),i.useLayoutEffect(()=>{const e=async()=>{if(h(!0),!o){const r=await P.fetchGeneral(f);if(!r.isPasswordValid&&!n.pathname.includes("/admin/builder")){v("/validation",{state:{from:n.pathname}});return}if(!r.info.passwordProtected){localStorage.removeItem("shopPassword");const{setShopPassword:m}=t.useStorefrontStore.getState();m("")}E(r)}},a=async()=>{h(!0);const{settings:r,theme:m}=(await P.fetchThemeAndSettings()).data;r?(r.settings&&k(r.settings),r.header&&D(JSON.parse(JSON.stringify(r.header))),r.footer&&q(JSON.parse(JSON.stringify(r.footer))),r.announcement&&A(JSON.parse(JSON.stringify(r.announcement)))):k(C),w(m||N),h(!1)};n.pathname.startsWith("/validation")||e(),a()},[]),p&&(o!=null&&o.info.onHold)?s.jsx(z,{}):n.pathname.startsWith("/admin/builder")?s.jsx(s.Fragment,{children:c}):s.jsx(s.Fragment,{children:T?s.jsx("div",{className:j.wrapper,children:s.jsx(g.Loader,{})}):s.jsxs(s.Fragment,{children:[c,x.length>0&&s.jsx("div",{className:j.notifications,children:x.map(e=>s.jsx(g.NotificationBuilder,{type:e.status,message:e.message,timer:e.timer||10,id:e.id,element:p?g.NotificationAntistock:e.component,label:e.label},e.id))})]})})};exports.WrapperPage=U;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-CmbdJIOh.cjs");require("react");const s=require("./builder-Dy7RSMJ7.cjs");require("./charge-BaFC9CGT.cjs");require("./builder-components-C-sRGuDw.cjs");require("react-dom");require("./ticket-DbTulR68.cjs");const y="_wrapper_1jgrm_1",_="_error_1jgrm_11",w="_title_1jgrm_21",b="_message_1jgrm_29",x="_buttons_1jgrm_35",n={wrapper:y,error:_,title:w,message:b,buttons:x},p=async e=>{const o=localStorage.getItem("shopId")||void 0,r=localStorage.getItem("draftId"),d=`${s.useApiStore.getState().apiUrls.api}/v2/builder/shops/${o}/drafts/${r}/reset`;return await s.request({url:d,withToken:!0,method:"post",body:e})},I=()=>{const{error:e,setError:o}=s.useErrorStore(),{pages:r}=s.usePagesStore(),{setIsOpen:c}=s.useModalStore(),{title:d,description:S,setOnConfirm:u,setTitle:g,setDescription:m}=s.useConfirmationModalStore(),{setBlocks:h}=s.useLayersStore();async function f(){await p({resetSettings:(e==null?void 0:e.failedSettings)??!1,resetThemeSettings:(e==null?void 0:e.failedThemeSettings)??!1,resetPageIds:(e==null?void 0:e.failedPageIds)??[]}),o(null),h({}),window.location.reload()}async function j(){const a=[];r&&Object.keys(r).map(i=>r[i].id).filter(i=>i!==void 0).map(i=>a.push(i)),await p({resetSettings:!0,resetThemeSettings:!0,resetPageIds:a}),o(null)}return t.jsxs("div",{className:n.wrapper,children:[t.jsxs("div",{className:n.error,children:[t.jsxs("div",{children:[t.jsx("div",{className:n.title,children:"Failed to render theme."}),t.jsx("span",{className:n.message,children:(e==null?void 0:e.message)||""})]}),t.jsxs("div",{className:n.buttons,children:[t.jsx(l.ButtonSettings,{type:"Primary",onClick:f,children:"Reset Settings"}),t.jsx(l.ButtonSettings,{type:"Secondary",onClick:a=>{a.stopPropagation(),g("Reset All Settings"),m("Are you sure you want to reset all settings? This is irreversible."),u(async()=>{await j()})},children:"Reset All Settings"})]})]}),d&&S&&t.jsx(l.BuilderModal,{close:()=>{c(!1),setTimeout(()=>{g(null),m(null),u(null),c(!0)},300)},children:t.jsx(l.ConfirmationModal,{})})]})};exports.ErrorPage=I;
@@ -1,10 +1,10 @@
1
1
  import { jsx as o, jsxs as N, Fragment as g } from "react/jsx-runtime";
2
2
  import r from "react";
3
- import { _ as z, a2 as U } from "./charge-CEnroh9b.js";
4
- import { M as f, N as T, ab as F, p as G, a6 as R, e as H, Z as M, m as V, a as q, u as B, y as X, b as Y, am as Z, ag as K } from "./builder-DbBnEh3U.js";
5
- import { g as Q } from "./ticket-Bo8KyxXg.js";
6
- import { e as $, N as ee, x as te } from "./ui-components-vOXufedG.js";
7
- import "./builder-components-BApQHlfu.js";
3
+ import { _ as z, a2 as U } from "./charge-Bz7t9N9W.js";
4
+ import { M as f, N as T, ab as F, p as G, a6 as R, e as H, Z as M, m as V, a as q, u as B, y as X, b as Y, am as Z, ag as K } from "./builder-CNebwPFm.js";
5
+ import { g as Q } from "./ticket-Bokxlwru.js";
6
+ import { e as $, N as ee, x as te } from "./ui-components-C0algo6I.js";
7
+ import "./builder-components-CvwDC4WU.js";
8
8
  import "react-dom";
9
9
  const se = "_notifications_1ntnm_1", ae = "_wrapper_1ntnm_12", P = {
10
10
  notifications: se,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-BAslp_hx.cjs");require("react");const n=require("./builder-FlfTMOiQ.cjs");require("./charge-DQqXA24M.cjs");require("./builder-components-C6nG2kYo.cjs");require("react-dom");require("./ticket-CjHl2fUT.cjs");const s="_wrapper_ej209_1",c="_content_ej209_12",a="_title_ej209_22",r={wrapper:s,content:c,title:a},l=()=>{const o=n.useNavigate(),t=n.useRouteError();return console.error("ROUTE ERROR: ",t),alert(t),e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Something Went Wrong"}),e.jsx(i.Button,{type:"Primary",onClick:()=>{o("/")},children:"Go Home"})]})})};exports.DynamicErrorPage=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-CmbdJIOh.cjs");require("react");const n=require("./builder-Dy7RSMJ7.cjs");require("./charge-BaFC9CGT.cjs");require("./builder-components-C-sRGuDw.cjs");require("react-dom");require("./ticket-DbTulR68.cjs");const s="_wrapper_ej209_1",c="_content_ej209_12",a="_title_ej209_22",r={wrapper:s,content:c,title:a},l=()=>{const o=n.useNavigate(),t=n.useRouteError();return console.error("ROUTE ERROR: ",t),alert(t),e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Something Went Wrong"}),e.jsx(i.Button,{type:"Primary",onClick:()=>{o("/")},children:"Go Home"})]})})};exports.DynamicErrorPage=l;
@@ -1,50 +1,51 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { B as m, a as w, C as _ } from "./ui-components-vOXufedG.js";
2
+ import { B as g, a as y, C as w } from "./ui-components-C0algo6I.js";
3
3
  import "react";
4
- import { j as I, r as b, al as j, b as v, J as P, k as T, u as k } from "./builder-DbBnEh3U.js";
5
- import "./charge-CEnroh9b.js";
6
- import "./builder-components-BApQHlfu.js";
4
+ import { j as I, r as b, al as j, b as v, J as P, k as T, u as k } from "./builder-CNebwPFm.js";
5
+ import "./charge-Bz7t9N9W.js";
6
+ import "./builder-components-CvwDC4WU.js";
7
7
  import "react-dom";
8
- import "./ticket-Bo8KyxXg.js";
9
- const C = "_wrapper_1yd2j_1", A = "_error_1yd2j_11", N = "_title_1yd2j_21", B = "_buttons_1yd2j_29", i = {
8
+ import "./ticket-Bokxlwru.js";
9
+ const C = "_wrapper_1jgrm_1", A = "_error_1jgrm_11", N = "_title_1jgrm_21", B = "_message_1jgrm_29", M = "_buttons_1jgrm_35", a = {
10
10
  wrapper: C,
11
11
  error: A,
12
12
  title: N,
13
- buttons: B
14
- }, g = async (e) => {
15
- const o = localStorage.getItem("shopId") || void 0, s = localStorage.getItem("draftId"), c = `${I.getState().apiUrls.api}/v2/builder/shops/${o}/drafts/${s}/reset`;
13
+ message: B,
14
+ buttons: M
15
+ }, u = async (e) => {
16
+ const i = localStorage.getItem("shopId") || void 0, s = localStorage.getItem("draftId"), c = `${I.getState().apiUrls.api}/v2/builder/shops/${i}/drafts/${s}/reset`;
16
17
  return await b({
17
18
  url: c,
18
19
  withToken: !0,
19
20
  method: "post",
20
21
  body: e
21
22
  });
22
- }, D = () => {
23
- const { error: e, setError: o } = j(), { pages: s } = v(), { setIsOpen: l } = P(), { title: c, description: S, setOnConfirm: d, setTitle: p, setDescription: u } = T(), { setBlocks: f } = k();
23
+ }, F = () => {
24
+ const { error: e, setError: i } = j(), { pages: s } = v(), { setIsOpen: l } = P(), { title: c, description: S, setOnConfirm: d, setTitle: m, setDescription: p } = T(), { setBlocks: f } = k();
24
25
  async function h() {
25
- await g({
26
+ await u({
26
27
  resetSettings: (e == null ? void 0 : e.failedSettings) ?? !1,
27
28
  resetThemeSettings: (e == null ? void 0 : e.failedThemeSettings) ?? !1,
28
29
  resetPageIds: (e == null ? void 0 : e.failedPageIds) ?? []
29
- }), o(null), f({}), window.location.reload();
30
+ }), i(null), f({}), window.location.reload();
30
31
  }
31
- async function y() {
32
- const a = [];
33
- s && Object.keys(s).map((r) => s[r].id).filter((r) => r !== void 0).map((r) => a.push(r)), await g({
32
+ async function _() {
33
+ const o = [];
34
+ s && Object.keys(s).map((r) => s[r].id).filter((r) => r !== void 0).map((r) => o.push(r)), await u({
34
35
  resetSettings: !0,
35
36
  resetThemeSettings: !0,
36
- resetPageIds: a
37
- }), o(null);
37
+ resetPageIds: o
38
+ }), i(null);
38
39
  }
39
- return /* @__PURE__ */ n("div", { className: i.wrapper, children: [
40
- /* @__PURE__ */ n("div", { className: i.error, children: [
40
+ return /* @__PURE__ */ n("div", { className: a.wrapper, children: [
41
+ /* @__PURE__ */ n("div", { className: a.error, children: [
41
42
  /* @__PURE__ */ n("div", { children: [
42
- /* @__PURE__ */ t("div", { className: i.title, children: "Oops! Something went wrong" }),
43
- /* @__PURE__ */ t("span", { className: i.message, children: (e == null ? void 0 : e.message) || "" })
43
+ /* @__PURE__ */ t("div", { className: a.title, children: "Failed to render theme." }),
44
+ /* @__PURE__ */ t("span", { className: a.message, children: (e == null ? void 0 : e.message) || "" })
44
45
  ] }),
45
- /* @__PURE__ */ n("div", { className: i.buttons, children: [
46
+ /* @__PURE__ */ n("div", { className: a.buttons, children: [
46
47
  /* @__PURE__ */ t(
47
- m,
48
+ g,
48
49
  {
49
50
  type: "Primary",
50
51
  onClick: h,
@@ -52,12 +53,12 @@ const C = "_wrapper_1yd2j_1", A = "_error_1yd2j_11", N = "_title_1yd2j_21", B =
52
53
  }
53
54
  ),
54
55
  /* @__PURE__ */ t(
55
- m,
56
+ g,
56
57
  {
57
58
  type: "Secondary",
58
- onClick: (a) => {
59
- a.stopPropagation(), p("Reset All Settings"), u("Are you sure you want to reset all settings? This is irreversible."), d(async () => {
60
- await y();
59
+ onClick: (o) => {
60
+ o.stopPropagation(), m("Reset All Settings"), p("Are you sure you want to reset all settings? This is irreversible."), d(async () => {
61
+ await _();
61
62
  });
62
63
  },
63
64
  children: "Reset All Settings"
@@ -66,18 +67,18 @@ const C = "_wrapper_1yd2j_1", A = "_error_1yd2j_11", N = "_title_1yd2j_21", B =
66
67
  ] })
67
68
  ] }),
68
69
  c && S && /* @__PURE__ */ t(
69
- w,
70
+ y,
70
71
  {
71
72
  close: () => {
72
73
  l(!1), setTimeout(() => {
73
- p(null), u(null), d(null), l(!0);
74
+ m(null), p(null), d(null), l(!0);
74
75
  }, 300);
75
76
  },
76
- children: /* @__PURE__ */ t(_, {})
77
+ children: /* @__PURE__ */ t(w, {})
77
78
  }
78
79
  )
79
80
  ] });
80
81
  };
81
82
  export {
82
- D as ErrorPage
83
+ F as ErrorPage
83
84
  };