1import{a as e,l as t,m as n,o as r,r as i,t as a}from"./useRouter-91l2S5K3.js";import{n as o,t as s}from"./createLucideIcon-ClJ1s6je.js";import{O as c,T as ee,k as l,l as u,o as te,r as ne,t as re}from"./useStore-b0_Roksy.js";var ie=`Error preloading route! âï¸`,d=n(t(),1);i();var ae=n(o(),1);function f(t,n){let i=a(),o=e(n),{activeProps:s,inactiveProps:f,activeOptions:_,to:v,preload:pe,preloadDelay:me,preloadIntentProximity:he,hashScrollIntoView:ge,replace:y,startTransition:b,resetScroll:_e,viewTransition:ve,children:x,target:S,disabled:C,style:w,className:T,onClick:E,onBlur:D,onFocus:O,onMouseEnter:k,onMouseLeave:A,onTouchStart:j,ignoreBlocker:M,params:ye,search:be,hash:xe,state:Se,mask:Ce,reloadDocument:we,unsafeRelative:Te,from:Ee,_fromLocation:De,...N}=t,P=ne(),F=d.useMemo(()=>t,[i,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),I=re(i.stores.location,e=>e,(e,t)=>e.href===t.href),L=d.useMemo(()=>{let e={_fromLocation:I,...F};return i.buildLocation(e)},[i,I,F]),R=L.maskedLocation?L.maskedLocation.publicHref:L.publicHref,z=L.maskedLocation?L.maskedLocation.external:L.external,B=d.useMemo(()=>ue(R,z,i.history,C),[C,z,R,i.history]),V=d.useMemo(()=>{if(B?.external)return l(B.href,i.protocolAllowlist)?void 0:B.href;if(!de(v)&&!(typeof v!=`string`||v.indexOf(`:`)===-1))try{return new URL(v),l(v,i.protocolAllowlist)?void 0:v}catch{}},[v,B,i.protocolAllowlist]),H=d.useMemo(()=>{if(V)return!1;if(_?.exact){if(!te(I.pathname,L.pathname,i.basepath))return!1}else{let e=u(I.pathname,i.basepath),t=u(L.pathname,i.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(_?.includeSearch??!0)&&!ee(I.search,L.search,{partial:!_?.exact,ignoreUndefined:!_?.explicitUndefined})?!1:_?.includeHash?P&&I.hash===L.hash:!0},[_?.exact,_?.explicitUndefined,_?.includeHash,_?.includeSearch,I,V,P,L.hash,L.pathname,L.search,i.basepath]),U=H?c(s,{})??oe:p,W=H?p:c(f,{})??p,G=[T,U.className,W.className].filter(Boolean).join(` `),K=(w||U.style||W.style)&&{...w,...U.style,...W.style},[Oe,q]=d.useState(!1),J=d.useRef(!1),Y=t.reloadDocument||V?!1:pe??i.options.defaultPreload,X=me??i.options.defaultPreloadDelay??0,Z=d.useCallback(()=>{i.preloadRoute({...F,_builtLocation:L}).catch(e=>{console.warn(e),console.warn(ie)})},[i,F,L]);r(o,d.useCallback(e=>{e?.isIntersecting&&Z()},[Z]),h,{disabled:!!C||Y!==`viewport`}),d.useEffect(()=>{J.current||!C&&Y===`render`&&(Z(),J.current=!0)},[C,Z,Y]);let ke=e=>{let t=e.currentTarget.getAttribute(`target`),n=S===void 0?t:S;if(!C&&!fe(e)&&!e.defaultPrevented&&(!n||n===`_self`)&&e.button===0){e.preventDefault(),(0,ae.flushSync)(()=>{q(!0)});let t=i.subscribe(`onResolved`,()=>{t(),q(!1)});i.navigate({...F,replace:y,resetScroll:_e,hashScrollIntoView:ge,startTransition:b,viewTransition:ve,ignoreBlocker:M})}};if(V)return{...N,ref:o,href:V,...x&&{children:x},...S&&{target:S},...C&&{disabled:C},...w&&{style:w},...T&&{className:T},...E&&{onClick:E},...D&&{onBlur:D},...O&&{onFocus:O},...k&&{onMouseEnter:k},...A&&{onMouseLeave:A},...j&&{onTouchStart:j}};let Q=e=>{if(C||Y!==`intent`)return;if(!X){Z();return}let t=e.currentTarget;if(m.has(t))return;let n=setTimeout(()=>{m.delete(t),Z()},X);m.set(t,n)},Ae=e=>{C||Y!==`intent`||Z()},$=e=>{if(C||!Y||!X)return;let t=e.currentTarget,n=m.get(t);n&&(clearTimeout(n),m.delete(t))};return{...N,...U,...W,href:B?.href,ref:o,onClick:g([E,ke]),onBlur:g([D,$]),onFocus:g([O,Q]),onMouseEnter:g([k,Q]),onMouseLeave:g([A,$]),onTouchStart:g([j,Ae]),disabled:!!C,target:S,...K&&{style:K},...G&&{className:G},...C&&se,...H&&ce,...P&&Oe&&le}}var p={},oe={className:`active`},se={role:`link`,"aria-disabled":!0},ce={"data-status":`active`,"aria-current":`page`},le={"data-transitioning":`transitioning`},m=new WeakMap,h={rootMargin:`100px`},g=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ue(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function de(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var _=d.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=f(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return d.createElement(`a`,t,o)}return d.createElement(n,a,o)});function fe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var v=s(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);
1export{_ as n,v as t};
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.