1import{r as I,g as P,aa as O,d as j,E as z,h as b,a2 as R,ae as q,a1 as Y,as as D,T as F,n as $,W as E,Y as S,q as G,at as H}from"./core-i18n-CvkTSGFb-28.js";import{u as K}from"./index-DGJW-ids-28.js";import{r as L,g as x,a as h}from"./browser-Ddweagm--28.js";import{A as M}from"#entry";function W(e,n){let t;const l=I(!1),o=P({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(s){o.text=s}function c(){const s=o.parent,u=v.ns;if(!s.vLoadingAddClassList){let a=s.getAttribute("loading-number");a=Number.parseInt(a)-1,a?s.setAttribute("loading-number",a.toString()):(L(s,u.bm("parent","relative")),s.removeAttribute("loading-number")),L(s,u.bm("parent","hidden"))}d(),f.unmount()}function d(){var s,u;(u=(s=v.$el)==null?void 0:s.parentNode)==null||u.removeChild(v.$el)}function A(){var s;e.beforeClose&&!e.beforeClose()||(l.value=!0,clearTimeout(t),t=setTimeout(i,400),o.visible=!1,(s=e.closed)==null||s.call(e))}function i(){if(!l.value)return;const s=o.parent;l.value=!1,s.vLoadingAddClassList=void 0,c()}const C=j({name:"ElLoading",setup(s,{expose:u}){const{ns:a,zIndex:T}=K("loading");return u({ns:a,zIndex:T}),()=>{const k=o.spinner||o.svg,N=b("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...k?{innerHTML:k}:{}},[b("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),V=o.text?b("p",{class:a.b("text")},[o.text]):void 0;return b(F,{name:a.b("fade"),onAfterLeave:i},{default:R(()=>[q(Y("div",{style:{backgroundColor:o.background||""},class:[a.b("mask"),o.customClass,a.is("fullscreen",o.fullscreen)]},[b("div",{class:a.b("spinner")},[N,V])]),[[D,o.visible]])])})}}}),f=O(C);Object.assign(f._context,n??{});const v=f.mount(document.createElement("div"));return{...z(o),setText:r,removeElLoadingChild:d,close:A,handleAfterLeave:i,vm:v,get $el(){return v.$el}}}let _;const m=function(e={},n){if(!M)return;const t=Z(e);if(t.fullscreen&&_)return _;const l=W({...t,closed:()=>{var r;(r=t.closed)==null||r.call(t),t.fullscreen&&(_=void 0)}},n??m._context);J(t,t.parent,l),w(t,t.parent,l),t.parent.vLoadingAddClassList=()=>w(t,t.parent,l);let o=t.parent.getAttribute("loading-number");return o?o=`${Number.parseInt(o)+1}`:o="1",t.parent.setAttribute("loading-number",o),t.parent.appendChild(l.$el),$(()=>l.visible.value=t.visible),t.fullscreen&&(_=l),l},Z=e=>{var n,t,l,o;let r;return E(e.target)?r=(n=document.querySelector(e.target))!=null?n:document.body:r=e.target||document.body,{parent:r===document.body||e.body?document.body:r,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:r===document.body&&((t=e.fullscreen)!=null?t:!0),lock:(l=e.lock)!=null?l:!1,customClass:e.customClass||"",visible:(o=e.visible)!=null?o:!0,beforeClose:e.beforeClose,closed:e.closed,target:r}},J=async(e,n,t)=>{const{nextZIndex:l}=t.vm.zIndex||t.vm._.exposed.zIndex,o={};if(e.fullscreen)t.originalPosition.value=x(document.body,"position"),t.originalOverflow.value=x(document.body,"overflow"),o.zIndex=l();else if(e.parent===document.body){t.originalPosition.value=x(document.body,"position"),await $();for(const r of["top","left"]){const c=r==="top"?"scrollTop":"scrollLeft";o[r]=`${e.target.getBoundingClientRect()[r]+document.body[c]+document.documentElement[c]-Number.parseInt(x(document.body,`margin-${r}`),10)}px`}for(const r of["height","width"])o[r]=`${e.target.getBoundingClientRect()[r]}px`}else t.originalPosition.value=x(n,"position");for(const[r,c]of Object.entries(o))t.$el.style[r]=c},w=(e,n,t)=>{const l=t.vm.ns||t.vm._.exposed.ns;["absolute","fixed","sticky"].includes(t.originalPosition.value)?L(n,l.bm("parent","relative")):h(n,l.bm("parent","relative")),e.fullscreen&&e.lock?h(n,l.bm("parent","hidden")):L(n,l.bm("parent","hidden"))};m._context=null;const p=Symbol("ElLoading"),g=e=>`element-loading-${H(e)}`,B=(e,n)=>{var t,l,o,r;const c=n.instance,d=s=>S(n.value)?n.value[s]:void 0,A=s=>{const u=E(s)&&c?.[s]||s;return I(u)},i=s=>A(d(s)||e.getAttribute(g(s))),C=(t=d("fullscreen"))!=null?t:n.modifiers.fullscreen,f={text:i("text"),svg:i("svg"),svgViewBox:i("svgViewBox"),spinner:i("spinner"),background:i("background"),customClass:i("customClass"),fullscreen:C,target:(l=d("target"))!=null?l:C?void 0:e,body:(o=d("body"))!=null?o:n.modifiers.body,lock:(r=d("lock"))!=null?r:n.modifiers.lock},v=m(f);v._context=y._context,e[p]={options:f,instance:v}},Q=(e,n)=>{for(const t of Object.keys(e))G(e[t])&&(e[t].value=n[t])}
1,y={mounted(e,n){n.value&&B(e,n)},updated(e,n){const t=e[p];if(!n.value){t?.instance.close(),e[p]=null;return}t?Q(t.options,S(n.value)?n.value:{text:e.getAttribute(g("text")),svg:e.getAttribute(g("svg")),svgViewBox:e.getAttribute(g("svgViewBox")),spinner:e.getAttribute(g("spinner")),background:e.getAttribute(g("background")),customClass:e.getAttribute(g("customClass"))}):B(e,n)},unmounted(e){var n;(n=e[p])==null||n.instance.close(),e[p]=null}};y._context=null;const ne={install(e){m._context=e._context,y._context=e._context,e.directive("loading",y),e.config.globalProperties.$loading=m},directive:y,service:m};export{ne as E,m as L,y as v};
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.