PageSourceSearch

https://www.hypebeverages.com/assets/js/index-BV5eOZpo.js

js hypebeverages.com collected 2026-10-03 18:27:06 UTC 113,735 bytes, 65 lines download raw bytes

vendor: 4,306 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/notifications-D6GQbdmJ.js","assets/js/vendor-react-P0HpX7vU.js","assets/js/vendor-maps-DeoPjTXT.js","assets/css/vendor-maps-CIGW-MKW.css","assets/js/vendor-animations-DIK8Mnda.js","assets/js/vendor-redux-Bbrn1qda.js","assets/js/vendor-mui-BYUvh2j7.js","assets/js/vendor-icons-Bb0P5DhU.js","assets/css/vendor-carousel-BgYa8zXY.css","assets/js/CustomerLayout-1Wf9rZL8.js","assets/js/AdminLayout-NGyczs3B.js","assets/js/HomePage-QkZhL5EE.js","assets/js/mixFlavorSection-BNUK4Rhl.js","assets/js/blogService-B-BCwCtM.js","assets/js/ProductDetailsPage-BiC6sYNT.js","assets/js/LoadingButton-D7j_ENaU.js","assets/js/gtm-DKVwyYPN.js","assets/js/ShopPage-BhMo639l.js","assets/js/LoginPage-DbLvG73N.js","assets/js/RegisterPage-DkeDQ5Zy.js","assets/js/CheckoutPage-CpyOWi_h.js","assets/js/useConfirm-BdVkJJhx.js","assets/js/CheckoutSuccessPage-CO-LyzSw.js","assets/js/CartPage-D2EMOpMz.js","assets/js/OrderTrackingPage-xjsrWa-x.js","assets/js/TermsOfUsePage-Bv-QjH-7.js","assets/js/BlogListingPage--oNyeqqM.js","assets/js/BlogDetailPage--FDKbWB0.js","assets/js/vendor-markdown-DAae6eF-.js","assets/js/WholesalePage-BY1C4QVN.js","assets/js/AdminLoginPage-Cw4RPPVb.js","assets/js/FindUsPage-CCoEcmG-.js","assets/js/FeedbackCarouselSection-Bk5csUup.js","assets/js/AboutPage-CBtJUu6J.js","assets/js/ContactPage-CeHiAuIT.js","assets/js/FAQPage-DJ8MKg5X.js","assets/js/OrdersPage-1-ezgtaJ.js","assets/js/ProfilePage-C4CDQOd-.js","assets/js/WishlistPage-BRJAVq-L.js","assets/js/AdminDashboard-DUjku1jb.js","assets/js/AdminProducts-CTsR6fEo.js","assets/js/AdminOrders-D191H3Hu.js","assets/js/AdminUsers-2V4PF7yn.js","assets/js/AdminBlogs-Dvipp5wf.js","assets/js/AdminBlogForm-j-JCH3dQ.js","assets/js/AdminNewsletter-CDXcLgGR.js","assets/js/AdminDistributors-CLrKwm3H.js","assets/js/AdminWholesale-C_ZQZEHP.js","assets/js/AdminCoupons-QFOFLd0s.js","assets/js/AdminBanners-BxbQIJ6L.js","assets/js/AdminSupportUsers-Dw4TL1LW.js","assets/js/PrivacyPolicy-Br3RZsyy.js","assets/js/ShippingPolicy-D2I0nCAP.js","assets/js/NotFoundPage-B4KnYwVN.js"])))=>i.map(i=>d[i]);
2import{r as s,j as e,aU as ge,ae as he,ad as J,aV as Je,aW as I,aP as Xe,aX as At,aY as It,aZ as Pt,a_ as Et,a$ as T,b0 as Se,b1 as Ot,b2 as Rt,b3 as Dt}from"./vendor-react-P0HpX7vU.js";import{u as Mt,A as Te,m as oe}from"./vendor-animations-DIK8Mnda.js";import{c as Ze,f as Nt,a as Lt,b as zt}from"./vendor-redux-Bbrn1qda.js";import{u as xe,F as Ft,B as p,C as we,T as y,a as Bt,b as D,I as E,c as De,O as Me,M as Ut,P as Ne,S as Wt,d as Le,e as Y,f as K,g as qt,R as $t,L as ze,h as $,i as Ht,j as H,D as Fe,k as Vt,l as G,m as et,A as _e,s as tt,n as Ae,o as je,G as te,p as Gt,q as Yt,r as re,t as Kt,v as Qt,w as Jt,x as Xt,y as Zt,z as er,W as tr,E as rr,H as or,J as nr,K as ar,N as sr,Q as ir}from"./vendor-mui-BYUvh2j7.js";import{F as W,f as rt,a as ot,b as nt,c as at,d as st}from"./vendor-icons-Bb0P5DhU.js";/* empty css                        */import"./vendor-maps-DeoPjTXT.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function o(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=o(a);fetch(a.href,i)}})();const lr="modulepreload",cr=function(t){return"/"+t},Be={},j=function(r,o,n){let a=Promise.resolve();if(o&&o.length>0){let m=function(g){return Promise.all(g.map(f=>Promise.resolve(f).then(k=>({status:"fulfilled",value:k}),k=>({status:"rejected",reason:k}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");a=m(o.map(g=>{if(g=cr(g),g in Be)return;Be[g]=!0;const f=g.endsWith(".css"),k=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${k}`))return;const h=document.createElement("link");
2if(h.rel=f?"stylesheet":lr,f||(h.as="script"),h.crossOrigin="",h.href=g,d&&h.setAttribute("nonce",d),document.head.appendChild(h),f)return new Promise((u,x)=>{h.addEventListener("load",u),h.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${g}`)))})}))}function i(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return a.then(c=>{for(const d of c||[])d.status==="rejected"&&i(d.reason);return r().catch(i)})},dr=()=>{const t="https://server.hypebeverages.com/api";try{if(t){const r=new URL(t);return r.pathname.endsWith("/api")?r.toString():`${r.toString().replace(/\/$/,"")}/api`}}catch{}return`${window.location.origin}/api`},ye=dr(),Ce=t=>{try{const r=JSON.parse(atob(t.split(".")[1])),o=Math.floor(Date.now()/1e3);return r.exp<o}catch{return!0}};async function ce(t,{method:r="GET",body:o,headers:n={},params:a}={}){const i=ye.endsWith("/")?ye.slice(0,-1):ye,c=t.startsWith("/")?t:`/${t}`,d=new URL(i+c);a&&typeof a=="object"&&Object.entries(a).forEach(([b,C])=>{C!=null&&C!==""&&d.searchParams.append(b,C)});let m=localStorage.getItem("token");const f={...{Accept:"application/json"},...n};let k=o;if(!(o instanceof FormData)&&o!==void 0&&o!==null&&r!=="GET"&&(f["Content-Type"]="application/json",k=JSON.stringify(o)),m&&Ce(m)){console.log("Token is expired, attempting refresh before request...");try{const b=localStorage.getItem("refreshToken");if(b){const C=await fetch(`${i}/auth/refresh-token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:b}),credentials:"include"});if(C.ok){const A=await C.json();A?.success&&A?.data?.token&&(m=A.data.token,localStorage.setItem("token",m),A.data.refreshToken&&localStorage.setItem("refreshToken",A.data.refreshToken),console.log("Token refreshed successfully before request"))}}}catch(b){console.error("Pre-request token refresh failed:",b)}}m&&(f.Authorization=`Bearer ${m}`);const u=await fetch(d.toString(),{method:r,headers:f,body:r==="GET"?void 0:k,credentials:"include"}),l=(u.headers.get("content-type")||"").includes("application/json")?await u.json().catch(()=>null):await u.text();if(!u.ok&&u.status===401)try{const b=localStorage.getItem("refreshToken");if(b){console.log("Attempting token refresh...");const C=await fetch(`${i}/auth/refresh-token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:b}),credentials:"include"});let A=null;try{A=await C.json()}catch{A=null}if(C.ok&&A?.success&&A?.data?.token){localStorage.setItem("token",A.data.token),A.data.refreshToken&&localStorage.setItem("refreshToken",A.data.refreshToken),console.log("Token refreshed successfully, retrying original request...");const w={...f};w.Authorization=`Bearer ${A.data.token}`;const M=await fetch(d.toString(),{method:r,headers:w,body:r==="GET"?void 0:k,credentials:"include"}),O=(M.headers.get("content-type")||"").includes("application/json")?await M.json().catch(()=>null):await M.text();if(!M.ok){const _=new Error("API request failed after token refresh");throw _.status=M.status,_.data=O,_}return{data:O}}}console.log("Token refresh failed, clearing auth data...");try{if(refreshData&&refreshData.success===!1&&refreshData.message==="Invalid refresh token"){const{notifyInvalidSession:C}=await j(async()=>{const{notifyInvalidSession:A}=await import("./notifications-D6GQbdmJ.js");return{notifyInvalidSession:A}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));C()}}catch{}localStorage.removeItem("token"),localStorage.removeItem("refreshToken"),localStorage.removeItem("user"),localStorage.removeItem("isAuthenticated"),typeof window<"u"&&(window.location.href="/admin/login")}catch(b){console.error("Token refresh error:",b),localStorage.removeItem("token"),localStorage.removeItem("refreshToken"),localStorage.removeItem("user"),localStorage.removeItem("isAuthenticated")}if(!u.ok){const b=new Error("API request failed");throw b.status=u.status,b.data=l,b}return{data:l}}const Ie={get:(t,r={})=>ce(t,{...r,method:"GET"}),post:(t,r,o={})=>ce(t,{...o,method:"POST",body:r}),put:(t,r,o={})=>ce(t,{...o,method:"PUT",body:r}),delete:(t,r={})=>ce(t,{...r,method:"DELETE"}),debugAuth:()=>{const t=localStorage.getItem("token"),r=localStorage.getItem("refreshToken"),o=localStorage.getItem("user"),n=localStorage.getItem("isAuthenticated");return console.log("🔍 Auth Debug Info:",{hasToken:!!t,tokenExpired:t?Ce(t):"No token",hasRefreshToken:!!r,hasUser:!!o,isAuthenticated:n==="true",userData:o?JSON.parse(o):null}),{hasToken:!!t,tokenExpired:t?Ce(t):!1,hasRefreshToken:!!r,hasUser:!!o,isAuthenticated:n==="true",userData:o?JSON.parse(o):null}}},it=s.createContext(),Pe=()=>{const t=s.useContext(it);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},ur=({children:t})=>{const[r,o]=s.useState(null),[n,a]=s.useState(!1),[i,c]=s.useState(!0),d=s.useRef(null);s.useEffect(()=>{const u=localStorage.getItem("user"),x=localStorage.getItem("isAuthenticated");u&&x==="true"&&(o(JSON.parse(u)),a(!0)),c(!1)},[]);const m=u=>{try{const x=JSON.parse(atob(u.split(".")[1]));return typeof x.exp=="number"?x.exp*1e3:null}catch{return null}},g=()=>{d.current&&(clearTimeout(d.current),d.current=null);const u=localStorage.getItem("token"),x=localStorage.getItem("refreshToken");if(!u||!x)return;const v=m(u);if(!v)return;
2const l=Date.now(),b=Math.max(v-l-6e4,5e3);d.current=setTimeout(async()=>{try{const C="https://server.hypebeverages.com/api".endsWith("/api")?"https://server.hypebeverages.com/api":"https://server.hypebeverages.com/api".replace(/\/$/,"")+"/api",A=await fetch(`${C}/auth/refresh-token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({refreshToken:localStorage.getItem("refreshToken")})});if(A.ok){const w=await A.json();if(w?.success&&w?.data?.token){localStorage.setItem("token",w.data.token),w.data.refreshToken&&localStorage.setItem("refreshToken",w.data.refreshToken),g();return}try{if(w&&w.success===!1&&w.message==="Invalid refresh token"){const{notifyInvalidSession:M}=await j(async()=>{const{notifyInvalidSession:q}=await import("./notifications-D6GQbdmJ.js");return{notifyInvalidSession:q}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));M()}}catch{}}k(),typeof window<"u"&&(window.location.href="/admin/login")}catch{k(),typeof window<"u"&&(window.location.href="/admin/login")}},b)};s.useEffect(()=>(n?g():d.current&&(clearTimeout(d.current),d.current=null),()=>{d.current&&(clearTimeout(d.current),d.current=null)}),[n]);const f=async(u,x)=>{c(!0);try{const{data:v}=await Ie.post("/auth/login",{email:u,password:x});if(v?.success&&v?.data?.token){const l=v.data.user,b=v.data.token,C=v.data.refreshToken;return localStorage.setItem("user",JSON.stringify(l)),localStorage.setItem("isAuthenticated","true"),localStorage.setItem("token",b),C&&localStorage.setItem("refreshToken",C),o(l),a(!0),{success:!0,user:l}}return{success:!1,error:v?.message||"Invalid credentials"}}catch(v){return console.error("Login error:",v),{success:!1,error:v?.data?.message||"Login failed. Please try again."}}finally{c(!1)}},k=()=>{o(null),a(!1),localStorage.removeItem("user"),localStorage.removeItem("isAuthenticated"),localStorage.removeItem("token"),localStorage.removeItem("refreshToken"),d.current&&(clearTimeout(d.current),d.current=null)},h={user:r,isAuthenticated:n,isLoading:i,login:f,logout:k};return e.jsx(it.Provider,{value:h,children:t})},pr=.35,P=({children:t,routeKey:r})=>{const n=Mt()?{initial:{opacity:0}
2,animate:{opacity:1},exit:{opacity:0}}:{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12}},a={duration:pr,ease:"easeOut"};return e.jsx(Te,{mode:"wait",children:e.jsx(oe.div,{initial:"initial",animate:"animate",exit:"exit",variants:n,transition:a,style:{minHeight:"100%"},children:t},r)})},mr=()=>{const{pathname:t}=ge();return s.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[t]),null},gr={theme:"light",sidebarOpen:!1,notifications:[],loading:!1,loadingMessage:"Loading...",pageLoading:!1,pageLoadingMessage:"Loading page...",modals:{login:!1,register:!1,product:!1,confirm:!1}},lt=Ze({name:"ui",initialState:gr,reducers:{setTheme:(t,r)=>{t.theme=r.payload},toggleSidebar:t=>{t.sidebarOpen=!t.sidebarOpen},setSidebarOpen:(t,r)=>{t.sidebarOpen=r.payload},addNotification:(t,r)=>{t.notifications.push({id:Date.now(),...r.payload})},removeNotification:(t,r)=>{t.notifications=t.notifications.filter(o=>o.id!==r.payload)},clearNotifications:t=>{t.notifications=[]},setLoading:(t,r)=>{t.loading=r.payload},setLoadingMessage:(t,r)=>{t.loadingMessage=r.payload||"Loading..."},setPageLoading:(t,r)=>{t.pageLoading=r.payload},setPageLoadingMessage:(t,r)=>{t.pageLoadingMessage=r.payload||"Loading page..."},openModal:(t,r)=>{t.modals[r.payload]=!0},closeModal:(t,r)=>{t.modals[r.payload]=!1},closeAllModals:t=>{Object.keys(t.modals).forEach(r=>{t.modals[r]=!1})}}}),{setTheme:tn,toggleSidebar:rn,setSidebarOpen:on,addNotification:ct,removeNotification:dt,clearNotifications:hr,setLoading:ut,setLoadingMessage:nn,setPageLoading:Ue,setPageLoadingMessage:an,openModal:sn,closeModal:ln,closeAllModals:cn}=lt.actions,xr=lt.reducer,pt=({message:t="Loading...",show:r=!0,variant:o="page",sx:n={}})=>{const a=xe();if(!r)return null;const i={page:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:a.palette.mode==="dark"?"rgba(15, 23, 42, 0.9)":"rgba(255, 106, 0, 0.06)",zIndex:9999,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},inline:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:4,gap:2,minHeight:"200px"},overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:a.palette.mode==="dark"?"rgba(15, 23, 42, 0.8)":"rgba(255, 106, 0, 0.06)",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2}};return e.jsx(Ft,{in:r,children:e.jsxs(p,{sx:{...i[o],...n},children:[e.jsx(we,{size:o==="page"?60:40,sx:{color:"#ff6a00"}}),t&&e.jsx(y,{variant:"body1",sx:{color:"text.secondary",fontWeight:500},children:t})]})})},fr=()=>{const t=ge(),r=he(),o=J(c=>c?.ui?.pageLoading),n=J(c=>c?.ui?.pageLoadingMessage),[a,i]=s.useState(!1);return s.useEffect(()=>{r(Ue(!0)),i(!0);const c=setTimeout(()=>{i(!1),setTimeout(()=>{r(Ue(!1)),r(ut(!1))},300)},150);return()=>{clearTimeout(c)}},[t.pathname,r]),e.jsx(pt,{show:a&&o,message:n,variant:"page"})},br=()=>{const t="https://server.hypebeverages.com/api";try{const r=new URL(t);let o;return r.pathname.endsWith("/api")?o=`${r.origin}`:o=r.origin,o}catch{return window.location.origin}return window.location.origin},Q=t=>{if(!t)return null;const r=Ee(String(t));if(r.startsWith("http://")||r.startsWith("https://")||r.startsWith("/assets/"))return r;const o=br();return r.startsWith("/")?`${o}${r}`:`${o}/${r}`},Ee=t=>{if(!t)return t;const r=String(t);if(!(r.startsWith("/assets/sugar/")||r.startsWith("/assets/nonSugar/")||r.startsWith("/assets/mixed/")))return r;const n=r.toLowerCase();return new Set(["/assets/sugar/spicy-carton.jpg"]).has(n)?r:r.replace(/\.(jpe?g)$/i,".png")},mt=(t,r)=>{if(!t||!r)return t;const o=t.split("/"),n=o[o.length-1],a=n.substring(n.lastIndexOf(".")),c=`${n.substring(0,n.lastIndexOf("."))}-${r}${a}`;return o[o.length-1]=c,o.join("/")},dn=(t,r="large")=>{if(!t||!t.url||t.url.trim()==="")return null;if(t[r])return Q(t[r]);if(r==="original")return Q(t.url);const o=mt(t.url,r);return Q(o)},un=t=>{if(!t||!t.url||t.url.trim()==="")return"";if(t.thumbnail||t.medium||t.large){const a=[{size:"thumbnail",width:"300w"},{size:"medium",width:"600w"},{size:"large",width:"1200w"},{size:"original",width:"1920w"}].map(({size:i,width:c})=>{const d=t[i]||t.url;return d?`${Q(d)} ${c}`:null}
2).filter(Boolean);return a.length>0?a.join(", "):""}const o=[{size:"thumbnail",width:"300w"},{size:"medium",width:"600w"},{size:"large",width:"1200w"}].map(({size:n,width:a})=>{const i=mt(t.url,n);return`${Q(i)} ${a}`}).filter(Boolean);return o.length>0?o.join(", "):""},pn=()=>"/assets/logo/hype - original.png",gt="cocaine_cart",ht="cocaine_order_summary",ne=()=>{try{const t=localStorage.getItem(gt);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading cart from localStorage:",t),[]}},X=t=>{try{localStorage.setItem(gt,JSON.stringify(t))}catch(r){console.error("Error saving cart to localStorage:",r)}},yr=async t=>{try{const r=await fetch("/api/products");if(!r||!r.ok)return console.warn("Failed to fetch products for price update: bad response"),t;const o=r.headers?.get("content-type")||"",n=r.headers?.get("content-length");if(r.status===204||n==="0")return console.warn("Products API returned no content for price update"),t;if(!o.toLowerCase().includes("application/json"))return console.warn("Products API did not return JSON for price update"),t;let a;try{a=await r.json()}catch(d){return console.warn("Unable to parse products API JSON for price update:",d),t}if(!a.success||!a.data?.products)return console.warn("Failed to fetch products for price update:",a),t;const i=a.data.products,c=t.map(d=>{const m=i.find(f=>(f._id||f.id)===d.id);if(!m)return console.warn(`Product not found for cart item: ${d.name} (ID: ${d.id})`),d;let g=0;return d.selectedPack==="6pack"?typeof m.pricing?.retail=="object"&&m.pricing.retail["6pack"]?g=Number(m.pricing.retail["6pack"]):typeof m.pricing?.retail=="number"?g=Number(m.pricing.retail):g=Number(m.currentPrice??0):d.selectedPack==="12pack"?typeof m.pricing?.retail=="object"&&m.pricing.retail["12pack"]?g=Number(m.pricing.retail["12pack"]):typeof m.pricing?.retail=="number"?g=Number(m.pricing.retail):g=Number(m.currentPrice??0):d.selectedPack==="24pack"?typeof m.pricing?.retail=="object"&&m.pricing.retail["24pack"]?g=Number(m.pricing.retail["24pack"]):typeof m.pricing?.retail=="number"?g=Number(m.pricing.retail):g=Number(m.currentPrice??0):typeof m.pricing?.retail=="object"&&m.pricing.retail["12pack"]?g=Number(m.pricing.retail["12pack"]):typeof m.pricing?.retail=="number"?g=Number(m.pricing.retail):g=Number(m.currentPrice??0),{...d,name:m.categoryType==="mixed-flavors"?"Mixed Flavors":m.name,price:g}});return X(c),c}catch(r){return console.error("Error updating cart item prices:",r),t}},vr=()=>{try{const t=localStorage.getItem(ht);return t?JSON.parse(t):{subtotal:"0.00",shipping:"0.00",tax:"0.00",total:"0.00"}}catch(t){return console.error("Error reading order summary from localStorage:",t),{subtotal:"0.00",shipping:"0.00",tax:"0.00",total:"0.00"}}},ae=t=>{try{localStorage.setItem(ht,JSON.stringify(t))}catch(r){console.error("Error saving order summary to localStorage:",r)}},V=t=>{if(!t||t.length===0)return{subtotal:"0.00",shipping:"0.00",tax:"0.00",total:"0.00"};const r=t.reduce((a,i)=>a+i.price*i.quantity,0),o=0,n=r;return{subtotal:r.toFixed(2),shipping:null,tax:o.toFixed(2),total:n.toFixed(2)}},kr=(t,r=1,o="12pack",n=null)=>{const a=ne();let i=0;o==="6pack"?typeof t.pricing?.retail=="object"&&t.pricing.retail["6pack"]?i=Number(t.pricing.retail["6pack"]):typeof t.pricing?.retail=="number"?i=Number(t.pricing.retail):i=Number(t.currentPrice??0):o==="12pack"?typeof t.pricing?.retail=="object"&&t.pricing.retail["12pack"]?i=Number(t.pricing.retail["12pack"]):typeof t.pricing?.retail=="number"?i=Number(t.pricing.retail):i=Number(t.currentPrice??0):o==="24pack"?typeof t.pricing?.retail=="object"&&t.pricing.retail["24pack"]?i=Number(t.pricing.retail["24pack"]):typeof t.pricing?.retail=="number"?i=Number(t.pricing.retail):i=Number(t.currentPrice??0):typeof t.pricing?.retail=="object"&&t.pricing.retail["12pack"]?i=Number(t.pricing.retail["12pack"]):typeof t.pricing?.retail=="number"?i=Number(t.pricing.retail):i=Number(t.currentPrice??0);const c=t.images?.can_front||t.images?.main||"/assets/logo/hype - original.png",d=Ee(c),m={id:t.id,name:t.categoryType==="mixed-flavors"?"Mixed Flavors":t.name,price:i,image:d,selectedPack:o,selectedFlavor:n||t.flavor||"DEFAULT",packOptions:t.packOptions||[],quantity:r,cartId:`${t.id}-${o}-${n||"default"}-${Date.now()}`},g=a.findIndex(k=>k.id===m.id&&k.selectedPack===m.selectedPack&&k.selectedFlavor===m.selectedFlavor);g!==-1?a[g].quantity+=r:a.push(m),X(a);const f=V(a);return ae(f),a},xt=t=>{const o=ne().filter(a=>a.cartId!==t);X(o);const n=V(o);return ae(n),o},wr=(t,r)=>{const o=ne();if(r<=0)return xt(t);const n=o.map(i=>i.cartId===t?{...i,quantity:r}:i);X(n);const a=V(n);return ae(a),n},jr=()=>{const t=[];X(t);const r=V(t);return ae(r),t},ft=s.createContext(),Cr=()=>{const t=s.useContext(ft);if(!t)throw new Error("useCheckout must be used within a CheckoutProvider");return t},bt=()=>
2({items:ne(),shippingInfo:{firstName:"",lastName:"",email:"",phone:"",address:"",city:"",state:"",zipCode:"",country:"US"},paymentInfo:{cardNumber:"",expiryDate:"",cvv:"",nameOnCard:""},orderSummary:vr()}),Sr=(t,r)=>{switch(r.type){case"SET_ITEMS":return{...t,items:r.payload};case"UPDATE_SHIPPING_INFO":return{...t,shippingInfo:{...t.shippingInfo,...r.payload}};case"UPDATE_PAYMENT_INFO":return{...t,paymentInfo:{...t.paymentInfo,...r.payload}};case"UPDATE_ORDER_SUMMARY":return{...t,orderSummary:{...t.orderSummary,...r.payload}};case"CLEAR_CART":return{...bt(),shippingInfo:t.shippingInfo,paymentInfo:t.paymentInfo};default:return t}},Tr=({children:t})=>{const[r,o]=s.useReducer(Sr,bt());s.useEffect(()=>{(async()=>{const u=ne(),x=await yr(u),v=V(x);o({type:"SET_ITEMS",payload:x}),o({type:"UPDATE_ORDER_SUMMARY",payload:v})})()},[]),s.useEffect(()=>{X(r.items);const h=V(r.items);ae(h),o({type:"UPDATE_ORDER_SUMMARY",payload:h})},[r.items]);const n=s.useCallback((h,u=1,x="12pack",v=null)=>{const l=kr(h,u,x,v);o({type:"SET_ITEMS",payload:l})},[]),a=s.useCallback(h=>{const u=xt(h);o({type:"SET_ITEMS",payload:u})},[]),i=s.useCallback((h,u)=>{const x=wr(h,u);o({type:"SET_ITEMS",payload:x})},[]),c=s.useCallback(h=>{o({type:"UPDATE_SHIPPING_INFO",payload:h})},[]),d=s.useCallback(h=>{o({type:"UPDATE_PAYMENT_INFO",payload:h})},[]),m=s.useCallback(h=>{o({type:"UPDATE_ORDER_SUMMARY",payload:h})},[]),g=s.useCallback(()=>{const h=jr();o({type:"SET_ITEMS",payload:h})},[]),f=s.useCallback(()=>V(r.items),[r.items]),k={...r,addToCart:n,removeFromCart:a,updateQuantity:i,updateShippingInfo:c,updatePaymentInfo:d,updateOrderSummary:m,clearCart:g,calculateOrderSummary:f};return e.jsx(ft.Provider,{value:k,children:t})},L={TIKTOK:"https://www.tiktok.com/@hypebeverages",FACEBOOK:"https://www.facebook.com/hypebeverages/",INSTAGRAM:"https://www.instagram.com/hypebeverages_/",YOUTUBE:"https://www.youtube.com/@hypebeverages",SNAPCHAT:"https://www.snapchat.com/@hypebeverages",AMAZON_STORE:"https://www.amazon.com/stores/CocaineEnergySupplement/page/D39F7365-2510-40F2-9475-CD12DE7F8DBA?lp_asin=B0DJDPJ8RM&ref_=ast_bln&store_ref=bl_ast_dp_brandLogo_sto",EBAY:"https://www.ebay.com/usr/hypebeverages",TIKTOK_SHOP:"https://vt.tiktok.com/ZTMXujKQo/"},U={MIX_FLAVOR_6_PACK_PROD:"690282e3708bf91514ed90c9",MIX_FLAVOR_6_PACK_DEV:"68f3b47512a4ed2fc10643dd",CITRUS:"68e56bc64510dfa4e18a05a6",WATERMELON_ICE:"68e56bc64510dfa4e18a05a1",PINA_COLADA:"68e56bc64510dfa4e18a059c",PEACH_MANGO:"68e56bc64510dfa4e18a0597",MIXED_BERRY:"68e56bc64510dfa4e18a0592",SPICY:"68e56bc64510dfa4e18a058d"},_r=[U.MIX_FLAVOR_6_PACK_PROD,U.MIX_FLAVOR_6_PACK_DEV];function de(t){if(!t)return!1;const r=t.id||t._id;return _r.includes(r)}const We={[U.MIX_FLAVOR_6_PACK_PROD]:"#4A148C",[U.MIX_FLAVOR_6_PACK_DEV]:"#4A148C",[U.CITRUS]:"#9ACD32",[U.WATERMELON_ICE]:"#1B5E20",[U.PINA_COLADA]:"#B8860B",[U.PEACH_MANGO]:"#E65100",[U.MIXED_BERRY]:"#0D47A1",[U.SPICY]:"#C62828"};function mn(t){if(!t)return;const r=t.id||t._id;if(r&&We[r])return We[r]}const gn=["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],Ar=()=>{const t=ge(),r=t.pathname.startsWith("/shop")||t.pathname.startsWith("/products"),o=Je(),n=xe(),a=Bt(n.breakpoints.down("lg")),{items:i,removeFromCart:c,updateQuantity:d}=Cr(),[m,g]=s.useState(null),[f,k]=s.useState(null),[h,u]=s.useState(!1),[x,v]=s.useState({name:"",email:"",phone:"",message:""}),[l,b]=s.useState(!1),[C,A]=s.useState({open:!1,message:"",severity:"success"}),w=S=>t.pathname===S,M=S=>{g(S.currentTarget)},q=()=>{g(null)},fe=()=>{u(!h)},O=()=>{u(!1)},_=S=>{k(S.currentTarget)},R=()=>{k(null)},F=(i||[]).reduce((S,N)=>{const B=Number(N?.quantity)||0;return S+B},0),be=(i||[]).reduce((S,N)=>{const B=Number(N?.price)||0,ee=Number(N?.quantity)||0,Re=B*ee;return S+(Number.isFinite(Re)?Re:0)},0),ie=Number.isFinite(be)?be:0,Tt=S=>{c(S.cartId)},Oe=(S,N)=>{N<=0?c(S.cartId):d(S.cartId,N)},le=S=>{const{name:N,value:B}=S.target;v(ee=>({...ee,[N]:B}))},_t=async S=>{if(S.preventDefault(),!(!x.name||!x.email||!x.message))try{b(!0);const[N,...B]=x.name.trim().split(" ");await Ie.post("/contact",{firstName:N,lastName:B.join(" ")||"",email:x.email,contactNumber:x.phone||"",message:x.message}
2),v({name:"",email:"",phone:"",message:""}),q(),A({open:!0,message:"Message sent! We'll be in touch shortly.",severity:"success"})}catch{A({open:!0,message:"Failed to send message. Please try again.",severity:"error"})}finally{b(!1)}};return e.jsxs(p,{component:oe.div,initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.35},sx:{backgroundColor:"white"},children:[e.jsx(p,{sx:{backgroundColor:"#BE202F",color:"white",py:1},children:e.jsx(p,{sx:{maxWidth:"1280px",mx:"auto",px:2,position:"relative"},children:e.jsxs(p,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:{xs:1,md:2}},children:[e.jsx(p,{sx:{flex:1,minWidth:0,display:"flex",justifyContent:"center"}}),e.jsxs(p,{sx:{display:"flex",flexShrink:0,alignItems:"center",gap:{xs:1,md:2}},children:[e.jsx(D,{variant:"contained",onClick:M,sx:{backgroundColor:"white",color:n.palette.warning.dark,"&:hover":{backgroundColor:"grey.100",color:n.palette.warning.dark,transform:"translateY(-2px)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)"},fontWeight:600,px:3,py:.5,fontSize:"0.875rem",textTransform:"none",borderRadius:"20px",fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:active":{transform:"translateY(0px)"}},children:"Contact Us"}),e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("a",{href:L.TIKTOK,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:32,height:32,border:"2px solid #ff6b35",backgroundColor:"white",color:n.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#010101",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #010101"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:rt,size:"sm"})})}),e.jsx("a",{href:L.FACEBOOK,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:32,height:32,border:"2px solid #ff6b35",backgroundColor:"white",color:n.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#1877F2",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #1877F2"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:ot,size:"sm"})})}),e.jsx("a",{href:L.INSTAGRAM,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:32,height:32,border:"2px solid #ff6b35",backgroundColor:"white",color:n.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#E1306C",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #E1306C"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:nt,size:"sm"})})}),e.jsx("a",{href:L.YOUTUBE,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:32,height:32,border:"2px solid #ff6b35",backgroundColor:"white",color:n.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#FF0000",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #FF0000"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:at,size:"sm"})})}),e.jsx("a",{href:L.SNAPCHAT,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:32,height:32,border:"2px solid #ff6b35",backgroundColor:"white",color:n.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#FFFC00",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #FFFC00"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:st,size:"sm"})})})]})]})]})})}),e.jsx(p,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(8px)"},children:e.jsxs(p,{sx:{maxWidth:"1280px",mx:"auto",px:{xs:1,sm:2},display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(I,{to:"/",style:{display:"flex",alignItems:"center",gap:8,textDecoration:"none"},children:e.jsx(p,{sx:{position:"relative",display:"flex",alignItems:"center",gap:1},children:e.jsx("img",{src:"/assets/logo/cocaine.png",alt:"Cocaine Logo",style:{height:a?"70px":"120px",width:"auto",objectFit:"contain"}})})}),a&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(D,{onClick:_,variant:"outlined",size:"small",startIcon:e.jsx(De,{badgeContent:F,color:"error",sx:{"& .MuiBadge-badge":{fontSize:"0.6rem",fontWeight:"bold",minWidth:"16px",height:"16px"}},children:e.jsx(Me,{fontSize:"small"})}),sx:{color:"black",borderColor:"#ddd",px:1,py:.5,minWidth:"auto","&:hover":{backgroundColor:"rgba(0,0,0,0.04)",borderColor:"primary.main"}},children:e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",ml:.5},children:e.jsxs(y,{variant:"caption",sx:{lineHeight:1,fontWeight:"bold",color:"primary.main",fontSize:"0.6rem"},children:["$",ie.toFixed(2)]})})}),e.jsx(E,{onClick:fe,sx:{color:"black","&:hover":{backgroundColor:"rgba(0,0,0,0.04)"}},children:e.jsx(Ut,{})})]}),e.jsxs(p,{sx:{display:{xs:"none",lg:"flex"},alignItems:"center",gap:0},children:[e.jsx(I,{to:"/",style:{textDecoration:"none"},children:e.jsx(y,{variant:"body1",sx:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/")?n.palette.primary.main:"black",position:"relative",px:2,py:1,cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&::after":w("/")?{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px"}:{},"&:hover":{color:n.palette.primary.main,transform:"translateY(-2px)","&::after":{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px",transition:"transform 0.3s ease-out",transformOrigin:"left",transform:"scaleX(1)"}}},children:"HOME"})}),e.jsx(p,{sx:{width:"3px",height:"20px",backgroundColor:"grey.300",mx:1}}),e.jsx(I,{to:"/shop",style:{textDecoration:"none"},children:e.jsx(y,{variant:"body1",sx:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:r?n.palette.primary.main:"black",position:"relative",px:2,py:1,cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",...r&&{"&::after":{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px"}},"&:hover":{color:n.palette.primary.main,transform:"translateY(-2px)","&::after":{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px",transition:"transform 0.3s ease-out",transformOrigin:"left",transform:"scaleX(1)"}}},children:"OUR SHOP"})}),e.jsx(p,{sx:{width:"3px",height:"20px",backgroundColor:"grey.300",mx:1}}),e.jsx(I,{to:"/about",style:{textDecoration:"none"},children:e.jsx(y,{variant:"body1",sx:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/about")?n.palette.primary.main:"black",position:"relative",px:2,py:1,cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&::after":w("/about")?{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px"}:{},"&:hover":{color:n.palette.primary.main,transform:"translateY(-2px)","&::after":{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px",transition:"transform 0.3s ease-out",transformOrigin:"left",transform:"scaleX(1)"}}},children:"ABOUT US"})}),e.jsx(p,{sx:{width:"3px",height:"20px",backgroundColor:"grey.300",mx:1}}),e.jsx(I,{to:"/blog",style:{textDecoration:"none"},children:e.jsx(y,{variant:"body1",sx:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/blog")?n.palette.primary.main:"black",position:"relative",px:2,py:1,cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&::after":w("/blog")?{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px"}:{},"&:hover":{color:n.palette.primary.main,transform:"translateY(-2px)","&::after":{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px",transition:"transform 0.3s ease-out",transformOrigin:"left",transform:"scaleX(1)"}}},children:"BLOG"})}),e.jsx(p,{sx:{width:"3px",height:"20px",backgroundColor:"grey.300",mx:1}}),e.jsx(I,{to:"/wholesale",style:{textDecoration:"none"},children:e.jsx(y,{variant:"body1",sx:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/wholesale")?n.palette.primary.main:"black",position:"relative",px:2,py:1,cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&::after":w("/wholesale")?{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px"}:{},"&:hover":{color:n.palette.primary.main,transform:"translateY(-2px)","&::after":{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px",transition:"transform 0.3s ease-out",transformOrigin:"left",transform:"scaleX(1)"}}},children:"WHOLESALE"})}),e.jsx(p,{sx:{width:"3px",height:"20px",backgroundColor:"grey.300",mx:1}}),e.jsx(I,{to:"/findus",style:{textDecoration:"none"},children:e.jsx(y,{variant:"body1",sx:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/findus")?n.palette.primary.main:"black",position:"relative",px:2,py:1,cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&::after":w("/findus")?{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px"}:{},"&:hover":{color:n.palette.primary.main,transform:"translateY(-2px)","&::after":{content:'""',position:"absolute",bottom:"-4px",left:0,right:0,height:"3px",background:n.palette.primary.main,borderRadius:"2px",transition:"transform 0.3s ease-out",transformOrigin:"left",transform:"scaleX(1)"}}},children:"WHERE TO FIND US"})}),e.jsx(p,{sx:{width:"3px",height:"20px",backgroundColor:"grey.300",mx:1}}),e.jsx(D,{onClick:_,variant:"outlined",startIcon:e.jsx(De,{badgeContent:F,color:"error",sx:{"& .MuiBadge-badge":{fontSize:"0.7rem",fontWeight:"bold",minWidth:"18px",height:"18px"}},children:e.jsx(Me,{})}),sx:{color:"black",borderColor:"#ddd",px:2,py:1,minWidth:"auto","&:hover":{backgroundColor:"rgba(0,0,0,0.04)",borderColor:"primary.main"}},children:e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",ml:1},children:e.jsxs(y,{variant:"body2",sx:{lineHeight:1,fontWeight:"bold",color:"primary.main"},children:["$",ie.toFixed(2)]})})})]})]})}),e.jsx(Ne,{open:!!m,anchorEl:m,onClose:q,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{sx:{mt:1,borderRadius:3,boxShadow:"0 8px 32px rgba(0,0,0,0.12)",border:"1px solid rgba(255,255,255,0.2)",backdropFilter:"blur(8px)",minWidth:400,maxWidth:500}},TransitionComponent:Wt,TransitionProps:{direction:"down"},children:e.jsxs(Le,{sx:{p:3,backgroundColor:"rgba(255,255,255,0.95)"},children:[e.jsxs(p,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3,pb:2,borderBottom:`2px solid ${n.palette.warning.dark}`},children:[e.jsx(y,{variant:"h5",sx:{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:700,color:n.palette.warning.dark,textTransform:"uppercase",letterSpacing:"0.5px"},children:"Contact Us"}),e.jsx(E,{onClick:q,sx:{color:n.palette.warning.dark,"&:hover":{backgroundColor:"rgba(255,107,53,0.1)",transform:"rotate(90deg)"},transition:"all 0.3s ease"},children:e.jsx(Y,{})})]}),e.jsxs(p,{component:"form",onSubmit:_t,children:[e.jsxs(p,{sx:{display:"flex",gap:2,mb:2},children:[e.jsx(K,{name:"name",label:"Full Name",value:x.name,onChange:le,required:!0,fullWidth:!0,variant:"outlined",sx:{"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:n.palette.warning.dark,borderWidth:2},"&:hover fieldset":{borderColor:n.palette.warning.main},"&.Mui-focused fieldset":{borderColor:n.palette.warning.dark}},"& .MuiInputLabel-root.Mui-focused":{color:n.palette.warning.dark}}}),e.jsx(K,{name:"phone",label:"Phone Number",value:x.phone,onChange:le,fullWidth:!0,variant:"outlined",sx:{"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:n.palette.warning.dark,borderWidth:2},"&:hover fieldset":{borderColor:n.palette.warning.main},"&.Mui-focused fieldset":{borderColor:n.palette.warning.dark}},"& .MuiInputLabel-root.Mui-focused":{color:n.palette.warning.dark}}})]}),e.jsx(K,{name:"email",label:"Email Address",type:"email",value:x.email,onChange:le,required:!0,fullWidth:!0,variant:"outlined",sx:{mb:2,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:n.palette.warning.dark,borderWidth:2},"&:hover fieldset":{borderColor:n.palette.warning.main},"&.Mui-focused fieldset":{borderColor:n.palette.warning.dark}},"& .MuiInputLabel-root.Mui-focused":{color:n.palette.warning.dark}}}),e.jsx(K,{name:"message",label:"Message",value:x.message,onChange:le,required:!0,fullWidth:!0,multiline:!0,rows:4,variant:"outlined",sx:{mb:3,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:n.palette.warning.dark,borderWidth:2},"&:hover fieldset":{borderColor:n.palette.warning.main},"&.Mui-focused fieldset":{borderColor:n.palette.warning.dark}},"& .MuiInputLabel-root.Mui-focused":{color:n.palette.warning.dark}}}),e.jsx(D,{type:"submit",variant:"contained",disabled:l,startIcon:e.jsx(qt,{}),sx:{backgroundColor:n.palette.warning.dark,color:"white",fontWeight:600,px:4,py:1.5,fontSize:"1rem",textTransform:"none",borderRadius:"25px",fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',width:"100%","&:hover":{backgroundColor:n.palette.warning.main,transform:"translateY(-2px)",boxShadow:"0 6px 20px rgba(255,107,53,0.4)"},"&:disabled":{backgroundColor:"grey.400",color:"grey.600"},transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:active":{transform:"translateY(0px)"}},children:l?"Sending...":"Send Message"})]})]})}),e.jsx(Ne,{open:!!f,anchorEl:f,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{"& .MuiPopover-paper":{width:{xs:"90vw",sm:400},maxHeight:"80vh",overflow:"hidden"}},children:e.jsxs(Le,{sx:{p:2,maxHeight:"80vh",overflow:"auto"},children:[e.jsxs(p,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,pb:1,borderBottom:"1px solid #eee"},children:[e.jsxs(y,{variant:"body1",sx:{fontWeight:"bold",color:"primary.main"},children:["SHOPPING CART (",F," ",F===1?"item":"items",")"]}),e.jsx(E,{size:"small",onClick:R,children:e.jsx(Y,{})})]}),(i||[]).length===0?e.jsxs(p,{sx:{textAlign:"center",py:4},children:[e.jsx($t,{sx:{fontSize:48,color:"text.secondary",mb:2}}),e.jsx(y,{variant:"body1",color:"text.secondary",gutterBottom:!0,children:"Your cart is empty"}),e.jsx(D,{variant:"contained",onClick:()=>{o("/shop"),R()},sx:{mt:1},children:"Start Shopping"})]}):e.jsxs(e.Fragment,{children:[e.jsx(ze,{sx:{maxHeight:"50vh",overflow:"auto",mb:2},children:(i||[]).map((S,N)=>{const B=Number(S.price)||0,ee=B*S.quantity;return e.jsxs(Xe.Fragment,{children:[e.jsxs($,{sx:{px:0,py:1.5},children:[e.jsx(Ht,{sx:{width:50,height:50,borderRadius:1,overflow:"hidden",backgroundColor:"#fafafa",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(p,{component:"img",src:S.image,alt:S.name,sx:{width:"100%",height:"100%",objectFit:"contain !important",objectPosition:"center",display:"block"}})}),e.jsx(H,{primary:S.name,primaryTypographyProps:{variant:"body1",sx:{fontSize:"0.9rem",fontWeight:"bold",mb:.5}},secondary:e.jsxs(p,{children:[e.jsxs(y,{variant:"caption",color:"text.secondary",fontSize:"0.8rem",children:[S.selectedPack," • $",B.toFixed(2)," each"]}),e.jsxs(p,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:1},children:[e.jsxs(p,{sx:{dis
2play:"flex",alignItems:"center",gap:1},children:[e.jsx(E,{size:"small",onClick:()=>Oe(S,S.quantity-1),sx:{border:"1px solid #ddd",width:28,height:28,"&:hover":{backgroundColor:"primary.light"}},children:"-"}),e.jsx(y,{variant:"body2",sx:{fontSize:"0.9rem",minWidth:24,textAlign:"center"},children:S.quantity}),e.jsx(E,{size:"small",onClick:()=>Oe(S,S.quantity+1),sx:{border:"1px solid #ddd",width:28,height:28,"&:hover":{backgroundColor:"primary.light"}},children:"+"})]}),e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsxs(y,{variant:"body1",sx:{fontSize:"0.9rem",fontWeight:"bold",color:"primary.main"},children:["$",ee.toFixed(2)]}),e.jsx(E,{size:"small",onClick:()=>Tt(S),sx:{color:"error.main","&:hover":{backgroundColor:"error.light"}},children:e.jsx(Y,{fontSize:"small"})})]})]})]})})]}),N<(i||[]).length-1&&e.jsx(Fe,{})]},`${S.id}-${S.selectedPack}`)})}),e.jsxs(p,{sx:{borderTop:"2px solid #eee",pt:2,backgroundColor:"rgba(0,0,0,0.02)",borderRadius:1,p:2},children:[e.jsxs(p,{sx:{display:"flex",justifyContent:"space-between",mb:1},children:[e.jsx(y,{variant:"body2",children:"Subtotal:"}),e.jsxs(y,{variant:"body2",children:["$",be.toFixed(2)]})]}),e.jsxs(p,{sx:{display:"flex",justifyContent:"space-between",mb:1},children:[e.jsx(y,{variant:"body2",children:"Shipping:"}),e.jsx(y,{variant:"body2",sx:{color:"text.secondary",fontStyle:"italic"},children:"Calculated at checkout"})]}),e.jsx(Fe,{sx:{my:1}}),e.jsxs(p,{sx:{display:"flex",justifyContent:"space-between",mb:2},children:[e.jsx(y,{variant:"h6",sx:{fontWeight:"bold"},children:"Total:"}),e.jsxs(y,{variant:"h6",sx:{fontWeight:"bold",color:"primary.main"},children:["$",ie.toFixed(2)]})]}),e.jsxs(p,{sx:{display:"flex",gap:1},children:[e.jsx(D,{variant:"outlined",fullWidth:!0,onClick:()=>{o("/cart"),R()},sx:{textTransform:"none"},children:"View Cart"}),e.jsx(D,{variant:"contained",fullWidth:!0,onClick:()=>{o("/checkout"),R()},sx:{textTransform:"none"},children:"Checkout"})]})]})]})]})}),e.jsx(Vt,{anchor:"right",open:h,onClose:O,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:300},backgroundColor:"white",boxShadow:"0 8px 32px rgba(0,0,0,0.1)"}},children:e.jsxs(p,{sx:{p:2},children:[e.jsxs(p,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3,pb:2,borderBottom:"1px solid #eee"},children:[e.jsx(y,{variant:"h6",sx:{fontWeight:"bold",color:"primary.main"},children:"Menu"}),e.jsx(E,{onClick:O,children:e.jsx(Y,{})})]}),e.jsxs(ze,{children:[e.jsx($,{disablePadding:!0,children:e.jsx(G,{component:I,to:"/",onClick:O,sx:{borderRadius:1,mb:1,backgroundColor:w("/")?"primary.light":"transparent","&:hover":{backgroundColor:"primary.light"}},children:e.jsx(H,{primary:"HOME",sx:{"& .MuiListItemText-primary":{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/")?"#eee":"black"}}})})}),e.jsx($,{disablePadding:!0,children:e.jsx(G,{component:I,to:"/shop",onClick:O,sx:{borderRadius:1,mb:1,backgroundColor:w("/shop")?"primary.light":"transparent","&:hover":{backgroundColor:"primary.light"}},children:e.jsx(H,{primary:"OUR SHOP",sx:{"& .MuiListItemText-primary":{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/shop")?"#eee":"black"}}})})}),e.jsx($,{disablePadding:!0,children:e.jsx(G,{component:I,to:"/about",onClick:O,sx:{borderRadius:1,mb:1,backgroundColor:w("/about")?"primary.light":"transparent","&:hover":{backgroundColor:"primary.light"}},children:e.jsx(H,{primary:"ABOUT US",sx:{"& .MuiListItemText-primary":{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/about")?"#eee":"black"}}})})}),e.jsx($,{disablePadding:!0,children:e.jsx(G,{component:I,to:"/blog",onClick:O,sx:{borderRadius:1,mb:1,backgroundColor:w("/blog")?"primary.light":"transparent","&:hover":{backgroundColor:"primary.light"}},children:e.jsx(H,{primary:"BLOG",sx:{"& .MuiListItemText-primary":{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/blog")?"#eee":"black"}}})})}),e.jsx($,{disablePadding:!0,children:e.jsx(G,{component:I,to:"/wholesale",onClick:O,sx:{borderRadius:1,mb:1,backgroundColor:w("/wholesale")?"primary.light":"transparent","&:hover":{backgroundColor:"primary.light"}},children:e.jsx(H,{primary:"WHOLESALE",sx:{"& .MuiListItemText-primary":{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/wholesale")?"#eee":"black"}}})})}),e.jsx($,{disablePadding:!0,children:e.jsx(G,{component:I,to:"/findus",onClick:O,sx:{borderRadius:1,mb:1,backgroundColor:w("/findus")?"primary.light":"transparent","&:hover":{backgroundColor:"primary.light"}},children:e.jsx(H,{primary:"WHERE TO FIND US",sx:{"& .MuiListItemText-primary":{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',textTransform:"uppercase",fontWeight:600,color:w("/findus")?"#eee":"black"}}})})})]}),(i||[]).length>0&&e.jsx(p,{sx:{mt:3,pt:2,borderTop:"1px solid #eee"},children:e.jsxs(p,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,p:2,backgroundColor:"rgba(0,0,0,0.02)",borderRadius:1},children:[e.jsxs(p,{children:[e.jsxs(y,{variant:"body2",color:"text.secondary",children:[F," ",F===1?"item":"items"," in cart"]}),e.jsxs(y,{variant:"h6",sx:{fontWeight:"bold",color:"primary.main"},children:["$",ie.toFixed(2)]})]}),e.jsxs(p,{sx:{display:"flex",gap:1},children:[e.jsx(D,{variant:"outlined",size:"small",onClick:()=>{o("/cart"),O()},sx:{textTransform:"none"},children:"View Cart"}),e.jsx(D,{variant:"contained",size:"small",onClick:()=>{o("/checkout"),O()},sx:{textTransform:"none"},children:"Checkout"})]})]})}),e.jsx(p,{sx:{mt:3,pt:2,borderTop:"1px solid #eee"},children:e.jsx(D,{variant:"contained",onClick:M,fullWidth:!0,sx:{backgroundColor:n.palette.warning.dark,color:"white","&:hover":{backgroundColor:n.palette.warning.main,transform:"translateY(-2px)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)"},fontWeight:600,py:1.5,fontSize:"0.875rem",textTransform:"none",borderRadius:"20px",fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:active":{transform:"translateY(0px)"}},children:"Contact Us"})})]})}),e.jsx(et,{open:C.open,autoHideDuration:5e3,onClose:()=>A(S=>({...S,open:!1})),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:e.jsx(_e,{onClose:()=>A(S=>({...S,open:!1})),severity:C.severity,sx:{width:"100%"},children:C.message})})]})},Ir=()=>{const t=he(),[r,o]=s.useState([]),n=s.useRef([]),[a,i]=s.useState(!1),c=s.useRef(!1),d=s.useRef(null),m=s.useCallback(()=>
2{if(n.current.length===0||c.current)return;c.current=!0,i(!0);const l=n.current[0];t(ct(l)),n.current=n.current.slice(1),o(n.current);const b=l.duration||5e3;setTimeout(()=>{t(dt(l.id)),c.current=!1,i(!1),setTimeout(()=>{m()},300)},b)},[t]),g=s.useCallback(l=>{const b={id:Date.now()+Math.random(),duration:5e3,type:"info",...l};n.current=[...n.current,b],o(n.current),c.current||m()},[m]),f=s.useCallback((l,b={})=>{g({type:"success",message:l,...b})},[g]),k=s.useCallback((l,b={})=>{g({type:"error",message:l,duration:7e3,...b})},[g]),h=s.useCallback((l,b={})=>{g({type:"warning",message:l,duration:6e3,...b})},[g]),u=s.useCallback((l,b={})=>{g({type:"info",message:l,...b})},[g]),x=s.useCallback(()=>{n.current=[],o([]),d.current&&clearTimeout(d.current),c.current=!1,i(!1)},[]),v=s.useCallback(()=>({queueLength:r.length,isProcessing:a,nextNotification:r[0]||null}),[r,a]);return{enqueue:g,enqueueSuccess:f,enqueueError:k,enqueueWarning:h,enqueueInfo:u,clearQueue:x,getQueueStatus:v}},Pr=()=>{const t=Ir();return{notify:t.enqueue,success:t.enqueueSuccess,error:t.enqueueError,warning:t.enqueueWarning,info:t.enqueueInfo,clear:t.clearQueue,status:t.getQueueStatus,showLoading:r=>t.enqueueInfo(r,{title:"Loading",duration:0,persistent:!0}),showSuccess:(r,o="Success")=>t.enqueueSuccess(r,{title:o,duration:4e3}),showError:(r,o="Error")=>t.enqueueError(r,{title:o,duration:6e3}),showWarning:(r,o="Warning")=>t.enqueueWarning(r,{title:o,duration:5e3}),showInfo:(r,o="Info")=>t.enqueueInfo(r,{title:o,duration:4e3}),auth:{loginSuccess:r=>t.enqueueSuccess(`Welcome back, ${r}!`,{title:"Login Successful",duration:4e3}),loginError:r=>t.enqueueError(r,{title:"Login Failed",duration:6e3}),registerSuccess:r=>t.enqueueSuccess(`Account created! Welcome, ${r}!`,{title:"Registration Successful",duration:5e3}),registerError:r=>t.enqueueError(r,{title:"Registration Failed",duration:6e3}),logoutSuccess:()=>t.enqueueSuccess("You have been signed out",{title:"Logout",duration:3e3})},api:{loading:r=>t.enqueueInfo(`${r}...`,{title:"Processing",duration:0,persistent:!0}),success:r=>t.enqueueSuccess(`${r} completed successfully`,{title:"Success",duration:4e3}),error:(r,o)=>t.enqueueError(`${r} failed: ${o}`,{title:"Error",duration:6e3})},cart:{added:r=>t.enqueueSuccess(`${r} added to cart`,{title:"Cart Updated",duration:3e3}),removed:r=>t.enqueueInfo(`${r} removed from cart`,{title:"Cart Updated",duration:3e3}),cleared:()=>t.enqueueInfo("Cart cleared",{title:"Cart Updated",duration:3e3})}}},se="USD",Z=(t,r)=>{typeof window>"u"||typeof window.fbq!="function"||window.fbq("track",t,r)},hn=(t,r,o)=>{Z("ViewContent",{content_ids:[t.id],content_type:"product",content_name:t.name,content_category:o,currency:se,value:Number(r)||0})},xn=(t,r,o,n)=>{Z("AddToCart",{content_ids:[t.id],content_type:"product",content_name:t.name,content_category:o,currency:se,value:(Number(n)||0)*r,contents:[{id:t.id,quantity:r}]})},fn=(t,r)=>{Z("InitiateCheckout",{content_ids:t.map(o=>o.id),content_type:"product",currency:se,value:Number(r)||0,num_items:t.reduce((o,n)=>o+(Number(n.quantity)||1),0),contents:t.map(o=>({id:o.id,quantity:Number(o.quantity)||1}))})},bn=(t,r)=>{Z("AddPaymentInfo",{content_ids:t.map(o=>o.id),content_type:"product",currency:se,value:Number(r)||0,contents:t.map(o=>({id:o.id,quantity:Number(o.quantity)||1}))})},Er=t=>{Z("Lead",t?{content_name:t}:void 0)},yn=t=>{const r=t.items||[];Z("Purchase",{content_ids:r.map(o=>o.product?._id||o.product),content_type:"product",currency:se,value:t.pricing?.total??0,contents:r.map(o=>({id:o.product?._id||o.product,quantity:o.quantity})),order_id:t.orderNumber})},Or=tt(p)(({theme:t})=>({backgroundImage:'url("/assets/bannerbg.jpeg")',backgroundSize:"cover",backgroundPosition:"center",position:"relative",minHeight:"50vh",display:"flex",alignItems:"center",justifyContent:"center",padding:t.spacing(4),[t.breakpoints.down("lg")]:{padding:t.spacing(3)},[t.breakpoints.down("md")]:{padding:t.spacing(2.5),minHeight:"45vh"},[t.breakpoints.down("sm")]:{padding:t.spacing(2),minHeight:"30vh",justifyContent:"center",textAlign:"center"},[t.breakpoints.down("xs")]:{padding:t.spacing(1.5),minHeight:"30vh"}})),qe=Ae`
3  0%, 100% {
4    box-shadow: 
5      inset 2px 2px 4px rgba(255, 255, 255, 0.1),
6      inset -2px -2px 4px rgba(0, 0, 0, 0.6),
7      0 4px 6px rgba(0, 0, 0, 0.3),
8      0 0 0 rgba(255, 215, 0, 0),
9      0 0 0 rgba(255, 165, 0, 0);
10  }
11  50% {
12    box-shadow: 
13      inset 2px 2px 4px rgba(255, 255, 255, 0.2),
14      inset -2px -2px 4px rgba(0, 0, 0, 0.6),
15      0 4px 6px rgba(0, 0, 0, 0.3),
16      0 0 40px rgba(255, 215, 0, 0.8),
17      0 0 60px rgba(255, 165, 0, 0.5);
18  }
19`,$e=Ae`
20  0%, 100% {
21    transform: scale(1);
22  }
23  50% {
24    transform: scale(1.08);
25  }
26`,He=Ae`
27  0% {
28    background-position: -200% center;
29  }
30  100% {
31    background-position: 200% center;
32  }
33`,Rr=tt(D)(({theme:t})=>({backgroundColor:"#000",color:"#fff",fontWeight:700,fontSize:"1.1rem",textTransform:"uppercase",width:"200px",height:"50px",borderRadius:"30px",position:"relative",overflow:"visible",marginTop:"30px",cursor:"pointer",[t.breakpoints.down("md")]:{width:"180px",height:"48px",fontSize:"1rem",marginTop:t.spacing(2.5)},[t.breakpoints.down("sm")]:{width:"160px",height:"45px",fontSize:"0.95rem",marginTop:t.spacing(2)},[t.breakpoints.down("xs")]:{width:"140px",height:"42px",fontSize:"0.85rem",marginTop:t.spacing(1.5)},backgroundImage:`
34    linear-gradient(
35      90deg,
36      transparent,
37      rgba(255, 255, 255, 0.1) 50%,
38      transparent
39    ),
40    linear-gradient(145deg, #1a1a1a, #000000),
41    linear-gradient(145deg, #d4af37, #ffd700)
42  `,backgroundSize:"200% 100%, cover, cover",backgroundOrigin:"border-box",backgroundClip:"padding-box, border-box",border:"4px solid transparent",boxShadow:`
43    inset 2px 2px 4px rgba(255, 255, 255, 0.1),
44    inset -2px -2px 4px rgba(0, 0, 0, 0.6),
45    0 4px 6px rgba(0, 0, 0, 0.3)
46  `,animation:`${qe} 2s ease-in-out infinite, ${$e} 2.5s ease-in-out infinite, ${He} 3s linear infinite`,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{backgroundColor:"#000",backgroundImage:`
47      linear-gradient(
48        90deg,
49        transparent,
50        rgba(255, 255, 255, 0.2) 50%,
51        transparent
52      ),
53      linear-gradient(145deg, #1a1a1a, #000000),
54      linear-gradient(145deg, #e5c158, #ffdf00)
55    `,backgroundSize:"200% 100%, cover, cover",backgroundOrigin:"border-box",backgroundClip:"padding-box, border-box",border:"4px solid transparent",boxShadow:`
56      inset 2px 2px 4px rgba(255, 255, 255, 0.25),
57      inset -2px -2px 4px rgba(0, 0, 0, 0.7),
58      0 8px 12px rgba(0, 0, 0, 0.5),
59      0 0 50px rgba(255, 215, 0, 0.9),
60      0 0 80px rgba(255, 165, 0, 0.6)
61    `,transform:"scale(1.12) translateY(-4px)",animation:`${qe} 1s ease-in-out infinite, ${$e} 1.5s ease-in-out infinite, ${He} 1.5s linear infinite`},"&:active":{boxShadow:`
62      inset 3px 3px 5px rgba(0, 0, 0, 0.7),
63      inset -3px -3px 5px rgba(255, 255, 255, 0.05),
64      0 2px 4px rgba(0, 0, 0, 0.3)
65    `,transform:"translateY(1px) scale(0.98)"}}));function vn(){return e.jsx(Or,{children:e.jsxs(je,{spacing:0,alignItems:"center",sx:{color:"#fff",textAlign:"center","& > *:not(:first-of-type)":{marginTop:0}},children:[e.jsxs(y,{variant:"h3",sx:{fontWeight:700,lineHeight:1.2,textAlign:"center",fontSize:{xs:"2.5rem",sm:"3rem",md:"3.5rem",lg:"4rem"}},children:[e.jsx(p,{component:"span",sx:{color:"#ff6600",fontWeight:700,display:"block",marginBottom:{xs:"4px",sm:"6px",md:"8px",lg:"10px"}},children:"AVAILABLE"}),e.jsx(p,{component:"span",sx:{color:"#fff",fontWeight:700,display:"block",marginBottom:{xs:"6px",sm:"8px",md:"10px",lg:"10px"}},children:"NOW ON"})]}),e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:0,marginTop:"-8px",marginBottom:"8px",[t=>t.breakpoints.down("md")]:{marginTop:"-6px",marginBottom:"6px"},[t=>t.breakpoints.down("sm")]:{marginTop:"-4px",marginBottom:"4px"}},className:"test",children:e.jsx(p,{sx:{height:{xs:32,sm:36,md:40,lg:42},display:"flex",alignItems:"center",marginTop:"-2px",borderRadius:"20px"},children:e.jsx(p,{component:"img",src:"/assets/shops/amazon.png",alt:"Available on Amazon",sx:{objectFit:"contain",display:"block",width:{xs:"180px",sm:"200px",md:"220px",lg:"240px"},height:"auto"}})})}),e.jsx(Rr,{onClick:()=>window.open(L.AMAZON_STORE,"_blank","noopener,noreferrer"),children:"SHOP NOW"})]})})}const Dr=oe(p),Mr=[{name:"TikTok Shop",href:L.TIKTOK_SHOP,icon:"/assets/findus/tiktokshopp.webp"},{name:"Amazon",href:L.AMAZON_STORE,icon:"/assets/logo/amazon.png"},{name:"eBay",href:L.EBAY,icon:"/assets/findus/ebayLogo.png"}],yt=()=>{const[t,r]=s.useState(0),o={infinite:!0,autoplay:!0,autoplaySpeed:2500,slidesToShow:3,slidesToScroll:1,arrows:!1,centerMode:!0,centerPadding:"0px",beforeChange:(n,a)=>r(a),responsive:[{breakpoint:1280,settings:{slidesToShow:3}},{breakpoint:960,settings:{slidesToShow:2}},{breakpoint:700,settings:{slidesToShow:1}}]};return e.jsxs(p,{sx:{position:"relative",width:"100%",py:6,backgroundImage:"url('/assets/ice-cubes.jpg')",backgroundSize:"cover",backgroundPosition:"center",overflow:"hidden"},children:[e.jsx(y,{variant:"h5",sx:{fontWeight:700,color:"#000",mb:3,textAlign:"center",textShadow:"2px 2px 6px rgba(0,0,0,0.4)"},children:"AVAILABLE NOW ON"}),e.jsx(At,{...o,children:Mr.map((n,a)=>e.jsxs(p,{sx:{display:"flex !important",justifyContent:"center",px:2,py:4,position:"relative"},children:[e.jsx(oe.div,{style:{position:"absolute",top:"50%",left:"50%",width:90,height:90,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.2), transparent 70%)",transform:"translate(-50%, -50%)",zIndex:0,pointerEvents:"none",border:"1px solid red"},animate:{scale:[0,2.5,0],opacity:[.3,0,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut",delay:a*.3}}),e.jsx(Te,{mode:"wait",children:t===a&&e.jsx(oe.div,{style:{position:"absolute",top:"50%",left:"50%",width:90,height:90,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.6), transparent 70%)",transform:"translate(-50%, -50%)",zIndex:1,pointerEvents:"none",border:"1px solid blue"},initial:{scale:0,opacity:1},animate:{scale:2.5,opacity:0}
65,exit:{scale:2.5,opacity:0},transition:{duration:.6,ease:"easeOut"}},`pop-${t}`)}),e.jsx(p,{component:"a",href:n.href,target:"_blank",rel:"noopener noreferrer",sx:{display:"block",textDecoration:"none",cursor:"pointer",outline:"none","&:focus":{outline:"none",boxShadow:"none"},"&:focus-visible":{outline:"none"},zIndex:2,position:"relative"},children:e.jsx(Dr,{component:"img",src:n.icon,alt:n.name,sx:{height:{xs:72,sm:96,md:125},width:"auto",maxWidth:{xs:140,sm:180,md:220},borderRadius:2,display:"block",outline:"none",border:"none","&:focus":{outline:"none"}},initial:{scale:0,opacity:0,rotate:-15},animate:{scale:t===a?1.15:1,opacity:1,rotate:0,y:[0,-8,0]},transition:{scale:{type:"spring",stiffness:250,damping:18},y:{duration:3,repeat:1/0,ease:"easeInOut",delay:a*.2}},whileHover:{scale:1.1,rotate:5}})})]},a))})]})},kn=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"})),Nr=()=>{const t=xe(),r=he(),[o,n]=s.useState(""),[a,i]=s.useState(""),[c,d]=s.useState(!1),{success:m,error:g}=Pr(),f=(h,u)=>{r(ut(!0)),window.scrollTo({top:0,behavior:"smooth"})},k=async()=>{const h=a.trim(),u=o.trim();if(!h){g("Please enter your email","Newsletter");return}if(!/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,})+$/.test(h)){g("Please enter a valid email address","Newsletter");return}try{d(!0),await Ie.post("/newsletter/subscribe",{name:u,email:h,source:"footer"}),m("Thanks for subscribing!","Newsletter"),Er("newsletter_signup"),n(""),i("")}catch(v){const l=v?.data?.message||"Subscription failed. Please try again later";g(l,"Newsletter")}finally{d(!1)}};return e.jsxs(p,{className:"bg-blue text-white ",children:[e.jsx(yt,{}),e.jsx(p,{className:"mt-2",children:e.jsxs(p,{className:"max-w-7xl mx-auto ",sx:{backgroundColor:"secondary.main"},children:[e.jsxs(te,{container:!0,spacing:6,paddingY:8,px:{xs:5,md:10},display:"flex",justifyContent:{xs:"start",md:"center"},flexDirection:{xs:"column",md:"row"},children:[e.jsxs(te,{item:!0,xs:12,md:3,display:"flex",flexDirection:"column",children:[e.jsx(I,{to:"/",className:"flex items-center  space-x-2 ",onClick:h=>f(),children:e.jsxs(p,{className:"relative",sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(p,{component:"img",src:"/assets/logo/cocaineWhite.webp",alt:"Cocaine Logo",sx:{height:{xs:"100px",sm:"100px",md:"120px"},width:"auto",objectFit:"contain"}}),e.jsx(p,{component:"img",src:"/assets/logo/hype - original1.svg",alt:"HYPE Logo",sx:{height:{xs:"87.5px",sm:"87.5px",md:"105px"},width:"auto",objectFit:"contain",opacity:.9}})]})}),e.jsxs(p,{sx:{display:"flex",justifyContent:"center",gap:1,mt:2},children:[e.jsx("a",{href:L.TIKTOK,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:40,height:40,border:"2px solid #ff6b35",backgroundColor:"background.paper",color:t.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#010101",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #010101"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:rt,size:"md"})})}),e.jsx("a",{href:L.FACEBOOK,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:40,height:40,border:"2px solid #ff6b35",backgroundColor:"background.paper",color:t.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#1877F2",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #1877F2"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:ot,size:"md"})})}),e.jsx("a",{href:L.INSTAGRAM,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:40,height:40,border:"2px solid #ff6b35",backgroundColor:"background.paper",color:t.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#E1306C",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #E1306C"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:nt,size:"md"})})}),e.jsx("a",{href:L.YOUTUBE,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:40,height:40,border:"2px s
65olid #ff6b35",backgroundColor:"background.paper",color:t.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#FF0000",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #FF0000"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:at,size:"md"})})}),e.jsx("a",{href:L.SNAPCHAT,target:"_blank",rel:"noreferrer",children:e.jsx(E,{sx:{width:40,height:40,border:"2px solid #ff6b35",backgroundColor:"background.paper",color:t.palette.warning.dark,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{color:"#FFFC00",backgroundColor:"grey.100",transform:"scale(1.15) rotate(5deg)",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"2px solid #FFFC00"},"&:active":{transform:"scale(1.05)"}},size:"small",children:e.jsx(W,{icon:st,size:"md"})})})]})]}),e.jsxs(te,{item:!0,xs:12,md:3,children:[e.jsx(y,{variant:"h6",sx:{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',color:"common.white",fontWeight:"semi-bold"},children:"MENU"}),e.jsxs(p,{sx:{gap:1.5,display:"flex",flexDirection:"column",mt:1.5},children:[e.jsx(I,{to:"/blog",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"OUR BLOG"})}),e.jsx(I,{to:"/shop",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"OUR STORE"})}),e.jsx(I,{to:"/findus",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"WHERE TO FIND US"})}),e.jsx(I,{to:"/wholesale",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"WHOLESALE"})})]})]}),e.jsxs(te,{item:!0,xs:12,md:3,children:[e.jsx(y,{variant:"h6",sx:{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',color:"white",fontWeight:"semi-bold"},children:"INFORMATION"}),e.jsxs(p,{sx:{gap:1.5,display:"flex",flexDirection:"column",mt:1.5},children:[e.jsx(I,{to:"/shipping",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,curs
65or:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"SHIPPING POLICY"})}),e.jsx(I,{to:"/privacy",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"PRIVACY POLICY"})}),e.jsx(I,{to:"/terms",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"TERMS OF USE"})}),e.jsx(I,{to:"/faq",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"FAQ"})}),e.jsx(I,{to:"/contact",style:{textDecoration:"none"},className:"block text-gray-300 hover:text-white transition-colors",onClick:h=>f(),children:e.jsx(y,{variant:"body2",sx:{fontWeight:"bold",color:"common.white",position:"relative",pl:3,cursor:"pointer",transition:"all 0.3s ease","&::before":{content:'""',position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"14px",height:"2px",backgroundColor:"warning.main",borderRadius:"2px",transition:"all 0.3s ease"},"&::after":{content:'""',position:"absolute",bottom:"-2px",left:"24px",width:0,height:"2px",backgroundColor:"warning.main",transition:"width 0.3s ease"},"&:hover":{color:"warning.main","&::before":{width:"18px",height:"3px"},"&::after":{width:"calc(100% - 24px)"}}},children:"CONTACT US"})})]})]}),e.jsx(te,{item:!0,xs:12,md:3,children:e.jsxs(p,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2},children:[e.jsx(p,{sx:{mt:3,display:"flex",justifyContent:{xs:"center",md:"flex-start"},alignItems:"center"},children:e.jsx(p,{component:"a",href:"https://www.convenience.org/",target:"_blank",rel:"noopener noreferrer",sx:{cursor:"pointer",display:"inline-block",zIndex:10,textDecoration:"none",transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{transform:"translateY(-8px) scale(1.1)","& img":{transform:"scale(1.1) rotate(3deg)",filter:"brightness(1.15) saturate(1.3)"}},"&:active":{transform:"translateY(-4px) scale(1.05)"}},tabIndex:0,children:e.jsx(p,{component:"img",src:"/assets/logo/NACS.png",alt:"NACS Certification",sx:{height:"auto",width:{xs:"100px",sm:"110px",md:"120px"},maxWidth:"100%",objectFit:"contain",pointerEvents:"auto",transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)",borderRadius:"8px",backgroundColor:"rgba(255, 255, 255, 0.05)",padding:"4px",display:"block"}})})}),e.jsxs(p,{children:[" ",e.jsx(y,{variant:"h6",sx:{fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',color:"white",fontWeight:"semi-bold"},children:"JOIN OUR NEWSLETTER LIST"}),e.jsxs(p,{sx:{gap:1.5,display:"flex",flexDirection:"column",mt:1.5},children:[e.jsx(K,{placeholder:"Name",variant:"outlined",size:"small",className:"w-full",value:o,onChange:h=>n(h.target.value),sx:{"& .MuiOutlinedInput-root":{backgroundColor:"white","& fieldset":{borderColor:"white"},"&:hover fieldset":{borderColor:"white"},"&.Mui-focused fieldset":{borderColor:"white"}},"& .MuiInputBase-input":{color:"black"}}}),e.jsx(K,{placeholder:"Email",variant:"outlined",size:"small",className:"w-full",value:a,onChange:h=>i(h.target.value),sx:{"& .MuiOutlinedInput-root":{backgroundColor:"white","& fieldset":{borderColor:"white"},"&:hover fieldset":{borderColor:"white"},"&.Mui-focused fieldset":{borderColor:"white"}},"& .MuiInputBase-input":{color:"black"}}}),e.jsx(D,{variant:"contained",size:"large",sx:{backgroundColor:"orange",padding:{xs:"10px 24px",sm:"12px 32px"},fontSize:{xs:"0.9rem",sm:"1rem"},fontWeight:"bold",transform:"translateY(0)",transition:"all 0.3s ease",minWidth:"auto","&:hover":{backgroundColor:"darkorange",transform:"translateY(-5px)",boxShadow:"0 10px 20px rgba(0,0,0,0.2)"}},disabled:c,onClick:k,children:c?"SUBSCRIBING...":"SUBSCRIBE"})]})]})]})})]}),e.jsx(p,{px:{xs:5,md:10}
65,className:"mt-8 pt-6 border-t",sx:{display:"flex",justifyContent:"center",borderColor:"rgba(255, 255, 255, 0.3)"},children:e.jsxs(y,{variant:"body2",className:"text-center leading-relaxed",sx:{fontSize:{xs:"13px",sm:"13px",md:"16px"},textAlign:"center",color:"white",fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif'},children:["*Disclaimer: Consume responsibly. Not suitable for children or individuals sensitive to caffeine. Not recommended for children, pregnant, or nursing women. Consult a doctor if you have health concerns about caffeine. Cocaine Energy Supplement® products are not associated with any drugs. We do not advertise, promote, or sell any illegal substances. Our beverages are formulated solely as energy drinks for legal consumption.",e.jsx("br",{}),e.jsx("br",{}),"©",new Date().getFullYear()," Hype Beverages. All Rights Reserved. Unauthorized use, reproduction, or distribution of any content, images, or trademarks on this site is strictly prohibited. Hype Beverages and its logo are trademarks of Hype Beverages."]})}),e.jsxs(p,{px:{xs:5,md:10},sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",pb:2},className:"mt-6 text-center",children:[e.jsxs(y,{variant:"body2",sx:{fontSize:{xs:"13px",sm:"13px",md:"16px"},color:"white",fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif'},children:["©",new Date().getFullYear()," Cocaine Energy Supplement®. All Rights Reserved"]}),e.jsx("br",{}),e.jsx(y,{variant:"body2",className:"mt-1",sx:{fontSize:{xs:"13px",sm:"13px",md:"16px"},color:"white",fontFamily:'"Montserrat", system-ui, Avenir, Helvetica, Arial, sans-serif',pb:"20px"},children:"Made with  ❤️ by CATARA ADVERTISING"})]})]})})]})},Lr=()=>{const t="https://server.hypebeverages.com/api";return t.endsWith("/api")?t:`${t}/api`},ve=Nt({baseUrl:Lr(),prepareHeaders:t=>{const r=localStorage.getItem("token");return r&&t.set("authorization",`Bearer ${r}`),t}}),zr=async(t,r,o)=>{let n=await ve(t,r,o);if(n.error&&n.error.status===401)try{const a=localStorage.getItem("refreshToken");if(!a)return n;const i=await ve({url:"/auth/refresh-token",method:"POST",body:{refreshToken:a}},r,o);if(i.data?.data?.token){const c=i.data.data.token,d=i.data.data.refreshToken;localStorage.setItem("token",c),d&&localStorage.setItem("refreshToken",d),n=await ve(t,r,o)}else{try{if(i?.data&&i.data.success===!1&&i.data.message==="Invalid refresh token"){const{notifyInvalidSession:c}=await j(async()=>{const{notifyInvalidSession:d}=await import("./notifications-D6GQbdmJ.js");return{notifyInvalidSession:d}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));c()}}catch{}localStorage.removeItem("token"),localStorage.removeItem("refreshToken")}}catch{}return n},me=Lt({reducerPath:"api",baseQuery:zr,tagTypes:["User","Product","Order","Category","Blog","Coupon","Banner","SupportUser"],endpoints:t=>({login:t.mutation({query:r=>({url:"/auth/login",method:"POST",body:r}),invalidatesTags:["User"]}),register:t.mutation({query:r=>({url:"/auth/register",method:"POST",body:r}),invalidatesTags:["User"]}),getProfile:t.query({query:()=>"/auth/profile",providesTags:["User"]}),logout:t.mutation({query:()=>({url:"/auth/logout",method:"POST"}),invalidatesTags:["User"]}),getProducts:t.query({query:(r={})=>({url:"/products",params:r}),providesTags:["Product"]}),getProduct:t.query({query:r=>`/products/${r}`,providesTags:(r,o,n)=>[{type:"Product",id:n}]}),adminGetProducts:t.query({query:(r={})=>({url:"/admin/products",params:r}),providesTags:["Product"]}),adminGetProductById:t.query({query:r=>`/admin/products/${r}`,providesTags:(r,o,n)=>[{type:"Product",id:n}]}),adminCreateProduct:t.mutation({query:r=>({url:"/admin/products",method:"POST",body:r}),invalidatesTags:["Product"]}),adminUpdateProduct:t.mutation({query:({id:r,productData:o})=>({url:`/admin/products/${r}`,method:"PUT",body:o}),invalidatesTags:(r,o,{id:n})=>[{type:"Product",id:n},"Product"]}),adminDeleteProduct:t.mutation({query:r=>({url:`/admin/products/${r}`,method:"DELETE"}),invalidatesTags:["Product"]}),getBlogs:t.query({query:(r={})=>({url:"/blogs",params:r}),providesTags:["Blog"]}),getBlogBySlug:t.query({query:r=>`/blogs/${r}`,providesTags:(r,o,n)=>[{type:"Blog",id:n}]}),getBlogCategories:t.query({query:()=>"/blogs/categories",providesTags:["Blog"]}),getBlogTags:t.query({query:()=>"/blogs/tags",providesTags:["Blog"]}),adminGetBlogs:t.query({query:(r={})=>({url:"/admin/blogs",params:r}),providesTags:["Blog"]}),adminGetBlogById:t.query({query:r=>`/admin/blogs/${r}`,providesTags:(r,o,n)=>[{type:"Blog",id:n}]}),adminCreateBlog:t.mutation({query:r=>({url:"/admin/blogs",method:"POST",body:r}),invalidatesTags:["Blog"]}),adminUpdateBlog:t.mutation({query:({id:r,blogData:o})=>({url:`/admin/blogs/${r}`,method:"PUT",body:o}),invalidatesTags:(r,o,{id:n})=>[{type:"Blog",id:n}]}),adminDeleteBlog:t.mutation({query:r=>({url:`/admin/blogs/${r}`,method:"DELETE"}),invalidatesTags:["Blog"]}),createGuestOrder:t.mutation({query:r=>({url:"/orders/guest",method:"POST",body:r}),invalidatesTags:["Order","Product"]}),createOrder:t.mutation({query:r=>({url:"/orders",method:"POST",body:r}),invalidatesTags:["Order","Product"]}),chargeMpnPayment:t.mutation({query:({orderId:r,card:o})=>({url:"/payments/mpn/charge",method:"POST",body:{orderId:r,card:o}})}),adminGetOrders:t.query({query:(r={})=>({url:"/admin/orders",params:r}),providesTags:["Order"]}),adminSetOrderTracking:t.mutation({query:({id:r,trackingNumber:o})=>({url:`/admin/orders/${r}/tracking`,method:"PUT",body:{trackingNumber:o}}),invalidatesTags:["Order"]}),adminUpdateOrderStatus:t.mutation({query:({id:r,status:o,note:n,trackingNumber:a})=>({url:`/admin/orders/${r}/status`,method:"PUT",body:{status:o,note:n,trackingNumber:a}}),invalidatesTags:["Order"]}),adminUpdateOrderNumber:t.mutation({query:({id:r,orderNumber:o})=>({url:`/admin/orders/${r}/order-number`,method:"PUT",body:{orderNumber:o}}),invalidatesTags:["Order"]}),adminUpdateOrderPaymentStatus:t.mutation({query:({id:r,paymentStatus:o})=>({url:`/admin/orders/${r}/payment-status`,method:"PUT",body:{paymentStatus:o}}),invalidatesTags:["Order"]}),getOrderByNumber:t.query({query:({orderNumber:r,email:o})=>`/orders/guest/${r}?email=${encodeURIComponent(o||"")}`,providesTags:(r,o,n)=>[{type:"Order",id:n?.orderNumber}]}
65),validateCoupon:t.mutation({query:({code:r,subtotal:o,shippingFee:n,items:a,email:i})=>({url:"/coupons/validate",method:"POST",body:{code:r,subtotal:o,shippingFee:n,items:a,email:i}})}),adminGetCoupons:t.query({query:(r={})=>({url:"/coupons",params:r}),providesTags:["Coupon"]}),adminGetCategories:t.query({query:()=>"/admin/categories",providesTags:["Category"]}),adminGetCouponById:t.query({query:r=>`/coupons/${r}`,providesTags:(r,o,n)=>[{type:"Coupon",id:n}]}),adminCreateCoupon:t.mutation({query:r=>({url:"/coupons",method:"POST",body:r}),invalidatesTags:["Coupon"]}),adminUpdateCoupon:t.mutation({query:({id:r,couponData:o})=>({url:`/coupons/${r}`,method:"PUT",body:o}),invalidatesTags:(r,o,{id:n})=>[{type:"Coupon",id:n}]}),adminDeleteCoupon:t.mutation({query:r=>({url:`/coupons/${r}`,method:"DELETE"}),invalidatesTags:["Coupon"]}),getActiveBanner:t.query({query:r=>`/banners/active/${r}`,providesTags:(r,o,n)=>[{type:"Banner",id:n},"Banner"]}),adminGetBanners:t.query({query:()=>"/banners",providesTags:["Banner"]}),adminGetBannerById:t.query({query:r=>`/banners/${r}`,providesTags:(r,o,n)=>[{type:"Banner",id:n}]}),adminCreateBanner:t.mutation({query:r=>({url:"/banners",method:"POST",body:r}),invalidatesTags:["Banner"]}),adminUpdateBanner:t.mutation({query:({id:r,bannerData:o})=>({url:`/banners/${r}`,method:"PUT",body:o}),invalidatesTags:(r,o,{id:n})=>[{type:"Banner",id:n},"Banner"]}),adminDeleteBanner:t.mutation({query:r=>({url:`/banners/${r}`,method:"DELETE"}),invalidatesTags:["Banner"]}),adminGetSupportUsers:t.query({query:()=>"/admin/support-users",providesTags:["SupportUser"]}),adminCreateSupportUser:t.mutation({query:r=>({url:"/admin/support-users",method:"POST",body:r}),invalidatesTags:["SupportUser"]}),adminUpdateSupportUser:t.mutation({query:({id:r,data:o})=>({url:`/admin/support-users/${r}`,method:"PUT",body:o}),invalidatesTags:(r,o,{id:n})=>[{type:"SupportUser",id:n},"SupportUser"]}),adminResetSupportUserPassword:t.mutation({query:({id:r,password:o})=>({url:`/admin/support-users/${r}/password`,method:"PUT",body:{password:o}})}),calculateShipping:t.mutation({query:r=>({url:"/shipping/calculate",method:"POST",body:r})})})}),{useLoginMutation:wn,useRegisterMutation:jn,useGetProfileQuery:Cn,useLogoutMutation:Sn,useGetProductsQuery:Fr,useGetProductQuery:Tn,useAdminGetProductsQuery:_n,useAdminGetProductByIdQuery:An,useAdminCreateProductMutation:In,useAdminUpdateProductMutation:Pn,useAdminDeleteProductMutation:En,useGetBlogsQuery:On,useGetBlogBySlugQuery:Rn,useGetBlogCategoriesQuery:Dn,useGetBlogTagsQuery:Mn,useAdminGetBlogsQuery:Nn,useAdminGetBlogByIdQuery:Ln,useAdminCreateBlogMutation:zn,useAdminUpdateBlogMutation:Fn,useAdminDeleteBlogMutation:Bn,useCreateGuestOrderMutation:Un,useCreateOrderMutation:Wn,useChargeMpnPaymentMutation:qn,useAdminGetOrdersQuery:$n,useAdminSetOrderTrackingMutation:Hn,useAdminUpdateOrderStatusMutation:Vn,useAdminUpdateOrderNumberMutation:Gn,useAdminUpdateOrderPaymentStatusMutation:Yn,useGetOrderByNumberQuery:Kn,useCalculateShippingMutation:Qn,useValidateCouponMutation:Jn,useAdminGetCouponsQuery:Xn,useAdminGetCategoriesQuery:Zn,useAdminGetCouponByIdQuery:ea,useAdminCreateCouponMutation:ta,useAdminUpdateCouponMutation:ra,useAdminDeleteCouponMutation:oa,useGetActiveBannerQuery:Br,useAdminGetBannersQuery:na,useAdminGetBannerByIdQuery:aa,useAdminCreateBannerMutation:sa,useAdminUpdateBannerMutation:ia,useAdminDeleteBannerMutation:la,useAdminGetSupportUsersQuery:ca,useAdminCreateSupportUserMutation:da,useAdminUpdateSupportUserMutation:ua,useAdminResetSupportUserPasswordMutation:pa}=me,Ve="promoPopupDismissed",Ur=()=>{const t=Je(),{data:r}=Br("homepage_popup"),o=r?.data?.banner,[n,a]=s.useState(!1);s.useEffect(()=>{if(!o?.imageUrl)return;let g=!1;try{g=sessionStorage.getItem(Ve)==="1"}catch{}g||a(!0)},[o]);const i=()=>{a(!1);try{sessionStorage.setItem(Ve,"1")}catch{}},c=()=>{i(),t("/shop")},d=()=>i(),m=g=>{g.stopPropagation(),i()};return o?.imageUrl?e.jsx(Gt,{open:n,onClose:d,sx:{display:"flex",alignItems:"center",justifyContent:"center",p:{xs:1.5,sm:3},backdropFilter:"blur(4px)"},children:e.jsxs(p,{onClick:c,role:"button",tabIndex:0,sx:{position:"relative",width:"100%",maxWidth:1040,maxHeight:"90vh",bgcolor:"background.paper",borderRadius:3,overflowX:"hidden",overflowY:"auto",cursor:"pointer",outline:"none",boxShadow:24,display:"flex"},children:[e.jsx(E,{onClick:m,"aria-label":"Close",sx:{position:"absolute",top:12,right:12,zIndex:1,bgcolor:"rgba(0,0,0,0.55)",color:"#fff","&:hover":{bgcolor:"rgba(0,0,0,0.75)"}},children:e.jsx(Y,{})}),e.jsx(p,{component:"img",src:Q(o.imageUrl),alt:"Special offer",sx:{width:"100%",height:"auto",display:"block"}})]})}):null},vt=5554026653,Ge="gcr-opt-in-platform-js",Ye="merchantWidgetScript";let ue=null,pe=null;const Wr=()=>ue||(ue=new Promise((t,r)=>{if(window.gapi?.surveyoptin){t();return}if(window.renderOptIn=function(){window.gapi.load("surveyoptin",t)},document.getElementById(Ge))return;const o=document.createElement("script");o.id=Ge,o.src="https://apis.google.com/js/platform.js?onload=renderOptIn",o.async=!0,o.defer=!0,o.onerror=r,document.head.appendChild(o)}),ue),qr=()=>pe||(pe=new Promise((t,r)=>{if(window.merchantwidget){t();return}const o=document.getElementById(Ye);if(o){o.addEventListener("load",t,{once:!0}),o.addEventListener("error",r,{once:!0});return}const n=document.createElement("script");
65n.id=Ye,n.src="https://www.gstatic.com/shopping/merchant/merchantwidget.js",n.defer=!0,n.addEventListener("load",t,{once:!0}),n.addEventListener("error",r,{once:!0}),document.head.appendChild(n)}),pe),$r=(t,r=5)=>{const o=new Date(t||Date.now());let n=0;for(;n<r;){o.setDate(o.getDate()+1);const a=o.getDay();a!==0&&a!==6&&(n+=1)}return o.toISOString().slice(0,10)},Hr=t=>t?.customer?.customerType==="registered"&&t.customer.userId?.email?t.customer.userId.email:t?.customer?.guestInfo?.email||"",ma=async(t,r="")=>{if(!t?.orderNumber)return;const o=`gcr_optin_fired_${t.orderNumber}`;if(sessionStorage.getItem(o))return;const n=Hr(t)||r,a=t?.shipping?.address?.country;if(!(!n||!a)){sessionStorage.setItem(o,"1");try{await Wr(),window.gapi.surveyoptin.render({merchant_id:vt,order_id:t.orderNumber,email:n,delivery_country:a,estimated_delivery_date:$r(t.createdAt)})}catch{sessionStorage.removeItem(o)}}},Vr=async(t="BOTTOM_LEFT",r="US")=>{try{await qr(),window.merchantwidget?.start({merchant_id:vt,position:t,region:r})}catch{}},Gr=()=>{const t=s.useRef(!1);return s.useEffect(()=>{t.current||(t.current=!0,Vr())},[]),null},Yr=()=>e.jsx(Yt,{maxWidth:"lg",sx:{py:{xs:3,md:5}},children:e.jsxs(je,{spacing:3,children:[e.jsx(re,{variant:"rectangular",height:56,sx:{borderRadius:1}}),e.jsxs(je,{direction:{xs:"column",md:"row"},spacing:3,children:[e.jsx(re,{variant:"rectangular",height:260,sx:{flex:1,borderRadius:1}}),e.jsx(re,{variant:"rectangular",height:260,sx:{flex:1,borderRadius:1}}),e.jsx(re,{variant:"rectangular",height:260,sx:{flex:1,borderRadius:1,display:{xs:"none",md:"block"}}})]}),e.jsx(re,{variant:"rectangular",height:420,sx:{borderRadius:1}})]})}),Kr=()=>e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(Ur,{}),e.jsx(Gr,{}),e.jsx(Ar,{}),e.jsx("main",{className:"flex-1",children:e.jsx(s.Suspense,{fallback:e.jsx(Yr,{}),children:e.jsx(It,{})})}),e.jsx(Nr,{})]});s.lazy(()=>j(()=>import("./CustomerLayout-1Wf9rZL8.js"),__vite__mapDeps([9,1,2,3,6])));const Qr=s.lazy(()=>j(()=>import("./AdminLayout-NGyczs3B.js"),__vite__mapDeps([10,1,2,3,6,4,5,7,8]))),Jr=s.lazy(()=>j(()=>import("./HomePage-QkZhL5EE.js"),__vite__mapDeps([11,1,2,3,6,12,13,4,5,7,8]))),Xr=s.lazy(()=>j(()=>import("./ProductDetailsPage-BiC6sYNT.js"),__vite__mapDeps([14,1,2,3,15,6,7,16,4,5,8]))),Zr=s.lazy(()=>j(()=>import("./ShopPage-BhMo639l.js"),__vite__mapDeps([17,1,2,3,6,4,5,7,8]))),eo=s.lazy(()=>j(()=>import("./LoginPage-DbLvG73N.js"),__vite__mapDeps([18,1,2,3,6]))),to=s.lazy(()=>j(()=>import("./RegisterPage-DkeDQ5Zy.js"),__vite__mapDeps([19,1,2,3,6]))),ro=s.lazy(()=>j(()=>import("./CheckoutPage-CpyOWi_h.js"),__vite__mapDeps([20,1,2,3,6,21,16,4,5,7,8]))),oo=s.lazy(()=>j(()=>import("./CheckoutSuccessPage-CO-LyzSw.js"),__vite__mapDeps([22,1,2,3,6,16,4,5,7,8]))),no=s.lazy(()=>j(()=>import("./CartPage-D2EMOpMz.js"),__vite__mapDeps([23,1,2,3,15,6,16,4,5,7,8]))),ao=s.lazy(()=>j(()=>import("./OrderTrackingPage-xjsrWa-x.js"),__vite__mapDeps([24,1,2,3,6,4,5,7,8]))),so=s.lazy(()=>j(()=>import("./TermsOfUsePage-Bv-QjH-7.js"),__vite__mapDeps([25,1,2,3,6]))),io=s.lazy(()=>j(()=>import("./BlogListingPage--oNyeqqM.js"),__vite__mapDeps([26,1,2,3,13,6,4,5,7,8]))),lo=s.lazy(()=>j(()=>import("./BlogDetailPage--FDKbWB0.js"),__vite__mapDeps([27,1,2,3,13,6,28,4,5,7,8]))),co=s.lazy(()=>j(()=>import("./WholesalePage-BY1C4QVN.js"),__vite__mapDeps([29,1,2,3,12,6,4,5,7,8]))),uo=s.lazy(()=>j(()=>import("./AdminLoginPage-Cw4RPPVb.js"),__vite__mapDeps([30,1,2,3,15,6,4,5,7,8]))),po=s.lazy(()=>j(()=>import("./FindUsPage-CCoEcmG-.js"),__vite__mapDeps([31,1,2,3,6,32,8,4,5,7]))),mo=s.lazy(()=>j(()=>import("./AboutPage-CBtJUu6J.js"),__vite__mapDeps([33,1,2,3,12,6]))),go=s.lazy(()=>j(()=>import("./ContactPage-CeHiAuIT.js"),__vite__mapDeps([34,1,2,3,15,6,4,5,7,8]))),ho=s.lazy(()=>j(()=>import("./FAQPage-DJ8MKg5X.js"),__vite__mapDeps([35,1,2,3,6])));s.lazy(()=>j(()=>import("./OrdersPage-1-ezgtaJ.js"),__vite__mapDeps([36,1,2,3,6])));s.lazy(()=>j(()=>import("./ProfilePage-C4CDQOd-.js"),__vite__mapDeps([37,1,2,3,6])));s.lazy(()=>j(()=>import("./WishlistPage-BRJAVq-L.js"),__vite__mapDeps([38,1,2,3,6])));const xo=s.lazy(()=>j(()=>import("./AdminDashboard-DUjku1jb.js"),__vite__mapDeps([39,1,2,3,6,4,5,7,8]))),fo=s.lazy(()=>j(()=>import("./AdminProducts-CTsR6fEo.js"),__vite__mapDeps([40,1,2,3,15,6,21,4,5,7,8]))),bo=s.lazy(()=>j(()=>import("./AdminOrders-D191H3Hu.js"),__vite__mapDeps([41,1,2,3,6,4,5,7,8]))),yo=s.lazy(()=>j(()=>import("./AdminUsers-2V4PF7yn.js"),__vite__mapDeps([42,1,2,3,6]))),vo=s.lazy(()=>j(()=>import("./AdminBlogs-Dvipp5wf.js"),__vite__mapDeps([43,1,2,3,13,6,4,5,7,8]))),Ke=s.lazy(()=>j(()=>import("./AdminBlogForm-j-JCH3dQ.js"),__vite__mapDeps([44,1,2,3,13,6,4,5,7,8]))),ko=s.lazy(()=>j(()=>import("./AdminNewsletter-CDXcLgGR.js"),__vite__mapDeps([45,1,2,3,21,6,4,5,7,8]))),wo=s.lazy(()=>j(()=>import("./AdminDistributors-CLrKwm3H.js"),__vite__mapDeps([46,1,2,3,21,6,4,5,7,8]))),jo=s.lazy(()=>j(()=>import("./AdminWholesale-C_ZQZEHP.js"),__vite__mapDeps([47,1,2,3,6,4,5,7,8]))),Co=s.lazy(()=>j(()=>import("./AdminCoupons-QFOFLd0s.js"),__vite__mapDeps([48,1,2,3,21,6,4,5,7,8]))),So=s.lazy(()=>j(()=>import("./AdminBanners-BxbQIJ6L.js"),__vite__mapDeps([49,1,2,3,21,6,4,5,7,8]))),To=s.lazy(()=>j(()=>import("./AdminSupportUsers-Dw4TL1LW.js"),__vite__mapDeps([50,1,2,3,21,6,4,5,7,8]))),_o=s.lazy(()=>j(()=>import("./PrivacyPolicy-Br3RZsyy.js"),__vite__mapDeps([51,1,2,3,6]))),Ao=s.lazy(()=>j(()=>import("./ShippingPolicy-D2I0nCAP.js"),__vite__mapDeps([52,1,2,3,6]))),Io=s.lazy(()=>j(()=>import("./NotFoundPage-B4KnYwVN.js"),__vite__mapDeps([53,1,2,3,6]))),Po=(t,r)=>r?Array.isArray(r)?r.includes(t):t===r:!0,Qe=t=>Array.isArray(t)?t.includes("admin"):t==="admin",Eo=({children:t,requiredRole:r})=>{const{isAuthenticated:o,user:n,isLoading:a,logout:i}=Pe(),[c,d]=s.useState(!0),[m,g]=s.useState(null),f=s.useMemo(()=>{const k=localStorage.getItem("token");if(!k)return{hasToken:!1,expired:!0};try{return{hasToken:!0,expired:(JSON.parse(atob(k.split(".")[1])).exp||0)*1e3<=Date.now()}}catch{return{hasToken:!0,expired:!0}}},[o]);return s.useEffect(()=>{let k=!1;return(async()=>
65{if(!a){if(!o){g(Qe(r)?"/admin/login":"/login"),d(!1);return}if(r&&!Po(n?.role,r)){g("/"),d(!1);return}if(Qe(r)&&f.expired)try{const u=(()=>{const b="https://server.hypebeverages.com/api";return b.endsWith("/api")?b:`${b.replace(/\/$/,"")}/api`})(),x=localStorage.getItem("refreshToken");if(!x){i(),g("/admin/login"),d(!1);return}const v=await fetch(`${u}/auth/refresh-token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({refreshToken:x})});if(!v.ok)throw new Error("refresh failed");const l=await v.json();if(l?.success&&l?.data?.token)localStorage.setItem("token",l.data.token),l.data.refreshToken&&localStorage.setItem("refreshToken",l.data.refreshToken);else{try{if(l&&l.success===!1&&l.message==="Invalid refresh token"){const{notifyInvalidSession:b}=await j(async()=>{const{notifyInvalidSession:C}=await import("./notifications-D6GQbdmJ.js");return{notifyInvalidSession:C}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));b()}}catch{}throw new Error("no token")}}catch{if(!k){i(),g("/admin/login"),d(!1);return}}k||d(!1)}})(),()=>{k=!0}},[o,a,r,f.expired,n,i]),a||c?e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",width:"100%",fontSize:"14px",color:"#666"},children:"Loading..."}):m?e.jsx(Se,{to:m,replace:!0}):t},Oo=()=>e.jsx(Se,{to:"/admin/dashboard",replace:!0}),z=({section:t,children:r})=>{const{user:o}=Pe();return o?.role==="admin"||o?.role==="support"&&Array.isArray(o?.allowedSections)&&o.allowedSections.includes(t)?r:e.jsx(Se,{to:"/admin/dashboard",replace:!0})},Ro=t=>{s.useEffect(()=>{window.dataLayer=window.dataLayer||[];const o=setTimeout(()=>{window.dataLayer.push({event:"virtualPageview",page_path:t.pathname+t.search,page_title:document.title})},0);return()=>clearTimeout(o)},[t])},Do=({isAuthenticated:t,user:r})=>{const o=ge();return Ro(o),e.jsx(Te,{mode:"wait",children:e.jsxs(Et,{location:o,children:[e.jsxs(T,{path:"/",element:e.jsx(Kr,{}),children:[e.jsx(T,{path:"admin/login",element:e.jsx(uo,{})}),e.jsx(T,{index:!0,element:e.jsxs(P,{routeKey:"/",children:[" ",e.jsx(Jr,{})," "]})}),e.jsx(T,{path:"shop",element:e.jsxs(P,{routeKey:"/shop",children:[" ",e.jsx(Zr,{})," "]})}),e.jsx(T,{path:"products/:id",element:e.jsxs(P,{routeKey:"/products/:id",children:[" ",e.jsx(Xr,{})," "]})}),e.jsx(T,{path:"cart",element:e.jsxs(P,{routeKey:"/cart",children:[" ",e.jsx(no,{})," "]})}),e.jsx(T,{path:"checkout",element:e.jsxs(P,{routeKey:"/checkout",children:[" ",e.jsx(ro,{})," "]})}),e.jsx(T,{path:"checkout/success",element:e.jsxs(P,{routeKey:"/checkout/success",children:[" ",e.jsx(oo,{})," "]})}),e.jsx(T,{path:"track-order",element:e.jsxs(P,{routeKey:"/track-order",children:[" ",e.jsx(ao,{})," "]})}),e.jsx(T,{path:"login",element:e.jsxs(P,{routeKey:"/login",children:[" ",e.jsx(eo,{})," "]})}),e.jsx(T,{path:"register",element:e.jsxs(P,{routeKey:"/register",children:[" ",e.jsx(to,{})," "]})}),e.jsx(T,{path:"findus",element:e.jsxs(P,{routeKey:"/findus",children:[" ",e.jsx(po,{})," "]})}),e.jsx(T,{path:"contact",element:e.jsxs(P,{routeKey:"/contact",children:[" ",e.jsx(go,{})," "]})}),e.jsx(T,{path:"about",element:e.jsxs(P,{routeKey:"/about",children:[" ",e.jsx(mo,{})," "]})}),e.jsx(T,{path:"terms",element:e.jsxs(P,{routeKey:"/terms",children:[" ",e.jsx(so,{})," "]})}),e.jsx(T,{path:"shipping",element:e.jsxs(P,{routeKey:"/shipping",children:[" ",e.jsx(Ao,{})," "]})}),e.jsx(T,{path:"privacy",element:e.jsxs(P,{routeKey:"/privacy",children:[" ",e.jsx(_o,{})," "]})}),e.jsx(T,{path:"wholesale",element:e.jsxs(P,{routeKey:"/wholesale",children:[" ",e.jsx(co,{})," "]})}),e.jsx(T,{path:"faq",element:e.jsxs(P,{routeKey:"/faq",children:[" ",e.jsx(ho,{})," "]})}),e.jsx(T,{path:"blog",element:e.jsxs(P,{routeKey:"/blog",children:[" ",e.jsx(io,{})," "]})}),e.jsx(T,{path:"blog/:slug",element:e.jsxs(P,{routeKey:"/blog/:slug",children:[" ",e.jsx(lo,{})," "]})})]}),e.jsxs(T,{path:"/admin",element:e.jsx(Eo,{requiredRole:["admin","support"],children:e.jsx(Qr,{})}),children:[e.jsx(T,{index:!0,element:e.jsx(Oo,{})}),e.jsx(T,{path:"dashboard",element:e.jsx(xo,{})}),e.jsx(T,{path:"products",element:e.jsx(z,{section:"products",children:e.jsx(fo,{})})}),e.jsx(T,{path:"orders",element:e.jsx(z,{section:"orders",children:e.jsx(bo,{})})}),e.jsx(T,{path:"users",element:e.jsx(z,{section:"users",children:e.jsx(yo,{})})}),e.jsx(T,{path:"blogs",element:e.jsx(z,{section:"blogs",children:e.jsx(vo,{})})}),e.jsx(T,{path:"blogs/create",element:e.jsx(z,{section:"blogs",children:e.jsx(Ke,{})})}),e.jsx(T,{path:"blogs/edit/:id",element:e.jsx(z,{section:"blogs",children:e.jsx(Ke,{})})}),e.jsx(T,{path:"newsletter",element:e.jsx(z,{section:"newsletter",children:e.jsx(ko,{})})}),e.jsx(T,{path:"distributors",element:e.jsx(z,{section:"distributors",children:e.jsx(wo,{})})}),e.jsx(T,{path:"wholesale",element:e.jsx(z,{section:"wholesale",children:e.jsx(jo,{})})}),e.jsx(T,{path:"coupons",element:e.jsx(z,{section:"coupons",children:e.jsx(Co,{})})}),e.jsx(T,{path:"banners",element:e.jsx(z,{section:"banners",children:e.jsx(So,{})})}),e.jsx(T,{path:"support-users",element:e.jsx(z,{section:"support-users",children:e.jsx(To,{})})})]}),e.jsx(T,{path:"*",element:e.jsx(P,{routeKey:"404",children:e.jsx(Io,{})})})]},o.pathname)})},Mo=()=>{const{isAuthenticated:t,user:r}=Pe();return e.jsxs(Pt,{children:[e.jsx(mr,{}),e.jsx(fr,{}),e.jsx(s.Suspense,{fallback:null,children:e.jsx(Do,{isAuthenticated:t,user:r})})]})},kt=s.createContext(),ga=()=>{const t=s.useContext(kt);if(!t)throw new Error("useMUITheme must be used within an MUIThemeProvider");return t},No=({children:t})=>{const r=J(n=>n?.ui?.theme)||"light",o=Kt({palette:{mode:r==="dark"?"dark":"light",primary:{main:"#E85D05",light:"#E85D05",dark:"#d95a09"},secondary:{main:"#B50404",light:"#B50404",dark:"#B50404"},green:{main:"#1E6B24",light:"#1E6B24",dark:"#1E6B24"},error:{main:"#d32f2f",light:"#e57373",dark:"#b71c1c"},warning:{main:"#ff9800",light:"#ffb74d",dark:"#f57c00"},info:{main:"#2196f3",light:"#64b5f6",dark:"#1976d2"},success:{main:"#4caf50",light:"#81c784",dark:"#388e3c"},common:{white:"#ffffff",black:"#000000"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"}
65,text:{primary:r==="dark"?"#ffffff":"#333333",secondary:r==="dark"?"#b0b0b0":"#666666",disabled:r==="dark"?"#707070":"#999999"},background:{default:r==="dark"?"#0f172a":"#fafafa",paper:r==="dark"?"#1e293b":"#ffffff"}},typography:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',h1:{fontFamily:'"HeadingFont", "Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:400,textTransform:"uppercase",letterSpacing:"2px"},h2:{fontFamily:'"HeadingFont", "Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:400,textTransform:"uppercase",letterSpacing:"1px"},h3:{fontFamily:'"HeadingFont", "Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:400,textTransform:"uppercase"},h4:{fontFamily:'"HeadingFont", "Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:400},h5:{fontFamily:'"HeadingFont", "Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:400},h6:{fontFamily:'"HeadingFont", "Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:400,textTransform:"uppercase",letterSpacing:"1px"},body1:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:400,lineHeight:1.6},body2:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',fontWeight:500},monospace:{fontFamily:"monospace"}},shape:{borderRadius:8},components:{MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500,fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif'}}},MuiCard:{styleOverrides:{root:{boxShadow:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"}}},MuiTextField:{styleOverrides:{root:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',"& .MuiOutlinedInput-root":{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif',"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#E85D05"}}}}},MuiTypography:{defaultProps:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif'},styleOverrides:{root:{fontFamily:'"Rubik", system-ui, Avenir, Helvetica, Arial, sans-serif'}}}}});return e.jsx(kt.Provider,{value:{theme:o},children:e.jsxs(Qt,{theme:o,children:[e.jsx(Jt,{}),t]})})},wt=s.createContext(),Lo=()=>{const t=s.useContext(wt);if(!t)throw new Error("useNotificationContext must be used within a NotificationProvider");return t},zo=({children:t})=>{const r=he(),o=J(u=>u?.ui?.notifications)||[],n=u=>(r(ct(u)),u.id),a=u=>{r(dt(u))},i=()=>{r(hr())},c=u=>{const x={id:Date.now()+Math.random(),duration:5e3,type:"info",timestamp:new Date().toISOString(),...u},v=n(x);return x.duration>0&&setTimeout(()=>{a(v)},x.duration),v},d=(u,x={})=>c({type:"success",message:u,duration:4e3,...x}),m=(u,x={})=>c({type:"error",message:u,duration:6e3,...x}),g=(u,x={})=>c({type:"warning",message:u,duration:5e3,...x}),f=(u,x={})=>c({type:"info",message:u,duration:4e3,...x}),k=(u,x={})=>c({type:"loading",message:u,duration:0,persistent:!0,...x}),h={notifications:o,showNotification:c,showSuccess:d,showError:m,showWarning:g,showInfo:f,showLoading:k,removeNotification:a,clearAllNotifications:i,auth:{loginSuccess:u=>d(`Welcome back, ${u}!`,{title:"Login Successful"}),loginError:u=>m(u,{title:"Login Failed"}),registerSuccess:u=>d(`Account created! Welcome, ${u}!`,{title:"Registration Successful"}),registerError:u=>m(u,{title:"Registration Failed"}),logoutSuccess:()=>d("You have been signed out",{title:"Logout"})},api:{loading:u=>k(`${u}...`,{title:"Processing"}),success:u=>d(`${u} completed successfully`,{title:"Success"}),error:(u,x)=>m(`${u} failed: ${x}`,{title:"Error"})},cart:{added:u=>d(`${u} added to cart`,{title:"Cart Updated"}),removed:u=>f(`${u} removed from cart`,{title:"Cart Updated"}),cleared:()=>f("Cart cleared",{title:"Cart Updated"})}};return e.jsx(wt.Provider,{value:h,children:t})},jt=s.createContext(),ha=()=>{const t=s.useContext(jt);if(!t)throw new Error("useProducts must be used within a ProductsProvider");return t},Fo=({children:t})=>{const[r,o]=s.useState([]),[n,a]=s.useState(!0),[i,c]=s.useState([]),[d,m]=s.useState(!0),{data:g,isFetching:f}=Fr({page:1,limit:100},{}),k=s.useMemo(()=>
65(g?.data?.products||[]).map(l=>{const b=(l.categoryType||"").toLowerCase().replace(/\s+/g,"-"),C=A=>Ee(A);return{id:l._id||l.id,_id:l._id||l.id,name:l.name,category:b,categoryType:l.categoryType,description:l.description,shortDescription:l.shortDescription,sku:l.sku,size:l.size||"12 OZ",images:{main:C(l.images?.[0]?.url||l.imageAssets?.can_front||"/assets/logo/hype - original.png"),thumbnail:C(l.images?.[1]?.url||l.imageAssets?.can_fruits||l.images?.[0]?.url||"/assets/logo/hype - original.png"),can_front:C(l.imageAssets?.can_front||l.images?.[0]?.url||"/assets/logo/hype - original.png"),can_back:C(l.imageAssets?.can_back||l.images?.[1]?.url||"/assets/logo/hype - original.png"),can_fruits:C(l.imageAssets?.can_fruits||l.images?.[1]?.url||l.images?.[0]?.url||"/assets/logo/hype - original.png"),can_carton:C(l.imageAssets?.can_carton||l.images?.[0]?.url||"/assets/logo/hype - original.png"),ingredients:C(l.imageAssets?.ingredients||l.images?.[0]?.url||"/assets/logo/hype - original.png"),gallery:l.images?.map(A=>C(A.url))||[]},image:C(l.images?.[0]?.url||l.imageAssets?.can_front||"/assets/logo/hype - original.png"),hoverImage:C(l.images?.[1]?.url||l.imageAssets?.can_fruits||l.images?.[0]?.url||"/assets/logo/hype - original.png"),isSixPackOnly:de(l),basePrice:de(l)&&l.pricing?.retail?.["6pack"]?l.pricing.retail["6pack"]:l.pricing?.retail?.["12pack"]||l.pricing?.retail||l.currentPrice||22.95,currentPrice:de(l)&&l.pricing?.retail?.["6pack"]?l.pricing.retail["6pack"]:l.currentPrice||l.pricing?.retail?.["12pack"]||l.pricing?.retail||22.95,pricing:l.pricing,ingredients:l.ingredients||[],features:l.features||[],color:b==="sugar-free"?"#2e7d32":b==="mixed-flavors"?"#ff9800":"#d32f2f",rating:4.5,packOptions:de(l)?[{value:"6pack",label:"6 Pack",price:l.pricing?.retail?.["6pack"]||0,priceMultiplier:1}]:[{value:"6pack",label:"6 Pack",price:l.pricing?.retail?.["6pack"]||0,priceMultiplier:l.pricing?.retail?.["6pack"]?l.pricing.retail["6pack"]/(l.pricing.retail["12pack"]||l.currentPrice||1):.6},{value:"12pack",label:"12 Pack",price:l.pricing?.retail?.["12pack"]||0,priceMultiplier:1}],...l}}),[g]);s.useEffect(()=>{o(k),a(f)},[k,f]),s.useEffect(()=>{let v=!0;return(async()=>{try{m(!0);const A=`${(()=>{const _="https://server.hypebeverages.com/api";try{if(_){const R=new URL(_);return R.pathname.endsWith("/api")?R.toString():`${R.toString().replace(/\/$/,"")}/api`}}catch{}return`${window.location.origin}/api`})()}/distributors?status=active`,w=await fetch(A);if(!w.ok)throw new Error(`Failed to fetch distributors: ${w.status} ${w.statusText}`);const M=w.headers.get("content-type")||"";if(!M.includes("application/json")){const R=await w.clone().text();throw new Error(`Expected JSON but received ${M}. Response: ${R.substring(0,100)}`)}const q=await w.json(),O=(Array.isArray(q?.data)?q.data:[]).map((_,R)=>{let F={type:"Point",coordinates:[-83.95,33.75]};return _.coordinates&&(_.coordinates.coordinates&&Array.isArray(_.coordinates.coordinates)&&_.coordinates.coordinates.length===2?F={type:_.coordinates.type||"Point",coordinates:_.coordinates.coordinates}:Array.isArray(_.coordinates)&&_.coordinates.length===2&&(F={type:"Point",coordinates:_.coordinates})),{_id:_._id||_.id||String(R),id:_._id||_.id||String(R),name:_.name||"",address:_.address||"",contact:_.contact||"",phone:_.phone||"",type:_.type||"distributor",status:_.status||"active",coordinates:F,email:_.email,website:_.website,description:_.description}});v&&(c(O),window.location.hostname==="localhost"&&console.log("ProductsProvider - Fetched distributors:",{count:O.length,withValidCoords:O.filter(_=>_.coordinates?.coordinates?.length===2).length,sample:O[0]}))}catch(b){console.error("ProductsProvider - Error fetching distributors:",b),v&&c([])}finally{v&&m(!1)}})(),()=>{v=!1}},[]);const h=s.useMemo(()=>v=>r.find(l=>l.id===v||l._id===v),[r]),u=s.useMemo(()=>v=>v==="all"?r:r.filter(l=>l.category===v),[r]),x={products:r,isLoading:n,distributors:i,isDistributorsLoading:d,getProductById:h,getProductsByCategory:u};return e.jsx(jt.Provider,{value:x,children:t})},Bo=()=>{const{notifications:t,removeNotification:r}=Lo(),o=xe(),n=c=>
65{switch(c){case"success":return e.jsx(or,{});case"error":return e.jsx(rr,{});case"warning":return e.jsx(tr,{});case"loading":return e.jsx(er,{});default:return e.jsx(Zt,{})}},a=c=>{switch(c){case"success":return"success";case"error":return"error";case"warning":return"warning";case"loading":return"info";default:return"info"}},i=c=>{r(c)};return e.jsx(p,{sx:{position:"fixed",top:20,right:20,zIndex:9999,display:"flex",flexDirection:"column",gap:1,maxWidth:400,width:"100%"},children:t.map(c=>e.jsx(et,{open:!0,anchorOrigin:{vertical:"top",horizontal:"right"},sx:{position:"static",transform:"none"},children:e.jsxs(_e,{severity:a(c.type),icon:c.type==="loading"?e.jsx(we,{size:20}):n(c.type),action:!c.persistent&&e.jsx(E,{size:"small","aria-label":"close",color:"inherit",onClick:()=>i(c.id),sx:{ml:1},children:e.jsx(Y,{fontSize:"small"})}),sx:{width:"100%",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:2,backgroundColor:o.palette.background.paper,color:o.palette.text.primary,"& .MuiAlert-icon":{color:c.type==="success"?o.palette.success.main:c.type==="error"?o.palette.error.main:c.type==="warning"?o.palette.warning.main:o.palette.info.main},"& .MuiAlert-message":{width:"100%"}},children:[c.title&&e.jsx(Xt,{sx:{color:o.palette.text.primary,fontWeight:600,fontSize:"0.875rem",mb:.5},children:c.title}),e.jsx(y,{variant:"body2",sx:{color:o.palette.text.secondary,fontSize:"0.875rem",lineHeight:1.4},children:c.message}),c.type==="loading"&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1,mt:1},children:[e.jsx(we,{size:16}),e.jsx(y,{variant:"caption",sx:{color:o.palette.text.secondary},children:"Please wait..."})]})]})},c.id))})},Uo=()=>{const t=J(o=>o?.ui?.loading),r=J(o=>o?.ui?.loadingMessage);return e.jsx(pt,{show:t,message:r,variant:"page"})};class Wo extends Xe.Component{constructor(r){super(r),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,o){console.error("🚨 ErrorBoundary caught an error:",r,o),console.error("📍 Component Stack:",o.componentStack),console.error("📍 Error Stack:",r.stack);const a=(o.componentStack||"").match(/^\s*in\s+(\w+)/);if(a&&console.error("📍 Likely component:",a[1]),(r.message?.includes("Activity")||r.toString().includes("Activity"))&&(console.error("⚠️ This appears to be the Activity property error"),console.error("💡 Check Redux selectors (useSelector) in the component tree above"),console.error("💡 Common causes: accessing undefined state in selectors")),r?.message?.includes("Failed to fetch dynamically imported module")||r?.message?.includes("Importing a module script failed")||r?.name==="ChunkLoadError"){const c="chunk_error_reload",d=sessionStorage.getItem(c),m=Date.now();if(!d||m-Number(d)>1e4){sessionStorage.setItem(c,String(m)),window.location.reload();return}}this.setState({error:r,errorInfo:o}),window.errorReportingService&&window.errorReportingService.logError(r,o)}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null}),this.props.onReset&&this.props.onReset()};render(){return this.state.hasError?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):e.jsx(p,{sx:{p:3},children:e.jsxs(_e,{severity:"error",sx:{mb:2},children:[e.jsx(y,{variant:"h6",gutterBottom:!0,children:this.props.title||"Something went wrong"}),e.jsx(y,{variant:"body2",sx:{mb:2},children:this.props.message||"An unexpected error occurred. Please try refreshing the page."}),this.state.error&&e.jsxs(p,{sx:{mt:2,p:2,bgcolor:"grey.100",borderRadius:1},children:[e.jsx(y,{variant:"body2",sx:{mb:1,fontWeight:"bold"},children:"Error Details (check console for full stack trace):"}),e.jsx(y,{variant:"caption",component:"pre",sx:{fontSize:"0.75rem",overflow:"auto"},children:this.state.error.toString()}),!1]}),e.jsx(D,{variant:"contained",onClick:this.handleReset,sx:{mt:2},children:this.props.resetText||"Try Again"})]})}):this.props.children}}function qo(){return e.jsx(Wo,{title:"Application Error",message:"An error occurred in the application. Please check the console for details.",children:e.jsx(No,{children:e.jsx(ur,{children:e.jsx(Fo,{children:e.jsx(Tr,{children:e.jsxs(zo,{children:[e.jsx(Mo,{}),e.jsx(Bo,{}),e.jsx(Uo,{})]})})})})})})}const Ct=s.createContext({confirm:async()=>!1,alert:async()=>{}}),xa=()=>s.useContext(Ct),ke={title:"Are you sure?",message:"",confirmText:"Confirm",cancelText:"Cancel"};function $o({children:t}){const[r,o]=s.useState(!1),[n,a]=s.useState("confirm"),[i,c]=s.useState(ke),d=s.useRef(null),m=()=>{o(!1),a("confirm"),c(ke),d.current=null},g=s.useCallback((x={})=>new Promise(v=>{d.current=v,a("confirm"),c({...ke,...x}),o(!0)}),[]),f=s.useCallback((x={})=>new Promise(v=>{d.current=v,a("alert"),c({title:x.title||"Notice",message:x.message||"",confirmText:x.confirmText||"OK",cancelText:""}),o(!0)}),[]),k=()=>{d.current&&d.current(!1),m()},h=()=>{d.current&&d.current(!0),m()},u=s.useMemo(()=>({confirm:g,alert:f}),[g,f]);return e.jsxs(Ct.Provider,{value:u,children:[t,e.jsxs(nr,{open:r,onClose:n==="confirm"?k:h,maxWidth:"xs",fullWidth:!0,children:[i.title?e.jsx(ar,{children:e.jsx(y,{variant:"h6",sx:{fontWeight:600},children:i.title})}):null,i.message?e.jsx(sr,{children:e.jsx(y,{variant:"body1",children:i.message})}):null,e.jsxs(ir,{sx:{px:3,pb:2},children:[n==="confirm"&&e.jsx(D,{onClick:k,color:"inherit",children:i.cancelText||"Cancel"}
65),e.jsx(D,{onClick:h,variant:"contained",color:"primary",autoFocus:!0,children:i.confirmText||(n==="confirm"?"Confirm":"OK")})]})]})]})}const St=Ze({name:"cart",initialState:{totalItems:0,items:[],isOpen:!1},reducers:{toggleCart:t=>{t.isOpen=!t.isOpen},addToCart:(t,r)=>{const o=r.payload,n=t.items.find(a=>a.id===o.id);n?n.quantity+=1:t.items.push({...o,quantity:1}),t.totalItems=t.items.reduce((a,i)=>a+i.quantity,0)},removeFromCart:(t,r)=>{const o=r.payload;t.items=t.items.filter(n=>n.id!==o),t.totalItems=t.items.reduce((n,a)=>n+a.quantity,0)},updateQuantity:(t,r)=>{const{id:o,quantity:n}=r.payload,a=t.items.find(i=>i.id===o);a&&(a.quantity=n,t.totalItems=t.items.reduce((i,c)=>i+c.quantity,0))},clearCart:t=>{t.items=[],t.totalItems=0}}}),{toggleCart:fa,addToCart:ba,removeFromCart:ya,updateQuantity:va,clearCart:ka}=St.actions,Ho=St.reducer,Vo=zt({reducer:{ui:xr,cart:Ho,[me.reducerPath]:me.reducer},middleware:t=>t().concat(me.middleware)});window.addEventListener("vite:preload-error",()=>{const t="chunk_reload_attempts",r=parseInt(sessionStorage.getItem(t)||"0",10);r<2?(sessionStorage.setItem(t,String(r+1)),window.location.reload()):sessionStorage.removeItem(t)});async function Go(){try{const r=await fetch(`/version.json?t=${Date.now()}`,{cache:"no-store"});if(!r.ok)return;const{version:o}=await r.json();if(!o)return;if(sessionStorage.getItem("app_version")!==o){if(sessionStorage.setItem("app_version",o),"serviceWorker"in navigator){const a=await navigator.serviceWorker.getRegistrations();await Promise.all(a.map(i=>i.unregister()))}if("caches"in window){const a=await caches.keys();await Promise.all(a.map(i=>caches.delete(i)))}window.location.reload();return}}catch(r){console.warn("Version check failed",r)}const t=document.getElementById("root");if(!t){console.error("No #root element found!");return}sessionStorage.removeItem("chunk_reload_attempts"),Ot.createRoot(t).render(e.jsx(s.StrictMode,{children:e.jsx(Rt,{children:e.jsx(Dt,{store:Vo,children:e.jsx($o,{children:e.jsx(qo,{})})})})}))}Go();export{ct as $,vn as A,_n as B,In as C,Pn as D,En as E,$n as F,Hn as G,Vn as H,Yn as I,Pr as J,Xn as K,Zn as L,ta as M,ra as N,oa as O,na as P,sa as Q,ia as R,L as S,la as T,gn as U,ca as V,da as W,ua as X,pa as Y,Vo as Z,j as _,ha as a,kn as a0,dn as b,Q as c,un as d,pn as e,Cr as f,mn as g,Tn as h,de as i,hn as j,xn as k,Br as l,Un as m,Ee as n,Qn as o,Jn as p,Kn as q,fn as r,bn as s,yn as t,Pe as u,ma as v,ga as w,Ie as x,Er as y,xa as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.