1import{aB as y,aC as v,aD as g,aE as w,r as h,a as p,aF as x}from"./index-BNIZXS9X.js";function k(e){const t=y();return v(t.stores.location,g(e,t))}function d(e){return/^(https?:)?\/\//.test(e)||e.startsWith("mailto:")||e.startsWith("tel:")}function L(e){const t=e.indexOf("#"),s=t>=0?e.slice(t+1):void 0,n=t>=0?e.slice(0,t):e,r=n.indexOf("?"),o=r>=0?n.slice(0,r):n,i=r>=0?n.slice(r+1):void 0;return{pathname:o||"/",search:i,hash:s}}function b(){const e=w();return h.useCallback((t,s)=>{if(typeof t=="number"){typeof window<"u"&&window.history.go(t);return}const n=typeof t=="string"?t:(t.pathname??"/")+(t.search??"")+(t.hash??"");if(typeof n=="string"&&d(n)){typeof window<"u"&&(window.location.href=n);return}const{pathname:r,search:o,hash:i}=L(n);return e({to:r,search:o?Object.fromEntries(new URLSearchParams(o)):void 0,hash:i||void 0,replace:s?.replace})},[e])}function C(){const e=k();return{pathname:e.pathname,search:e.searchStr??"",hash:e.hash??"",state:e.state,key:e.key??"default"}}function S(){return x({strict:!1})}const P=h.forwardRef(function({to:t,replace:s,state:n,children:r,onClick:o,...i},f){const u=b(),c=typeof t=="string"?t:(t?.pathname??"#")+(t?.search??"")+(t?.hash??"");return p.jsx("a",{ref:f,href:c,...i,onClick:a=>{o?.(a),!a.defaultPrevented&&(i.target&&i.target!=="_self"||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.button!==0||typeof c=="string"&&d(c)||(a.preventDefault(),u(t,{replace:s})))},children:r})});h.forwardRef(function({to:t,className:s,children:n,end:r,...o},i){const f=C(),u=typeof t=="string"?t:t?.pathname??"#",c=f.pathname===u,a=!1,l=typeof s=="function"?s({isActive:c,isPending:a}):s,m=typeof n=="function"?n({isActive:c,isPending:a}):n;return p.jsx(P,{ref:i,to:t,className:l,...o,children:m})});export{P as L,C as a,S as b,b 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.