try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`2ffb6e37-4585-45c8-949c-227e92be5ab0`,e._sentryDebugIdIdentifier=`sentry-dbid-2ffb6e37-4585-45c8-949c-227e92be5ab0`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Fg as t,Ig as n,Qp as r,Yp as i,em as a}from"./entry.client-dr7r6s9a.js";var o=e(n(),1);function s(e){let t=r({warn:e?.router===void 0}),n=e?.router||t,s=(0,o.useRef)(void 0);return i(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=a(s.current,e.select(t));return s.current=n,n}return e.select(t)}return t})}var c=t(),l=e=>e.location.pathname;function u(){let e=(0,c.c)(10),t=r().history,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={select:l},e[0]=n):n=e[0],s(n);let i=t.index,a=i>0,o;e[1]===t?o=e[2]:(o=()=>{t.canGoBack()&&t.back()},e[1]=t,e[2]=o);let u=o,d;e[3]===t?d=e[4]:(d=e=>{t.setHistory([e])},e[3]=t,e[4]=d);let f=d,p,m;return e[5]!==i||e[6]!==a||e[7]!==u||e[8]!==f?(m={index:i,canGoBack:a,goBack:u,resetHistory:f},e[5]=i,e[6]=a,e[7]=u,e[8]=f,e[9]=m):m=e[9],p=m,p}export{s as n,u as t};