1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/router-OKHksTWz.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/index-4sLeOnmo.js","assets/framework-CXnKph_e.js","assets/query-Ddm8W4QT.js"])))=>i.map(i=>d[i]); 2import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{i as t,r as n}from"./framework-CXnKph_e.js";import{_ as r,a as i,b as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,s as g,t as _,u as v,y}from"./index-4sLeOnmo.js";import{a as b,i as x,n as S,r as C}from"./query-Ddm8W4QT.js";var w=/([/#?\\]|%(2f|23|3f|5c))/gi;function T(e){return e.replace(w,e=>encodeURIComponent(e))}function E(e){try{return T(decodeURIComponent(e))}catch{return e}}function D(e){return e.split(`/`).map(e=>E(e)).join(`/`)}function O(e){try{return decodeURIComponent(e)}catch{return e}}function k(e){for(let t of Object.keys(e)){let n=e[t];Array.isArray(n)?e[t]=n.map(O):e[t]=O(n)}}function A(){return{staticChildren:new Map,dynamicChild:null,catchAllChild:null,optionalCatchAllChild:null,route:null}}function j(e){let t=A();for(let n of e){let e=n.patternParts;if(e.length===0){t.route===null&&(t.route=n);continue}let r=t;for(let t=0;t<e.length;t++){let i=e[t];if(i.endsWith(`+`)&&i.startsWith(`:`)){if(t!==e.length-1)break;let a=i.slice(1,-1);r.catchAllChild===null&&(r.catchAllChild={paramName:a,route:n});break}if(i.endsWith(`*`)&&i.startsWith(`:`)){if(t!==e.length-1)break;let a=i.slice(1,-1);r.optionalCatchAllChild===null&&(r.optionalCatchAllChild={paramName:a,route:n});break}if(i.startsWith(`:`)){let a=i.slice(1);r.dynamicChild===null&&(r.dynamicChild={paramName:a,node:A()}),r=r.dynamicChild.node,t===e.length-1&&r.route===null&&(r.route=n);continue}let a=r.staticChildren.get(i);a||(a=A(),r.staticChildren.set(i,a)),r=a,t===e.length-1&&r.route===null&&(r.route=n)}}return t}function M(e,t){let n=P(e,t,0);return n&&k(n.params),n}function N(){return Object.create(null)}function P(e,t,n){if(n===t.length)return e.route===null?e.optionalCatchAllChild===null?null:{route:e.optionalCatchAllChild.route,params:N()}:{route:e.route,params:N()};let r=t[n],i=e.staticChildren.get(r);if(i){let e=P(i,t,n+1);if(e!==null)return e}if(e.dynamicChild!==null){let i=P(e.dynamicChild.node,t,n+1);if(i!==null)return i.params[e.dynamicChild.paramName]=r,i}if(e.catchAllChild!==null){let r=t.slice(n),i=N();return i[e.catchAllChild.paramName]=r,{route:e.catchAllChild.route,params:i}}if(e.optionalCatchAllChild!==null){let r=t.slice(n),i=N();return i[e.optionalCatchAllChild.paramName]=r,{route:e.optionalCatchAllChild.route,params:i}}return null}function F(){return new WeakMap}function I(e,t){let n=e.get(t);return n||(n=j(t),e.set(t,n)),n}function L(e,t,n){let r=e.split(`?`)[0],i=r===`/`?`/`:r.replace(/\/$/,``);i=D(i);let a=i.split(`/`).filter(Boolean);return M(I(n,t),a)}var R=()=>globalThis.__VINEXT_DEFAULT_LOCALE__==null&&globalThis.__VINEXT_LOCALE__==null?null:{locale:globalThis.__VINEXT_LOCALE__,locales:globalThis.__VINEXT_LOCALES__,defaultLocale:globalThis.__VINEXT_DEFAULT_LOCALE__,domainLocales:globalThis.__VINEXT_DOMAIN_LOCALES__,hostname:globalThis.__VINEXT_HOSTNAME__};function z(){return R()}function B(e){return e.nodeEnv===`production`&&e.prefetch!==!1&&!e.isDangerous}function V(e){let{href:t,basePath:n,currentOrigin:r}=e;if(!H(t))return t;if(r===void 0)return null;try{let e=new URL(r),i=t.startsWith(`//`)?new URL(t,e.origin):new URL(t);return i.origin===e.origin?n?h(i.pathname,n)?f(i.pathname,n)+i.search+i.hash:null:i.pathname+i.search+i.hash:null}catch{return null}}function H(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)}var U=e(t(),1),W=n(),G=(0,U.createContext)({pending:!1});function K(){return(0,U.useContext)(G)}var q=``,J=F();function ee(e){if(typeof e==`string`)return e;let t=e.pathname??`/`;if(e.query){let n=C(e.query);t=S(t,n)}return t}function Y(e,t){return t||e===!1?`disabled`:e===!0?`full`:`auto`}function te(e){if(typeof window>`u`)return null;let t;try{t=new URL(e,window.location.href)}catch{return null}return t.origin===window.location.origin?`${f(t.pathname,q)}${t.search}`:null}function X(e){if(typeof window>`u`)return!1;let t=window.__VINEXT_LINK_PREFETCH_ROUTES__;if(!t)return!1;let n=te(e);if(n===null)return!1;let r=L(n,t,J);return r?!r.route.isDynamic:!1}
2function Z(e,t,n=`low`){if(typeof window>`u`)return;let o=V({href:e,basePath:q,currentOrigin:window.location.origin});if(o==null)return;let s=v(o,window.location.href,q);(window.requestIdleCallback??(e=>setTimeout(e,100)))(()=>{(async()=>{if(typeof window.__VINEXT_RSC_NAVIGATE__==`function`){if(t===`auto`&&!X(o))return;let e=p(),d=u(),f=l({interceptionContext:e});d&&f.set(a,d);let m=await c(s,f),h=r.encodeCacheKey(m,e),_=i();if(_.has(h))return;_.add(h),g(m,fetch(m,{headers:f,credentials:`include`,priority:n,purpose:`prefetch`}),e,d)}else if(window.__NEXT_DATA__?.__vinext?.pageModuleUrl){let e=document.createElement(`link`);e.rel=`prefetch`,e.href=s,e.as=`document`,document.head.appendChild(e)}})().catch(e=>{console.error(`[vinext] RSC prefetch setup error:`,e)})})}var Q=null,$=new WeakMap;function ne(){return typeof window>`u`||typeof IntersectionObserver>`u`?null:Q||(Q=new IntersectionObserver(e=>{for(let t of e)if(t.isIntersecting){let e=$.get(t.target);e&&(e(),Q?.unobserve(t.target),$.delete(t.target))}},{rootMargin:`250px`}),Q)}function re(){return typeof window<`u`?window.__VINEXT_DEFAULT_LOCALE__:z()?.defaultLocale}function ie(){return typeof window<`u`?window.__NEXT_DATA__?.domainLocales:z()?.domainLocales}function ae(){return typeof window<`u`?window.location.hostname:z()?.hostname}function oe(e,t){return b(e,t,{basePath:q,currentHostname:ae(),domainItems:ie()})}function se(e,t){return t===!1||t===void 0||e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)?e:oe(e,t)||x(e,t,re()??``)}var ce=(0,U.forwardRef)(function({href:e,as:t,replace:n=!1,prefetch:r,scroll:i=!0,children:a,onClick:c,onMouseEnter:l,onTouchStart:u,onNavigate:f,...p},h){let{locale:g,...b}=p,x=t??ee(e),S=typeof x==`string`&&y(x),C=se(S?`/`:x,g),w=s(C,q),[T,E]=(0,U.useState)(!1),D=(0,U.useRef)(!0);(0,U.useEffect)(()=>(D.current=!0,()=>{D.current=!1}),[]);let O=(0,U.useRef)(null),k=Y(r,S),A=B({nodeEnv:`production`,prefetch:r,isDangerous:S}),j=(0,U.useCallback)(e=>{O.current=e,typeof h==`function`?h(e):h&&(h.current=e)},[h]);(0,U.useEffect)(()=>{if(!A||typeof window>`u`)return;let e=O.current;if(!e)return;let t=V({href:C,basePath:q,currentOrigin:window.location.origin});if(t==null)return;let n=ne();if(n)return $.set(e,()=>Z(t,k,`low`)),n.observe(e),()=>{n.unobserve(e),$.delete(e)}},[A,k,C]);let M=(0,U.useCallback)(()=>{A&&Z(C,k,`high`)},[A,k,C]),N=(0,U.useCallback)(e=>{l?.(e),M()},[l,M]),P=(0,U.useCallback)(e=>{u?.(e),M()},[u,M]),F=async e=>{if(c&&c(e),e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.currentTarget.target&&e.currentTarget.target!==`_self`)return;let t=C;if(x.startsWith(`http://`)||x.startsWith(`https://`)||x.startsWith(`//`)){let e=o(x,q);if(e==null)return;t=e}e.preventDefault();let r=d(t,window.location.href,q),a=v(t,window.location.href,q);if(f)try{let e=new URL(a,window.location.origin),t=!1,n={url:e,preventDefault(){t=!0},get defaultPrevented(){return t}};if(f(n),n.defaultPrevented)return}catch{}if(typeof window.__VINEXT_RSC_NAVIGATE__==`function`){E(!0),U.startTransition(()=>{m(t,n?`replace`:`push`,i,!0).finally(()=>{D.current&&E(!1)})});return}else try{let e=(await _(async()=>{let{default:e}=await import(`./router-OKHksTWz.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4]))).default;n?await e.replace(r,void 0,{scroll:i}):await e.push(r,void 0,{scroll:i})}catch{n?window.history.replaceState({},``,a):window.history.pushState({},``,a),window.dispatchEvent(new PopStateEvent(`popstate`))}},{passHref:I,...L}=b,R=U.useMemo(()=>({pending:T}),[T]);return S?(0,W.jsx)(`a`,{...L,onMouseEnter:N,onTouchStart:P,children:a}):(0,W.jsx)(G.Provider,{value:R,children:(0,W.jsx)(`a`,{ref:j,href:w,onClick:e=>{F(e)},onMouseEnter:N,onTouchStart:P,...L,children:a})})});export{X as canAutoPrefetchFullAppRoute,ce as default,Y as resolveLinkPrefetchMode,K as useLinkStatus};
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.