import{cYaszt,cZasJi,rasm,jasC,GasCs,RasSs,casG,tasTe,fasMt,aasDt,easAs,SasQi,oasVs,dasto,c_aseo}from"./index-f7f41e1f.js";functionws(t=zt){conste=t===zt?Ji:()=>m.useContext(t);returnfunction(){const{store:s}=e();returns}}constno=ws();functionso(t=zt){conste=t===zt?no:ws(t);returnfunction(){returne().dispatch}}constio=so();functionoo(t,e){return`${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`}functionRt(t={}){const{name:e,strict:n=!0,hookName:s="useContext",providerName:i="Provider",errorMessage:r}=t,o=m.createContext(void0);o.displayName=e;functiona(){varc;constl=m.useContext(o);if(!l&&n){constu=newError(r??oo(s,i));throwu.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,u,a),u}returnl}return[o.Provider,a,o]}var[ro,ao]=Rt({strict:!1,name:"PortalManagerContext"});functionco(t){const{children:e,zIndex:n}=t;returnC.jsx(ro,{value:{zIndex:n},children:e})}co.displayName="PortalManager";varCe=Boolean(globalThis==null?void0:globalThis.document)?m.useLayoutEffect:m.useEffect,[Ms,lo]=Rt({strict:!1,name:"PortalContext"}),ze="chakra-portal",uo=".chakra-portal",fo=t=>C.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:t.zIndex,top:0,left:0,right:0},children:t.children}),ho=t=>{const{appendToParentPortal:e,children:n}=t,[s,i]=m.useState(null),r=m.useRef(null),[,o]=m.useState({});m.useEffect(()=>o({}),[]);consta=lo(),c=ao();Ce(()=>{if(!s)return;constu=s.ownerDocument,f=e?a??u.body:u.body;if(!f)return;r.current=u.createElement("div"),r.current.className=ze,f.appendChild(r.current),o({});consth=r.current;return()=>{f.contains(h)&&f.removeChild(h)}},[s]);constl=c!=null&&c.zIndex?C.jsx(fo,{zIndex:c==null?void0:c.zIndex,children:n}):n;returnr.current?Cs.createPortal(C.jsx(Ms,{value:r.current,children:l}),r.current):C.jsx("span",{ref:u=>{u&&i(u)}})},po=t=>{const{children:e,containerRef:n,appendToParentPortal:s}=t,i=n.current,r=i??(typeofwindow<"u"?document.body:void0),o=m.useMemo(()=>{constc=i==null?void0:i.ownerDocument.createElement("div");returnc&&(c.className=ze),c},[i]),[,a]=m.useState({});returnCe(()=>a({}),[]),Ce(()=>{if(!(!o||!r))returnr.appendChild(o),()=>{r.removeChild(o)}},[o,r]),r&&o?Cs.createPortal(C.jsx(Ms,{value:s?o:null,children:e}),o):null};functionJt(t){conste={appendToParentPortal:!0,...t},{containerRef:n,...s}=e;returnn?C.jsx(po,{containerRef:n,...s}):C.jsx(ho,{...s})}Jt.className=ze;Jt.selector=uo;Jt.displayName="Portal";varmo=(t,e)=>t.find(n=>n.id===e);functionyn(t,e){constn=Ds(t,e),s=n?t[n].findIndex(i=>i.id===e):-1;return{position:n,index:s}}functionDs(t,e){for(const[n,s]ofObject.entries(t))if(mo(s,e))returnn}functiongo(t){conste=t.includes("right"),n=t.includes("left");lets="center";returne&&(s="flex-end"),n&&(s="flex-start"),{display:"flex",flexDirection:"column",alignItems:s}}functionyo(t){constn=t==="top"||t==="bottom"?"0 auto":void0,s=t.includes("top")?"env(safe-area-inset-top, 0px)":void0,i=t.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void0,r=t.includes("left")?void0:"env(safe-area-inset-right, 0px)",o=t.includes("right")?void0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:s,bottom:i,right:r,left:o}}functionvo(t,e=[]){constn=m.useRef(t);returnm.useEffect(()=>{n.current=t}),m.useCallback((...s)=>{vari;return(i=n.current)==null?void0:i.call(n,...s)},e)}functionxo(t,e){constn=vo(t);m.useEffect(()=>{if(e==null)return;lets=null;returns=window.setTimeout(()=>{n()},e),()=>{s&&window.clearTimeout(s)}},[e,n])}functionvn(t,e){constn=m.useRef(!1),s=m.useRef(!1);m.useEffect(()=>{if(n.current&&s.current)returnt();s.current=!0},e),m.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}constRs=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Qt=m.createContext({});functionPo(){returnm.useContext(Qt).visualElement}constEt=m.createContext(null),te=typeofdocument<"u",$t=te?m.useLayoutEffect:m.useEffect,Es=m.createContext