vue-data-ui 2.2.93 → 2.2.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-glxNDdq7.cjs +843 -0
- package/dist/index.es-CfrFyT20.cjs +18 -0
- package/dist/purify.es-BJHiDXdY.cjs +3 -0
- package/dist/types/vue-data-ui.d.cts +5132 -0
- package/dist/vue-data-ui.cjs +1 -0
- package/package.json +13 -7
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Wa=require("./index-glxNDdq7.cjs");var St=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ho(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Wt=function(a){return a&&a.Math==Math&&a},U=Wt(typeof globalThis=="object"&&globalThis)||Wt(typeof window=="object"&&window)||Wt(typeof self=="object"&&self)||Wt(typeof St=="object"&&St)||function(){return this}()||St||Function("return this")(),lt={},L=function(a){try{return!!a()}catch{return!0}},xh=L,ce=!xh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Eh=L,$r=!Eh(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),Sh=$r,qt=Function.prototype.call,Y=Sh?qt.bind(qt):function(){return qt.apply(qt,arguments)},Yo={},Xo={}.propertyIsEnumerable,Wo=Object.getOwnPropertyDescriptor,Th=Wo&&!Xo.call({1:2},1);Yo.f=Th?function(e){var t=Wo(this,e);return!!t&&t.enumerable}:Xo;var Cr=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},qo=$r,Qo=Function.prototype,qa=Qo.call,Oh=qo&&Qo.bind.bind(qa,qa),k=qo?Oh:function(a){return function(){return qa.apply(a,arguments)}},Ko=k,$h=Ko({}.toString),Ch=Ko("".slice),Ge=function(a){return Ch($h(a),8,-1)},wh=k,Ah=L,Ph=Ge,ra=Object,Rh=wh("".split),Zo=Ah(function(){return!ra("z").propertyIsEnumerable(0)})?function(a){return Ph(a)=="String"?Rh(a,""):ra(a)}:ra,ze=function(a){return a==null},Ih=ze,Nh=TypeError,ge=function(a){if(Ih(a))throw Nh("Can't call method on "+a);return a},Mh=Zo,_h=ge,At=function(a){return Mh(_h(a))},Qa=typeof document=="object"&&document.all,Dh=typeof Qa>"u"&&Qa!==void 0,Jo={all:Qa,IS_HTMLDDA:Dh},eu=Jo,Vh=eu.all,V=eu.IS_HTMLDDA?function(a){return typeof a=="function"||a===Vh}:function(a){return typeof a=="function"},Vn=V,tu=Jo,Lh=tu.all,Te=tu.IS_HTMLDDA?function(a){return typeof a=="object"?a!==null:Vn(a)||a===Lh}:function(a){return typeof a=="object"?a!==null:Vn(a)},aa=U,kh=V,Bh=function(a){return kh(a)?a:void 0},He=function(a,e){return arguments.length<2?Bh(aa[a]):aa[a]&&aa[a][e]},Fh=k,wr=Fh({}.isPrototypeOf),Ar=typeof navigator<"u"&&String(navigator.userAgent)||"",ru=U,ia=Ar,Ln=ru.process,kn=ru.Deno,Bn=Ln&&Ln.versions||kn&&kn.version,Fn=Bn&&Bn.v8,le,mr;Fn&&(le=Fn.split("."),mr=le[0]>0&&le[0]<4?1:+(le[0]+le[1]));!mr&&ia&&(le=ia.match(/Edge\/(\d+)/),(!le||le[1]>=74)&&(le=ia.match(/Chrome\/(\d+)/),le&&(mr=+le[1])));var _i=mr,jn=_i,jh=L,Uh=U,Gh=Uh.String,au=!!Object.getOwnPropertySymbols&&!jh(function(){var a=Symbol();return!Gh(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&jn&&jn<41}),zh=au,iu=zh&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Hh=He,Yh=V,Xh=wr,Wh=iu,qh=Object,nu=Wh?function(a){return typeof a=="symbol"}:function(a){var e=Hh("Symbol");return Yh(e)&&Xh(e.prototype,qh(a))},Qh=String,Pr=function(a){try{return Qh(a)}catch{return"Object"}},Kh=V,Zh=Pr,Jh=TypeError,Oe=function(a){if(Kh(a))return a;throw Jh(Zh(a)+" is not a function")},ev=Oe,tv=ze,ht=function(a,e){var t=a[e];return tv(t)?void 0:ev(t)},na=Y,sa=V,oa=Te,rv=TypeError,av=function(a,e){var t,r;if(e==="string"&&sa(t=a.toString)&&!oa(r=na(t,a))||sa(t=a.valueOf)&&!oa(r=na(t,a))||e!=="string"&&sa(t=a.toString)&&!oa(r=na(t,a)))return r;throw rv("Can't convert object to primitive value")},su={exports:{}},Un=U,iv=Object.defineProperty,Di=function(a,e){try{iv(Un,a,{value:e,configurable:!0,writable:!0})}catch{Un[a]=e}return e},nv=U,sv=Di,Gn="__core-js_shared__",ov=nv[Gn]||sv(Gn,{}),Vi=ov,zn=Vi;(su.exports=function(a,e){return zn[a]||(zn[a]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Li=su.exports,uv=ge,lv=Object,Rr=function(a){return lv(uv(a))},hv=k,vv=Rr,fv=hv({}.hasOwnProperty),he=Object.hasOwn||function(e,t){return fv(vv(e),t)},cv=k,gv=0,dv=Math.random(),pv=cv(1 .toString),ou=function(a){return"Symbol("+(a===void 0?"":a)+")_"+pv(++gv+dv,36)},yv=U,mv=Li,Hn=he,bv=ou,xv=au,Ev=iu,rt=yv.Symbol,ua=mv("wks"),Sv=Ev?rt.for||rt:rt&&rt.withoutSetter||bv,z=function(a){return Hn(ua,a)||(ua[a]=xv&&Hn(rt,a)?rt[a]:Sv("Symbol."+a)),ua[a]},Tv=Y,Yn=Te,Xn=nu,Ov=ht,$v=av,Cv=z,wv=TypeError,Av=Cv("toPrimitive"),Pv=function(a,e){if(!Yn(a)||Xn(a))return a;var t=Ov(a,Av),r;if(t){if(e===void 0&&(e="default"),r=Tv(t,a,e),!Yn(r)||Xn(r))return r;throw wv("Can't convert object to primitive value")}return e===void 0&&(e="number"),$v(a,e)},Rv=Pv,Iv=nu,ki=function(a){var e=Rv(a,"string");return Iv(e)?e:e+""},Nv=U,Wn=Te,Ka=Nv.document,Mv=Wn(Ka)&&Wn(Ka.createElement),Ir=function(a){return Mv?Ka.createElement(a):{}},_v=ce,Dv=L,Vv=Ir,uu=!_v&&!Dv(function(){return Object.defineProperty(Vv("div"),"a",{get:function(){return 7}}).a!=7}),Lv=ce,kv=Y,Bv=Yo,Fv=Cr,jv=At,Uv=ki,Gv=he,zv=uu,qn=Object.getOwnPropertyDescriptor;lt.f=Lv?qn:function(e,t){if(e=jv(e),t=Uv(t),zv)try{return qn(e,t)}catch{}if(Gv(e,t))return Fv(!kv(Bv.f,e,t),e[t])};var de={},Hv=ce,Yv=L,lu=Hv&&Yv(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),Xv=Te,Wv=String,qv=TypeError,Z=function(a){if(Xv(a))return a;throw qv(Wv(a)+" is not an object")},Qv=ce,Kv=uu,Zv=lu,Qt=Z,Qn=ki,Jv=TypeError,la=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,ha="enumerable",va="configurable",fa="writable";de.f=Qv?Zv?function(e,t,r){if(Qt(e),t=Qn(t),Qt(r),typeof e=="function"&&t==="prototype"&&"value"in r&&fa in r&&!r[fa]){var i=ef(e,t);i&&i[fa]&&(e[t]=r.value,r={configurable:va in r?r[va]:i[va],enumerable:ha in r?r[ha]:i[ha],writable:!1})}return la(e,t,r)}:la:function(e,t,r){if(Qt(e),t=Qn(t),Qt(r),Kv)try{return la(e,t,r)}catch{}if("get"in r||"set"in r)throw Jv("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var tf=ce,rf=de,af=Cr,Pt=tf?function(a,e,t){return rf.f(a,e,af(1,t))}:function(a,e,t){return a[e]=t,a},hu={exports:{}},Za=ce,nf=he,vu=Function.prototype,sf=Za&&Object.getOwnPropertyDescriptor,Bi=nf(vu,"name"),of=Bi&&(function(){}).name==="something",uf=Bi&&(!Za||Za&&sf(vu,"name").configurable),Nr={EXISTS:Bi,PROPER:of,CONFIGURABLE:uf},lf=k,hf=V,Ja=Vi,vf=lf(Function.toString);hf(Ja.inspectSource)||(Ja.inspectSource=function(a){return vf(a)});var Fi=Ja.inspectSource,ff=U,cf=V,Kn=ff.WeakMap,gf=cf(Kn)&&/native code/.test(String(Kn)),df=Li,pf=ou,Zn=df("keys"),ji=function(a){return Zn[a]||(Zn[a]=pf(a))},Ui={},yf=gf,fu=U,mf=Te,bf=Pt,ca=he,ga=Vi,xf=ji,Ef=Ui,Jn="Object already initialized",ei=fu.TypeError,Sf=fu.WeakMap,br,$t,xr,Tf=function(a){return xr(a)?$t(a):br(a,{})},Of=function(a){return function(e){var t;if(!mf(e)||(t=$t(e)).type!==a)throw ei("Incompatible receiver, "+a+" required");return t}};if(yf||ga.state){var fe=ga.state||(ga.state=new Sf);fe.get=fe.get,fe.has=fe.has,fe.set=fe.set,br=function(a,e){if(fe.has(a))throw ei(Jn);return e.facade=a,fe.set(a,e),e},$t=function(a){return fe.get(a)||{}},xr=function(a){return fe.has(a)}}else{var Qe=xf("state");Ef[Qe]=!0,br=function(a,e){if(ca(a,Qe))throw ei(Jn);return e.facade=a,bf(a,Qe,e),e},$t=function(a){return ca(a,Qe)?a[Qe]:{}},xr=function(a){return ca(a,Qe)}}var Mr={set:br,get:$t,has:xr,enforce:Tf,getterFor:Of},Gi=k,$f=L,Cf=V,Kt=he,ti=ce,wf=Nr.CONFIGURABLE,Af=Fi,cu=Mr,Pf=cu.enforce,Rf=cu.get,es=String,vr=Object.defineProperty,If=Gi("".slice),Nf=Gi("".replace),Mf=Gi([].join),_f=ti&&!$f(function(){return vr(function(){},"length",{value:8}).length!==8}),Df=String(String).split("String"),Vf=hu.exports=function(a,e,t){If(es(e),0,7)==="Symbol("&&(e="["+Nf(es(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Kt(a,"name")||wf&&a.name!==e)&&(ti?vr(a,"name",{value:e,configurable:!0}):a.name=e),_f&&t&&Kt(t,"arity")&&a.length!==t.arity&&vr(a,"length",{value:t.arity});try{t&&Kt(t,"constructor")&&t.constructor?ti&&vr(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=Pf(a);return Kt(r,"source")||(r.source=Mf(Df,typeof e=="string"?e:"")),a};Function.prototype.toString=Vf(function(){return Cf(this)&&Rf(this).source||Af(this)},"toString");var gu=hu.exports,Lf=V,kf=de,Bf=gu,Ff=Di,Ye=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(Lf(t)&&Bf(t,n,r),r.global)i?a[e]=t:Ff(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:kf.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},du={},jf=Math.ceil,Uf=Math.floor,Gf=Math.trunc||function(e){var t=+e;return(t>0?Uf:jf)(t)},zf=Gf,_r=function(a){var e=+a;return e!==e||e===0?0:zf(e)},Hf=_r,Yf=Math.max,Xf=Math.min,pu=function(a,e){var t=Hf(a);return t<0?Yf(t+e,0):Xf(t,e)},Wf=_r,qf=Math.min,vt=function(a){return a>0?qf(Wf(a),9007199254740991):0},Qf=vt,Dr=function(a){return Qf(a.length)},Kf=At,Zf=pu,Jf=Dr,ts=function(a){return function(e,t,r){var i=Kf(e),n=Jf(i),o=Zf(r,n),s;if(a&&t!=t){for(;n>o;)if(s=i[o++],s!=s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},yu={includes:ts(!0),indexOf:ts(!1)},ec=k,da=he,tc=At,rc=yu.indexOf,ac=Ui,rs=ec([].push),mu=function(a,e){var t=tc(a),r=0,i=[],n;for(n in t)!da(ac,n)&&da(t,n)&&rs(i,n);for(;e.length>r;)da(t,n=e[r++])&&(~rc(i,n)||rs(i,n));return i},zi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ic=mu,nc=zi,sc=nc.concat("length","prototype");du.f=Object.getOwnPropertyNames||function(e){return ic(e,sc)};var bu={};bu.f=Object.getOwnPropertySymbols;var oc=He,uc=k,lc=du,hc=bu,vc=Z,fc=uc([].concat),cc=oc("Reflect","ownKeys")||function(e){var t=lc.f(vc(e)),r=hc.f;return r?fc(t,r(e)):t},as=he,gc=cc,dc=lt,pc=de,yc=function(a,e,t){for(var r=gc(e),i=pc.f,n=dc.f,o=0;o<r.length;o++){var s=r[o];!as(a,s)&&!(t&&as(t,s))&&i(a,s,n(e,s))}},mc=L,bc=V,xc=/#|\.prototype\./,Rt=function(a,e){var t=Sc[Ec(a)];return t==Oc?!0:t==Tc?!1:bc(e)?mc(e):!!e},Ec=Rt.normalize=function(a){return String(a).replace(xc,".").toLowerCase()},Sc=Rt.data={},Tc=Rt.NATIVE="N",Oc=Rt.POLYFILL="P",xu=Rt,pa=U,$c=lt.f,Cc=Pt,wc=Ye,Ac=Di,Pc=yc,Rc=xu,ee=function(a,e){var t=a.target,r=a.global,i=a.stat,n,o,s,u,l,h;if(r?o=pa:i?o=pa[t]||Ac(t,{}):o=(pa[t]||{}).prototype,o)for(s in e){if(l=e[s],a.dontCallGetSet?(h=$c(o,s),u=h&&h.value):u=o[s],n=Rc(r?s:t+(i?".":"#")+s,a.forced),!n&&u!==void 0){if(typeof l==typeof u)continue;Pc(l,u)}(a.sham||u&&u.sham)&&Cc(l,"sham",!0),wc(o,s,l,a)}},Ic=Ge,It=typeof process<"u"&&Ic(process)=="process",Nc=k,Mc=Oe,_c=function(a,e,t){try{return Nc(Mc(Object.getOwnPropertyDescriptor(a,e)[t]))}catch{}},Dc=V,Vc=String,Lc=TypeError,kc=function(a){if(typeof a=="object"||Dc(a))return a;throw Lc("Can't set "+Vc(a)+" as a prototype")},Bc=_c,Fc=Z,jc=kc,Eu=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,e={},t;try{t=Bc(Object.prototype,"__proto__","set"),t(e,[]),a=e instanceof Array}catch{}return function(i,n){return Fc(i),jc(n),a?t(i,n):i.__proto__=n,i}}():void 0),Uc=de.f,Gc=he,zc=z,is=zc("toStringTag"),Hi=function(a,e,t){a&&!t&&(a=a.prototype),a&&!Gc(a,is)&&Uc(a,is,{configurable:!0,value:e})},ns=gu,Hc=de,Yc=function(a,e,t){return t.get&&ns(t.get,e,{getter:!0}),t.set&&ns(t.set,e,{setter:!0}),Hc.f(a,e,t)},Xc=He,Wc=Yc,qc=z,Qc=ce,ss=qc("species"),Kc=function(a){var e=Xc(a);Qc&&e&&!e[ss]&&Wc(e,ss,{configurable:!0,get:function(){return this}})},Zc=wr,Jc=TypeError,eg=function(a,e){if(Zc(e,a))return a;throw Jc("Incorrect invocation")},tg=z,rg=tg("toStringTag"),Su={};Su[rg]="z";var ag=String(Su)==="[object z]",ig=ag,ng=V,fr=Ge,sg=z,og=sg("toStringTag"),ug=Object,lg=fr(function(){return arguments}())=="Arguments",hg=function(a,e){try{return a[e]}catch{}},Yi=ig?fr:function(a){var e,t,r;return a===void 0?"Undefined":a===null?"Null":typeof(t=hg(e=ug(a),og))=="string"?t:lg?fr(e):(r=fr(e))=="Object"&&ng(e.callee)?"Arguments":r},vg=k,fg=L,Tu=V,cg=Yi,gg=He,dg=Fi,Ou=function(){},pg=[],$u=gg("Reflect","construct"),Xi=/^\s*(?:class|function)\b/,yg=vg(Xi.exec),mg=!Xi.exec(Ou),gt=function(e){if(!Tu(e))return!1;try{return $u(Ou,pg,e),!0}catch{return!1}},Cu=function(e){if(!Tu(e))return!1;switch(cg(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mg||!!yg(Xi,dg(e))}catch{return!0}};Cu.sham=!0;var bg=!$u||fg(function(){var a;return gt(gt.call)||!gt(Object)||!gt(function(){a=!0})||a})?Cu:gt,xg=bg,Eg=Pr,Sg=TypeError,Tg=function(a){if(xg(a))return a;throw Sg(Eg(a)+" is not a constructor")},os=Z,Og=Tg,$g=ze,Cg=z,wg=Cg("species"),wu=function(a,e){var t=os(a).constructor,r;return t===void 0||$g(r=os(t)[wg])?e:Og(r)},Ag=$r,Au=Function.prototype,us=Au.apply,ls=Au.call,Wi=typeof Reflect=="object"&&Reflect.apply||(Ag?ls.bind(us):function(){return ls.apply(us,arguments)}),Pg=Ge,Rg=k,Nt=function(a){if(Pg(a)==="Function")return Rg(a)},hs=Nt,Ig=Oe,Ng=$r,Mg=hs(hs.bind),qi=function(a,e){return Ig(a),e===void 0?a:Ng?Mg(a,e):function(){return a.apply(e,arguments)}},_g=He,Pu=_g("document","documentElement"),Dg=k,Vg=Dg([].slice),Lg=TypeError,kg=function(a,e){if(a<e)throw Lg("Not enough arguments");return a},Bg=Ar,Ru=/(?:ipad|iphone|ipod).*applewebkit/i.test(Bg),ie=U,Fg=Wi,jg=qi,vs=V,Ug=he,Iu=L,fs=Pu,Gg=Vg,cs=Ir,zg=kg,Hg=Ru,Yg=It,ri=ie.setImmediate,ai=ie.clearImmediate,Xg=ie.process,ya=ie.Dispatch,Wg=ie.Function,gs=ie.MessageChannel,qg=ie.String,ma=0,Tt={},ds="onreadystatechange",Ct,_e,ba,xa;Iu(function(){Ct=ie.location});var Qi=function(a){if(Ug(Tt,a)){var e=Tt[a];delete Tt[a],e()}},Ea=function(a){return function(){Qi(a)}},ps=function(a){Qi(a.data)},ys=function(a){ie.postMessage(qg(a),Ct.protocol+"//"+Ct.host)};(!ri||!ai)&&(ri=function(e){zg(arguments.length,1);var t=vs(e)?e:Wg(e),r=Gg(arguments,1);return Tt[++ma]=function(){Fg(t,void 0,r)},_e(ma),ma},ai=function(e){delete Tt[e]},Yg?_e=function(a){Xg.nextTick(Ea(a))}:ya&&ya.now?_e=function(a){ya.now(Ea(a))}:gs&&!Hg?(ba=new gs,xa=ba.port2,ba.port1.onmessage=ps,_e=jg(xa.postMessage,xa)):ie.addEventListener&&vs(ie.postMessage)&&!ie.importScripts&&Ct&&Ct.protocol!=="file:"&&!Iu(ys)?(_e=ys,ie.addEventListener("message",ps,!1)):ds in cs("script")?_e=function(a){fs.appendChild(cs("script"))[ds]=function(){fs.removeChild(this),Qi(a)}}:_e=function(a){setTimeout(Ea(a),0)});var Nu={set:ri,clear:ai},Mu=function(){this.head=null,this.tail=null};Mu.prototype={add:function(a){var e={item:a,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var a=this.head;if(a){var e=this.head=a.next;return e===null&&(this.tail=null),a.item}}};var _u=Mu,Qg=Ar,Kg=/ipad|iphone|ipod/i.test(Qg)&&typeof Pebble<"u",Zg=Ar,Jg=/web0s(?!.*chrome)/i.test(Zg),je=U,ms=qi,ed=lt.f,Sa=Nu.set,td=_u,rd=Ru,ad=Kg,id=Jg,Ta=It,bs=je.MutationObserver||je.WebKitMutationObserver,xs=je.document,Es=je.process,Zt=je.Promise,Ss=ed(je,"queueMicrotask"),ii=Ss&&Ss.value,Ke,Oa,$a,Jt,Ts;if(!ii){var er=new td,tr=function(){var a,e;for(Ta&&(a=Es.domain)&&a.exit();e=er.get();)try{e()}catch(t){throw er.head&&Ke(),t}a&&a.enter()};!rd&&!Ta&&!id&&bs&&xs?(Oa=!0,$a=xs.createTextNode(""),new bs(tr).observe($a,{characterData:!0}),Ke=function(){$a.data=Oa=!Oa}):!ad&&Zt&&Zt.resolve?(Jt=Zt.resolve(void 0),Jt.constructor=Zt,Ts=ms(Jt.then,Jt),Ke=function(){Ts(tr)}):Ta?Ke=function(){Es.nextTick(tr)}:(Sa=ms(Sa,je),Ke=function(){Sa(tr)}),ii=function(a){er.head||Ke(),er.add(a)}}var nd=ii,sd=function(a,e){try{arguments.length==1?console.error(a):console.error(a,e)}catch{}},Ki=function(a){try{return{error:!1,value:a()}}catch(e){return{error:!0,value:e}}},od=U,Vr=od.Promise,Du=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",ud=Du,ld=It,hd=!ud&&!ld&&typeof window=="object"&&typeof document=="object",vd=U,Ot=Vr,fd=V,cd=xu,gd=Fi,dd=z,pd=hd,yd=Du,Ca=_i;Ot&&Ot.prototype;var md=dd("species"),ni=!1,Vu=fd(vd.PromiseRejectionEvent),bd=cd("Promise",function(){var a=gd(Ot),e=a!==String(Ot);if(!e&&Ca===66)return!0;if(!Ca||Ca<51||!/native code/.test(a)){var t=new Ot(function(n){n(1)}),r=function(n){n(function(){},function(){})},i=t.constructor={};if(i[md]=r,ni=t.then(function(){})instanceof r,!ni)return!0}return!e&&(pd||yd)&&!Vu}),Mt={CONSTRUCTOR:bd,REJECTION_EVENT:Vu,SUBCLASSING:ni},ft={},Os=Oe,xd=TypeError,Ed=function(a){var e,t;this.promise=new a(function(r,i){if(e!==void 0||t!==void 0)throw xd("Bad Promise constructor");e=r,t=i}),this.resolve=Os(e),this.reject=Os(t)};ft.f=function(a){return new Ed(a)};var Sd=ee,Er=It,we=U,ot=Y,$s=Ye,Cs=Eu,Td=Hi,Od=Kc,$d=Oe,cr=V,Cd=Te,wd=eg,Ad=wu,Lu=Nu.set,Zi=nd,Pd=sd,Rd=Ki,Id=_u,ku=Mr,Sr=Vr,Ji=Mt,Bu=ft,Lr="Promise",Fu=Ji.CONSTRUCTOR,Nd=Ji.REJECTION_EVENT,Md=Ji.SUBCLASSING,wa=ku.getterFor(Lr),_d=ku.set,tt=Sr&&Sr.prototype,ke=Sr,rr=tt,ju=we.TypeError,si=we.document,en=we.process,oi=Bu.f,Dd=oi,Vd=!!(si&&si.createEvent&&we.dispatchEvent),Uu="unhandledrejection",Ld="rejectionhandled",ws=0,Gu=1,kd=2,tn=1,zu=2,ar,As,Bd,Ps,Hu=function(a){var e;return Cd(a)&&cr(e=a.then)?e:!1},Yu=function(a,e){var t=e.value,r=e.state==Gu,i=r?a.ok:a.fail,n=a.resolve,o=a.reject,s=a.domain,u,l,h;try{i?(r||(e.rejection===zu&&jd(e),e.rejection=tn),i===!0?u=t:(s&&s.enter(),u=i(t),s&&(s.exit(),h=!0)),u===a.promise?o(ju("Promise-chain cycle")):(l=Hu(u))?ot(l,u,n,o):n(u)):o(t)}catch(f){s&&!h&&s.exit(),o(f)}},Xu=function(a,e){a.notified||(a.notified=!0,Zi(function(){for(var t=a.reactions,r;r=t.get();)Yu(r,a);a.notified=!1,e&&!a.rejection&&Fd(a)}))},Wu=function(a,e,t){var r,i;Vd?(r=si.createEvent("Event"),r.promise=e,r.reason=t,r.initEvent(a,!1,!0),we.dispatchEvent(r)):r={promise:e,reason:t},!Nd&&(i=we["on"+a])?i(r):a===Uu&&Pd("Unhandled promise rejection",t)},Fd=function(a){ot(Lu,we,function(){var e=a.facade,t=a.value,r=Rs(a),i;if(r&&(i=Rd(function(){Er?en.emit("unhandledRejection",t,e):Wu(Uu,e,t)}),a.rejection=Er||Rs(a)?zu:tn,i.error))throw i.value})},Rs=function(a){return a.rejection!==tn&&!a.parent},jd=function(a){ot(Lu,we,function(){var e=a.facade;Er?en.emit("rejectionHandled",e):Wu(Ld,e,a.value)})},at=function(a,e,t){return function(r){a(e,r,t)}},nt=function(a,e,t){a.done||(a.done=!0,t&&(a=t),a.value=e,a.state=kd,Xu(a,!0))},ui=function(a,e,t){if(!a.done){a.done=!0,t&&(a=t);try{if(a.facade===e)throw ju("Promise can't be resolved itself");var r=Hu(e);r?Zi(function(){var i={done:!1};try{ot(r,e,at(ui,i,a),at(nt,i,a))}catch(n){nt(i,n,a)}}):(a.value=e,a.state=Gu,Xu(a,!1))}catch(i){nt({done:!1},i,a)}}};if(Fu&&(ke=function(e){wd(this,rr),$d(e),ot(ar,this);var t=wa(this);try{e(at(ui,t),at(nt,t))}catch(r){nt(t,r)}},rr=ke.prototype,ar=function(e){_d(this,{type:Lr,done:!1,notified:!1,parent:!1,reactions:new Id,rejection:!1,state:ws,value:void 0})},ar.prototype=$s(rr,"then",function(e,t){var r=wa(this),i=oi(Ad(this,ke));return r.parent=!0,i.ok=cr(e)?e:!0,i.fail=cr(t)&&t,i.domain=Er?en.domain:void 0,r.state==ws?r.reactions.add(i):Zi(function(){Yu(i,r)}),i.promise}),As=function(){var a=new ar,e=wa(a);this.promise=a,this.resolve=at(ui,e),this.reject=at(nt,e)},Bu.f=oi=function(a){return a===ke||a===Bd?new As(a):Dd(a)},cr(Sr)&&tt!==Object.prototype)){Ps=tt.then,Md||$s(tt,"then",function(e,t){var r=this;return new ke(function(i,n){ot(Ps,r,i,n)}).then(e,t)},{unsafe:!0});try{delete tt.constructor}catch{}Cs&&Cs(tt,rr)}Sd({global:!0,constructor:!0,wrap:!0,forced:Fu},{Promise:ke});Td(ke,Lr,!1);Od(Lr);var _t={},Ud=z,Gd=_t,zd=Ud("iterator"),Hd=Array.prototype,Yd=function(a){return a!==void 0&&(Gd.Array===a||Hd[zd]===a)},Xd=Yi,Is=ht,Wd=ze,qd=_t,Qd=z,Kd=Qd("iterator"),qu=function(a){if(!Wd(a))return Is(a,Kd)||Is(a,"@@iterator")||qd[Xd(a)]},Zd=Y,Jd=Oe,ep=Z,tp=Pr,rp=qu,ap=TypeError,ip=function(a,e){var t=arguments.length<2?rp(a):e;if(Jd(t))return ep(Zd(t,a));throw ap(tp(a)+" is not iterable")},np=Y,Ns=Z,sp=ht,op=function(a,e,t){var r,i;Ns(a);try{if(r=sp(a,"return"),!r){if(e==="throw")throw t;return t}r=np(r,a)}catch(n){i=!0,r=n}if(e==="throw")throw t;if(i)throw r;return Ns(r),t},up=qi,lp=Y,hp=Z,vp=Pr,fp=Yd,cp=Dr,Ms=wr,gp=ip,dp=qu,_s=op,pp=TypeError,gr=function(a,e){this.stopped=a,this.result=e},Ds=gr.prototype,Qu=function(a,e,t){var r=t&&t.that,i=!!(t&&t.AS_ENTRIES),n=!!(t&&t.IS_RECORD),o=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),u=up(e,r),l,h,f,c,v,d,g,p=function(x){return l&&_s(l,"normal",x),new gr(!0,x)},y=function(x){return i?(hp(x),s?u(x[0],x[1],p):u(x[0],x[1])):s?u(x,p):u(x)};if(n)l=a.iterator;else if(o)l=a;else{if(h=dp(a),!h)throw pp(vp(a)+" is not iterable");if(fp(h)){for(f=0,c=cp(a);c>f;f++)if(v=y(a[f]),v&&Ms(Ds,v))return v;return new gr(!1)}l=gp(a,h)}for(d=n?a.next:l.next;!(g=lp(d,l)).done;){try{v=y(g.value)}catch(x){_s(l,"throw",x)}if(typeof v=="object"&&v&&Ms(Ds,v))return v}return new gr(!1)},yp=z,Ku=yp("iterator"),Zu=!1;try{var mp=0,Vs={next:function(){return{done:!!mp++}},return:function(){Zu=!0}};Vs[Ku]=function(){return this},Array.from(Vs,function(){throw 2})}catch{}var bp=function(a,e){if(!e&&!Zu)return!1;var t=!1;try{var r={};r[Ku]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},xp=Vr,Ep=bp,Sp=Mt.CONSTRUCTOR,Ju=Sp||!Ep(function(a){xp.all(a).then(void 0,function(){})}),Tp=ee,Op=Y,$p=Oe,Cp=ft,wp=Ki,Ap=Qu,Pp=Ju;Tp({target:"Promise",stat:!0,forced:Pp},{all:function(e){var t=this,r=Cp.f(t),i=r.resolve,n=r.reject,o=wp(function(){var s=$p(t.resolve),u=[],l=0,h=1;Ap(e,function(f){var c=l++,v=!1;h++,Op(s,t,f).then(function(d){v||(v=!0,u[c]=d,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var Rp=ee,Ip=Mt.CONSTRUCTOR,li=Vr,Np=He,Mp=V,_p=Ye,Ls=li&&li.prototype;Rp({target:"Promise",proto:!0,forced:Ip,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Mp(li)){var ks=Np("Promise").prototype.catch;Ls.catch!==ks&&_p(Ls,"catch",ks,{unsafe:!0})}var Dp=ee,Vp=Y,Lp=Oe,kp=ft,Bp=Ki,Fp=Qu,jp=Ju;Dp({target:"Promise",stat:!0,forced:jp},{race:function(e){var t=this,r=kp.f(t),i=r.reject,n=Bp(function(){var o=Lp(t.resolve);Fp(e,function(s){Vp(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var Up=ee,Gp=Y,zp=ft,Hp=Mt.CONSTRUCTOR;Up({target:"Promise",stat:!0,forced:Hp},{reject:function(e){var t=zp.f(this);return Gp(t.reject,void 0,e),t.promise}});var Yp=Z,Xp=Te,Wp=ft,qp=function(a,e){if(Yp(a),Xp(e)&&e.constructor===a)return e;var t=Wp.f(a),r=t.resolve;return r(e),t.promise},Qp=ee,Kp=He,Zp=Mt.CONSTRUCTOR,Jp=qp;Kp("Promise");Qp({target:"Promise",stat:!0,forced:Zp},{resolve:function(e){return Jp(this,e)}});function Bs(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){t(l);return}s.done?e(u):Promise.resolve(u).then(r,i)}function Ee(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){Bs(n,r,i,o,s,"next",u)}function s(u){Bs(n,r,i,o,s,"throw",u)}o(void 0)})}}var ey=Yi,ty=String,pe=function(a){if(ey(a)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return ty(a)},ry=Z,el=function(){var a=ry(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},rn=L,ay=U,an=ay.RegExp,nn=rn(function(){var a=an("a","y");return a.lastIndex=2,a.exec("abcd")!=null}),iy=nn||rn(function(){return!an("a","y").sticky}),ny=nn||rn(function(){var a=an("^r","gy");return a.lastIndex=2,a.exec("str")!=null}),tl={BROKEN_CARET:ny,MISSED_STICKY:iy,UNSUPPORTED_Y:nn},rl={},sy=mu,oy=zi,uy=Object.keys||function(e){return sy(e,oy)},ly=ce,hy=lu,vy=de,fy=Z,cy=At,gy=uy;rl.f=ly&&!hy?Object.defineProperties:function(e,t){fy(e);for(var r=cy(t),i=gy(t),n=i.length,o=0,s;n>o;)vy.f(e,s=i[o++],r[s]);return e};var dy=Z,py=rl,Fs=zi,yy=Ui,my=Pu,by=Ir,xy=ji,js=">",Us="<",hi="prototype",vi="script",al=xy("IE_PROTO"),Aa=function(){},il=function(a){return Us+vi+js+a+Us+"/"+vi+js},Gs=function(a){a.write(il("")),a.close();var e=a.parentWindow.Object;return a=null,e},Ey=function(){var a=by("iframe"),e="java"+vi+":",t;return a.style.display="none",my.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(il("document.F=Object")),t.close(),t.F},ir,dr=function(){try{ir=new ActiveXObject("htmlfile")}catch{}dr=typeof document<"u"?document.domain&&ir?Gs(ir):Ey():Gs(ir);for(var a=Fs.length;a--;)delete dr[hi][Fs[a]];return dr()};yy[al]=!0;var sn=Object.create||function(e,t){var r;return e!==null?(Aa[hi]=dy(e),r=new Aa,Aa[hi]=null,r[al]=e):r=dr(),t===void 0?r:py.f(r,t)},Sy=L,Ty=U,Oy=Ty.RegExp,$y=Sy(function(){var a=Oy(".","s");return!(a.dotAll&&a.exec(`
|
|
2
|
+
`)&&a.flags==="s")}),Cy=L,wy=U,Ay=wy.RegExp,Py=Cy(function(){var a=Ay("(?<a>b)","g");return a.exec("b").groups.a!=="b"||"b".replace(a,"$<a>c")!=="bc"}),it=Y,kr=k,Ry=pe,Iy=el,Ny=tl,My=Li,_y=sn,Dy=Mr.get,Vy=$y,Ly=Py,ky=My("native-string-replace",String.prototype.replace),Tr=RegExp.prototype.exec,fi=Tr,By=kr("".charAt),Fy=kr("".indexOf),jy=kr("".replace),Pa=kr("".slice),ci=function(){var a=/a/,e=/b*/g;return it(Tr,a,"a"),it(Tr,e,"a"),a.lastIndex!==0||e.lastIndex!==0}(),nl=Ny.BROKEN_CARET,gi=/()??/.exec("")[1]!==void 0,Uy=ci||gi||nl||Vy||Ly;Uy&&(fi=function(e){var t=this,r=Dy(t),i=Ry(e),n=r.raw,o,s,u,l,h,f,c;if(n)return n.lastIndex=t.lastIndex,o=it(fi,n,i),t.lastIndex=n.lastIndex,o;var v=r.groups,d=nl&&t.sticky,g=it(Iy,t),p=t.source,y=0,x=i;if(d&&(g=jy(g,"y",""),Fy(g,"g")===-1&&(g+="g"),x=Pa(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&By(i,t.lastIndex-1)!==`
|
|
3
|
+
`)&&(p="(?: "+p+")",x=" "+x,y++),s=new RegExp("^(?:"+p+")",g)),gi&&(s=new RegExp("^"+p+"$(?!\\s)",g)),ci&&(u=t.lastIndex),l=it(Tr,d?s:t,x),d?l?(l.input=Pa(l.input,y),l[0]=Pa(l[0],y),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:ci&&l&&(t.lastIndex=t.global?l.index+l[0].length:u),gi&&l&&l.length>1&&it(ky,l[0],s,function(){for(h=1;h<arguments.length-2;h++)arguments[h]===void 0&&(l[h]=void 0)}),l&&v)for(l.groups=f=_y(null),h=0;h<v.length;h++)c=v[h],f[c[0]]=l[c[1]];return l});var Br=fi,Gy=ee,zs=Br;Gy({target:"RegExp",proto:!0,forced:/./.exec!==zs},{exec:zs});var Hs=Nt,Ys=Ye,zy=Br,Xs=L,sl=z,Hy=Pt,Yy=sl("species"),Ra=RegExp.prototype,on=function(a,e,t,r){var i=sl(a),n=!Xs(function(){var l={};return l[i]=function(){return 7},""[a](l)!=7}),o=n&&!Xs(function(){var l=!1,h=/a/;return a==="split"&&(h={},h.constructor={},h.constructor[Yy]=function(){return h},h.flags="",h[i]=/./[i]),h.exec=function(){return l=!0,null},h[i](""),!l});if(!n||!o||t){var s=Hs(/./[i]),u=e(i,""[a],function(l,h,f,c,v){var d=Hs(l),g=h.exec;return g===zy||g===Ra.exec?n&&!v?{done:!0,value:s(h,f,c)}:{done:!0,value:d(f,h,c)}:{done:!1}});Ys(String.prototype,a,u[0]),Ys(Ra,i,u[1])}r&&Hy(Ra[i],"sham",!0)},un=k,Xy=_r,Wy=pe,qy=ge,Qy=un("".charAt),Ws=un("".charCodeAt),Ky=un("".slice),qs=function(a){return function(e,t){var r=Wy(qy(e)),i=Xy(t),n=r.length,o,s;return i<0||i>=n?a?"":void 0:(o=Ws(r,i),o<55296||o>56319||i+1===n||(s=Ws(r,i+1))<56320||s>57343?a?Qy(r,i):o:a?Ky(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Zy={codeAt:qs(!1),charAt:qs(!0)},Jy=Zy.charAt,ln=function(a,e,t){return e+(t?Jy(a,e).length:1)},Qs=Y,em=Z,tm=V,rm=Ge,am=Br,im=TypeError,hn=function(a,e){var t=a.exec;if(tm(t)){var r=Qs(t,a,e);return r!==null&&em(r),r}if(rm(a)==="RegExp")return Qs(am,a,e);throw im("RegExp#exec called on incompatible receiver")},nm=Y,sm=on,om=Z,um=ze,lm=vt,Ia=pe,hm=ge,vm=ht,fm=ln,Ks=hn;sm("match",function(a,e,t){return[function(i){var n=hm(this),o=um(i)?void 0:vm(i,a);return o?nm(o,i,n):new RegExp(i)[a](Ia(n))},function(r){var i=om(this),n=Ia(r),o=t(e,i,n);if(o.done)return o.value;if(!i.global)return Ks(i,n);var s=i.unicode;i.lastIndex=0;for(var u=[],l=0,h;(h=Ks(i,n))!==null;){var f=Ia(h[0]);u[l]=f,f===""&&(i.lastIndex=fm(n,lm(i.lastIndex),s)),l++}return l===0?null:u}]});var vn=k,cm=Rr,gm=Math.floor,Na=vn("".charAt),dm=vn("".replace),Ma=vn("".slice),pm=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ym=/\$([$&'`]|\d{1,2})/g,mm=function(a,e,t,r,i,n){var o=t+a.length,s=r.length,u=ym;return i!==void 0&&(i=cm(i),u=pm),dm(n,u,function(l,h){var f;switch(Na(h,0)){case"$":return"$";case"&":return a;case"`":return Ma(e,0,t);case"'":return Ma(e,o);case"<":f=i[Ma(h,1,-1)];break;default:var c=+h;if(c===0)return l;if(c>s){var v=gm(c/10);return v===0?l:v<=s?r[v-1]===void 0?Na(h,1):r[v-1]+Na(h,1):l}f=r[c-1]}return f===void 0?"":f})},bm=Wi,Zs=Y,Fr=k,xm=on,Em=L,Sm=Z,Tm=V,Om=ze,$m=_r,Cm=vt,Ze=pe,wm=ge,Am=ln,Pm=ht,Rm=mm,Im=hn,Nm=z,di=Nm("replace"),Mm=Math.max,_m=Math.min,Dm=Fr([].concat),_a=Fr([].push),Js=Fr("".indexOf),eo=Fr("".slice),Vm=function(a){return a===void 0?a:String(a)},Lm=function(){return"a".replace(/./,"$0")==="$0"}(),to=function(){return/./[di]?/./[di]("a","$0")==="":!1}(),km=!Em(function(){var a=/./;return a.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(a,"$<a>")!=="7"});xm("replace",function(a,e,t){var r=to?"$":"$0";return[function(n,o){var s=wm(this),u=Om(n)?void 0:Pm(n,di);return u?Zs(u,n,s,o):Zs(e,Ze(s),n,o)},function(i,n){var o=Sm(this),s=Ze(i);if(typeof n=="string"&&Js(n,r)===-1&&Js(n,"$<")===-1){var u=t(e,o,s,n);if(u.done)return u.value}var l=Tm(n);l||(n=Ze(n));var h=o.global;if(h){var f=o.unicode;o.lastIndex=0}for(var c=[];;){var v=Im(o,s);if(v===null||(_a(c,v),!h))break;var d=Ze(v[0]);d===""&&(o.lastIndex=Am(s,Cm(o.lastIndex),f))}for(var g="",p=0,y=0;y<c.length;y++){v=c[y];for(var x=Ze(v[0]),b=Mm(_m($m(v.index),s.length),0),E=[],C=1;C<v.length;C++)_a(E,Vm(v[C]));var O=v.groups;if(l){var S=Dm([x],E,b,s);O!==void 0&&_a(S,O);var w=Ze(bm(n,void 0,S))}else w=Rm(x,s,b,E,O,n);b>=p&&(g+=eo(s,p,b)+w,p=b+x.length)}return g+eo(s,p)}]},!km||!Lm||to);var Bm=Te,Fm=Ge,jm=z,Um=jm("match"),ol=function(a){var e;return Bm(a)&&((e=a[Um])!==void 0?!!e:Fm(a)=="RegExp")},Gm=ol,zm=TypeError,fn=function(a){if(Gm(a))throw zm("The method doesn't accept regular expressions");return a},Hm=z,Ym=Hm("match"),cn=function(a){var e=/./;try{"/./"[a](e)}catch{try{return e[Ym]=!1,"/./"[a](e)}catch{}}return!1},Xm=ee,ul=Nt,Wm=lt.f,qm=vt,ro=pe,Qm=fn,Km=ge,Zm=cn,ao=ul("".startsWith),Jm=ul("".slice),e0=Math.min,ll=Zm("startsWith"),t0=!ll&&!!function(){var a=Wm(String.prototype,"startsWith");return a&&!a.writable}();Xm({target:"String",proto:!0,forced:!t0&&!ll},{startsWith:function(e){var t=ro(Km(this));Qm(e);var r=qm(e0(arguments.length>1?arguments[1]:void 0,t.length)),i=ro(e);return ao?ao(t,i,r):Jm(t,r,r+i.length)===i}});var r0=z,a0=sn,i0=de.f,pi=r0("unscopables"),yi=Array.prototype;yi[pi]==null&&i0(yi,pi,{configurable:!0,value:a0(null)});var n0=function(a){yi[pi][a]=!0},s0=L,o0=!s0(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype}),u0=he,l0=V,h0=Rr,v0=ji,f0=o0,io=v0("IE_PROTO"),mi=Object,c0=mi.prototype,hl=f0?mi.getPrototypeOf:function(a){var e=h0(a);if(u0(e,io))return e[io];var t=e.constructor;return l0(t)&&e instanceof t?t.prototype:e instanceof mi?c0:null},g0=L,d0=V,p0=Te,no=hl,y0=Ye,m0=z,bi=m0("iterator"),vl=!1,Ue,Da,Va;[].keys&&(Va=[].keys(),"next"in Va?(Da=no(no(Va)),Da!==Object.prototype&&(Ue=Da)):vl=!0);var b0=!p0(Ue)||g0(function(){var a={};return Ue[bi].call(a)!==a});b0&&(Ue={});d0(Ue[bi])||y0(Ue,bi,function(){return this});var fl={IteratorPrototype:Ue,BUGGY_SAFARI_ITERATORS:vl},x0=fl.IteratorPrototype,E0=sn,S0=Cr,T0=Hi,O0=_t,$0=function(){return this},C0=function(a,e,t,r){var i=e+" Iterator";return a.prototype=E0(x0,{next:S0(+!r,t)}),T0(a,i,!1),O0[i]=$0,a},w0=ee,A0=Y,cl=Nr,P0=V,R0=C0,so=hl,oo=Eu,I0=Hi,N0=Pt,La=Ye,M0=z,_0=_t,gl=fl,D0=cl.PROPER,V0=cl.CONFIGURABLE,uo=gl.IteratorPrototype,nr=gl.BUGGY_SAFARI_ITERATORS,dt=M0("iterator"),lo="keys",pt="values",ho="entries",L0=function(){return this},k0=function(a,e,t,r,i,n,o){R0(t,e,r);var s=function(y){if(y===i&&c)return c;if(!nr&&y in h)return h[y];switch(y){case lo:return function(){return new t(this,y)};case pt:return function(){return new t(this,y)};case ho:return function(){return new t(this,y)}}return function(){return new t(this)}},u=e+" Iterator",l=!1,h=a.prototype,f=h[dt]||h["@@iterator"]||i&&h[i],c=!nr&&f||s(i),v=e=="Array"&&h.entries||f,d,g,p;if(v&&(d=so(v.call(new a)),d!==Object.prototype&&d.next&&(so(d)!==uo&&(oo?oo(d,uo):P0(d[dt])||La(d,dt,L0)),I0(d,u,!0))),D0&&i==pt&&f&&f.name!==pt&&(V0?N0(h,"name",pt):(l=!0,c=function(){return A0(f,this)})),i)if(g={values:s(pt),keys:n?c:s(lo),entries:s(ho)},o)for(p in g)(nr||l||!(p in h))&&La(h,p,g[p]);else w0({target:e,proto:!0,forced:nr||l},g);return h[dt]!==c&&La(h,dt,c,{name:i}),_0[e]=c,g},B0=function(a,e){return{value:a,done:e}},F0=At,gn=n0,vo=_t,dl=Mr,j0=de.f,U0=k0,sr=B0,G0=ce,pl="Array Iterator",z0=dl.set,H0=dl.getterFor(pl),Y0=U0(Array,"Array",function(a,e){z0(this,{type:pl,target:F0(a),index:0,kind:e})},function(){var a=H0(this),e=a.target,t=a.kind,r=a.index++;return!e||r>=e.length?(a.target=void 0,sr(void 0,!0)):t=="keys"?sr(r,!1):t=="values"?sr(e[r],!1):sr([r,e[r]],!1)},"values"),fo=vo.Arguments=vo.Array;gn("keys");gn("values");gn("entries");if(G0&&fo.name!=="values")try{j0(fo,"name",{value:"values"})}catch{}var X0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},W0=Ir,ka=W0("span").classList,co=ka&&ka.constructor&&ka.constructor.prototype,q0=co===Object.prototype?void 0:co,go=U,yl=X0,Q0=q0,xt=Y0,Ba=Pt,ml=z,Fa=ml("iterator"),po=ml("toStringTag"),ja=xt.values,bl=function(a,e){if(a){if(a[Fa]!==ja)try{Ba(a,Fa,ja)}catch{a[Fa]=ja}if(a[po]||Ba(a,po,e),yl[e]){for(var t in xt)if(a[t]!==xt[t])try{Ba(a,t,xt[t])}catch{a[t]=xt[t]}}}};for(var Ua in yl)bl(go[Ua]&&go[Ua].prototype,Ua);bl(Q0,"DOMTokenList");function K0(a,e){if(Wa._typeof(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(Wa._typeof(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function Z0(a){var e=K0(a,"string");return Wa._typeof(e)==="symbol"?e:String(e)}function dn(a,e,t){return e=Z0(e),e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}var J0=Oe,eb=Rr,tb=Zo,rb=Dr,ab=TypeError,yo=function(a){return function(e,t,r,i){J0(t);var n=eb(e),o=tb(n),s=rb(n),u=a?s-1:0,l=a?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,a?u<0:s<=u)throw ab("Reduce of empty array with no initial value")}for(;a?u>=0:s>u;u+=l)u in o&&(i=t(i,o[u],u,n));return i}},ib={left:yo(!1),right:yo(!0)},nb=L,xl=function(a,e){var t=[][a];return!!t&&nb(function(){t.call(null,e||function(){return 1},1)})},sb=ee,ob=ib.left,ub=xl,mo=_i,lb=It,hb=!lb&&mo>79&&mo<83,vb=hb||!ub("reduce");sb({target:"Array",proto:!0,forced:vb},{reduce:function(e){var t=arguments.length;return ob(this,e,t,t>1?arguments[1]:void 0)}});var fb=ee,El=Nt,cb=lt.f,gb=vt,bo=pe,db=fn,pb=ge,yb=cn,xo=El("".endsWith),mb=El("".slice),bb=Math.min,Sl=yb("endsWith"),xb=!Sl&&!!function(){var a=cb(String.prototype,"endsWith");return a&&!a.writable}();fb({target:"String",proto:!0,forced:!xb&&!Sl},{endsWith:function(e){var t=bo(pb(this));db(e);var r=arguments.length>1?arguments[1]:void 0,i=t.length,n=r===void 0?i:bb(gb(r),i),o=bo(e);return xo?xo(t,o,n):mb(t,n-o.length,n)===o}});var Eb=ki,Sb=de,Tb=Cr,Ob=function(a,e,t){var r=Eb(e);r in a?Sb.f(a,r,Tb(0,t)):a[r]=t},Eo=pu,$b=Dr,Cb=Ob,wb=Array,Ab=Math.max,Pb=function(a,e,t){for(var r=$b(a),i=Eo(e,r),n=Eo(t===void 0?r:t,r),o=wb(Ab(n-i,0)),s=0;i<n;i++,s++)Cb(o,s,a[i]);return o.length=s,o},Rb=Wi,yt=Y,pn=k,Ib=on,Nb=Z,Mb=ze,_b=ol,So=ge,Db=wu,Vb=ln,Lb=vt,Ga=pe,kb=ht,To=Pb,Oo=hn,Bb=Br,Fb=tl,jb=L,Je=Fb.UNSUPPORTED_Y,$o=4294967295,Ub=Math.min,Tl=[].push,Gb=pn(/./.exec),et=pn(Tl),mt=pn("".slice),zb=!jb(function(){var a=/(?:)/,e=a.exec;a.exec=function(){return e.apply(this,arguments)};var t="ab".split(a);return t.length!==2||t[0]!=="a"||t[1]!=="b"});Ib("split",function(a,e,t){var r;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?r=function(i,n){var o=Ga(So(this)),s=n===void 0?$o:n>>>0;if(s===0)return[];if(i===void 0)return[o];if(!_b(i))return yt(e,o,i,s);for(var u=[],l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),h=0,f=new RegExp(i.source,l+"g"),c,v,d;(c=yt(Bb,f,o))&&(v=f.lastIndex,!(v>h&&(et(u,mt(o,h,c.index)),c.length>1&&c.index<o.length&&Rb(Tl,u,To(c,1)),d=c[0].length,h=v,u.length>=s)));)f.lastIndex===c.index&&f.lastIndex++;return h===o.length?(d||!Gb(f,""))&&et(u,""):et(u,mt(o,h)),u.length>s?To(u,0,s):u}:"0".split(void 0,0).length?r=function(i,n){return i===void 0&&n===0?[]:yt(e,this,i,n)}:r=e,[function(n,o){var s=So(this),u=Mb(n)?void 0:kb(n,a);return u?yt(u,n,s,o):yt(r,Ga(s),n,o)},function(i,n){var o=Nb(this),s=Ga(i),u=t(r,o,s,n,r!==e);if(u.done)return u.value;var l=Db(o,RegExp),h=o.unicode,f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Je?"g":"y"),c=new l(Je?"^(?:"+o.source+")":o,f),v=n===void 0?$o:n>>>0;if(v===0)return[];if(s.length===0)return Oo(c,s)===null?[s]:[];for(var d=0,g=0,p=[];g<s.length;){c.lastIndex=Je?0:g;var y=Oo(c,Je?mt(s,g):s),x;if(y===null||(x=Ub(Lb(c.lastIndex+(Je?g:0)),s.length))===d)g=Vb(s,g,h);else{if(et(p,mt(s,d,g)),p.length===v)return p;for(var b=1;b<=y.length-1;b++)if(et(p,y[b]),p.length===v)return p;g=d=x}}return et(p,mt(s,d)),p}]},!zb,Je);var jr={exports:{}},Et={exports:{}};(function(){var a,e,t,r,i,n;typeof performance<"u"&&performance!==null&&performance.now?Et.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Et.exports=function(){return(a()-i)/1e6},e=process.hrtime,a=function(){var o;return o=e(),o[0]*1e9+o[1]},r=a(),n=process.uptime()*1e9,i=r-n):Date.now?(Et.exports=function(){return Date.now()-t},t=Date.now()):(Et.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(St);var Hb=Et.exports,Yb=Hb,be=typeof window>"u"?St:window,or=["moz","webkit"],st="AnimationFrame",ut=be["request"+st],wt=be["cancel"+st]||be["cancelRequest"+st];for(var bt=0;!ut&&bt<or.length;bt++)ut=be[or[bt]+"Request"+st],wt=be[or[bt]+"Cancel"+st]||be[or[bt]+"CancelRequest"+st];if(!ut||!wt){var za=0,Co=0,De=[],Xb=1e3/60;ut=function(a){if(De.length===0){var e=Yb(),t=Math.max(0,Xb-(e-za));za=t+e,setTimeout(function(){var r=De.slice(0);De.length=0;for(var i=0;i<r.length;i++)if(!r[i].cancelled)try{r[i].callback(za)}catch(n){setTimeout(function(){throw n},0)}},Math.round(t))}return De.push({handle:++Co,callback:a,cancelled:!1}),Co},wt=function(a){for(var e=0;e<De.length;e++)De[e].handle===a&&(De[e].cancelled=!0)}}jr.exports=function(a){return ut.call(be,a)};jr.exports.cancel=function(){wt.apply(be,arguments)};jr.exports.polyfill=function(a){a||(a=be),a.requestAnimationFrame=ut,a.cancelAnimationFrame=wt};var Wb=jr.exports;const Ha=Ho(Wb);var Ol=`
|
|
4
|
+
\v\f\r \u2028\u2029\uFEFF`,qb=k,Qb=ge,Kb=pe,xi=Ol,wo=qb("".replace),Zb=RegExp("^["+xi+"]+"),Jb=RegExp("(^|[^"+xi+"])["+xi+"]+$"),Ya=function(a){return function(e){var t=Kb(Qb(e));return a&1&&(t=wo(t,Zb,"")),a&2&&(t=wo(t,Jb,"$1")),t}},e1={start:Ya(1),end:Ya(2),trim:Ya(3)},t1=Nr.PROPER,r1=L,Ao=Ol,Po="
",a1=function(a){return r1(function(){return!!Ao[a]()||Po[a]()!==Po||t1&&Ao[a].name!==a})},i1=ee,n1=e1.trim,s1=a1;i1({target:"String",proto:!0,forced:s1("trim")},{trim:function(){return n1(this)}});var o1=function(a){this.ok=!1,this.alpha=1,a.charAt(0)=="#"&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};a=e[a]||a;for(var t=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3]),parseFloat(u[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],r=0;r<t.length;r++){var i=t[r].re,n=t[r].process,o=i.exec(a);if(o){var s=n(o);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var u=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+u+l+h},this.getHelpXML=function(){for(var u=new Array,l=0;l<t.length;l++)for(var h=t[l].example,f=0;f<h.length;f++)u[u.length]=h[f];for(var c in e)u[u.length]=c;var v=document.createElement("ul");v.setAttribute("id","rgbcolor-examples");for(var l=0;l<u.length;l++)try{var d=document.createElement("li"),g=new RGBColor(u[l]),p=document.createElement("div");p.style.cssText="margin: 3px; border: 1px solid black; background:"+g.toHex()+"; color:"+g.toHex(),p.appendChild(document.createTextNode("test"));var y=document.createTextNode(" "+u[l]+" -> "+g.toRGB()+" -> "+g.toHex());d.appendChild(p),d.appendChild(y),v.appendChild(d)}catch{}return v}};const Ei=Ho(o1);var u1=ee,l1=Nt,h1=yu.indexOf,v1=xl,Si=l1([].indexOf),$l=!!Si&&1/Si([1],1,-0)<0,f1=$l||!v1("indexOf");u1({target:"Array",proto:!0,forced:f1},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return $l?Si(this,e,t)||0:h1(this,e,t)}});var c1=ee,g1=k,d1=fn,p1=ge,Ro=pe,y1=cn,m1=g1("".indexOf);c1({target:"String",proto:!0,forced:!y1("includes")},{includes:function(e){return!!~m1(Ro(p1(this)),Ro(d1(e)),arguments.length>1?arguments[1]:void 0)}});var b1=Ge,x1=Array.isArray||function(e){return b1(e)=="Array"},E1=ee,S1=k,T1=x1,O1=S1([].reverse),Io=[1,2];E1({target:"Array",proto:!0,forced:String(Io)===String(Io.reverse())},{reverse:function(){return T1(this)&&(this.length=this.length),O1(this)}});/*! *****************************************************************************
|
|
5
|
+
Copyright (c) Microsoft Corporation.
|
|
6
|
+
|
|
7
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
purpose with or without fee is hereby granted.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
12
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
14
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
+
***************************************************************************** */var Cl=function(a,e){return(Cl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(a,e)};function wl(a,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=a}Cl(a,e),a.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function $1(a){var e="";Array.isArray(a)||(a=[a]);for(var t=0;t<a.length;t++){var r=a[t];if(r.type===m.CLOSE_PATH)e+="z";else if(r.type===m.HORIZ_LINE_TO)e+=(r.relative?"h":"H")+r.x;else if(r.type===m.VERT_LINE_TO)e+=(r.relative?"v":"V")+r.y;else if(r.type===m.MOVE_TO)e+=(r.relative?"m":"M")+r.x+" "+r.y;else if(r.type===m.LINE_TO)e+=(r.relative?"l":"L")+r.x+" "+r.y;else if(r.type===m.CURVE_TO)e+=(r.relative?"c":"C")+r.x1+" "+r.y1+" "+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===m.SMOOTH_CURVE_TO)e+=(r.relative?"s":"S")+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===m.QUAD_TO)e+=(r.relative?"q":"Q")+r.x1+" "+r.y1+" "+r.x+" "+r.y;else if(r.type===m.SMOOTH_QUAD_TO)e+=(r.relative?"t":"T")+r.x+" "+r.y;else{if(r.type!==m.ARC)throw new Error('Unexpected command type "'+r.type+'" at index '+t+".");e+=(r.relative?"a":"A")+r.rX+" "+r.rY+" "+r.xRot+" "+ +r.lArcFlag+" "+ +r.sweepFlag+" "+r.x+" "+r.y}}return e}function Ti(a,e){var t=a[0],r=a[1];return[t*Math.cos(e)-r*Math.sin(e),t*Math.sin(e)+r*Math.cos(e)]}function ue(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];for(var t=0;t<a.length;t++)if(typeof a[t]!="number")throw new Error("assertNumbers arguments["+t+"] is not a number. "+typeof a[t]+" == typeof "+a[t]);return!0}var Ce=Math.PI;function Xa(a,e,t){a.lArcFlag=a.lArcFlag===0?0:1,a.sweepFlag=a.sweepFlag===0?0:1;var r=a.rX,i=a.rY,n=a.x,o=a.y;r=Math.abs(a.rX),i=Math.abs(a.rY);var s=Ti([(e-n)/2,(t-o)/2],-a.xRot/180*Ce),u=s[0],l=s[1],h=Math.pow(u,2)/Math.pow(r,2)+Math.pow(l,2)/Math.pow(i,2);1<h&&(r*=Math.sqrt(h),i*=Math.sqrt(h)),a.rX=r,a.rY=i;var f=Math.pow(r,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(u,2),c=(a.lArcFlag!==a.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-f)/f)),v=r*l/i*c,d=-i*u/r*c,g=Ti([v,d],a.xRot/180*Ce);a.cX=g[0]+(e+n)/2,a.cY=g[1]+(t+o)/2,a.phi1=Math.atan2((l-d)/i,(u-v)/r),a.phi2=Math.atan2((-l-d)/i,(-u-v)/r),a.sweepFlag===0&&a.phi2>a.phi1&&(a.phi2-=2*Ce),a.sweepFlag===1&&a.phi2<a.phi1&&(a.phi2+=2*Ce),a.phi1*=180/Ce,a.phi2*=180/Ce}function No(a,e,t){ue(a,e,t);var r=a*a+e*e-t*t;if(0>r)return[];if(r===0)return[[a*t/(a*a+e*e),e*t/(a*a+e*e)]];var i=Math.sqrt(r);return[[(a*t+e*i)/(a*a+e*e),(e*t-a*i)/(a*a+e*e)],[(a*t-e*i)/(a*a+e*e),(e*t+a*i)/(a*a+e*e)]]}var j,ye=Math.PI/180;function Mo(a,e,t){return(1-t)*a+t*e}function _o(a,e,t,r){return a+Math.cos(r/180*Ce)*e+Math.sin(r/180*Ce)*t}function Do(a,e,t,r){var i=1e-6,n=e-a,o=t-e,s=3*n+3*(r-t)-6*o,u=6*(o-n),l=3*n;return Math.abs(s)<i?[-l/u]:function(h,f,c){var v=h*h/4-f;if(v<-c)return[];if(v<=c)return[-h/2];var d=Math.sqrt(v);return[-h/2-d,-h/2+d]}(u/s,l/s,i)}function Vo(a,e,t,r,i){var n=1-i;return a*(n*n*n)+e*(3*n*n*i)+t*(3*n*i*i)+r*(i*i*i)}(function(a){function e(){return i(function(s,u,l){return s.relative&&(s.x1!==void 0&&(s.x1+=u),s.y1!==void 0&&(s.y1+=l),s.x2!==void 0&&(s.x2+=u),s.y2!==void 0&&(s.y2+=l),s.x!==void 0&&(s.x+=u),s.y!==void 0&&(s.y+=l),s.relative=!1),s})}function t(){var s=NaN,u=NaN,l=NaN,h=NaN;return i(function(f,c,v){return f.type&m.SMOOTH_CURVE_TO&&(f.type=m.CURVE_TO,s=isNaN(s)?c:s,u=isNaN(u)?v:u,f.x1=f.relative?c-s:2*c-s,f.y1=f.relative?v-u:2*v-u),f.type&m.CURVE_TO?(s=f.relative?c+f.x2:f.x2,u=f.relative?v+f.y2:f.y2):(s=NaN,u=NaN),f.type&m.SMOOTH_QUAD_TO&&(f.type=m.QUAD_TO,l=isNaN(l)?c:l,h=isNaN(h)?v:h,f.x1=f.relative?c-l:2*c-l,f.y1=f.relative?v-h:2*v-h),f.type&m.QUAD_TO?(l=f.relative?c+f.x1:f.x1,h=f.relative?v+f.y1:f.y1):(l=NaN,h=NaN),f})}function r(){var s=NaN,u=NaN;return i(function(l,h,f){if(l.type&m.SMOOTH_QUAD_TO&&(l.type=m.QUAD_TO,s=isNaN(s)?h:s,u=isNaN(u)?f:u,l.x1=l.relative?h-s:2*h-s,l.y1=l.relative?f-u:2*f-u),l.type&m.QUAD_TO){s=l.relative?h+l.x1:l.x1,u=l.relative?f+l.y1:l.y1;var c=l.x1,v=l.y1;l.type=m.CURVE_TO,l.x1=((l.relative?0:h)+2*c)/3,l.y1=((l.relative?0:f)+2*v)/3,l.x2=(l.x+2*c)/3,l.y2=(l.y+2*v)/3}else s=NaN,u=NaN;return l})}function i(s){var u=0,l=0,h=NaN,f=NaN;return function(c){if(isNaN(h)&&!(c.type&m.MOVE_TO))throw new Error("path must start with moveto");var v=s(c,u,l,h,f);return c.type&m.CLOSE_PATH&&(u=h,l=f),c.x!==void 0&&(u=c.relative?u+c.x:c.x),c.y!==void 0&&(l=c.relative?l+c.y:c.y),c.type&m.MOVE_TO&&(h=u,f=l),v}}function n(s,u,l,h,f,c){return ue(s,u,l,h,f,c),i(function(v,d,g,p){var y=v.x1,x=v.x2,b=v.relative&&!isNaN(p),E=v.x!==void 0?v.x:b?0:d,C=v.y!==void 0?v.y:b?0:g;function O(se){return se*se}v.type&m.HORIZ_LINE_TO&&u!==0&&(v.type=m.LINE_TO,v.y=v.relative?0:g),v.type&m.VERT_LINE_TO&&l!==0&&(v.type=m.LINE_TO,v.x=v.relative?0:d),v.x!==void 0&&(v.x=v.x*s+C*l+(b?0:f)),v.y!==void 0&&(v.y=E*u+v.y*h+(b?0:c)),v.x1!==void 0&&(v.x1=v.x1*s+v.y1*l+(b?0:f)),v.y1!==void 0&&(v.y1=y*u+v.y1*h+(b?0:c)),v.x2!==void 0&&(v.x2=v.x2*s+v.y2*l+(b?0:f)),v.y2!==void 0&&(v.y2=x*u+v.y2*h+(b?0:c));var S=s*h-u*l;if(v.xRot!==void 0&&(s!==1||u!==0||l!==0||h!==1))if(S===0)delete v.rX,delete v.rY,delete v.xRot,delete v.lArcFlag,delete v.sweepFlag,v.type=m.LINE_TO;else{var w=v.xRot*Math.PI/180,N=Math.sin(w),_=Math.cos(w),B=1/O(v.rX),R=1/O(v.rY),X=O(_)*B+O(N)*R,W=2*N*_*(B-R),G=O(N)*B+O(_)*R,q=X*h*h-W*u*h+G*u*u,H=W*(s*h+u*l)-2*(X*l*h+G*s*u),Q=X*l*l-W*s*l+G*s*s,I=(Math.atan2(H,q-Q)+Math.PI)%Math.PI/2,M=Math.sin(I),J=Math.cos(I);v.rX=Math.abs(S)/Math.sqrt(q*O(J)+H*M*J+Q*O(M)),v.rY=Math.abs(S)/Math.sqrt(q*O(M)-H*M*J+Q*O(J)),v.xRot=180*I/Math.PI}return v.sweepFlag!==void 0&&0>S&&(v.sweepFlag=+!v.sweepFlag),v})}function o(){return function(s){var u={};for(var l in s)u[l]=s[l];return u}}a.ROUND=function(s){function u(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),ue(s),function(l){return l.x1!==void 0&&(l.x1=u(l.x1)),l.y1!==void 0&&(l.y1=u(l.y1)),l.x2!==void 0&&(l.x2=u(l.x2)),l.y2!==void 0&&(l.y2=u(l.y2)),l.x!==void 0&&(l.x=u(l.x)),l.y!==void 0&&(l.y=u(l.y)),l.rX!==void 0&&(l.rX=u(l.rX)),l.rY!==void 0&&(l.rY=u(l.rY)),l}},a.TO_ABS=e,a.TO_REL=function(){return i(function(s,u,l){return s.relative||(s.x1!==void 0&&(s.x1-=u),s.y1!==void 0&&(s.y1-=l),s.x2!==void 0&&(s.x2-=u),s.y2!==void 0&&(s.y2-=l),s.x!==void 0&&(s.x-=u),s.y!==void 0&&(s.y-=l),s.relative=!0),s})},a.NORMALIZE_HVZ=function(s,u,l){return s===void 0&&(s=!0),u===void 0&&(u=!0),l===void 0&&(l=!0),i(function(h,f,c,v,d){if(isNaN(v)&&!(h.type&m.MOVE_TO))throw new Error("path must start with moveto");return u&&h.type&m.HORIZ_LINE_TO&&(h.type=m.LINE_TO,h.y=h.relative?0:c),l&&h.type&m.VERT_LINE_TO&&(h.type=m.LINE_TO,h.x=h.relative?0:f),s&&h.type&m.CLOSE_PATH&&(h.type=m.LINE_TO,h.x=h.relative?v-f:v,h.y=h.relative?d-c:d),h.type&m.ARC&&(h.rX===0||h.rY===0)&&(h.type=m.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h})},a.NORMALIZE_ST=t,a.QT_TO_C=r,a.INFO=i,a.SANITIZE=function(s){s===void 0&&(s=0),ue(s);var u=NaN,l=NaN,h=NaN,f=NaN;return i(function(c,v,d,g,p){var y=Math.abs,x=!1,b=0,E=0;if(c.type&m.SMOOTH_CURVE_TO&&(b=isNaN(u)?0:v-u,E=isNaN(l)?0:d-l),c.type&(m.CURVE_TO|m.SMOOTH_CURVE_TO)?(u=c.relative?v+c.x2:c.x2,l=c.relative?d+c.y2:c.y2):(u=NaN,l=NaN),c.type&m.SMOOTH_QUAD_TO?(h=isNaN(h)?v:2*v-h,f=isNaN(f)?d:2*d-f):c.type&m.QUAD_TO?(h=c.relative?v+c.x1:c.x1,f=c.relative?d+c.y1:c.y2):(h=NaN,f=NaN),c.type&m.LINE_COMMANDS||c.type&m.ARC&&(c.rX===0||c.rY===0||!c.lArcFlag)||c.type&m.CURVE_TO||c.type&m.SMOOTH_CURVE_TO||c.type&m.QUAD_TO||c.type&m.SMOOTH_QUAD_TO){var C=c.x===void 0?0:c.relative?c.x:c.x-v,O=c.y===void 0?0:c.relative?c.y:c.y-d;b=isNaN(h)?c.x1===void 0?b:c.relative?c.x:c.x1-v:h-v,E=isNaN(f)?c.y1===void 0?E:c.relative?c.y:c.y1-d:f-d;var S=c.x2===void 0?0:c.relative?c.x:c.x2-v,w=c.y2===void 0?0:c.relative?c.y:c.y2-d;y(C)<=s&&y(O)<=s&&y(b)<=s&&y(E)<=s&&y(S)<=s&&y(w)<=s&&(x=!0)}return c.type&m.CLOSE_PATH&&y(v-g)<=s&&y(d-p)<=s&&(x=!0),x?[]:c})},a.MATRIX=n,a.ROTATE=function(s,u,l){u===void 0&&(u=0),l===void 0&&(l=0),ue(s,u,l);var h=Math.sin(s),f=Math.cos(s);return n(f,h,-h,f,u-u*f+l*h,l-u*h-l*f)},a.TRANSLATE=function(s,u){return u===void 0&&(u=0),ue(s,u),n(1,0,0,1,s,u)},a.SCALE=function(s,u){return u===void 0&&(u=s),ue(s,u),n(s,0,0,u,0,0)},a.SKEW_X=function(s){return ue(s),n(1,0,Math.atan(s),1,0,0)},a.SKEW_Y=function(s){return ue(s),n(1,Math.atan(s),0,1,0,0)},a.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ue(s),n(-1,0,0,1,s,0)},a.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ue(s),n(1,0,0,-1,0,s)},a.A_TO_C=function(){return i(function(s,u,l){return m.ARC===s.type?function(h,f,c){var v,d,g,p;h.cX||Xa(h,f,c);for(var y=Math.min(h.phi1,h.phi2),x=Math.max(h.phi1,h.phi2)-y,b=Math.ceil(x/90),E=new Array(b),C=f,O=c,S=0;S<b;S++){var w=Mo(h.phi1,h.phi2,S/b),N=Mo(h.phi1,h.phi2,(S+1)/b),_=N-w,B=4/3*Math.tan(_*ye/4),R=[Math.cos(w*ye)-B*Math.sin(w*ye),Math.sin(w*ye)+B*Math.cos(w*ye)],X=R[0],W=R[1],G=[Math.cos(N*ye),Math.sin(N*ye)],q=G[0],H=G[1],Q=[q+B*Math.sin(N*ye),H-B*Math.cos(N*ye)],I=Q[0],M=Q[1];E[S]={relative:h.relative,type:m.CURVE_TO};var J=function(se,ve){var $e=Ti([se*h.rX,ve*h.rY],h.xRot),We=$e[0],Bt=$e[1];return[h.cX+We,h.cY+Bt]};v=J(X,W),E[S].x1=v[0],E[S].y1=v[1],d=J(I,M),E[S].x2=d[0],E[S].y2=d[1],g=J(q,H),E[S].x=g[0],E[S].y=g[1],h.relative&&(E[S].x1-=C,E[S].y1-=O,E[S].x2-=C,E[S].y2-=O,E[S].x-=C,E[S].y-=O),C=(p=[E[S].x,E[S].y])[0],O=p[1]}return E}(s,s.relative?0:u,s.relative?0:l):s})},a.ANNOTATE_ARCS=function(){return i(function(s,u,l){return s.relative&&(u=0,l=0),m.ARC===s.type&&Xa(s,u,l),s})},a.CLONE=o,a.CALCULATE_BOUNDS=function(){var s=function(c){var v={};for(var d in c)v[d]=c[d];return v},u=e(),l=r(),h=t(),f=i(function(c,v,d){var g=h(l(u(s(c))));function p(M){M>f.maxX&&(f.maxX=M),M<f.minX&&(f.minX=M)}function y(M){M>f.maxY&&(f.maxY=M),M<f.minY&&(f.minY=M)}if(g.type&m.DRAWING_COMMANDS&&(p(v),y(d)),g.type&m.HORIZ_LINE_TO&&p(g.x),g.type&m.VERT_LINE_TO&&y(g.y),g.type&m.LINE_TO&&(p(g.x),y(g.y)),g.type&m.CURVE_TO){p(g.x),y(g.y);for(var x=0,b=Do(v,g.x1,g.x2,g.x);x<b.length;x++)0<(I=b[x])&&1>I&&p(Vo(v,g.x1,g.x2,g.x,I));for(var E=0,C=Do(d,g.y1,g.y2,g.y);E<C.length;E++)0<(I=C[E])&&1>I&&y(Vo(d,g.y1,g.y2,g.y,I))}if(g.type&m.ARC){p(g.x),y(g.y),Xa(g,v,d);for(var O=g.xRot/180*Math.PI,S=Math.cos(O)*g.rX,w=Math.sin(O)*g.rX,N=-Math.sin(O)*g.rY,_=Math.cos(O)*g.rY,B=g.phi1<g.phi2?[g.phi1,g.phi2]:-180>g.phi2?[g.phi2+360,g.phi1+360]:[g.phi2,g.phi1],R=B[0],X=B[1],W=function(M){var J=M[0],se=M[1],ve=180*Math.atan2(se,J)/Math.PI;return ve<R?ve+360:ve},G=0,q=No(N,-S,0).map(W);G<q.length;G++)(I=q[G])>R&&I<X&&p(_o(g.cX,S,N,I));for(var H=0,Q=No(_,-w,0).map(W);H<Q.length;H++){var I;(I=Q[H])>R&&I<X&&y(_o(g.cY,w,_,I))}}return c});return f.minX=1/0,f.maxX=-1/0,f.minY=1/0,f.maxY=-1/0,f}})(j||(j={}));var oe,Al=function(){function a(){}return a.prototype.round=function(e){return this.transform(j.ROUND(e))},a.prototype.toAbs=function(){return this.transform(j.TO_ABS())},a.prototype.toRel=function(){return this.transform(j.TO_REL())},a.prototype.normalizeHVZ=function(e,t,r){return this.transform(j.NORMALIZE_HVZ(e,t,r))},a.prototype.normalizeST=function(){return this.transform(j.NORMALIZE_ST())},a.prototype.qtToC=function(){return this.transform(j.QT_TO_C())},a.prototype.aToC=function(){return this.transform(j.A_TO_C())},a.prototype.sanitize=function(e){return this.transform(j.SANITIZE(e))},a.prototype.translate=function(e,t){return this.transform(j.TRANSLATE(e,t))},a.prototype.scale=function(e,t){return this.transform(j.SCALE(e,t))},a.prototype.rotate=function(e,t,r){return this.transform(j.ROTATE(e,t,r))},a.prototype.matrix=function(e,t,r,i,n,o){return this.transform(j.MATRIX(e,t,r,i,n,o))},a.prototype.skewX=function(e){return this.transform(j.SKEW_X(e))},a.prototype.skewY=function(e){return this.transform(j.SKEW_Y(e))},a.prototype.xSymmetry=function(e){return this.transform(j.X_AXIS_SYMMETRY(e))},a.prototype.ySymmetry=function(e){return this.transform(j.Y_AXIS_SYMMETRY(e))},a.prototype.annotateArcs=function(){return this.transform(j.ANNOTATE_ARCS())},a}(),C1=function(a){return a===" "||a===" "||a==="\r"||a===`
|
|
18
|
+
`},Lo=function(a){return 48<=a.charCodeAt(0)&&a.charCodeAt(0)<=57},w1=function(a){function e(){var t=a.call(this)||this;return t.curNumber="",t.curCommandType=-1,t.curCommandRelative=!1,t.canParseCommandOrComma=!0,t.curNumberHasExp=!1,t.curNumberHasExpDigits=!1,t.curNumberHasDecimal=!1,t.curArgs=[],t}return wl(e,a),e.prototype.finish=function(t){if(t===void 0&&(t=[]),this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,r){var i=this;r===void 0&&(r=[]);for(var n=function(f){r.push(f),i.curArgs.length=0,i.canParseCommandOrComma=!0},o=0;o<t.length;o++){var s=t[o],u=!(this.curCommandType!==m.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=Lo(s)&&(this.curNumber==="0"&&s==="0"||u);if(!Lo(s)||l)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||u){if(this.curNumber&&this.curCommandType!==-1){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===m.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+o+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"')}this.curArgs.push(h),this.curArgs.length===A1[this.curCommandType]&&(m.HORIZ_LINE_TO===this.curCommandType?n({type:m.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):m.VERT_LINE_TO===this.curCommandType?n({type:m.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===m.MOVE_TO||this.curCommandType===m.LINE_TO||this.curCommandType===m.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),m.MOVE_TO===this.curCommandType&&(this.curCommandType=m.LINE_TO)):this.curCommandType===m.CURVE_TO?n({type:m.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===m.SMOOTH_CURVE_TO?n({type:m.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===m.QUAD_TO?n({type:m.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===m.ARC&&n({type:m.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!C1(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(l)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=m.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=m.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=m.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=m.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=m.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=m.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=m.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=m.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=m.ARC,this.curCommandRelative=s==="a"}else r.push({type:m.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return r},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,i){i===void 0&&(i=[]);for(var n=0,o=Object.getPrototypeOf(this).parse.call(this,r);n<o.length;n++){var s=o[n],u=t(s);Array.isArray(u)?i.push.apply(i,u):i.push(u)}return i}}})},e}(Al),m=function(a){function e(t){var r=a.call(this)||this;return r.commands=typeof t=="string"?e.parse(t):t,r}return wl(e,a),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=j.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var r=[],i=0,n=this.commands;i<n.length;i++){var o=t(n[i]);Array.isArray(o)?r.push.apply(r,o):r.push(o)}return this.commands=r,this},e.encode=function(t){return $1(t)},e.parse=function(t){var r=new w1,i=[];return r.parse(t,i),r.finish(i),i},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(Al),A1=((oe={})[m.MOVE_TO]=2,oe[m.LINE_TO]=2,oe[m.HORIZ_LINE_TO]=1,oe[m.VERT_LINE_TO]=1,oe[m.CLOSE_PATH]=0,oe[m.QUAD_TO]=4,oe[m.SMOOTH_QUAD_TO]=2,oe[m.CURVE_TO]=6,oe[m.SMOOTH_CURVE_TO]=4,oe[m.ARC]=7,oe),P1=Y,R1=he,I1=wr,N1=el,ko=RegExp.prototype,M1=function(a){var e=a.flags;return e===void 0&&!("flags"in ko)&&!R1(a,"flags")&&I1(ko,a)?P1(N1,a):e},_1=Nr.PROPER,D1=Ye,V1=Z,Bo=pe,L1=L,k1=M1,yn="toString",B1=RegExp.prototype,Pl=B1[yn],F1=L1(function(){return Pl.call({source:"a",flags:"b"})!="/a/b"}),j1=_1&&Pl.name!=yn;(F1||j1)&&D1(RegExp.prototype,yn,function(){var e=V1(this),t=Bo(e.source),r=Bo(k1(e));return"/"+t+"/"+r},{unsafe:!0});function pr(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pr=function(e){return typeof e}:pr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(a)}function U1(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}var G1=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],z1=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function H1(a,e,t,r,i){if(typeof a=="string"&&(a=document.getElementById(a)),!a||pr(a)!=="object"||!("getContext"in a))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var n=a.getContext("2d");try{return n.getImageData(e,t,r,i)}catch(o){throw new Error("unable to access image data: "+o)}}function Y1(a,e,t,r,i,n){if(!(isNaN(n)||n<1)){n|=0;var o=H1(a,e,t,r,i);o=X1(o,e,t,r,i,n),a.getContext("2d").putImageData(o,e,t)}}function X1(a,e,t,r,i,n){for(var o=a.data,s=2*n+1,u=r-1,l=i-1,h=n+1,f=h*(h+1)/2,c=new Fo,v=c,d,g=1;g<s;g++)v=v.next=new Fo,g===h&&(d=v);v.next=c;for(var p=null,y=null,x=0,b=0,E=G1[n],C=z1[n],O=0;O<i;O++){v=c;for(var S=o[b],w=o[b+1],N=o[b+2],_=o[b+3],B=0;B<h;B++)v.r=S,v.g=w,v.b=N,v.a=_,v=v.next;for(var R=0,X=0,W=0,G=0,q=h*S,H=h*w,Q=h*N,I=h*_,M=f*S,J=f*w,se=f*N,ve=f*_,$e=1;$e<h;$e++){var We=b+((u<$e?u:$e)<<2),Bt=o[We],wn=o[We+1],An=o[We+2],Pn=o[We+3],Ft=h-$e;M+=(v.r=Bt)*Ft,J+=(v.g=wn)*Ft,se+=(v.b=An)*Ft,ve+=(v.a=Pn)*Ft,R+=Bt,X+=wn,W+=An,G+=Pn,v=v.next}p=c,y=d;for(var zr=0;zr<r;zr++){var Hr=ve*E>>C;if(o[b+3]=Hr,Hr!==0){var Yr=255/Hr;o[b]=(M*E>>C)*Yr,o[b+1]=(J*E>>C)*Yr,o[b+2]=(se*E>>C)*Yr}else o[b]=o[b+1]=o[b+2]=0;M-=q,J-=H,se-=Q,ve-=I,q-=p.r,H-=p.g,Q-=p.b,I-=p.a;var Re=zr+n+1;Re=x+(Re<u?Re:u)<<2,R+=p.r=o[Re],X+=p.g=o[Re+1],W+=p.b=o[Re+2],G+=p.a=o[Re+3],M+=R,J+=X,se+=W,ve+=G,p=p.next;var jt=y,Rn=jt.r,In=jt.g,Nn=jt.b,Mn=jt.a;q+=Rn,H+=In,Q+=Nn,I+=Mn,R-=Rn,X-=In,W-=Nn,G-=Mn,y=y.next,b+=4}x+=r}for(var qe=0;qe<r;qe++){b=qe<<2;var Ie=o[b],Ne=o[b+1],Me=o[b+2],te=o[b+3],Xr=h*Ie,Wr=h*Ne,qr=h*Me,Qr=h*te,Ut=f*Ie,Gt=f*Ne,zt=f*Me,Ht=f*te;v=c;for(var _n=0;_n<h;_n++)v.r=Ie,v.g=Ne,v.b=Me,v.a=te,v=v.next;for(var Dn=r,Kr=0,Zr=0,Jr=0,ea=0,Yt=1;Yt<=n;Yt++){b=Dn+qe<<2;var Xt=h-Yt;Ut+=(v.r=Ie=o[b])*Xt,Gt+=(v.g=Ne=o[b+1])*Xt,zt+=(v.b=Me=o[b+2])*Xt,Ht+=(v.a=te=o[b+3])*Xt,ea+=Ie,Kr+=Ne,Zr+=Me,Jr+=te,v=v.next,Yt<l&&(Dn+=r)}b=qe,p=c,y=d;for(var ta=0;ta<i;ta++){var re=b<<2;o[re+3]=te=Ht*E>>C,te>0?(te=255/te,o[re]=(Ut*E>>C)*te,o[re+1]=(Gt*E>>C)*te,o[re+2]=(zt*E>>C)*te):o[re]=o[re+1]=o[re+2]=0,Ut-=Xr,Gt-=Wr,zt-=qr,Ht-=Qr,Xr-=p.r,Wr-=p.g,qr-=p.b,Qr-=p.a,re=qe+((re=ta+h)<l?re:l)*r<<2,Ut+=ea+=p.r=o[re],Gt+=Kr+=p.g=o[re+1],zt+=Zr+=p.b=o[re+2],Ht+=Jr+=p.a=o[re+3],p=p.next,Xr+=Ie=y.r,Wr+=Ne=y.g,qr+=Me=y.b,Qr+=te=y.a,ea-=Ie,Kr-=Ne,Zr-=Me,Jr-=te,y=y.next,b+=r}}return a}var Fo=function a(){U1(this,a),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function W1(){var{DOMParser:a}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:a,createCanvas(t,r){return new OffscreenCanvas(t,r)},createImage(t){return Ee(function*(){var r=yield fetch(t),i=yield r.blob(),n=yield createImageBitmap(i);return n})()}};return(typeof DOMParser<"u"||typeof a>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function q1(a){var{DOMParser:e,canvas:t,fetch:r}=a;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:r,createCanvas:t.createCanvas,createImage:t.loadImage}}var Q1=Object.freeze({__proto__:null,offscreen:W1,node:q1});function Xe(a){return a.replace(/(?!\u3000)\s+/gm," ")}function Rl(a){return a.replace(/^[\n \t]+/,"")}function Il(a){return a.replace(/[\n \t]+$/,"")}function ae(a){var e=(a||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var K1=/^[A-Z-]+$/;function Nl(a){return K1.test(a)?a.toLowerCase():a}function mn(a){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(a)||[];return e[2]||e[3]||e[4]}function Ml(a){if(!a.startsWith("rgb"))return a;var e=3,t=a.replace(/\d+(\.\d+)?/g,(r,i)=>e--&&i?String(Math.round(parseFloat(r))):r);return t}var Z1=/(\[[^\]]+\])/g,J1=/(#[^\s+>~.[:]+)/g,e2=/(\.[^\s+>~.[:]+)/g,t2=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,r2=/(:[\w-]+\([^)]*\))/gi,a2=/(:[^\s+>~.[:]+)/g,i2=/([^\s+>~.[:]+)/g;function Ve(a,e){var t=e.exec(a);return t?[a.replace(e," "),t.length]:[a,0]}function _l(a){var e=[0,0,0],t=a.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[t,r]=Ve(t,Z1),e[1]+=r,[t,r]=Ve(t,J1),e[0]+=r,[t,r]=Ve(t,e2),e[1]+=r,[t,r]=Ve(t,t2),e[2]+=r,[t,r]=Ve(t,r2),e[1]+=r,[t,r]=Ve(t,a2),e[1]+=r,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,r]=Ve(t,i2),e[2]+=r,e.join("")}var Fe=1e-8;function Oi(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))}function Or(a,e){return(a[0]*e[0]+a[1]*e[1])/(Oi(a)*Oi(e))}function $i(a,e){return(a[0]*e[1]<a[1]*e[0]?-1:1)*Math.acos(Or(a,e))}function Ci(a){return a*a*a}function wi(a){return 3*a*a*(1-a)}function Ai(a){return 3*a*(1-a)*(1-a)}function Pi(a){return(1-a)*(1-a)*(1-a)}function Ri(a){return a*a}function Ii(a){return 2*a*(1-a)}function Ni(a){return(1-a)*(1-a)}class T{constructor(e,t,r){this.document=e,this.name=t,this.value=r,this.isNormalizedColor=!1}static empty(e){return new T(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:r}=this;return Xe(this.getString()).trim().split(e).map(i=>new T(t,r,i))}hasValue(e){var{value:t}=this;return t!==null&&t!==""&&(e||t!==0)&&typeof t<"u"}isString(e){var{value:t}=this,r=typeof t=="string";return!r||!e?r:e.test(t)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:t}=this,r=parseFloat(t);return this.isString(/%$/)&&(r/=100),r}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var t=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=Ml(t),this.value=t),t}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[r,i]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*n.computeSize(r);default:{var o=this.getNumber();return t&&o<1?o*n.computeSize(r):o}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),t=/#([^)'"]+)/.exec(e);return t&&(t=t[1]),t||(t=e),this.document.definitions[t]}getFillStyleDefinition(e,t){var r=this.getDefinition();if(!r)return null;if(typeof r.createGradient=="function")return r.createGradient(this.document.ctx,e,t);if(typeof r.createPattern=="function"){if(r.getHrefAttribute().hasValue()){var i=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&r.getAttribute("patternTransform",!0).setValue(i.value)}return r.createPattern(this.document.ctx,e,t)}return null}getTextBaseline(){return this.hasValue()?T.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var t=this.getColor(),r=t.length,i=0,n=0;n<r&&(t[n]===","&&i++,i!==3);n++);if(e.hasValue()&&this.isString()&&i!==3){var o=new Ei(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new T(this.document,this.name,t)}}T.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class Dl{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,t){this.viewPorts.push({width:e,height:t})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class D{constructor(e,t){this.x=e,this.y=t}static parse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[r=t,i=t]=ae(e);return new D(r,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=t,i=r]=ae(e);return new D(r,i)}static parsePath(e){for(var t=ae(e),r=t.length,i=[],n=0;n<r;n+=2)i.push(new D(t[n],t[n+1]));return i}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:t,y:r}=this,i=t*e[0]+r*e[2]+e[4],n=t*e[1]+r*e[3]+e[5];this.x=i,this.y=n}}class Vl{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:t,onMouseMove:r}=this,i=e.ctx.canvas;i.onclick=t,i.onmousemove=r,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:t,eventElements:r}=this,{style:i}=e.ctx.canvas;i&&(i.cursor=""),t.forEach((n,o)=>{for(var{run:s}=n,u=r[o];u;)s(u),u=u.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((n,o)=>{var{x:s,y:u}=n;!i[o]&&t.isPointInPath&&t.isPointInPath(s,u)&&(i[o]=e)})}}checkBoundingBox(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((n,o)=>{var{x:s,y:u}=n;!i[o]&&t.isPointInBox(s,u)&&(i[o]=e)})}}mapXY(e,t){for(var{window:r,ctx:i}=this.screen,n=new D(e,t),o=i.canvas;o;)n.x-=o.offsetLeft,n.y-=o.offsetTop,o=o.offsetParent;return r.scrollX&&(n.x+=r.scrollX),r.scrollY&&(n.y+=r.scrollY),n}onClick(e){var{x:t,y:r}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:t,y:r,run(i){i.onClick&&i.onClick()}})}onMouseMove(e){var{x:t,y:r}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:t,y:r,run(i){i.onMouseMove&&i.onMouseMove()}})}}var Ll=typeof window<"u"?window:null,kl=typeof fetch<"u"?fetch.bind(void 0):null;class Dt{constructor(e){var{fetch:t=kl,window:r=Ll}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Dl,this.mouse=new Vl(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=t}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(t=>t());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:t,ctx:r,aspectRatio:i,width:n,desiredWidth:o,height:s,desiredHeight:u,minX:l=0,minY:h=0,refX:f,refY:c,clip:v=!1,clipX:d=0,clipY:g=0}=e,p=Xe(i).replace(/^defer\s/,""),[y,x]=p.split(" "),b=y||"xMidYMid",E=x||"meet",C=n/o,O=s/u,S=Math.min(C,O),w=Math.max(C,O),N=o,_=u;E==="meet"&&(N*=S,_*=S),E==="slice"&&(N*=w,_*=w);var B=new T(t,"refX",f),R=new T(t,"refY",c),X=B.hasValue()&&R.hasValue();if(X&&r.translate(-S*B.getPixels("x"),-S*R.getPixels("y")),v){var W=S*d,G=S*g;r.beginPath(),r.moveTo(W,G),r.lineTo(n,G),r.lineTo(n,s),r.lineTo(W,s),r.closePath(),r.clip()}if(!X){var q=E==="meet"&&S===O,H=E==="slice"&&w===O,Q=E==="meet"&&S===C,I=E==="slice"&&w===C;b.startsWith("xMid")&&(q||H)&&r.translate(n/2-N/2,0),b.endsWith("YMid")&&(Q||I)&&r.translate(0,s/2-_/2),b.startsWith("xMax")&&(q||H)&&r.translate(n-N,0),b.endsWith("YMax")&&(Q||I)&&r.translate(0,s-_)}switch(!0){case b==="none":r.scale(C,O);break;case E==="meet":r.scale(S,S);break;case E==="slice":r.scale(w,w);break}r.translate(-l,-h)}start(e){var{enableRedraw:t=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:n=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:u,scaleHeight:l,offsetX:h,offsetY:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:c,mouse:v}=this,d=1e3/c;if(this.frameDuration=d,this.readyPromise=new Promise(b=>{this.resolveReady=b}),this.isReady()&&this.render(e,n,o,u,l,h,f),!!t){var g=Date.now(),p=g,y=0,x=()=>{g=Date.now(),y=g-p,y>=d&&(p=g-y%d,this.shouldUpdate(i,s)&&(this.render(e,n,o,u,l,h,f),v.runEvents())),this.intervalId=Ha(x)};r||v.start(),this.intervalId=Ha(x)}}stop(){this.intervalId&&(Ha.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){var{frameDuration:r}=this,i=this.animations.reduce((n,o)=>o.update(r)||n,!1);if(i)return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,t,r,i,n,o,s){var{CLIENT_WIDTH:u,CLIENT_HEIGHT:l,viewPort:h,ctx:f,isFirstRender:c}=this,v=f.canvas;h.clear(),v.width&&v.height?h.setCurrent(v.width,v.height):h.setCurrent(u,l);var d=e.getStyle("width"),g=e.getStyle("height");!t&&(c||typeof i!="number"&&typeof n!="number")&&(d.hasValue()&&(v.width=d.getPixels("x"),v.style&&(v.style.width="".concat(v.width,"px"))),g.hasValue()&&(v.height=g.getPixels("y"),v.style&&(v.style.height="".concat(v.height,"px"))));var p=v.clientWidth||v.width,y=v.clientHeight||v.height;if(t&&d.hasValue()&&g.hasValue()&&(p=d.getPixels("x"),y=g.getPixels("y")),h.setCurrent(p,y),typeof o=="number"&&e.getAttribute("x",!0).setValue(o),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof i=="number"||typeof n=="number"){var x=ae(e.getAttribute("viewBox").getString()),b=0,E=0;if(typeof i=="number"){var C=e.getStyle("width");C.hasValue()?b=C.getPixels("x")/i:isNaN(x[2])||(b=x[2]/i)}if(typeof n=="number"){var O=e.getStyle("height");O.hasValue()?E=O.getPixels("y")/n:isNaN(x[3])||(E=x[3]/n)}b||(b=E),E||(E=b),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(n);var S=e.getStyle("transform",!0,!0);S.setValue("".concat(S.getString()," scale(").concat(1/b,", ").concat(1/E,")"))}r||f.clearRect(0,0,p,y),e.render(f),c&&(this.isFirstRender=!1)}}Dt.defaultWindow=Ll;Dt.defaultFetch=kl;var{defaultFetch:n2}=Dt,s2=typeof DOMParser<"u"?DOMParser:null;class yr{constructor(){var{fetch:e=n2,DOMParser:t=s2}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return Ee(function*(){return e.startsWith("<")?t.parseFromString(e):t.load(e)})()}parseFromString(e){var t=new this.DOMParser;try{return this.checkDocument(t.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(t.parseFromString(e,"text/xml"))}}checkDocument(e){var t=e.getElementsByTagName("parsererror")[0];if(t)throw new Error(t.textContent);return e}load(e){var t=this;return Ee(function*(){var r=yield t.fetch(e),i=yield r.text();return t.parseFromString(i)})()}}class Bl{constructor(e,t){this.type="translate",this.point=null,this.point=D.parse(t)}apply(e){var{x:t,y:r}=this.point;e.translate(t||0,r||0)}unapply(e){var{x:t,y:r}=this.point;e.translate(-1*t||0,-1*r||0)}applyToPoint(e){var{x:t,y:r}=this.point;e.applyTransform([1,0,0,1,t||0,r||0])}}class Fl{constructor(e,t,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=ae(t);this.angle=new T(e,"angle",i[0]),this.originX=r[0],this.originY=r[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(e){var{cx:t,cy:r,originX:i,originY:n,angle:o}=this,s=t+i.getPixels("x"),u=r+n.getPixels("y");e.translate(s,u),e.rotate(o.getRadians()),e.translate(-s,-u)}unapply(e){var{cx:t,cy:r,originX:i,originY:n,angle:o}=this,s=t+i.getPixels("x"),u=r+n.getPixels("y");e.translate(s,u),e.rotate(-1*o.getRadians()),e.translate(-s,-u)}applyToPoint(e){var{cx:t,cy:r,angle:i}=this,n=i.getRadians();e.applyTransform([1,0,0,1,t||0,r||0]),e.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),e.applyTransform([1,0,0,1,-t||0,-r||0])}}class jl{constructor(e,t,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=D.parseScale(t);(i.x===0||i.y===0)&&(i.x=Fe,i.y=Fe),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(e){var{scale:{x:t,y:r},originX:i,originY:n}=this,o=i.getPixels("x"),s=n.getPixels("y");e.translate(o,s),e.scale(t,r||t),e.translate(-o,-s)}unapply(e){var{scale:{x:t,y:r},originX:i,originY:n}=this,o=i.getPixels("x"),s=n.getPixels("y");e.translate(o,s),e.scale(1/t,1/r||t),e.translate(-o,-s)}applyToPoint(e){var{x:t,y:r}=this.scale;e.applyTransform([t||0,0,0,r||0,0,0])}}class bn{constructor(e,t,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ae(t),this.originX=r[0],this.originY=r[1]}apply(e){var{originX:t,originY:r,matrix:i}=this,n=t.getPixels("x"),o=r.getPixels("y");e.translate(n,o),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-n,-o)}unapply(e){var{originX:t,originY:r,matrix:i}=this,n=i[0],o=i[2],s=i[4],u=i[1],l=i[3],h=i[5],f=0,c=0,v=1,d=1/(n*(l*v-h*c)-o*(u*v-h*f)+s*(u*c-l*f)),g=t.getPixels("x"),p=r.getPixels("y");e.translate(g,p),e.transform(d*(l*v-h*c),d*(h*f-u*v),d*(s*c-o*v),d*(n*v-s*f),d*(o*h-s*l),d*(s*u-n*h)),e.translate(-g,-p)}applyToPoint(e){e.applyTransform(this.matrix)}}class xn extends bn{constructor(e,t,r){super(e,t,r),this.type="skew",this.angle=null,this.angle=new T(e,"angle",t)}}class Ul extends xn{constructor(e,t,r){super(e,t,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Gl extends xn{constructor(e,t,r){super(e,t,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function o2(a){return Xe(a).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function u2(a){var[e,t]=a.split("(");return[e.trim(),t.trim().replace(")","")]}class Ae{constructor(e,t,r){this.document=e,this.transforms=[];var i=o2(t);i.forEach(n=>{if(n!=="none"){var[o,s]=u2(n),u=Ae.transformTypes[o];typeof u<"u"&&this.transforms.push(new u(this.document,s,r))}})}static fromElement(e,t){var r=t.getStyle("transform",!1,!0),[i,n=i]=t.getStyle("transform-origin",!1,!0).split(),o=[i,n];return r.hasValue()?new Ae(e,r.getString(),o):null}apply(e){for(var{transforms:t}=this,r=t.length,i=0;i<r;i++)t[i].apply(e)}unapply(e){for(var{transforms:t}=this,r=t.length,i=r-1;i>=0;i--)t[i].unapply(e)}applyToPoint(e){for(var{transforms:t}=this,r=t.length,i=0;i<r;i++)t[i].applyToPoint(e)}}Ae.transformTypes={translate:Bl,rotate:Fl,scale:jl,matrix:bn,skewX:Ul,skewY:Gl};class P{constructor(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=t,this.captureTextNodes=r,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!t||t.nodeType!==1)){if(Array.from(t.attributes).forEach(s=>{var u=Nl(s.nodeName);this.attributes[u]=new T(e,u,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(s=>s.trim());i.forEach(s=>{if(s){var[u,l]=s.split(":").map(h=>h.trim());this.styles[u]=new T(e,u,l)}})}var{definitions:n}=e,o=this.getAttribute("id");o.hasValue()&&(n[o.getString()]||(n[o.getString()]=this)),Array.from(t.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(r&&(s.nodeType===3||s.nodeType===4)){var u=e.createTextNode(s);u.getText().length>0&&this.addChild(u)}})}}getAttribute(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[e];if(!r&&t){var i=new T(this.document,e,"");return this.attributes[e]=i,i}return r||T.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return T.empty(this.document)}getStyle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[e];if(i)return i;var n=this.getAttribute(e);if(n!=null&&n.hasValue())return this.styles[e]=n,n;if(!r){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(t){var u=new T(this.document,e,"");return this.styles[e]=u,u}return i||T.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var t=Ae.fromElement(this.document,this);t&&t.apply(e);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var i=r.getDefinition();i&&i.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(t=>{t.render(e)})}addChild(e){var t=e instanceof P?e:this.document.createElement(e);t.parent=this,P.ignoreChildTypes.includes(t.type)||this.children.push(t)}matchesSelector(e){var t,{node:r}=this;if(typeof r.matches=="function")return r.matches(e);var i=(t=r.getAttribute)===null||t===void 0?void 0:t.call(r,"class");return!i||i===""?!1:i.split(" ").some(n=>".".concat(n)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:t}=this.document;for(var r in e)if(!r.startsWith("@")&&this.matchesSelector(r)){var i=e[r],n=t[r];if(i)for(var o in i){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),n>=s&&(this.styles[o]=i[o],this.stylesSpecificity[o]=n)}}}removeStyles(e,t){var r=t.reduce((i,n)=>{var o=e.getStyle(n);if(!o.hasValue())return i;var s=o.getString();return o.setValue(""),[...i,[n,s]]},[]);return r}restoreStyles(e,t){t.forEach(r=>{var[i,n]=r;e.getStyle(i,!0).setValue(n)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}P.ignoreChildTypes=["title"];class zl extends P{constructor(e,t,r){super(e,t,r)}}function l2(a){var e=a.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function h2(a){return typeof process>"u"?a:a.trim().split(",").map(l2).join(",")}function v2(a){if(!a)return"";var e=a.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function f2(a){if(!a)return"";var e=a.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class K{constructor(e,t,r,i,n,o){var s=o?typeof o=="string"?K.parse(o):o:{};this.fontFamily=n||s.fontFamily,this.fontSize=i||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=r||s.fontWeight,this.fontVariant=t||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,r="",i="",n="",o="",s="",u=Xe(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return u.forEach(h=>{switch(!0){case(!l.fontStyle&&K.styles.includes(h)):h!=="inherit"&&(r=h),l.fontStyle=!0;break;case(!l.fontVariant&&K.variants.includes(h)):h!=="inherit"&&(i=h),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&K.weights.includes(h)):h!=="inherit"&&(n=h),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:h!=="inherit"&&([o]=h.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:h!=="inherit"&&(s+=h)}}),new K(r,i,n,o,s,t)}toString(){return[v2(this.fontStyle),this.fontVariant,f2(this.fontWeight),this.fontSize,h2(this.fontFamily)].join(" ").trim()}}K.styles="normal|italic|oblique|inherit";K.variants="normal|small-caps|inherit";K.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class ne{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=t,this.x2=r,this.y2=i,this.addPoint(e,t),this.addPoint(r,i)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,t){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof t<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:t,y1:r,x2:i,y2:n}=e;this.addPoint(t,r),this.addPoint(i,n)}}sumCubic(e,t,r,i,n){return Math.pow(1-e,3)*t+3*Math.pow(1-e,2)*e*r+3*(1-e)*Math.pow(e,2)*i+Math.pow(e,3)*n}bezierCurveAdd(e,t,r,i,n){var o=6*t-12*r+6*i,s=-3*t+9*r-9*i+3*n,u=3*r-3*t;if(s===0){if(o===0)return;var l=-u/o;0<l&&l<1&&(e?this.addX(this.sumCubic(l,t,r,i,n)):this.addY(this.sumCubic(l,t,r,i,n)));return}var h=Math.pow(o,2)-4*u*s;if(!(h<0)){var f=(-o+Math.sqrt(h))/(2*s);0<f&&f<1&&(e?this.addX(this.sumCubic(f,t,r,i,n)):this.addY(this.sumCubic(f,t,r,i,n)));var c=(-o-Math.sqrt(h))/(2*s);0<c&&c<1&&(e?this.addX(this.sumCubic(c,t,r,i,n)):this.addY(this.sumCubic(c,t,r,i,n)))}}addBezierCurve(e,t,r,i,n,o,s,u){this.addPoint(e,t),this.addPoint(s,u),this.bezierCurveAdd(!0,e,r,n,s),this.bezierCurveAdd(!1,t,i,o,u)}addQuadraticCurve(e,t,r,i,n,o){var s=e+.6666666666666666*(r-e),u=t+2/3*(i-t),l=s+1/3*(n-e),h=u+1/3*(o-t);this.addBezierCurve(e,t,s,l,u,h,n,o)}isPointInBox(e,t){var{x1:r,y1:i,x2:n,y2:o}=this;return r<=e&&e<=n&&i<=t&&t<=o}}class $ extends m{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new D(0,0),this.control=new D(0,0),this.current=new D(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:t}=this;return e>=t.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",r=new D(this.command[e],this.command[t]);return this.makeAbsolute(r)}getAsControlPoint(e,t){var r=this.getPoint(e,t);return this.control=r,r}getAsCurrentPoint(e,t){var r=this.getPoint(e,t);return this.current=r,r}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==m.CURVE_TO&&e!==m.SMOOTH_CURVE_TO&&e!==m.QUAD_TO&&e!==m.SMOOTH_QUAD_TO)return this.current;var{current:{x:t,y:r},control:{x:i,y:n}}=this,o=new D(2*t-i,2*r-n);return o}makeAbsolute(e){if(this.command.relative){var{x:t,y:r}=this.current;e.x+=t,e.y+=r}return e}addMarker(e,t,r){var{points:i,angles:n}=this;r&&n.length>0&&!n[n.length-1]&&(n[n.length-1]=i[i.length-1].angleTo(r)),this.addMarkerAngle(e,t?t.angleTo(e):null)}addMarkerAngle(e,t){this.points.push(e),this.angles.push(t)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,t=e.length,r=0;r<t;r++)if(!e[r]){for(var i=r+1;i<t;i++)if(e[i]){e[r]=e[i];break}}return e}}class Pe extends P{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,t=this;t;){var r=t.getStyle("opacity",!1,!0);r.hasValue(!0)&&(e*=r.getNumber()),t=t.parent}return e}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!t){var r=this.getStyle("fill"),i=this.getStyle("fill-opacity"),n=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var s=r.getFillStyleDefinition(this,i);s&&(e.fillStyle=s)}else if(r.hasValue()){r.getString()==="currentColor"&&r.setValue(this.getStyle("color").getColor());var u=r.getColor();u!=="inherit"&&(e.fillStyle=u==="none"?"rgba(0,0,0,0)":u)}if(i.hasValue()){var l=new T(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=l}if(n.isUrlDefinition()){var h=n.getFillStyleDefinition(this,o);h&&(e.strokeStyle=h)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var f=n.getString();f!=="inherit"&&(e.strokeStyle=f==="none"?"rgba(0,0,0,0)":f)}if(o.hasValue()){var c=new T(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=c}var v=this.getStyle("stroke-width");if(v.hasValue()){var d=v.getPixels();e.lineWidth=d||Fe}var g=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),x=this.getStyle("stroke-dasharray"),b=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(e.lineCap=g.getString()),p.hasValue()&&(e.lineJoin=p.getString()),y.hasValue()&&(e.miterLimit=y.getNumber()),x.hasValue()&&x.getString()!=="none"){var E=ae(x.getString());typeof e.setLineDash<"u"?e.setLineDash(E):typeof e.webkitLineDash<"u"?e.webkitLineDash=E:typeof e.mozDash<"u"&&!(E.length===1&&E[0]===0)&&(e.mozDash=E);var C=b.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=C:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=C:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=C)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var O=this.getStyle("font"),S=this.getStyle("font-style"),w=this.getStyle("font-variant"),N=this.getStyle("font-weight"),_=this.getStyle("font-size"),B=this.getStyle("font-family"),R=new K(S.getString(),w.getString(),N.getString(),_.hasValue()?"".concat(_.getPixels(!0),"px"):"",B.getString(),K.parse(O.getString(),e.font));S.setValue(R.fontStyle),w.setValue(R.fontVariant),N.setValue(R.fontWeight),_.setValue(R.fontSize),B.setValue(R.fontFamily),e.font=R.toString(),_.isPixels()&&(this.document.emSize=_.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class A extends Pe{constructor(e,t,r){super(e,t,r),this.type="path",this.pathParser=null,this.pathParser=new $(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,r=new ne;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case $.MOVE_TO:this.pathM(e,r);break;case $.LINE_TO:this.pathL(e,r);break;case $.HORIZ_LINE_TO:this.pathH(e,r);break;case $.VERT_LINE_TO:this.pathV(e,r);break;case $.CURVE_TO:this.pathC(e,r);break;case $.SMOOTH_CURVE_TO:this.pathS(e,r);break;case $.QUAD_TO:this.pathQ(e,r);break;case $.SMOOTH_QUAD_TO:this.pathT(e,r);break;case $.ARC:this.pathA(e,r);break;case $.CLOSE_PATH:this.pathZ(e,r);break}return r}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,t=e.getMarkerPoints(),r=e.getMarkerAngles(),i=t.map((n,o)=>[n,r[o]]);return i}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var t=this.getStyle("fill-rule");e.fillStyle!==""&&(t.getString("inherit")!=="inherit"?e.fill(t.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var r=this.getMarkers();if(r){var i=r.length-1,n=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(n.isUrlDefinition()){var u=n.getDefinition(),[l,h]=r[0];u.render(e,l,h)}if(o.isUrlDefinition())for(var f=o.getDefinition(),c=1;c<i;c++){var[v,d]=r[c];f.render(e,v,d)}if(s.isUrlDefinition()){var g=s.getDefinition(),[p,y]=r[i];g.render(e,p,y)}}}static pathM(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}pathM(e,t){var{pathParser:r}=this,{point:i}=A.pathM(r),{x:n,y:o}=i;r.addMarker(i),t.addPoint(n,o),e&&e.moveTo(n,o)}static pathL(e){var{current:t}=e,r=e.getAsCurrentPoint();return{current:t,point:r}}pathL(e,t){var{pathParser:r}=this,{current:i,point:n}=A.pathL(r),{x:o,y:s}=n;r.addMarker(n,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:t,command:r}=e,i=new D((r.relative?t.x:0)+r.x,t.y);return e.current=i,{current:t,point:i}}pathH(e,t){var{pathParser:r}=this,{current:i,point:n}=A.pathH(r),{x:o,y:s}=n;r.addMarker(n,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:t,command:r}=e,i=new D(t.x,(r.relative?t.y:0)+r.y);return e.current=i,{current:t,point:i}}pathV(e,t){var{pathParser:r}=this,{current:i,point:n}=A.pathV(r),{x:o,y:s}=n;r.addMarker(n,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathC(e){var{current:t}=e,r=e.getPoint("x1","y1"),i=e.getAsControlPoint("x2","y2"),n=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:n}}pathC(e,t){var{pathParser:r}=this,{current:i,point:n,controlPoint:o,currentPoint:s}=A.pathC(r);r.addMarker(s,o,n),t.addBezierCurve(i.x,i.y,n.x,n.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(n.x,n.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:t}=e,r=e.getReflectedControlPoint(),i=e.getAsControlPoint("x2","y2"),n=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:n}}pathS(e,t){var{pathParser:r}=this,{current:i,point:n,controlPoint:o,currentPoint:s}=A.pathS(r);r.addMarker(s,o,n),t.addBezierCurve(i.x,i.y,n.x,n.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(n.x,n.y,o.x,o.y,s.x,s.y)}static pathQ(e){var{current:t}=e,r=e.getAsControlPoint("x1","y1"),i=e.getAsCurrentPoint();return{current:t,controlPoint:r,currentPoint:i}}pathQ(e,t){var{pathParser:r}=this,{current:i,controlPoint:n,currentPoint:o}=A.pathQ(r);r.addMarker(o,n,n),t.addQuadraticCurve(i.x,i.y,n.x,n.y,o.x,o.y),e&&e.quadraticCurveTo(n.x,n.y,o.x,o.y)}static pathT(e){var{current:t}=e,r=e.getReflectedControlPoint();e.control=r;var i=e.getAsCurrentPoint();return{current:t,controlPoint:r,currentPoint:i}}pathT(e,t){var{pathParser:r}=this,{current:i,controlPoint:n,currentPoint:o}=A.pathT(r);r.addMarker(o,n,n),t.addQuadraticCurve(i.x,i.y,n.x,n.y,o.x,o.y),e&&e.quadraticCurveTo(n.x,n.y,o.x,o.y)}static pathA(e){var{current:t,command:r}=e,{rX:i,rY:n,xRot:o,lArcFlag:s,sweepFlag:u}=r,l=o*(Math.PI/180),h=e.getAsCurrentPoint(),f=new D(Math.cos(l)*(t.x-h.x)/2+Math.sin(l)*(t.y-h.y)/2,-Math.sin(l)*(t.x-h.x)/2+Math.cos(l)*(t.y-h.y)/2),c=Math.pow(f.x,2)/Math.pow(i,2)+Math.pow(f.y,2)/Math.pow(n,2);c>1&&(i*=Math.sqrt(c),n*=Math.sqrt(c));var v=(s===u?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(n,2)-Math.pow(i,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(i,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)));isNaN(v)&&(v=0);var d=new D(v*i*f.y/n,v*-n*f.x/i),g=new D((t.x+h.x)/2+Math.cos(l)*d.x-Math.sin(l)*d.y,(t.y+h.y)/2+Math.sin(l)*d.x+Math.cos(l)*d.y),p=$i([1,0],[(f.x-d.x)/i,(f.y-d.y)/n]),y=[(f.x-d.x)/i,(f.y-d.y)/n],x=[(-f.x-d.x)/i,(-f.y-d.y)/n],b=$i(y,x);return Or(y,x)<=-1&&(b=Math.PI),Or(y,x)>=1&&(b=0),{currentPoint:h,rX:i,rY:n,sweepFlag:u,xAxisRotation:l,centp:g,a1:p,ad:b}}pathA(e,t){var{pathParser:r}=this,{currentPoint:i,rX:n,rY:o,sweepFlag:s,xAxisRotation:u,centp:l,a1:h,ad:f}=A.pathA(r),c=1-s?1:-1,v=h+c*(f/2),d=new D(l.x+n*Math.cos(v),l.y+o*Math.sin(v));if(r.addMarkerAngle(d,v-c*Math.PI/2),r.addMarkerAngle(i,v-c*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(h)&&!isNaN(f)){var g=n>o?n:o,p=n>o?1:n/o,y=n>o?o/n:1;e.translate(l.x,l.y),e.rotate(u),e.scale(p,y),e.arc(0,0,g,h,h+f,!!(1-s)),e.scale(1/p,1/y),e.rotate(-u),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){A.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class En extends A{constructor(e,t,r){super(e,t,r),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class Se extends Pe{constructor(e,t,r){super(e,t,new.target===Se?!0:r),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,t);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(e.textBaseline=r)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var t=null;return this.children.forEach((r,i)=>{var n=this.getChildBoundingBox(e,this,this,i);t?t.addBoundingBox(n):t=n}),t}getFontSize(){var{document:e,parent:t}=this,r=K.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(r);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new ne(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,r){var i=t[r],n=null;if(e.isArabic){var o=t.length,s=t[r-1],u=t[r+1],l="isolated";if((r===0||s===" ")&&r<o-1&&u!==" "&&(l="terminal"),r>0&&s!==" "&&r<o-1&&u!==" "&&(l="medial"),r>0&&s!==" "&&(r===o-1||u===" ")&&(l="initial"),typeof e.glyphs[i]<"u"){var h=e.glyphs[i];n=h instanceof En?h:h[l]}}else n=e.glyphs[i];return n||(n=e.missingGlyph),n}getText(){return""}getTextFromNode(e){var t=e||this.node,r=Array.from(t.parentNode.childNodes),i=r.indexOf(t),n=r.length-1,o=Xe(t.textContent||"");return i===0&&(o=Rl(o)),i===n&&(o=Il(o)),o}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((r,i)=>{this.renderChild(e,this,this,i)});var{mouse:t}=this.document.screen;t.isWorking()&&t.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:t,parent:r}=this,i=this.getText(),n=r.getStyle("font-family").getDefinition();if(n){for(var{unitsPerEm:o}=n.fontFace,s=K.parse(t.ctx.font),u=r.getStyle("font-size").getNumber(s.fontSize),l=r.getStyle("font-style").getString(s.fontStyle),h=u/o,f=n.isRTL?i.split("").reverse().join(""):i,c=ae(r.getAttribute("dx").getString()),v=f.length,d=0;d<v;d++){var g=this.getGlyph(n,f,d);e.translate(this.x,this.y),e.scale(h,-h);var p=e.lineWidth;e.lineWidth=e.lineWidth*o/u,l==="italic"&&e.transform(1,0,.4,1,0,0),g.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=p,e.scale(1/h,-1/h),e.translate(-this.x,-this.y),this.x+=u*(g.horizAdvX||n.horizAdvX)/o,typeof c[d]<"u"&&!isNaN(c[d])&&(this.x+=c[d])}return}var{x:y,y:x}=this;e.fillStyle&&e.fillText(i,y,x),e.strokeStyle&&e.strokeText(i,y,x)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],t=e.getStyle("text-anchor").getString("start"),r=!1,i=0;t==="start"&&!r||t==="end"&&r?i=e.x-this.minX:t==="end"&&!r||t==="start"&&r?i=e.x-this.maxX:i=e.x-(this.minX+this.maxX)/2;for(var n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=i;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((t,r)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,t,r,i){var n=r.children[i];n.children.length>0?n.children.forEach((o,s)=>{t.adjustChildCoordinatesRecursiveCore(e,t,n,s)}):this.adjustChildCoordinates(e,t,r,i)}adjustChildCoordinates(e,t,r,i){var n=r.children[i];if(typeof n.measureText!="function")return n;e.save(),n.setContext(e,!0);var o=n.getAttribute("x"),s=n.getAttribute("y"),u=n.getAttribute("dx"),l=n.getAttribute("dy"),h=n.getStyle("font-family").getDefinition(),f=!!h&&h.isRTL;i===0&&(o.hasValue()||o.setValue(n.getInheritedAttribute("x")),s.hasValue()||s.setValue(n.getInheritedAttribute("y")),u.hasValue()||u.setValue(n.getInheritedAttribute("dx")),l.hasValue()||l.setValue(n.getInheritedAttribute("dy")));var c=n.measureText(e);return f&&(t.x-=c),o.hasValue()?(t.applyAnchoring(),n.x=o.getPixels("x"),u.hasValue()&&(n.x+=u.getPixels("x"))):(u.hasValue()&&(t.x+=u.getPixels("x")),n.x=t.x),t.x=n.x,f||(t.x+=c),s.hasValue()?(n.y=s.getPixels("y"),l.hasValue()&&(n.y+=l.getPixels("y"))):(l.hasValue()&&(t.y+=l.getPixels("y")),n.y=t.y),t.y=n.y,t.leafTexts.push(n),t.minX=Math.min(t.minX,n.x,n.x+c),t.maxX=Math.max(t.maxX,n.x,n.x+c),n.clearContext(e),e.restore(),n}getChildBoundingBox(e,t,r,i){var n=r.children[i];if(typeof n.getBoundingBox!="function")return null;var o=n.getBoundingBox(e);return o?(n.children.forEach((s,u)=>{var l=t.getChildBoundingBox(e,t,n,u);o.addBoundingBox(l)}),o):null}renderChild(e,t,r,i){var n=r.children[i];n.render(e),n.children.forEach((o,s)=>{t.renderChild(e,t,n,s)})}measureText(e){var{measureCache:t}=this;if(~t)return t;var r=this.getText(),i=this.measureTargetText(e,r);return this.measureCache=i,i}measureTargetText(e,t){if(!t.length)return 0;var{parent:r}=this,i=r.getStyle("font-family").getDefinition();if(i){for(var n=this.getFontSize(),o=i.isRTL?t.split("").reverse().join(""):t,s=ae(r.getAttribute("dx").getString()),u=o.length,l=0,h=0;h<u;h++){var f=this.getGlyph(i,o,h);l+=(f.horizAdvX||i.horizAdvX)*n/i.fontFace.unitsPerEm,typeof s[h]<"u"&&!isNaN(s[h])&&(l+=s[h])}return l}if(!e.measureText)return t.length*10;e.save(),this.setContext(e,!0);var{width:c}=e.measureText(t);return this.clearContext(e),e.restore(),c}getInheritedAttribute(e){for(var t=this;t instanceof Se&&t.isFirstChild();){var r=t.parent.getAttribute(e);if(r.hasValue(!0))return r.getValue("0");t=t.parent}return null}}class Vt extends Se{constructor(e,t,r){super(e,t,new.target===Vt?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class c2 extends Vt{constructor(){super(...arguments),this.type="textNode"}}class ct extends Pe{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var t,{document:r}=this,{screen:i,window:n}=r,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&n&&typeof n.getComputedStyle<"u"){e.font=n.getComputedStyle(o).getPropertyValue("font");var s=new T(r,"fontSize",K.parse(e.font).fontSize);s.hasValue()&&(r.rootEmSize=s.getPixels("y"),r.emSize=r.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:u,height:l}=i.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var h=this.getAttribute("refX"),f=this.getAttribute("refY"),c=this.getAttribute("viewBox"),v=c.hasValue()?ae(c.getString()):null,d=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,p=0,y=0,x=0;v&&(g=v[0],p=v[1]),this.root||(u=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(y=g,x=p,g=0,p=0)),i.viewPort.setCurrent(u,l),this.node&&(!this.parent||((t=this.node.parentNode)===null||t===void 0?void 0:t.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),v&&(u=v[2],l=v[3]),r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:u,height:i.viewPort.height,desiredHeight:l,minX:g,minY:p,refX:h.getValue(),refY:f.getValue(),clip:d,clipX:y,clipY:x}),v&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(u,l))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),n=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),u=i.getNumber(0),l=n.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),n.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(u||e," ").concat(l||t)),s.hasValue()){var f=this.getStyle("width"),c=this.getStyle("height");f.hasValue()&&f.setValue("".concat(e,"px")),c.hasValue()&&c.setValue("".concat(t,"px"))}}}class Sn extends A{constructor(){super(...arguments),this.type="rect"}path(e){var t=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),n=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),u=o.getPixels("x"),l=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(l=u),s.hasValue()&&!o.hasValue()&&(u=l),u=Math.min(u,i/2),l=Math.min(l,n/2),e){var h=4*((Math.sqrt(2)-1)/3);e.beginPath(),n>0&&i>0&&(e.moveTo(t+u,r),e.lineTo(t+i-u,r),e.bezierCurveTo(t+i-u+h*u,r,t+i,r+l-h*l,t+i,r+l),e.lineTo(t+i,r+n-l),e.bezierCurveTo(t+i,r+n-l+h*l,t+i-u+h*u,r+n,t+i-u,r+n),e.lineTo(t+u,r+n),e.bezierCurveTo(t+u-h*u,r+n,t,r+n-l+h*l,t,r+n-l),e.lineTo(t,r+l),e.bezierCurveTo(t,r+l-h*l,t+u-h*u,r,t+u,r),e.closePath())}return new ne(t,r,t+i,r+n)}getMarkers(){return null}}class Hl extends A{constructor(){super(...arguments),this.type="circle"}path(e){var t=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return e&&i>0&&(e.beginPath(),e.arc(t,r,i,0,Math.PI*2,!1),e.closePath()),new ne(t-i,r-i,t+i,r+i)}getMarkers(){return null}}class Yl extends A{constructor(){super(...arguments),this.type="ellipse"}path(e){var t=4*((Math.sqrt(2)-1)/3),r=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),n=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&r>0&&i>0&&(e.beginPath(),e.moveTo(n+r,o),e.bezierCurveTo(n+r,o+t*i,n+t*r,o+i,n,o+i),e.bezierCurveTo(n-t*r,o+i,n-r,o+t*i,n-r,o),e.bezierCurveTo(n-r,o-t*i,n-t*r,o-i,n,o-i),e.bezierCurveTo(n+t*r,o-i,n+r,o-t*i,n+r,o),e.closePath()),new ne(n-r,o-i,n+r,o+i)}getMarkers(){return null}}class Xl extends A{constructor(){super(...arguments),this.type="line"}getPoints(){return[new D(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new D(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:r},{x:i,y:n}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,r),e.lineTo(i,n)),new ne(t,r,i,n)}getMarkers(){var[e,t]=this.getPoints(),r=e.angleTo(t);return[[e,r],[t,r]]}}class Tn extends A{constructor(e,t,r){super(e,t,r),this.type="polyline",this.points=[],this.points=D.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:r,y:i}]=t,n=new ne(r,i);return e&&(e.beginPath(),e.moveTo(r,i)),t.forEach(o=>{var{x:s,y:u}=o;n.addPoint(s,u),e&&e.lineTo(s,u)}),n}getMarkers(){var{points:e}=this,t=e.length-1,r=[];return e.forEach((i,n)=>{n!==t&&r.push([i,i.angleTo(e[n+1])])}),r.length>0&&r.push([e[e.length-1],r[r.length-1][1]]),r}}class Wl extends Tn{constructor(){super(...arguments),this.type="polygon"}path(e){var t=super.path(e),[{x:r,y:i}]=this.points;return e&&(e.lineTo(r,i),e.closePath()),t}}class ql extends P{constructor(){super(...arguments),this.type="pattern"}createPattern(e,t,r){var i=this.getStyle("width").getPixels("x",!0),n=this.getStyle("height").getPixels("y",!0),o=new ct(this.document,null);o.attributes.viewBox=new T(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new T(this.document,"width","".concat(i,"px")),o.attributes.height=new T(this.document,"height","".concat(n,"px")),o.attributes.transform=new T(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(i,n),u=s.getContext("2d"),l=this.getAttribute("x"),h=this.getAttribute("y");l.hasValue()&&h.hasValue()&&u.translate(l.getPixels("x",!0),h.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var f=-1;f<=1;f++)for(var c=-1;c<=1;c++)u.save(),o.attributes.x=new T(this.document,"x",f*s.width),o.attributes.y=new T(this.document,"y",c*s.height),o.render(u),u.restore();var v=e.createPattern(s,"repeat");return v}}class Ql extends P{constructor(){super(...arguments),this.type="marker"}render(e,t,r){if(t){var{x:i,y:n}=t,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,n),o==="auto"&&e.rotate(r),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var u=new ct(this.document,null);u.type=this.type,u.attributes.viewBox=new T(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.refX=new T(this.document,"refX",this.getAttribute("refX").getValue()),u.attributes.refY=new T(this.document,"refY",this.getAttribute("refY").getValue()),u.attributes.width=new T(this.document,"width",this.getAttribute("markerWidth").getValue()),u.attributes.height=new T(this.document,"height",this.getAttribute("markerHeight").getValue()),u.attributes.overflow=new T(this.document,"overflow",this.getAttribute("overflow").getValue()),u.attributes.fill=new T(this.document,"fill",this.getAttribute("fill").getColor("black")),u.attributes.stroke=new T(this.document,"stroke",this.getAttribute("stroke").getValue("none")),u.children=this.children,u.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-r),e.translate(-i,-n)}}}class Kl extends P{constructor(){super(...arguments),this.type="defs"}render(){}}class Ur extends Pe{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new ne;return this.children.forEach(r=>{t.addBoundingBox(r.getBoundingBox(e))}),t}}class On extends P{constructor(e,t,r){super(e,t,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:n}=this;n.forEach(o=>{o.type==="stop"&&i.push(o)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,t,r){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:n}=i,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(r,n[n.length-1].color);if(n.forEach(p=>{o.addColorStop(p.offset,this.addParentOpacity(r,p.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:u,viewPort:l}=s.screen,[h]=l.viewPorts,f=new Sn(s,null);f.attributes.x=new T(s,"x",-u/3),f.attributes.y=new T(s,"y",-u/3),f.attributes.width=new T(s,"width",u),f.attributes.height=new T(s,"height",u);var c=new Ur(s,null);c.attributes.transform=new T(s,"transform",this.getAttribute("gradientTransform").getValue()),c.children=[f];var v=new ct(s,null);v.attributes.x=new T(s,"x",0),v.attributes.y=new T(s,"y",0),v.attributes.width=new T(s,"width",h.width),v.attributes.height=new T(s,"height",h.height),v.children=[c];var d=s.createCanvas(h.width,h.height),g=d.getContext("2d");return g.fillStyle=o,v.render(g),g.createPattern(d,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())})}addParentOpacity(e,t){if(e.hasValue()){var r=new T(this.document,"color",t);return r.addOpacity(e).getColor()}return t}}class Zl extends On{constructor(e,t,r){super(e,t,r),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,t){var r=this.getGradientUnits()==="objectBoundingBox",i=r?t.getBoundingBox(e):null;if(r&&!i)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var n=r?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=r?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=r?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),u=r?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===s&&o===u?null:e.createLinearGradient(n,o,s,u)}}class Jl extends On{constructor(e,t,r){super(e,t,r),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,t){var r=this.getGradientUnits()==="objectBoundingBox",i=t.getBoundingBox(e);if(r&&!i)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var n=r?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=r?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=n,u=o;this.getAttribute("fx").hasValue()&&(s=r?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(u=r?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=r?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,u,h,n,o,l)}}class eh extends P{constructor(e,t,r){super(e,t,r),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),n=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),n.hasValue()&&(o=o.addOpacity(n)),this.offset=i,this.color=o.getColor()}}class Gr extends P{constructor(e,t,r){super(e,t,r),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new T(e,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}calcValue(){var{initialUnits:e}=this,{progress:t,from:r,to:i}=this.getProgress(),n=r.getNumber()+(i.getNumber()-r.getNumber())*t;return e==="%"&&(n*=100),"".concat(n).concat(e)}update(e){var{parent:t}=this,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,t.animationFrozen=!0,t.animationFrozenValue=r.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,r.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var n=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var u=s.getString();o="".concat(u,"(").concat(o,")")}r.setValue(o),n=!0}return n}getProgress(){var{document:e,values:t}=this,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(t.hasValue()){var i=r.progress*(t.getValue().length-1),n=Math.floor(i),o=Math.ceil(i);r.from=new T(e,"from",parseFloat(t.getValue()[n])),r.to=new T(e,"to",parseFloat(t.getValue()[o])),r.progress=(i-n)/(o-n)}else r.from=this.from,r.to=this.to;return r}}class th extends Gr{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=new Ei(t.getColor()),n=new Ei(r.getColor());if(i.ok&&n.ok){var o=i.r+(n.r-i.r)*e,s=i.g+(n.g-i.g)*e,u=i.b+(n.b-i.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(u),")")}return this.getAttribute("from").getColor()}}class rh extends Gr{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=ae(t.getString()),n=ae(r.getString()),o=i.map((s,u)=>{var l=n[u];return s+(l-s)*e}).join(" ");return o}}class ah extends P{constructor(e,t,r){super(e,t,r),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=e,{children:n}=this;for(var o of n)switch(o.type){case"font-face":{this.fontFace=o;var s=o.getStyle("font-family");s.hasValue()&&(i[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=o;break;case"glyph":{var u=o;u.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[u.unicode]>"u"&&(this.glyphs[u.unicode]={}),this.glyphs[u.unicode][u.arabicForm]=u):this.glyphs[u.unicode]=u;break}}}render(){}}class ih extends P{constructor(e,t,r){super(e,t,r),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class nh extends A{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class sh extends Se{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var t=e.children[0];if(t)return t.getText()}return""}}class oh extends Se{constructor(e,t,r){super(e,t,r),this.type="a";var{childNodes:i}=t,n=i[0],o=i.length>0&&Array.from(i).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(n):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:r,y:i}=this,{mouse:n}=t.screen,o=new T(t,"fontSize",K.parse(t.ctx.font).fontSize);n.isWorking()&&n.checkBoundingBox(this,new ne(r,i-o.getPixels("y"),r+this.measureText(e),i))}else if(this.children.length>0){var s=new Ur(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function jo(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function ur(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?jo(Object(t),!0).forEach(function(r){dn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):jo(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}class uh extends Se{constructor(e,t,r){super(e,t,r),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var i=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(i)}getText(){return this.text}path(e){var{dataArray:t}=this;e&&e.beginPath(),t.forEach(r=>{var{type:i,points:n}=r;switch(i){case $.LINE_TO:e&&e.lineTo(n[0],n[1]);break;case $.MOVE_TO:e&&e.moveTo(n[0],n[1]);break;case $.CURVE_TO:e&&e.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case $.QUAD_TO:e&&e.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case $.ARC:{var[o,s,u,l,h,f,c,v]=n,d=u>l?u:l,g=u>l?1:u/l,p=u>l?l/u:1;e&&(e.translate(o,s),e.rotate(c),e.scale(g,p),e.arc(0,0,d,h,h+f,!!(1-v)),e.scale(1/g,1/p),e.rotate(-c),e.translate(-o,-s));break}case $.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var t=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),{glyphInfo:i}=this,n=e.fillStyle;t==="underline"&&e.beginPath(),i.forEach((o,s)=>{var{p0:u,p1:l,rotation:h,text:f}=o;e.save(),e.translate(u.x,u.y),e.rotate(h),e.fillStyle&&e.fillText(f,0,0),e.strokeStyle&&e.strokeText(f,0,0),e.restore(),t==="underline"&&(s===0&&e.moveTo(u.x,u.y+r/8),e.lineTo(l.x,l.y+r/5))}),t==="underline"&&(e.lineWidth=r/20,e.strokeStyle=n,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,t,r,i,n,o,s,u,l){var h=o,f=this.measureText(e,u);u===" "&&t==="justify"&&r<i&&(f+=(i-r)/n),l>-1&&(h+=this.getLetterSpacingAt(l));var c=this.textHeight/20,v=this.getEquidistantPointOnPath(h,c,0),d=this.getEquidistantPointOnPath(h+f,c,0),g={p0:v,p1:d},p=v&&d?Math.atan2(d.y-v.y,d.x-v.x):0;if(s){var y=Math.cos(Math.PI/2+p)*s,x=Math.cos(-p)*s;g.p0=ur(ur({},v),{},{x:v.x+y,y:v.y+x}),g.p1=ur(ur({},d),{},{x:d.x+y,y:d.y+x})}return h+=f,{offset:h,segment:g,rotation:p}}measureText(e,t){var{measuresCache:r}=this,i=t||this.getText();if(r.has(i))return r.get(i);var n=this.measureTargetText(e,i);return r.set(i,n),n}setTextData(e){if(!this.glyphInfo){var t=this.getText(),r=t.split(""),i=t.split(" ").length-1,n=this.parent.getAttribute("dx").split().map(E=>E.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),u=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),h=0;!u.hasValue()||u.getValue()==="inherit"?h=l.getPixels():u.hasValue()&&u.getValue()!=="initial"&&u.getValue()!=="unset"&&(h=u.getPixels());var f=[],c=t.length;this.letterSpacingCache=f;for(var v=0;v<c;v++)f.push(typeof n[v]<"u"?n[v]:h);var d=f.reduce((E,C,O)=>O===0?0:E+C||0,0),g=this.measureText(e),p=Math.max(g+d,0);this.textWidth=g,this.textHeight=this.getFontSize(),this.glyphInfo=[];var y=this.getPathLength(),x=this.getStyle("startOffset").getNumber(0)*y,b=0;(s==="middle"||s==="center")&&(b=-p/2),(s==="end"||s==="right")&&(b=-p),b+=x,r.forEach((E,C)=>{var{offset:O,segment:S,rotation:w}=this.findSegmentToFitChar(e,s,p,y,i,b,o,E,C);b=O,!(!S.p0||!S.p1)&&this.glyphInfo.push({text:r[C],p0:S.p0,p1:S.p1,rotation:w})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:r}=e;for(r.reset();!r.isEnd();){var{current:i}=r,n=i?i.x:0,o=i?i.y:0,s=r.next(),u=s.type,l=[];switch(s.type){case $.MOVE_TO:this.pathM(r,l);break;case $.LINE_TO:u=this.pathL(r,l);break;case $.HORIZ_LINE_TO:u=this.pathH(r,l);break;case $.VERT_LINE_TO:u=this.pathV(r,l);break;case $.CURVE_TO:this.pathC(r,l);break;case $.SMOOTH_CURVE_TO:u=this.pathS(r,l);break;case $.QUAD_TO:this.pathQ(r,l);break;case $.SMOOTH_QUAD_TO:u=this.pathT(r,l);break;case $.ARC:l=this.pathA(r);break;case $.CLOSE_PATH:A.pathZ(r);break}s.type!==$.CLOSE_PATH?t.push({type:u,points:l,start:{x:n,y:o},pathLength:this.calcLength(n,o,u,l)}):t.push({type:$.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:r,y:i}=A.pathM(e).point;t.push(r,i)}pathL(e,t){var{x:r,y:i}=A.pathL(e).point;return t.push(r,i),$.LINE_TO}pathH(e,t){var{x:r,y:i}=A.pathH(e).point;return t.push(r,i),$.LINE_TO}pathV(e,t){var{x:r,y:i}=A.pathV(e).point;return t.push(r,i),$.LINE_TO}pathC(e,t){var{point:r,controlPoint:i,currentPoint:n}=A.pathC(e);t.push(r.x,r.y,i.x,i.y,n.x,n.y)}pathS(e,t){var{point:r,controlPoint:i,currentPoint:n}=A.pathS(e);return t.push(r.x,r.y,i.x,i.y,n.x,n.y),$.CURVE_TO}pathQ(e,t){var{controlPoint:r,currentPoint:i}=A.pathQ(e);t.push(r.x,r.y,i.x,i.y)}pathT(e,t){var{controlPoint:r,currentPoint:i}=A.pathT(e);return t.push(r.x,r.y,i.x,i.y),$.QUAD_TO}pathA(e){var{rX:t,rY:r,sweepFlag:i,xAxisRotation:n,centp:o,a1:s,ad:u}=A.pathA(e);return i===0&&u>0&&(u-=2*Math.PI),i===1&&u<0&&(u+=2*Math.PI),[o.x,o.y,t,r,s,u,n,i]}calcLength(e,t,r,i){var n=0,o=null,s=null,u=0;switch(r){case $.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case $.CURVE_TO:for(n=0,o=this.getPointOnCubicBezier(0,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),u=.01;u<=1;u+=.01)s=this.getPointOnCubicBezier(u,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return n;case $.QUAD_TO:for(n=0,o=this.getPointOnQuadraticBezier(0,e,t,i[0],i[1],i[2],i[3]),u=.01;u<=1;u+=.01)s=this.getPointOnQuadraticBezier(u,e,t,i[0],i[1],i[2],i[3]),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return n;case $.ARC:{n=0;var l=i[4],h=i[5],f=i[4]+h,c=Math.PI/180;if(Math.abs(l-f)<c&&(c=Math.abs(l-f)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),h<0)for(u=l-c;u>f;u-=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(u=l+c;u<f;u+=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),n}}return 0}getPointOnLine(e,t,r,i,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:t,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,u=(n-r)/(i-t+Fe),l=Math.sqrt(e*e/(1+u*u));i<t&&(l*=-1);var h=u*l,f=null;if(i===t)f={x:o,y:s+h};else if((s-r)/(o-t+Fe)===u)f={x:o+l,y:s+h};else{var c=0,v=0,d=this.getLineLength(t,r,i,n);if(d<Fe)return null;var g=(o-t)*(i-t)+(s-r)*(n-r);g/=d*d,c=t+g*(i-t),v=r+g*(n-r);var p=this.getLineLength(o,s,c,v),y=Math.sqrt(e*e-p*p);l=Math.sqrt(y*y/(1+u*u)),i<t&&(l*=-1),h=u*l,f={x:c+l,y:v+h}}return f}getPointOnPath(e){var t=this.getPathLength(),r=0,i=null;if(e<-5e-5||e-5e-5>t)return null;var{dataArray:n}=this;for(var o of n){if(o&&(o.pathLength<5e-5||r+o.pathLength+5e-5<e)){r+=o.pathLength;continue}var s=e-r,u=0;switch(o.type){case $.LINE_TO:i=this.getPointOnLine(s,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case $.ARC:{var l=o.points[4],h=o.points[5],f=o.points[4]+h;if(u=l+s/o.pathLength*h,h<0&&u<f||h>=0&&u>f)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],u,o.points[6]);break}case $.CURVE_TO:u=s/o.pathLength,u>1&&(u=1),i=this.getPointOnCubicBezier(u,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case $.QUAD_TO:u=s/o.pathLength,u>1&&(u=1),i=this.getPointOnQuadraticBezier(u,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3]);break}if(i)return i;break}return null}getLineLength(e,t,r,i){return Math.sqrt((r-e)*(r-e)+(i-t)*(i-t))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,t)=>t.pathLength>0?e+t.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,t,r,i,n,o,s,u,l){var h=u*Ci(e)+o*wi(e)+i*Ai(e)+t*Pi(e),f=l*Ci(e)+s*wi(e)+n*Ai(e)+r*Pi(e);return{x:h,y:f}}getPointOnQuadraticBezier(e,t,r,i,n,o,s){var u=o*Ri(e)+i*Ii(e)+t*Ni(e),l=s*Ri(e)+n*Ii(e)+r*Ni(e);return{x:u,y:l}}getPointOnEllipticalArc(e,t,r,i,n,o){var s=Math.cos(o),u=Math.sin(o),l={x:r*Math.cos(n),y:i*Math.sin(n)};return{x:e+(l.x*s-l.y*u),y:t+(l.x*u+l.y*s)}}buildEquidistantCache(e,t){var r=this.getPathLength(),i=t||.25,n=e||r/100;if(!this.equidistantCache||this.equidistantCache.step!==n||this.equidistantCache.precision!==i){this.equidistantCache={step:n,precision:i,points:[]};for(var o=0,s=0;s<=r;s+=i){var u=this.getPointOnPath(s),l=this.getPointOnPath(s+i);!u||!l||(o+=this.getLineLength(u.x,u.y,l.x,l.y),o>=n&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:s}),o-=n))}}}getEquidistantPointOnPath(e,t,r){if(this.buildEquidistantCache(t,r),e<0||e-this.getPathLength()>5e-5)return null;var i=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}var g2=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class lh extends Pe{constructor(e,t,r){super(e,t,r),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var n=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),n?this.loadSvg(i):this.loadImage(i),this.isSvg=n}}loadImage(e){var t=this;return Ee(function*(){try{var r=yield t.document.createImage(e);t.image=r}catch(i){console.error('Error while loading image "'.concat(e,'":'),i)}t.loaded=!0})()}loadSvg(e){var t=this;return Ee(function*(){var r=g2.exec(e);if(r){var i=r[5];r[4]==="base64"?t.image=atob(i):t.image=decodeURIComponent(i)}else try{var n=yield t.document.fetch(e),o=yield n.text();t.image=o}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}t.loaded=!0})()}renderChildren(e){var{document:t,image:r,loaded:i}=this,n=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(!(!i||!r||!s||!u)){if(e.save(),e.translate(n,o),this.isSvg){var l=t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:u});l.document.documentElement.parent=this,l.render()}else{var h=this.image;t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:h.width,height:u,desiredHeight:h.height}),this.loaded&&(typeof h.complete>"u"||h.complete)&&e.drawImage(h,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new ne(e,t,e+r,t+i)}}class hh extends Pe{constructor(){super(...arguments),this.type="symbol"}render(e){}}class vh{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var r=this;return Ee(function*(){try{var{document:i}=r,n=yield i.canvg.parser.load(t),o=n.getElementsByTagName("font");Array.from(o).forEach(s=>{var u=i.createElement(s);i.definitions[e]=u})}catch(s){console.error('Error while loading font "'.concat(t,'":'),s)}r.loaded=!0})()}}class $n extends P{constructor(e,t,r){super(e,t,r),this.type="style";var i=Xe(Array.from(t.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),n=i.split("}");n.forEach(o=>{var s=o.trim();if(s){var u=s.split("{"),l=u[0].split(","),h=u[1].split(";");l.forEach(f=>{var c=f.trim();if(c){var v=e.styles[c]||{};if(h.forEach(p=>{var y=p.indexOf(":"),x=p.substr(0,y).trim(),b=p.substr(y+1,p.length-y).trim();x&&b&&(v[x]=new T(e,x,b))}),e.styles[c]=v,e.stylesSpecificity[c]=_l(c),c==="@font-face"){var d=v["font-family"].getString().replace(/"|'/g,""),g=v.src.getString().split(",");g.forEach(p=>{if(p.indexOf('format("svg")')>0){var y=mn(p);y&&new vh(e).load(d,y)}})}}})}})}}$n.parseExternalUrl=mn;class fh extends Pe{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var t=this.getAttribute("x"),r=this.getAttribute("y");t.hasValue()&&e.translate(t.getPixels("x"),0),r.hasValue()&&e.translate(0,r.getPixels("y"))}path(e){var{element:t}=this;t&&t.path(e)}renderChildren(e){var{document:t,element:r}=this;if(r){var i=r;if(r.type==="symbol"&&(i=new ct(t,null),i.attributes.viewBox=new T(t,"viewBox",r.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new T(t,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new T(t,"overflow",r.getAttribute("overflow").getString()),i.children=r.children,r.styles.opacity=new T(t,"opacity",this.calculateOpacity())),i.type==="svg"){var n=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);n.hasValue()&&(i.attributes.width=new T(t,"width",n.getString())),o.hasValue()&&(i.attributes.height=new T(t,"height",o.getString()))}var s=i.parent;i.parent=this,i.render(e),i.parent=s}}getBoundingBox(e){var{element:t}=this;return t?t.getBoundingBox(e):null}elementTransform(){var{document:e,element:t}=this;return Ae.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function lr(a,e,t,r,i,n){return a[t*r*4+e*4+n]}function hr(a,e,t,r,i,n,o){a[t*r*4+e*4+n]=o}function F(a,e,t){var r=a[e];return r*t}function me(a,e,t,r){return e+Math.cos(a)*t+Math.sin(a)*r}class Cn extends P{constructor(e,t,r){super(e,t,r),this.type="feColorMatrix";var i=ae(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var n=i[0];i=[.213+.787*n,.715-.715*n,.072-.072*n,0,0,.213-.213*n,.715+.285*n,.072-.072*n,0,0,.213-.213*n,.715-.715*n,.072+.928*n,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[me(o,.213,.787,-.213),me(o,.715,-.715,-.715),me(o,.072,-.072,.928),0,0,me(o,.213,-.213,.143),me(o,.715,.285,.14),me(o,.072,-.072,-.283),0,0,me(o,.213,-.213,-.787),me(o,.715,-.715,.715),me(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=i,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,t,r,i,n){for(var{includeOpacity:o,matrix:s}=this,u=e.getImageData(0,0,i,n),l=0;l<n;l++)for(var h=0;h<i;h++){var f=lr(u.data,h,l,i,n,0),c=lr(u.data,h,l,i,n,1),v=lr(u.data,h,l,i,n,2),d=lr(u.data,h,l,i,n,3),g=F(s,0,f)+F(s,1,c)+F(s,2,v)+F(s,3,d)+F(s,4,1),p=F(s,5,f)+F(s,6,c)+F(s,7,v)+F(s,8,d)+F(s,9,1),y=F(s,10,f)+F(s,11,c)+F(s,12,v)+F(s,13,d)+F(s,14,1),x=F(s,15,f)+F(s,16,c)+F(s,17,v)+F(s,18,d)+F(s,19,1);o&&(g=0,p=0,y=0,x*=d/255),hr(u.data,h,l,i,n,0,g),hr(u.data,h,l,i,n,1,p),hr(u.data,h,l,i,n,2,y),hr(u.data,h,l,i,n,3,x)}e.clearRect(0,0,i,n),e.putImageData(u,0,0)}}class Lt extends P{constructor(){super(...arguments),this.type="mask"}apply(e,t){var{document:r}=this,i=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var u=new ne;this.children.forEach(d=>{u.addBoundingBox(d.getBoundingBox(e))}),i=Math.floor(u.x1),n=Math.floor(u.y1),o=Math.floor(u.width),s=Math.floor(u.height)}var l=this.removeStyles(t,Lt.ignoreStyles),h=r.createCanvas(i+o,n+s),f=h.getContext("2d");r.screen.setDefaults(f),this.renderChildren(f),new Cn(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(f,0,0,i+o,n+s);var c=r.createCanvas(i+o,n+s),v=c.getContext("2d");r.screen.setDefaults(v),t.render(v),v.globalCompositeOperation="destination-in",v.fillStyle=f.createPattern(h,"no-repeat"),v.fillRect(0,0,i+o,n+s),e.fillStyle=v.createPattern(c,"no-repeat"),e.fillRect(0,0,i+o,n+s),this.restoreStyles(t,l)}render(e){}}Lt.ignoreStyles=["mask","transform","clip-path"];var Uo=()=>{};class ch extends P{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,r=Reflect.getPrototypeOf(e),{beginPath:i,closePath:n}=e;r&&(r.beginPath=Uo,r.closePath=Uo),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=Ae.fromElement(t,o)),s&&s.apply(e),o.path(e),r&&(r.closePath=n),s&&s.unapply(e)}}),Reflect.apply(n,e,[]),e.clip(),r&&(r.beginPath=i,r.closePath=n)}render(e){}}class kt extends P{constructor(){super(...arguments),this.type="filter"}apply(e,t){var{document:r,children:i}=this,n=t.getBoundingBox(e);if(n){var o=0,s=0;i.forEach(y=>{var x=y.extraFilterDistance||0;o=Math.max(o,x),s=Math.max(s,x)});var u=Math.floor(n.width),l=Math.floor(n.height),h=u+2*o,f=l+2*s;if(!(h<1||f<1)){var c=Math.floor(n.x),v=Math.floor(n.y),d=this.removeStyles(t,kt.ignoreStyles),g=r.createCanvas(h,f),p=g.getContext("2d");r.screen.setDefaults(p),p.translate(-c+o,-v+s),t.render(p),i.forEach(y=>{typeof y.apply=="function"&&y.apply(p,0,0,h,f)}),e.drawImage(g,0,0,h,f,c-o,v-s,h,f),this.restoreStyles(t,d)}}}render(e){}}kt.ignoreStyles=["filter","transform","clip-path"];class gh extends P{constructor(e,t,r){super(e,t,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,r,i,n){}}class dh extends P{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,r,i,n){}}class ph extends P{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,r,i,n){}}class yh extends P{constructor(e,t,r){super(e,t,r),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,t,r,i,n){var{document:o,blurRadius:s}=this,u=o.window?o.window.document.body:null,l=e.canvas;l.id=o.getUniqueId(),u&&(l.style.display="none",u.appendChild(l)),Y1(l,t,r,i,n,s),u&&u.removeChild(l)}}class mh extends P{constructor(){super(...arguments),this.type="title"}}class bh extends P{constructor(){super(...arguments),this.type="desc"}}var d2={svg:ct,rect:Sn,circle:Hl,ellipse:Yl,line:Xl,polyline:Tn,polygon:Wl,path:A,pattern:ql,marker:Ql,defs:Kl,linearGradient:Zl,radialGradient:Jl,stop:eh,animate:Gr,animateColor:th,animateTransform:rh,font:ah,"font-face":ih,"missing-glyph":nh,glyph:En,text:Se,tspan:Vt,tref:sh,a:oh,textPath:uh,image:lh,g:Ur,symbol:hh,style:$n,use:fh,mask:Lt,clipPath:ch,filter:kt,feDropShadow:gh,feMorphology:dh,feComposite:ph,feColorMatrix:Cn,feGaussianBlur:yh,title:mh,desc:bh};function Go(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function p2(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Go(Object(t),!0).forEach(function(r){dn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Go(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function y2(a,e){var t=document.createElement("canvas");return t.width=a,t.height=e,t}function m2(a){return Mi.apply(this,arguments)}function Mi(){return Mi=Ee(function*(a){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=document.createElement("img");return e&&(t.crossOrigin="Anonymous"),new Promise((r,i)=>{t.onload=()=>{r(t)},t.onerror=(n,o,s,u,l)=>{i(l)},t.src=a})}),Mi.apply(this,arguments)}class xe{constructor(e){var{rootEmSize:t=12,emSize:r=12,createCanvas:i=xe.createCanvas,createImage:n=xe.createImage,anonymousCrossOrigin:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=t,this.emSize=r,this.createCanvas=i,this.createImage=this.bindCreateImage(n,o),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,t){return typeof t=="boolean"?(r,i)=>e(r,typeof i=="boolean"?i:t):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:t}=this;t.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}createElement(e){var t=e.nodeName.replace(/^[^:]+:/,""),r=xe.elementTypes[t];return typeof r<"u"?new r(this,e):new zl(this,e)}createTextNode(e){return new c2(this,e)}setViewBox(e){this.screen.setViewBox(p2({document:this},e))}}xe.createCanvas=y2;xe.createImage=m2;xe.elementTypes=d2;function zo(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function Le(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?zo(Object(t),!0).forEach(function(r){dn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):zo(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}class Be{constructor(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new yr(r),this.screen=new Dt(e,r),this.options=r;var i=new xe(this,r),n=i.createDocumentElement(t);this.document=i,this.documentElement=n}static from(e,t){var r=arguments;return Ee(function*(){var i=r.length>2&&r[2]!==void 0?r[2]:{},n=new yr(i),o=yield n.parse(t);return new Be(e,o,i)})()}static fromString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new yr(r),n=i.parseFromString(t);return new Be(e,n,r)}fork(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Be.from(e,t,Le(Le({},this.options),r))}forkString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Be.fromString(e,t,Le(Le({},this.options),r))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return Ee(function*(){var r=e.length>0&&e[0]!==void 0?e[0]:{};t.start(Le({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},r)),yield t.ready(),t.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:t,screen:r,options:i}=this;r.start(t,Le(Le({enableRedraw:!0},i),e))}stop(){this.screen.stop()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,t,r)}}exports.AElement=oh;exports.AnimateColorElement=th;exports.AnimateElement=Gr;exports.AnimateTransformElement=rh;exports.BoundingBox=ne;exports.CB1=Ci;exports.CB2=wi;exports.CB3=Ai;exports.CB4=Pi;exports.Canvg=Be;exports.CircleElement=Hl;exports.ClipPathElement=ch;exports.DefsElement=Kl;exports.DescElement=bh;exports.Document=xe;exports.Element=P;exports.EllipseElement=Yl;exports.FeColorMatrixElement=Cn;exports.FeCompositeElement=ph;exports.FeDropShadowElement=gh;exports.FeGaussianBlurElement=yh;exports.FeMorphologyElement=dh;exports.FilterElement=kt;exports.Font=K;exports.FontElement=ah;exports.FontFaceElement=ih;exports.GElement=Ur;exports.GlyphElement=En;exports.GradientElement=On;exports.ImageElement=lh;exports.LineElement=Xl;exports.LinearGradientElement=Zl;exports.MarkerElement=Ql;exports.MaskElement=Lt;exports.Matrix=bn;exports.MissingGlyphElement=nh;exports.Mouse=Vl;exports.PSEUDO_ZERO=Fe;exports.Parser=yr;exports.PathElement=A;exports.PathParser=$;exports.PatternElement=ql;exports.Point=D;exports.PolygonElement=Wl;exports.PolylineElement=Tn;exports.Property=T;exports.QB1=Ri;exports.QB2=Ii;exports.QB3=Ni;exports.RadialGradientElement=Jl;exports.RectElement=Sn;exports.RenderedElement=Pe;exports.Rotate=Fl;exports.SVGElement=ct;exports.SVGFontLoader=vh;exports.Scale=jl;exports.Screen=Dt;exports.Skew=xn;exports.SkewX=Ul;exports.SkewY=Gl;exports.StopElement=eh;exports.StyleElement=$n;exports.SymbolElement=hh;exports.TRefElement=sh;exports.TSpanElement=Vt;exports.TextElement=Se;exports.TextPathElement=uh;exports.TitleElement=mh;exports.Transform=Ae;exports.Translate=Bl;exports.UnknownElement=zl;exports.UseElement=fh;exports.ViewPort=Dl;exports.compressSpaces=Xe;exports.default=Be;exports.getSelectorSpecificity=_l;exports.normalizeAttributeName=Nl;exports.normalizeColor=Ml;exports.parseExternalUrl=mn;exports.presets=Q1;exports.toNumbers=ae;exports.trimLeft=Rl;exports.trimRight=Il;exports.vectorMagnitude=Oi;exports.vectorsAngle=$i;exports.vectorsRatio=Or;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! @license DOMPurify 2.5.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.6/LICENSE */function I(a){"@babel/helpers - typeof";return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I(a)}function Pe(a,n){return Pe=Object.setPrototypeOf||function(s,c){return s.__proto__=c,s},Pe(a,n)}function zt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function le(a,n,o){return zt()?le=Reflect.construct:le=function(c,g,y){var N=[null];N.push.apply(N,g);var x=Function.bind.apply(c,N),j=new x;return y&&Pe(j,y.prototype),j},le.apply(null,arguments)}function M(a){return Gt(a)||Wt(a)||Bt(a)||$t()}function Gt(a){if(Array.isArray(a))return Fe(a)}function Wt(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Bt(a,n){if(a){if(typeof a=="string")return Fe(a,n);var o=Object.prototype.toString.call(a).slice(8,-1);if(o==="Object"&&a.constructor&&(o=a.constructor.name),o==="Map"||o==="Set")return Array.from(a);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Fe(a,n)}}function Fe(a,n){(n==null||n>a.length)&&(n=a.length);for(var o=0,s=new Array(n);o<n;o++)s[o]=a[o];return s}function $t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var jt=Object.hasOwnProperty,ut=Object.setPrototypeOf,Yt=Object.isFrozen,Xt=Object.getPrototypeOf,Vt=Object.getOwnPropertyDescriptor,E=Object.freeze,b=Object.seal,qt=Object.create,vt=typeof Reflect<"u"&&Reflect,ue=vt.apply,Ue=vt.construct;ue||(ue=function(n,o,s){return n.apply(o,s)});E||(E=function(n){return n});b||(b=function(n){return n});Ue||(Ue=function(n,o){return le(n,M(o))});var Kt=O(Array.prototype.forEach),ft=O(Array.prototype.pop),q=O(Array.prototype.push),se=O(String.prototype.toLowerCase),De=O(String.prototype.toString),ct=O(String.prototype.match),L=O(String.prototype.replace),Zt=O(String.prototype.indexOf),Jt=O(String.prototype.trim),_=O(RegExp.prototype.test),we=Qt(TypeError);function O(a){return function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),c=1;c<o;c++)s[c-1]=arguments[c];return ue(a,n,s)}}function Qt(a){return function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return Ue(a,o)}}function l(a,n,o){var s;o=(s=o)!==null&&s!==void 0?s:se,ut&&ut(a,null);for(var c=n.length;c--;){var g=n[c];if(typeof g=="string"){var y=o(g);y!==g&&(Yt(n)||(n[c]=y),g=y)}a[g]=!0}return a}function U(a){var n=qt(null),o;for(o in a)ue(jt,a,[o])===!0&&(n[o]=a[o]);return n}function ie(a,n){for(;a!==null;){var o=Vt(a,n);if(o){if(o.get)return O(o.get);if(typeof o.value=="function")return O(o.value)}a=Xt(a)}function s(c){return console.warn("fallback value for",c),null}return s}var mt=E(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ce=E(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ie=E(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),er=E(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xe=E(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),tr=E(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pt=E(["#text"]),dt=E(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ke=E(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tt=E(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),oe=E(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rr=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ar=b(/<%[\w\W]*|[\w\W]*%>/gm),nr=b(/\${[\w\W]*}/gm),ir=b(/^data-[\-\w.\u00B7-\uFFFF]/),or=b(/^aria-[\-\w]+$/),lr=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sr=b(/^(?:\w+script|data):/i),ur=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fr=b(/^html$/i),cr=b(/^[a-z][.\w]*(-[.\w]+)+$/i),mr=function(){return typeof window>"u"?null:window},pr=function(n,o){if(I(n)!=="object"||typeof n.createPolicy!="function")return null;var s=null,c="data-tt-policy-suffix";o.currentScript&&o.currentScript.hasAttribute(c)&&(s=o.currentScript.getAttribute(c));var g="dompurify"+(s?"#"+s:"");try{return n.createPolicy(g,{createHTML:function(N){return N},createScriptURL:function(N){return N}})}catch{return console.warn("TrustedTypes policy "+g+" could not be created."),null}};function _t(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mr(),n=function(e){return _t(e)};if(n.version="2.5.6",n.removed=[],!a||!a.document||a.document.nodeType!==9)return n.isSupported=!1,n;var o=a.document,s=a.document,c=a.DocumentFragment,g=a.HTMLTemplateElement,y=a.Node,N=a.Element,x=a.NodeFilter,j=a.NamedNodeMap,ht=j===void 0?a.NamedNodeMap||a.MozNamedAttrMap:j,Et=a.HTMLFormElement,At=a.DOMParser,K=a.trustedTypes,Z=N.prototype,yt=ie(Z,"cloneNode"),gt=ie(Z,"nextSibling"),St=ie(Z,"childNodes"),fe=ie(Z,"parentNode");if(typeof g=="function"){var ce=s.createElement("template");ce.content&&ce.content.ownerDocument&&(s=ce.content.ownerDocument)}var R=pr(K,o),me=R?R.createHTML(""):"",J=s,pe=J.implementation,bt=J.createNodeIterator,Ot=J.createDocumentFragment,Rt=J.getElementsByTagName,Lt=o.importNode,He={};try{He=U(s).documentMode?s.documentMode:{}}catch{}var D={};n.isSupported=typeof fe=="function"&&pe&&pe.createHTMLDocument!==void 0&&He!==9;var de=rr,Te=ar,ve=nr,Mt=ir,Nt=or,Dt=sr,ze=ur,wt=cr,_e=lr,p=null,Ge=l({},[].concat(M(mt),M(Ce),M(Ie),M(xe),M(pt))),d=null,We=l({},[].concat(M(dt),M(ke),M(Tt),M(oe))),f=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,he=null,Be=!0,Ee=!0,$e=!1,je=!0,H=!1,Ae=!0,k=!1,ye=!1,ge=!1,z=!1,Q=!1,ee=!1,Ye=!0,Xe=!1,Ct="user-content-",Se=!0,X=!1,G={},W=null,Ve=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qe=null,Ke=l({},["audio","video","img","source","image","track"]),be=null,Ze=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),te="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",w="http://www.w3.org/1999/xhtml",B=w,Oe=!1,Re=null,It=l({},[te,re,w],De),P,xt=["application/xhtml+xml","text/html"],kt="text/html",T,$=null,Pt=s.createElement("form"),Je=function(e){return e instanceof RegExp||e instanceof Function},Le=function(e){$&&$===e||((!e||I(e)!=="object")&&(e={}),e=U(e),P=xt.indexOf(e.PARSER_MEDIA_TYPE)===-1?P=kt:P=e.PARSER_MEDIA_TYPE,T=P==="application/xhtml+xml"?De:se,p="ALLOWED_TAGS"in e?l({},e.ALLOWED_TAGS,T):Ge,d="ALLOWED_ATTR"in e?l({},e.ALLOWED_ATTR,T):We,Re="ALLOWED_NAMESPACES"in e?l({},e.ALLOWED_NAMESPACES,De):It,be="ADD_URI_SAFE_ATTR"in e?l(U(Ze),e.ADD_URI_SAFE_ATTR,T):Ze,qe="ADD_DATA_URI_TAGS"in e?l(U(Ke),e.ADD_DATA_URI_TAGS,T):Ke,W="FORBID_CONTENTS"in e?l({},e.FORBID_CONTENTS,T):Ve,Y="FORBID_TAGS"in e?l({},e.FORBID_TAGS,T):{},he="FORBID_ATTR"in e?l({},e.FORBID_ATTR,T):{},G="USE_PROFILES"in e?e.USE_PROFILES:!1,Be=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,$e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,H=e.SAFE_FOR_TEMPLATES||!1,Ae=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,ee=e.RETURN_TRUSTED_TYPE||!1,ge=e.FORCE_BODY||!1,Ye=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||_e,B=e.NAMESPACE||w,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Je(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Je(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),H&&(Ee=!1),Q&&(z=!0),G&&(p=l({},M(pt)),d=[],G.html===!0&&(l(p,mt),l(d,dt)),G.svg===!0&&(l(p,Ce),l(d,ke),l(d,oe)),G.svgFilters===!0&&(l(p,Ie),l(d,ke),l(d,oe)),G.mathMl===!0&&(l(p,xe),l(d,Tt),l(d,oe))),e.ADD_TAGS&&(p===Ge&&(p=U(p)),l(p,e.ADD_TAGS,T)),e.ADD_ATTR&&(d===We&&(d=U(d)),l(d,e.ADD_ATTR,T)),e.ADD_URI_SAFE_ATTR&&l(be,e.ADD_URI_SAFE_ATTR,T),e.FORBID_CONTENTS&&(W===Ve&&(W=U(W)),l(W,e.FORBID_CONTENTS,T)),Se&&(p["#text"]=!0),k&&l(p,["html","head","body"]),p.table&&(l(p,["tbody"]),delete Y.tbody),E&&E(e),$=e)},Qe=l({},["mi","mo","mn","ms","mtext"]),et=l({},["foreignobject","annotation-xml"]),Ft=l({},["title","style","font","a","script"]),ae=l({},Ce);l(ae,Ie),l(ae,er);var Me=l({},xe);l(Me,tr);var Ut=function(e){var t=fe(e);(!t||!t.tagName)&&(t={namespaceURI:B,tagName:"template"});var r=se(e.tagName),u=se(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===re?t.namespaceURI===w?r==="svg":t.namespaceURI===te?r==="svg"&&(u==="annotation-xml"||Qe[u]):!!ae[r]:e.namespaceURI===te?t.namespaceURI===w?r==="math":t.namespaceURI===re?r==="math"&&et[u]:!!Me[r]:e.namespaceURI===w?t.namespaceURI===re&&!et[u]||t.namespaceURI===te&&!Qe[u]?!1:!Me[r]&&(Ft[r]||!ae[r]):!!(P==="application/xhtml+xml"&&Re[e.namespaceURI]):!1},S=function(e){q(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch{try{e.outerHTML=me}catch{e.remove()}}},ne=function(e,t){try{q(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{q(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is"&&!d[e])if(z||Q)try{S(t)}catch{}else try{t.setAttribute(e,"")}catch{}},tt=function(e){var t,r;if(ge)e="<remove></remove>"+e;else{var u=ct(e,/^[\r\n\t ]+/);r=u&&u[0]}P==="application/xhtml+xml"&&B===w&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var A=R?R.createHTML(e):e;if(B===w)try{t=new At().parseFromString(A,P)}catch{}if(!t||!t.documentElement){t=pe.createDocument(B,"template",null);try{t.documentElement.innerHTML=Oe?me:A}catch{}}var h=t.body||t.documentElement;return e&&r&&h.insertBefore(s.createTextNode(r),h.childNodes[0]||null),B===w?Rt.call(t,k?"html":"body")[0]:k?t.documentElement:h},rt=function(e){return bt.call(e.ownerDocument||e,e,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null,!1)},at=function(e){return e instanceof Et&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof ht)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},V=function(e){return I(y)==="object"?e instanceof y:e&&I(e)==="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string"},C=function(e,t,r){D[e]&&Kt(D[e],function(u){u.call(n,t,r,$)})},nt=function(e){var t;if(C("beforeSanitizeElements",e,null),at(e)||_(/[\u0080-\uFFFF]/,e.nodeName))return S(e),!0;var r=T(e.nodeName);if(C("uponSanitizeElement",e,{tagName:r,allowedTags:p}),e.hasChildNodes()&&!V(e.firstElementChild)&&(!V(e.content)||!V(e.content.firstElementChild))&&_(/<[/\w]/g,e.innerHTML)&&_(/<[/\w]/g,e.textContent)||r==="select"&&_(/<template/i,e.innerHTML)||e.nodeType===7||Ae&&e.nodeType===8&&_(/<[/\w]/g,e.data))return S(e),!0;if(!p[r]||Y[r]){if(!Y[r]&&ot(r)&&(f.tagNameCheck instanceof RegExp&&_(f.tagNameCheck,r)||f.tagNameCheck instanceof Function&&f.tagNameCheck(r)))return!1;if(Se&&!W[r]){var u=fe(e)||e.parentNode,A=St(e)||e.childNodes;if(A&&u)for(var h=A.length,v=h-1;v>=0;--v){var F=yt(A[v],!0);F.__removalCount=(e.__removalCount||0)+1,u.insertBefore(F,gt(e))}}return S(e),!0}return e instanceof N&&!Ut(e)||(r==="noscript"||r==="noembed"||r==="noframes")&&_(/<\/no(script|embed|frames)/i,e.innerHTML)?(S(e),!0):(H&&e.nodeType===3&&(t=e.textContent,t=L(t,de," "),t=L(t,Te," "),t=L(t,ve," "),e.textContent!==t&&(q(n.removed,{element:e.cloneNode()}),e.textContent=t)),C("afterSanitizeElements",e,null),!1)},it=function(e,t,r){if(Ye&&(t==="id"||t==="name")&&(r in s||r in Pt))return!1;if(!(Ee&&!he[t]&&_(Mt,t))){if(!(Be&&_(Nt,t))){if(!d[t]||he[t]){if(!(ot(e)&&(f.tagNameCheck instanceof RegExp&&_(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&_(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&_(f.tagNameCheck,r)||f.tagNameCheck instanceof Function&&f.tagNameCheck(r))))return!1}else if(!be[t]){if(!_(_e,L(r,ze,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Zt(r,"data:")===0&&qe[e])){if(!($e&&!_(Dt,L(r,ze,"")))){if(r)return!1}}}}}}return!0},ot=function(e){return e!=="annotation-xml"&&ct(e,wt)},lt=function(e){var t,r,u,A;C("beforeSanitizeAttributes",e,null);var h=e.attributes;if(h){var v={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d};for(A=h.length;A--;){t=h[A];var F=t,m=F.name,Ne=F.namespaceURI;if(r=m==="value"?t.value:Jt(t.value),u=T(m),v.attrName=u,v.attrValue=r,v.keepAttr=!0,v.forceKeepAttr=void 0,C("uponSanitizeAttribute",e,v),r=v.attrValue,Ae&&_(/((--!?|])>)|<\/(style|title)/i,r)){ne(m,e);continue}if(!v.forceKeepAttr&&(ne(m,e),!!v.keepAttr)){if(!je&&_(/\/>/i,r)){ne(m,e);continue}H&&(r=L(r,de," "),r=L(r,Te," "),r=L(r,ve," "));var st=T(e.nodeName);if(it(st,u,r)){if(Xe&&(u==="id"||u==="name")&&(ne(m,e),r=Ct+r),R&&I(K)==="object"&&typeof K.getAttributeType=="function"&&!Ne)switch(K.getAttributeType(st,u)){case"TrustedHTML":{r=R.createHTML(r);break}case"TrustedScriptURL":{r=R.createScriptURL(r);break}}try{Ne?e.setAttributeNS(Ne,m,r):e.setAttribute(m,r),at(e)?S(e):ft(n.removed)}catch{}}}}C("afterSanitizeAttributes",e,null)}},Ht=function i(e){var t,r=rt(e);for(C("beforeSanitizeShadowDOM",e,null);t=r.nextNode();)C("uponSanitizeShadowNode",t,null),!nt(t)&&(t.content instanceof c&&i(t.content),lt(t));C("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t,r,u,A,h;if(Oe=!i,Oe&&(i="<!-->"),typeof i!="string"&&!V(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw we("dirty is not a string, aborting")}else throw we("toString is not a function");if(!n.isSupported){if(I(a.toStaticHTML)==="object"||typeof a.toStaticHTML=="function"){if(typeof i=="string")return a.toStaticHTML(i);if(V(i))return a.toStaticHTML(i.outerHTML)}return i}if(ye||Le(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){var v=T(i.nodeName);if(!p[v]||Y[v])throw we("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof y)t=tt("<!---->"),r=t.ownerDocument.importNode(i,!0),r.nodeType===1&&r.nodeName==="BODY"||r.nodeName==="HTML"?t=r:t.appendChild(r);else{if(!z&&!H&&!k&&i.indexOf("<")===-1)return R&&ee?R.createHTML(i):i;if(t=tt(i),!t)return z?null:ee?me:""}t&&ge&&S(t.firstChild);for(var F=rt(X?i:t);u=F.nextNode();)u.nodeType===3&&u===A||nt(u)||(u.content instanceof c&&Ht(u.content),lt(u),A=u);if(A=null,X)return i;if(z){if(Q)for(h=Ot.call(t.ownerDocument);t.firstChild;)h.appendChild(t.firstChild);else h=t;return(d.shadowroot||d.shadowrootmod)&&(h=Lt.call(o,h,!0)),h}var m=k?t.outerHTML:t.innerHTML;return k&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&_(fr,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
3
|
+
`+m),H&&(m=L(m,de," "),m=L(m,Te," "),m=L(m,ve," ")),R&&ee?R.createHTML(m):m},n.setConfig=function(i){Le(i),ye=!0},n.clearConfig=function(){$=null,ye=!1},n.isValidAttribute=function(i,e,t){$||Le({});var r=T(i),u=T(e);return it(r,u,t)},n.addHook=function(i,e){typeof e=="function"&&(D[i]=D[i]||[],q(D[i],e))},n.removeHook=function(i){if(D[i])return ft(D[i])},n.removeHooks=function(i){D[i]&&(D[i]=[])},n.removeAllHooks=function(){D={}},n}var dr=_t();exports.default=dr;
|