1import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{a as t,c as n,f as r,l as i,m as a}from"./utils-DCvbpOtd.js";import{n as o,t as s}from"./jsx-runtime-BpzPEenQ.js";import{n as c}from"./ClientOnly-CRFGQdua.js";import{t as l}from"./useRouter-BKyEUoUu.js";import{t as u}from"./useSelector-DsW2Jjc4.js";function d(e){return e.replace(/\/{2,}/g,`/`)}function f(e){return e===`/`?e:e.replace(/^\/+/,``)}function p(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function m(e){return p(f(e))}function h(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function g(e,t,n=`never`,r){if(t.includes(`//`)&&(t=d(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,o;if(r){o=i?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(i)s=e.split(`/`);else{for(e.includes(`//`)&&(e=d(e)),s=e.split(`/`);s.length>1&&a(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.length>1?s.pop():s=[``]:r===`.`||s.push(r)}}s.length>1&&(a(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=s.join(`/`),l=(i?d(c):c)||`/`;return o&&r&&r.set(o,l),l}function _(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function v(e){return e==null||e===``}function y(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function b(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&v(f)){if(c===`/`&&!d)continue;f=``}o+=c+y(s,f,r)+(d||``)}}return o+a||`/`}var x=`Error preloading route! âï¸`,S=e(o(),1),C=s();function w(...e){let n=S.useRef(e),r=n.current;return e.forEach((e,n)=>{t(r[n],e,!1,!0)||(r[n]=e)}),n.current}function T(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(x)})}var ee={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function E(e,t){let n=typeof e==`string`&&i(e);if(n)return t.has(n)?e:null}function D(e,n,r,i,a){let o=h(e.pathname,i),s=h(n.pathname,i);return(r?.exact?o!==s:!(o.startsWith(s)&&(o.length===s.length||o[s.length]===`/`)))||(r?.includeSearch??!0)&&!t(e.search,n.search,!r?.exact,r?.explicitUndefined)?!1:!r?.includeHash||a&&e.hash===n.hash}function O(e,t,n){let r=l(),a=S.useRef(null),o=S.useCallback(e=>{if(a.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:d,preload:f,preloadDelay:p,hashScrollIntoView:m,replace:h,startTransition:g,resetScroll:_,viewTransition:v,ignoreBlocker:y,disabled:b,target:x,onClick:C,onBlur:O,onFocus:k,onMouseEnter:A,onMouseLeave:j,onTouchStart:I}=e,L=c(),[R,z,B]=w(e.search,e.params,s),[V,H]=S.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,R,z,e.state,e.mask,e.unsafeRelative]),U=S.useCallback(e=>{let t=E(d,r.protocolAllowlist);if(t!==void 0)return[t??void 0];V._fromLocation||(H._fromLocation=e);let n=r.buildLocation(H),a=F(n,r,b);return[a,!b&&(!a||i(a))?void 0:D(e,n,B,r.basepath,L)]},[B,b,L,V,H,r,d]),[W,G]=u(r.stores.location,U,ee),K=G===void 0?W:void 0,q=b||W===void 0,J=S.useRef(!1),Y=e.reloadDocument||K||q?!1:f??r.options.defaultPreload,X=p??r.options.defaultPreloadDelay??0,Z=S.useCallback(e=>{let t=e?.isIntersecting;if(!(t??Y===`intent`)){t===!1&&N(a);return}if(!X){T(r,V);return}M.has(a)||M.set(a,setTimeout(()=>{M.delete(a),T(r,V)},X))},[r,V,a,Y,X]);S.useEffect(()=>{Y===`render`&&!J.current&&(J.current=!0,T(r,V));let e;return Y===`viewport`&&a.current&&typeof IntersectionObserver==`function`&&(e=new IntersectionObserver(e=>Z(e.pop()),{rootMargin:`100px`}),e.observe(a.current)),()=>{e?.disconnect(),N(a)}},[r,V,Y,Z,a]);let Q=te(e,n);if(Q.ref=t?o:a,K)return Q.href=K,Q;let re=e=>{let t=x??e.currentTarget.getAttribute(`target`);!q&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...V,replace:h,resetScroll:_,hashScrollIntoView:m,startTransition:g,viewTransition:v,ignoreBlocker:y}))},ie=()=>{Y===`intent`&&T(r,V)},$=()=>{Y===`intent`&&N(a)};return Q.onClick=P(C,re),Q.onBlur=P(O,$),Q.onFocus=P(k,Z),Q.onMouseEnter=P(A,Z),Q.onMouseLeave=P(j,$),Q.onTouchStart=P(I,ie),ne(Q,e,G,W,q,n)}var k={},A={className:`active`},j=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function te(e,t){let n={};for(let r in e)j.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ne(e,t,r,i,a,o){let{activeProps:s,inactiveProps:c,className:l,style:u,target:d}=t,f=n(r?s:c,{})??(r?A:k);Object.assign(e,f),e.href=i,o!==`a`&&(e.disabled=a),e.target=d;let p=f.style;(u||p)&&(e.style=u&&p?{...u,...p}:u||p);let m=f.className;return(l||m)&&(e.className=l?m?`${l} ${m}
1`:l:m),a&&(e.role=`link`,e[`aria-disabled`]=!0),r&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var M=new WeakMap,N=e=>{clearTimeout(M.get(e)),M.delete(e)},P=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function F(e,t,n){if(n)return;let i=e.maskedLocation??e,a=i.external?i.publicHref:t.history.createHref(i.publicHref)||`/`;if(!((i.external||a!==i.publicHref)&&r(a,t.protocolAllowlist)))return a}function I(e){return S.forwardRef(function(t,n){return(0,C.jsx)(L,{...t,_asChild:e,ref:n})})}var L=S.memo(S.forwardRef((e,t)=>{let n=e._asChild||`a`,r=O(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return S.createElement(n,r,i)}),R);function R(e,n){let r=0;for(let i in n)if(r++,e[i]!==n[i]&&(!j.has(i)||!t(e[i],n[i],!1,!0)))return!1;for(let t in e)r--;return r===0}var z=e=>e;export{_ as a,m as c,d as i,f as l,I as n,b as o,z as r,g as s,L as t,p as u};
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.