1import{Bm as e,Um as t,zm as n}from"./messages-iRjA5gnG.js";import{Z as r,c as i,f as a,m as o,p as s,u as c}from"./client-BYgJ_FtY.js";var l=t(e(),1);function u(e){let t=o(),n=(0,l.useRef)(void 0);return s(t.stores.location,i=>{let a=e?.select?e.select(i):i;if(e?.structuralSharing??t.options.defaultStructuralSharing){let e=r(n.current,a);return n.current=e,e}return a})}var d=n();function f({href:e,locale:t,prefetch:n,...r}){let{data:o,isPending:s}=i(),l=!s&&!o?.user&&/^\/(?:zh\/)?(?:chat|library|settings|admin)(?:[/?#]|$)/.test(e)?`/sign-in?callbackUrl=${encodeURIComponent(e)}`:e;return/^(https?:|mailto:|tel:|#)/.test(e)?(0,d.jsx)(`a`,{href:e,...r}):(0,d.jsx)(a,{to:e,...r,onClick:e=>{r.onClick?.(e),!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&(!r.target||r.target===`_self`)&&c(l)&&e.preventDefault()}})}function p(){return u().pathname}function m(e){let[t,n]=e.split(`#`),[r,i]=t.split(`?`);return{to:r||`/`,search:i?Object.fromEntries(new URLSearchParams(i)):void 0,hash:n}}function h(){let e=o(),{data:t,isPending:n}=i(),r=e=>c(!n&&!t?.user&&/^\/(?:zh\/)?(?:chat|library|settings|admin)(?:[/?#]|$)/.test(e)?`/sign-in?callbackUrl=${encodeURIComponent(e)}`:e);return{push:t=>{r(t)||e.navigate(m(t))},replace:t=>{r(t)||e.navigate({...m(t),replace:!0})},back:()=>e.history.back(),forward:()=>e.history.forward(),refresh:()=>e.invalidate(),prefetch:e=>{}}}export{p as n,h as r,f 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.