"use strict";var e=Object.defineProperty,t=Object.defineProperties,o=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,n=(t,o,r)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;const i=require("../../../../common/vendor.js"),l=i.defineComponent((c=((e,t)=>{for(var o in t||(t={}))s.call(t,o)&&n(e,o,t[o]);if(r)for(var o of r(t))a.call(t,o)&&n(e,o,t[o]);return e})({},{name:"wd-loading",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"}}),p={props:i.loadingProps,setup(e){const t=i.context.id++,o=i.context.id++,r=i.context.id++,s={outline:(e="#4D80F0")=>``,ring:(e="#4D80F0",t="#a6bff7")=>``},a=e,n=i.ref(""),l=i.ref(""),c=i.ref("32px");i.watch((()=>a.size),(e=>{c.value=i.addUnit(e)}),{deep:!0,immediate:!0}),i.watch((()=>a.type),(()=>{f()}),{deep:!0,immediate:!0});const p=i.computed((()=>{const e={width:c.value,height:c.value};return`${i.objToStyle(e)}; ${a.customStyle}`})),d=i.computed((()=>`wd-loading ${a.customClass}`));function f(){const{type:e,color:t}=a;let o=i.isDef(e)?e:"ring";const r=`"data:image/svg+xml;base64,${i.encode("ring"===o?s[o](t,l.value):s[o](t))}"`;n.value=r}return i.onBeforeMount((()=>{l.value=i.gradient(a.color,"#ffffff",2)[1],f()})),(e,t)=>({a:i.s(`background-image: url(${n.value});`),b:i.n(d.value),c:i.s(p.value)})}},t(c,o(p))));var c,p;const d=i._export_sfc(l,[["__scopeId","data-v-f9deca45"]]);wx.createComponent(d);