Files
appco_dist/.output/public/_nuxt/HC--RZML.js
T

2 lines
8.8 KiB
JavaScript
Raw Normal View History

2025-08-09 17:28:13 +03:30
import{d as E,u as q,s as O,r as T,a as R,o as B,b as H,c as I,e as U,f as M,h as A,g as z,p as V,i as P,j as D,k as y,l as j,m as F,n as $,q as W,w as G,t as K,v as Q,x as J,y as X,z as Y,A as C,B as N,C as Z,D as ee,E as te}from"./lb-BvpwA.js";import{_ as ne}from"./DlAUqK2U.js";const ae=(...t)=>t.find(n=>n!==void 0);function re(t){const n=t.componentName||"NuxtLink";function h(e){return typeof e=="string"&&e.startsWith("#")}function x(e,i,m){const a=m??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return _(e,a);const u="path"in e&&e.path!==void 0?e.path:i(e).path;return{...e,name:void 0,path:_(u,a)}}function w(e){const i=q(),m=$(),a=y(()=>!!e.target&&e.target!=="_self"),u=y(()=>{const f=e.to||e.href||"";return typeof f=="string"&&j(f,{acceptRelative:!0})}),k=z("RouterLink"),g=k&&typeof k!="string"?k.useLink:void 0,v=y(()=>{if(e.external)return!0;const f=e.to||e.href||"";return typeof f=="object"?!1:f===""||u.value}),o=y(()=>{const f=e.to||e.href||"";return v.value?f:x(f,i.resolve,e.trailingSlash)}),c=v.value||g==null?void 0:g({...e,to:o}),p=y(()=>{var S;const f=e.trailingSlash??t.trailingSlash;if(!o.value||u.value||h(o.value))return o.value;if(v.value){const b=typeof o.value=="object"&&"path"in o.value?P(o.value):o.value,r=typeof b=="object"?i.resolve(b).href:b;return _(r,f)}return typeof o.value=="object"?((S=i.resolve(o.value))==null?void 0:S.href)??null:_(F(m.app.baseURL,o.value),f)});return{to:o,hasTarget:a,isAbsoluteUrl:u,isExternal:v,href:p,isActive:(c==null?void 0:c.isActive)??y(()=>o.value===i.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??y(()=>o.value===i.currentRoute.value.path),route:(c==null?void 0:c.route)??y(()=>i.resolve(o.value)),async navigate(f){await W(p.value,{replace:e.replace,external:v.value||a.value})}}}return E({name:n,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:w,setup(e,{slots:i}){const m=q(),{to:a,href:u,navigate:k,isExternal:g,hasTarget:v,isAbsoluteUrl:o}=w(e),c=O(!1),p=T(null),f=r=>{var l;p.value=e.custom?(l=r==null?void 0:r.$el)==null?void 0:l.nextElementSibling:r==null?void 0:r.$el};function S(r){var l,s;return!c.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===r:((l=e.prefetchOn)==null?void 0:l[r])??((s=t.prefetchOn)==null?void 0:s[r]))&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!le()}async function b(r=R()){if(c.value)return;c.value=!0;const l=typeof a.value=="string"?a.value:g.value?P(a.value):m.resolve(a.value).fullPath,s=g.value?new URL(l,window.location.href).href:l;await Promise.all([r.hooks.callHook("link:prefetch",s).catch(()=>{}),!g.value&&!v.value&&D(a.value,m).catch(()=>{})])}if(S("visibility")){const r=R();let l,s=null;B(()=>{const d=oe();H(()=>{l=I(()=>{var L;(L=p==null?void 0:p.value)!=null&&L.tagName&&(s=d.observe(p.value,async()=>{s==null||s(),s=null,await b(r)}))})})}),U(()=>{l&&M(l),s==null||s(),s=null})}return()=>{var s;if(!g.value&&!v.value&&!h(a.value)){const d={ref:f,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||(S("interaction")&&(d.onPointerenter=b.bind(null,void 0),d.onFocus=b.bind(null,void 0)),c.value&&(d.class=e.pref