1import{y as k}from"./BxdfRXiH.js";import{g as F,x as N,m as v,f as I,k as C,l as M}from"./DE1DqXAn.js";import"./B66N4sUp.js";function q(t,e){const r=e/t*100;return 2/Math.PI*100*Math.atan(r/50)}function E(t={}){const{duration:e=2e3,throttle:r=200,hideDelay:s=500,resetDelay:u=400}=t,l=t.estimatedProgress||q,i=k(),a=I(0),n=I(!1),m=I(!1);let p=!1,h,y,_,x;const T=()=>{m.value=!1,L(0)};function L(o=0){if(!i.isHydrating){if(o>=100)return d();c(),a.value=o<0?0:o,r?y=setTimeout(()=>{n.value=!0,P()},r):(n.value=!0,P())}}function D(){_=setTimeout(()=>{n.value=!1,x=setTimeout(()=>{a.value=0},u)},s)}function d(o={}){a.value=100,p=!0,c(),A(),o.error&&(m.value=!0),o.force?(a.value=0,n.value=!1):D()}function A(){clearTimeout(_),clearTimeout(x)}function c(){clearTimeout(y),cancelAnimationFrame(h)}function P(){p=!1;let o;function g(f){if(p)return;o??(o=f);const S=f-o;a.value=Math.max(0,Math.min(100,l(e,S))),h=requestAnimationFrame(g)}h=requestAnimationFrame(g)}let b=()=>{};{const o=i.hook("page:loading:start",()=>{T()}),g=i.hook("page:loading:end",()=>{d()}),f=i.hook("vue:error",()=>d());b=()=>{f(),o(),g(),c()}}return{_cleanup:b,progress:v(()=>a.value),isLoading:v(()=>n.value),error:v(()=>m.value),start:T,set:L,finish:d,clear:c}}function H(t={}){const e=k(),r=e._loadingIndicator=e._loadingIndicator||E(t);return F()&&(e._loadingIndicatorDeps=e._loadingIndicatorDeps||0,e._loadingIndicatorDeps++,N(()=>{e._loadingIndicatorDeps--,e._loadingIndicatorDeps===0&&(r._cleanup(),delete e._loadingIndicator)})),r}const B=C({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},height:{type:Number,default:3},color:{type:[String,Boolean],default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"},errorColor:{type:String,default:"repeating-linear-gradient(to right,#f87171 0%,#ef4444 100%)"},estimatedProgress:{type:Function,required:!1}},setup(t,{slots:e,expose:r}){const{progress:s,isLoading:u,error:l,start:i,finish:a,clear:n}=H({duration:t.duration,throttle:t.throttle,estimatedProgress:t.estimatedProgress});return r({progress:s,isLoading:u,error:l,start:i,finish:a,clear:n}),()=>M("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:"auto",height:`${t.height}px`,opacity:u.value?1:0,background:l.value?t.errorColor:t.color||void 0,backgroundSize:`${100/s.value*100}% auto`,transform:`scaleX(${s.value}%)`,transformOrigin:"left",transition:"transform 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},e)}});export{B as default};
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.