PageSourceSearch

https://sadr.com.sa/_nuxt/BjnFc4Ym.js

js sadr.com.sa collected 2026-09-30 15:32:27 UTC 2,652 bytes, 1 lines download raw bytes

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