1 |
- import{j as $,a7 as O,cc as S,bg as j,f as H,bH as R,aH as q,az as m,w as M,a8 as Q,x as Z,a9 as D,aR as F,bS as x,ao as G,C as B,av as V,bP as g,bQ as I,b5 as P,ag as K,cd as U,__tla as Y}from"./entry.a4369266.js";let _,J=Promise.all([(()=>{try{return Y}catch{}})()]).then(async()=>{function E(n){let e;const o=$(!1),t=O({...n,originalPosition:"",originalOverflow:"",visible:!1});function i(s){t.text=s}function l(){const s=t.parent,a=d.ns;if(!s.vLoadingAddClassList){let r=s.getAttribute("loading-number");r=Number.parseInt(r)-1,r?s.setAttribute("loading-number",r.toString()):(x(s,a.bm("parent","relative")),s.removeAttribute("loading-number")),x(s,a.bm("parent","hidden"))}u(),c.unmount()}function u(){var s,a;(a=(s=d.$el)==null?void 0:s.parentNode)==null||a.removeChild(d.$el)}function v(){var s;n.beforeClose&&!n.beforeClose()||(o.value=!0,clearTimeout(e),e=window.setTimeout(b,400),t.visible=!1,(s=n.closed)==null||s.call(n))}function b(){if(!o.value)return;const s=t.parent;o.value=!1,s.vLoadingAddClassList=void 0,l()}const c=S(H({name:"ElLoading",setup(s,{expose:a}){const{ns:r}=R("loading"),T=q();return a({ns:r,zIndex:T}),()=>{const A=t.spinner||t.svg,z=m("svg",{class:"circular",viewBox:t.svgViewBox?t.svgViewBox:"0 0 50 50",...A?{innerHTML:A}:{}},[m("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),N=t.text?m("p",{class:r.b("text")},[t.text]):void 0;return m(F,{name:r.b("fade"),onAfterLeave:b},{default:M(()=>[Q(Z("div",{style:{backgroundColor:t.background||""},class:[r.b("mask"),t.customClass,t.fullscreen?"is-fullscreen":""]},[m("div",{class:r.b("spinner")},[z,N])]),[[D,t.visible]])])})}}})),d=c.mount(document.createElement("div"));return{...j(t),setText:i,removeElLoadingChild:u,close:v,handleAfterLeave:b,vm:d,get $el(){return d.$el}}}let f,k,w,h,y,p,C,L;k=function(n={}){if(!G)return;const e=w(n);if(e.fullscreen&&f)return f;const o=E({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(f=void 0)}});h(e,e.parent,o),y(e,e.parent,o),e.parent.vLoadingAddClassList=()=>y(e,e.parent,o);let t=e.parent.getAttribute("loading-number");return t?t=`${Number.parseInt(t)+1}`:t="1",e.parent.setAttribute("loading-number",t),e.parent.appendChild(o.$el),B(()=>o.visible.value=e.visible),e.fullscreen&&(f=o),o},w=n=>{var e,o,t,i;let l;return V(n.target)?l=(e=document.querySelector(n.target))!=null?e:document.body:l=n.target||document.body,{parent:l===document.body||n.body?document.body:l,background:n.background||"",svg:n.svg||"",svgViewBox:n.svgViewBox||"",spinner:n.spinner||!1,text:n.text||"",fullscreen:l===document.body&&((o=n.fullscreen)!=null?o:!0),lock:(t=n.lock)!=null?t:!1,customClass:n.customClass||"",visible:(i=n.visible)!=null?i:!0,target:l}},h=async(n,e,o)=>{const{nextZIndex:t}=o.vm.zIndex,i={};if(n.fullscreen)o.originalPosition.value=g(document.body,"position"),o.originalOverflow.value=g(document.body,"overflow"),i.zIndex=t();else if(n.parent===document.body){o.originalPosition.value=g(document.body,"position"),await B();for(const l of["top","left"]){const u=l==="top"?"scrollTop":"scrollLeft";i[l]=`${n.target.getBoundingClientRect()[l]+document.body[u]+document.documentElement[u]-Number.parseInt(g(document.body,`margin-${l}`),10)}px`}for(const l of["height","width"])i[l]=`${n.target.getBoundingClientRect()[l]}px`}else o.originalPosition.value=g(e,"position");for(const[l,u]of Object.entries(i))o.$el.style[l]=u},y=(n,e,o)=>{const t=o.vm.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?x(e,t.bm("parent","relative")):I(e,t.bm("parent","relative")),n.fullscreen&&n.lock?I(e,t.bm("parent","hidden")):x(e,t.bm("parent","hidden"))},p=Symbol("ElLoading"),C=(n,e)=>{var o,t,i,l;const u=e.instance,v=a=>P(e.value)?e.value[a]:void 0,b=a=>{const r=V(a)&&(u==null?void 0:u[a])||a;return r&&$(r)},c=a=>b(v(a)||n.getAttribute(`element-loading-${U(a)}`)),d=(o=v("fullscreen"))!=null?o:e.modifiers.fullscreen,s={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:d,target:(t=v("target"))!=null?t:d?void 0:n,body:(i=v("body"))!=null?i:e.modifiers.body,lock:(l=v("lock"))!=null?l:e.modifiers.lock};n[p]={options:s,instance:k(s)}},L=(n,e)=>{for(const o of Object.keys(e))K(e[o])&&(e[o].value=n[o])},_={mounted(n,e){e.value&&C(n,e)},updated(n,e){const o=n[p];e.oldValue!==e.value&&(e.value&&!e.oldValue?C(n,e):e.value&&e.oldValue?P(e.value)&&L(e.value,o.options):o==null||o.instance.close())},unmounted(n){var e;(e=n[p])==null||e.instance.close()}}});export{J as __tla,_ as v};
|