PageSourceSearch

https://1wqdhu.life/resources/v1/app/assets/use-path-based-route-matcher-u_WwO7dQ.js

js 1wqdhu.life collected 2026-10-10 02:38:33 UTC 952 bytes, 1 lines download raw bytes

1import{toValue as m}from"vue";import{useRouter as R}from"vue-router";const M=t=>(typeof t=="object"&&t.name===null&&(t.name=void 0),t),o=t=>{const[e=t]=t.split(/[?#]/);return e.endsWith("/")&&e.length!==1?e.slice(0,-1):e},b=t=>{const e=a=>{const r=m(t);if(r===void 0)return[];const s=M(a),n=typeof s=="string"?s:r.resolve(s).fullPath,c=[n],h=r.getRoutes().find(u=>u.aliasOf?.path===n);return h!==void 0&&c.push(h.path),c},p=(a,r)=>{const s=o(a),n=o(r);return n==="/"?!0:s===n||s.startsWith(`${n}/`)};return{check:(a,r,s=[r],n=!1)=>{const c=e(a),h=m(t);if(h===void 0)return!1;try{const u=s.flatMap(l=>e(l).flatMap(i=>{const g=typeof i=="string"?i:h.resolve(i).fullPath;return c.map(d=>p(d,g)?o(g).length:0)})),P=Math.max(...u);return e(r).some(l=>c.some(f=>{const i=n?o(l).length===o(f).length:!0;return p(f,l)&&o(l).length===P&&i}))}catch(u){console.error("[RESOLVE ROUTE ERROR]",a,u)}return!1}}},x=()=>{const t=R();return b(t)};export{b as c,x 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.