const __vite__fileDeps=["assets/address-not-serviceable-IW6-PkQX.js","assets/index-gATdONBG.js","assets/lodash-BosuxZz1.js","assets/index-DG361G67.css","assets/dialog-5oGehASR.js","assets/cart-item-remove-confirmation-dialog-DUdNzy3T.js","assets/use-pop-dialog-uaVFk5Ye.js","assets/create-password-dialog-BvpIqlLD.js","assets/password-criteria-T9Q3izMY.js","assets/password-field-CbgqhuWv.js","assets/index.esm-wlvvtr6D.js","assets/password-recovery-sent-BQEvq9L5.js","assets/login-dialog-l4R7BE6u.js","assets/use-toast-CZKyIaeF.js","assets/index-DqqvrUlD.js","assets/min-order-dialog-B1TdQT_p.js","assets/signup-dialog-C4BNWOJK.js","assets/checkbox-Ev7VK8Y3.js","assets/mobile-number-field-CgBOWtVs.js","assets/calculate-active-index-D1qeyost.js","assets/form-DkvsSdcy.js","assets/use-resolve-button-type-DGKa0DPW.js","assets/forgot-password-dialog-qb7iAXrj.js","assets/address-change-confirmation-dialog-C3tQ7BjY.js","assets/disposition-dialog-VBWxCSh3.js","assets/disposition-helper-s0-tskm-.js","assets/is-object-empty-9dZrvQCg.js","assets/radio-group-Bi4Mhwxh.js","assets/use-tree-walker-t7YXqg16.js","assets/store-selection-dialog-0WXCWRoQ.js","assets/skeleton-BCbRVFtH.js","assets/unavailable-stores-B95lRIUK.js","assets/unavailable-product-B0vK112O.js","assets/order-customization-dialog-EU529VF8.js","assets/store-change-confirmation-dialog-i5ceTh4x.js","assets/disposition-change-confirmation-vt_2bSqr.js","assets/guest-form-dialog-C5xYTkec.js","assets/remove-discounts-confirmation-dialog-B2mtTuSw.js","assets/cancel-gift-confirmation-dialog-BsKHrR5Y.js","assets/payment-confirmation-dialog-B61Jttj6.js","assets/session-expired-dialog-C7lmC_W5.js","assets/remove-favorite-dialog-BdMLmDIe.js","assets/remove-promo-dialog-CvNXXiM4.js","assets/welcome-back-dialog-BS6bxlrS.js","assets/edit-address-confirmation-dialog-CJsYsXQt.js","assets/selectors-B3oRZIcv.js","assets/delete-address-confirmation-dialog-CCbjFYX2.js","assets/welcome-treat-dialog-BUPGMlDT.js","assets/unavailable-recommended-IHmH-I-b.js","assets/select-order-type-dialog-Btq9zaYM.js","assets/take-out-schedule-dialog-BcyCks0-.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
import{c as p,d as n,s as D,e as g,r as e,i as u,f as v,g as x,h as f,j as o,F as E,k as w,t as y,l as A,C as P,q as T,m as h,M as O,n as R,B as j,o as S,_ as t,p as I,v as L,w as z,H as C,S as V,R as b,x as F,O as k,y as M}from"./index-gATdONBG.js";import{u as N,a as B}from"./use-session-CqTboVK7.js";import"./lodash-BosuxZz1.js";const U=()=>{const s=p(),a=n(D),i=n(g);e.useEffect(()=>{!a||u&&!i||s(v(u)).unwrap().then(()=>{}).catch(r=>{})},[s,a,i])},H=()=>{const s=p(),a=n(D),i=n(x);e.useEffect(()=>{!a||!i||s(f()).unwrap().then(r=>{}).catch(r=>{})},[s,i,a])};function G({children:s,component:a}){return o.jsx(e.Suspense,{fallback:o.jsxs(o.Fragment,{children:[o.jsx(E,{}),o.jsx("div",{className:"flex-1"})]}),children:a||s})}const m={success:{icon:"bg-american-green",description:"border-green bg-honeydew text-dark-charcoal",closeButton:"#458D41"},warning:{icon:"bg-halloween-orange",description:"border-bright-yellow bg-cornsilk text-halloween-orange",closeButton:"#BEBEBE"}};function W(){const{open:s,title:a,description:i,type:r}=n(w),[c,l]=e.useState(!1),_=p(),d=e.useCallback(()=>{_(y({open:!1,type:r}))},[_,r]);return e.useEffect(()=>{s&&(l(!0),setTimeout(d,5e3),setTimeout(()=>{l(!1)},5500))},[d,s]),o.jsx(o.Fragment,{children:c&&A.createPortal(o.jsx(P,{md:"full",className:"toast pointer-events-none fixed inset-0 z-40 xxs:mx-0 sm:mx-4",children:o.jsx(T,{as:e.Fragment,show:s,enter:"transition-opacity duration-700 z-50",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-500 z-50",leaveFrom:"opacity-100",leaveTo:"opacity-0",appear:!0,children:o.jsxs("div",{className:h("absolute bottom-[114px] right-0 flex min-h-[78px]  w-full items-center gap-2 overflow-hidden rounded-lg border sm:w-[400px]",m[r].description),children:[o.jsx("div",{className:h("flex min-w-[78px] items-center justify-center self-stretch",m[r].icon),children:r==="warning"?o.jsx(O,{}):o.jsx(R,{inverted:!0,className:"h-[42px] w-[42px]"})}),o.jsxs("div",{className:"flex-auto py-3",children:[o.jsx("p",{className:"text-inherit font-bold",children:a}),o.jsx("p",{className:"text-inherit leading-[18px]",children:i})]}),o.jsx(j,{className:"pointer-events-auto self-start p-2",variant:"icon","aria-label":"close-toast-button",onClick:d,children:o.jsx(S,{color:`${m[r].closeButton}`})})]})})}),document.body)})}const $=e.lazy(()=>t(()=>import("./address-not-serviceable-IW6-PkQX.js"),__vite__mapDeps([0,1,2,3,4]))),q=e.lazy(()=>t(()=>import("./cart-item-remove-confirmation-dialog-DUdNzy3T.js"),__vite__mapDeps([5,1,2,3,4,6]))),K=e.lazy(()=>t(()=>import("./create-password-dialog-BvpIqlLD.js"),__vite__mapDeps([7,1,2,3,4,8,9,10]))),J=e.lazy(()=>t(()=>import("./password-recovery-sent-BQEvq9L5.js"),__vite__mapDeps([11,1,2,3,4]))),Q=e.lazy(()=>t(()=>import("./login-dialog-l4R7BE6u.js"),__vite__mapDeps([12,1,2,3,4,13,14,9,10]))),X=e.lazy(()=>t(()=>import("./min-order-dialog-B1TdQT_p.js"),__vite__mapDeps([15,1,2,3,4]))),Y=e.lazy(()=>t(()=>import("./signup-dialog-C4BNWOJK.js"),__vite__mapDeps([16,1,2,3,4,17,18,10,19,20,21,8,9]))),Z=e.lazy(()=>t(()=>import("./forgot-password-dialog-qb7iAXrj.js"),__vite__mapDeps([22,1,2,3,4,10]))),ee=e.lazy(()=>t(()=>import("./address-change-confirmation-dialog-C3tQ7BjY.js"),__vite__mapDeps([23,1,2,3,4]))),oe=e.lazy(()=>t(()=>import("./disposition-dialog-VBWxCSh3.js"),__vite__mapDeps([24,1,2,3,4,6,25,26,10,27,20,28]))),te=e.lazy(()=>t(()=>import("./store-selection-dialog-0WXCWRoQ.js"),__vite__mapDeps([29,1,2,3,26,30,27,20,28,4]))),se=e.lazy(()=>t(()=>import("./unavailable-stores-B95lRIUK.js"),__vite__mapDeps([31,1,2,3,4]))),ae=e.lazy(()=>t(()=>import("./unavailable-product-B0vK112O.js"),__vite__mapDeps([32,1,2,3,4]))),ie=e.lazy(()=>t(()=>import("./order-customization-dialog-EU529VF8.js"),__vite__mapDeps([33,1,2,3,4,10,27,20,28,6]))),re=e.lazy(()=>t(()=>import("./store-change-confirmation-dialog-i5ceTh4x.js"),__vite__mapDeps([34,1,2,3,4]))),ne=e.lazy(()=>t(()=>import("./disposition-change-confirmation-vt_2bSqr.js"),__vite__mapDeps([35,1,2,3,4]))),le=e.lazy(()=>t(()=>import("./guest-form-dialog-C5xYTkec.js"),__vite__mapDeps([36,1,2,3,4,17,18,10,19,20,21,8,9]))),ce=e.lazy(()=>t(()=>import("./remove-discounts-confirmation-dialog-B2mtTuSw.js"),__vite__mapDeps([37,1,2,3,4]))),_e=e.lazy(()=>t(()=>import("./cancel-gift-confirmation-dialog-BsKHrR5Y.js"),__vite__mapDeps([38,1,2,3,4]))),de=e.lazy(()=>t(()=>import("./payment-confirmation-dialog-B61Jttj6.js"),__vite__mapDeps([39,1,2,3,4]))),me=e.lazy(()=>t(()=>import("./session-expired-dialog-C7lmC_W5.js"),__vite__mapDeps([40,1,2,3,4]))),pe=e.lazy(()=>t(()=>import("./remove-favorite-dialog-BdMLmDIe.js"),__vite__mapDeps([41,1,2,3,4]))),ue=e.lazy(()=>t(()=>import("./remove-promo-dialog-CvNXXiM4.js"),__vite__mapDeps([42,1,2,3,4]))),he=e.lazy(()=>t(()=>import("./welcome-back-dialog-BS6bxlrS.js"),__vite__mapDeps([43,1,2,3,4]))),De=e.lazy(()=>t(()=>import("./edit-address-confirmation-dialog-CJsYsXQt.js"),__vite__mapDeps([44,1,2,3,4,45]))),Ee=e.lazy(()=>t(()=>import("./delete-address-confirmation-dialog-CCbjFYX2.js"),__vite__mapDeps([46,1,2,3,4,45]))),ge=e.lazy(()=>t(()=>import("./index-gATdONBG.js").then(s=>s.fl),__vite__mapDeps([1,2,3]))),ve=e.lazy(()=>t(()=>import("./welcome-treat-dialog-BUPGMlDT.js"),__vite__mapDeps([47,1,2,3,4]))),xe=e.lazy(()=>t(()=>import("./unavailable-recommended-IHmH-I-b.js"),__vite__mapDeps([48,1,2,3,4]))),fe=e.lazy(()=>t(()=>import("./select-order-type-dialog-Btq9zaYM.js"),__vite__mapDeps([49,1,2,3,4]))),we=e.lazy(()=>t(()=>import("./take-out-schedule-dialog-BcyCks0-.js"),__vite__mapDeps([50,1,2,3,4,25,10]))),ye={showLoginForm:Q,showWelcomeBackAlert:he,showRemovePromo:ue,showSessionExpiredAlert:me,showPaymentConfirmation:de,showFavoriteRemovalConfirmation:pe,showDiscountRemovalConfirmation:ce,showGiftCancellationConfirmation:_e,showGuestForm:le,showMinimumOrderAlert:X,showStoreSelection:te,showCreatePasswordForm:K,showAddressNotServicableAlert:$,showPasswordRecoverySentAlert:J,showCartItemRemovalConfirmation:q,showDispositionChangeConfirmation:ne,showStoreChangeConfirmation:re,showSignUpForm:Y,showForgotPasswordForm:Z,showOrderCustomizationModal:ie,showDispositionForm:oe,showProductUnavailableAlert:ae,showStoresUnavailableAlert:se,showAddressChangeConfirmation:ee,showEditAddress:De,showDeleteAddress:Ee,showCartDrawer:ge,showWelcomeTreat:ve,showUnavailableRecommended:xe,showSelectOrderTypeDialog:fe,showTakeOutScheduleDialog:we},Ae=({children:s,selector:a})=>{const i=n(I(a)),[r,c]=e.useState(i),l=e.useRef([]);return e.useEffect(()=>{i?(c(!0),l.current.forEach(_=>clearTimeout(_))):i||l.current.push(setTimeout(()=>{c(!1)},300))},[i]),o.jsx(o.Fragment,{children:r&&s})},Pe=()=>o.jsx(e.Suspense,{fallback:o.jsx(E,{}),children:Object.entries(ye).map(([s,a],i)=>o.jsx(Ae,{selector:s,children:o.jsx(a,{})},i))}),Te=()=>{const{pathname:s}=L(),a=n(z),[i,r]=e.useState(a["*"]);return e.useEffect(()=>{Object.hasOwn(a,s)&&r(a[s])},[a,s]),o.jsxs(C,{children:[o.jsx("meta",{charSet:"utf-8"}),o.jsx("meta",{name:"theme-color",content:"#000000"}),o.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),o.jsx("meta",{name:"keyword",content:i.keyword}),o.jsx("meta",{name:"title",content:i.title}),o.jsx("meta",{name:"description",content:i.description}),o.jsx("title",{children:i.title})]})},Se=()=>(N(),H(),U(),B(),o.jsxs("div",{id:"app",className:"flex min-h-screen flex-col",children:[o.jsx(Te,{}),o.jsx(V,{getKey:s=>[b.Home].includes(s.pathname)?s.key:s.pathname}),o.jsx(F,{}),o.jsx(G,{children:o.jsx(k,{})}),o.jsx(W,{}),o.jsx(Pe,{}),o.jsx(M,{})]}));export{Se as default};