Files
service-finder/frontend_admin/.nuxt/dist/client/_nuxt/QKJPEFuj.js
2026-06-24 11:29:45 +00:00

2 lines
5.5 KiB
JavaScript

import{g as E,k as P,K as q,B as N,L as U,M as j,N as H,O as I,P as A,Q as _,R as V,S as z,x as D,T as O,U as F,l as f,z as W,H as x,V as B,W as M,X as $,Y as Q,Z as G,$ as K,a0 as X,a1 as Y}from"./C3Ck-LNv.js";const Z=(...t)=>t.find(r=>r!==void 0);function T(t){let r=t.replace(/[\u0000-\u001f\s]+/g,"");for(;r.toLowerCase().startsWith("view-source:");)r=r.slice(12);const c=r.indexOf(":");return c>0&&G(r.slice(0,c+1))?null:t}function J(t){const r=t.componentName||"NuxtLink";function c(e){return typeof e=="string"&&e.startsWith("#")}function w(e,s,d){const a=d??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return C(e,a);const i="path"in e&&e.path!==void 0?e.path:s(e).path;return{...e,name:void 0,path:C(i,a)}}function k(e){const s=P(),d=Y(),a=x(()=>!!f(e.target)&&f(e.target)!=="_self"),i=x(()=>{const o=f(e.to)||f(e.href)||"";return typeof o=="string"&&B(o,{acceptRelative:!0})}),R=_("RouterLink"),y=typeof R!="string"?R.useLink:void 0,v=x(()=>{if(f(e.external))return!0;const o=f(e.to)||f(e.href)||"";return typeof o=="object"?!1:o===""||i.value}),l=x(()=>{const o=f(e.to)||f(e.href)||"";return v.value?o:w(o,s.resolve,f(e.trailingSlash))}),b=v.value?void 0:y?.({...e,to:l,viewTransition:f(e.viewTransition)}),m=x(()=>{const o=f(e.trailingSlash)??t.trailingSlash;if(!l.value||i.value||c(l.value)){const h=l.value;return typeof h=="string"?T(h):h}if(v.value){const h=typeof l.value=="object"&&"path"in l.value?O(l.value):l.value,p=typeof h=="object"?s.resolve(h).href:h,u=typeof p=="string"?T(p):p;return u===null?null:C(u,o)}return typeof l.value=="object"?s.resolve(l.value)?.href??null:C(M(d.app.baseURL,l.value),o)});return{to:l,hasTarget:a,isAbsoluteUrl:i,isExternal:v,href:m,isActive:b?.isActive??x(()=>l.value===s.currentRoute.value.path),isExactActive:b?.isExactActive??x(()=>l.value===s.currentRoute.value.path),route:b?.route??x(()=>s.resolve(l.value)),async navigate(o){m.value!==null&&await W(m.value,{replace:f(e.replace),external:v.value||a.value})}}}return E({name:r,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:k,setup(e,{slots:s}){const d=P(),{to:a,href:i,navigate:R,isExternal:y,hasTarget:v,isAbsoluteUrl:l}=k(e),b=z(!1),m=D(null),o=u=>{m.value=e.custom?u?.$el?.nextElementSibling:u?.$el};function h(u){return!b.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===u:e.prefetchOn?.[u]??t.prefetchOn?.[u])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!ae()}async function p(u=q()){if(b.value||i.value===null)return;b.value=!0;const g=typeof a.value=="string"?a.value:y.value?O(a.value):d.resolve(a.value).fullPath,n=y.value?new URL(g,window.location.href).href:g;await Promise.all([u.hooks.callHook("link:prefetch",n).catch(()=>{}),!y.value&&!v.value&&F(a.value,d).catch(()=>{})])}if(h("visibility")){const u=q();let g,n=null;N(()=>{const S=ee();U(()=>{g=j(()=>{m?.value?.tagName&&(n=S.observe(m.value,async()=>{n?.(),n=null,await p(u)}))})})}),H(()=>{g&&I(g),n?.(),n=null})}return()=>{if(!y.value&&!v.value&&!c(a.value)){const n={ref:o,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(h("interaction")&&(n.onPointerenter=p.bind(null,void 0),n.onFocus=p.bind(null,void 0)),b.value&&(n.class=e.prefetchedClass||t.prefetchedClass),n.rel=e.rel||void 0),A(_("RouterLink"),n,s.default)}const u=e.target||null,g=Z(e.noRel?"":e.rel,t.externalRelAttribute,l.value||v.value?"noopener noreferrer":"")||null;return e.custom?s.default?s.default({href:i.value,navigate:R,prefetch:p,get route(){if(!i.value)return;const n=new URL(i.value,window.location.href);return{path:n.pathname,fullPath:n.pathname,get query(){return V(n.search)},hash:n.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:i.value}},rel:g,target:u,isExternal:y.value||v.value,isActive:!1,isExactActive:!1}):null:A("a",{ref:m,href:i.value||null,rel:g,target:u,onClick:async n=>{if(!(y.value||v.value)){n.preventDefault();try{const S=$(i.value??"");return await(e.replace?d.replace(S):d.push(S))}finally{if(c(a.value)){const S=a.value.slice(1);let L=S;try{L=decodeURIComponent(S)}catch{}document.getElementById(L)?.focus()}}}}},s.default?.())}}})}const le=J(Q);function C(t,r){const c=r==="append"?K:X;return B(t)&&!t.startsWith("http")?t:c(t,!0)}function ee(){const t=q();if(t._observer)return t._observer;let r=null;const c=new Map,w=(e,s)=>(r||=new IntersectionObserver(d=>{for(const a of d){const i=c.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&i&&i()}}),c.set(e,s),r.observe(e),()=>{c.delete(e),r?.unobserve(e),c.size===0&&(r?.disconnect(),r=null)});return t._observer={observe:w}}const te=/2g/;function ae(){const t=navigator.connection;return!!(t&&(t.saveData||te.test(t.effectiveType)))}export{le as _};