import{n as e}from"./chunk-Bh1tDfsg.js";import{n as t}from"./jsx-runtime-BKZ-v_4m.js";import{t as n}from"./useRouter-DfVfrSSc.js";import{F as r,t as i,x as a}from"./useStore-CgjpQtLm.js";import{n as o,t as s}from"./matchContext-DSkzfCB4.js";var c=e(t(),1),l={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function u(e){let t=n(),u=c.useContext(e.from?s:o),d=e.from??u,f=d?e.from?t.stores.getRouteMatchStore(d):t.stores.matchStores.get(d):void 0,p=c.useRef(void 0);return i(f??l,n=>{if((e.shouldThrow??!0)&&!n&&a(),n===void 0)return;let i=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=r(p.current,i);return p.current=e,e}return i})}function d(e){return u({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}export{u as n,d as t};
//# sourceMappingURL=useSearch-C-FkY2rF.js.map