diff --git "a/dist/assets/index.es-B33Y2F_W.js" "b/dist/assets/index.es-B33Y2F_W.js" new file mode 100644--- /dev/null +++ "b/dist/assets/index.es-B33Y2F_W.js" @@ -0,0 +1,18 @@ +import{c as Da,_ as Va,g as il}from"./index-DQmHHp3O.js";var fn={},cn={},cr,vn;function Q(){if(vn)return cr;vn=1;var n=function(e){return e&&e.Math===Math&&e};return cr=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof Da=="object"&&Da)||n(typeof cr=="object"&&cr)||function(){return this}()||Function("return this")(),cr}var Qr={},Zr,gn;function Z(){return gn||(gn=1,Zr=function(n){try{return!!n()}catch{return!0}}),Zr}var Jr,dn;function we(){if(dn)return Jr;dn=1;var n=Z();return Jr=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Jr}var et,pn;function Ar(){if(pn)return et;pn=1;var n=Z();return et=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),et}var rt,yn;function ne(){if(yn)return rt;yn=1;var n=Ar(),e=Function.prototype.call;return rt=n?e.bind(e):function(){return e.apply(e,arguments)},rt}var tt={},mn;function Yl(){if(mn)return tt;mn=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,r=e&&!n.call({1:2},1);return tt.f=r?function(i){var a=e(this,i);return!!a&&a.enumerable}:n,tt}var it,bn;function Fa(){return bn||(bn=1,it=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),it}var at,xn;function J(){if(xn)return at;xn=1;var n=Ar(),e=Function.prototype,r=e.call,t=n&&e.bind.bind(r,r);return at=n?t:function(i){return function(){return r.apply(i,arguments)}},at}var nt,On;function er(){if(On)return nt;On=1;var n=J(),e=n({}.toString),r=n("".slice);return nt=function(t){return r(e(t),8,-1)},nt}var st,Tn;function al(){if(Tn)return st;Tn=1;var n=J(),e=Z(),r=er(),t=Object,i=n("".split);return st=e(function(){return!t("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):t(a)}:t,st}var ot,Sn;function Ir(){return Sn||(Sn=1,ot=function(n){return n==null}),ot}var ut,En;function Pe(){if(En)return ut;En=1;var n=Ir(),e=TypeError;return ut=function(r){if(n(r))throw new e("Can't call method on "+r);return r},ut}var lt,Rn;function dr(){if(Rn)return lt;Rn=1;var n=al(),e=Pe();return lt=function(r){return n(e(r))},lt}var ht,Cn;function re(){if(Cn)return ht;Cn=1;var n=typeof document=="object"&&document.all;return ht=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},ht}var ft,wn;function pe(){if(wn)return ft;wn=1;var n=re();return ft=function(e){return typeof e=="object"?e!==null:n(e)},ft}var ct,Pn;function rr(){if(Pn)return ct;Pn=1;var n=Q(),e=re(),r=function(t){return e(t)?t:void 0};return ct=function(t,i){return arguments.length<2?r(n[t]):n[t]&&n[t][i]},ct}var vt,An;function Nr(){if(An)return vt;An=1;var n=J();return vt=n({}.isPrototypeOf),vt}var gt,In;function pr(){if(In)return gt;In=1;var n=Q(),e=n.navigator,r=e&&e.userAgent;return gt=r?String(r):"",gt}var dt,Nn;function Ua(){if(Nn)return dt;Nn=1;var n=Q(),e=pr(),r=n.process,t=n.Deno,i=r&&r.versions||t&&t.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),dt=o,dt}var pt,_n;function nl(){if(_n)return pt;_n=1;var n=Ua(),e=Z(),r=Q(),t=r.String;return pt=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!t(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),pt}var yt,Mn;function sl(){if(Mn)return yt;Mn=1;var n=nl();return yt=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",yt}var mt,qn;function ol(){if(qn)return mt;qn=1;var n=rr(),e=re(),r=Nr(),t=sl(),i=Object;return mt=t?function(a){return typeof a=="symbol"}:function(a){var s=n("Symbol");return e(s)&&r(s.prototype,i(a))},mt}var bt,Dn;function _r(){if(Dn)return bt;Dn=1;var n=String;return bt=function(e){try{return n(e)}catch{return"Object"}},bt}var xt,Vn;function Fe(){if(Vn)return xt;Vn=1;var n=re(),e=_r(),r=TypeError;return xt=function(t){if(n(t))return t;throw new r(e(t)+" is not a function")},xt}var Ot,Ln;function nr(){if(Ln)return Ot;Ln=1;var n=Fe(),e=Ir();return Ot=function(r,t){var i=r[t];return e(i)?void 0:n(i)},Ot}var Tt,kn;function Xl(){if(kn)return Tt;kn=1;var n=ne(),e=re(),r=pe(),t=TypeError;return Tt=function(i,a){var s,o;if(a==="string"&&e(s=i.toString)&&!r(o=n(s,i))||e(s=i.valueOf)&&!r(o=n(s,i))||a!=="string"&&e(s=i.toString)&&!r(o=n(s,i)))return o;throw new t("Can't convert object to primitive value")},Tt}var St={exports:{}},Et,jn;function Me(){return jn||(jn=1,Et=!1),Et}var Rt,Bn;function Ga(){if(Bn)return Rt;Bn=1;var n=Q(),e=Object.defineProperty;return Rt=function(r,t){try{e(n,r,{value:t,configurable:!0,writable:!0})}catch{n[r]=t}return t},Rt}var Fn;function $a(){if(Fn)return St.exports;Fn=1;var n=Me(),e=Q(),r=Ga(),t="__core-js_shared__",i=St.exports=e[t]||r(t,{});return(i.versions||(i.versions=[])).push({version:"3.45.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"}),St.exports}var Ct,Un;function za(){if(Un)return Ct;Un=1;var n=$a();return Ct=function(e,r){return n[e]||(n[e]=r||{})},Ct}var wt,Gn;function Mr(){if(Gn)return wt;Gn=1;var n=Pe(),e=Object;return wt=function(r){return e(n(r))},wt}var Pt,$n;function Ae(){if($n)return Pt;$n=1;var n=J(),e=Mr(),r=n({}.hasOwnProperty);return Pt=Object.hasOwn||function(i,a){return r(e(i),a)},Pt}var At,zn;function ul(){if(zn)return At;zn=1;var n=J(),e=0,r=Math.random(),t=n(1.1.toString);return At=function(i){return"Symbol("+(i===void 0?"":i)+")_"+t(++e+r,36)},At}var It,Hn;function ae(){if(Hn)return It;Hn=1;var n=Q(),e=za(),r=Ae(),t=ul(),i=nl(),a=sl(),s=n.Symbol,o=e("wks"),u=a?s.for||s:s&&s.withoutSetter||t;return It=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},It}var Nt,Wn;function Kl(){if(Wn)return Nt;Wn=1;var n=ne(),e=pe(),r=ol(),t=nr(),i=Xl(),a=ae(),s=TypeError,o=a("toPrimitive");return Nt=function(u,l){if(!e(u)||r(u))return u;var h=t(u,o),c;if(h){if(l===void 0&&(l="default"),c=n(h,u,l),!e(c)||r(c))return c;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},Nt}var _t,Yn;function ll(){if(Yn)return _t;Yn=1;var n=Kl(),e=ol();return _t=function(r){var t=n(r,"string");return e(t)?t:t+""},_t}var Mt,Xn;function qr(){if(Xn)return Mt;Xn=1;var n=Q(),e=pe(),r=n.document,t=e(r)&&e(r.createElement);return Mt=function(i){return t?r.createElement(i):{}},Mt}var qt,Kn;function hl(){if(Kn)return qt;Kn=1;var n=we(),e=Z(),r=qr();return qt=!n&&!e(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),qt}var Qn;function Dr(){if(Qn)return Qr;Qn=1;var n=we(),e=ne(),r=Yl(),t=Fa(),i=dr(),a=ll(),s=Ae(),o=hl(),u=Object.getOwnPropertyDescriptor;return Qr.f=n?u:function(h,c){if(h=i(h),c=a(c),o)try{return u(h,c)}catch{}if(s(h,c))return t(!e(r.f,h,c),h[c])},Qr}var Dt={},Vt,Zn;function fl(){if(Zn)return Vt;Zn=1;var n=we(),e=Z();return Vt=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Vt}var Lt,Jn;function le(){if(Jn)return Lt;Jn=1;var n=pe(),e=String,r=TypeError;return Lt=function(t){if(n(t))return t;throw new r(e(t)+" is not an object")},Lt}var es;function Ye(){if(es)return Dt;es=1;var n=we(),e=hl(),r=fl(),t=le(),i=ll(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",h="writable";return Dt.f=n?r?function(v,f,g){if(t(v),f=i(f),t(g),typeof v=="function"&&f==="prototype"&&"value"in g&&h in g&&!g[h]){var d=o(v,f);d&&d[h]&&(v[f]=g.value,g={configurable:l in g?g[l]:d[l],enumerable:u in g?g[u]:d[u],writable:!1})}return s(v,f,g)}:s:function(v,f,g){if(t(v),f=i(f),t(g),e)try{return s(v,f,g)}catch{}if("get"in g||"set"in g)throw new a("Accessors not supported");return"value"in g&&(v[f]=g.value),v},Dt}var kt,rs;function yr(){if(rs)return kt;rs=1;var n=we(),e=Ye(),r=Fa();return kt=n?function(t,i,a){return e.f(t,i,r(1,a))}:function(t,i,a){return t[i]=a,t},kt}var jt={exports:{}},Bt,ts;function Vr(){if(ts)return Bt;ts=1;var n=we(),e=Ae(),r=Function.prototype,t=n&&Object.getOwnPropertyDescriptor,i=e(r,"name"),a=i&&(function(){}).name==="something",s=i&&(!n||n&&t(r,"name").configurable);return Bt={EXISTS:i,PROPER:a,CONFIGURABLE:s},Bt}var Ft,is;function Ha(){if(is)return Ft;is=1;var n=J(),e=re(),r=$a(),t=n(Function.toString);return e(r.inspectSource)||(r.inspectSource=function(i){return t(i)}),Ft=r.inspectSource,Ft}var Ut,as;function Ql(){if(as)return Ut;as=1;var n=Q(),e=re(),r=n.WeakMap;return Ut=e(r)&&/native code/.test(String(r)),Ut}var Gt,ns;function Wa(){if(ns)return Gt;ns=1;var n=za(),e=ul(),r=n("keys");return Gt=function(t){return r[t]||(r[t]=e(t))},Gt}var $t,ss;function Ya(){return ss||(ss=1,$t={}),$t}var zt,os;function Lr(){if(os)return zt;os=1;var n=Ql(),e=Q(),r=pe(),t=yr(),i=Ae(),a=$a(),s=Wa(),o=Ya(),u="Object already initialized",l=e.TypeError,h=e.WeakMap,c,v,f,g=function(m){return f(m)?v(m):c(m,{})},d=function(m){return function(b){var x;if(!r(b)||(x=v(b)).type!==m)throw new l("Incompatible receiver, "+m+" required");return x}};if(n||a.state){var p=a.state||(a.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,c=function(m,b){if(p.has(m))throw new l(u);return b.facade=m,p.set(m,b),b},v=function(m){return p.get(m)||{}},f=function(m){return p.has(m)}}else{var y=s("state");o[y]=!0,c=function(m,b){if(i(m,y))throw new l(u);return b.facade=m,t(m,y,b),b},v=function(m){return i(m,y)?m[y]:{}},f=function(m){return i(m,y)}}return zt={set:c,get:v,has:f,enforce:g,getterFor:d},zt}var us;function cl(){if(us)return jt.exports;us=1;var n=J(),e=Z(),r=re(),t=Ae(),i=we(),a=Vr().CONFIGURABLE,s=Ha(),o=Lr(),u=o.enforce,l=o.get,h=String,c=Object.defineProperty,v=n("".slice),f=n("".replace),g=n([].join),d=i&&!e(function(){return c(function(){},"length",{value:8}).length!==8}),p=String(String).split("String"),y=jt.exports=function(m,b,x){v(h(b),0,7)==="Symbol("&&(b="["+f(h(b),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),x&&x.getter&&(b="get "+b),x&&x.setter&&(b="set "+b),(!t(m,"name")||a&&m.name!==b)&&(i?c(m,"name",{value:b,configurable:!0}):m.name=b),d&&x&&t(x,"arity")&&m.length!==x.arity&&c(m,"length",{value:x.arity});try{x&&t(x,"constructor")&&x.constructor?i&&c(m,"prototype",{writable:!1}):m.prototype&&(m.prototype=void 0)}catch{}var S=u(m);return t(S,"source")||(S.source=g(p,typeof b=="string"?b:"")),m};return Function.prototype.toString=y(function(){return r(this)&&l(this).source||s(this)},"toString"),jt.exports}var Ht,ls;function tr(){if(ls)return Ht;ls=1;var n=re(),e=Ye(),r=cl(),t=Ga();return Ht=function(i,a,s,o){o||(o={});var u=o.enumerable,l=o.name!==void 0?o.name:a;if(n(s)&&r(s,l,o),o.global)u?i[a]=s:t(a,s);else{try{o.unsafe?i[a]&&(u=!0):delete i[a]}catch{}u?i[a]=s:e.f(i,a,{value:s,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return i},Ht}var Wt={},Yt,hs;function Zl(){if(hs)return Yt;hs=1;var n=Math.ceil,e=Math.floor;return Yt=Math.trunc||function(t){var i=+t;return(i>0?e:n)(i)},Yt}var Xt,fs;function kr(){if(fs)return Xt;fs=1;var n=Zl();return Xt=function(e){var r=+e;return r!==r||r===0?0:n(r)},Xt}var Kt,cs;function Jl(){if(cs)return Kt;cs=1;var n=kr(),e=Math.max,r=Math.min;return Kt=function(t,i){var a=n(t);return a<0?e(a+i,0):r(a,i)},Kt}var Qt,vs;function sr(){if(vs)return Qt;vs=1;var n=kr(),e=Math.min;return Qt=function(r){var t=n(r);return t>0?e(t,9007199254740991):0},Qt}var Zt,gs;function Xa(){if(gs)return Zt;gs=1;var n=sr();return Zt=function(e){return n(e.length)},Zt}var Jt,ds;function vl(){if(ds)return Jt;ds=1;var n=dr(),e=Jl(),r=Xa(),t=function(i){return function(a,s,o){var u=n(a),l=r(u);if(l===0)return!i&&-1;var h=e(o,l),c;if(i&&s!==s){for(;l>h;)if(c=u[h++],c!==c)return!0}else for(;l>h;h++)if((i||h in u)&&u[h]===s)return i||h||0;return!i&&-1}};return Jt={includes:t(!0),indexOf:t(!1)},Jt}var ei,ps;function gl(){if(ps)return ei;ps=1;var n=J(),e=Ae(),r=dr(),t=vl().indexOf,i=Ya(),a=n([].push);return ei=function(s,o){var u=r(s),l=0,h=[],c;for(c in u)!e(i,c)&&e(u,c)&&a(h,c);for(;o.length>l;)e(u,c=o[l++])&&(~t(h,c)||a(h,c));return h},ei}var ri,ys;function Ka(){return ys||(ys=1,ri=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),ri}var ms;function eh(){if(ms)return Wt;ms=1;var n=gl(),e=Ka(),r=e.concat("length","prototype");return Wt.f=Object.getOwnPropertyNames||function(i){return n(i,r)},Wt}var ti={},bs;function rh(){return bs||(bs=1,ti.f=Object.getOwnPropertySymbols),ti}var ii,xs;function th(){if(xs)return ii;xs=1;var n=rr(),e=J(),r=eh(),t=rh(),i=le(),a=e([].concat);return ii=n("Reflect","ownKeys")||function(o){var u=r.f(i(o)),l=t.f;return l?a(u,l(o)):u},ii}var ai,Os;function ih(){if(Os)return ai;Os=1;var n=Ae(),e=th(),r=Dr(),t=Ye();return ai=function(i,a,s){for(var o=e(a),u=t.f,l=r.f,h=0;hP;P++)if(A=C(f[P]),A&&s(v,A))return A;return new c(!1)}E=o(f,O)}for(q=m?f.next:E.next;!(I=e(q,E)).done;){try{A=C(I.value)}catch(w){l(E,"throw",w)}if(typeof A=="object"&&A&&s(v,A))return A}return new c(!1)},Hi}var Wi,co;function Rh(){if(co)return Wi;co=1;var n=ae(),e=n("iterator"),r=!1;try{var t=0,i={next:function(){return{done:!!t++}},return:function(){r=!0}};i[e]=function(){return this},Array.from(i,function(){throw 2})}catch{}return Wi=function(a,s){try{if(!s&&!r)return!1}catch{return!1}var o=!1;try{var u={};u[e]=function(){return{next:function(){return{done:o=!0}}}},a(u)}catch{}return o},Wi}var Yi,vo;function Cl(){if(vo)return Yi;vo=1;var n=mr(),e=Rh(),r=br().CONSTRUCTOR;return Yi=r||!e(function(t){n.all(t).then(void 0,function(){})}),Yi}var go;function Ch(){if(go)return no;go=1;var n=he(),e=ne(),r=Fe(),t=xr(),i=Ja(),a=Rl(),s=Cl();return n({target:"Promise",stat:!0,forced:s},{all:function(u){var l=this,h=t.f(l),c=h.resolve,v=h.reject,f=i(function(){var g=r(l.resolve),d=[],p=0,y=1;a(u,function(m){var b=p++,x=!1;y++,e(g,l,m).then(function(S){x||(x=!0,d[b]=S,--y||c(d))},v)}),--y||c(d)});return f.error&&v(f.value),h.promise}}),no}var po={},yo;function wh(){if(yo)return po;yo=1;var n=he(),e=Me(),r=br().CONSTRUCTOR,t=mr(),i=rr(),a=re(),s=tr(),o=t&&t.prototype;if(n({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(l){return this.then(void 0,l)}}),!e&&a(t)){var u=i("Promise").prototype.catch;o.catch!==u&&s(o,"catch",u,{unsafe:!0})}return po}var mo={},bo;function Ph(){if(bo)return mo;bo=1;var n=he(),e=ne(),r=Fe(),t=xr(),i=Ja(),a=Rl(),s=Cl();return n({target:"Promise",stat:!0,forced:s},{race:function(u){var l=this,h=t.f(l),c=h.reject,v=i(function(){var f=r(l.resolve);a(u,function(g){e(f,l,g).then(h.resolve,c)})});return v.error&&c(v.value),h.promise}}),mo}var xo={},Oo;function Ah(){if(Oo)return xo;Oo=1;var n=he(),e=xr(),r=br().CONSTRUCTOR;return n({target:"Promise",stat:!0,forced:r},{reject:function(i){var a=e.f(this),s=a.reject;return s(i),a.promise}}),xo}var To={},Xi,So;function Ih(){if(So)return Xi;So=1;var n=le(),e=pe(),r=xr();return Xi=function(t,i){if(n(t),e(i)&&i.constructor===t)return i;var a=r.f(t),s=a.resolve;return s(i),a.promise},Xi}var Eo;function Nh(){if(Eo)return To;Eo=1;var n=he(),e=rr(),r=Me(),t=mr(),i=br().CONSTRUCTOR,a=Ih(),s=e("Promise"),o=r&&!i;return n({target:"Promise",stat:!0,forced:r||i},{resolve:function(l){return a(o&&this===s?t:this,l)}}),To}var Ro;function _h(){return Ro||(Ro=1,Oh(),Ch(),wh(),Ph(),Ah(),Nh()),fn}_h();function Co(n,e,r,t,i,a,s){try{var o=n[a](s),u=o.value}catch(l){return void r(l)}o.done?e(u):Promise.resolve(u).then(t,i)}function Be(n){return function(){var e=this,r=arguments;return new Promise(function(t,i){var a=n.apply(e,r);function s(u){Co(a,t,i,s,o,"next",u)}function o(u){Co(a,t,i,s,o,"throw",u)}s(void 0)})}}var wo={},Po={},Ki,Ao;function qe(){if(Ao)return Ki;Ao=1;var n=Qa(),e=String;return Ki=function(r){if(n(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(r)},Ki}var Qi,Io;function wl(){if(Io)return Qi;Io=1;var n=le();return Qi=function(){var e=n(this),r="";return e.hasIndices&&(r+="d"),e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.unicodeSets&&(r+="v"),e.sticky&&(r+="y"),r},Qi}var Zi,No;function Pl(){if(No)return Zi;No=1;var n=Z(),e=Q(),r=e.RegExp,t=n(function(){var s=r("a","y");return s.lastIndex=2,s.exec("abcd")!==null}),i=t||n(function(){return!r("a","y").sticky}),a=t||n(function(){var s=r("^r","gy");return s.lastIndex=2,s.exec("str")!==null});return Zi={BROKEN_CARET:a,MISSED_STICKY:i,UNSUPPORTED_Y:t},Zi}var Ji={},ea,_o;function Mh(){if(_o)return ea;_o=1;var n=gl(),e=Ka();return ea=Object.keys||function(t){return n(t,e)},ea}var Mo;function qh(){if(Mo)return Ji;Mo=1;var n=we(),e=fl(),r=Ye(),t=le(),i=dr(),a=Mh();return Ji.f=n&&!e?Object.defineProperties:function(o,u){t(o);for(var l=i(u),h=a(u),c=h.length,v=0,f;c>v;)r.f(o,f=h[v++],l[f]);return o},Ji}var ra,qo;function Ur(){if(qo)return ra;qo=1;var n=le(),e=qh(),r=Ka(),t=Ya(),i=xl(),a=qr(),s=Wa(),o=">",u="<",l="prototype",h="script",c=s("IE_PROTO"),v=function(){},f=function(m){return u+h+o+m+u+"/"+h+o},g=function(m){m.write(f("")),m.close();var b=m.parentWindow.Object;return m=null,b},d=function(){var m=a("iframe"),b="java"+h+":",x;return m.style.display="none",i.appendChild(m),m.src=String(b),x=m.contentWindow.document,x.open(),x.write(f("document.F=Object")),x.close(),x.F},p,y=function(){try{p=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&p?g(p):d():g(p);for(var m=r.length;m--;)delete y[l][r[m]];return y()};return t[c]=!0,ra=Object.create||function(b,x){var S;return b!==null?(v[l]=n(b),S=new v,v[l]=null,S[c]=b):S=y(),x===void 0?S:e.f(S,x)},ra}var ta,Do;function Dh(){if(Do)return ta;Do=1;var n=Z(),e=Q(),r=e.RegExp;return ta=n(function(){var t=r(".","s");return!(t.dotAll&&t.test(` +`)&&t.flags==="s")}),ta}var ia,Vo;function Vh(){if(Vo)return ia;Vo=1;var n=Z(),e=Q(),r=e.RegExp;return ia=n(function(){var t=r("(?b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"}),ia}var aa,Lo;function en(){if(Lo)return aa;Lo=1;var n=ne(),e=J(),r=qe(),t=wl(),i=Pl(),a=za(),s=Ur(),o=Lr().get,u=Dh(),l=Vh(),h=a("native-string-replace",String.prototype.replace),c=RegExp.prototype.exec,v=c,f=e("".charAt),g=e("".indexOf),d=e("".replace),p=e("".slice),y=function(){var S=/a/,E=/b*/g;return n(c,S,"a"),n(c,E,"a"),S.lastIndex!==0||E.lastIndex!==0}(),m=i.BROKEN_CARET,b=/()??/.exec("")[1]!==void 0,x=y||b||m||u||l;return x&&(v=function(E){var O=this,P=o(O),_=r(E),A=P.raw,q,I,j,C,w,U,L;if(A)return A.lastIndex=O.lastIndex,q=n(v,A,_),O.lastIndex=A.lastIndex,q;var V=P.groups,M=m&&O.sticky,N=n(t,O),k=O.source,z=0,H=_;if(M&&(N=d(N,"y",""),g(N,"g")===-1&&(N+="g"),H=p(_,O.lastIndex),O.lastIndex>0&&(!O.multiline||O.multiline&&f(_,O.lastIndex-1)!==` +`)&&(k="(?: "+k+")",H=" "+H,z++),I=new RegExp("^(?:"+k+")",N)),b&&(I=new RegExp("^"+k+"$(?!\\s)",N)),y&&(j=O.lastIndex),C=n(c,M?I:O,H),M?C?(C.input=p(C.input,z),C[0]=p(C[0],z),C.index=O.lastIndex,O.lastIndex+=C[0].length):O.lastIndex=0:y&&C&&(O.lastIndex=O.global?C.index+C[0].length:j),b&&C&&C.length>1&&n(h,C[0],I,function(){for(w=1;w=f?u?"":void 0:(g=a(c,v),g<55296||g>56319||v+1===f||(d=a(c,v+1))<56320||d>57343?u?i(c,v):g:u?s(c,v,v+2):(g-55296<<10)+(d-56320)+65536)}};return sa={codeAt:o(!1),charAt:o(!0)},sa}var oa,Fo;function tn(){if(Fo)return oa;Fo=1;var n=kh().charAt;return oa=function(e,r,t){return r+(t?n(e,r).length:1)},oa}var ua,Uo;function jh(){if(Uo)return ua;Uo=1;var n=Q(),e=Z(),r=n.RegExp,t=!e(function(){var i=!0;try{r(".","d")}catch{i=!1}var a={},s="",o=i?"dgimsy":"gimsy",u=function(v,f){Object.defineProperty(a,v,{get:function(){return s+=f,!0}})},l={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(l.hasIndices="d");for(var h in l)u(h,l[h]);var c=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(a);return c!==o||s!==o});return ua={correct:t},ua}var la,Go;function an(){if(Go)return la;Go=1;var n=ne(),e=Ae(),r=Nr(),t=jh(),i=wl(),a=RegExp.prototype;return la=t.correct?function(s){return s.flags}:function(s){return!t.correct&&r(a,s)&&!e(s,"flags")?n(i,s):s.flags},la}var ha,$o;function nn(){if($o)return ha;$o=1;var n=ne(),e=le(),r=re(),t=er(),i=en(),a=TypeError;return ha=function(s,o){var u=s.exec;if(r(u)){var l=n(u,s,o);return l!==null&&e(l),l}if(t(s)==="RegExp")return n(i,s,o);throw new a("RegExp#exec called on incompatible receiver")},ha}var zo;function Bh(){if(zo)return wo;zo=1;var n=ne(),e=J(),r=rn(),t=le(),i=pe(),a=sr(),s=qe(),o=Pe(),u=nr(),l=tn(),h=an(),c=nn(),v=e("".indexOf);return r("match",function(f,g,d){return[function(y){var m=o(this),b=i(y)?u(y,f):void 0;return b?n(b,y,m):new RegExp(y)[f](s(m))},function(p){var y=t(this),m=s(p),b=d(g,y,m);if(b.done)return b.value;var x=s(h(y));if(v(x,"g")===-1)return c(y,m);var S=v(x,"u")!==-1;y.lastIndex=0;for(var E=[],O=0,P;(P=c(y,m))!==null;){var _=s(P[0]);E[O]=_,_===""&&(y.lastIndex=l(m,a(y.lastIndex),S)),O++}return O===0?null:E}]}),wo}Bh();var Ho={},fa,Wo;function Fh(){if(Wo)return fa;Wo=1;var n=J(),e=Mr(),r=Math.floor,t=n("".charAt),i=n("".replace),a=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,o=/\$([$&'`]|\d{1,2})/g;return fa=function(u,l,h,c,v,f){var g=h+u.length,d=c.length,p=o;return v!==void 0&&(v=e(v),p=s),i(f,p,function(y,m){var b;switch(t(m,0)){case"$":return"$";case"&":return u;case"`":return a(l,0,h);case"'":return a(l,g);case"<":b=v[a(m,1,-1)];break;default:var x=+m;if(x===0)return y;if(x>d){var S=r(x/10);return S===0?y:S<=d?c[S-1]===void 0?t(m,1):c[S-1]+t(m,1):y}b=c[x-1]}return b===void 0?"":b})},fa}var Yo;function Uh(){if(Yo)return Ho;Yo=1;var n=bl(),e=ne(),r=J(),t=rn(),i=Z(),a=le(),s=re(),o=pe(),u=kr(),l=sr(),h=qe(),c=Pe(),v=tn(),f=nr(),g=Fh(),d=an(),p=nn(),y=ae(),m=y("replace"),b=Math.max,x=Math.min,S=r([].concat),E=r([].push),O=r("".indexOf),P=r("".slice),_=function(j){return j===void 0?j:String(j)},A=function(){return"a".replace(/./,"$0")==="$0"}(),q=function(){return/./[m]?/./[m]("a","$0")==="":!1}(),I=!i(function(){var j=/./;return j.exec=function(){var C=[];return C.groups={a:"7"},C},"".replace(j,"$")!=="7"});return t("replace",function(j,C,w){var U=q?"$":"$0";return[function(V,M){var N=c(this),k=o(V)?f(V,m):void 0;return k?e(k,V,N,M):e(C,h(N),V,M)},function(L,V){var M=a(this),N=h(L);if(typeof V=="string"&&O(V,U)===-1&&O(V,"$<")===-1){var k=w(C,M,N,V);if(k.done)return k.value}var z=s(V);z||(V=h(V));var H=h(d(M)),X=O(H,"g")!==-1,se;X&&(se=O(H,"u")!==-1,M.lastIndex=0);for(var be=[],oe;oe=p(M,N),!(oe===null||(E(be,oe),!X));){var Ue=h(oe[0]);Ue===""&&(M.lastIndex=v(N,l(M.lastIndex),se))}for(var Ge="",fe=0,Ne=0;Ne=fe&&(Ge+=P(N,fe,me)+xe,fe=me+_e.length)}return Ge+P(N,fe)}]},!I||!A||q),Ho}Uh();var Xo={},ca,Ko;function Gh(){if(Ko)return ca;Ko=1;var n=pe(),e=er(),r=ae(),t=r("match");return ca=function(i){var a;return n(i)&&((a=i[t])!==void 0?!!a:e(i)==="RegExp")},ca}var va,Qo;function sn(){if(Qo)return va;Qo=1;var n=Gh(),e=TypeError;return va=function(r){if(n(r))throw new e("The method doesn't accept regular expressions");return r},va}var ga,Zo;function on(){if(Zo)return ga;Zo=1;var n=ae(),e=n("match");return ga=function(r){var t=/./;try{"/./"[r](t)}catch{try{return t[e]=!1,"/./"[r](t)}catch{}}return!1},ga}var Jo;function $h(){if(Jo)return Xo;Jo=1;var n=he(),e=Fr(),r=Dr().f,t=sr(),i=qe(),a=sn(),s=Pe(),o=on(),u=Me(),l=e("".slice),h=Math.min,c=o("startsWith"),v=!u&&!c&&!!function(){var f=r(String.prototype,"startsWith");return f&&!f.writable}();return n({target:"String",proto:!0,forced:!v&&!c},{startsWith:function(g){var d=i(s(this));a(g);var p=t(h(arguments.length>1?arguments[1]:void 0,d.length)),y=i(g);return l(d,p,p+y.length)===y}}),Xo}$h();var da,eu;function zh(){if(eu)return da;eu=1;var n=ae(),e=Ur(),r=Ye().f,t=n("unscopables"),i=Array.prototype;return i[t]===void 0&&r(i,t,{configurable:!0,value:e(null)}),da=function(a){i[t][a]=!0},da}var pa,ru;function Hh(){if(ru)return pa;ru=1;var n=Z();return pa=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),pa}var ya,tu;function Al(){if(tu)return ya;tu=1;var n=Ae(),e=re(),r=Mr(),t=Wa(),i=Hh(),a=t("IE_PROTO"),s=Object,o=s.prototype;return ya=i?s.getPrototypeOf:function(u){var l=r(u);if(n(l,a))return l[a];var h=l.constructor;return e(h)&&l instanceof h?h.prototype:l instanceof s?o:null},ya}var ma,iu;function Il(){if(iu)return ma;iu=1;var n=Z(),e=re(),r=pe(),t=Ur(),i=Al(),a=tr(),s=ae(),o=Me(),u=s("iterator"),l=!1,h,c,v;[].keys&&(v=[].keys(),"next"in v?(c=i(i(v)),c!==Object.prototype&&(h=c)):l=!0);var f=!r(h)||n(function(){var g={};return h[u].call(g)!==g});return f?h={}:o&&(h=t(h)),e(h[u])||a(h,u,function(){return this}),ma={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:l},ma}var ba,au;function Wh(){if(au)return ba;au=1;var n=Il().IteratorPrototype,e=Ur(),r=Fa(),t=Br(),i=Or(),a=function(){return this};return ba=function(s,o,u,l){var h=o+" Iterator";return s.prototype=e(n,{next:r(+!l,u)}),t(s,h,!1,!0),i[h]=a,s},ba}var xa,nu;function Yh(){if(nu)return xa;nu=1;var n=he(),e=ne(),r=Me(),t=Vr(),i=re(),a=Wh(),s=Al(),o=yl(),u=Br(),l=yr(),h=tr(),c=ae(),v=Or(),f=Il(),g=t.PROPER,d=t.CONFIGURABLE,p=f.IteratorPrototype,y=f.BUGGY_SAFARI_ITERATORS,m=c("iterator"),b="keys",x="values",S="entries",E=function(){return this};return xa=function(O,P,_,A,q,I,j){a(_,P,A);var C=function(X){if(X===q&&M)return M;if(!y&&X&&X in L)return L[X];switch(X){case b:return function(){return new _(this,X)};case x:return function(){return new _(this,X)};case S:return function(){return new _(this,X)}}return function(){return new _(this)}},w=P+" Iterator",U=!1,L=O.prototype,V=L[m]||L["@@iterator"]||q&&L[q],M=!y&&V||C(q),N=P==="Array"&&L.entries||V,k,z,H;if(N&&(k=s(N.call(new O)),k!==Object.prototype&&k.next&&(!r&&s(k)!==p&&(o?o(k,p):i(k[m])||h(k,m,E)),u(k,w,!0,!0),r&&(v[w]=E))),g&&q===x&&V&&V.name!==x&&(!r&&d?l(L,"name",x):(U=!0,M=function(){return e(V,this)})),q)if(z={values:C(x),keys:I?M:C(b),entries:C(S)},j)for(H in z)(y||U||!(H in L))&&h(L,H,z[H]);else n({target:P,proto:!0,forced:y||U},z);return(!r||j)&&L[m]!==M&&h(L,m,M,{name:q}),v[P]=M,z},xa}var Oa,su;function Xh(){return su||(su=1,Oa=function(n,e){return{value:n,done:e}}),Oa}var Ta,ou;function Nl(){if(ou)return Ta;ou=1;var n=dr(),e=zh(),r=Or(),t=Lr(),i=Ye().f,a=Yh(),s=Xh(),o=Me(),u=we(),l="Array Iterator",h=t.set,c=t.getterFor(l);Ta=a(Array,"Array",function(f,g){h(this,{type:l,target:n(f),index:0,kind:g})},function(){var f=c(this),g=f.target,d=f.index++;if(!g||d>=g.length)return f.target=null,s(void 0,!0);switch(f.kind){case"keys":return s(d,!1);case"values":return s(g[d],!1)}return s([d,g[d]],!1)},"values");var v=r.Arguments=r.Array;if(e("keys"),e("values"),e("entries"),!o&&u&&v.name!=="values")try{i(v,"name",{value:"values"})}catch{}return Ta}Nl();var uu={},Sa,lu;function Kh(){return lu||(lu=1,Sa={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}),Sa}var Ea,hu;function Qh(){if(hu)return Ea;hu=1;var n=qr(),e=n("span").classList,r=e&&e.constructor&&e.constructor.prototype;return Ea=r===Object.prototype?void 0:r,Ea}var fu;function Zh(){if(fu)return uu;fu=1;var n=Q(),e=Kh(),r=Qh(),t=Nl(),i=yr(),a=Br(),s=ae(),o=s("iterator"),u=t.values,l=function(c,v){if(c){if(c[o]!==u)try{i(c,o,u)}catch{c[o]=u}if(a(c,v,!0),e[v]){for(var f in t)if(c[f]!==t[f])try{i(c,f,t[f])}catch{c[f]=t[f]}}}};for(var h in e)l(n[h]&&n[h].prototype,h);return l(r,"DOMTokenList"),uu}Zh();function Jh(n,e){if(Va(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var t=r.call(n,e);if(Va(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ef(n){var e=Jh(n,"string");return Va(e)=="symbol"?e:e+""}function un(n,e,r){return(e=ef(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var cu={},Ra,vu;function rf(){if(vu)return Ra;vu=1;var n=Fe(),e=Mr(),r=al(),t=Xa(),i=TypeError,a="Reduce of empty array with no initial value",s=function(o){return function(u,l,h,c){var v=e(u),f=r(v),g=t(v);if(n(l),g===0&&h<2)throw new i(a);var d=o?g-1:0,p=o?-1:1;if(h<2)for(;;){if(d in f){c=f[d],d+=p;break}if(d+=p,o?d<0:g<=d)throw new i(a)}for(;o?d>=0:g>d;d+=p)d in f&&(c=l(c,f[d],d,v));return c}};return Ra={left:s(!1),right:s(!0)},Ra}var Ca,gu;function _l(){if(gu)return Ca;gu=1;var n=Z();return Ca=function(e,r){var t=[][e];return!!t&&n(function(){t.call(null,r||function(){return 1},1)})},Ca}var du;function tf(){if(du)return cu;du=1;var n=he(),e=rf().left,r=_l(),t=Ua(),i=jr(),a=!i&&t>79&&t<83,s=a||!r("reduce");return n({target:"Array",proto:!0,forced:s},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),cu}tf();var pu={},yu;function af(){if(yu)return pu;yu=1;var n=he(),e=Fr(),r=Dr().f,t=sr(),i=qe(),a=sn(),s=Pe(),o=on(),u=Me(),l=e("".slice),h=Math.min,c=o("endsWith"),v=!u&&!c&&!!function(){var f=r(String.prototype,"endsWith");return f&&!f.writable}();return n({target:"String",proto:!0,forced:!v&&!c},{endsWith:function(g){var d=i(s(this));a(g);var p=arguments.length>1?arguments[1]:void 0,y=d.length,m=p===void 0?y:h(t(p),y),b=i(g);return l(d,m-b.length,m)===b}}),pu}af();var mu={},bu;function nf(){if(bu)return mu;bu=1;var n=ne(),e=J(),r=rn(),t=le(),i=pe(),a=Pe(),s=ml(),o=tn(),u=sr(),l=qe(),h=nr(),c=nn(),v=Pl(),f=Z(),g=v.UNSUPPORTED_Y,d=4294967295,p=Math.min,y=e([].push),m=e("".slice),b=!f(function(){var S=/(?:)/,E=S.exec;S.exec=function(){return E.apply(this,arguments)};var O="ab".split(S);return O.length!==2||O[0]!=="a"||O[1]!=="b"}),x="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;return r("split",function(S,E,O){var P="0".split(void 0,0).length?function(_,A){return _===void 0&&A===0?[]:n(E,this,_,A)}:E;return[function(A,q){var I=a(this),j=i(A)?h(A,S):void 0;return j?n(j,A,I,q):n(P,l(I),A,q)},function(_,A){var q=t(this),I=l(_);if(!x){var j=O(P,q,I,A,P!==E);if(j.done)return j.value}var C=s(q,RegExp),w=q.unicode,U=(q.ignoreCase?"i":"")+(q.multiline?"m":"")+(q.unicode?"u":"")+(g?"g":"y"),L=new C(g?"^(?:"+q.source+")":q,U),V=A===void 0?d:A>>>0;if(V===0)return[];if(I.length===0)return c(L,I)===null?[I]:[];for(var M=0,N=0,k=[];N"u"?Da:window,r=["moz","webkit"],t="AnimationFrame",i=e["request"+t],a=e["cancel"+t]||e["cancelRequest"+t],s=0;!i&&s3&&(this.alpha=o[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 "+d.toRGB()+" -> "+d.toHex());g.appendChild(p),g.appendChild(y),f.appendChild(g)}catch{}return f}}),Na}var gf=vf();const La=il(gf);var Pu={},Au;function df(){if(Au)return Pu;Au=1;var n=he(),e=Fr(),r=vl().indexOf,t=_l(),i=e([].indexOf),a=!!i&&1/i([1],1,-0)<0,s=a||!t("indexOf");return n({target:"Array",proto:!0,forced:s},{indexOf:function(u){var l=arguments.length>1?arguments[1]:void 0;return a?i(this,u,l)||0:r(this,u,l)}}),Pu}df();var Iu={},Nu;function pf(){if(Nu)return Iu;Nu=1;var n=he(),e=J(),r=sn(),t=Pe(),i=qe(),a=on(),s=e("".indexOf);return n({target:"String",proto:!0,forced:!a("includes")},{includes:function(u){return!!~s(i(t(this)),i(r(u)),arguments.length>1?arguments[1]:void 0)}}),Iu}pf();var _u={},_a,Mu;function yf(){if(Mu)return _a;Mu=1;var n=er();return _a=Array.isArray||function(r){return n(r)==="Array"},_a}var qu;function mf(){if(qu)return _u;qu=1;var n=he(),e=J(),r=yf(),t=e([].reverse),i=[1,2];return n({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),t(this)}}),_u}mf();/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var ql=function(n,e){return(ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])})(n,e)};function Dl(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}ql(n,e),n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function bf(n){var e="";Array.isArray(n)||(n=[n]);for(var r=0;rn.phi1&&(n.phi2-=2*ze),n.sweepFlag===1&&n.phi2t)return[];if(t===0)return[[n*r/(n*n+e*e),e*r/(n*n+e*e)]];var i=Math.sqrt(t);return[[(n*r+e*i)/(n*n+e*e),(e*r-n*i)/(n*n+e*e)],[(n*r-e*i)/(n*n+e*e),(e*r+n*i)/(n*n+e*e)]]}var ie,ke=Math.PI/180;function Vu(n,e,r){return(1-r)*n+r*e}function Lu(n,e,r,t){return n+Math.cos(t/180*ze)*e+Math.sin(t/180*ze)*r}function ku(n,e,r,t){var i=1e-6,a=e-n,s=r-e,o=3*a+3*(t-r)-6*s,u=6*(s-a),l=3*a;return Math.abs(o)O&&(f.sweepFlag=+!f.sweepFlag),f})}function s(){return function(o){var u={};for(var l in o)u[l]=o[l];return u}}n.ROUND=function(o){function u(l){return Math.round(l*o)/o}return o===void 0&&(o=1e13),Ce(o),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}},n.TO_ABS=e,n.TO_REL=function(){return i(function(o,u,l){return o.relative||(o.x1!==void 0&&(o.x1-=u),o.y1!==void 0&&(o.y1-=l),o.x2!==void 0&&(o.x2-=u),o.y2!==void 0&&(o.y2-=l),o.x!==void 0&&(o.x-=u),o.y!==void 0&&(o.y-=l),o.relative=!0),o})},n.NORMALIZE_HVZ=function(o,u,l){return o===void 0&&(o=!0),u===void 0&&(u=!0),l===void 0&&(l=!0),i(function(h,c,v,f,g){if(isNaN(f)&&!(h.type&T.MOVE_TO))throw new Error("path must start with moveto");return u&&h.type&T.HORIZ_LINE_TO&&(h.type=T.LINE_TO,h.y=h.relative?0:v),l&&h.type&T.VERT_LINE_TO&&(h.type=T.LINE_TO,h.x=h.relative?0:c),o&&h.type&T.CLOSE_PATH&&(h.type=T.LINE_TO,h.x=h.relative?f-c:f,h.y=h.relative?g-v:g),h.type&T.ARC&&(h.rX===0||h.rY===0)&&(h.type=T.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h})},n.NORMALIZE_ST=r,n.QT_TO_C=t,n.INFO=i,n.SANITIZE=function(o){o===void 0&&(o=0),Ce(o);var u=NaN,l=NaN,h=NaN,c=NaN;return i(function(v,f,g,d,p){var y=Math.abs,m=!1,b=0,x=0;if(v.type&T.SMOOTH_CURVE_TO&&(b=isNaN(u)?0:f-u,x=isNaN(l)?0:g-l),v.type&(T.CURVE_TO|T.SMOOTH_CURVE_TO)?(u=v.relative?f+v.x2:v.x2,l=v.relative?g+v.y2:v.y2):(u=NaN,l=NaN),v.type&T.SMOOTH_QUAD_TO?(h=isNaN(h)?f:2*f-h,c=isNaN(c)?g:2*g-c):v.type&T.QUAD_TO?(h=v.relative?f+v.x1:v.x1,c=v.relative?g+v.y1:v.y2):(h=NaN,c=NaN),v.type&T.LINE_COMMANDS||v.type&T.ARC&&(v.rX===0||v.rY===0||!v.lArcFlag)||v.type&T.CURVE_TO||v.type&T.SMOOTH_CURVE_TO||v.type&T.QUAD_TO||v.type&T.SMOOTH_QUAD_TO){var S=v.x===void 0?0:v.relative?v.x:v.x-f,E=v.y===void 0?0:v.relative?v.y:v.y-g;b=isNaN(h)?v.x1===void 0?b:v.relative?v.x:v.x1-f:h-f,x=isNaN(c)?v.y1===void 0?x:v.relative?v.y:v.y1-g:c-g;var O=v.x2===void 0?0:v.relative?v.x:v.x2-f,P=v.y2===void 0?0:v.relative?v.y:v.y2-g;y(S)<=o&&y(E)<=o&&y(b)<=o&&y(x)<=o&&y(O)<=o&&y(P)<=o&&(m=!0)}return v.type&T.CLOSE_PATH&&y(f-d)<=o&&y(g-p)<=o&&(m=!0),m?[]:v})},n.MATRIX=a,n.ROTATE=function(o,u,l){u===void 0&&(u=0),l===void 0&&(l=0),Ce(o,u,l);var h=Math.sin(o),c=Math.cos(o);return a(c,h,-h,c,u-u*c+l*h,l-u*h-l*c)},n.TRANSLATE=function(o,u){return u===void 0&&(u=0),Ce(o,u),a(1,0,0,1,o,u)},n.SCALE=function(o,u){return u===void 0&&(u=o),Ce(o,u),a(o,0,0,u,0,0)},n.SKEW_X=function(o){return Ce(o),a(1,0,Math.atan(o),1,0,0)},n.SKEW_Y=function(o){return Ce(o),a(1,Math.atan(o),0,1,0,0)},n.X_AXIS_SYMMETRY=function(o){return o===void 0&&(o=0),Ce(o),a(-1,0,0,1,o,0)},n.Y_AXIS_SYMMETRY=function(o){return o===void 0&&(o=0),Ce(o),a(1,0,0,-1,0,o)},n.A_TO_C=function(){return i(function(o,u,l){return T.ARC===o.type?function(h,c,v){var f,g,d,p;h.cX||Ma(h,c,v);for(var y=Math.min(h.phi1,h.phi2),m=Math.max(h.phi1,h.phi2)-y,b=Math.ceil(m/90),x=new Array(b),S=c,E=v,O=0;Oc.maxX&&(c.maxX=N),Nc.maxY&&(c.maxY=N),NM&&p(ju(f,d.x1,d.x2,d.x,M));for(var x=0,S=ku(g,d.y1,d.y2,d.y);xM&&y(ju(g,d.y1,d.y2,d.y,M))}if(d.type&T.ARC){p(d.x),y(d.y),Ma(d,f,g);for(var E=d.xRot/180*Math.PI,O=Math.cos(E)*d.rX,P=Math.sin(E)*d.rX,_=-Math.sin(E)*d.rY,A=Math.cos(E)*d.rY,q=d.phi1d.phi2?[d.phi2+360,d.phi1+360]:[d.phi2,d.phi1],I=q[0],j=q[1],C=function(N){var k=N[0],z=N[1],H=180*Math.atan2(z,k)/Math.PI;return HI&&MI&&Mh)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+s+'"')}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 "'+s+'"')}this.curArgs.push(h),this.curArgs.length===Tf[this.curCommandType]&&(T.HORIZ_LINE_TO===this.curCommandType?a({type:T.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):T.VERT_LINE_TO===this.curCommandType?a({type:T.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===T.MOVE_TO||this.curCommandType===T.LINE_TO||this.curCommandType===T.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),T.MOVE_TO===this.curCommandType&&(this.curCommandType=T.LINE_TO)):this.curCommandType===T.CURVE_TO?a({type:T.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===T.SMOOTH_CURVE_TO?a({type:T.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===T.QUAD_TO?a({type:T.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===T.ARC&&a({type:T.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(!xf(o))if(o===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(o!=="+"&&o!=="-"&&o!==".")if(l)this.curNumber=o,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+s+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+o+'" at index '+s+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,o!=="z"&&o!=="Z")if(o==="h"||o==="H")this.curCommandType=T.HORIZ_LINE_TO,this.curCommandRelative=o==="h";else if(o==="v"||o==="V")this.curCommandType=T.VERT_LINE_TO,this.curCommandRelative=o==="v";else if(o==="m"||o==="M")this.curCommandType=T.MOVE_TO,this.curCommandRelative=o==="m";else if(o==="l"||o==="L")this.curCommandType=T.LINE_TO,this.curCommandRelative=o==="l";else if(o==="c"||o==="C")this.curCommandType=T.CURVE_TO,this.curCommandRelative=o==="c";else if(o==="s"||o==="S")this.curCommandType=T.SMOOTH_CURVE_TO,this.curCommandRelative=o==="s";else if(o==="q"||o==="Q")this.curCommandType=T.QUAD_TO,this.curCommandRelative=o==="q";else if(o==="t"||o==="T")this.curCommandType=T.SMOOTH_QUAD_TO,this.curCommandRelative=o==="t";else{if(o!=="a"&&o!=="A")throw new SyntaxError('Unexpected character "'+o+'" at index '+s+".");this.curCommandType=T.ARC,this.curCommandRelative=o==="a"}else t.push({type:T.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=o,this.curNumberHasDecimal=o==="."}else this.curNumber+=o,this.curNumberHasDecimal=!0;else this.curNumber+=o;else this.curNumber+=o,this.curNumberHasExp=!0;else this.curNumber+=o,this.curNumberHasExpDigits=this.curNumberHasExp}return t},e.prototype.transform=function(r){return Object.create(this,{parse:{value:function(t,i){i===void 0&&(i=[]);for(var a=0,s=Object.getPrototypeOf(this).parse.call(this,t);a>>S;if(s[b+3]=_e,_e!==0){var me=255/_e;s[b]=(N*x>>>S)*me,s[b+1]=(k*x>>>S)*me,s[b+2]=(z*x>>>S)*me}else s[b]=s[b+1]=s[b+2]=0;N-=U,k-=L,z-=V,H-=M,U-=p.r,L-=p.g,V-=p.b,M-=p.a;var ce=Ne+a+1;ce=m+(ce>>S,R>0?(R=255/R,s[de]=(Te*x>>>S)*R,s[de+1]=(Le*x>>>S)*R,s[de+2]=(Se*x>>>S)*R):s[de]=s[de+1]=s[de+2]=0,Te-=B,Le-=G,Se-=$,Ee-=W,B-=p.r,G-=p.g,$-=p.b,W-=p.a,de=$e+((de=Kr+h)0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:n,createCanvas(r,t){return new OffscreenCanvas(r,t)},createImage(r){return Be(function*(){var t=yield fetch(r),i=yield t.blob(),a=yield createImageBitmap(i);return a})()}};return(typeof DOMParser<"u"||typeof n>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function Nf(n){var{DOMParser:e,canvas:r,fetch:t}=n;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:t,createCanvas:r.createCanvas,createImage:r.loadImage}}var Gc=Object.freeze({__proto__:null,offscreen:If,node:Nf});function or(n){return n.replace(/(?!\u3000)\s+/gm," ")}function _f(n){return n.replace(/^[\n \t]+/,"")}function Mf(n){return n.replace(/[\n \t]+$/,"")}function ye(n){var e=(n||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var qf=/^[A-Z-]+$/;function Df(n){return qf.test(n)?n.toLowerCase():n}function Ll(n){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(n)||[];return e[2]||e[3]||e[4]}function Vf(n){if(!n.startsWith("rgb"))return n;var e=3,r=n.replace(/\d+(\.\d+)?/g,(t,i)=>e--&&i?String(Math.round(parseFloat(t))):t);return r}var Lf=/(\[[^\]]+\])/g,kf=/(#[^\s+>~.[:]+)/g,jf=/(\.[^\s+>~.[:]+)/g,Bf=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,Ff=/(:[\w-]+\([^)]*\))/gi,Uf=/(:[^\s+>~.[:]+)/g,Gf=/([^\s+>~.[:]+)/g;function Ke(n,e){var r=e.exec(n);return r?[n.replace(e," "),r.length]:[n,0]}function $f(n){var e=[0,0,0],r=n.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),t=0;return[r,t]=Ke(r,Lf),e[1]+=t,[r,t]=Ke(r,kf),e[0]+=t,[r,t]=Ke(r,jf),e[1]+=t,[r,t]=Ke(r,Bf),e[2]+=t,[r,t]=Ke(r,Ff),e[1]+=t,[r,t]=Ke(r,Uf),e[1]+=t,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,t]=Ke(r,Gf),e[2]+=t,e.join("")}var ar=1e-8;function $u(n){return Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2))}function ja(n,e){return(n[0]*e[0]+n[1]*e[1])/($u(n)*$u(e))}function zu(n,e){return(n[0]*e[1]0&&arguments[0]!==void 0?arguments[0]:" ",{document:r,name:t}=this;return or(this.getString()).trim().split(e).map(i=>new D(r,t,i))}hasValue(e){var{value:r}=this;return r!==null&&r!==""&&(e||r!==0)&&typeof r<"u"}isString(e){var{value:r}=this,t=typeof r=="string";return!t||!e?t:e.test(r)}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:r}=this,t=parseFloat(r);return this.isString(/%$/)&&(t/=100),t}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var r=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=Vf(r),this.value=r),r}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[t,i]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:a}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.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()*a.computeSize(t);default:{var s=this.getNumber();return r&&s<1?s*a.computeSize(t):s}}}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(),r=/#([^)'"]+)/.exec(e);return r&&(r=r[1]),r||(r=e),this.document.definitions[r]}getFillStyleDefinition(e,r){var t=this.getDefinition();if(!t)return null;if(typeof t.createGradient=="function")return t.createGradient(this.document.ctx,e,r);if(typeof t.createPattern=="function"){if(t.getHrefAttribute().hasValue()){var i=t.getAttribute("patternTransform");t=t.getHrefAttribute().getDefinition(),i.hasValue()&&t.getAttribute("patternTransform",!0).setValue(i.value)}return t.createPattern(this.document.ctx,e,r)}return null}getTextBaseline(){return this.hasValue()?D.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var r=this.getColor(),t=r.length,i=0,a=0;a1&&arguments[1]!==void 0?arguments[1]:0,[t=r,i=r]=ye(e);return new ee(t,i)}static parseScale(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[t=r,i=t]=ye(e);return new ee(t,i)}static parsePath(e){for(var r=ye(e),t=r.length,i=[],a=0;a0}runEvents(){if(this.working){var{screen:e,events:r,eventElements:t}=this,{style:i}=e.ctx.canvas;i&&(i.cursor=""),r.forEach((a,s)=>{for(var{run:o}=a,u=t[s];u;)o(u),u=u.parent}),this.events=[],this.eventElements=[]}}checkPath(e,r){if(!(!this.working||!r)){var{events:t,eventElements:i}=this;t.forEach((a,s)=>{var{x:o,y:u}=a;!i[s]&&r.isPointInPath&&r.isPointInPath(o,u)&&(i[s]=e)})}}checkBoundingBox(e,r){if(!(!this.working||!r)){var{events:t,eventElements:i}=this;t.forEach((a,s)=>{var{x:o,y:u}=a;!i[s]&&r.isPointInBox(o,u)&&(i[s]=e)})}}mapXY(e,r){for(var{window:t,ctx:i}=this.screen,a=new ee(e,r),s=i.canvas;s;)a.x-=s.offsetLeft,a.y-=s.offsetTop,s=s.offsetParent;return t.scrollX&&(a.x+=t.scrollX),t.scrollY&&(a.y+=t.scrollY),a}onClick(e){var{x:r,y:t}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:r,y:t,run(i){i.onClick&&i.onClick()}})}onMouseMove(e){var{x:r,y:t}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:r,y:t,run(i){i.onMouseMove&&i.onMouseMove()}})}}var kl=typeof window<"u"?window:null,jl=typeof fetch<"u"?fetch.bind(void 0):null;class Gr{constructor(e){var{fetch:r=jl,window:t=kl}=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 zf,this.mouse=new Hf(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=t,this.fetch=r}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(r=>r());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:r,ctx:t,aspectRatio:i,width:a,desiredWidth:s,height:o,desiredHeight:u,minX:l=0,minY:h=0,refX:c,refY:v,clip:f=!1,clipX:g=0,clipY:d=0}=e,p=or(i).replace(/^defer\s/,""),[y,m]=p.split(" "),b=y||"xMidYMid",x=m||"meet",S=a/s,E=o/u,O=Math.min(S,E),P=Math.max(S,E),_=s,A=u;x==="meet"&&(_*=O,A*=O),x==="slice"&&(_*=P,A*=P);var q=new D(r,"refX",c),I=new D(r,"refY",v),j=q.hasValue()&&I.hasValue();if(j&&t.translate(-O*q.getPixels("x"),-O*I.getPixels("y")),f){var C=O*g,w=O*d;t.beginPath(),t.moveTo(C,w),t.lineTo(a,w),t.lineTo(a,o),t.lineTo(C,o),t.closePath(),t.clip()}if(!j){var U=x==="meet"&&O===E,L=x==="slice"&&P===E,V=x==="meet"&&O===S,M=x==="slice"&&P===S;b.startsWith("xMid")&&(U||L)&&t.translate(a/2-_/2,0),b.endsWith("YMid")&&(V||M)&&t.translate(0,o/2-A/2),b.startsWith("xMax")&&(U||L)&&t.translate(a-_,0),b.endsWith("YMax")&&(V||M)&&t.translate(0,o-A)}switch(!0){case b==="none":t.scale(S,E);break;case x==="meet":t.scale(O,O);break;case x==="slice":t.scale(P,P);break}t.translate(-l,-h)}start(e){var{enableRedraw:r=!1,ignoreMouse:t=!1,ignoreAnimation:i=!1,ignoreDimensions:a=!1,ignoreClear:s=!1,forceRedraw:o,scaleWidth:u,scaleHeight:l,offsetX:h,offsetY:c}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:v,mouse:f}=this,g=1e3/v;if(this.frameDuration=g,this.readyPromise=new Promise(b=>{this.resolveReady=b}),this.isReady()&&this.render(e,a,s,u,l,h,c),!!r){var d=Date.now(),p=d,y=0,m=()=>{d=Date.now(),y=d-p,y>=g&&(p=d-y%g,this.shouldUpdate(i,o)&&(this.render(e,a,s,u,l,h,c),f.runEvents())),this.intervalId=wa(m)};t||f.start(),this.intervalId=wa(m)}}stop(){this.intervalId&&(wa.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,r){if(!e){var{frameDuration:t}=this,i=this.animations.reduce((a,s)=>s.update(t)||a,!1);if(i)return!0}return!!(typeof r=="function"&&r()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,r,t,i,a,s,o){var{CLIENT_WIDTH:u,CLIENT_HEIGHT:l,viewPort:h,ctx:c,isFirstRender:v}=this,f=c.canvas;h.clear(),f.width&&f.height?h.setCurrent(f.width,f.height):h.setCurrent(u,l);var g=e.getStyle("width"),d=e.getStyle("height");!r&&(v||typeof i!="number"&&typeof a!="number")&&(g.hasValue()&&(f.width=g.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),d.hasValue()&&(f.height=d.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var p=f.clientWidth||f.width,y=f.clientHeight||f.height;if(r&&g.hasValue()&&d.hasValue()&&(p=g.getPixels("x"),y=d.getPixels("y")),h.setCurrent(p,y),typeof s=="number"&&e.getAttribute("x",!0).setValue(s),typeof o=="number"&&e.getAttribute("y",!0).setValue(o),typeof i=="number"||typeof a=="number"){var m=ye(e.getAttribute("viewBox").getString()),b=0,x=0;if(typeof i=="number"){var S=e.getStyle("width");S.hasValue()?b=S.getPixels("x")/i:isNaN(m[2])||(b=m[2]/i)}if(typeof a=="number"){var E=e.getStyle("height");E.hasValue()?x=E.getPixels("y")/a:isNaN(m[3])||(x=m[3]/a)}b||(b=x),x||(x=b),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(a);var O=e.getStyle("transform",!0,!0);O.setValue("".concat(O.getString()," scale(").concat(1/b,", ").concat(1/x,")"))}t||c.clearRect(0,0,p,y),e.render(c),v&&(this.isFirstRender=!1)}}Gr.defaultWindow=kl;Gr.defaultFetch=jl;var{defaultFetch:Wf}=Gr,Yf=typeof DOMParser<"u"?DOMParser:null;class qa{constructor(){var{fetch:e=Wf,DOMParser:r=Yf}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=r}parse(e){var r=this;return Be(function*(){return e.startsWith("<")?r.parseFromString(e):r.load(e)})()}parseFromString(e){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(r.parseFromString(e,"text/xml"))}}checkDocument(e){var r=e.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return e}load(e){var r=this;return Be(function*(){var t=yield r.fetch(e),i=yield t.text();return r.parseFromString(i)})()}}class Xf{constructor(e,r){this.type="translate",this.point=null,this.point=ee.parse(r)}apply(e){var{x:r,y:t}=this.point;e.translate(r||0,t||0)}unapply(e){var{x:r,y:t}=this.point;e.translate(-1*r||0,-1*t||0)}applyToPoint(e){var{x:r,y:t}=this.point;e.applyTransform([1,0,0,1,r||0,t||0])}}class Kf{constructor(e,r,t){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=ye(r);this.angle=new D(e,"angle",i[0]),this.originX=t[0],this.originY=t[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(e){var{cx:r,cy:t,originX:i,originY:a,angle:s}=this,o=r+i.getPixels("x"),u=t+a.getPixels("y");e.translate(o,u),e.rotate(s.getRadians()),e.translate(-o,-u)}unapply(e){var{cx:r,cy:t,originX:i,originY:a,angle:s}=this,o=r+i.getPixels("x"),u=t+a.getPixels("y");e.translate(o,u),e.rotate(-1*s.getRadians()),e.translate(-o,-u)}applyToPoint(e){var{cx:r,cy:t,angle:i}=this,a=i.getRadians();e.applyTransform([1,0,0,1,r||0,t||0]),e.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]),e.applyTransform([1,0,0,1,-r||0,-t||0])}}class Qf{constructor(e,r,t){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=ee.parseScale(r);(i.x===0||i.y===0)&&(i.x=ar,i.y=ar),this.scale=i,this.originX=t[0],this.originY=t[1]}apply(e){var{scale:{x:r,y:t},originX:i,originY:a}=this,s=i.getPixels("x"),o=a.getPixels("y");e.translate(s,o),e.scale(r,t||r),e.translate(-s,-o)}unapply(e){var{scale:{x:r,y:t},originX:i,originY:a}=this,s=i.getPixels("x"),o=a.getPixels("y");e.translate(s,o),e.scale(1/r,1/t||r),e.translate(-s,-o)}applyToPoint(e){var{x:r,y:t}=this.scale;e.applyTransform([r||0,0,0,t||0,0,0])}}class Bl{constructor(e,r,t){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ye(r),this.originX=t[0],this.originY=t[1]}apply(e){var{originX:r,originY:t,matrix:i}=this,a=r.getPixels("x"),s=t.getPixels("y");e.translate(a,s),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-a,-s)}unapply(e){var{originX:r,originY:t,matrix:i}=this,a=i[0],s=i[2],o=i[4],u=i[1],l=i[3],h=i[5],c=0,v=0,f=1,g=1/(a*(l*f-h*v)-s*(u*f-h*c)+o*(u*v-l*c)),d=r.getPixels("x"),p=t.getPixels("y");e.translate(d,p),e.transform(g*(l*f-h*v),g*(h*c-u*f),g*(o*v-s*f),g*(a*f-o*c),g*(s*h-o*l),g*(o*u-a*h)),e.translate(-d,-p)}applyToPoint(e){e.applyTransform(this.matrix)}}class Fl extends Bl{constructor(e,r,t){super(e,r,t),this.type="skew",this.angle=null,this.angle=new D(e,"angle",r)}}class Zf extends Fl{constructor(e,r,t){super(e,r,t),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Jf extends Fl{constructor(e,r,t){super(e,r,t),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function ec(n){return or(n).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function rc(n){var[e,r]=n.split("(");return[e.trim(),r.trim().replace(")","")]}class Je{constructor(e,r,t){this.document=e,this.transforms=[];var i=ec(r);i.forEach(a=>{if(a!=="none"){var[s,o]=rc(a),u=Je.transformTypes[s];typeof u<"u"&&this.transforms.push(new u(this.document,o,t))}})}static fromElement(e,r){var t=r.getStyle("transform",!1,!0),[i,a=i]=r.getStyle("transform-origin",!1,!0).split(),s=[i,a];return t.hasValue()?new Je(e,t.getString(),s):null}apply(e){for(var{transforms:r}=this,t=r.length,i=0;i=0;i--)r[i].unapply(e)}applyToPoint(e){for(var{transforms:r}=this,t=r.length,i=0;i2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=r,this.captureTextNodes=t,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!r||r.nodeType!==1)){if(Array.from(r.attributes).forEach(o=>{var u=Df(o.nodeName);this.attributes[u]=new D(e,u,o.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(o=>o.trim());i.forEach(o=>{if(o){var[u,l]=o.split(":").map(h=>h.trim());this.styles[u]=new D(e,u,l)}})}var{definitions:a}=e,s=this.getAttribute("id");s.hasValue()&&(a[s.getString()]||(a[s.getString()]=this)),Array.from(r.childNodes).forEach(o=>{if(o.nodeType===1)this.addChild(o);else if(t&&(o.nodeType===3||o.nodeType===4)){var u=e.createTextNode(o);u.getText().length>0&&this.addChild(u)}})}}getAttribute(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=this.attributes[e];if(!t&&r){var i=new D(this.document,e,"");return this.attributes[e]=i,i}return t||D.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return D.empty(this.document)}getStyle(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[e];if(i)return i;var a=this.getAttribute(e);if(a!=null&&a.hasValue())return this.styles[e]=a,a;if(!t){var{parent:s}=this;if(s){var o=s.getStyle(e);if(o!=null&&o.hasValue())return o}}if(r){var u=new D(this.document,e,"");return this.styles[e]=u,u}return i||D.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var t=this.getStyle("filter").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var r=Je.fromElement(this.document,this);r&&r.apply(e);var t=this.getStyle("clip-path",!1,!0);if(t.hasValue()){var i=t.getDefinition();i&&i.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(r=>{r.render(e)})}addChild(e){var r=e instanceof K?e:this.document.createElement(e);r.parent=this,K.ignoreChildTypes.includes(r.type)||this.children.push(r)}matchesSelector(e){var r,{node:t}=this;if(typeof t.matches=="function")return t.matches(e);var i=(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"class");return!i||i===""?!1:i.split(" ").some(a=>".".concat(a)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:r}=this.document;for(var t in e)if(!t.startsWith("@")&&this.matchesSelector(t)){var i=e[t],a=r[t];if(i)for(var s in i){var o=this.stylesSpecificity[s];typeof o>"u"&&(o="000"),a>=o&&(this.styles[s]=i[s],this.stylesSpecificity[s]=a)}}}removeStyles(e,r){var t=r.reduce((i,a)=>{var s=e.getStyle(a);if(!s.hasValue())return i;var o=s.getString();return s.setValue(""),[...i,[a,o]]},[]);return t}restoreStyles(e,r){r.forEach(t=>{var[i,a]=t;e.getStyle(i,!0).setValue(a)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}K.ignoreChildTypes=["title"];class tc extends K{constructor(e,r,t){super(e,r,t)}}function ic(n){var e=n.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function ac(n){return typeof process>"u"?n:n.trim().split(",").map(ic).join(",")}function nc(n){if(!n)return"";var e=n.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 sc(n){if(!n)return"";var e=n.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 ue{constructor(e,r,t,i,a,s){var o=s?typeof s=="string"?ue.parse(s):s:{};this.fontFamily=a||o.fontFamily,this.fontSize=i||o.fontSize,this.fontStyle=e||o.fontStyle,this.fontWeight=t||o.fontWeight,this.fontVariant=r||o.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,t="",i="",a="",s="",o="",u=or(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return u.forEach(h=>{switch(!0){case(!l.fontStyle&&ue.styles.includes(h)):h!=="inherit"&&(t=h),l.fontStyle=!0;break;case(!l.fontVariant&&ue.variants.includes(h)):h!=="inherit"&&(i=h),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&ue.weights.includes(h)):h!=="inherit"&&(a=h),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:h!=="inherit"&&([s]=h.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:h!=="inherit"&&(o+=h)}}),new ue(t,i,a,s,o,r)}toString(){return[nc(this.fontStyle),this.fontVariant,sc(this.fontWeight),this.fontSize,ac(this.fontFamily)].join(" ").trim()}}ue.styles="normal|italic|oblique|inherit";ue.variants="normal|small-caps|inherit";ue.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Ie{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,t=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=r,this.x2=t,this.y2=i,this.addPoint(e,r),this.addPoint(t,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,r){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),ethis.x2&&(this.x2=e)),typeof r<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),rthis.y2&&(this.y2=r))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:r,y1:t,x2:i,y2:a}=e;this.addPoint(r,t),this.addPoint(i,a)}}sumCubic(e,r,t,i,a){return Math.pow(1-e,3)*r+3*Math.pow(1-e,2)*e*t+3*(1-e)*Math.pow(e,2)*i+Math.pow(e,3)*a}bezierCurveAdd(e,r,t,i,a){var s=6*r-12*t+6*i,o=-3*r+9*t-9*i+3*a,u=3*t-3*r;if(o===0){if(s===0)return;var l=-u/s;0=r.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",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",t=new ee(this.command[e],this.command[r]);return this.makeAbsolute(t)}getAsControlPoint(e,r){var t=this.getPoint(e,r);return this.control=t,t}getAsCurrentPoint(e,r){var t=this.getPoint(e,r);return this.current=t,t}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==T.CURVE_TO&&e!==T.SMOOTH_CURVE_TO&&e!==T.QUAD_TO&&e!==T.SMOOTH_QUAD_TO)return this.current;var{current:{x:r,y:t},control:{x:i,y:a}}=this,s=new ee(2*r-i,2*t-a);return s}makeAbsolute(e){if(this.command.relative){var{x:r,y:t}=this.current;e.x+=r,e.y+=t}return e}addMarker(e,r,t){var{points:i,angles:a}=this;t&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=i[i.length-1].angleTo(t)),this.addMarkerAngle(e,r?r.angleTo(e):null)}addMarkerAngle(e,r){this.points.push(e),this.angles.push(r)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,r=e.length,t=0;t1&&arguments[1]!==void 0?arguments[1]:!1;if(!r){var t=this.getStyle("fill"),i=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),s=this.getStyle("stroke-opacity");if(t.isUrlDefinition()){var o=t.getFillStyleDefinition(this,i);o&&(e.fillStyle=o)}else if(t.hasValue()){t.getString()==="currentColor"&&t.setValue(this.getStyle("color").getColor());var u=t.getColor();u!=="inherit"&&(e.fillStyle=u==="none"?"rgba(0,0,0,0)":u)}if(i.hasValue()){var l=new D(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=l}if(a.isUrlDefinition()){var h=a.getFillStyleDefinition(this,s);h&&(e.strokeStyle=h)}else if(a.hasValue()){a.getString()==="currentColor"&&a.setValue(this.getStyle("color").getColor());var c=a.getString();c!=="inherit"&&(e.strokeStyle=c==="none"?"rgba(0,0,0,0)":c)}if(s.hasValue()){var v=new D(this.document,"stroke",e.strokeStyle).addOpacity(s).getString();e.strokeStyle=v}var f=this.getStyle("stroke-width");if(f.hasValue()){var g=f.getPixels();e.lineWidth=g||ar}var d=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),m=this.getStyle("stroke-dasharray"),b=this.getStyle("stroke-dashoffset");if(d.hasValue()&&(e.lineCap=d.getString()),p.hasValue()&&(e.lineJoin=p.getString()),y.hasValue()&&(e.miterLimit=y.getNumber()),m.hasValue()&&m.getString()!=="none"){var x=ye(m.getString());typeof e.setLineDash<"u"?e.setLineDash(x):typeof e.webkitLineDash<"u"?e.webkitLineDash=x:typeof e.mozDash<"u"&&!(x.length===1&&x[0]===0)&&(e.mozDash=x);var S=b.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=S:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=S:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=S)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var E=this.getStyle("font"),O=this.getStyle("font-style"),P=this.getStyle("font-variant"),_=this.getStyle("font-weight"),A=this.getStyle("font-size"),q=this.getStyle("font-family"),I=new ue(O.getString(),P.getString(),_.getString(),A.hasValue()?"".concat(A.getPixels(!0),"px"):"",q.getString(),ue.parse(E.getString(),e.font));O.setValue(I.fontStyle),P.setValue(I.fontVariant),_.setValue(I.fontWeight),A.setValue(I.fontSize),q.setValue(I.fontFamily),e.font=I.toString(),A.isPixels()&&(this.document.emSize=A.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class Y extends ir{constructor(e,r,t){super(e,r,t),this.type="path",this.pathParser=null,this.pathParser=new F(this.getAttribute("d").getString())}path(e){var{pathParser:r}=this,t=new Ie;for(r.reset(),e&&e.beginPath();!r.isEnd();)switch(r.next().type){case F.MOVE_TO:this.pathM(e,t);break;case F.LINE_TO:this.pathL(e,t);break;case F.HORIZ_LINE_TO:this.pathH(e,t);break;case F.VERT_LINE_TO:this.pathV(e,t);break;case F.CURVE_TO:this.pathC(e,t);break;case F.SMOOTH_CURVE_TO:this.pathS(e,t);break;case F.QUAD_TO:this.pathQ(e,t);break;case F.SMOOTH_QUAD_TO:this.pathT(e,t);break;case F.ARC:this.pathA(e,t);break;case F.CLOSE_PATH:this.pathZ(e,t);break}return t}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,r=e.getMarkerPoints(),t=e.getMarkerAngles(),i=r.map((a,s)=>[a,t[s]]);return i}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var r=this.getStyle("fill-rule");e.fillStyle!==""&&(r.getString("inherit")!=="inherit"?e.fill(r.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 t=this.getMarkers();if(t){var i=t.length-1,a=this.getStyle("marker-start"),s=this.getStyle("marker-mid"),o=this.getStyle("marker-end");if(a.isUrlDefinition()){var u=a.getDefinition(),[l,h]=t[0];u.render(e,l,h)}if(s.isUrlDefinition())for(var c=s.getDefinition(),v=1;v1&&(i*=Math.sqrt(v),a*=Math.sqrt(v));var f=(o===u?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(c.y,2)-Math.pow(a,2)*Math.pow(c.x,2))/(Math.pow(i,2)*Math.pow(c.y,2)+Math.pow(a,2)*Math.pow(c.x,2)));isNaN(f)&&(f=0);var g=new ee(f*i*c.y/a,f*-a*c.x/i),d=new ee((r.x+h.x)/2+Math.cos(l)*g.x-Math.sin(l)*g.y,(r.y+h.y)/2+Math.sin(l)*g.x+Math.cos(l)*g.y),p=zu([1,0],[(c.x-g.x)/i,(c.y-g.y)/a]),y=[(c.x-g.x)/i,(c.y-g.y)/a],m=[(-c.x-g.x)/i,(-c.y-g.y)/a],b=zu(y,m);return ja(y,m)<=-1&&(b=Math.PI),ja(y,m)>=1&&(b=0),{currentPoint:h,rX:i,rY:a,sweepFlag:u,xAxisRotation:l,centp:d,a1:p,ad:b}}pathA(e,r){var{pathParser:t}=this,{currentPoint:i,rX:a,rY:s,sweepFlag:o,xAxisRotation:u,centp:l,a1:h,ad:c}=Y.pathA(t),v=1-o?1:-1,f=h+v*(c/2),g=new ee(l.x+a*Math.cos(f),l.y+s*Math.sin(f));if(t.addMarkerAngle(g,f-v*Math.PI/2),t.addMarkerAngle(i,f-v*Math.PI),r.addPoint(i.x,i.y),e&&!isNaN(h)&&!isNaN(c)){var d=a>s?a:s,p=a>s?1:a/s,y=a>s?s/a:1;e.translate(l.x,l.y),e.rotate(u),e.scale(p,y),e.arc(0,0,d,h,h+c,!!(1-o)),e.scale(1/p,1/y),e.rotate(-u),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,r){Y.pathZ(this.pathParser),e&&r.x1!==r.x2&&r.y1!==r.y2&&e.closePath()}}class Ul extends Y{constructor(e,r,t){super(e,r,t),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 We extends ir{constructor(e,r,t){super(e,r,new.target===We?!0:t),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,r);var t=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();t&&(e.textBaseline=t)}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 r=null;return this.children.forEach((t,i)=>{var a=this.getChildBoundingBox(e,this,this,i);r?r.addBoundingBox(a):r=a}),r}getFontSize(){var{document:e,parent:r}=this,t=ue.parse(e.ctx.font).fontSize,i=r.getStyle("font-size").getNumber(t);return i}getTElementBoundingBox(e){var r=this.getFontSize();return new Ie(this.x,this.y-r,this.x+this.measureText(e),this.y)}getGlyph(e,r,t){var i=r[t],a=null;if(e.isArabic){var s=r.length,o=r[t-1],u=r[t+1],l="isolated";if((t===0||o===" ")&&t0&&o!==" "&&t0&&o!==" "&&(t===s-1||u===" ")&&(l="initial"),typeof e.glyphs[i]<"u"){var h=e.glyphs[i];a=h instanceof Ul?h:h[l]}}else a=e.glyphs[i];return a||(a=e.missingGlyph),a}getText(){return""}getTextFromNode(e){var r=e||this.node,t=Array.from(r.parentNode.childNodes),i=t.indexOf(r),a=t.length-1,s=or(r.textContent||"");return i===0&&(s=_f(s)),i===a&&(s=Mf(s)),s}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((t,i)=>{this.renderChild(e,this,this,i)});var{mouse:r}=this.document.screen;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:r,parent:t}=this,i=this.getText(),a=t.getStyle("font-family").getDefinition();if(a){for(var{unitsPerEm:s}=a.fontFace,o=ue.parse(r.ctx.font),u=t.getStyle("font-size").getNumber(o.fontSize),l=t.getStyle("font-style").getString(o.fontStyle),h=u/s,c=a.isRTL?i.split("").reverse().join(""):i,v=ye(t.getAttribute("dx").getString()),f=c.length,g=0;g=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],r=e.getStyle("text-anchor").getString("start"),t=!1,i=0;r==="start"&&!t||r==="end"&&t?i=e.x-this.minX:r==="end"&&!t||r==="start"&&t?i=e.x-this.maxX:i=e.x-(this.minX+this.maxX)/2;for(var a=this.textChunkStart;a{this.adjustChildCoordinatesRecursiveCore(e,this,this,t)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,r,t,i){var a=t.children[i];a.children.length>0?a.children.forEach((s,o)=>{r.adjustChildCoordinatesRecursiveCore(e,r,a,o)}):this.adjustChildCoordinates(e,r,t,i)}adjustChildCoordinates(e,r,t,i){var a=t.children[i];if(typeof a.measureText!="function")return a;e.save(),a.setContext(e,!0);var s=a.getAttribute("x"),o=a.getAttribute("y"),u=a.getAttribute("dx"),l=a.getAttribute("dy"),h=a.getStyle("font-family").getDefinition(),c=!!h&&h.isRTL;i===0&&(s.hasValue()||s.setValue(a.getInheritedAttribute("x")),o.hasValue()||o.setValue(a.getInheritedAttribute("y")),u.hasValue()||u.setValue(a.getInheritedAttribute("dx")),l.hasValue()||l.setValue(a.getInheritedAttribute("dy")));var v=a.measureText(e);return c&&(r.x-=v),s.hasValue()?(r.applyAnchoring(),a.x=s.getPixels("x"),u.hasValue()&&(a.x+=u.getPixels("x"))):(u.hasValue()&&(r.x+=u.getPixels("x")),a.x=r.x),r.x=a.x,c||(r.x+=v),o.hasValue()?(a.y=o.getPixels("y"),l.hasValue()&&(a.y+=l.getPixels("y"))):(l.hasValue()&&(r.y+=l.getPixels("y")),a.y=r.y),r.y=a.y,r.leafTexts.push(a),r.minX=Math.min(r.minX,a.x,a.x+v),r.maxX=Math.max(r.maxX,a.x,a.x+v),a.clearContext(e),e.restore(),a}getChildBoundingBox(e,r,t,i){var a=t.children[i];if(typeof a.getBoundingBox!="function")return null;var s=a.getBoundingBox(e);return s?(a.children.forEach((o,u)=>{var l=r.getChildBoundingBox(e,r,a,u);s.addBoundingBox(l)}),s):null}renderChild(e,r,t,i){var a=t.children[i];a.render(e),a.children.forEach((s,o)=>{r.renderChild(e,r,a,o)})}measureText(e){var{measureCache:r}=this;if(~r)return r;var t=this.getText(),i=this.measureTargetText(e,t);return this.measureCache=i,i}measureTargetText(e,r){if(!r.length)return 0;var{parent:t}=this,i=t.getStyle("font-family").getDefinition();if(i){for(var a=this.getFontSize(),s=i.isRTL?r.split("").reverse().join(""):r,o=ye(t.getAttribute("dx").getString()),u=s.length,l=0,h=0;h0?"":this.getTextFromNode()}getText(){return this.text}}class oc extends $r{constructor(){super(...arguments),this.type="textNode"}}class Tr extends ir{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var r,{document:t}=this,{screen:i,window:a}=t,s=e.canvas;if(i.setDefaults(e),s.style&&typeof e.font<"u"&&a&&typeof a.getComputedStyle<"u"){e.font=a.getComputedStyle(s).getPropertyValue("font");var o=new D(t,"fontSize",ue.parse(e.font).fontSize);o.hasValue()&&(t.rootEmSize=o.getPixels("y"),t.emSize=t.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"),c=this.getAttribute("refY"),v=this.getAttribute("viewBox"),f=v.hasValue()?ye(v.getString()):null,g=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",d=0,p=0,y=0,m=0;f&&(d=f[0],p=f[1]),this.root||(u=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(y=d,m=p,d=0,p=0)),i.viewPort.setCurrent(u,l),this.node&&(!this.parent||((r=this.node.parentNode)===null||r===void 0?void 0:r.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")),f&&(u=f[2],l=f[3]),t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:u,height:i.viewPort.height,desiredHeight:l,minX:d,minY:p,refX:h.getValue(),refY:c.getValue(),clip:g,clipX:y,clipY:m}),f&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(u,l))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),a=this.getAttribute("height",!0),s=this.getAttribute("viewBox"),o=this.getAttribute("style"),u=i.getNumber(0),l=a.getNumber(0);if(t)if(typeof t=="string")this.getAttribute("preserveAspectRatio",!0).setValue(t);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),a.setValue(r),s.hasValue()||s.setValue("0 0 ".concat(u||e," ").concat(l||r)),o.hasValue()){var c=this.getStyle("width"),v=this.getStyle("height");c.hasValue()&&c.setValue("".concat(e,"px")),v.hasValue()&&v.setValue("".concat(r,"px"))}}}class Gl extends Y{constructor(){super(...arguments),this.type="rect"}path(e){var r=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),a=this.getStyle("height",!1,!0).getPixels("y"),s=this.getAttribute("rx"),o=this.getAttribute("ry"),u=s.getPixels("x"),l=o.getPixels("y");if(s.hasValue()&&!o.hasValue()&&(l=u),o.hasValue()&&!s.hasValue()&&(u=l),u=Math.min(u,i/2),l=Math.min(l,a/2),e){var h=4*((Math.sqrt(2)-1)/3);e.beginPath(),a>0&&i>0&&(e.moveTo(r+u,t),e.lineTo(r+i-u,t),e.bezierCurveTo(r+i-u+h*u,t,r+i,t+l-h*l,r+i,t+l),e.lineTo(r+i,t+a-l),e.bezierCurveTo(r+i,t+a-l+h*l,r+i-u+h*u,t+a,r+i-u,t+a),e.lineTo(r+u,t+a),e.bezierCurveTo(r+u-h*u,t+a,r,t+a-l+h*l,r,t+a-l),e.lineTo(r,t+l),e.bezierCurveTo(r,t+l-h*l,r+u-h*u,t,r+u,t),e.closePath())}return new Ie(r,t,r+i,t+a)}getMarkers(){return null}}class uc extends Y{constructor(){super(...arguments),this.type="circle"}path(e){var r=this.getAttribute("cx").getPixels("x"),t=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return e&&i>0&&(e.beginPath(),e.arc(r,t,i,0,Math.PI*2,!1),e.closePath()),new Ie(r-i,t-i,r+i,t+i)}getMarkers(){return null}}class lc extends Y{constructor(){super(...arguments),this.type="ellipse"}path(e){var r=4*((Math.sqrt(2)-1)/3),t=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),s=this.getAttribute("cy").getPixels("y");return e&&t>0&&i>0&&(e.beginPath(),e.moveTo(a+t,s),e.bezierCurveTo(a+t,s+r*i,a+r*t,s+i,a,s+i),e.bezierCurveTo(a-r*t,s+i,a-t,s+r*i,a-t,s),e.bezierCurveTo(a-t,s-r*i,a-r*t,s-i,a,s-i),e.bezierCurveTo(a+r*t,s-i,a+t,s-r*i,a+t,s),e.closePath()),new Ie(a-t,s-i,a+t,s+i)}getMarkers(){return null}}class hc extends Y{constructor(){super(...arguments),this.type="line"}getPoints(){return[new ee(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new ee(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:r,y:t},{x:i,y:a}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(r,t),e.lineTo(i,a)),new Ie(r,t,i,a)}getMarkers(){var[e,r]=this.getPoints(),t=e.angleTo(r);return[[e,t],[r,t]]}}class $l extends Y{constructor(e,r,t){super(e,r,t),this.type="polyline",this.points=[],this.points=ee.parsePath(this.getAttribute("points").getString())}path(e){var{points:r}=this,[{x:t,y:i}]=r,a=new Ie(t,i);return e&&(e.beginPath(),e.moveTo(t,i)),r.forEach(s=>{var{x:o,y:u}=s;a.addPoint(o,u),e&&e.lineTo(o,u)}),a}getMarkers(){var{points:e}=this,r=e.length-1,t=[];return e.forEach((i,a)=>{a!==r&&t.push([i,i.angleTo(e[a+1])])}),t.length>0&&t.push([e[e.length-1],t[t.length-1][1]]),t}}class fc extends $l{constructor(){super(...arguments),this.type="polygon"}path(e){var r=super.path(e),[{x:t,y:i}]=this.points;return e&&(e.lineTo(t,i),e.closePath()),r}}class cc extends K{constructor(){super(...arguments),this.type="pattern"}createPattern(e,r,t){var i=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),s=new Tr(this.document,null);s.attributes.viewBox=new D(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.width=new D(this.document,"width","".concat(i,"px")),s.attributes.height=new D(this.document,"height","".concat(a,"px")),s.attributes.transform=new D(this.document,"transform",this.getAttribute("patternTransform").getValue()),s.children=this.children;var o=this.document.createCanvas(i,a),u=o.getContext("2d"),l=this.getAttribute("x"),h=this.getAttribute("y");l.hasValue()&&h.hasValue()&&u.translate(l.getPixels("x",!0),h.getPixels("y",!0)),t.hasValue()?this.styles["fill-opacity"]=t:Reflect.deleteProperty(this.styles,"fill-opacity");for(var c=-1;c<=1;c++)for(var v=-1;v<=1;v++)u.save(),s.attributes.x=new D(this.document,"x",c*o.width),s.attributes.y=new D(this.document,"y",v*o.height),s.render(u),u.restore();var f=e.createPattern(o,"repeat");return f}}class vc extends K{constructor(){super(...arguments),this.type="marker"}render(e,r,t){if(r){var{x:i,y:a}=r,s=this.getAttribute("orient").getString("auto"),o=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,a),s==="auto"&&e.rotate(t),o==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var u=new Tr(this.document,null);u.type=this.type,u.attributes.viewBox=new D(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.refX=new D(this.document,"refX",this.getAttribute("refX").getValue()),u.attributes.refY=new D(this.document,"refY",this.getAttribute("refY").getValue()),u.attributes.width=new D(this.document,"width",this.getAttribute("markerWidth").getValue()),u.attributes.height=new D(this.document,"height",this.getAttribute("markerHeight").getValue()),u.attributes.overflow=new D(this.document,"overflow",this.getAttribute("overflow").getValue()),u.attributes.fill=new D(this.document,"fill",this.getAttribute("fill").getColor("black")),u.attributes.stroke=new D(this.document,"stroke",this.getAttribute("stroke").getValue("none")),u.children=this.children,u.render(e),e.restore(),o==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),s==="auto"&&e.rotate(-t),e.translate(-i,-a)}}}class gc extends K{constructor(){super(...arguments),this.type="defs"}render(){}}class ln extends ir{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var r=new Ie;return this.children.forEach(t=>{r.addBoundingBox(t.getBoundingBox(e))}),r}}class zl extends K{constructor(e,r,t){super(e,r,t),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:a}=this;a.forEach(s=>{s.type==="stop"&&i.push(s)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,r,t){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:a}=i,s=this.getGradient(e,r);if(!s)return this.addParentOpacity(t,a[a.length-1].color);if(a.forEach(p=>{s.addColorStop(p.offset,this.addParentOpacity(t,p.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:o}=this,{MAX_VIRTUAL_PIXELS:u,viewPort:l}=o.screen,[h]=l.viewPorts,c=new Gl(o,null);c.attributes.x=new D(o,"x",-u/3),c.attributes.y=new D(o,"y",-u/3),c.attributes.width=new D(o,"width",u),c.attributes.height=new D(o,"height",u);var v=new ln(o,null);v.attributes.transform=new D(o,"transform",this.getAttribute("gradientTransform").getValue()),v.children=[c];var f=new Tr(o,null);f.attributes.x=new D(o,"x",0),f.attributes.y=new D(o,"y",0),f.attributes.width=new D(o,"width",h.width),f.attributes.height=new D(o,"height",h.height),f.children=[v];var g=o.createCanvas(h.width,h.height),d=g.getContext("2d");return d.fillStyle=s,f.render(d),d.createPattern(g,"no-repeat")}return s}inheritStopContainer(e){this.attributesToInherit.forEach(r=>{!this.getAttribute(r).hasValue()&&e.getAttribute(r).hasValue()&&this.getAttribute(r,!0).setValue(e.getAttribute(r).getValue())})}addParentOpacity(e,r){if(e.hasValue()){var t=new D(this.document,"color",r);return t.addOpacity(e).getColor()}return r}}class dc extends zl{constructor(e,r,t){super(e,r,t),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,r){var t=this.getGradientUnits()==="objectBoundingBox",i=t?r.getBoundingBox(e):null;if(t&&!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 a=t?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),s=t?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),o=t?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),u=t?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===o&&s===u?null:e.createLinearGradient(a,s,o,u)}}class pc extends zl{constructor(e,r,t){super(e,r,t),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,r){var t=this.getGradientUnits()==="objectBoundingBox",i=r.getBoundingBox(e);if(t&&!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 a=t?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),s=t?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),o=a,u=s;this.getAttribute("fx").hasValue()&&(o=t?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(u=t?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=t?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return e.createRadialGradient(o,u,h,a,s,l)}}class yc extends K{constructor(e,r,t){super(e,r,t),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),a=this.getStyle("stop-opacity"),s=this.getStyle("stop-color",!0);s.getString()===""&&s.setValue("#000"),a.hasValue()&&(s=s.addOpacity(a)),this.offset=i,this.color=s.getColor()}}class hn extends K{constructor(e,r,t){super(e,r,t),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 D(e,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}calcValue(){var{initialUnits:e}=this,{progress:r,from:t,to:i}=this.getProgress(),a=t.getNumber()+(i.getNumber()-t.getNumber())*r;return e==="%"&&(a*=100),"".concat(a).concat(e)}update(e){var{parent:r}=this,t=this.getProperty();if(this.initialValue||(this.initialValue=t.getString(),this.initialUnits=t.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,r.animationFrozen=!0,r.animationFrozenValue=t.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,t.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var a=!1;if(this.begin{var l=a[u];return o+(l-o)*e}).join(" ");return s}}class xc extends K{constructor(e,r,t){super(e,r,t),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=e,{children:a}=this;for(var s of a)switch(s.type){case"font-face":{this.fontFace=s;var o=s.getStyle("font-family");o.hasValue()&&(i[o.getString()]=this);break}case"missing-glyph":this.missingGlyph=s;break;case"glyph":{var u=s;u.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[u.unicode]>"u"&&(this.glyphs[u.unicode]=Object.create(null)),this.glyphs[u.unicode][u.arabicForm]=u):this.glyphs[u.unicode]=u;break}}}render(){}}class Oc extends K{constructor(e,r,t){super(e,r,t),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 Tc extends Y{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Sc extends We{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var r=e.children[0];if(r)return r.getText()}return""}}class Ec extends We{constructor(e,r,t){super(e,r,t),this.type="a";var{childNodes:i}=r,a=i[0],s=i.length>0&&Array.from(i).every(o=>o.nodeType===3);this.hasText=s,this.text=s?this.getTextFromNode(a):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:r,x:t,y:i}=this,{mouse:a}=r.screen,s=new D(r,"fontSize",ue.parse(r.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new Ie(t,i-s.getPixels("y"),t+this.measureText(e),i))}else if(this.children.length>0){var o=new ln(this.document,null);o.children=this.children,o.parent=this,o.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 Ju(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),r.push.apply(r,t)}return r}function Rr(n){for(var e=1;e{var{type:i,points:a}=t;switch(i){case F.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case F.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case F.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case F.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case F.ARC:{var[s,o,u,l,h,c,v,f]=a,g=u>l?u:l,d=u>l?1:u/l,p=u>l?l/u:1;e&&(e.translate(s,o),e.rotate(v),e.scale(d,p),e.arc(0,0,g,h,h+c,!!(1-f)),e.scale(1/d,1/p),e.rotate(-v),e.translate(-s,-o));break}case F.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var r=this.parent.getStyle("text-decoration").getString(),t=this.getFontSize(),{glyphInfo:i}=this,a=e.fillStyle;r==="underline"&&e.beginPath(),i.forEach((s,o)=>{var{p0:u,p1:l,rotation:h,text:c}=s;e.save(),e.translate(u.x,u.y),e.rotate(h),e.fillStyle&&e.fillText(c,0,0),e.strokeStyle&&e.strokeText(c,0,0),e.restore(),r==="underline"&&(o===0&&e.moveTo(u.x,u.y+t/8),e.lineTo(l.x,l.y+t/5))}),r==="underline"&&(e.lineWidth=t/20,e.strokeStyle=a,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,r,t,i,a,s,o,u,l){var h=s,c=this.measureText(e,u);u===" "&&r==="justify"&&t-1&&(h+=this.getLetterSpacingAt(l));var v=this.textHeight/20,f=this.getEquidistantPointOnPath(h,v,0),g=this.getEquidistantPointOnPath(h+c,v,0),d={p0:f,p1:g},p=f&&g?Math.atan2(g.y-f.y,g.x-f.x):0;if(o){var y=Math.cos(Math.PI/2+p)*o,m=Math.cos(-p)*o;d.p0=Rr(Rr({},f),{},{x:f.x+y,y:f.y+m}),d.p1=Rr(Rr({},g),{},{x:g.x+y,y:g.y+m})}return h+=c,{offset:h,segment:d,rotation:p}}measureText(e,r){var{measuresCache:t}=this,i=r||this.getText();if(t.has(i))return t.get(i);var a=this.measureTargetText(e,i);return t.set(i,a),a}setTextData(e){if(!this.glyphInfo){var r=this.getText(),t=r.split(""),i=r.split(" ").length-1,a=this.parent.getAttribute("dx").split().map(x=>x.getPixels("x")),s=this.parent.getAttribute("dy").getPixels("y"),o=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 c=[],v=r.length;this.letterSpacingCache=c;for(var f=0;fE===0?0:x+S||0,0),d=this.measureText(e),p=Math.max(d+g,0);this.textWidth=d,this.textHeight=this.getFontSize(),this.glyphInfo=[];var y=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*y,b=0;(o==="middle"||o==="center")&&(b=-p/2),(o==="end"||o==="right")&&(b=-p),b+=m,t.forEach((x,S)=>{var{offset:E,segment:O,rotation:P}=this.findSegmentToFitChar(e,o,p,y,i,b,s,x,S);b=E,!(!O.p0||!O.p1)&&this.glyphInfo.push({text:t[S],p0:O.p0,p1:O.p1,rotation:P})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var r=[],{pathParser:t}=e;for(t.reset();!t.isEnd();){var{current:i}=t,a=i?i.x:0,s=i?i.y:0,o=t.next(),u=o.type,l=[];switch(o.type){case F.MOVE_TO:this.pathM(t,l);break;case F.LINE_TO:u=this.pathL(t,l);break;case F.HORIZ_LINE_TO:u=this.pathH(t,l);break;case F.VERT_LINE_TO:u=this.pathV(t,l);break;case F.CURVE_TO:this.pathC(t,l);break;case F.SMOOTH_CURVE_TO:u=this.pathS(t,l);break;case F.QUAD_TO:this.pathQ(t,l);break;case F.SMOOTH_QUAD_TO:u=this.pathT(t,l);break;case F.ARC:l=this.pathA(t);break;case F.CLOSE_PATH:Y.pathZ(t);break}o.type!==F.CLOSE_PATH?r.push({type:u,points:l,start:{x:a,y:s},pathLength:this.calcLength(a,s,u,l)}):r.push({type:F.CLOSE_PATH,points:[],pathLength:0})}return r}pathM(e,r){var{x:t,y:i}=Y.pathM(e).point;r.push(t,i)}pathL(e,r){var{x:t,y:i}=Y.pathL(e).point;return r.push(t,i),F.LINE_TO}pathH(e,r){var{x:t,y:i}=Y.pathH(e).point;return r.push(t,i),F.LINE_TO}pathV(e,r){var{x:t,y:i}=Y.pathV(e).point;return r.push(t,i),F.LINE_TO}pathC(e,r){var{point:t,controlPoint:i,currentPoint:a}=Y.pathC(e);r.push(t.x,t.y,i.x,i.y,a.x,a.y)}pathS(e,r){var{point:t,controlPoint:i,currentPoint:a}=Y.pathS(e);return r.push(t.x,t.y,i.x,i.y,a.x,a.y),F.CURVE_TO}pathQ(e,r){var{controlPoint:t,currentPoint:i}=Y.pathQ(e);r.push(t.x,t.y,i.x,i.y)}pathT(e,r){var{controlPoint:t,currentPoint:i}=Y.pathT(e);return r.push(t.x,t.y,i.x,i.y),F.QUAD_TO}pathA(e){var{rX:r,rY:t,sweepFlag:i,xAxisRotation:a,centp:s,a1:o,ad:u}=Y.pathA(e);return i===0&&u>0&&(u-=2*Math.PI),i===1&&u<0&&(u+=2*Math.PI),[s.x,s.y,r,t,o,u,a,i]}calcLength(e,r,t,i){var a=0,s=null,o=null,u=0;switch(t){case F.LINE_TO:return this.getLineLength(e,r,i[0],i[1]);case F.CURVE_TO:for(a=0,s=this.getPointOnCubicBezier(0,e,r,i[0],i[1],i[2],i[3],i[4],i[5]),u=.01;u<=1;u+=.01)o=this.getPointOnCubicBezier(u,e,r,i[0],i[1],i[2],i[3],i[4],i[5]),a+=this.getLineLength(s.x,s.y,o.x,o.y),s=o;return a;case F.QUAD_TO:for(a=0,s=this.getPointOnQuadraticBezier(0,e,r,i[0],i[1],i[2],i[3]),u=.01;u<=1;u+=.01)o=this.getPointOnQuadraticBezier(u,e,r,i[0],i[1],i[2],i[3]),a+=this.getLineLength(s.x,s.y,o.x,o.y),s=o;return a;case F.ARC:{a=0;var l=i[4],h=i[5],c=i[4]+h,v=Math.PI/180;if(Math.abs(l-c)c;u-=v)o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),a+=this.getLineLength(s.x,s.y,o.x,o.y),s=o;else for(u=l+v;u5&&arguments[5]!==void 0?arguments[5]:r,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:t,u=(a-t)/(i-r+ar),l=Math.sqrt(e*e/(1+u*u));ir)return null;var{dataArray:a}=this;for(var s of a){if(s&&(s.pathLength<5e-5||t+s.pathLength+5e-5=0&&u>c)break;i=this.getPointOnEllipticalArc(s.points[0],s.points[1],s.points[2],s.points[3],u,s.points[6]);break}case F.CURVE_TO:u=o/s.pathLength,u>1&&(u=1),i=this.getPointOnCubicBezier(u,s.start.x,s.start.y,s.points[0],s.points[1],s.points[2],s.points[3],s.points[4],s.points[5]);break;case F.QUAD_TO:u=o/s.pathLength,u>1&&(u=1),i=this.getPointOnQuadraticBezier(u,s.start.x,s.start.y,s.points[0],s.points[1],s.points[2],s.points[3]);break}if(i)return i;break}return null}getLineLength(e,r,t,i){return Math.sqrt((t-e)*(t-e)+(i-r)*(i-r))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,r)=>r.pathLength>0?e+r.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,r,t,i,a,s,o,u,l){var h=u*Hu(e)+s*Wu(e)+i*Yu(e)+r*Xu(e),c=l*Hu(e)+o*Wu(e)+a*Yu(e)+t*Xu(e);return{x:h,y:c}}getPointOnQuadraticBezier(e,r,t,i,a,s,o){var u=s*Ku(e)+i*Qu(e)+r*Zu(e),l=o*Ku(e)+a*Qu(e)+t*Zu(e);return{x:u,y:l}}getPointOnEllipticalArc(e,r,t,i,a,s){var o=Math.cos(s),u=Math.sin(s),l={x:t*Math.cos(a),y:i*Math.sin(a)};return{x:e+(l.x*o-l.y*u),y:r+(l.x*u+l.y*o)}}buildEquidistantCache(e,r){var t=this.getPathLength(),i=r||.25,a=e||t/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==i){this.equidistantCache={step:a,precision:i,points:[]};for(var s=0,o=0;o<=t;o+=i){var u=this.getPointOnPath(o),l=this.getPointOnPath(o+i);!u||!l||(s+=this.getLineLength(u.x,u.y,l.x,l.y),s>=a&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:o}),s-=a))}}}getEquidistantPointOnPath(e,r,t){if(this.buildEquidistantCache(r,t),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 Cc=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class wc extends ir{constructor(e,r,t){super(e,r,t),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var a=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),a?this.loadSvg(i):this.loadImage(i),this.isSvg=a}}loadImage(e){var r=this;return Be(function*(){try{var t=yield r.document.createImage(e);r.image=t}catch(i){console.error('Error while loading image "'.concat(e,'":'),i)}r.loaded=!0})()}loadSvg(e){var r=this;return Be(function*(){var t=Cc.exec(e);if(t){var i=t[5];t[4]==="base64"?r.image=atob(i):r.image=decodeURIComponent(i)}else try{var a=yield r.document.fetch(e),s=yield a.text();r.image=s}catch(o){console.error('Error while loading image "'.concat(e,'":'),o)}r.loaded=!0})()}renderChildren(e){var{document:r,image:t,loaded:i}=this,a=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(!(!i||!t||!o||!u)){if(e.save(),e.translate(a,s),this.isSvg){var l=r.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:o,scaleHeight:u});l.document.documentElement.parent=this,l.render()}else{var h=this.image;r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:o,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"),r=this.getAttribute("y").getPixels("y"),t=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new Ie(e,r,e+t,r+i)}}class Pc extends ir{constructor(){super(...arguments),this.type="symbol"}render(e){}}class Ac{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,r){var t=this;return Be(function*(){try{var{document:i}=t,a=yield i.canvg.parser.load(r),s=a.getElementsByTagName("font");Array.from(s).forEach(o=>{var u=i.createElement(o);i.definitions[e]=u})}catch(o){console.error('Error while loading font "'.concat(r,'":'),o)}t.loaded=!0})()}}class Hl extends K{constructor(e,r,t){super(e,r,t),this.type="style";var i=or(Array.from(r.childNodes).map(s=>s.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),a=i.split("}");a.forEach(s=>{var o=s.trim();if(o){var u=o.split("{"),l=u[0].split(","),h=u[1].split(";");l.forEach(c=>{var v=c.trim();if(v){var f=e.styles[v]||{};if(h.forEach(p=>{var y=p.indexOf(":"),m=p.substr(0,y).trim(),b=p.substr(y+1,p.length-y).trim();m&&b&&(f[m]=new D(e,m,b))}),e.styles[v]=f,e.stylesSpecificity[v]=$f(v),v==="@font-face"){var g=f["font-family"].getString().replace(/"|'/g,""),d=f.src.getString().split(",");d.forEach(p=>{if(p.indexOf('format("svg")')>0){var y=Ll(p);y&&new Ac(e).load(g,y)}})}}})}})}}Hl.parseExternalUrl=Ll;class Ic extends ir{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var r=this.getAttribute("x"),t=this.getAttribute("y");r.hasValue()&&e.translate(r.getPixels("x"),0),t.hasValue()&&e.translate(0,t.getPixels("y"))}path(e){var{element:r}=this;r&&r.path(e)}renderChildren(e){var{document:r,element:t}=this;if(t){var i=t;if(t.type==="symbol"&&(i=new Tr(r,null),i.attributes.viewBox=new D(r,"viewBox",t.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new D(r,"preserveAspectRatio",t.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new D(r,"overflow",t.getAttribute("overflow").getString()),i.children=t.children,t.styles.opacity=new D(r,"opacity",this.calculateOpacity())),i.type==="svg"){var a=this.getStyle("width",!1,!0),s=this.getStyle("height",!1,!0);a.hasValue()&&(i.attributes.width=new D(r,"width",a.getString())),s.hasValue()&&(i.attributes.height=new D(r,"height",s.getString()))}var o=i.parent;i.parent=this,i.render(e),i.parent=o}}getBoundingBox(e){var{element:r}=this;return r?r.getBoundingBox(e):null}elementTransform(){var{document:e,element:r}=this;return Je.fromElement(e,r)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function Cr(n,e,r,t,i,a){return n[r*t*4+e*4+a]}function wr(n,e,r,t,i,a,s){n[r*t*4+e*4+a]=s}function te(n,e,r){var t=n[e];return t*r}function je(n,e,r,t){return e+Math.cos(n)*r+Math.sin(n)*t}class Wl extends K{constructor(e,r,t){super(e,r,t),this.type="feColorMatrix";var i=ye(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var a=i[0];i=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var s=i[0]*Math.PI/180;i=[je(s,.213,.787,-.213),je(s,.715,-.715,-.715),je(s,.072,-.072,.928),0,0,je(s,.213,-.213,.143),je(s,.715,.285,.14),je(s,.072,-.072,-.283),0,0,je(s,.213,-.213,-.787),je(s,.715,-.715,.715),je(s,.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,r,t,i,a){for(var{includeOpacity:s,matrix:o}=this,u=e.getImageData(0,0,i,a),l=0;l{u.addBoundingBox(g.getBoundingBox(e))}),i=Math.floor(u.x1),a=Math.floor(u.y1),s=Math.floor(u.width),o=Math.floor(u.height)}var l=this.removeStyles(r,zr.ignoreStyles),h=t.createCanvas(i+s,a+o),c=h.getContext("2d");t.screen.setDefaults(c),this.renderChildren(c),new Wl(t,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,i+s,a+o);var v=t.createCanvas(i+s,a+o),f=v.getContext("2d");t.screen.setDefaults(f),r.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=c.createPattern(h,"no-repeat"),f.fillRect(0,0,i+s,a+o),e.fillStyle=f.createPattern(v,"no-repeat"),e.fillRect(0,0,i+s,a+o),this.restoreStyles(r,l)}render(e){}}zr.ignoreStyles=["mask","transform","clip-path"];var el=()=>{};class Nc extends K{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:r}=this,t=Reflect.getPrototypeOf(e),{beginPath:i,closePath:a}=e;t&&(t.beginPath=el,t.closePath=el),Reflect.apply(i,e,[]),this.children.forEach(s=>{if(!(typeof s.path>"u")){var o=typeof s.elementTransform<"u"?s.elementTransform():null;o||(o=Je.fromElement(r,s)),o&&o.apply(e),s.path(e),t&&(t.closePath=a),o&&o.unapply(e)}}),Reflect.apply(a,e,[]),e.clip(),t&&(t.beginPath=i,t.closePath=a)}render(e){}}class Hr extends K{constructor(){super(...arguments),this.type="filter"}apply(e,r){var{document:t,children:i}=this,a=r.getBoundingBox(e);if(a){var s=0,o=0;i.forEach(y=>{var m=y.extraFilterDistance||0;s=Math.max(s,m),o=Math.max(o,m)});var u=Math.floor(a.width),l=Math.floor(a.height),h=u+2*s,c=l+2*o;if(!(h<1||c<1)){var v=Math.floor(a.x),f=Math.floor(a.y),g=this.removeStyles(r,Hr.ignoreStyles),d=t.createCanvas(h,c),p=d.getContext("2d");t.screen.setDefaults(p),p.translate(-v+s,-f+o),r.render(p),i.forEach(y=>{typeof y.apply=="function"&&y.apply(p,0,0,h,c)}),e.drawImage(d,0,0,h,c,v-s,f-o,h,c),this.restoreStyles(r,g)}}}render(e){}}Hr.ignoreStyles=["filter","transform","clip-path"];class _c extends K{constructor(e,r,t){super(e,r,t),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,r,t,i,a){}}class Mc extends K{constructor(){super(...arguments),this.type="feMorphology"}apply(e,r,t,i,a){}}class qc extends K{constructor(){super(...arguments),this.type="feComposite"}apply(e,r,t,i,a){}}class Dc extends K{constructor(e,r,t){super(e,r,t),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,r,t,i,a){var{document:s,blurRadius:o}=this,u=s.window?s.window.document.body:null,l=e.canvas;l.id=s.getUniqueId(),u&&(l.style.display="none",u.appendChild(l)),Pf(l,r,t,i,a,o),u&&u.removeChild(l)}}class Vc extends K{constructor(){super(...arguments),this.type="title"}}class Lc extends K{constructor(){super(...arguments),this.type="desc"}}var kc={svg:Tr,rect:Gl,circle:uc,ellipse:lc,line:hc,polyline:$l,polygon:fc,path:Y,pattern:cc,marker:vc,defs:gc,linearGradient:dc,radialGradient:pc,stop:yc,animate:hn,animateColor:mc,animateTransform:bc,font:xc,"font-face":Oc,"missing-glyph":Tc,glyph:Ul,text:We,tspan:$r,tref:Sc,a:Ec,textPath:Rc,image:wc,g:ln,symbol:Pc,style:Hl,use:Ic,mask:zr,clipPath:Nc,filter:Hr,feDropShadow:_c,feMorphology:Mc,feComposite:qc,feColorMatrix:Wl,feGaussianBlur:Dc,title:Vc,desc:Lc};function rl(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),r.push.apply(r,t)}return r}function jc(n){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:!1,r=document.createElement("img");return e&&(r.crossOrigin="Anonymous"),new Promise((t,i)=>{r.onload=()=>{t(r)},r.onerror=(a,s,o,u,l)=>{i(l)},r.src=n})}),Ba.apply(this,arguments)}class He{constructor(e){var{rootEmSize:r=12,emSize:t=12,createCanvas:i=He.createCanvas,createImage:a=He.createImage,anonymousCrossOrigin:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=r,this.emSize=t,this.createCanvas=i,this.createImage=this.bindCreateImage(a,s),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,r){return typeof r=="boolean"?(t,i)=>e(t,typeof i=="boolean"?i:r):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:r}=this;r.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 r=this.createElement(e.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}createElement(e){var r=e.nodeName.replace(/^[^:]+:/,""),t=He.elementTypes[r];return typeof t<"u"?new t(this,e):new tc(this,e)}createTextNode(e){return new oc(this,e)}setViewBox(e){this.screen.setViewBox(jc({document:this},e))}}He.createCanvas=Bc;He.createImage=Fc;He.elementTypes=kc;function tl(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),r.push.apply(r,t)}return r}function Qe(n){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new qa(t),this.screen=new Gr(e,t),this.options=t;var i=new He(this,t),a=i.createDocumentElement(r);this.document=i,this.documentElement=a}static from(e,r){var t=arguments;return Be(function*(){var i=t.length>2&&t[2]!==void 0?t[2]:{},a=new qa(i),s=yield a.parse(r);return new gr(e,s,i)})()}static fromString(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new qa(t),a=i.parseFromString(r);return new gr(e,a,t)}fork(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return gr.from(e,r,Qe(Qe({},this.options),t))}forkString(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return gr.fromString(e,r,Qe(Qe({},this.options),t))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,r=this;return Be(function*(){var t=e.length>0&&e[0]!==void 0?e[0]:{};r.start(Qe({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},t)),yield r.ready(),r.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:r,screen:t,options:i}=this;t.start(r,Qe(Qe({enableRedraw:!0},i),e))}stop(){this.screen.stop()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,r,t)}}export{Ec as AElement,mc as AnimateColorElement,hn as AnimateElement,bc as AnimateTransformElement,Ie as BoundingBox,Hu as CB1,Wu as CB2,Yu as CB3,Xu as CB4,gr as Canvg,uc as CircleElement,Nc as ClipPathElement,gc as DefsElement,Lc as DescElement,He as Document,K as Element,lc as EllipseElement,Wl as FeColorMatrixElement,qc as FeCompositeElement,_c as FeDropShadowElement,Dc as FeGaussianBlurElement,Mc as FeMorphologyElement,Hr as FilterElement,ue as Font,xc as FontElement,Oc as FontFaceElement,ln as GElement,Ul as GlyphElement,zl as GradientElement,wc as ImageElement,hc as LineElement,dc as LinearGradientElement,vc as MarkerElement,zr as MaskElement,Bl as Matrix,Tc as MissingGlyphElement,Hf as Mouse,ar as PSEUDO_ZERO,qa as Parser,Y as PathElement,F as PathParser,cc as PatternElement,ee as Point,fc as PolygonElement,$l as PolylineElement,D as Property,Ku as QB1,Qu as QB2,Zu as QB3,pc as RadialGradientElement,Gl as RectElement,ir as RenderedElement,Kf as Rotate,Tr as SVGElement,Ac as SVGFontLoader,Qf as Scale,Gr as Screen,Fl as Skew,Zf as SkewX,Jf as SkewY,yc as StopElement,Hl as StyleElement,Pc as SymbolElement,Sc as TRefElement,$r as TSpanElement,We as TextElement,Rc as TextPathElement,Vc as TitleElement,Je as Transform,Xf as Translate,tc as UnknownElement,Ic as UseElement,zf as ViewPort,or as compressSpaces,gr as default,$f as getSelectorSpecificity,Df as normalizeAttributeName,Vf as normalizeColor,Ll as parseExternalUrl,Gc as presets,ye as toNumbers,_f as trimLeft,Mf as trimRight,$u as vectorMagnitude,zu as vectorsAngle,ja as vectorsRatio};