@esri/solutions-components 0.4.11 → 0.4.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +83 -83
  2. package/dist/cjs/calcite-combobox_3.cjs.entry.js +61 -61
  3. package/dist/cjs/calcite-input-message_5.cjs.entry.js +282 -282
  4. package/dist/cjs/{downloadUtils-bb998aa8.js → downloadUtils-415ab342.js} +1093 -1093
  5. package/dist/cjs/{index.es-b1ff1b6a.js → index.es-98008aa0.js} +10682 -10682
  6. package/dist/cjs/layer-table.cjs.entry.js +22 -22
  7. package/dist/cjs/{mapViewUtils-d250b1ed.js → mapViewUtils-f617ae9a.js} +33 -41
  8. package/dist/cjs/public-notification.cjs.entry.js +24 -24
  9. package/dist/collection/utils/queryUtils.js +9 -17
  10. package/dist/collection/utils/queryUtils.ts +9 -17
  11. package/dist/components/queryUtils.js +19 -27
  12. package/dist/esm/buffer-tools_6.entry.js +74 -74
  13. package/dist/esm/calcite-combobox_3.entry.js +55 -55
  14. package/dist/esm/calcite-input-message_5.entry.js +274 -274
  15. package/dist/esm/{downloadUtils-2ed29d75.js → downloadUtils-606b0f0e.js} +1089 -1089
  16. package/dist/esm/{index.es-edc28958.js → index.es-c736c805.js} +10596 -10596
  17. package/dist/esm/layer-table.entry.js +18 -18
  18. package/dist/esm/{mapViewUtils-02696ab6.js → mapViewUtils-4e945e07.js} +21 -29
  19. package/dist/esm/public-notification.entry.js +20 -20
  20. package/dist/solutions-components/{p-f808f3bc.entry.js → p-308e24cc.entry.js} +6 -6
  21. package/dist/solutions-components/{p-25665c66.entry.js → p-570b076b.entry.js} +17 -17
  22. package/dist/solutions-components/{p-335fce8c.entry.js → p-5ee7b022.entry.js} +11 -11
  23. package/dist/solutions-components/{p-375face5.js → p-6a657ff6.js} +436 -436
  24. package/dist/solutions-components/{p-d9c18211.js → p-72117a18.js} +60 -60
  25. package/dist/solutions-components/{p-53836566.entry.js → p-84bbaebf.entry.js} +6 -6
  26. package/dist/solutions-components/p-88e28de2.js +36 -0
  27. package/dist/solutions-components/{p-728a1fc6.entry.js → p-ac76d270.entry.js} +16 -16
  28. package/dist/solutions-components/solutions-components.esm.js +6 -6
  29. package/dist/solutions-components/utils/queryUtils.ts +9 -17
  30. package/package.json +1 -1
  31. package/dist/solutions-components/p-1bfd07e3.js +0 -36
@@ -1,61 +1,61 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{a as t,c as r,g as i}from"./p-e1a4994d.js";import{_ as e}from"./p-375face5.js";import"./p-c2f00d41.js";import"./p-4aa3ba60.js";import"./p-829e6d4f.js";import"./p-1bfd07e3.js";import"./p-dbc9a5a8.js";var n,s,a=function(t){return t&&t.Math==Math&&t},o=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof t&&t)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},u=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,l=c?f.bind(f):function(){return f.apply(f,arguments)},v={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,p=d&&!v.call({1:2},1)?function(t){var r=d(this,t);return!!r&&r.enumerable}:v,y={f:p},g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=Function.prototype,b=m.call,w=c&&m.bind.bind(b,b),x=c?w:function(t){return function(){return b.apply(t,arguments)}},M=x({}.toString),k=x("".slice),S=function(t){return k(M(t),8,-1)},N=Object,P=x("".split),j=h((function(){return!N("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):N(t)}:N,O=function(t){return null==t},E=TypeError,T=function(t){if(O(t))throw E("Can't call method on "+t);return t},C=function(t){return j(T(t))},A="object"==typeof document&&document.all,R={all:A,IS_HTMLDDA:void 0===A&&void 0!==A},B=R.all,L=R.IS_HTMLDDA?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},$=R.all,I=R.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:L(t)||t===$}:function(t){return"object"==typeof t?null!==t:L(t)},D=function(t){return L(t)?t:void 0},F=function(t,r){return arguments.length<2?D(o[t]):o[t]&&o[t][r]},z=x({}.isPrototypeOf),_="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Y=o.process,X=o.Deno,q=Y&&Y.versions||X&&X.version,G=q&&q.v8;G&&(s=(n=G.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&_&&(!(n=_.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=_.match(/Chrome\/(\d+)/))&&(s=+n[1]);var U=s,V=!!Object.getOwnPropertySymbols&&!h((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&U&&U<41})),H=V&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,W=Object,Q=H?function(t){return"symbol"==typeof t}:function(t){var r=F("Symbol");return L(r)&&z(r.prototype,W(t))},Z=String,K=function(t){try{return Z(t)}catch(t){return"Object"}},J=TypeError,tt=function(t){if(L(t))return t;throw J(K(t)+" is not a function")},rt=function(t,r){var i=t[r];return O(i)?void 0:tt(i)},it=TypeError,et=Object.defineProperty,nt=function(t,r){try{et(o,t,{value:r,configurable:!0,writable:!0})}catch(i){o[t]=r}return r},st="__core-js_shared__",at=o[st]||nt(st,{}),ot=r((function(t){(t.exports=function(t,r){return at[t]||(at[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.27.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"})})),ht=Object,ut=function(t){return ht(T(t))},ct=x({}.hasOwnProperty),ft=Object.hasOwn||function(t,r){return ct(ut(t),r)},lt=0,vt=Math.random(),dt=x(1..toString),pt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+dt(++lt+vt,36)},yt=o.Symbol,gt=ot("wks"),mt=H?yt.for||yt:yt&&yt.withoutSetter||pt,bt=function(t){return ft(gt,t)||(gt[t]=V&&ft(yt,t)?yt[t]:mt("Symbol."+t)),gt[t]},wt=TypeError,xt=bt("toPrimitive"),Mt=function(t){var r=function(t,r){if(!I(t)||Q(t))return t;var i,e=rt(t,xt);if(e){if(void 0===r&&(r="default"),i=l(e,t,r),!I(i)||Q(i))return i;throw wt("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var i,e;if("string"===r&&L(i=t.toString)&&!I(e=l(i,t)))return e;if(L(i=t.valueOf)&&!I(e=l(i,t)))return e;if("string"!==r&&L(i=t.toString)&&!I(e=l(i,t)))return e;throw it("Can't convert object to primitive value")}(t,r)}(t,"string");return Q(r)?r:r+""},kt=o.document,St=I(kt)&&I(kt.createElement),Nt=function(t){return St?kt.createElement(t):{}},Pt=!u&&!h((function(){return 7!=Object.defineProperty(Nt("div"),"a",{get:function(){return 7}}).a})),jt=Object.getOwnPropertyDescriptor,Ot=u?jt:function(t,r){if(t=C(t),r=Mt(r),Pt)try{return jt(t,r)}catch(t){}if(ft(t,r))return g(!l(y.f,t,r),t[r])},Et={f:Ot},Tt=u&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ct=String,At=TypeError,Rt=function(t){if(I(t))return t;throw At(Ct(t)+" is not an object")},Bt=TypeError,Lt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,It="enumerable",Dt="configurable",Ft="writable",zt=u?Tt?function(t,r,i){if(Rt(t),r=Mt(r),Rt(i),"function"==typeof t&&"prototype"===r&&"value"in i&&Ft in i&&!i[Ft]){var e=$t(t,r);e&&e[Ft]&&(t[r]=i.value,i={configurable:Dt in i?i[Dt]:e[Dt],enumerable:It in i?i[It]:e[It],writable:!1})}return Lt(t,r,i)}:Lt:function(t,r,i){if(Rt(t),r=Mt(r),Rt(i),Pt)try{return Lt(t,r,i)}catch(t){}if("get"in i||"set"in i)throw Bt("Accessors not supported");return"value"in i&&(t[r]=i.value),t},_t={f:zt},Yt=u?function(t,r,i){return _t.f(t,r,g(1,i))}:function(t,r,i){return t[r]=i,t},Xt=Function.prototype,qt=u&&Object.getOwnPropertyDescriptor,Gt=ft(Xt,"name"),Ut={EXISTS:Gt,PROPER:Gt&&"something"===function(){}.name,CONFIGURABLE:Gt&&(!u||u&&qt(Xt,"name").configurable)},Vt=x(Function.toString);L(at.inspectSource)||(at.inspectSource=function(t){return Vt(t)});var Ht,Wt,Qt,Zt=at.inspectSource,Kt=o.WeakMap,Jt=L(Kt)&&/native code/.test(String(Kt)),tr=ot("keys"),rr=function(t){return tr[t]||(tr[t]=pt(t))},ir={},er="Object already initialized",nr=o.TypeError;if(Jt||at.state){var sr=at.state||(at.state=new(0,o.WeakMap));sr.get=sr.get,sr.has=sr.has,sr.set=sr.set,Ht=function(t,r){if(sr.has(t))throw nr(er);return r.facade=t,sr.set(t,r),r},Wt=function(t){return sr.get(t)||{}},Qt=function(t){return sr.has(t)}}else{var ar=rr("state");ir[ar]=!0,Ht=function(t,r){if(ft(t,ar))throw nr(er);return r.facade=t,Yt(t,ar,r),r},Wt=function(t){return ft(t,ar)?t[ar]:{}},Qt=function(t){return ft(t,ar)}}var or={set:Ht,get:Wt,has:Qt,enforce:function(t){return Qt(t)?Wt(t):Ht(t,{})},getterFor:function(t){return function(r){var i;if(!I(r)||(i=Wt(r)).type!==t)throw nr("Incompatible receiver, "+t+" required");return i}}},hr=r((function(t){var r=Ut.CONFIGURABLE,i=or.enforce,e=or.get,n=String,s=Object.defineProperty,a=x("".slice),o=x("".replace),c=x([].join),f=u&&!h((function(){return 8!==s((function(){}),"length",{value:8}).length})),l=String(String).split("String"),v=t.exports=function(t,e,h){"Symbol("===a(n(e),0,7)&&(e="["+o(n(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),h&&h.getter&&(e="get "+e),h&&h.setter&&(e="set "+e),(!ft(t,"name")||r&&t.name!==e)&&(u?s(t,"name",{value:e,configurable:!0}):t.name=e),f&&h&&ft(h,"arity")&&t.length!==h.arity&&s(t,"length",{value:h.arity});try{h&&ft(h,"constructor")&&h.constructor?u&&s(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var v=i(t);return ft(v,"source")||(v.source=c(l,"string"==typeof e?e:"")),t};Function.prototype.toString=v((function(){return L(this)&&e(this).source||Zt(this)}),"toString")})),ur=function(t,r,i,e){e||(e={});var n=e.enumerable,s=void 0!==e.name?e.name:r;if(L(i)&&hr(i,s,e),e.global)n?t[r]=i:nt(r,i);else{try{e.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=i:_t.f(t,r,{value:i,enumerable:!1,configurable:!e.nonConfigurable,writable:!e.nonWritable})}return t},cr=Math.ceil,fr=Math.floor,lr=Math.trunc||function(t){var r=+t;return(r>0?fr:cr)(r)},vr=function(t){var r=+t;return r!=r||0===r?0:lr(r)},dr=Math.max,pr=Math.min,yr=function(t,r){var i=vr(t);return i<0?dr(i+r,0):pr(i,r)},gr=Math.min,mr=function(t){return t>0?gr(vr(t),9007199254740991):0},br=function(t){return mr(t.length)},wr=function(t){return function(r,i,e){var n,s=C(r),a=br(s),o=yr(e,a);if(t&&i!=i){for(;a>o;)if((n=s[o++])!=n)return!0}else for(;a>o;o++)if((t||o in s)&&s[o]===i)return t||o||0;return!t&&-1}},xr={includes:wr(!0),indexOf:wr(!1)},Mr=xr.indexOf,kr=x([].push),Sr=function(t,r){var i,e=C(t),n=0,s=[];for(i in e)!ft(ir,i)&&ft(e,i)&&kr(s,i);for(;r.length>n;)ft(e,i=r[n++])&&(~Mr(s,i)||kr(s,i));return s},Nr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pr=Nr.concat("length","prototype"),jr=Object.getOwnPropertyNames||function(t){return Sr(t,Pr)},Or={f:jr},Er={f:Object.getOwnPropertySymbols},Tr=x([].concat),Cr=F("Reflect","ownKeys")||function(t){var r=Or.f(Rt(t)),i=Er.f;return i?Tr(r,i(t)):r},Ar=function(t,r,i){for(var e=Cr(r),n=_t.f,s=Et.f,a=0;a<e.length;a++){var o=e[a];ft(t,o)||i&&ft(i,o)||n(t,o,s(r,o))}},Rr=/#|\.prototype\./,Br=function(t,r){var i=$r[Lr(t)];return i==Dr||i!=Ir&&(L(r)?h(r):!!r)},Lr=Br.normalize=function(t){return String(t).replace(Rr,".").toLowerCase()},$r=Br.data={},Ir=Br.NATIVE="N",Dr=Br.POLYFILL="P",Fr=Br,zr=Et.f,_r=function(t,r){var i,e,n,s,a,h=t.target,u=t.global,c=t.stat;if(i=u?o:c?o[h]||nt(h,{}):(o[h]||{}).prototype)for(e in r){if(s=r[e],n=t.dontCallGetSet?(a=zr(i,e))&&a.value:i[e],!Fr(u?e:h+(c?".":"#")+e,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Ar(s,n)}(t.sham||n&&n.sham)&&Yt(s,"sham",!0),ur(i,e,s,t)}},Yr="undefined"!=typeof process&&"process"==S(process),Xr=String,qr=TypeError,Gr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),r=i instanceof Array}catch(t){}return function(i,e){return Rt(i),function(t){if("object"==typeof t||L(t))return t;throw qr("Can't set "+Xr(t)+" as a prototype")}(e),r?t(i,e):i.__proto__=e,i}}():void 0),Ur=_t.f,Vr=bt("toStringTag"),Hr=function(t,r,i){t&&!i&&(t=t.prototype),t&&!ft(t,Vr)&&Ur(t,Vr,{configurable:!0,value:r})},Wr=bt("species"),Qr=TypeError,Zr={};Zr[bt("toStringTag")]="z";var Kr="[object z]"===String(Zr),Jr=bt("toStringTag"),ti=Object,ri="Arguments"==S(function(){return arguments}()),ii=Kr?S:function(t){var r,i,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=ti(t),Jr))?i:ri?S(r):"Object"==(e=S(r))&&L(r.callee)?"Arguments":e},ei=function(){},ni=[],si=F("Reflect","construct"),ai=/^\s*(?:class|function)\b/,oi=x(ai.exec),hi=!ai.exec(ei),ui=function(t){if(!L(t))return!1;try{return si(ei,ni,t),!0}catch(t){return!1}},ci=function(t){if(!L(t))return!1;switch(ii(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return hi||!!oi(ai,Zt(t))}catch(t){return!0}};ci.sham=!0;var fi,li,vi,di,pi=!si||h((function(){var t;return ui(ui.call)||!ui(Object)||!ui((function(){t=!0}))||t}))?ci:ui,yi=TypeError,gi=bt("species"),mi=function(t,r){var i,e=Rt(t).constructor;return void 0===e||O(i=Rt(e)[gi])?r:function(t){if(pi(t))return t;throw yi(K(t)+" is not a constructor")}(i)},bi=Function.prototype,wi=bi.apply,xi=bi.call,Mi="object"==typeof Reflect&&Reflect.apply||(c?xi.bind(wi):function(){return xi.apply(wi,arguments)}),ki=function(t){if("Function"===S(t))return x(t)},Si=ki(ki.bind),Ni=function(t,r){return tt(t),void 0===r?t:c?Si(t,r):function(){return t.apply(r,arguments)}},Pi=F("document","documentElement"),ji=x([].slice),Oi=TypeError,Ei=function(t,r){if(t<r)throw Oi("Not enough arguments");return t},Ti=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),Ci=o.setImmediate,Ai=o.clearImmediate,Ri=o.process,Bi=o.Dispatch,Li=o.Function,$i=o.MessageChannel,Ii=o.String,Di=0,Fi={},zi="onreadystatechange";h((function(){fi=o.location}));var _i=function(t){if(ft(Fi,t)){var r=Fi[t];delete Fi[t],r()}},Yi=function(t){return function(){_i(t)}},Xi=function(t){_i(t.data)},qi=function(t){o.postMessage(Ii(t),fi.protocol+"//"+fi.host)};Ci&&Ai||(Ci=function(t){Ei(arguments.length,1);var r=L(t)?t:Li(t),i=ji(arguments,1);return Fi[++Di]=function(){Mi(r,void 0,i)},li(Di),Di},Ai=function(t){delete Fi[t]},Yr?li=function(t){Ri.nextTick(Yi(t))}:Bi&&Bi.now?li=function(t){Bi.now(Yi(t))}:$i&&!Ti?(di=(vi=new $i).port2,vi.port1.onmessage=Xi,li=Ni(di.postMessage,di)):o.addEventListener&&L(o.postMessage)&&!o.importScripts&&fi&&"file:"!==fi.protocol&&!h(qi)?(li=qi,o.addEventListener("message",Xi,!1)):li=zi in Nt("script")?function(t){Pi.appendChild(Nt("script"))[zi]=function(){Pi.removeChild(this),_i(t)}}:function(t){setTimeout(Yi(t),0)});var Gi={set:Ci,clear:Ai},Ui=function(){this.head=null,this.tail=null};Ui.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Vi,Hi,Wi,Qi,Zi,Ki=Ui,Ji=/ipad|iphone|ipod/i.test(_)&&"undefined"!=typeof Pebble,te=/web0s(?!.*chrome)/i.test(_),re=Gi.set,ie=o.MutationObserver||o.WebKitMutationObserver,ee=o.document,ne=o.process,se=o.Promise,ae=(0,Et.f)(o,"queueMicrotask"),oe=ae&&ae.value;if(!oe){var he=new Ki,ue=function(){var t,r;for(Yr&&(t=ne.domain)&&t.exit();r=he.get();)try{r()}catch(t){throw he.head&&Vi(),t}t&&t.enter()};Ti||Yr||te||!ie||!ee?!Ji&&se&&se.resolve?((Qi=se.resolve(void 0)).constructor=se,Zi=Ni(Qi.then,Qi),Vi=function(){Zi(ue)}):Yr?Vi=function(){ne.nextTick(ue)}:(re=Ni(re,o),Vi=function(){re(ue)}):(Hi=!0,Wi=ee.createTextNode(""),new ie(ue).observe(Wi,{characterData:!0}),Vi=function(){Wi.data=Hi=!Hi}),oe=function(t){he.head||Vi(),he.add(t)}}var ce,fe,le,ve,de=oe,pe=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},ye=o.Promise,ge="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,me=!ge&&!Yr&&"object"==typeof window&&"object"==typeof document,be=bt("species"),we=!1,xe=L(o.PromiseRejectionEvent),Me=Fr("Promise",(function(){var t=Zt(ye),r=t!==String(ye);if(!r&&66===U)return!0;if(!U||U<51||!/native code/.test(t)){var i=new ye((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((i.constructor={})[be]=e,!(we=i.then((function(){}))instanceof e))return!0}return!r&&(me||ge)&&!xe})),ke={CONSTRUCTOR:Me,REJECTION_EVENT:xe,SUBCLASSING:we},Se=TypeError,Ne=function(t){var r,i;this.promise=new t((function(t,e){if(void 0!==r||void 0!==i)throw Se("Bad Promise constructor");r=t,i=e})),this.resolve=tt(r),this.reject=tt(i)},Pe={f:function(t){return new Ne(t)}},je=Gi.set,Oe="Promise",Ee=ke.CONSTRUCTOR,Te=ke.REJECTION_EVENT,Ce=ke.SUBCLASSING,Ae=or.getterFor(Oe),Re=or.set,Be=ye&&ye.prototype,Le=ye,$e=Be,Ie=o.TypeError,De=o.document,Fe=o.process,ze=Pe.f,_e=ze,Ye=!!(De&&De.createEvent&&o.dispatchEvent),Xe="unhandledrejection",qe=function(t){var r;return!(!I(t)||!L(r=t.then))&&r},Ge=function(t,r){var i,e,n,s=r.value,a=1==r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&Qe(r),r.rejection=1),!0===o?i=s:(c&&c.enter(),i=o(s),c&&(c.exit(),n=!0)),i===t.promise?u(Ie("Promise-chain cycle")):(e=qe(i))?l(e,i,h,u):h(i)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},Ue=function(t,r){t.notified||(t.notified=!0,de((function(){for(var i,e=t.reactions;i=e.get();)Ge(i,t);t.notified=!1,r&&!t.rejection&&He(t)})))},Ve=function(t,r,i){var e,n;Ye?((e=De.createEvent("Event")).promise=r,e.reason=i,e.initEvent(t,!1,!0),o.dispatchEvent(e)):e={promise:r,reason:i},!Te&&(n=o["on"+t])?n(e):t===Xe&&function(t,r){try{1==arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",i)},He=function(t){l(je,o,(function(){var r,i=t.facade,e=t.value;if(We(t)&&(r=pe((function(){Yr?Fe.emit("unhandledRejection",e,i):Ve(Xe,i,e)})),t.rejection=Yr||We(t)?2:1,r.error))throw r.value}))},We=function(t){return 1!==t.rejection&&!t.parent},Qe=function(t){l(je,o,(function(){var r=t.facade;Yr?Fe.emit("rejectionHandled",r):Ve("rejectionhandled",r,t.value)}))},Ze=function(t,r,i){return function(e){t(r,e,i)}},Ke=function(t,r,i){t.done||(t.done=!0,i&&(t=i),t.value=r,t.state=2,Ue(t,!0))},Je=function(t,r,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===r)throw Ie("Promise can't be resolved itself");var e=qe(r);e?de((function(){var i={done:!1};try{l(e,r,Ze(Je,i,t),Ze(Ke,i,t))}catch(r){Ke(i,r,t)}})):(t.value=r,t.state=1,Ue(t,!1))}catch(r){Ke({done:!1},r,t)}}};if(Ee&&(Le=function(t){!function(t){if(z($e,t))return t;throw Qr("Incorrect invocation")}(this),tt(t),l(ce,this);var r=Ae(this);try{t(Ze(Je,r),Ze(Ke,r))}catch(t){Ke(r,t)}},(ce=function(){Re(this,{type:Oe,done:!1,notified:!1,parent:!1,reactions:new Ki,rejection:!1,state:0,value:void 0})}).prototype=ur($e=Le.prototype,"then",(function(t,r){var i=Ae(this),e=ze(mi(this,Le));return i.parent=!0,e.ok=!L(t)||t,e.fail=L(r)&&r,e.domain=Yr?Fe.domain:void 0,0==i.state?i.reactions.add(e):de((function(){Ge(e,i)})),e.promise})),fe=function(){var t=new ce,r=Ae(t);this.promise=t,this.resolve=Ze(Je,r),this.reject=Ze(Ke,r)},Pe.f=ze=function(t){return t===Le||void 0===t?new fe(t):_e(t)},L(ye)&&Be!==Object.prototype)){le=Be.then,Ce||ur(Be,"then",(function(t,r){var i=this;return new Le((function(t,r){l(le,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete Be.constructor}catch(t){}Gr&&Gr(Be,$e)}_r({global:!0,constructor:!0,wrap:!0,forced:Ee},{Promise:Le}),Hr(Le,Oe,!1),ve=F(Oe),u&&ve&&!ve[Wr]&&(0,_t.f)(ve,Wr,{configurable:!0,get:function(){return this}});var tn={},rn=bt("iterator"),en=Array.prototype,nn=bt("iterator"),sn=function(t){if(!O(t))return rt(t,nn)||rt(t,"@@iterator")||tn[ii(t)]},an=TypeError,on=function(t,r,i){var e,n;Rt(t);try{if(!(e=rt(t,"return"))){if("throw"===r)throw i;return i}e=l(e,t)}catch(t){n=!0,e=t}if("throw"===r)throw i;if(n)throw e;return Rt(e),i},hn=TypeError,un=function(t,r){this.stopped=t,this.result=r},cn=un.prototype,fn=function(t,r,i){var e,n,s,a,o,h,u,c,f=!(!i||!i.AS_ENTRIES),v=!(!i||!i.IS_RECORD),d=!(!i||!i.IS_ITERATOR),p=!(!i||!i.INTERRUPTED),y=Ni(r,i&&i.that),g=function(t){return e&&on(e,"normal",t),new un(!0,t)},m=function(t){return f?(Rt(t),p?y(t[0],t[1],g):y(t[0],t[1])):p?y(t,g):y(t)};if(v)e=t.iterator;else if(d)e=t;else{if(!(n=sn(t)))throw hn(K(t)+" is not iterable");if(void 0!==(c=n)&&(tn.Array===c||en[rn]===c)){for(s=0,a=br(t);a>s;s++)if((o=m(t[s]))&&z(cn,o))return o;return new un(!1)}e=function(t,r){var i=arguments.length<2?sn(t):r;if(tt(i))return Rt(l(i,t));throw an(K(t)+" is not iterable")}(t,n)}for(h=v?t.next:e.next;!(u=l(h,e)).done;){try{o=m(u.value)}catch(t){on(e,"throw",t)}if("object"==typeof o&&o&&z(cn,o))return o}return new un(!1)},ln=bt("iterator"),vn=!1;try{var dn=0,pn={next:function(){return{done:!!dn++}},return:function(){vn=!0}};pn[ln]=function(){return this},Array.from(pn,(function(){throw 2}))}catch(t){}var yn=ke.CONSTRUCTOR||!function(){if(!vn)return!1;var t=!1;try{var r={};r[ln]=function(){return{next:function(){return{done:t=!0}}}},ye.all(r).then(void 0,(function(){}))}catch(t){}return t}();_r({target:"Promise",stat:!0,forced:yn},{all:function(t){var r=this,i=Pe.f(r),e=i.resolve,n=i.reject,s=pe((function(){var i=tt(r.resolve),s=[],a=0,o=1;fn(t,(function(t){var h=a++,u=!1;o++,l(i,r,t).then((function(t){u||(u=!0,s[h]=t,--o||e(s))}),n)})),--o||e(s)}));return s.error&&n(s.value),i.promise}});var gn=ye&&ye.prototype;if(_r({target:"Promise",proto:!0,forced:ke.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),L(ye)){var mn=F("Promise").prototype.catch;gn.catch!==mn&&ur(gn,"catch",mn,{unsafe:!0})}_r({target:"Promise",stat:!0,forced:yn},{race:function(t){var r=this,i=Pe.f(r),e=i.reject,n=pe((function(){var n=tt(r.resolve);fn(t,(function(t){l(n,r,t).then(i.resolve,e)}))}));return n.error&&e(n.value),i.promise}}),_r({target:"Promise",stat:!0,forced:ke.CONSTRUCTOR},{reject:function(t){var r=Pe.f(this);return l(r.reject,void 0,t),r.promise}}),_r({target:"Promise",stat:!0,forced:ke.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(Rt(t),I(r)&&r.constructor===t)return r;var i=Pe.f(t);return(0,i.resolve)(r),i.promise}(this,t)}});const bn=i(r((function(t){function r(t,r,i,e,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void i(t)}o.done?r(h):Promise.resolve(h).then(e,n)}t.exports=function(t){return function(){var i=this,e=arguments;return new Promise((function(n,s){var a=t.apply(i,e);function o(t){r(a,n,s,o,h,"next",t)}function h(t){r(a,n,s,o,h,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports})));var wn,xn=String,Mn=function(t){if("Symbol"===ii(t))throw TypeError("Cannot convert a Symbol value to a string");return xn(t)},kn=function(){var t=Rt(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Sn=o.RegExp,Nn=h((function(){var t=Sn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Pn=Nn||h((function(){return!Sn("a","y").sticky})),jn={BROKEN_CARET:Nn||h((function(){var t=Sn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Pn,UNSUPPORTED_Y:Nn},On=Object.keys||function(t){return Sr(t,Nr)},En=u&&!Tt?Object.defineProperties:function(t,r){Rt(t);for(var i,e=C(r),n=On(r),s=n.length,a=0;s>a;)_t.f(t,i=n[a++],e[i]);return t},Tn={f:En},Cn="prototype",An="script",Rn=rr("IE_PROTO"),Bn=function(){},Ln=function(t){return"<"+An+">"+t+"</"+An+">"},$n=function(t){t.write(Ln("")),t.close();var r=t.parentWindow.Object;return t=null,r},In=function(){try{wn=new ActiveXObject("htmlfile")}catch(t){}var t,r,i;In="undefined"!=typeof document?document.domain&&wn?$n(wn):(r=Nt("iframe"),i="java"+An+":",r.style.display="none",Pi.appendChild(r),r.src=String(i),(t=r.contentWindow.document).open(),t.write(Ln("document.F=Object")),t.close(),t.F):$n(wn);for(var e=Nr.length;e--;)delete In[Cn][Nr[e]];return In()};ir[Rn]=!0;var Dn,Fn,zn=Object.create||function(t,r){var i;return null!==t?(Bn[Cn]=Rt(t),i=new Bn,Bn[Cn]=null,i[Rn]=t):i=In(),void 0===r?i:Tn.f(i,r)},_n=o.RegExp,Yn=h((function(){var t=_n(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Xn=o.RegExp,qn=h((function(){var t=Xn("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Gn=or.get,Un=ot("native-string-replace",String.prototype.replace),Vn=RegExp.prototype.exec,Hn=Vn,Wn=x("".charAt),Qn=x("".indexOf),Zn=x("".replace),Kn=x("".slice),Jn=(Fn=/b*/g,l(Vn,Dn=/a/,"a"),l(Vn,Fn,"a"),0!==Dn.lastIndex||0!==Fn.lastIndex),ts=jn.BROKEN_CARET,rs=void 0!==/()??/.exec("")[1];(Jn||rs||ts||Yn||qn)&&(Hn=function(t){var r,i,e,n,s,a,o,h=this,u=Gn(h),c=Mn(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=l(Hn,f,c),h.lastIndex=f.lastIndex,r;var v=u.groups,d=ts&&h.sticky,p=l(kn,h),y=h.source,g=0,m=c;if(d&&(p=Zn(p,"y",""),-1===Qn(p,"g")&&(p+="g"),m=Kn(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Wn(c,h.lastIndex-1))&&(y="(?: "+y+")",m=" "+m,g++),i=new RegExp("^(?:"+y+")",p)),rs&&(i=new RegExp("^"+y+"$(?!\\s)",p)),Jn&&(e=h.lastIndex),n=l(Vn,d?i:h,m),d?n?(n.input=Kn(n.input,g),n[0]=Kn(n[0],g),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:Jn&&n&&(h.lastIndex=h.global?n.index+n[0].length:e),rs&&n&&n.length>1&&l(Un,n[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&v)for(n.groups=a=zn(null),s=0;s<v.length;s++)a[(o=v[s])[0]]=n[o[1]];return n});var is=Hn;_r({target:"RegExp",proto:!0,forced:/./.exec!==is},{exec:is});var es=bt("species"),ns=RegExp.prototype,ss=function(t,r,i,e){var n=bt(t),s=!h((function(){var r={};return r[n]=function(){return 7},7!=""[t](r)})),a=s&&!h((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[es]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return r=!0,null},i[n](""),!r}));if(!s||!a||i){var o=ki(/./[n]),u=r(n,""[t],(function(t,r,i,e,n){var a=ki(t),h=r.exec;return h===is||h===ns.exec?s&&!n?{done:!0,value:o(r,i,e)}:{done:!0,value:a(i,r,e)}:{done:!1}}));ur(String.prototype,t,u[0]),ur(ns,n,u[1])}e&&Yt(ns[n],"sham",!0)},as=x("".charAt),os=x("".charCodeAt),hs=x("".slice),us=function(t){return function(r,i){var e,n,s=Mn(T(r)),a=vr(i),o=s.length;return a<0||a>=o?t?"":void 0:(e=os(s,a))<55296||e>56319||a+1===o||(n=os(s,a+1))<56320||n>57343?t?as(s,a):e:t?hs(s,a,a+2):n-56320+(e-55296<<10)+65536}},cs=(us(!1),us(!0)),fs=function(t,r,i){return r+(i?cs(t,r).length:1)},ls=TypeError,vs=function(t,r){var i=t.exec;if(L(i)){var e=l(i,t,r);return null!==e&&Rt(e),e}if("RegExp"===S(t))return l(is,t,r);throw ls("RegExp#exec called on incompatible receiver")};ss("match",(function(t,r,i){return[function(r){var i=T(this),e=O(r)?void 0:rt(r,t);return e?l(e,r,i):new RegExp(r)[t](Mn(i))},function(t){var e=Rt(this),n=Mn(t),s=i(r,e,n);if(s.done)return s.value;if(!e.global)return vs(e,n);var a=e.unicode;e.lastIndex=0;for(var o,h=[],u=0;null!==(o=vs(e,n));){var c=Mn(o[0]);h[u]=c,""===c&&(e.lastIndex=fs(n,mr(e.lastIndex),a)),u++}return 0===u?null:h}]}));var ds=Math.floor,ps=x("".charAt),ys=x("".replace),gs=x("".slice),ms=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bs=/\$([$&'`]|\d{1,2})/g,ws=function(t,r,i,e,n,s){var a=i+t.length,o=e.length,h=bs;return void 0!==n&&(n=ut(n),h=ms),ys(s,h,(function(s,h){var u;switch(ps(h,0)){case"$":return"$";case"&":return t;case"`":return gs(r,0,i);case"'":return gs(r,a);case"<":u=n[gs(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=ds(c/10);return 0===f?s:f<=o?void 0===e[f-1]?ps(h,1):e[f-1]+ps(h,1):s}u=e[c-1]}return void 0===u?"":u}))},xs=bt("replace"),Ms=Math.max,ks=Math.min,Ss=x([].concat),Ns=x([].push),Ps=x("".indexOf),js=x("".slice),Os="$0"==="a".replace(/./,"$0"),Es=!!/./[xs]&&""===/./[xs]("a","$0");ss("replace",(function(t,r,i){var e=Es?"$":"$0";return[function(t,i){var e=T(this),n=O(t)?void 0:rt(t,xs);return n?l(n,t,e,i):l(r,Mn(e),t,i)},function(t,n){var s=Rt(this),a=Mn(t);if("string"==typeof n&&-1===Ps(n,e)&&-1===Ps(n,"$<")){var o=i(r,s,a,n);if(o.done)return o.value}var h=L(n);h||(n=Mn(n));var u=s.global;if(u){var c=s.unicode;s.lastIndex=0}for(var f=[];;){var l=vs(s,a);if(null===l)break;if(Ns(f,l),!u)break;""===Mn(l[0])&&(s.lastIndex=fs(a,mr(s.lastIndex),c))}for(var v,d="",p=0,y=0;y<f.length;y++){for(var g=Mn((l=f[y])[0]),m=Ms(ks(vr(l.index),a.length),0),b=[],w=1;w<l.length;w++)Ns(b,void 0===(v=l[w])?v:String(v));var x=l.groups;if(h){var M=Ss([g],b,m,a);void 0!==x&&Ns(M,x);var k=Mn(Mi(n,void 0,M))}else k=ws(g,a,m,b,x,n);m>=p&&(d+=js(a,p,m)+k,p=m+g.length)}return d+js(a,p)}]}),!!h((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Os||Es);var Ts,Cs=bt("match"),As=function(t){var r;return I(t)&&(void 0!==(r=t[Cs])?!!r:"RegExp"==S(t))},Rs=TypeError,Bs=function(t){if(As(t))throw Rs("The method doesn't accept regular expressions");return t},Ls=bt("match"),$s=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Ls]=!1,"/./"[t](r)}catch(t){}}return!1},Is=Et.f,Ds=ki("".startsWith),Fs=ki("".slice),zs=Math.min,_s=$s("startsWith"),Ys=!(_s||(Ts=Is(String.prototype,"startsWith"),!Ts||Ts.writable));_r({target:"String",proto:!0,forced:!Ys&&!_s},{startsWith:function(t){var r=Mn(T(this));Bs(t);var i=mr(zs(arguments.length>1?arguments[1]:void 0,r.length)),e=Mn(t);return Ds?Ds(r,e,i):Fs(r,i,i+e.length)===e}});var Xs=_t.f,qs=bt("unscopables"),Gs=Array.prototype;null==Gs[qs]&&Xs(Gs,qs,{configurable:!0,value:zn(null)});var Us,Vs,Hs,Ws=function(t){Gs[qs][t]=!0},Qs=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Zs=rr("IE_PROTO"),Ks=Object,Js=Ks.prototype,ta=Qs?Ks.getPrototypeOf:function(t){var r=ut(t);if(ft(r,Zs))return r[Zs];var i=r.constructor;return L(i)&&r instanceof i?i.prototype:r instanceof Ks?Js:null},ra=bt("iterator"),ia=!1;[].keys&&("next"in(Hs=[].keys())?(Vs=ta(ta(Hs)))!==Object.prototype&&(Us=Vs):ia=!0);var ea=!I(Us)||h((function(){var t={};return Us[ra].call(t)!==t}));ea&&(Us={}),L(Us[ra])||ur(Us,ra,(function(){return this}));var na={IteratorPrototype:Us,BUGGY_SAFARI_ITERATORS:ia},sa=na.IteratorPrototype,aa=function(){return this},oa=Ut.PROPER,ha=Ut.CONFIGURABLE,ua=na.IteratorPrototype,ca=na.BUGGY_SAFARI_ITERATORS,fa=bt("iterator"),la="keys",va="values",da="entries",pa=function(){return this},ya=function(t,r){return{value:t,done:r}},ga=_t.f,ma="Array Iterator",ba=or.set,wa=or.getterFor(ma),xa=function(t,r,i,e,n){!function(t,r,i){var e=r+" Iterator";t.prototype=zn(sa,{next:g(1,i)}),Hr(t,e,!1),tn[e]=aa}(i,r,(function(){var t=wa(this),r=t.target,i=t.kind,e=t.index++;return!r||e>=r.length?(t.target=void 0,ya(void 0,!0)):ya("keys"==i?e:"values"==i?r[e]:[e,r[e]],!1)}));var s,a,o,h=function(t){if(t===n&&d)return d;if(!ca&&t in f)return f[t];switch(t){case la:case va:case da:return function(){return new i(this,t)}}return function(){return new i(this)}},u=r+" Iterator",c=!1,f=t.prototype,v=f[fa]||f["@@iterator"]||n&&f[n],d=!ca&&v||h(n),p=f.entries||v;if(p&&(s=ta(p.call(new t)))!==Object.prototype&&s.next&&(ta(s)!==ua&&(Gr?Gr(s,ua):L(s[fa])||ur(s,fa,pa)),Hr(s,u,!0)),oa&&v&&v.name!==va&&(ha?Yt(f,"name",va):(c=!0,d=function(){return l(v,this)})),n)if(void(a={values:h(va),keys:h(la),entries:h(da)}))for(o in a)(ca||c||!(o in f))&&ur(f,o,a[o]);else _r({target:r,proto:!0,forced:ca||c},a);return f[fa]!==d&&ur(f,fa,d,{name:n}),tn[r]=d,a}(Array,"Array",(function(t,r){ba(this,{type:ma,target:C(t),index:0,kind:r})}),0,"values"),Ma=tn.Arguments=tn.Array;if(Ws("keys"),Ws("values"),Ws("entries"),u&&"values"!==Ma.name)try{ga(Ma,"name",{value:"values"})}catch(t){}var ka={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=Nt("span").classList,Na=Sa&&Sa.constructor&&Sa.constructor.prototype,Pa=Na===Object.prototype?void 0:Na,ja=bt("iterator"),Oa=bt("toStringTag"),Ea=xa.values,Ta=function(t,r){if(t){if(t[ja]!==Ea)try{Yt(t,ja,Ea)}catch(r){t[ja]=Ea}if(t[Oa]||Yt(t,Oa,r),ka[r])for(var i in xa)if(t[i]!==xa[i])try{Yt(t,i,xa[i])}catch(r){t[i]=xa[i]}}};for(var Ca in ka)Ta(o[Ca]&&o[Ca].prototype,Ca);Ta(Pa,"DOMTokenList");var Aa=r((function(t){var r=e.default;t.exports=function(t,i){if("object"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),Ra=r((function(t){var r=e.default;t.exports=function(t){var i=Aa(t,"string");return"symbol"===r(i)?i:String(i)},t.exports.__esModule=!0,t.exports.default=t.exports}));const Ba=i(r((function(t){t.exports=function(t,r,i){return(r=Ra(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports})));var La=TypeError,$a=function(t){return function(r,i,e,n){tt(i);var s=ut(r),a=j(s),o=br(s),h=t?o-1:0,u=t?-1:1;if(e<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw La("Reduce of empty array with no initial value")}for(;t?h>=0:o>h;h+=u)h in a&&(n=i(n,a[h],h,s));return n}},Ia=function(t,r){var i=[][t];return!!i&&h((function(){i.call(null,r||function(){return 1},1)}))},Da=[$a(!1),$a(!0)][0],Fa=!Yr&&U>79&&U<83||!Ia("reduce");_r({target:"Array",proto:!0,forced:Fa},{reduce:function(t){var r=arguments.length;return Da(this,t,r,r>1?arguments[1]:void 0)}});var za=Et.f,_a=ki("".endsWith),Ya=ki("".slice),Xa=Math.min,qa=$s("endsWith"),Ga=!qa&&!!function(){var t=za(String.prototype,"endsWith");return t&&!t.writable}();_r({target:"String",proto:!0,forced:!Ga&&!qa},{endsWith:function(t){var r=Mn(T(this));Bs(t);var i=arguments.length>1?arguments[1]:void 0,e=r.length,n=void 0===i?e:Xa(mr(i),e),s=Mn(t);return _a?_a(r,s,n):Ya(r,n-s.length,n)===s}});var Ua=Array,Va=Math.max,Ha=function(t,r,i){for(var e,n,s,a=br(t),o=yr(r,a),h=yr(void 0===i?a:i,a),u=Ua(Va(h-o,0)),c=0;o<h;o++,c++)e=u,n=t[o],void 0,(s=Mt(c))in e?_t.f(e,s,g(0,n)):e[s]=n;return u.length=c,u},Wa=jn.UNSUPPORTED_Y,Qa=4294967295,Za=Math.min,Ka=[].push,Ja=x(/./.exec),to=x(Ka),ro=x("".slice);ss("split",(function(t,r,i){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var e=Mn(T(this)),n=void 0===i?Qa:i>>>0;if(0===n)return[];if(void 0===t)return[e];if(!As(t))return l(r,e,t,n);for(var s,a,o,h=[],u=0,c=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(s=l(is,c,e))&&!((a=c.lastIndex)>u&&(to(h,ro(e,u,s.index)),s.length>1&&s.index<e.length&&Mi(Ka,h,Ha(s,1)),o=s[0].length,u=a,h.length>=n));)c.lastIndex===s.index&&c.lastIndex++;return u===e.length?!o&&Ja(c,"")||to(h,""):to(h,ro(e,u)),h.length>n?Ha(h,0,n):h}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:l(r,this,t,i)}:r,[function(r,i){var n=T(this),s=O(r)?void 0:rt(r,t);return s?l(s,r,n,i):l(e,Mn(n),r,i)},function(t,n){var s=Rt(this),a=Mn(t),o=i(e,s,a,n,e!==r);if(o.done)return o.value;var h=mi(s,RegExp),u=s.unicode,c=new h(Wa?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Wa?"g":"y")),f=void 0===n?Qa:n>>>0;if(0===f)return[];if(0===a.length)return null===vs(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=Wa?0:v;var p,y=vs(c,Wa?ro(a,v):a);if(null===y||(p=Za(mr(c.lastIndex+(Wa?v:0)),a.length))===l)v=fs(a,v,u);else{if(to(d,ro(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(to(d,y[g]),d.length===f)return d;v=l=p}}return to(d,ro(a,l)),d}]}),!!h((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),Wa);for(var io=r((function(r){(function(){var t,i,e,n,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?r.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(r.exports=function(){return(t()-s)/1e6},i=process.hrtime,n=(t=function(){var t;return 1e9*(t=i())[0]+t[1]})(),a=1e9*process.uptime(),s=n-a):Date.now?(r.exports=function(){return Date.now()-e},e=Date.now()):(r.exports=function(){return(new Date).getTime()-e},e=(new Date).getTime())}).call(t)})),eo="undefined"==typeof window?t:window,no=["moz","webkit"],so="AnimationFrame",ao=eo["request"+so],oo=eo["cancel"+so]||eo["cancelRequest"+so],ho=0;!ao&&ho<no.length;ho++)ao=eo[no[ho]+"Request"+so],oo=eo[no[ho]+"Cancel"+so]||eo[no[ho]+"CancelRequest"+so];if(!ao||!oo){var uo=0,co=0,fo=[];ao=function(t){if(0===fo.length){var r=io(),i=Math.max(0,16.666666666666668-(r-uo));uo=i+r,setTimeout((function(){var t=fo.slice(0);fo.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(uo)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return fo.push({handle:++co,callback:t,cancelled:!1}),co},oo=function(t){for(var r=0;r<fo.length;r++)fo[r].handle===t&&(fo[r].cancelled=!0)}}var lo=function(t){return ao.call(eo,t)};lo.cancel=function(){oo.apply(eo,arguments)},lo.polyfill=function(t){t||(t=eo),t.requestAnimationFrame=ao,t.cancelAnimationFrame=oo};var vo,po="\t\n\v\f\r                 \u2028\u2029\ufeff",yo=x("".replace),go="["+po+"]",mo=RegExp("^"+go+go+"*"),bo=RegExp(go+go+"*$"),wo=function(t){return function(r){var i=Mn(T(r));return 1&t&&(i=yo(i,mo,"")),2&t&&(i=yo(i,bo,"")),i}},xo={start:wo(1),end:wo(2),trim:wo(3)},Mo=Ut.PROPER,ko=xo.trim;_r({target:"String",proto:!0,forced:(vo="trim",h((function(){return!!po[vo]()||"​…᠎"!=="​…᠎"[vo]()||Mo&&po[vo].name!==vo})))},{trim:function(){return ko(this)}});var So=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var i=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],e=0;e<i.length;e++){var n=i[e].process,s=i[e].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[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 t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,e=0;e<i.length;e++)for(var n=i[e].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var h=document.createElement("li"),u=new RGBColor(t[e]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[e]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},No=xr.indexOf,Po=ki([].indexOf),jo=!!Po&&1/Po([1],1,-0)<0,Oo=jo||!Ia("indexOf");_r({target:"Array",proto:!0,forced:Oo},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return jo?Po(this,t,r)||0:No(this,t,r)}});var Eo=x("".indexOf);_r({target:"String",proto:!0,forced:!$s("includes")},{includes:function(t){return!!~Eo(Mn(T(this)),Mn(Bs(t)),arguments.length>1?arguments[1]:void 0)}});var To=Array.isArray||function(t){return"Array"==S(t)},Co=x([].reverse),Ao=[1,2];_r({target:"Array",proto:!0,forced:String(Ao)===String(Ao.reverse())},{reverse:function(){return To(this)&&(this.length=this.length),Co(this)}});
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- var Ro=function(t,r){return(Ro=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(t,r)};function Bo(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}Ro(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}function Lo(t,r){var i=t[0],e=t[1];return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function $o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var i=0;i<t.length;i++)if("number"!=typeof t[i])throw new Error("assertNumbers arguments["+i+"] is not a number. "+typeof t[i]+" == typeof "+t[i]);return!0}var Io=Math.PI;function Do(t,r,i){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var e=t.rX,n=t.rY,s=t.x,a=t.y;e=Math.abs(t.rX),n=Math.abs(t.rY);var o=Lo([(r-s)/2,(i-a)/2],-t.xRot/180*Io),h=o[0],u=o[1],c=Math.pow(h,2)/Math.pow(e,2)+Math.pow(u,2)/Math.pow(n,2);1<c&&(e*=Math.sqrt(c),n*=Math.sqrt(c)),t.rX=e,t.rY=n;var f=Math.pow(e,2)*Math.pow(u,2)+Math.pow(n,2)*Math.pow(h,2),l=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(e,2)*Math.pow(n,2)-f)/f)),v=e*u/n*l,d=-n*h/e*l,p=Lo([v,d],t.xRot/180*Io);t.cX=p[0]+(r+s)/2,t.cY=p[1]+(i+a)/2,t.phi1=Math.atan2((u-d)/n,(h-v)/e),t.phi2=Math.atan2((-u-d)/n,(-h-v)/e),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*Io),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*Io),t.phi1*=180/Io,t.phi2*=180/Io}function Fo(t,r,i){$o(t,r,i);var e=t*t+r*r-i*i;if(0>e)return[];if(0===e)return[[t*i/(t*t+r*r),r*i/(t*t+r*r)]];var n=Math.sqrt(e);return[[(t*i+r*n)/(t*t+r*r),(r*i-t*n)/(t*t+r*r)],[(t*i-r*n)/(t*t+r*r),(r*i+t*n)/(t*t+r*r)]]}var zo,_o=Math.PI/180;function Yo(t,r,i){return(1-i)*t+i*r}function Xo(t,r,i,e){return t+Math.cos(e/180*Io)*r+Math.sin(e/180*Io)*i}function qo(t,r,i,e){var n=1e-6,s=r-t,a=i-r,o=3*s+3*(e-i)-6*a,h=6*(a-s),u=3*s;return Math.abs(o)<n?[-u/h]:function(t,r,i){void 0===i&&(i=1e-6);var e=t*t/4-r;if(e<-i)return[];if(e<=i)return[-t/2];var n=Math.sqrt(e);return[-t/2-n,-t/2+n]}(h/o,u/o,n)}function Go(t,r,i,e,n){var s=1-n;return t*(s*s*s)+r*(3*s*s*n)+i*(3*s*n*n)+e*(n*n*n)}!function(t){function r(){return n((function(t,r,i){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=i),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=i),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=i),t.relative=!1),t}))}function i(){var t=NaN,r=NaN,i=NaN,e=NaN;return n((function(n,s,a){return n.type&Zo.SMOOTH_CURVE_TO&&(n.type=Zo.CURVE_TO,t=isNaN(t)?s:t,r=isNaN(r)?a:r,n.x1=n.relative?s-t:2*s-t,n.y1=n.relative?a-r:2*a-r),n.type&Zo.CURVE_TO?(t=n.relative?s+n.x2:n.x2,r=n.relative?a+n.y2:n.y2):(t=NaN,r=NaN),n.type&Zo.SMOOTH_QUAD_TO&&(n.type=Zo.QUAD_TO,i=isNaN(i)?s:i,e=isNaN(e)?a:e,n.x1=n.relative?s-i:2*s-i,n.y1=n.relative?a-e:2*a-e),n.type&Zo.QUAD_TO?(i=n.relative?s+n.x1:n.x1,e=n.relative?a+n.y1:n.y1):(i=NaN,e=NaN),n}))}function e(){var t=NaN,r=NaN;return n((function(i,e,n){if(i.type&Zo.SMOOTH_QUAD_TO&&(i.type=Zo.QUAD_TO,t=isNaN(t)?e:t,r=isNaN(r)?n:r,i.x1=i.relative?e-t:2*e-t,i.y1=i.relative?n-r:2*n-r),i.type&Zo.QUAD_TO){t=i.relative?e+i.x1:i.x1,r=i.relative?n+i.y1:i.y1;var s=i.x1,a=i.y1;i.type=Zo.CURVE_TO,i.x1=((i.relative?0:e)+2*s)/3,i.y1=((i.relative?0:n)+2*a)/3,i.x2=(i.x+2*s)/3,i.y2=(i.y+2*a)/3}else t=NaN,r=NaN;return i}))}function n(t){var r=0,i=0,e=NaN,n=NaN;return function(s){if(isNaN(e)&&!(s.type&Zo.MOVE_TO))throw new Error("path must start with moveto");var a=t(s,r,i,e,n);return s.type&Zo.CLOSE_PATH&&(r=e,i=n),void 0!==s.x&&(r=s.relative?r+s.x:s.x),void 0!==s.y&&(i=s.relative?i+s.y:s.y),s.type&Zo.MOVE_TO&&(e=r,n=i),a}}function s(t,r,i,e,s,a){return $o(t,r,i,e,s,a),n((function(n,o,h,u){var c=n.x1,f=n.x2,l=n.relative&&!isNaN(u),v=void 0!==n.x?n.x:l?0:o,d=void 0!==n.y?n.y:l?0:h;function p(t){return t*t}n.type&Zo.HORIZ_LINE_TO&&0!==r&&(n.type=Zo.LINE_TO,n.y=n.relative?0:h),n.type&Zo.VERT_LINE_TO&&0!==i&&(n.type=Zo.LINE_TO,n.x=n.relative?0:o),void 0!==n.x&&(n.x=n.x*t+d*i+(l?0:s)),void 0!==n.y&&(n.y=v*r+n.y*e+(l?0:a)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*i+(l?0:s)),void 0!==n.y1&&(n.y1=c*r+n.y1*e+(l?0:a)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*i+(l?0:s)),void 0!==n.y2&&(n.y2=f*r+n.y2*e+(l?0:a));var y=t*e-r*i;if(void 0!==n.xRot&&(1!==t||0!==r||0!==i||1!==e))if(0===y)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=Zo.LINE_TO;else{var g=n.xRot*Math.PI/180,m=Math.sin(g),b=Math.cos(g),w=1/p(n.rX),x=1/p(n.rY),M=p(b)*w+p(m)*x,k=2*m*b*(w-x),S=p(m)*w+p(b)*x,N=M*e*e-k*r*e+S*r*r,P=k*(t*e+r*i)-2*(M*i*e+S*t*r),j=M*i*i-k*t*i+S*t*t,O=(Math.atan2(P,N-j)+Math.PI)%Math.PI/2,E=Math.sin(O),T=Math.cos(O);n.rX=Math.abs(y)/Math.sqrt(N*p(T)+P*E*T+j*p(E)),n.rY=Math.abs(y)/Math.sqrt(N*p(E)-P*E*T+j*p(T)),n.xRot=180*O/Math.PI}return void 0!==n.sweepFlag&&0>y&&(n.sweepFlag=+!n.sweepFlag),n}))}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),$o(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return n((function(t,r,i){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=i),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=i),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=i),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,i){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===i&&(i=!0),n((function(e,n,s,a,o){if(isNaN(a)&&!(e.type&Zo.MOVE_TO))throw new Error("path must start with moveto");return r&&e.type&Zo.HORIZ_LINE_TO&&(e.type=Zo.LINE_TO,e.y=e.relative?0:s),i&&e.type&Zo.VERT_LINE_TO&&(e.type=Zo.LINE_TO,e.x=e.relative?0:n),t&&e.type&Zo.CLOSE_PATH&&(e.type=Zo.LINE_TO,e.x=e.relative?a-n:a,e.y=e.relative?o-s:o),e.type&Zo.ARC&&(0===e.rX||0===e.rY)&&(e.type=Zo.LINE_TO,delete e.rX,delete e.rY,delete e.xRot,delete e.lArcFlag,delete e.sweepFlag),e}))},t.NORMALIZE_ST=i,t.QT_TO_C=e,t.INFO=n,t.SANITIZE=function(t){void 0===t&&(t=0),$o(t);var r=NaN,i=NaN,e=NaN,s=NaN;return n((function(n,a,o,h,u){var c=Math.abs,f=!1,l=0,v=0;if(n.type&Zo.SMOOTH_CURVE_TO&&(l=isNaN(r)?0:a-r,v=isNaN(i)?0:o-i),n.type&(Zo.CURVE_TO|Zo.SMOOTH_CURVE_TO)?(r=n.relative?a+n.x2:n.x2,i=n.relative?o+n.y2:n.y2):(r=NaN,i=NaN),n.type&Zo.SMOOTH_QUAD_TO?(e=isNaN(e)?a:2*a-e,s=isNaN(s)?o:2*o-s):n.type&Zo.QUAD_TO?(e=n.relative?a+n.x1:n.x1,s=n.relative?o+n.y1:n.y2):(e=NaN,s=NaN),n.type&Zo.LINE_COMMANDS||n.type&Zo.ARC&&(0===n.rX||0===n.rY||!n.lArcFlag)||n.type&Zo.CURVE_TO||n.type&Zo.SMOOTH_CURVE_TO||n.type&Zo.QUAD_TO||n.type&Zo.SMOOTH_QUAD_TO){var d=void 0===n.x?0:n.relative?n.x:n.x-a,p=void 0===n.y?0:n.relative?n.y:n.y-o;l=isNaN(e)?void 0===n.x1?l:n.relative?n.x:n.x1-a:e-a,v=isNaN(s)?void 0===n.y1?v:n.relative?n.y:n.y1-o:s-o;var y=void 0===n.x2?0:n.relative?n.x:n.x2-a,g=void 0===n.y2?0:n.relative?n.y:n.y2-o;c(d)<=t&&c(p)<=t&&c(l)<=t&&c(v)<=t&&c(y)<=t&&c(g)<=t&&(f=!0)}return n.type&Zo.CLOSE_PATH&&c(a-h)<=t&&c(o-u)<=t&&(f=!0),f?[]:n}))},t.MATRIX=s,t.ROTATE=function(t,r,i){void 0===r&&(r=0),void 0===i&&(i=0),$o(t,r,i);var e=Math.sin(t),n=Math.cos(t);return s(n,e,-e,n,r-r*n+i*e,i-r*e-i*n)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),$o(t,r),s(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),$o(t,r),s(t,0,0,r,0,0)},t.SKEW_X=function(t){return $o(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return $o(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),$o(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),$o(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return n((function(t,r,i){return Zo.ARC===t.type?function(t,r,i){var e,n,s,a;t.cX||Do(t,r,i);for(var o=Math.min(t.phi1,t.phi2),h=Math.max(t.phi1,t.phi2)-o,u=Math.ceil(h/90),c=new Array(u),f=r,l=i,v=0;v<u;v++){var d=Yo(t.phi1,t.phi2,v/u),p=Yo(t.phi1,t.phi2,(v+1)/u),y=4/3*Math.tan((p-d)*_o/4),g=[Math.cos(d*_o)-y*Math.sin(d*_o),Math.sin(d*_o)+y*Math.cos(d*_o)],m=g[0],b=g[1],w=[Math.cos(p*_o),Math.sin(p*_o)],x=w[0],M=w[1],k=[x+y*Math.sin(p*_o),M-y*Math.cos(p*_o)],S=k[0],N=k[1];c[v]={relative:t.relative,type:Zo.CURVE_TO};var P=function(r,i){var e=Lo([r*t.rX,i*t.rY],t.xRot);return[t.cX+e[0],t.cY+e[1]]};e=P(m,b),c[v].x1=e[0],c[v].y1=e[1],n=P(S,N),c[v].x2=n[0],c[v].y2=n[1],s=P(x,M),c[v].x=s[0],c[v].y=s[1],t.relative&&(c[v].x1-=f,c[v].y1-=l,c[v].x2-=f,c[v].y2-=l,c[v].x-=f,c[v].y-=l),f=(a=[c[v].x,c[v].y])[0],l=a[1]}return c}(t,t.relative?0:r,t.relative?0:i):t}))},t.ANNOTATE_ARCS=function(){return n((function(t,r,i){return t.relative&&(r=0,i=0),Zo.ARC===t.type&&Do(t,r,i),t}))},t.CLONE=function(){return function(t){var r={};for(var i in t)r[i]=t[i];return r}},t.CALCULATE_BOUNDS=function(){var t=r(),s=e(),a=i(),o=n((function(r,i,e){var n=a(s(t(function(t){var r={};for(var i in t)r[i]=t[i];return r}(r))));function h(t){t>o.maxX&&(o.maxX=t),t<o.minX&&(o.minX=t)}function u(t){t>o.maxY&&(o.maxY=t),t<o.minY&&(o.minY=t)}if(n.type&Zo.DRAWING_COMMANDS&&(h(i),u(e)),n.type&Zo.HORIZ_LINE_TO&&h(n.x),n.type&Zo.VERT_LINE_TO&&u(n.y),n.type&Zo.LINE_TO&&(h(n.x),u(n.y)),n.type&Zo.CURVE_TO){h(n.x),u(n.y);for(var c=0,f=qo(i,n.x1,n.x2,n.x);c<f.length;c++)0<(j=f[c])&&1>j&&h(Go(i,n.x1,n.x2,n.x,j));for(var l=0,v=qo(e,n.y1,n.y2,n.y);l<v.length;l++)0<(j=v[l])&&1>j&&u(Go(e,n.y1,n.y2,n.y,j))}if(n.type&Zo.ARC){h(n.x),u(n.y),Do(n,i,e);for(var d=n.xRot/180*Math.PI,p=Math.cos(d)*n.rX,y=Math.sin(d)*n.rX,g=-Math.sin(d)*n.rY,m=Math.cos(d)*n.rY,b=n.phi1<n.phi2?[n.phi1,n.phi2]:-180>n.phi2?[n.phi2+360,n.phi1+360]:[n.phi2,n.phi1],w=b[0],x=b[1],M=function(t){var r=180*Math.atan2(t[1],t[0])/Math.PI;return r<w?r+360:r},k=0,S=Fo(g,-p,0).map(M);k<S.length;k++)(j=S[k])>w&&j<x&&h(Xo(n.cX,p,g,j));for(var N=0,P=Fo(m,-y,0).map(M);N<P.length;N++){var j;(j=P[N])>w&&j<x&&u(Xo(n.cY,y,m,j))}}return r}));return o.minX=1/0,o.maxX=-1/0,o.minY=1/0,o.maxY=-1/0,o}}(zo||(zo={}));var Uo,Vo=function(){function t(){}return t.prototype.round=function(t){return this.transform(zo.ROUND(t))},t.prototype.toAbs=function(){return this.transform(zo.TO_ABS())},t.prototype.toRel=function(){return this.transform(zo.TO_REL())},t.prototype.normalizeHVZ=function(t,r,i){return this.transform(zo.NORMALIZE_HVZ(t,r,i))},t.prototype.normalizeST=function(){return this.transform(zo.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(zo.QT_TO_C())},t.prototype.aToC=function(){return this.transform(zo.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(zo.SANITIZE(t))},t.prototype.translate=function(t,r){return this.transform(zo.TRANSLATE(t,r))},t.prototype.scale=function(t,r){return this.transform(zo.SCALE(t,r))},t.prototype.rotate=function(t,r,i){return this.transform(zo.ROTATE(t,r,i))},t.prototype.matrix=function(t,r,i,e,n,s){return this.transform(zo.MATRIX(t,r,i,e,n,s))},t.prototype.skewX=function(t){return this.transform(zo.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(zo.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(zo.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(zo.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(zo.ANNOTATE_ARCS())},t}(),Ho=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},Wo=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},Qo=function(t){function r(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return Bo(r,t),r.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},r.prototype.parse=function(t,r){var i=this;void 0===r&&(r=[]);for(var e=function(t){r.push(t),i.curArgs.length=0,i.canParseCommandOrComma=!0},n=0;n<t.length;n++){var s=t[n],a=!(this.curCommandType!==Zo.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),o=Wo(s)&&("0"===this.curNumber&&"0"===s||a);if(!Wo(s)||o)if("e"!==s&&"E"!==s)if("-"!==s&&"+"!==s||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==s||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+n);if(this.curCommandType===Zo.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+n+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+n+'"');this.curArgs.push(h),this.curArgs.length===Ko[this.curCommandType]&&(Zo.HORIZ_LINE_TO===this.curCommandType?e({type:Zo.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):Zo.VERT_LINE_TO===this.curCommandType?e({type:Zo.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===Zo.MOVE_TO||this.curCommandType===Zo.LINE_TO||this.curCommandType===Zo.SMOOTH_QUAD_TO?(e({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Zo.MOVE_TO===this.curCommandType&&(this.curCommandType=Zo.LINE_TO)):this.curCommandType===Zo.CURVE_TO?e({type:Zo.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===Zo.SMOOTH_CURVE_TO?e({type:Zo.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zo.QUAD_TO?e({type:Zo.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zo.ARC&&e({type:Zo.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(!Ho(s))if(","===s&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==s&&"-"!==s&&"."!==s)if(o)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+n+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==s&&"Z"!==s)if("h"===s||"H"===s)this.curCommandType=Zo.HORIZ_LINE_TO,this.curCommandRelative="h"===s;else if("v"===s||"V"===s)this.curCommandType=Zo.VERT_LINE_TO,this.curCommandRelative="v"===s;else if("m"===s||"M"===s)this.curCommandType=Zo.MOVE_TO,this.curCommandRelative="m"===s;else if("l"===s||"L"===s)this.curCommandType=Zo.LINE_TO,this.curCommandRelative="l"===s;else if("c"===s||"C"===s)this.curCommandType=Zo.CURVE_TO,this.curCommandRelative="c"===s;else if("s"===s||"S"===s)this.curCommandType=Zo.SMOOTH_CURVE_TO,this.curCommandRelative="s"===s;else if("q"===s||"Q"===s)this.curCommandType=Zo.QUAD_TO,this.curCommandRelative="q"===s;else if("t"===s||"T"===s)this.curCommandType=Zo.SMOOTH_QUAD_TO,this.curCommandRelative="t"===s;else{if("a"!==s&&"A"!==s)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+".");this.curCommandType=Zo.ARC,this.curCommandRelative="a"===s}else r.push({type:Zo.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal="."===s}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,i){void 0===i&&(i=[]);for(var e=0,n=Object.getPrototypeOf(this).parse.call(this,r);e<n.length;e++){var s=t(n[e]);Array.isArray(s)?i.push.apply(i,s):i.push(s)}return i}}})},r}(Vo),Zo=function(t){function r(i){var e=t.call(this)||this;return e.commands="string"==typeof i?r.parse(i):i,e}return Bo(r,t),r.prototype.encode=function(){return r.encode(this.commands)},r.prototype.getBounds=function(){var t=zo.CALCULATE_BOUNDS();return this.transform(t),t},r.prototype.transform=function(t){for(var r=[],i=0,e=this.commands;i<e.length;i++){var n=t(e[i]);Array.isArray(n)?r.push.apply(r,n):r.push(n)}return this.commands=r,this},r.encode=function(t){return function(t){var r="";Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var e=t[i];if(e.type===Zo.CLOSE_PATH)r+="z";else if(e.type===Zo.HORIZ_LINE_TO)r+=(e.relative?"h":"H")+e.x;else if(e.type===Zo.VERT_LINE_TO)r+=(e.relative?"v":"V")+e.y;else if(e.type===Zo.MOVE_TO)r+=(e.relative?"m":"M")+e.x+" "+e.y;else if(e.type===Zo.LINE_TO)r+=(e.relative?"l":"L")+e.x+" "+e.y;else if(e.type===Zo.CURVE_TO)r+=(e.relative?"c":"C")+e.x1+" "+e.y1+" "+e.x2+" "+e.y2+" "+e.x+" "+e.y;else if(e.type===Zo.SMOOTH_CURVE_TO)r+=(e.relative?"s":"S")+e.x2+" "+e.y2+" "+e.x+" "+e.y;else if(e.type===Zo.QUAD_TO)r+=(e.relative?"q":"Q")+e.x1+" "+e.y1+" "+e.x+" "+e.y;else if(e.type===Zo.SMOOTH_QUAD_TO)r+=(e.relative?"t":"T")+e.x+" "+e.y;else{if(e.type!==Zo.ARC)throw new Error('Unexpected command type "'+e.type+'" at index '+i+".");r+=(e.relative?"a":"A")+e.rX+" "+e.rY+" "+e.xRot+" "+ +e.lArcFlag+" "+ +e.sweepFlag+" "+e.x+" "+e.y}}return r}(t)},r.parse=function(t){var r=new Qo,i=[];return r.parse(t,i),r.finish(i),i},r.CLOSE_PATH=1,r.MOVE_TO=2,r.HORIZ_LINE_TO=4,r.VERT_LINE_TO=8,r.LINE_TO=16,r.CURVE_TO=32,r.SMOOTH_CURVE_TO=64,r.QUAD_TO=128,r.SMOOTH_QUAD_TO=256,r.ARC=512,r.LINE_COMMANDS=r.LINE_TO|r.HORIZ_LINE_TO|r.VERT_LINE_TO,r.DRAWING_COMMANDS=r.HORIZ_LINE_TO|r.VERT_LINE_TO|r.LINE_TO|r.CURVE_TO|r.SMOOTH_CURVE_TO|r.QUAD_TO|r.SMOOTH_QUAD_TO|r.ARC,r}(Vo),Ko=((Uo={})[Zo.MOVE_TO]=2,Uo[Zo.LINE_TO]=2,Uo[Zo.HORIZ_LINE_TO]=1,Uo[Zo.VERT_LINE_TO]=1,Uo[Zo.CLOSE_PATH]=0,Uo[Zo.QUAD_TO]=4,Uo[Zo.SMOOTH_QUAD_TO]=2,Uo[Zo.CURVE_TO]=6,Uo[Zo.SMOOTH_CURVE_TO]=4,Uo[Zo.ARC]=7,Uo),Jo=RegExp.prototype,th=Ut.PROPER,rh="toString",ih=RegExp.prototype[rh];function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(t)}(h((function(){return"/a/b"!=ih.call({source:"a",flags:"b"})}))||th&&ih.name!=rh)&&ur(RegExp.prototype,rh,(function(){var t=Rt(this),r=Mn(t.source),i=Mn(function(t){var r=t.flags;return void 0!==r||"flags"in Jo||ft(t,"flags")||!z(Jo,t)?r:l(kn,t)}(t));return"/"+r+"/"+i}),{unsafe:!0});
22
- /**
23
- * StackBlur - a fast almost Gaussian Blur For Canvas
24
- *
25
- * In case you find this class useful - especially in commercial projects -
26
- * I am not totally unhappy for a small donation to my PayPal account
27
- * mario@quasimondo.de
28
- *
29
- * Or support me on flattr:
30
- * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
31
- *
32
- * @module StackBlur
33
- * @author Mario Klingemann
34
- * Contact: mario@quasimondo.com
35
- * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
36
- * Twitter: @quasimondo
37
- *
38
- * @copyright (c) 2010 Mario Klingemann
39
- *
40
- * Permission is hereby granted, free of charge, to any person
41
- * obtaining a copy of this software and associated documentation
42
- * files (the "Software"), to deal in the Software without
43
- * restriction, including without limitation the rights to use,
44
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
45
- * copies of the Software, and to permit persons to whom the
46
- * Software is furnished to do so, subject to the following
47
- * conditions:
48
- *
49
- * The above copyright notice and this permission notice shall be
50
- * included in all copies or substantial portions of the Software.
51
- *
52
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
54
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
56
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
57
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
58
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
59
- * OTHER DEALINGS IN THE SOFTWARE.
60
- */
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{a as t,c as r,g as i}from"./p-e1a4994d.js";import{_ as e}from"./p-6a657ff6.js";import"./p-c2f00d41.js";import"./p-4aa3ba60.js";import"./p-829e6d4f.js";import"./p-88e28de2.js";import"./p-dbc9a5a8.js";var n,s,a=function(t){return t&&t.Math==Math&&t},o=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof t&&t)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},u=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,l=c?f.bind(f):function(){return f.apply(f,arguments)},v={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,p=d&&!v.call({1:2},1)?function(t){var r=d(this,t);return!!r&&r.enumerable}:v,y={f:p},g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=Function.prototype,b=m.call,w=c&&m.bind.bind(b,b),x=c?w:function(t){return function(){return b.apply(t,arguments)}},M=x({}.toString),k=x("".slice),S=function(t){return k(M(t),8,-1)},N=Object,P=x("".split),j=h((function(){return!N("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):N(t)}:N,O=function(t){return null==t},E=TypeError,T=function(t){if(O(t))throw E("Can't call method on "+t);return t},C=function(t){return j(T(t))},A="object"==typeof document&&document.all,R={all:A,IS_HTMLDDA:void 0===A&&void 0!==A},B=R.all,L=R.IS_HTMLDDA?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},$=R.all,I=R.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:L(t)||t===$}:function(t){return"object"==typeof t?null!==t:L(t)},D=function(t){return L(t)?t:void 0},F=function(t,r){return arguments.length<2?D(o[t]):o[t]&&o[t][r]},z=x({}.isPrototypeOf),_="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Y=o.process,X=o.Deno,q=Y&&Y.versions||X&&X.version,G=q&&q.v8;G&&(s=(n=G.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&_&&(!(n=_.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=_.match(/Chrome\/(\d+)/))&&(s=+n[1]);var U=s,V=!!Object.getOwnPropertySymbols&&!h((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&U&&U<41})),H=V&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,W=Object,Q=H?function(t){return"symbol"==typeof t}:function(t){var r=F("Symbol");return L(r)&&z(r.prototype,W(t))},Z=String,K=function(t){try{return Z(t)}catch(t){return"Object"}},J=TypeError,tt=function(t){if(L(t))return t;throw J(K(t)+" is not a function")},rt=function(t,r){var i=t[r];return O(i)?void 0:tt(i)},it=TypeError,et=Object.defineProperty,nt=function(t,r){try{et(o,t,{value:r,configurable:!0,writable:!0})}catch(i){o[t]=r}return r},st="__core-js_shared__",at=o[st]||nt(st,{}),ot=r((function(t){(t.exports=function(t,r){return at[t]||(at[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.27.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"})})),ht=Object,ut=function(t){return ht(T(t))},ct=x({}.hasOwnProperty),ft=Object.hasOwn||function(t,r){return ct(ut(t),r)},lt=0,vt=Math.random(),dt=x(1..toString),pt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+dt(++lt+vt,36)},yt=o.Symbol,gt=ot("wks"),mt=H?yt.for||yt:yt&&yt.withoutSetter||pt,bt=function(t){return ft(gt,t)||(gt[t]=V&&ft(yt,t)?yt[t]:mt("Symbol."+t)),gt[t]},wt=TypeError,xt=bt("toPrimitive"),Mt=function(t){var r=function(t,r){if(!I(t)||Q(t))return t;var i,e=rt(t,xt);if(e){if(void 0===r&&(r="default"),i=l(e,t,r),!I(i)||Q(i))return i;throw wt("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var i,e;if("string"===r&&L(i=t.toString)&&!I(e=l(i,t)))return e;if(L(i=t.valueOf)&&!I(e=l(i,t)))return e;if("string"!==r&&L(i=t.toString)&&!I(e=l(i,t)))return e;throw it("Can't convert object to primitive value")}(t,r)}(t,"string");return Q(r)?r:r+""},kt=o.document,St=I(kt)&&I(kt.createElement),Nt=function(t){return St?kt.createElement(t):{}},Pt=!u&&!h((function(){return 7!=Object.defineProperty(Nt("div"),"a",{get:function(){return 7}}).a})),jt=Object.getOwnPropertyDescriptor,Ot=u?jt:function(t,r){if(t=C(t),r=Mt(r),Pt)try{return jt(t,r)}catch(t){}if(ft(t,r))return g(!l(y.f,t,r),t[r])},Et={f:Ot},Tt=u&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ct=String,At=TypeError,Rt=function(t){if(I(t))return t;throw At(Ct(t)+" is not an object")},Bt=TypeError,Lt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,It="enumerable",Dt="configurable",Ft="writable",zt=u?Tt?function(t,r,i){if(Rt(t),r=Mt(r),Rt(i),"function"==typeof t&&"prototype"===r&&"value"in i&&Ft in i&&!i[Ft]){var e=$t(t,r);e&&e[Ft]&&(t[r]=i.value,i={configurable:Dt in i?i[Dt]:e[Dt],enumerable:It in i?i[It]:e[It],writable:!1})}return Lt(t,r,i)}:Lt:function(t,r,i){if(Rt(t),r=Mt(r),Rt(i),Pt)try{return Lt(t,r,i)}catch(t){}if("get"in i||"set"in i)throw Bt("Accessors not supported");return"value"in i&&(t[r]=i.value),t},_t={f:zt},Yt=u?function(t,r,i){return _t.f(t,r,g(1,i))}:function(t,r,i){return t[r]=i,t},Xt=Function.prototype,qt=u&&Object.getOwnPropertyDescriptor,Gt=ft(Xt,"name"),Ut={EXISTS:Gt,PROPER:Gt&&"something"===function(){}.name,CONFIGURABLE:Gt&&(!u||u&&qt(Xt,"name").configurable)},Vt=x(Function.toString);L(at.inspectSource)||(at.inspectSource=function(t){return Vt(t)});var Ht,Wt,Qt,Zt=at.inspectSource,Kt=o.WeakMap,Jt=L(Kt)&&/native code/.test(String(Kt)),tr=ot("keys"),rr=function(t){return tr[t]||(tr[t]=pt(t))},ir={},er="Object already initialized",nr=o.TypeError;if(Jt||at.state){var sr=at.state||(at.state=new(0,o.WeakMap));sr.get=sr.get,sr.has=sr.has,sr.set=sr.set,Ht=function(t,r){if(sr.has(t))throw nr(er);return r.facade=t,sr.set(t,r),r},Wt=function(t){return sr.get(t)||{}},Qt=function(t){return sr.has(t)}}else{var ar=rr("state");ir[ar]=!0,Ht=function(t,r){if(ft(t,ar))throw nr(er);return r.facade=t,Yt(t,ar,r),r},Wt=function(t){return ft(t,ar)?t[ar]:{}},Qt=function(t){return ft(t,ar)}}var or={set:Ht,get:Wt,has:Qt,enforce:function(t){return Qt(t)?Wt(t):Ht(t,{})},getterFor:function(t){return function(r){var i;if(!I(r)||(i=Wt(r)).type!==t)throw nr("Incompatible receiver, "+t+" required");return i}}},hr=r((function(t){var r=Ut.CONFIGURABLE,i=or.enforce,e=or.get,n=String,s=Object.defineProperty,a=x("".slice),o=x("".replace),c=x([].join),f=u&&!h((function(){return 8!==s((function(){}),"length",{value:8}).length})),l=String(String).split("String"),v=t.exports=function(t,e,h){"Symbol("===a(n(e),0,7)&&(e="["+o(n(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),h&&h.getter&&(e="get "+e),h&&h.setter&&(e="set "+e),(!ft(t,"name")||r&&t.name!==e)&&(u?s(t,"name",{value:e,configurable:!0}):t.name=e),f&&h&&ft(h,"arity")&&t.length!==h.arity&&s(t,"length",{value:h.arity});try{h&&ft(h,"constructor")&&h.constructor?u&&s(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var v=i(t);return ft(v,"source")||(v.source=c(l,"string"==typeof e?e:"")),t};Function.prototype.toString=v((function(){return L(this)&&e(this).source||Zt(this)}),"toString")})),ur=function(t,r,i,e){e||(e={});var n=e.enumerable,s=void 0!==e.name?e.name:r;if(L(i)&&hr(i,s,e),e.global)n?t[r]=i:nt(r,i);else{try{e.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=i:_t.f(t,r,{value:i,enumerable:!1,configurable:!e.nonConfigurable,writable:!e.nonWritable})}return t},cr=Math.ceil,fr=Math.floor,lr=Math.trunc||function(t){var r=+t;return(r>0?fr:cr)(r)},vr=function(t){var r=+t;return r!=r||0===r?0:lr(r)},dr=Math.max,pr=Math.min,yr=function(t,r){var i=vr(t);return i<0?dr(i+r,0):pr(i,r)},gr=Math.min,mr=function(t){return t>0?gr(vr(t),9007199254740991):0},br=function(t){return mr(t.length)},wr=function(t){return function(r,i,e){var n,s=C(r),a=br(s),o=yr(e,a);if(t&&i!=i){for(;a>o;)if((n=s[o++])!=n)return!0}else for(;a>o;o++)if((t||o in s)&&s[o]===i)return t||o||0;return!t&&-1}},xr={includes:wr(!0),indexOf:wr(!1)},Mr=xr.indexOf,kr=x([].push),Sr=function(t,r){var i,e=C(t),n=0,s=[];for(i in e)!ft(ir,i)&&ft(e,i)&&kr(s,i);for(;r.length>n;)ft(e,i=r[n++])&&(~Mr(s,i)||kr(s,i));return s},Nr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pr=Nr.concat("length","prototype"),jr=Object.getOwnPropertyNames||function(t){return Sr(t,Pr)},Or={f:jr},Er={f:Object.getOwnPropertySymbols},Tr=x([].concat),Cr=F("Reflect","ownKeys")||function(t){var r=Or.f(Rt(t)),i=Er.f;return i?Tr(r,i(t)):r},Ar=function(t,r,i){for(var e=Cr(r),n=_t.f,s=Et.f,a=0;a<e.length;a++){var o=e[a];ft(t,o)||i&&ft(i,o)||n(t,o,s(r,o))}},Rr=/#|\.prototype\./,Br=function(t,r){var i=$r[Lr(t)];return i==Dr||i!=Ir&&(L(r)?h(r):!!r)},Lr=Br.normalize=function(t){return String(t).replace(Rr,".").toLowerCase()},$r=Br.data={},Ir=Br.NATIVE="N",Dr=Br.POLYFILL="P",Fr=Br,zr=Et.f,_r=function(t,r){var i,e,n,s,a,h=t.target,u=t.global,c=t.stat;if(i=u?o:c?o[h]||nt(h,{}):(o[h]||{}).prototype)for(e in r){if(s=r[e],n=t.dontCallGetSet?(a=zr(i,e))&&a.value:i[e],!Fr(u?e:h+(c?".":"#")+e,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Ar(s,n)}(t.sham||n&&n.sham)&&Yt(s,"sham",!0),ur(i,e,s,t)}},Yr="undefined"!=typeof process&&"process"==S(process),Xr=String,qr=TypeError,Gr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),r=i instanceof Array}catch(t){}return function(i,e){return Rt(i),function(t){if("object"==typeof t||L(t))return t;throw qr("Can't set "+Xr(t)+" as a prototype")}(e),r?t(i,e):i.__proto__=e,i}}():void 0),Ur=_t.f,Vr=bt("toStringTag"),Hr=function(t,r,i){t&&!i&&(t=t.prototype),t&&!ft(t,Vr)&&Ur(t,Vr,{configurable:!0,value:r})},Wr=bt("species"),Qr=TypeError,Zr={};Zr[bt("toStringTag")]="z";var Kr="[object z]"===String(Zr),Jr=bt("toStringTag"),ti=Object,ri="Arguments"==S(function(){return arguments}()),ii=Kr?S:function(t){var r,i,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=ti(t),Jr))?i:ri?S(r):"Object"==(e=S(r))&&L(r.callee)?"Arguments":e},ei=function(){},ni=[],si=F("Reflect","construct"),ai=/^\s*(?:class|function)\b/,oi=x(ai.exec),hi=!ai.exec(ei),ui=function(t){if(!L(t))return!1;try{return si(ei,ni,t),!0}catch(t){return!1}},ci=function(t){if(!L(t))return!1;switch(ii(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return hi||!!oi(ai,Zt(t))}catch(t){return!0}};ci.sham=!0;var fi,li,vi,di,pi=!si||h((function(){var t;return ui(ui.call)||!ui(Object)||!ui((function(){t=!0}))||t}))?ci:ui,yi=TypeError,gi=bt("species"),mi=function(t,r){var i,e=Rt(t).constructor;return void 0===e||O(i=Rt(e)[gi])?r:function(t){if(pi(t))return t;throw yi(K(t)+" is not a constructor")}(i)},bi=Function.prototype,wi=bi.apply,xi=bi.call,Mi="object"==typeof Reflect&&Reflect.apply||(c?xi.bind(wi):function(){return xi.apply(wi,arguments)}),ki=function(t){if("Function"===S(t))return x(t)},Si=ki(ki.bind),Ni=function(t,r){return tt(t),void 0===r?t:c?Si(t,r):function(){return t.apply(r,arguments)}},Pi=F("document","documentElement"),ji=x([].slice),Oi=TypeError,Ei=function(t,r){if(t<r)throw Oi("Not enough arguments");return t},Ti=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),Ci=o.setImmediate,Ai=o.clearImmediate,Ri=o.process,Bi=o.Dispatch,Li=o.Function,$i=o.MessageChannel,Ii=o.String,Di=0,Fi={},zi="onreadystatechange";h((function(){fi=o.location}));var _i=function(t){if(ft(Fi,t)){var r=Fi[t];delete Fi[t],r()}},Yi=function(t){return function(){_i(t)}},Xi=function(t){_i(t.data)},qi=function(t){o.postMessage(Ii(t),fi.protocol+"//"+fi.host)};Ci&&Ai||(Ci=function(t){Ei(arguments.length,1);var r=L(t)?t:Li(t),i=ji(arguments,1);return Fi[++Di]=function(){Mi(r,void 0,i)},li(Di),Di},Ai=function(t){delete Fi[t]},Yr?li=function(t){Ri.nextTick(Yi(t))}:Bi&&Bi.now?li=function(t){Bi.now(Yi(t))}:$i&&!Ti?(di=(vi=new $i).port2,vi.port1.onmessage=Xi,li=Ni(di.postMessage,di)):o.addEventListener&&L(o.postMessage)&&!o.importScripts&&fi&&"file:"!==fi.protocol&&!h(qi)?(li=qi,o.addEventListener("message",Xi,!1)):li=zi in Nt("script")?function(t){Pi.appendChild(Nt("script"))[zi]=function(){Pi.removeChild(this),_i(t)}}:function(t){setTimeout(Yi(t),0)});var Gi={set:Ci,clear:Ai},Ui=function(){this.head=null,this.tail=null};Ui.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Vi,Hi,Wi,Qi,Zi,Ki=Ui,Ji=/ipad|iphone|ipod/i.test(_)&&"undefined"!=typeof Pebble,te=/web0s(?!.*chrome)/i.test(_),re=Gi.set,ie=o.MutationObserver||o.WebKitMutationObserver,ee=o.document,ne=o.process,se=o.Promise,ae=(0,Et.f)(o,"queueMicrotask"),oe=ae&&ae.value;if(!oe){var he=new Ki,ue=function(){var t,r;for(Yr&&(t=ne.domain)&&t.exit();r=he.get();)try{r()}catch(t){throw he.head&&Vi(),t}t&&t.enter()};Ti||Yr||te||!ie||!ee?!Ji&&se&&se.resolve?((Qi=se.resolve(void 0)).constructor=se,Zi=Ni(Qi.then,Qi),Vi=function(){Zi(ue)}):Yr?Vi=function(){ne.nextTick(ue)}:(re=Ni(re,o),Vi=function(){re(ue)}):(Hi=!0,Wi=ee.createTextNode(""),new ie(ue).observe(Wi,{characterData:!0}),Vi=function(){Wi.data=Hi=!Hi}),oe=function(t){he.head||Vi(),he.add(t)}}var ce,fe,le,ve,de=oe,pe=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},ye=o.Promise,ge="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,me=!ge&&!Yr&&"object"==typeof window&&"object"==typeof document,be=bt("species"),we=!1,xe=L(o.PromiseRejectionEvent),Me=Fr("Promise",(function(){var t=Zt(ye),r=t!==String(ye);if(!r&&66===U)return!0;if(!U||U<51||!/native code/.test(t)){var i=new ye((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((i.constructor={})[be]=e,!(we=i.then((function(){}))instanceof e))return!0}return!r&&(me||ge)&&!xe})),ke={CONSTRUCTOR:Me,REJECTION_EVENT:xe,SUBCLASSING:we},Se=TypeError,Ne=function(t){var r,i;this.promise=new t((function(t,e){if(void 0!==r||void 0!==i)throw Se("Bad Promise constructor");r=t,i=e})),this.resolve=tt(r),this.reject=tt(i)},Pe={f:function(t){return new Ne(t)}},je=Gi.set,Oe="Promise",Ee=ke.CONSTRUCTOR,Te=ke.REJECTION_EVENT,Ce=ke.SUBCLASSING,Ae=or.getterFor(Oe),Re=or.set,Be=ye&&ye.prototype,Le=ye,$e=Be,Ie=o.TypeError,De=o.document,Fe=o.process,ze=Pe.f,_e=ze,Ye=!!(De&&De.createEvent&&o.dispatchEvent),Xe="unhandledrejection",qe=function(t){var r;return!(!I(t)||!L(r=t.then))&&r},Ge=function(t,r){var i,e,n,s=r.value,a=1==r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&Qe(r),r.rejection=1),!0===o?i=s:(c&&c.enter(),i=o(s),c&&(c.exit(),n=!0)),i===t.promise?u(Ie("Promise-chain cycle")):(e=qe(i))?l(e,i,h,u):h(i)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},Ue=function(t,r){t.notified||(t.notified=!0,de((function(){for(var i,e=t.reactions;i=e.get();)Ge(i,t);t.notified=!1,r&&!t.rejection&&He(t)})))},Ve=function(t,r,i){var e,n;Ye?((e=De.createEvent("Event")).promise=r,e.reason=i,e.initEvent(t,!1,!0),o.dispatchEvent(e)):e={promise:r,reason:i},!Te&&(n=o["on"+t])?n(e):t===Xe&&function(t,r){try{1==arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",i)},He=function(t){l(je,o,(function(){var r,i=t.facade,e=t.value;if(We(t)&&(r=pe((function(){Yr?Fe.emit("unhandledRejection",e,i):Ve(Xe,i,e)})),t.rejection=Yr||We(t)?2:1,r.error))throw r.value}))},We=function(t){return 1!==t.rejection&&!t.parent},Qe=function(t){l(je,o,(function(){var r=t.facade;Yr?Fe.emit("rejectionHandled",r):Ve("rejectionhandled",r,t.value)}))},Ze=function(t,r,i){return function(e){t(r,e,i)}},Ke=function(t,r,i){t.done||(t.done=!0,i&&(t=i),t.value=r,t.state=2,Ue(t,!0))},Je=function(t,r,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===r)throw Ie("Promise can't be resolved itself");var e=qe(r);e?de((function(){var i={done:!1};try{l(e,r,Ze(Je,i,t),Ze(Ke,i,t))}catch(r){Ke(i,r,t)}})):(t.value=r,t.state=1,Ue(t,!1))}catch(r){Ke({done:!1},r,t)}}};if(Ee&&(Le=function(t){!function(t){if(z($e,t))return t;throw Qr("Incorrect invocation")}(this),tt(t),l(ce,this);var r=Ae(this);try{t(Ze(Je,r),Ze(Ke,r))}catch(t){Ke(r,t)}},(ce=function(){Re(this,{type:Oe,done:!1,notified:!1,parent:!1,reactions:new Ki,rejection:!1,state:0,value:void 0})}).prototype=ur($e=Le.prototype,"then",(function(t,r){var i=Ae(this),e=ze(mi(this,Le));return i.parent=!0,e.ok=!L(t)||t,e.fail=L(r)&&r,e.domain=Yr?Fe.domain:void 0,0==i.state?i.reactions.add(e):de((function(){Ge(e,i)})),e.promise})),fe=function(){var t=new ce,r=Ae(t);this.promise=t,this.resolve=Ze(Je,r),this.reject=Ze(Ke,r)},Pe.f=ze=function(t){return t===Le||void 0===t?new fe(t):_e(t)},L(ye)&&Be!==Object.prototype)){le=Be.then,Ce||ur(Be,"then",(function(t,r){var i=this;return new Le((function(t,r){l(le,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete Be.constructor}catch(t){}Gr&&Gr(Be,$e)}_r({global:!0,constructor:!0,wrap:!0,forced:Ee},{Promise:Le}),Hr(Le,Oe,!1),ve=F(Oe),u&&ve&&!ve[Wr]&&(0,_t.f)(ve,Wr,{configurable:!0,get:function(){return this}});var tn={},rn=bt("iterator"),en=Array.prototype,nn=bt("iterator"),sn=function(t){if(!O(t))return rt(t,nn)||rt(t,"@@iterator")||tn[ii(t)]},an=TypeError,on=function(t,r,i){var e,n;Rt(t);try{if(!(e=rt(t,"return"))){if("throw"===r)throw i;return i}e=l(e,t)}catch(t){n=!0,e=t}if("throw"===r)throw i;if(n)throw e;return Rt(e),i},hn=TypeError,un=function(t,r){this.stopped=t,this.result=r},cn=un.prototype,fn=function(t,r,i){var e,n,s,a,o,h,u,c,f=!(!i||!i.AS_ENTRIES),v=!(!i||!i.IS_RECORD),d=!(!i||!i.IS_ITERATOR),p=!(!i||!i.INTERRUPTED),y=Ni(r,i&&i.that),g=function(t){return e&&on(e,"normal",t),new un(!0,t)},m=function(t){return f?(Rt(t),p?y(t[0],t[1],g):y(t[0],t[1])):p?y(t,g):y(t)};if(v)e=t.iterator;else if(d)e=t;else{if(!(n=sn(t)))throw hn(K(t)+" is not iterable");if(void 0!==(c=n)&&(tn.Array===c||en[rn]===c)){for(s=0,a=br(t);a>s;s++)if((o=m(t[s]))&&z(cn,o))return o;return new un(!1)}e=function(t,r){var i=arguments.length<2?sn(t):r;if(tt(i))return Rt(l(i,t));throw an(K(t)+" is not iterable")}(t,n)}for(h=v?t.next:e.next;!(u=l(h,e)).done;){try{o=m(u.value)}catch(t){on(e,"throw",t)}if("object"==typeof o&&o&&z(cn,o))return o}return new un(!1)},ln=bt("iterator"),vn=!1;try{var dn=0,pn={next:function(){return{done:!!dn++}},return:function(){vn=!0}};pn[ln]=function(){return this},Array.from(pn,(function(){throw 2}))}catch(t){}var yn=ke.CONSTRUCTOR||!function(){if(!vn)return!1;var t=!1;try{var r={};r[ln]=function(){return{next:function(){return{done:t=!0}}}},ye.all(r).then(void 0,(function(){}))}catch(t){}return t}();_r({target:"Promise",stat:!0,forced:yn},{all:function(t){var r=this,i=Pe.f(r),e=i.resolve,n=i.reject,s=pe((function(){var i=tt(r.resolve),s=[],a=0,o=1;fn(t,(function(t){var h=a++,u=!1;o++,l(i,r,t).then((function(t){u||(u=!0,s[h]=t,--o||e(s))}),n)})),--o||e(s)}));return s.error&&n(s.value),i.promise}});var gn=ye&&ye.prototype;if(_r({target:"Promise",proto:!0,forced:ke.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),L(ye)){var mn=F("Promise").prototype.catch;gn.catch!==mn&&ur(gn,"catch",mn,{unsafe:!0})}_r({target:"Promise",stat:!0,forced:yn},{race:function(t){var r=this,i=Pe.f(r),e=i.reject,n=pe((function(){var n=tt(r.resolve);fn(t,(function(t){l(n,r,t).then(i.resolve,e)}))}));return n.error&&e(n.value),i.promise}}),_r({target:"Promise",stat:!0,forced:ke.CONSTRUCTOR},{reject:function(t){var r=Pe.f(this);return l(r.reject,void 0,t),r.promise}}),_r({target:"Promise",stat:!0,forced:ke.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(Rt(t),I(r)&&r.constructor===t)return r;var i=Pe.f(t);return(0,i.resolve)(r),i.promise}(this,t)}});const bn=i(r((function(t){function r(t,r,i,e,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void i(t)}o.done?r(h):Promise.resolve(h).then(e,n)}t.exports=function(t){return function(){var i=this,e=arguments;return new Promise((function(n,s){var a=t.apply(i,e);function o(t){r(a,n,s,o,h,"next",t)}function h(t){r(a,n,s,o,h,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports})));var wn,xn=String,Mn=function(t){if("Symbol"===ii(t))throw TypeError("Cannot convert a Symbol value to a string");return xn(t)},kn=function(){var t=Rt(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Sn=o.RegExp,Nn=h((function(){var t=Sn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Pn=Nn||h((function(){return!Sn("a","y").sticky})),jn={BROKEN_CARET:Nn||h((function(){var t=Sn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Pn,UNSUPPORTED_Y:Nn},On=Object.keys||function(t){return Sr(t,Nr)},En=u&&!Tt?Object.defineProperties:function(t,r){Rt(t);for(var i,e=C(r),n=On(r),s=n.length,a=0;s>a;)_t.f(t,i=n[a++],e[i]);return t},Tn={f:En},Cn="prototype",An="script",Rn=rr("IE_PROTO"),Bn=function(){},Ln=function(t){return"<"+An+">"+t+"</"+An+">"},$n=function(t){t.write(Ln("")),t.close();var r=t.parentWindow.Object;return t=null,r},In=function(){try{wn=new ActiveXObject("htmlfile")}catch(t){}var t,r,i;In="undefined"!=typeof document?document.domain&&wn?$n(wn):(r=Nt("iframe"),i="java"+An+":",r.style.display="none",Pi.appendChild(r),r.src=String(i),(t=r.contentWindow.document).open(),t.write(Ln("document.F=Object")),t.close(),t.F):$n(wn);for(var e=Nr.length;e--;)delete In[Cn][Nr[e]];return In()};ir[Rn]=!0;var Dn,Fn,zn=Object.create||function(t,r){var i;return null!==t?(Bn[Cn]=Rt(t),i=new Bn,Bn[Cn]=null,i[Rn]=t):i=In(),void 0===r?i:Tn.f(i,r)},_n=o.RegExp,Yn=h((function(){var t=_n(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Xn=o.RegExp,qn=h((function(){var t=Xn("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Gn=or.get,Un=ot("native-string-replace",String.prototype.replace),Vn=RegExp.prototype.exec,Hn=Vn,Wn=x("".charAt),Qn=x("".indexOf),Zn=x("".replace),Kn=x("".slice),Jn=(Fn=/b*/g,l(Vn,Dn=/a/,"a"),l(Vn,Fn,"a"),0!==Dn.lastIndex||0!==Fn.lastIndex),ts=jn.BROKEN_CARET,rs=void 0!==/()??/.exec("")[1];(Jn||rs||ts||Yn||qn)&&(Hn=function(t){var r,i,e,n,s,a,o,h=this,u=Gn(h),c=Mn(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=l(Hn,f,c),h.lastIndex=f.lastIndex,r;var v=u.groups,d=ts&&h.sticky,p=l(kn,h),y=h.source,g=0,m=c;if(d&&(p=Zn(p,"y",""),-1===Qn(p,"g")&&(p+="g"),m=Kn(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Wn(c,h.lastIndex-1))&&(y="(?: "+y+")",m=" "+m,g++),i=new RegExp("^(?:"+y+")",p)),rs&&(i=new RegExp("^"+y+"$(?!\\s)",p)),Jn&&(e=h.lastIndex),n=l(Vn,d?i:h,m),d?n?(n.input=Kn(n.input,g),n[0]=Kn(n[0],g),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:Jn&&n&&(h.lastIndex=h.global?n.index+n[0].length:e),rs&&n&&n.length>1&&l(Un,n[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&v)for(n.groups=a=zn(null),s=0;s<v.length;s++)a[(o=v[s])[0]]=n[o[1]];return n});var is=Hn;_r({target:"RegExp",proto:!0,forced:/./.exec!==is},{exec:is});var es=bt("species"),ns=RegExp.prototype,ss=function(t,r,i,e){var n=bt(t),s=!h((function(){var r={};return r[n]=function(){return 7},7!=""[t](r)})),a=s&&!h((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[es]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return r=!0,null},i[n](""),!r}));if(!s||!a||i){var o=ki(/./[n]),u=r(n,""[t],(function(t,r,i,e,n){var a=ki(t),h=r.exec;return h===is||h===ns.exec?s&&!n?{done:!0,value:o(r,i,e)}:{done:!0,value:a(i,r,e)}:{done:!1}}));ur(String.prototype,t,u[0]),ur(ns,n,u[1])}e&&Yt(ns[n],"sham",!0)},as=x("".charAt),os=x("".charCodeAt),hs=x("".slice),us=function(t){return function(r,i){var e,n,s=Mn(T(r)),a=vr(i),o=s.length;return a<0||a>=o?t?"":void 0:(e=os(s,a))<55296||e>56319||a+1===o||(n=os(s,a+1))<56320||n>57343?t?as(s,a):e:t?hs(s,a,a+2):n-56320+(e-55296<<10)+65536}},cs=(us(!1),us(!0)),fs=function(t,r,i){return r+(i?cs(t,r).length:1)},ls=TypeError,vs=function(t,r){var i=t.exec;if(L(i)){var e=l(i,t,r);return null!==e&&Rt(e),e}if("RegExp"===S(t))return l(is,t,r);throw ls("RegExp#exec called on incompatible receiver")};ss("match",(function(t,r,i){return[function(r){var i=T(this),e=O(r)?void 0:rt(r,t);return e?l(e,r,i):new RegExp(r)[t](Mn(i))},function(t){var e=Rt(this),n=Mn(t),s=i(r,e,n);if(s.done)return s.value;if(!e.global)return vs(e,n);var a=e.unicode;e.lastIndex=0;for(var o,h=[],u=0;null!==(o=vs(e,n));){var c=Mn(o[0]);h[u]=c,""===c&&(e.lastIndex=fs(n,mr(e.lastIndex),a)),u++}return 0===u?null:h}]}));var ds=Math.floor,ps=x("".charAt),ys=x("".replace),gs=x("".slice),ms=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bs=/\$([$&'`]|\d{1,2})/g,ws=function(t,r,i,e,n,s){var a=i+t.length,o=e.length,h=bs;return void 0!==n&&(n=ut(n),h=ms),ys(s,h,(function(s,h){var u;switch(ps(h,0)){case"$":return"$";case"&":return t;case"`":return gs(r,0,i);case"'":return gs(r,a);case"<":u=n[gs(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=ds(c/10);return 0===f?s:f<=o?void 0===e[f-1]?ps(h,1):e[f-1]+ps(h,1):s}u=e[c-1]}return void 0===u?"":u}))},xs=bt("replace"),Ms=Math.max,ks=Math.min,Ss=x([].concat),Ns=x([].push),Ps=x("".indexOf),js=x("".slice),Os="$0"==="a".replace(/./,"$0"),Es=!!/./[xs]&&""===/./[xs]("a","$0");ss("replace",(function(t,r,i){var e=Es?"$":"$0";return[function(t,i){var e=T(this),n=O(t)?void 0:rt(t,xs);return n?l(n,t,e,i):l(r,Mn(e),t,i)},function(t,n){var s=Rt(this),a=Mn(t);if("string"==typeof n&&-1===Ps(n,e)&&-1===Ps(n,"$<")){var o=i(r,s,a,n);if(o.done)return o.value}var h=L(n);h||(n=Mn(n));var u=s.global;if(u){var c=s.unicode;s.lastIndex=0}for(var f=[];;){var l=vs(s,a);if(null===l)break;if(Ns(f,l),!u)break;""===Mn(l[0])&&(s.lastIndex=fs(a,mr(s.lastIndex),c))}for(var v,d="",p=0,y=0;y<f.length;y++){for(var g=Mn((l=f[y])[0]),m=Ms(ks(vr(l.index),a.length),0),b=[],w=1;w<l.length;w++)Ns(b,void 0===(v=l[w])?v:String(v));var x=l.groups;if(h){var M=Ss([g],b,m,a);void 0!==x&&Ns(M,x);var k=Mn(Mi(n,void 0,M))}else k=ws(g,a,m,b,x,n);m>=p&&(d+=js(a,p,m)+k,p=m+g.length)}return d+js(a,p)}]}),!!h((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Os||Es);var Ts,Cs=bt("match"),As=function(t){var r;return I(t)&&(void 0!==(r=t[Cs])?!!r:"RegExp"==S(t))},Rs=TypeError,Bs=function(t){if(As(t))throw Rs("The method doesn't accept regular expressions");return t},Ls=bt("match"),$s=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Ls]=!1,"/./"[t](r)}catch(t){}}return!1},Is=Et.f,Ds=ki("".startsWith),Fs=ki("".slice),zs=Math.min,_s=$s("startsWith"),Ys=!(_s||(Ts=Is(String.prototype,"startsWith"),!Ts||Ts.writable));_r({target:"String",proto:!0,forced:!Ys&&!_s},{startsWith:function(t){var r=Mn(T(this));Bs(t);var i=mr(zs(arguments.length>1?arguments[1]:void 0,r.length)),e=Mn(t);return Ds?Ds(r,e,i):Fs(r,i,i+e.length)===e}});var Xs=_t.f,qs=bt("unscopables"),Gs=Array.prototype;null==Gs[qs]&&Xs(Gs,qs,{configurable:!0,value:zn(null)});var Us,Vs,Hs,Ws=function(t){Gs[qs][t]=!0},Qs=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Zs=rr("IE_PROTO"),Ks=Object,Js=Ks.prototype,ta=Qs?Ks.getPrototypeOf:function(t){var r=ut(t);if(ft(r,Zs))return r[Zs];var i=r.constructor;return L(i)&&r instanceof i?i.prototype:r instanceof Ks?Js:null},ra=bt("iterator"),ia=!1;[].keys&&("next"in(Hs=[].keys())?(Vs=ta(ta(Hs)))!==Object.prototype&&(Us=Vs):ia=!0);var ea=!I(Us)||h((function(){var t={};return Us[ra].call(t)!==t}));ea&&(Us={}),L(Us[ra])||ur(Us,ra,(function(){return this}));var na={IteratorPrototype:Us,BUGGY_SAFARI_ITERATORS:ia},sa=na.IteratorPrototype,aa=function(){return this},oa=Ut.PROPER,ha=Ut.CONFIGURABLE,ua=na.IteratorPrototype,ca=na.BUGGY_SAFARI_ITERATORS,fa=bt("iterator"),la="keys",va="values",da="entries",pa=function(){return this},ya=function(t,r){return{value:t,done:r}},ga=_t.f,ma="Array Iterator",ba=or.set,wa=or.getterFor(ma),xa=function(t,r,i,e,n){!function(t,r,i){var e=r+" Iterator";t.prototype=zn(sa,{next:g(1,i)}),Hr(t,e,!1),tn[e]=aa}(i,r,(function(){var t=wa(this),r=t.target,i=t.kind,e=t.index++;return!r||e>=r.length?(t.target=void 0,ya(void 0,!0)):ya("keys"==i?e:"values"==i?r[e]:[e,r[e]],!1)}));var s,a,o,h=function(t){if(t===n&&d)return d;if(!ca&&t in f)return f[t];switch(t){case la:case va:case da:return function(){return new i(this,t)}}return function(){return new i(this)}},u=r+" Iterator",c=!1,f=t.prototype,v=f[fa]||f["@@iterator"]||n&&f[n],d=!ca&&v||h(n),p=f.entries||v;if(p&&(s=ta(p.call(new t)))!==Object.prototype&&s.next&&(ta(s)!==ua&&(Gr?Gr(s,ua):L(s[fa])||ur(s,fa,pa)),Hr(s,u,!0)),oa&&v&&v.name!==va&&(ha?Yt(f,"name",va):(c=!0,d=function(){return l(v,this)})),n)if(void(a={values:h(va),keys:h(la),entries:h(da)}))for(o in a)(ca||c||!(o in f))&&ur(f,o,a[o]);else _r({target:r,proto:!0,forced:ca||c},a);return f[fa]!==d&&ur(f,fa,d,{name:n}),tn[r]=d,a}(Array,"Array",(function(t,r){ba(this,{type:ma,target:C(t),index:0,kind:r})}),0,"values"),Ma=tn.Arguments=tn.Array;if(Ws("keys"),Ws("values"),Ws("entries"),u&&"values"!==Ma.name)try{ga(Ma,"name",{value:"values"})}catch(t){}var ka={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=Nt("span").classList,Na=Sa&&Sa.constructor&&Sa.constructor.prototype,Pa=Na===Object.prototype?void 0:Na,ja=bt("iterator"),Oa=bt("toStringTag"),Ea=xa.values,Ta=function(t,r){if(t){if(t[ja]!==Ea)try{Yt(t,ja,Ea)}catch(r){t[ja]=Ea}if(t[Oa]||Yt(t,Oa,r),ka[r])for(var i in xa)if(t[i]!==xa[i])try{Yt(t,i,xa[i])}catch(r){t[i]=xa[i]}}};for(var Ca in ka)Ta(o[Ca]&&o[Ca].prototype,Ca);Ta(Pa,"DOMTokenList");var Aa=r((function(t){var r=e.default;t.exports=function(t,i){if("object"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),Ra=r((function(t){var r=e.default;t.exports=function(t){var i=Aa(t,"string");return"symbol"===r(i)?i:String(i)},t.exports.__esModule=!0,t.exports.default=t.exports}));const Ba=i(r((function(t){t.exports=function(t,r,i){return(r=Ra(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports})));var La=TypeError,$a=function(t){return function(r,i,e,n){tt(i);var s=ut(r),a=j(s),o=br(s),h=t?o-1:0,u=t?-1:1;if(e<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw La("Reduce of empty array with no initial value")}for(;t?h>=0:o>h;h+=u)h in a&&(n=i(n,a[h],h,s));return n}},Ia=function(t,r){var i=[][t];return!!i&&h((function(){i.call(null,r||function(){return 1},1)}))},Da=[$a(!1),$a(!0)][0],Fa=!Yr&&U>79&&U<83||!Ia("reduce");_r({target:"Array",proto:!0,forced:Fa},{reduce:function(t){var r=arguments.length;return Da(this,t,r,r>1?arguments[1]:void 0)}});var za=Et.f,_a=ki("".endsWith),Ya=ki("".slice),Xa=Math.min,qa=$s("endsWith"),Ga=!qa&&!!function(){var t=za(String.prototype,"endsWith");return t&&!t.writable}();_r({target:"String",proto:!0,forced:!Ga&&!qa},{endsWith:function(t){var r=Mn(T(this));Bs(t);var i=arguments.length>1?arguments[1]:void 0,e=r.length,n=void 0===i?e:Xa(mr(i),e),s=Mn(t);return _a?_a(r,s,n):Ya(r,n-s.length,n)===s}});var Ua=Array,Va=Math.max,Ha=function(t,r,i){for(var e,n,s,a=br(t),o=yr(r,a),h=yr(void 0===i?a:i,a),u=Ua(Va(h-o,0)),c=0;o<h;o++,c++)e=u,n=t[o],void 0,(s=Mt(c))in e?_t.f(e,s,g(0,n)):e[s]=n;return u.length=c,u},Wa=jn.UNSUPPORTED_Y,Qa=4294967295,Za=Math.min,Ka=[].push,Ja=x(/./.exec),to=x(Ka),ro=x("".slice);ss("split",(function(t,r,i){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var e=Mn(T(this)),n=void 0===i?Qa:i>>>0;if(0===n)return[];if(void 0===t)return[e];if(!As(t))return l(r,e,t,n);for(var s,a,o,h=[],u=0,c=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(s=l(is,c,e))&&!((a=c.lastIndex)>u&&(to(h,ro(e,u,s.index)),s.length>1&&s.index<e.length&&Mi(Ka,h,Ha(s,1)),o=s[0].length,u=a,h.length>=n));)c.lastIndex===s.index&&c.lastIndex++;return u===e.length?!o&&Ja(c,"")||to(h,""):to(h,ro(e,u)),h.length>n?Ha(h,0,n):h}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:l(r,this,t,i)}:r,[function(r,i){var n=T(this),s=O(r)?void 0:rt(r,t);return s?l(s,r,n,i):l(e,Mn(n),r,i)},function(t,n){var s=Rt(this),a=Mn(t),o=i(e,s,a,n,e!==r);if(o.done)return o.value;var h=mi(s,RegExp),u=s.unicode,c=new h(Wa?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Wa?"g":"y")),f=void 0===n?Qa:n>>>0;if(0===f)return[];if(0===a.length)return null===vs(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=Wa?0:v;var p,y=vs(c,Wa?ro(a,v):a);if(null===y||(p=Za(mr(c.lastIndex+(Wa?v:0)),a.length))===l)v=fs(a,v,u);else{if(to(d,ro(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(to(d,y[g]),d.length===f)return d;v=l=p}}return to(d,ro(a,l)),d}]}),!!h((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),Wa);for(var io=r((function(r){(function(){var t,i,e,n,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?r.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(r.exports=function(){return(t()-s)/1e6},i=process.hrtime,n=(t=function(){var t;return 1e9*(t=i())[0]+t[1]})(),a=1e9*process.uptime(),s=n-a):Date.now?(r.exports=function(){return Date.now()-e},e=Date.now()):(r.exports=function(){return(new Date).getTime()-e},e=(new Date).getTime())}).call(t)})),eo="undefined"==typeof window?t:window,no=["moz","webkit"],so="AnimationFrame",ao=eo["request"+so],oo=eo["cancel"+so]||eo["cancelRequest"+so],ho=0;!ao&&ho<no.length;ho++)ao=eo[no[ho]+"Request"+so],oo=eo[no[ho]+"Cancel"+so]||eo[no[ho]+"CancelRequest"+so];if(!ao||!oo){var uo=0,co=0,fo=[];ao=function(t){if(0===fo.length){var r=io(),i=Math.max(0,16.666666666666668-(r-uo));uo=i+r,setTimeout((function(){var t=fo.slice(0);fo.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(uo)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return fo.push({handle:++co,callback:t,cancelled:!1}),co},oo=function(t){for(var r=0;r<fo.length;r++)fo[r].handle===t&&(fo[r].cancelled=!0)}}var lo=function(t){return ao.call(eo,t)};lo.cancel=function(){oo.apply(eo,arguments)},lo.polyfill=function(t){t||(t=eo),t.requestAnimationFrame=ao,t.cancelAnimationFrame=oo};var vo,po="\t\n\v\f\r                 \u2028\u2029\ufeff",yo=x("".replace),go="["+po+"]",mo=RegExp("^"+go+go+"*"),bo=RegExp(go+go+"*$"),wo=function(t){return function(r){var i=Mn(T(r));return 1&t&&(i=yo(i,mo,"")),2&t&&(i=yo(i,bo,"")),i}},xo={start:wo(1),end:wo(2),trim:wo(3)},Mo=Ut.PROPER,ko=xo.trim;_r({target:"String",proto:!0,forced:(vo="trim",h((function(){return!!po[vo]()||"​…᠎"!=="​…᠎"[vo]()||Mo&&po[vo].name!==vo})))},{trim:function(){return ko(this)}});var So=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var i=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],e=0;e<i.length;e++){var n=i[e].process,s=i[e].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[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 t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,e=0;e<i.length;e++)for(var n=i[e].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var h=document.createElement("li"),u=new RGBColor(t[e]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[e]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},No=xr.indexOf,Po=ki([].indexOf),jo=!!Po&&1/Po([1],1,-0)<0,Oo=jo||!Ia("indexOf");_r({target:"Array",proto:!0,forced:Oo},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return jo?Po(this,t,r)||0:No(this,t,r)}});var Eo=x("".indexOf);_r({target:"String",proto:!0,forced:!$s("includes")},{includes:function(t){return!!~Eo(Mn(T(this)),Mn(Bs(t)),arguments.length>1?arguments[1]:void 0)}});var To=Array.isArray||function(t){return"Array"==S(t)},Co=x([].reverse),Ao=[1,2];_r({target:"Array",proto:!0,forced:String(Ao)===String(Ao.reverse())},{reverse:function(){return To(this)&&(this.length=this.length),Co(this)}});
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ var Ro=function(t,r){return(Ro=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(t,r)};function Bo(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}Ro(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}function Lo(t,r){var i=t[0],e=t[1];return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function $o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var i=0;i<t.length;i++)if("number"!=typeof t[i])throw new Error("assertNumbers arguments["+i+"] is not a number. "+typeof t[i]+" == typeof "+t[i]);return!0}var Io=Math.PI;function Do(t,r,i){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var e=t.rX,n=t.rY,s=t.x,a=t.y;e=Math.abs(t.rX),n=Math.abs(t.rY);var o=Lo([(r-s)/2,(i-a)/2],-t.xRot/180*Io),h=o[0],u=o[1],c=Math.pow(h,2)/Math.pow(e,2)+Math.pow(u,2)/Math.pow(n,2);1<c&&(e*=Math.sqrt(c),n*=Math.sqrt(c)),t.rX=e,t.rY=n;var f=Math.pow(e,2)*Math.pow(u,2)+Math.pow(n,2)*Math.pow(h,2),l=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(e,2)*Math.pow(n,2)-f)/f)),v=e*u/n*l,d=-n*h/e*l,p=Lo([v,d],t.xRot/180*Io);t.cX=p[0]+(r+s)/2,t.cY=p[1]+(i+a)/2,t.phi1=Math.atan2((u-d)/n,(h-v)/e),t.phi2=Math.atan2((-u-d)/n,(-h-v)/e),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*Io),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*Io),t.phi1*=180/Io,t.phi2*=180/Io}function Fo(t,r,i){$o(t,r,i);var e=t*t+r*r-i*i;if(0>e)return[];if(0===e)return[[t*i/(t*t+r*r),r*i/(t*t+r*r)]];var n=Math.sqrt(e);return[[(t*i+r*n)/(t*t+r*r),(r*i-t*n)/(t*t+r*r)],[(t*i-r*n)/(t*t+r*r),(r*i+t*n)/(t*t+r*r)]]}var zo,_o=Math.PI/180;function Yo(t,r,i){return(1-i)*t+i*r}function Xo(t,r,i,e){return t+Math.cos(e/180*Io)*r+Math.sin(e/180*Io)*i}function qo(t,r,i,e){var n=1e-6,s=r-t,a=i-r,o=3*s+3*(e-i)-6*a,h=6*(a-s),u=3*s;return Math.abs(o)<n?[-u/h]:function(t,r,i){void 0===i&&(i=1e-6);var e=t*t/4-r;if(e<-i)return[];if(e<=i)return[-t/2];var n=Math.sqrt(e);return[-t/2-n,-t/2+n]}(h/o,u/o,n)}function Go(t,r,i,e,n){var s=1-n;return t*(s*s*s)+r*(3*s*s*n)+i*(3*s*n*n)+e*(n*n*n)}!function(t){function r(){return n((function(t,r,i){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=i),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=i),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=i),t.relative=!1),t}))}function i(){var t=NaN,r=NaN,i=NaN,e=NaN;return n((function(n,s,a){return n.type&Zo.SMOOTH_CURVE_TO&&(n.type=Zo.CURVE_TO,t=isNaN(t)?s:t,r=isNaN(r)?a:r,n.x1=n.relative?s-t:2*s-t,n.y1=n.relative?a-r:2*a-r),n.type&Zo.CURVE_TO?(t=n.relative?s+n.x2:n.x2,r=n.relative?a+n.y2:n.y2):(t=NaN,r=NaN),n.type&Zo.SMOOTH_QUAD_TO&&(n.type=Zo.QUAD_TO,i=isNaN(i)?s:i,e=isNaN(e)?a:e,n.x1=n.relative?s-i:2*s-i,n.y1=n.relative?a-e:2*a-e),n.type&Zo.QUAD_TO?(i=n.relative?s+n.x1:n.x1,e=n.relative?a+n.y1:n.y1):(i=NaN,e=NaN),n}))}function e(){var t=NaN,r=NaN;return n((function(i,e,n){if(i.type&Zo.SMOOTH_QUAD_TO&&(i.type=Zo.QUAD_TO,t=isNaN(t)?e:t,r=isNaN(r)?n:r,i.x1=i.relative?e-t:2*e-t,i.y1=i.relative?n-r:2*n-r),i.type&Zo.QUAD_TO){t=i.relative?e+i.x1:i.x1,r=i.relative?n+i.y1:i.y1;var s=i.x1,a=i.y1;i.type=Zo.CURVE_TO,i.x1=((i.relative?0:e)+2*s)/3,i.y1=((i.relative?0:n)+2*a)/3,i.x2=(i.x+2*s)/3,i.y2=(i.y+2*a)/3}else t=NaN,r=NaN;return i}))}function n(t){var r=0,i=0,e=NaN,n=NaN;return function(s){if(isNaN(e)&&!(s.type&Zo.MOVE_TO))throw new Error("path must start with moveto");var a=t(s,r,i,e,n);return s.type&Zo.CLOSE_PATH&&(r=e,i=n),void 0!==s.x&&(r=s.relative?r+s.x:s.x),void 0!==s.y&&(i=s.relative?i+s.y:s.y),s.type&Zo.MOVE_TO&&(e=r,n=i),a}}function s(t,r,i,e,s,a){return $o(t,r,i,e,s,a),n((function(n,o,h,u){var c=n.x1,f=n.x2,l=n.relative&&!isNaN(u),v=void 0!==n.x?n.x:l?0:o,d=void 0!==n.y?n.y:l?0:h;function p(t){return t*t}n.type&Zo.HORIZ_LINE_TO&&0!==r&&(n.type=Zo.LINE_TO,n.y=n.relative?0:h),n.type&Zo.VERT_LINE_TO&&0!==i&&(n.type=Zo.LINE_TO,n.x=n.relative?0:o),void 0!==n.x&&(n.x=n.x*t+d*i+(l?0:s)),void 0!==n.y&&(n.y=v*r+n.y*e+(l?0:a)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*i+(l?0:s)),void 0!==n.y1&&(n.y1=c*r+n.y1*e+(l?0:a)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*i+(l?0:s)),void 0!==n.y2&&(n.y2=f*r+n.y2*e+(l?0:a));var y=t*e-r*i;if(void 0!==n.xRot&&(1!==t||0!==r||0!==i||1!==e))if(0===y)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=Zo.LINE_TO;else{var g=n.xRot*Math.PI/180,m=Math.sin(g),b=Math.cos(g),w=1/p(n.rX),x=1/p(n.rY),M=p(b)*w+p(m)*x,k=2*m*b*(w-x),S=p(m)*w+p(b)*x,N=M*e*e-k*r*e+S*r*r,P=k*(t*e+r*i)-2*(M*i*e+S*t*r),j=M*i*i-k*t*i+S*t*t,O=(Math.atan2(P,N-j)+Math.PI)%Math.PI/2,E=Math.sin(O),T=Math.cos(O);n.rX=Math.abs(y)/Math.sqrt(N*p(T)+P*E*T+j*p(E)),n.rY=Math.abs(y)/Math.sqrt(N*p(E)-P*E*T+j*p(T)),n.xRot=180*O/Math.PI}return void 0!==n.sweepFlag&&0>y&&(n.sweepFlag=+!n.sweepFlag),n}))}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),$o(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return n((function(t,r,i){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=i),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=i),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=i),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,i){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===i&&(i=!0),n((function(e,n,s,a,o){if(isNaN(a)&&!(e.type&Zo.MOVE_TO))throw new Error("path must start with moveto");return r&&e.type&Zo.HORIZ_LINE_TO&&(e.type=Zo.LINE_TO,e.y=e.relative?0:s),i&&e.type&Zo.VERT_LINE_TO&&(e.type=Zo.LINE_TO,e.x=e.relative?0:n),t&&e.type&Zo.CLOSE_PATH&&(e.type=Zo.LINE_TO,e.x=e.relative?a-n:a,e.y=e.relative?o-s:o),e.type&Zo.ARC&&(0===e.rX||0===e.rY)&&(e.type=Zo.LINE_TO,delete e.rX,delete e.rY,delete e.xRot,delete e.lArcFlag,delete e.sweepFlag),e}))},t.NORMALIZE_ST=i,t.QT_TO_C=e,t.INFO=n,t.SANITIZE=function(t){void 0===t&&(t=0),$o(t);var r=NaN,i=NaN,e=NaN,s=NaN;return n((function(n,a,o,h,u){var c=Math.abs,f=!1,l=0,v=0;if(n.type&Zo.SMOOTH_CURVE_TO&&(l=isNaN(r)?0:a-r,v=isNaN(i)?0:o-i),n.type&(Zo.CURVE_TO|Zo.SMOOTH_CURVE_TO)?(r=n.relative?a+n.x2:n.x2,i=n.relative?o+n.y2:n.y2):(r=NaN,i=NaN),n.type&Zo.SMOOTH_QUAD_TO?(e=isNaN(e)?a:2*a-e,s=isNaN(s)?o:2*o-s):n.type&Zo.QUAD_TO?(e=n.relative?a+n.x1:n.x1,s=n.relative?o+n.y1:n.y2):(e=NaN,s=NaN),n.type&Zo.LINE_COMMANDS||n.type&Zo.ARC&&(0===n.rX||0===n.rY||!n.lArcFlag)||n.type&Zo.CURVE_TO||n.type&Zo.SMOOTH_CURVE_TO||n.type&Zo.QUAD_TO||n.type&Zo.SMOOTH_QUAD_TO){var d=void 0===n.x?0:n.relative?n.x:n.x-a,p=void 0===n.y?0:n.relative?n.y:n.y-o;l=isNaN(e)?void 0===n.x1?l:n.relative?n.x:n.x1-a:e-a,v=isNaN(s)?void 0===n.y1?v:n.relative?n.y:n.y1-o:s-o;var y=void 0===n.x2?0:n.relative?n.x:n.x2-a,g=void 0===n.y2?0:n.relative?n.y:n.y2-o;c(d)<=t&&c(p)<=t&&c(l)<=t&&c(v)<=t&&c(y)<=t&&c(g)<=t&&(f=!0)}return n.type&Zo.CLOSE_PATH&&c(a-h)<=t&&c(o-u)<=t&&(f=!0),f?[]:n}))},t.MATRIX=s,t.ROTATE=function(t,r,i){void 0===r&&(r=0),void 0===i&&(i=0),$o(t,r,i);var e=Math.sin(t),n=Math.cos(t);return s(n,e,-e,n,r-r*n+i*e,i-r*e-i*n)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),$o(t,r),s(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),$o(t,r),s(t,0,0,r,0,0)},t.SKEW_X=function(t){return $o(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return $o(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),$o(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),$o(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return n((function(t,r,i){return Zo.ARC===t.type?function(t,r,i){var e,n,s,a;t.cX||Do(t,r,i);for(var o=Math.min(t.phi1,t.phi2),h=Math.max(t.phi1,t.phi2)-o,u=Math.ceil(h/90),c=new Array(u),f=r,l=i,v=0;v<u;v++){var d=Yo(t.phi1,t.phi2,v/u),p=Yo(t.phi1,t.phi2,(v+1)/u),y=4/3*Math.tan((p-d)*_o/4),g=[Math.cos(d*_o)-y*Math.sin(d*_o),Math.sin(d*_o)+y*Math.cos(d*_o)],m=g[0],b=g[1],w=[Math.cos(p*_o),Math.sin(p*_o)],x=w[0],M=w[1],k=[x+y*Math.sin(p*_o),M-y*Math.cos(p*_o)],S=k[0],N=k[1];c[v]={relative:t.relative,type:Zo.CURVE_TO};var P=function(r,i){var e=Lo([r*t.rX,i*t.rY],t.xRot);return[t.cX+e[0],t.cY+e[1]]};e=P(m,b),c[v].x1=e[0],c[v].y1=e[1],n=P(S,N),c[v].x2=n[0],c[v].y2=n[1],s=P(x,M),c[v].x=s[0],c[v].y=s[1],t.relative&&(c[v].x1-=f,c[v].y1-=l,c[v].x2-=f,c[v].y2-=l,c[v].x-=f,c[v].y-=l),f=(a=[c[v].x,c[v].y])[0],l=a[1]}return c}(t,t.relative?0:r,t.relative?0:i):t}))},t.ANNOTATE_ARCS=function(){return n((function(t,r,i){return t.relative&&(r=0,i=0),Zo.ARC===t.type&&Do(t,r,i),t}))},t.CLONE=function(){return function(t){var r={};for(var i in t)r[i]=t[i];return r}},t.CALCULATE_BOUNDS=function(){var t=r(),s=e(),a=i(),o=n((function(r,i,e){var n=a(s(t(function(t){var r={};for(var i in t)r[i]=t[i];return r}(r))));function h(t){t>o.maxX&&(o.maxX=t),t<o.minX&&(o.minX=t)}function u(t){t>o.maxY&&(o.maxY=t),t<o.minY&&(o.minY=t)}if(n.type&Zo.DRAWING_COMMANDS&&(h(i),u(e)),n.type&Zo.HORIZ_LINE_TO&&h(n.x),n.type&Zo.VERT_LINE_TO&&u(n.y),n.type&Zo.LINE_TO&&(h(n.x),u(n.y)),n.type&Zo.CURVE_TO){h(n.x),u(n.y);for(var c=0,f=qo(i,n.x1,n.x2,n.x);c<f.length;c++)0<(j=f[c])&&1>j&&h(Go(i,n.x1,n.x2,n.x,j));for(var l=0,v=qo(e,n.y1,n.y2,n.y);l<v.length;l++)0<(j=v[l])&&1>j&&u(Go(e,n.y1,n.y2,n.y,j))}if(n.type&Zo.ARC){h(n.x),u(n.y),Do(n,i,e);for(var d=n.xRot/180*Math.PI,p=Math.cos(d)*n.rX,y=Math.sin(d)*n.rX,g=-Math.sin(d)*n.rY,m=Math.cos(d)*n.rY,b=n.phi1<n.phi2?[n.phi1,n.phi2]:-180>n.phi2?[n.phi2+360,n.phi1+360]:[n.phi2,n.phi1],w=b[0],x=b[1],M=function(t){var r=180*Math.atan2(t[1],t[0])/Math.PI;return r<w?r+360:r},k=0,S=Fo(g,-p,0).map(M);k<S.length;k++)(j=S[k])>w&&j<x&&h(Xo(n.cX,p,g,j));for(var N=0,P=Fo(m,-y,0).map(M);N<P.length;N++){var j;(j=P[N])>w&&j<x&&u(Xo(n.cY,y,m,j))}}return r}));return o.minX=1/0,o.maxX=-1/0,o.minY=1/0,o.maxY=-1/0,o}}(zo||(zo={}));var Uo,Vo=function(){function t(){}return t.prototype.round=function(t){return this.transform(zo.ROUND(t))},t.prototype.toAbs=function(){return this.transform(zo.TO_ABS())},t.prototype.toRel=function(){return this.transform(zo.TO_REL())},t.prototype.normalizeHVZ=function(t,r,i){return this.transform(zo.NORMALIZE_HVZ(t,r,i))},t.prototype.normalizeST=function(){return this.transform(zo.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(zo.QT_TO_C())},t.prototype.aToC=function(){return this.transform(zo.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(zo.SANITIZE(t))},t.prototype.translate=function(t,r){return this.transform(zo.TRANSLATE(t,r))},t.prototype.scale=function(t,r){return this.transform(zo.SCALE(t,r))},t.prototype.rotate=function(t,r,i){return this.transform(zo.ROTATE(t,r,i))},t.prototype.matrix=function(t,r,i,e,n,s){return this.transform(zo.MATRIX(t,r,i,e,n,s))},t.prototype.skewX=function(t){return this.transform(zo.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(zo.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(zo.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(zo.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(zo.ANNOTATE_ARCS())},t}(),Ho=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},Wo=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},Qo=function(t){function r(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return Bo(r,t),r.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},r.prototype.parse=function(t,r){var i=this;void 0===r&&(r=[]);for(var e=function(t){r.push(t),i.curArgs.length=0,i.canParseCommandOrComma=!0},n=0;n<t.length;n++){var s=t[n],a=!(this.curCommandType!==Zo.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),o=Wo(s)&&("0"===this.curNumber&&"0"===s||a);if(!Wo(s)||o)if("e"!==s&&"E"!==s)if("-"!==s&&"+"!==s||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==s||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+n);if(this.curCommandType===Zo.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+n+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+n+'"');this.curArgs.push(h),this.curArgs.length===Ko[this.curCommandType]&&(Zo.HORIZ_LINE_TO===this.curCommandType?e({type:Zo.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):Zo.VERT_LINE_TO===this.curCommandType?e({type:Zo.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===Zo.MOVE_TO||this.curCommandType===Zo.LINE_TO||this.curCommandType===Zo.SMOOTH_QUAD_TO?(e({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Zo.MOVE_TO===this.curCommandType&&(this.curCommandType=Zo.LINE_TO)):this.curCommandType===Zo.CURVE_TO?e({type:Zo.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===Zo.SMOOTH_CURVE_TO?e({type:Zo.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zo.QUAD_TO?e({type:Zo.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zo.ARC&&e({type:Zo.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(!Ho(s))if(","===s&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==s&&"-"!==s&&"."!==s)if(o)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+n+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==s&&"Z"!==s)if("h"===s||"H"===s)this.curCommandType=Zo.HORIZ_LINE_TO,this.curCommandRelative="h"===s;else if("v"===s||"V"===s)this.curCommandType=Zo.VERT_LINE_TO,this.curCommandRelative="v"===s;else if("m"===s||"M"===s)this.curCommandType=Zo.MOVE_TO,this.curCommandRelative="m"===s;else if("l"===s||"L"===s)this.curCommandType=Zo.LINE_TO,this.curCommandRelative="l"===s;else if("c"===s||"C"===s)this.curCommandType=Zo.CURVE_TO,this.curCommandRelative="c"===s;else if("s"===s||"S"===s)this.curCommandType=Zo.SMOOTH_CURVE_TO,this.curCommandRelative="s"===s;else if("q"===s||"Q"===s)this.curCommandType=Zo.QUAD_TO,this.curCommandRelative="q"===s;else if("t"===s||"T"===s)this.curCommandType=Zo.SMOOTH_QUAD_TO,this.curCommandRelative="t"===s;else{if("a"!==s&&"A"!==s)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+".");this.curCommandType=Zo.ARC,this.curCommandRelative="a"===s}else r.push({type:Zo.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal="."===s}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,i){void 0===i&&(i=[]);for(var e=0,n=Object.getPrototypeOf(this).parse.call(this,r);e<n.length;e++){var s=t(n[e]);Array.isArray(s)?i.push.apply(i,s):i.push(s)}return i}}})},r}(Vo),Zo=function(t){function r(i){var e=t.call(this)||this;return e.commands="string"==typeof i?r.parse(i):i,e}return Bo(r,t),r.prototype.encode=function(){return r.encode(this.commands)},r.prototype.getBounds=function(){var t=zo.CALCULATE_BOUNDS();return this.transform(t),t},r.prototype.transform=function(t){for(var r=[],i=0,e=this.commands;i<e.length;i++){var n=t(e[i]);Array.isArray(n)?r.push.apply(r,n):r.push(n)}return this.commands=r,this},r.encode=function(t){return function(t){var r="";Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var e=t[i];if(e.type===Zo.CLOSE_PATH)r+="z";else if(e.type===Zo.HORIZ_LINE_TO)r+=(e.relative?"h":"H")+e.x;else if(e.type===Zo.VERT_LINE_TO)r+=(e.relative?"v":"V")+e.y;else if(e.type===Zo.MOVE_TO)r+=(e.relative?"m":"M")+e.x+" "+e.y;else if(e.type===Zo.LINE_TO)r+=(e.relative?"l":"L")+e.x+" "+e.y;else if(e.type===Zo.CURVE_TO)r+=(e.relative?"c":"C")+e.x1+" "+e.y1+" "+e.x2+" "+e.y2+" "+e.x+" "+e.y;else if(e.type===Zo.SMOOTH_CURVE_TO)r+=(e.relative?"s":"S")+e.x2+" "+e.y2+" "+e.x+" "+e.y;else if(e.type===Zo.QUAD_TO)r+=(e.relative?"q":"Q")+e.x1+" "+e.y1+" "+e.x+" "+e.y;else if(e.type===Zo.SMOOTH_QUAD_TO)r+=(e.relative?"t":"T")+e.x+" "+e.y;else{if(e.type!==Zo.ARC)throw new Error('Unexpected command type "'+e.type+'" at index '+i+".");r+=(e.relative?"a":"A")+e.rX+" "+e.rY+" "+e.xRot+" "+ +e.lArcFlag+" "+ +e.sweepFlag+" "+e.x+" "+e.y}}return r}(t)},r.parse=function(t){var r=new Qo,i=[];return r.parse(t,i),r.finish(i),i},r.CLOSE_PATH=1,r.MOVE_TO=2,r.HORIZ_LINE_TO=4,r.VERT_LINE_TO=8,r.LINE_TO=16,r.CURVE_TO=32,r.SMOOTH_CURVE_TO=64,r.QUAD_TO=128,r.SMOOTH_QUAD_TO=256,r.ARC=512,r.LINE_COMMANDS=r.LINE_TO|r.HORIZ_LINE_TO|r.VERT_LINE_TO,r.DRAWING_COMMANDS=r.HORIZ_LINE_TO|r.VERT_LINE_TO|r.LINE_TO|r.CURVE_TO|r.SMOOTH_CURVE_TO|r.QUAD_TO|r.SMOOTH_QUAD_TO|r.ARC,r}(Vo),Ko=((Uo={})[Zo.MOVE_TO]=2,Uo[Zo.LINE_TO]=2,Uo[Zo.HORIZ_LINE_TO]=1,Uo[Zo.VERT_LINE_TO]=1,Uo[Zo.CLOSE_PATH]=0,Uo[Zo.QUAD_TO]=4,Uo[Zo.SMOOTH_QUAD_TO]=2,Uo[Zo.CURVE_TO]=6,Uo[Zo.SMOOTH_CURVE_TO]=4,Uo[Zo.ARC]=7,Uo),Jo=RegExp.prototype,th=Ut.PROPER,rh="toString",ih=RegExp.prototype[rh];function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(t)}(h((function(){return"/a/b"!=ih.call({source:"a",flags:"b"})}))||th&&ih.name!=rh)&&ur(RegExp.prototype,rh,(function(){var t=Rt(this),r=Mn(t.source),i=Mn(function(t){var r=t.flags;return void 0!==r||"flags"in Jo||ft(t,"flags")||!z(Jo,t)?r:l(kn,t)}(t));return"/"+r+"/"+i}),{unsafe:!0});
22
+ /**
23
+ * StackBlur - a fast almost Gaussian Blur For Canvas
24
+ *
25
+ * In case you find this class useful - especially in commercial projects -
26
+ * I am not totally unhappy for a small donation to my PayPal account
27
+ * mario@quasimondo.de
28
+ *
29
+ * Or support me on flattr:
30
+ * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
31
+ *
32
+ * @module StackBlur
33
+ * @author Mario Klingemann
34
+ * Contact: mario@quasimondo.com
35
+ * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
36
+ * Twitter: @quasimondo
37
+ *
38
+ * @copyright (c) 2010 Mario Klingemann
39
+ *
40
+ * Permission is hereby granted, free of charge, to any person
41
+ * obtaining a copy of this software and associated documentation
42
+ * files (the "Software"), to deal in the Software without
43
+ * restriction, including without limitation the rights to use,
44
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
45
+ * copies of the Software, and to permit persons to whom the
46
+ * Software is furnished to do so, subject to the following
47
+ * conditions:
48
+ *
49
+ * The above copyright notice and this permission notice shall be
50
+ * included in all copies or substantial portions of the Software.
51
+ *
52
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
54
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
56
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
57
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
58
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
59
+ * OTHER DEALINGS IN THE SOFTWARE.
60
+ */
61
61
  var nh=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],sh=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function ah(t,r,i,e,n,s){if(!(isNaN(s)||s<1)){s|=0;var a=function(t,r,i,e,n){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==eh(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=t.getContext("2d");try{return s.getImageData(r,i,e,n)}catch(t){throw new Error("unable to access image data: "+t)}}(t,r,i,e,n);a=function(t,r,i,e,n,s){for(var a,o=t.data,h=2*s+1,u=e-1,c=n-1,f=s+1,l=f*(f+1)/2,v=new oh,d=v,p=1;p<h;p++)d=d.next=new oh,p===f&&(a=d);d.next=v;for(var y=null,g=null,m=0,b=0,w=nh[s],x=sh[s],M=0;M<n;M++){d=v;for(var k=o[b],S=o[b+1],N=o[b+2],P=o[b+3],j=0;j<f;j++)d.r=k,d.g=S,d.b=N,d.a=P,d=d.next;for(var O=0,E=0,T=0,C=0,A=f*k,R=f*S,B=f*N,L=f*P,$=l*k,I=l*S,D=l*N,F=l*P,z=1;z<f;z++){var _=b+((u<z?u:z)<<2),Y=o[_],X=o[_+1],q=o[_+2],G=o[_+3],U=f-z;$+=(d.r=Y)*U,I+=(d.g=X)*U,D+=(d.b=q)*U,F+=(d.a=G)*U,O+=Y,E+=X,T+=q,C+=G,d=d.next}y=v,g=a;for(var V=0;V<e;V++){var H=F*w>>x;if(o[b+3]=H,0!==H){var W=255/H;o[b]=($*w>>x)*W,o[b+1]=(I*w>>x)*W,o[b+2]=(D*w>>x)*W}else o[b]=o[b+1]=o[b+2]=0;$-=A,I-=R,D-=B,F-=L,A-=y.r,R-=y.g,B-=y.b,L-=y.a;var Q=V+s+1;$+=O+=y.r=o[Q=m+(Q<u?Q:u)<<2],I+=E+=y.g=o[Q+1],D+=T+=y.b=o[Q+2],F+=C+=y.a=o[Q+3],y=y.next;var Z=g.r,K=g.g,J=g.b,tt=g.a;A+=Z,R+=K,B+=J,L+=tt,O-=Z,E-=K,T-=J,C-=tt,g=g.next,b+=4}m+=e}for(var rt=0;rt<e;rt++){var it=o[b=rt<<2],et=o[b+1],nt=o[b+2],st=o[b+3],at=f*it,ot=f*et,ht=f*nt,ut=f*st,ct=l*it,ft=l*et,lt=l*nt,vt=l*st;d=v;for(var dt=0;dt<f;dt++)d.r=it,d.g=et,d.b=nt,d.a=st,d=d.next;for(var pt=e,yt=0,gt=0,mt=0,bt=0,wt=1;wt<=s;wt++){var xt=f-wt;ct+=(d.r=it=o[b=pt+rt<<2])*xt,ft+=(d.g=et=o[b+1])*xt,lt+=(d.b=nt=o[b+2])*xt,vt+=(d.a=st=o[b+3])*xt,bt+=it,yt+=et,gt+=nt,mt+=st,d=d.next,wt<c&&(pt+=e)}b=rt,y=v,g=a;for(var Mt=0;Mt<n;Mt++){var kt=b<<2;o[kt+3]=st=vt*w>>x,st>0?(o[kt]=(ct*w>>x)*(st=255/st),o[kt+1]=(ft*w>>x)*st,o[kt+2]=(lt*w>>x)*st):o[kt]=o[kt+1]=o[kt+2]=0,ct-=at,ft-=ot,lt-=ht,vt-=ut,at-=y.r,ot-=y.g,ht-=y.b,ut-=y.a,kt=rt+((kt=Mt+f)<c?kt:c)*e<<2,ct+=bt+=y.r=o[kt],ft+=yt+=y.g=o[kt+1],lt+=gt+=y.b=o[kt+2],vt+=mt+=y.a=o[kt+3],y=y.next,at+=it=g.r,ot+=et=g.g,ht+=nt=g.b,ut+=st=g.a,bt-=it,yt-=et,gt-=nt,mt-=st,g=g.next,b+=e}}return t}(a,0,0,e,n,s),t.getContext("2d").putImageData(a,r,i)}}var oh=function t(){!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},hh=Object.freeze({__proto__:null,offscreen:function(){var{DOMParser:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:(t,r)=>new OffscreenCanvas(t,r),createImage:t=>bn((function*(){var r=yield fetch(t),i=yield r.blob();return yield createImageBitmap(i)}))()};return"undefined"==typeof DOMParser&&void 0!==t||Reflect.deleteProperty(r,"DOMParser"),r},node:function(t){var{DOMParser:r,canvas:i,fetch:e}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:r,fetch:e,createCanvas:i.createCanvas,createImage:i.loadImage}}});function uh(t){return t.replace(/(?!\u3000)\s+/gm," ")}function ch(t){return t.replace(/^[\n \t]+/,"")}function fh(t){return t.replace(/[\n \t]+$/,"")}function lh(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var vh=/^[A-Z-]+$/;function dh(t){return vh.test(t)?t.toLowerCase():t}function ph(t){var r=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return r[2]||r[3]||r[4]}function yh(t){if(!t.startsWith("rgb"))return t;var r=3;return t.replace(/\d+(\.\d+)?/g,((t,i)=>r--&&i?String(Math.round(parseFloat(t))):t))}var gh=/(\[[^\]]+\])/g,mh=/(#[^\s+>~.[:]+)/g,bh=/(\.[^\s+>~.[:]+)/g,wh=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,xh=/(:[\w-]+\([^)]*\))/gi,Mh=/(:[^\s+>~.[:]+)/g,kh=/([^\s+>~.[:]+)/g;function Sh(t,r){var i=r.exec(t);return i?[t.replace(r," "),i.length]:[t,0]}function Nh(t){var r=[0,0,0],i=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),e=0;return[i,e]=Sh(i,gh),r[1]+=e,[i,e]=Sh(i,mh),r[0]+=e,[i,e]=Sh(i,bh),r[1]+=e,[i,e]=Sh(i,wh),r[2]+=e,[i,e]=Sh(i,xh),r[1]+=e,[i,e]=Sh(i,Mh),r[1]+=e,i=i.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[i,e]=Sh(i,kh),r[2]+=e,r.join("")}var Ph=1e-8;function jh(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Oh(t,r){return(t[0]*r[0]+t[1]*r[1])/(jh(t)*jh(r))}function Eh(t,r){return(t[0]*r[1]<t[1]*r[0]?-1:1)*Math.acos(Oh(t,r))}function Th(t){return t*t*t}function Ch(t){return 3*t*t*(1-t)}function Ah(t){return 3*t*(1-t)*(1-t)}function Rh(t){return(1-t)*(1-t)*(1-t)}function Bh(t){return t*t}function Lh(t){return 2*t*(1-t)}function $h(t){return(1-t)*(1-t)}class Ih{constructor(t,r,i){this.document=t,this.name=r,this.value=i,this.isNormalizedColor=!1}static empty(t){return new Ih(t,"EMPTY","")}split(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",{document:r,name:i}=this;return uh(this.getString()).trim().split(t).map((t=>new Ih(r,i,t)))}hasValue(t){var{value:r}=this;return null!==r&&""!==r&&(t||0!==r)&&void 0!==r}isString(t){var{value:r}=this,i="string"==typeof r;return i&&t?t.test(r):i}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return void 0===t||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var{value:r}=this,i=parseFloat(r);return this.isString(/%$/)&&(i/=100),i}getString(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}getColor(t){var r=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=yh(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(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var[i,e]="boolean"==typeof t?[void 0,t]:[t],{viewPort:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();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(/%$/)&&e:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*n.computeSize(i);default:var s=this.getNumber();return r&&s<1?s*n.computeSize(i):s}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():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 t=this.getString(),r=/#([^)'"]+)/.exec(t);return r&&(r=r[1]),r||(r=t),this.document.definitions[r]}getFillStyleDefinition(t,r){var i=this.getDefinition();if(!i)return null;if("function"==typeof i.createGradient)return i.createGradient(this.document.ctx,t,r);if("function"==typeof i.createPattern){if(i.getHrefAttribute().hasValue()){var e=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),e.hasValue()&&i.getAttribute("patternTransform",!0).setValue(e.value)}return i.createPattern(this.document.ctx,t,r)}return null}getTextBaseline(){return this.hasValue()?Ih.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var r=this.getColor(),i=r.length,e=0,n=0;n<i&&(","===r[n]&&e++,3!==e);n++);if(t.hasValue()&&this.isString()&&3!==e){var s=new So(r);s.ok&&(s.alpha=t.getNumber(),r=s.toRGBA())}return new Ih(this.document,this.name,r)}}Ih.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class Dh{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,r){this.viewPorts.push({width:t,height:r})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Fh{constructor(t,r){this.x=t,this.y=r}static parse(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[i=r,e=r]=lh(t);return new Fh(i,e)}static parseScale(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,[i=r,e=i]=lh(t);return new Fh(i,e)}static parsePath(t){for(var r=lh(t),i=r.length,e=[],n=0;n<i;n+=2)e.push(new Fh(r[n],r[n+1]));return e}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:r,y:i}=this,e=r*t[1]+i*t[3]+t[5];this.x=r*t[0]+i*t[2]+t[4],this.y=e}}class zh{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:r,onMouseMove:i}=this,e=t.ctx.canvas;e.onclick=r,e.onmousemove=i,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:r,eventElements:i}=this,{style:e}=t.ctx.canvas;e&&(e.cursor=""),r.forEach(((t,r)=>{for(var{run:e}=t,n=i[r];n;)e(n),n=n.parent})),this.events=[],this.eventElements=[]}}checkPath(t,r){if(this.working&&r){var{events:i,eventElements:e}=this;i.forEach(((i,n)=>{var{x:s,y:a}=i;!e[n]&&r.isPointInPath&&r.isPointInPath(s,a)&&(e[n]=t)}))}}checkBoundingBox(t,r){if(this.working&&r){var{events:i,eventElements:e}=this;i.forEach(((i,n)=>{var{x:s,y:a}=i;!e[n]&&r.isPointInBox(s,a)&&(e[n]=t)}))}}mapXY(t,r){for(var{window:i,ctx:e}=this.screen,n=new Fh(t,r),s=e.canvas;s;)n.x-=s.offsetLeft,n.y-=s.offsetTop,s=s.offsetParent;return i.scrollX&&(n.x+=i.scrollX),i.scrollY&&(n.y+=i.scrollY),n}onClick(t){var{x:r,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:r,y:i,run(t){t.onClick&&t.onClick()}})}onMouseMove(t){var{x:r,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:r,y:i,run(t){t.onMouseMove&&t.onMouseMove()}})}}var _h="undefined"!=typeof window?window:null,Yh="undefined"!=typeof fetch?fetch.bind(void 0):null;class Xh{constructor(t){var{fetch:r=Yh,window:i=_h}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Dh,this.mouse=new zh(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=i,this.fetch=r}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every((t=>t()));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:r,ctx:i,aspectRatio:e,width:n,desiredWidth:s,height:a,desiredHeight:o,minX:h=0,minY:u=0,refX:c,refY:f,clip:l=!1,clipX:v=0,clipY:d=0}=t,p=uh(e).replace(/^defer\s/,""),[y,g]=p.split(" "),m=y||"xMidYMid",b=g||"meet",w=n/s,x=a/o,M=Math.min(w,x),k=Math.max(w,x),S=s,N=o;"meet"===b&&(S*=M,N*=M),"slice"===b&&(S*=k,N*=k);var P=new Ih(r,"refX",c),j=new Ih(r,"refY",f),O=P.hasValue()&&j.hasValue();if(O&&i.translate(-M*P.getPixels("x"),-M*j.getPixels("y")),l){var E=M*v,T=M*d;i.beginPath(),i.moveTo(E,T),i.lineTo(n,T),i.lineTo(n,a),i.lineTo(E,a),i.closePath(),i.clip()}if(!O){var C="meet"===b&&M===x,A="slice"===b&&k===x,R="meet"===b&&M===w,B="slice"===b&&k===w;m.startsWith("xMid")&&(C||A)&&i.translate(n/2-S/2,0),m.endsWith("YMid")&&(R||B)&&i.translate(0,a/2-N/2),m.startsWith("xMax")&&(C||A)&&i.translate(n-S,0),m.endsWith("YMax")&&(R||B)&&i.translate(0,a-N)}switch(!0){case"none"===m:i.scale(w,x);break;case"meet"===b:i.scale(M,M);break;case"slice"===b:i.scale(k,k)}i.translate(-h,-u)}start(t){var{enableRedraw:r=!1,ignoreMouse:i=!1,ignoreAnimation:e=!1,ignoreDimensions:n=!1,ignoreClear:s=!1,forceRedraw:a,scaleWidth:o,scaleHeight:h,offsetX:u,offsetY:c}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{FRAMERATE:f,mouse:l}=this,v=1e3/f;if(this.frameDuration=v,this.readyPromise=new Promise((t=>{this.resolveReady=t})),this.isReady()&&this.render(t,n,s,o,h,u,c),r){var d=Date.now(),p=d,y=0,g=()=>{d=Date.now(),(y=d-p)>=v&&(p=d-y%v,this.shouldUpdate(e,a)&&(this.render(t,n,s,o,h,u,c),l.runEvents())),this.intervalId=lo(g)};i||l.start(),this.intervalId=lo(g)}}stop(){this.intervalId&&(lo.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,r){if(!t){var{frameDuration:i}=this;if(this.animations.reduce(((t,r)=>r.update(i)||t),!1))return!0}return!("function"!=typeof r||!r())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents()}render(t,r,i,e,n,s,a){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:h,viewPort:u,ctx:c,isFirstRender:f}=this,l=c.canvas;u.clear(),l.width&&l.height?u.setCurrent(l.width,l.height):u.setCurrent(o,h);var v=t.getStyle("width"),d=t.getStyle("height");!r&&(f||"number"!=typeof e&&"number"!=typeof n)&&(v.hasValue()&&(l.width=v.getPixels("x"),l.style&&(l.style.width="".concat(l.width,"px"))),d.hasValue()&&(l.height=d.getPixels("y"),l.style&&(l.style.height="".concat(l.height,"px"))));var p=l.clientWidth||l.width,y=l.clientHeight||l.height;if(r&&v.hasValue()&&d.hasValue()&&(p=v.getPixels("x"),y=d.getPixels("y")),u.setCurrent(p,y),"number"==typeof s&&t.getAttribute("x",!0).setValue(s),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof e||"number"==typeof n){var g=lh(t.getAttribute("viewBox").getString()),m=0,b=0;if("number"==typeof e){var w=t.getStyle("width");w.hasValue()?m=w.getPixels("x")/e:isNaN(g[2])||(m=g[2]/e)}if("number"==typeof n){var x=t.getStyle("height");x.hasValue()?b=x.getPixels("y")/n:isNaN(g[3])||(b=g[3]/n)}m||(m=b),b||(b=m),t.getAttribute("width",!0).setValue(e),t.getAttribute("height",!0).setValue(n);var M=t.getStyle("transform",!0,!0);M.setValue("".concat(M.getString()," scale(").concat(1/m,", ").concat(1/b,")"))}i||c.clearRect(0,0,p,y),t.render(c),f&&(this.isFirstRender=!1)}}Xh.defaultWindow=_h,Xh.defaultFetch=Yh;var{defaultFetch:qh}=Xh,Gh="undefined"!=typeof DOMParser?DOMParser:null;class Uh{constructor(){var{fetch:t=qh,DOMParser:r=Gh}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.fetch=t,this.DOMParser=r}parse(t){var r=this;return bn((function*(){return t.startsWith("<")?r.parseFromString(t):r.load(t)}))()}parseFromString(t){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(t,"image/svg+xml"))}catch(i){return this.checkDocument(r.parseFromString(t,"text/xml"))}}checkDocument(t){var r=t.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return t}load(t){var r=this;return bn((function*(){var i=yield r.fetch(t),e=yield i.text();return r.parseFromString(e)}))()}}class Vh{constructor(t,r){this.type="translate",this.point=null,this.point=Fh.parse(r)}apply(t){var{x:r,y:i}=this.point;t.translate(r||0,i||0)}unapply(t){var{x:r,y:i}=this.point;t.translate(-1*r||0,-1*i||0)}applyToPoint(t){var{x:r,y:i}=this.point;t.applyTransform([1,0,0,1,r||0,i||0])}}class Hh{constructor(t,r,i){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var e=lh(r);this.angle=new Ih(t,"angle",e[0]),this.originX=i[0],this.originY=i[1],this.cx=e[1]||0,this.cy=e[2]||0}apply(t){var{cx:r,cy:i,originX:e,originY:n,angle:s}=this,a=r+e.getPixels("x"),o=i+n.getPixels("y");t.translate(a,o),t.rotate(s.getRadians()),t.translate(-a,-o)}unapply(t){var{cx:r,cy:i,originX:e,originY:n,angle:s}=this,a=r+e.getPixels("x"),o=i+n.getPixels("y");t.translate(a,o),t.rotate(-1*s.getRadians()),t.translate(-a,-o)}applyToPoint(t){var{cx:r,cy:i,angle:e}=this,n=e.getRadians();t.applyTransform([1,0,0,1,r||0,i||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-r||0,-i||0])}}class Wh{constructor(t,r,i){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var e=Fh.parseScale(r);0!==e.x&&0!==e.y||(e.x=Ph,e.y=Ph),this.scale=e,this.originX=i[0],this.originY=i[1]}apply(t){var{scale:{x:r,y:i},originX:e,originY:n}=this,s=e.getPixels("x"),a=n.getPixels("y");t.translate(s,a),t.scale(r,i||r),t.translate(-s,-a)}unapply(t){var{scale:{x:r,y:i},originX:e,originY:n}=this,s=e.getPixels("x"),a=n.getPixels("y");t.translate(s,a),t.scale(1/r,1/i||r),t.translate(-s,-a)}applyToPoint(t){var{x:r,y:i}=this.scale;t.applyTransform([r||0,0,0,i||0,0,0])}}class Qh{constructor(t,r,i){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=lh(r),this.originX=i[0],this.originY=i[1]}apply(t){var{originX:r,originY:i,matrix:e}=this,n=r.getPixels("x"),s=i.getPixels("y");t.translate(n,s),t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t.translate(-n,-s)}unapply(t){var{originX:r,originY:i,matrix:e}=this,n=e[0],s=e[2],a=e[4],o=e[1],h=e[3],u=e[5],c=1/(n*(1*h-0*u)-s*(1*o-0*u)+a*(0*o-0*h)),f=r.getPixels("x"),l=i.getPixels("y");t.translate(f,l),t.transform(c*(1*h-0*u),c*(0*u-1*o),c*(0*a-1*s),c*(1*n-0*a),c*(s*u-a*h),c*(a*o-n*u)),t.translate(-f,-l)}applyToPoint(t){t.applyTransform(this.matrix)}}class Zh extends Qh{constructor(t,r,i){super(t,r,i),this.type="skew",this.angle=null,this.angle=new Ih(t,"angle",r)}}class Kh extends Zh{constructor(t,r,i){super(t,r,i),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Jh extends Zh{constructor(t,r,i){super(t,r,i),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class tu{constructor(t,r,i){this.document=t,this.transforms=[];var e=function(t){return uh(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(r);e.forEach((t=>{if("none"!==t){var[r,e]=function(t){var[r,i]=t.split("(");return[r.trim(),i.trim().replace(")","")]}(t),n=tu.transformTypes[r];void 0!==n&&this.transforms.push(new n(this.document,e,i))}}))}static fromElement(t,r){var i=r.getStyle("transform",!1,!0),[e,n=e]=r.getStyle("transform-origin",!1,!0).split(),s=[e,n];return i.hasValue()?new tu(t,i.getString(),s):null}apply(t){for(var{transforms:r}=this,i=r.length,e=0;e<i;e++)r[e].apply(t)}unapply(t){for(var{transforms:r}=this,i=r.length-1;i>=0;i--)r[i].unapply(t)}applyToPoint(t){for(var{transforms:r}=this,i=r.length,e=0;e<i;e++)r[e].applyToPoint(t)}}tu.transformTypes={translate:Vh,rotate:Hh,scale:Wh,matrix:Qh,skewX:Kh,skewY:Jh};class ru{constructor(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=t,this.node=r,this.captureTextNodes=i,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach((r=>{var i=dh(r.nodeName);this.attributes[i]=new Ih(t,i,r.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var e=this.getAttribute("style").getString().split(";").map((t=>t.trim()));e.forEach((r=>{if(r){var[i,e]=r.split(":").map((t=>t.trim()));this.styles[i]=new Ih(t,i,e)}}))}var{definitions:n}=t,s=this.getAttribute("id");s.hasValue()&&(n[s.getString()]||(n[s.getString()]=this)),Array.from(r.childNodes).forEach((r=>{if(1===r.nodeType)this.addChild(r);else if(i&&(3===r.nodeType||4===r.nodeType)){var e=t.createTextNode(r);e.getText().length>0&&this.addChild(e)}}))}}getAttribute(t){var r=this.attributes[t];if(!r&&arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var i=new Ih(this.document,t,"");return this.attributes[t]=i,i}return r||Ih.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return Ih.empty(this.document)}getStyle(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=this.styles[t];if(e)return e;var n=this.getAttribute(t);if(null!=n&&n.hasValue())return this.styles[t]=n,n;if(!i){var{parent:s}=this;if(s){var a=s.getStyle(t);if(null!=a&&a.hasValue())return a}}if(r){var o=new Ih(this.document,t,"");return this.styles[t]=o,o}return e||Ih.empty(this.document)}render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(t),i.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var r=tu.fromElement(this.document,this);r&&r.apply(t);var i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){var e=i.getDefinition();e&&e.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach((r=>{r.render(t)}))}addChild(t){var r=t instanceof ru?t:this.document.createElement(t);r.parent=this,ru.ignoreChildTypes.includes(r.type)||this.children.push(r)}matchesSelector(t){var r,{node:i}=this;if("function"==typeof i.matches)return i.matches(t);var e=null===(r=i.getAttribute)||void 0===r?void 0:r.call(i,"class");return!(!e||""===e)&&e.split(" ").some((r=>".".concat(r)===t))}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:r}=this.document;for(var i in t)if(!i.startsWith("@")&&this.matchesSelector(i)){var e=t[i],n=r[i];if(e)for(var s in e){var a=this.stylesSpecificity[s];void 0===a&&(a="000"),n>=a&&(this.styles[s]=e[s],this.stylesSpecificity[s]=n)}}}removeStyles(t,r){return r.reduce(((r,i)=>{var e=t.getStyle(i);if(!e.hasValue())return r;var n=e.getString();return e.setValue(""),[...r,[i,n]]}),[])}restoreStyles(t,r){r.forEach((r=>{var[i,e]=r;t.getStyle(i,!0).setValue(e)}))}isFirstChild(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}}ru.ignoreChildTypes=["title"];class iu extends ru{constructor(t,r,i){super(t,r,i)}}function eu(t){var r=t.trim();return/^('|")/.test(r)?r:'"'.concat(r,'"')}function nu(t){if(!t)return"";var r=t.trim().toLowerCase();switch(r){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return r;default:return/^oblique\s+(-|)\d+deg$/.test(r)?r:""}}function su(t){if(!t)return"";var r=t.trim().toLowerCase();switch(r){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return r;default:return/^[\d.]+$/.test(r)?r:""}}class au{constructor(t,r,i,e,n,s){var a=s?"string"==typeof s?au.parse(s):s:{};this.fontFamily=n||a.fontFamily,this.fontSize=e||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=i||a.fontWeight,this.fontVariant=r||a.fontVariant}static parse(){var t=arguments.length>1?arguments[1]:void 0,r="",i="",e="",n="",s="",a=uh(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),o={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return a.forEach((t=>{switch(!0){case!o.fontStyle&&au.styles.includes(t):"inherit"!==t&&(r=t),o.fontStyle=!0;break;case!o.fontVariant&&au.variants.includes(t):"inherit"!==t&&(i=t),o.fontStyle=!0,o.fontVariant=!0;break;case!o.fontWeight&&au.weights.includes(t):"inherit"!==t&&(e=t),o.fontStyle=!0,o.fontVariant=!0,o.fontWeight=!0;break;case!o.fontSize:"inherit"!==t&&([n]=t.split("/")),o.fontStyle=!0,o.fontVariant=!0,o.fontWeight=!0,o.fontSize=!0;break;default:"inherit"!==t&&(s+=t)}})),new au(r,i,e,n,s,t)}toString(){return[nu(this.fontStyle),this.fontVariant,su(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:t.trim().split(",").map(eu).join(","))].join(" ").trim();var t}}au.styles="normal|italic|oblique|inherit",au.variants="normal|small-caps|inherit",au.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class ou{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;this.x1=t,this.y1=r,this.x2=i,this.y2=e,this.addPoint(t,r),this.addPoint(i,e)}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(t,r){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==r&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:r,y1:i,x2:e,y2:n}=t;this.addPoint(r,i),this.addPoint(e,n)}}sumCubic(t,r,i,e,n){return Math.pow(1-t,3)*r+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*e+Math.pow(t,3)*n}bezierCurveAdd(t,r,i,e,n){var s=6*r-12*i+6*e,a=-3*r+9*i-9*e+3*n,o=3*i-3*r;if(0!==a){var h=Math.pow(s,2)-4*o*a;if(!(h<0)){var u=(-s+Math.sqrt(h))/(2*a);0<u&&u<1&&(t?this.addX(this.sumCubic(u,r,i,e,n)):this.addY(this.sumCubic(u,r,i,e,n)));var c=(-s-Math.sqrt(h))/(2*a);0<c&&c<1&&(t?this.addX(this.sumCubic(c,r,i,e,n)):this.addY(this.sumCubic(c,r,i,e,n)))}}else{if(0===s)return;var f=-o/s;0<f&&f<1&&(t?this.addX(this.sumCubic(f,r,i,e,n)):this.addY(this.sumCubic(f,r,i,e,n)))}}addBezierCurve(t,r,i,e,n,s,a,o){this.addPoint(t,r),this.addPoint(a,o),this.bezierCurveAdd(!0,t,i,n,a),this.bezierCurveAdd(!1,r,e,s,o)}addQuadraticCurve(t,r,i,e,n,s){var a=t+2/3*(i-t),o=r+2/3*(e-r);this.addBezierCurve(t,r,a,a+1/3*(n-t),o,o+1/3*(s-r),n,s)}isPointInBox(t,r){var{x1:i,y1:e,x2:n,y2:s}=this;return i<=t&&t<=n&&e<=r&&r<=s}}class hu extends Zo{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Fh(0,0),this.control=new Fh(0,0),this.current=new Fh(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:r}=this;return t>=r.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=new Fh(this.command[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x"],this.command[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y"]);return this.makeAbsolute(t)}getAsControlPoint(t,r){var i=this.getPoint(t,r);return this.control=i,i}getAsCurrentPoint(t,r){var i=this.getPoint(t,r);return this.current=i,i}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==Zo.CURVE_TO&&t!==Zo.SMOOTH_CURVE_TO&&t!==Zo.QUAD_TO&&t!==Zo.SMOOTH_QUAD_TO)return this.current;var{current:{x:r,y:i},control:{x:e,y:n}}=this;return new Fh(2*r-e,2*i-n)}makeAbsolute(t){if(this.command.relative){var{x:r,y:i}=this.current;t.x+=r,t.y+=i}return t}addMarker(t,r,i){var{points:e,angles:n}=this;i&&n.length>0&&!n[n.length-1]&&(n[n.length-1]=e[e.length-1].angleTo(i)),this.addMarkerAngle(t,r?r.angleTo(t):null)}addMarkerAngle(t,r){this.points.push(t),this.angles.push(r)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,r=t.length,i=0;i<r;i++)if(!t[i])for(var e=i+1;e<r;e++)if(t[e]){t[i]=t[e];break}return t}}class uu extends ru{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,r=this;r;){var i=r.getStyle("opacity",!1,!0);i.hasValue(!0)&&(t*=i.getNumber()),r=r.parent}return t}setContext(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!r){var i=this.getStyle("fill"),e=this.getStyle("fill-opacity"),n=this.getStyle("stroke"),s=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){var a=i.getFillStyleDefinition(this,e);a&&(t.fillStyle=a)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var o=i.getColor();"inherit"!==o&&(t.fillStyle="none"===o?"rgba(0,0,0,0)":o)}if(e.hasValue()){var h=new Ih(this.document,"fill",t.fillStyle).addOpacity(e).getColor();t.fillStyle=h}if(n.isUrlDefinition()){var u=n.getFillStyleDefinition(this,s);u&&(t.strokeStyle=u)}else if(n.hasValue()){"currentColor"===n.getString()&&n.setValue(this.getStyle("color").getColor());var c=n.getString();"inherit"!==c&&(t.strokeStyle="none"===c?"rgba(0,0,0,0)":c)}if(s.hasValue()){var f=new Ih(this.document,"stroke",t.strokeStyle).addOpacity(s).getString();t.strokeStyle=f}var l=this.getStyle("stroke-width");if(l.hasValue()){var v=l.getPixels();t.lineWidth=v||Ph}var d=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),g=this.getStyle("stroke-dasharray"),m=this.getStyle("stroke-dashoffset");if(d.hasValue()&&(t.lineCap=d.getString()),p.hasValue()&&(t.lineJoin=p.getString()),y.hasValue()&&(t.miterLimit=y.getNumber()),g.hasValue()&&"none"!==g.getString()){var b=lh(g.getString());void 0!==t.setLineDash?t.setLineDash(b):void 0!==t.webkitLineDash?t.webkitLineDash=b:void 0===t.mozDash||1===b.length&&0===b[0]||(t.mozDash=b);var w=m.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=w:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=w:void 0!==t.mozDashOffset&&(t.mozDashOffset=w)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var x=this.getStyle("font"),M=this.getStyle("font-style"),k=this.getStyle("font-variant"),S=this.getStyle("font-weight"),N=this.getStyle("font-size"),P=this.getStyle("font-family"),j=new au(M.getString(),k.getString(),S.getString(),N.hasValue()?"".concat(N.getPixels(!0),"px"):"",P.getString(),au.parse(x.getString(),t.font));M.setValue(j.fontStyle),k.setValue(j.fontVariant),S.setValue(j.fontWeight),N.setValue(j.fontSize),P.setValue(j.fontFamily),t.font=j.toString(),N.isPixels()&&(this.document.emSize=N.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}}class cu extends uu{constructor(t,r,i){super(t,r,i),this.type="path",this.pathParser=null,this.pathParser=new hu(this.getAttribute("d").getString())}path(t){var{pathParser:r}=this,i=new ou;for(r.reset(),t&&t.beginPath();!r.isEnd();)switch(r.next().type){case hu.MOVE_TO:this.pathM(t,i);break;case hu.LINE_TO:this.pathL(t,i);break;case hu.HORIZ_LINE_TO:this.pathH(t,i);break;case hu.VERT_LINE_TO:this.pathV(t,i);break;case hu.CURVE_TO:this.pathC(t,i);break;case hu.SMOOTH_CURVE_TO:this.pathS(t,i);break;case hu.QUAD_TO:this.pathQ(t,i);break;case hu.SMOOTH_QUAD_TO:this.pathT(t,i);break;case hu.ARC:this.pathA(t,i);break;case hu.CLOSE_PATH:this.pathZ(t,i)}return i}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,r=t.getMarkerPoints(),i=t.getMarkerAngles(),e=r.map(((t,r)=>[t,i[r]]));return e}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var r=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==r.getString("inherit")?t.fill(r.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var i=this.getMarkers();if(i){var e=i.length-1,n=this.getStyle("marker-start"),s=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(n.isUrlDefinition()){var o=n.getDefinition(),[h,u]=i[0];o.render(t,h,u)}if(s.isUrlDefinition())for(var c=s.getDefinition(),f=1;f<e;f++){var[l,v]=i[f];c.render(t,l,v)}if(a.isUrlDefinition()){var d=a.getDefinition(),[p,y]=i[e];d.render(t,p,y)}}}static pathM(t){var r=t.getAsCurrentPoint();return t.start=t.current,{point:r}}pathM(t,r){var{pathParser:i}=this,{point:e}=cu.pathM(i),{x:n,y:s}=e;i.addMarker(e),r.addPoint(n,s),t&&t.moveTo(n,s)}static pathL(t){var{current:r}=t;return{current:r,point:t.getAsCurrentPoint()}}pathL(t,r){var{pathParser:i}=this,{current:e,point:n}=cu.pathL(i),{x:s,y:a}=n;i.addMarker(n,e),r.addPoint(s,a),t&&t.lineTo(s,a)}static pathH(t){var{current:r,command:i}=t,e=new Fh((i.relative?r.x:0)+i.x,r.y);return t.current=e,{current:r,point:e}}pathH(t,r){var{pathParser:i}=this,{current:e,point:n}=cu.pathH(i),{x:s,y:a}=n;i.addMarker(n,e),r.addPoint(s,a),t&&t.lineTo(s,a)}static pathV(t){var{current:r,command:i}=t,e=new Fh(r.x,(i.relative?r.y:0)+i.y);return t.current=e,{current:r,point:e}}pathV(t,r){var{pathParser:i}=this,{current:e,point:n}=cu.pathV(i),{x:s,y:a}=n;i.addMarker(n,e),r.addPoint(s,a),t&&t.lineTo(s,a)}static pathC(t){var{current:r}=t;return{current:r,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathC(t,r){var{pathParser:i}=this,{current:e,point:n,controlPoint:s,currentPoint:a}=cu.pathC(i);i.addMarker(a,s,n),r.addBezierCurve(e.x,e.y,n.x,n.y,s.x,s.y,a.x,a.y),t&&t.bezierCurveTo(n.x,n.y,s.x,s.y,a.x,a.y)}static pathS(t){var{current:r}=t;return{current:r,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathS(t,r){var{pathParser:i}=this,{current:e,point:n,controlPoint:s,currentPoint:a}=cu.pathS(i);i.addMarker(a,s,n),r.addBezierCurve(e.x,e.y,n.x,n.y,s.x,s.y,a.x,a.y),t&&t.bezierCurveTo(n.x,n.y,s.x,s.y,a.x,a.y)}static pathQ(t){var{current:r}=t;return{current:r,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}pathQ(t,r){var{pathParser:i}=this,{current:e,controlPoint:n,currentPoint:s}=cu.pathQ(i);i.addMarker(s,n,n),r.addQuadraticCurve(e.x,e.y,n.x,n.y,s.x,s.y),t&&t.quadraticCurveTo(n.x,n.y,s.x,s.y)}static pathT(t){var{current:r}=t,i=t.getReflectedControlPoint();return t.control=i,{current:r,controlPoint:i,currentPoint:t.getAsCurrentPoint()}}pathT(t,r){var{pathParser:i}=this,{current:e,controlPoint:n,currentPoint:s}=cu.pathT(i);i.addMarker(s,n,n),r.addQuadraticCurve(e.x,e.y,n.x,n.y,s.x,s.y),t&&t.quadraticCurveTo(n.x,n.y,s.x,s.y)}static pathA(t){var{current:r,command:i}=t,{rX:e,rY:n,xRot:s,lArcFlag:a,sweepFlag:o}=i,h=s*(Math.PI/180),u=t.getAsCurrentPoint(),c=new Fh(Math.cos(h)*(r.x-u.x)/2+Math.sin(h)*(r.y-u.y)/2,-Math.sin(h)*(r.x-u.x)/2+Math.cos(h)*(r.y-u.y)/2),f=Math.pow(c.x,2)/Math.pow(e,2)+Math.pow(c.y,2)/Math.pow(n,2);f>1&&(e*=Math.sqrt(f),n*=Math.sqrt(f));var l=(a===o?-1:1)*Math.sqrt((Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(c.y,2)-Math.pow(n,2)*Math.pow(c.x,2))/(Math.pow(e,2)*Math.pow(c.y,2)+Math.pow(n,2)*Math.pow(c.x,2)));isNaN(l)&&(l=0);var v=new Fh(l*e*c.y/n,l*-n*c.x/e),d=new Fh((r.x+u.x)/2+Math.cos(h)*v.x-Math.sin(h)*v.y,(r.y+u.y)/2+Math.sin(h)*v.x+Math.cos(h)*v.y),p=Eh([1,0],[(c.x-v.x)/e,(c.y-v.y)/n]),y=[(c.x-v.x)/e,(c.y-v.y)/n],g=[(-c.x-v.x)/e,(-c.y-v.y)/n],m=Eh(y,g);return Oh(y,g)<=-1&&(m=Math.PI),Oh(y,g)>=1&&(m=0),{currentPoint:u,rX:e,rY:n,sweepFlag:o,xAxisRotation:h,centp:d,a1:p,ad:m}}pathA(t,r){var{pathParser:i}=this,{currentPoint:e,rX:n,rY:s,sweepFlag:a,xAxisRotation:o,centp:h,a1:u,ad:c}=cu.pathA(i),f=1-a?1:-1,l=u+f*(c/2),v=new Fh(h.x+n*Math.cos(l),h.y+s*Math.sin(l));if(i.addMarkerAngle(v,l-f*Math.PI/2),i.addMarkerAngle(e,l-f*Math.PI),r.addPoint(e.x,e.y),t&&!isNaN(u)&&!isNaN(c)){var d=n>s?n:s,p=n>s?1:n/s,y=n>s?s/n:1;t.translate(h.x,h.y),t.rotate(o),t.scale(p,y),t.arc(0,0,d,u,u+c,Boolean(1-a)),t.scale(1/p,1/y),t.rotate(-o),t.translate(-h.x,-h.y)}}static pathZ(t){t.current=t.start}pathZ(t,r){cu.pathZ(this.pathParser),t&&r.x1!==r.x2&&r.y1!==r.y2&&t.closePath()}}class fu extends cu{constructor(t,r,i){super(t,r,i),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 lu extends uu{constructor(t,r,i){super(t,r,new.target===lu||i),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){super.setContext(t,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(t.textBaseline=r)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var r=null;return this.children.forEach(((i,e)=>{var n=this.getChildBoundingBox(t,this,this,e);r?r.addBoundingBox(n):r=n})),r}getFontSize(){var{document:t,parent:r}=this,i=au.parse(t.ctx.font).fontSize;return r.getStyle("font-size").getNumber(i)}getTElementBoundingBox(t){var r=this.getFontSize();return new ou(this.x,this.y-r,this.x+this.measureText(t),this.y)}getGlyph(t,r,i){var e=r[i],n=null;if(t.isArabic){var s=r.length,a=r[i-1],o=r[i+1],h="isolated";if((0===i||" "===a)&&i<s-1&&" "!==o&&(h="terminal"),i>0&&" "!==a&&i<s-1&&" "!==o&&(h="medial"),i>0&&" "!==a&&(i===s-1||" "===o)&&(h="initial"),void 0!==t.glyphs[e]){var u=t.glyphs[e];n=u instanceof fu?u:u[h]}}else n=t.glyphs[e];return n||(n=t.missingGlyph),n}getText(){return""}getTextFromNode(t){var r=t||this.node,i=Array.from(r.parentNode.childNodes),e=i.indexOf(r),n=i.length-1,s=uh(r.textContent||"");return 0===e&&(s=ch(s)),e===n&&(s=fh(s)),s}renderChildren(t){if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach(((r,i)=>{this.renderChild(t,this,this,i)}));var{mouse:r}=this.document.screen;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}renderTElementChildren(t){var{document:r,parent:i}=this,e=this.getText(),n=i.getStyle("font-family").getDefinition();if(n)for(var{unitsPerEm:s}=n.fontFace,a=au.parse(r.ctx.font),o=i.getStyle("font-size").getNumber(a.fontSize),h=i.getStyle("font-style").getString(a.fontStyle),u=o/s,c=n.isRTL?e.split("").reverse().join(""):e,f=lh(i.getAttribute("dx").getString()),l=c.length,v=0;v<l;v++){var d=this.getGlyph(n,c,v);t.translate(this.x,this.y),t.scale(u,-u);var p=t.lineWidth;t.lineWidth=t.lineWidth*s/o,"italic"===h&&t.transform(1,0,.4,1,0,0),d.render(t),"italic"===h&&t.transform(1,0,-.4,1,0,0),t.lineWidth=p,t.scale(1/u,-1/u),t.translate(-this.x,-this.y),this.x+=o*(d.horizAdvX||n.horizAdvX)/s,void 0===f[v]||isNaN(f[v])||(this.x+=f[v])}else{var{x:y,y:g}=this;t.fillStyle&&t.fillText(e,y,g),t.strokeStyle&&t.strokeText(e,y,g)}}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t,r=this.leafTexts[this.textChunkStart],i=r.getStyle("text-anchor").getString("start");t="start"===i?r.x-this.minX:"end"===i?r.x-this.maxX:r.x-(this.minX+this.maxX)/2;for(var e=this.textChunkStart;e<this.leafTexts.length;e++)this.leafTexts[e].x+=t;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach(((r,i)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,i)})),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,r,i,e){var n=i.children[e];n.children.length>0?n.children.forEach(((i,e)=>{r.adjustChildCoordinatesRecursiveCore(t,r,n,e)})):this.adjustChildCoordinates(t,r,i,e)}adjustChildCoordinates(t,r,i,e){var n=i.children[e];if("function"!=typeof n.measureText)return n;t.save(),n.setContext(t,!0);var s=n.getAttribute("x"),a=n.getAttribute("y"),o=n.getAttribute("dx"),h=n.getAttribute("dy"),u=n.getStyle("font-family").getDefinition(),c=Boolean(u)&&u.isRTL;0===e&&(s.hasValue()||s.setValue(n.getInheritedAttribute("x")),a.hasValue()||a.setValue(n.getInheritedAttribute("y")),o.hasValue()||o.setValue(n.getInheritedAttribute("dx")),h.hasValue()||h.setValue(n.getInheritedAttribute("dy")));var f=n.measureText(t);return c&&(r.x-=f),s.hasValue()?(r.applyAnchoring(),n.x=s.getPixels("x"),o.hasValue()&&(n.x+=o.getPixels("x"))):(o.hasValue()&&(r.x+=o.getPixels("x")),n.x=r.x),r.x=n.x,c||(r.x+=f),a.hasValue()?(n.y=a.getPixels("y"),h.hasValue()&&(n.y+=h.getPixels("y"))):(h.hasValue()&&(r.y+=h.getPixels("y")),n.y=r.y),r.y=n.y,r.leafTexts.push(n),r.minX=Math.min(r.minX,n.x,n.x+f),r.maxX=Math.max(r.maxX,n.x,n.x+f),n.clearContext(t),t.restore(),n}getChildBoundingBox(t,r,i,e){var n=i.children[e];if("function"!=typeof n.getBoundingBox)return null;var s=n.getBoundingBox(t);return s?(n.children.forEach(((i,e)=>{var a=r.getChildBoundingBox(t,r,n,e);s.addBoundingBox(a)})),s):null}renderChild(t,r,i,e){var n=i.children[e];n.render(t),n.children.forEach(((i,e)=>{r.renderChild(t,r,n,e)}))}measureText(t){var{measureCache:r}=this;if(~r)return r;var i=this.getText(),e=this.measureTargetText(t,i);return this.measureCache=e,e}measureTargetText(t,r){if(!r.length)return 0;var{parent:i}=this,e=i.getStyle("font-family").getDefinition();if(e){for(var n=this.getFontSize(),s=e.isRTL?r.split("").reverse().join(""):r,a=lh(i.getAttribute("dx").getString()),o=s.length,h=0,u=0;u<o;u++)h+=(this.getGlyph(e,s,u).horizAdvX||e.horizAdvX)*n/e.fontFace.unitsPerEm,void 0===a[u]||isNaN(a[u])||(h+=a[u]);return h}if(!t.measureText)return 10*r.length;t.save(),this.setContext(t,!0);var{width:c}=t.measureText(r);return this.clearContext(t),t.restore(),c}getInheritedAttribute(t){for(var r=this;r instanceof lu&&r.isFirstChild();){var i=r.parent.getAttribute(t);if(i.hasValue(!0))return i.getValue("0");r=r.parent}return null}}class vu extends lu{constructor(t,r,i){super(t,r,new.target===vu||i),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class du extends vu{constructor(){super(...arguments),this.type="textNode"}}class pu extends uu{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var r,{document:i}=this,{screen:e,window:n}=i,s=t.canvas;if(e.setDefaults(t),s.style&&void 0!==t.font&&n&&void 0!==n.getComputedStyle){t.font=n.getComputedStyle(s).getPropertyValue("font");var a=new Ih(i,"fontSize",au.parse(t.font).fontSize);a.hasValue()&&(i.rootEmSize=a.getPixels("y"),i.emSize=i.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:o,height:h}=e.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 u=this.getAttribute("refX"),c=this.getAttribute("refY"),f=this.getAttribute("viewBox"),l=f.hasValue()?lh(f.getString()):null,v=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),d=0,p=0,y=0,g=0;l&&(d=l[0],p=l[1]),this.root||(o=this.getStyle("width").getPixels("x"),h=this.getStyle("height").getPixels("y"),"marker"===this.type&&(y=d,g=p,d=0,p=0)),e.viewPort.setCurrent(o,h),!this.node||this.parent&&"foreignObject"!==(null===(r=this.node.parentNode)||void 0===r?void 0:r.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),l&&(o=l[2],h=l[3]),i.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:e.viewPort.width,desiredWidth:o,height:e.viewPort.height,desiredHeight:h,minX:d,minY:p,refX:u.getValue(),refY:c.getValue(),clip:v,clipX:y,clipY:g}),l&&(e.viewPort.removeCurrent(),e.viewPort.setCurrent(o,h))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=this.getAttribute("width",!0),n=this.getAttribute("height",!0),s=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=e.getNumber(0),h=n.getNumber(0);if(i)if("string"==typeof i)this.getAttribute("preserveAspectRatio",!0).setValue(i);else{var u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(e.setValue(t),n.setValue(r),s.hasValue()||s.setValue("0 0 ".concat(o||t," ").concat(h||r)),a.hasValue()){var c=this.getStyle("width"),f=this.getStyle("height");c.hasValue()&&c.setValue("".concat(t,"px")),f.hasValue()&&f.setValue("".concat(r,"px"))}}}class yu extends cu{constructor(){super(...arguments),this.type="rect"}path(t){var r=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),e=this.getStyle("width",!1,!0).getPixels("x"),n=this.getStyle("height",!1,!0).getPixels("y"),s=this.getAttribute("rx"),a=this.getAttribute("ry"),o=s.getPixels("x"),h=a.getPixels("y");if(s.hasValue()&&!a.hasValue()&&(h=o),a.hasValue()&&!s.hasValue()&&(o=h),o=Math.min(o,e/2),h=Math.min(h,n/2),t){var u=(Math.sqrt(2)-1)/3*4;t.beginPath(),n>0&&e>0&&(t.moveTo(r+o,i),t.lineTo(r+e-o,i),t.bezierCurveTo(r+e-o+u*o,i,r+e,i+h-u*h,r+e,i+h),t.lineTo(r+e,i+n-h),t.bezierCurveTo(r+e,i+n-h+u*h,r+e-o+u*o,i+n,r+e-o,i+n),t.lineTo(r+o,i+n),t.bezierCurveTo(r+o-u*o,i+n,r,i+n-h+u*h,r,i+n-h),t.lineTo(r,i+h),t.bezierCurveTo(r,i+h-u*h,r+o-u*o,i,r+o,i),t.closePath())}return new ou(r,i,r+e,i+n)}getMarkers(){return null}}class gu extends cu{constructor(){super(...arguments),this.type="circle"}path(t){var r=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),e=this.getAttribute("r").getPixels();return t&&e>0&&(t.beginPath(),t.arc(r,i,e,0,2*Math.PI,!1),t.closePath()),new ou(r-e,i-e,r+e,i+e)}getMarkers(){return null}}class mu extends cu{constructor(){super(...arguments),this.type="ellipse"}path(t){var r=(Math.sqrt(2)-1)/3*4,i=this.getAttribute("rx").getPixels("x"),e=this.getAttribute("ry").getPixels("y"),n=this.getAttribute("cx").getPixels("x"),s=this.getAttribute("cy").getPixels("y");return t&&i>0&&e>0&&(t.beginPath(),t.moveTo(n+i,s),t.bezierCurveTo(n+i,s+r*e,n+r*i,s+e,n,s+e),t.bezierCurveTo(n-r*i,s+e,n-i,s+r*e,n-i,s),t.bezierCurveTo(n-i,s-r*e,n-r*i,s-e,n,s-e),t.bezierCurveTo(n+r*i,s-e,n+i,s-r*e,n+i,s),t.closePath()),new ou(n-i,s-e,n+i,s+e)}getMarkers(){return null}}class bu extends cu{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Fh(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Fh(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:r,y:i},{x:e,y:n}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(r,i),t.lineTo(e,n)),new ou(r,i,e,n)}getMarkers(){var[t,r]=this.getPoints(),i=t.angleTo(r);return[[t,i],[r,i]]}}class wu extends cu{constructor(t,r,i){super(t,r,i),this.type="polyline",this.points=[],this.points=Fh.parsePath(this.getAttribute("points").getString())}path(t){var{points:r}=this,[{x:i,y:e}]=r,n=new ou(i,e);return t&&(t.beginPath(),t.moveTo(i,e)),r.forEach((r=>{var{x:i,y:e}=r;n.addPoint(i,e),t&&t.lineTo(i,e)})),n}getMarkers(){var{points:t}=this,r=t.length-1,i=[];return t.forEach(((e,n)=>{n!==r&&i.push([e,e.angleTo(t[n+1])])})),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}}class xu extends wu{constructor(){super(...arguments),this.type="polygon"}path(t){var r=super.path(t),[{x:i,y:e}]=this.points;return t&&(t.lineTo(i,e),t.closePath()),r}}class Mu extends ru{constructor(){super(...arguments),this.type="pattern"}createPattern(t,r,i){var e=this.getStyle("width").getPixels("x",!0),n=this.getStyle("height").getPixels("y",!0),s=new pu(this.document,null);s.attributes.viewBox=new Ih(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.width=new Ih(this.document,"width","".concat(e,"px")),s.attributes.height=new Ih(this.document,"height","".concat(n,"px")),s.attributes.transform=new Ih(this.document,"transform",this.getAttribute("patternTransform").getValue()),s.children=this.children;var a=this.document.createCanvas(e,n),o=a.getContext("2d"),h=this.getAttribute("x"),u=this.getAttribute("y");h.hasValue()&&u.hasValue()&&o.translate(h.getPixels("x",!0),u.getPixels("y",!0)),i.hasValue()?this.styles["fill-opacity"]=i:Reflect.deleteProperty(this.styles,"fill-opacity");for(var c=-1;c<=1;c++)for(var f=-1;f<=1;f++)o.save(),s.attributes.x=new Ih(this.document,"x",c*a.width),s.attributes.y=new Ih(this.document,"y",f*a.height),s.render(o),o.restore();return t.createPattern(a,"repeat")}}class ku extends ru{constructor(){super(...arguments),this.type="marker"}render(t,r,i){if(r){var{x:e,y:n}=r,s=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(e,n),"auto"===s&&t.rotate(i),"strokeWidth"===a&&t.scale(t.lineWidth,t.lineWidth),t.save();var o=new pu(this.document,null);o.type=this.type,o.attributes.viewBox=new Ih(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new Ih(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new Ih(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new Ih(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new Ih(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new Ih(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new Ih(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new Ih(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),"strokeWidth"===a&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===s&&t.rotate(-i),t.translate(-e,-n)}}}class Su extends ru{constructor(){super(...arguments),this.type="defs"}render(){}}class Nu extends uu{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var r=new ou;return this.children.forEach((i=>{r.addBoundingBox(i.getBoundingBox(t))})),r}}class Pu extends ru{constructor(t,r,i){super(t,r,i),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:e,children:n}=this;n.forEach((t=>{"stop"===t.type&&e.push(t)}))}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,r,i){var e=this;this.getHrefAttribute().hasValue()&&(e=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(e));var{stops:n}=e,s=this.getGradient(t,r);if(!s)return this.addParentOpacity(i,n[n.length-1].color);if(n.forEach((t=>{s.addColorStop(t.offset,this.addParentOpacity(i,t.color))})),this.getAttribute("gradientTransform").hasValue()){var{document:a}=this,{MAX_VIRTUAL_PIXELS:o,viewPort:h}=a.screen,[u]=h.viewPorts,c=new yu(a,null);c.attributes.x=new Ih(a,"x",-o/3),c.attributes.y=new Ih(a,"y",-o/3),c.attributes.width=new Ih(a,"width",o),c.attributes.height=new Ih(a,"height",o);var f=new Nu(a,null);f.attributes.transform=new Ih(a,"transform",this.getAttribute("gradientTransform").getValue()),f.children=[c];var l=new pu(a,null);l.attributes.x=new Ih(a,"x",0),l.attributes.y=new Ih(a,"y",0),l.attributes.width=new Ih(a,"width",u.width),l.attributes.height=new Ih(a,"height",u.height),l.children=[f];var v=a.createCanvas(u.width,u.height),d=v.getContext("2d");return d.fillStyle=s,l.render(d),d.createPattern(v,"no-repeat")}return s}inheritStopContainer(t){this.attributesToInherit.forEach((r=>{!this.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&this.getAttribute(r,!0).setValue(t.getAttribute(r).getValue())}))}addParentOpacity(t,r){return t.hasValue()?new Ih(this.document,"color",r).addOpacity(t).getColor():r}}class ju extends Pu{constructor(t,r,i){super(t,r,i),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,r){var i="objectBoundingBox"===this.getGradientUnits(),e=i?r.getBoundingBox(t):null;if(i&&!e)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var n=i?e.x+e.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),s=i?e.y+e.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=i?e.x+e.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=i?e.y+e.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===a&&s===o?null:t.createLinearGradient(n,s,a,o)}}class Ou extends Pu{constructor(t,r,i){super(t,r,i),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,r){var i="objectBoundingBox"===this.getGradientUnits(),e=r.getBoundingBox(t);if(i&&!e)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var n=i?e.x+e.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),s=i?e.y+e.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=n,o=s;this.getAttribute("fx").hasValue()&&(a=i?e.x+e.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=i?e.y+e.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var h=i?(e.width+e.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,o,u,n,s,h)}}class Eu extends ru{constructor(t,r,i){super(t,r,i),this.type="stop";var e=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),n=this.getStyle("stop-opacity"),s=this.getStyle("stop-color",!0);""===s.getString()&&s.setValue("#000"),n.hasValue()&&(s=s.addOpacity(n)),this.offset=e,this.color=s.getColor()}}class Tu extends ru{constructor(t,r,i){super(t,r,i),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.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 Ih(t,"values",null);var e=this.getAttribute("values");e.hasValue()&&this.values.setValue(e.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}calcValue(){var{initialUnits:t}=this,{progress:r,from:i,to:e}=this.getProgress(),n=i.getNumber()+(e.getNumber()-i.getNumber())*r;return"%"===t&&(n*=100),"".concat(n).concat(t)}update(t){var{parent:r}=this,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){var e=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==e||this.frozen){if("remove"===e&&!this.removed)return this.removed=!0,i.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=i.getString();return!1}this.duration+=t;var n=!1;if(this.begin<this.duration){var s=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var o=a.getString();s="".concat(o,"(").concat(s,")")}i.setValue(s),n=!0}return n}getProgress(){var{document:t,values:r}=this,i={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var e=i.progress*(r.getValue().length-1),n=Math.floor(e),s=Math.ceil(e);i.from=new Ih(t,"from",parseFloat(r.getValue()[n])),i.to=new Ih(t,"to",parseFloat(r.getValue()[s])),i.progress=(e-n)/(s-n)}else i.from=this.from,i.to=this.to;return i}}class Cu extends Tu{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:r,to:i}=this.getProgress(),e=new So(r.getColor()),n=new So(i.getColor());if(e.ok&&n.ok){var s=e.g+(n.g-e.g)*t,a=e.b+(n.b-e.b)*t;return"rgb(".concat(Math.floor(e.r+(n.r-e.r)*t),", ").concat(Math.floor(s),", ").concat(Math.floor(a),")")}return this.getAttribute("from").getColor()}}class Au extends Tu{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:r,to:i}=this.getProgress(),e=lh(r.getString()),n=lh(i.getString()),s=e.map(((r,i)=>r+(n[i]-r)*t)).join(" ");return s}}class Ru extends ru{constructor(t,r,i){super(t,r,i),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:e}=t,{children:n}=this;for(var s of n)switch(s.type){case"font-face":this.fontFace=s;var a=s.getStyle("font-family");a.hasValue()&&(e[a.getString()]=this);break;case"missing-glyph":this.missingGlyph=s;break;case"glyph":var o=s;o.arabicForm?(this.isRTL=!0,this.isArabic=!0,void 0===this.glyphs[o.unicode]&&(this.glyphs[o.unicode]={}),this.glyphs[o.unicode][o.arabicForm]=o):this.glyphs[o.unicode]=o}}render(){}}class Bu extends ru{constructor(t,r,i){super(t,r,i),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 Lu extends cu{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class $u extends lu{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var r=t.children[0];if(r)return r.getText()}return""}}class Iu extends lu{constructor(t,r,i){super(t,r,i),this.type="a";var{childNodes:e}=r,n=e[0],s=e.length>0&&Array.from(e).every((t=>3===t.nodeType));this.hasText=s,this.text=s?this.getTextFromNode(n):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:r,x:i,y:e}=this,{mouse:n}=r.screen,s=new Ih(r,"fontSize",au.parse(r.ctx.font).fontSize);n.isWorking()&&n.checkBoundingBox(this,new ou(i,e-s.getPixels("y"),i+this.measureText(t),e))}else if(this.children.length>0){var a=new Nu(this.document,null);a.children=this.children,a.parent=this,a.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}}function Du(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,e)}return i}function Fu(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?Du(Object(i),!0).forEach((function(r){Ba(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Du(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}class zu extends lu{constructor(t,r,i){super(t,r,i),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var e=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(e)}getText(){return this.text}path(t){var{dataArray:r}=this;t&&t.beginPath(),r.forEach((r=>{var{type:i,points:e}=r;switch(i){case hu.LINE_TO:t&&t.lineTo(e[0],e[1]);break;case hu.MOVE_TO:t&&t.moveTo(e[0],e[1]);break;case hu.CURVE_TO:t&&t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case hu.QUAD_TO:t&&t.quadraticCurveTo(e[0],e[1],e[2],e[3]);break;case hu.ARC:var[n,s,a,o,h,u,c,f]=e,l=a>o?a:o,v=a>o?1:a/o,d=a>o?o/a:1;t&&(t.translate(n,s),t.rotate(c),t.scale(v,d),t.arc(0,0,l,h,h+u,Boolean(1-f)),t.scale(1/v,1/d),t.rotate(-c),t.translate(-n,-s));break;case hu.CLOSE_PATH:t&&t.closePath()}}))}renderChildren(t){this.setTextData(t),t.save();var r=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),{glyphInfo:e}=this,n=t.fillStyle;"underline"===r&&t.beginPath(),e.forEach(((e,n)=>{var{p0:s,p1:a,rotation:o,text:h}=e;t.save(),t.translate(s.x,s.y),t.rotate(o),t.fillStyle&&t.fillText(h,0,0),t.strokeStyle&&t.strokeText(h,0,0),t.restore(),"underline"===r&&(0===n&&t.moveTo(s.x,s.y+i/8),t.lineTo(a.x,a.y+i/5))})),"underline"===r&&(t.lineWidth=i/20,t.strokeStyle=n,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){return this.letterSpacingCache[arguments.length>0&&void 0!==arguments[0]?arguments[0]:0]||0}findSegmentToFitChar(t,r,i,e,n,s,a,o,h){var u=s,c=this.measureText(t,o);" "===o&&"justify"===r&&i<e&&(c+=(e-i)/n),h>-1&&(u+=this.getLetterSpacingAt(h));var f=this.textHeight/20,l=this.getEquidistantPointOnPath(u,f,0),v=this.getEquidistantPointOnPath(u+c,f,0),d={p0:l,p1:v},p=l&&v?Math.atan2(v.y-l.y,v.x-l.x):0;if(a){var y=Math.cos(Math.PI/2+p)*a,g=Math.cos(-p)*a;d.p0=Fu(Fu({},l),{},{x:l.x+y,y:l.y+g}),d.p1=Fu(Fu({},v),{},{x:v.x+y,y:v.y+g})}return{offset:u+=c,segment:d,rotation:p}}measureText(t,r){var{measuresCache:i}=this,e=r||this.getText();if(i.has(e))return i.get(e);var n=this.measureTargetText(t,e);return i.set(e,n),n}setTextData(t){if(!this.glyphInfo){var r=this.getText(),i=r.split(""),e=r.split(" ").length-1,n=this.parent.getAttribute("dx").split().map((t=>t.getPixels("x"))),s=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),h=this.parent.getStyle("letter-spacing"),u=0;o.hasValue()&&"inherit"!==o.getValue()?o.hasValue()&&"initial"!==o.getValue()&&"unset"!==o.getValue()&&(u=o.getPixels()):u=h.getPixels();var c=[],f=r.length;this.letterSpacingCache=c;for(var l=0;l<f;l++)c.push(void 0!==n[l]?n[l]:u);var v=c.reduce(((t,r,i)=>0===i?0:t+r||0),0),d=this.measureText(t),p=Math.max(d+v,0);this.textWidth=d,this.textHeight=this.getFontSize(),this.glyphInfo=[];var y=this.getPathLength(),g=this.getStyle("startOffset").getNumber(0)*y,m=0;"middle"!==a&&"center"!==a||(m=-p/2),"end"!==a&&"right"!==a||(m=-p),m+=g,i.forEach(((r,n)=>{var{offset:o,segment:h,rotation:u}=this.findSegmentToFitChar(t,a,p,y,e,m,s,r,n);m=o,h.p0&&h.p1&&this.glyphInfo.push({text:i[n],p0:h.p0,p1:h.p1,rotation:u})}))}}parsePathData(t){if(this.pathLength=-1,!t)return[];var r=[],{pathParser:i}=t;for(i.reset();!i.isEnd();){var{current:e}=i,n=e?e.x:0,s=e?e.y:0,a=i.next(),o=a.type,h=[];switch(a.type){case hu.MOVE_TO:this.pathM(i,h);break;case hu.LINE_TO:o=this.pathL(i,h);break;case hu.HORIZ_LINE_TO:o=this.pathH(i,h);break;case hu.VERT_LINE_TO:o=this.pathV(i,h);break;case hu.CURVE_TO:this.pathC(i,h);break;case hu.SMOOTH_CURVE_TO:o=this.pathS(i,h);break;case hu.QUAD_TO:this.pathQ(i,h);break;case hu.SMOOTH_QUAD_TO:o=this.pathT(i,h);break;case hu.ARC:h=this.pathA(i);break;case hu.CLOSE_PATH:cu.pathZ(i)}r.push(a.type!==hu.CLOSE_PATH?{type:o,points:h,start:{x:n,y:s},pathLength:this.calcLength(n,s,o,h)}:{type:hu.CLOSE_PATH,points:[],pathLength:0})}return r}pathM(t,r){var{x:i,y:e}=cu.pathM(t).point;r.push(i,e)}pathL(t,r){var{x:i,y:e}=cu.pathL(t).point;return r.push(i,e),hu.LINE_TO}pathH(t,r){var{x:i,y:e}=cu.pathH(t).point;return r.push(i,e),hu.LINE_TO}pathV(t,r){var{x:i,y:e}=cu.pathV(t).point;return r.push(i,e),hu.LINE_TO}pathC(t,r){var{point:i,controlPoint:e,currentPoint:n}=cu.pathC(t);r.push(i.x,i.y,e.x,e.y,n.x,n.y)}pathS(t,r){var{point:i,controlPoint:e,currentPoint:n}=cu.pathS(t);return r.push(i.x,i.y,e.x,e.y,n.x,n.y),hu.CURVE_TO}pathQ(t,r){var{controlPoint:i,currentPoint:e}=cu.pathQ(t);r.push(i.x,i.y,e.x,e.y)}pathT(t,r){var{controlPoint:i,currentPoint:e}=cu.pathT(t);return r.push(i.x,i.y,e.x,e.y),hu.QUAD_TO}pathA(t){var{rX:r,rY:i,sweepFlag:e,xAxisRotation:n,centp:s,a1:a,ad:o}=cu.pathA(t);return 0===e&&o>0&&(o-=2*Math.PI),1===e&&o<0&&(o+=2*Math.PI),[s.x,s.y,r,i,a,o,n,e]}calcLength(t,r,i,e){var n=0,s=null,a=null,o=0;switch(i){case hu.LINE_TO:return this.getLineLength(t,r,e[0],e[1]);case hu.CURVE_TO:for(n=0,s=this.getPointOnCubicBezier(0,t,r,e[0],e[1],e[2],e[3],e[4],e[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,t,r,e[0],e[1],e[2],e[3],e[4],e[5]),n+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return n;case hu.QUAD_TO:for(n=0,s=this.getPointOnQuadraticBezier(0,t,r,e[0],e[1],e[2],e[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,t,r,e[0],e[1],e[2],e[3]),n+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return n;case hu.ARC:n=0;var h=e[4],u=e[5],c=e[4]+u,f=Math.PI/180;if(Math.abs(h-c)<f&&(f=Math.abs(h-c)),s=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],h,0),u<0)for(o=h-f;o>c;o-=f)a=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],o,0),n+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;else for(o=h+f;o<c;o+=f)a=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],o,0),n+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return a=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],c,0),n+this.getLineLength(s.x,s.y,a.x,a.y)}return 0}getPointOnLine(t,r,i,e,n){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:i,o=(n-i)/(e-r+Ph),h=Math.sqrt(t*t/(1+o*o));e<r&&(h*=-1);var u=o*h,c=null;if(e===r)c={x:s,y:a+u};else if((a-i)/(s-r+Ph)===o)c={x:s+h,y:a+u};else{var f,l,v=this.getLineLength(r,i,e,n);if(v<Ph)return null;var d=(s-r)*(e-r)+(a-i)*(n-i),p=this.getLineLength(s,a,f=r+(d/=v*v)*(e-r),l=i+d*(n-i)),y=Math.sqrt(t*t-p*p);h=Math.sqrt(y*y/(1+o*o)),e<r&&(h*=-1),c={x:f+h,y:l+(u=o*h)}}return c}getPointOnPath(t){var r=this.getPathLength(),i=0,e=null;if(t<-5e-5||t-5e-5>r)return null;var{dataArray:n}=this;for(var s of n){if(!s||!(s.pathLength<5e-5||i+s.pathLength+5e-5<t)){var a=t-i,o=0;switch(s.type){case hu.LINE_TO:e=this.getPointOnLine(a,s.start.x,s.start.y,s.points[0],s.points[1],s.start.x,s.start.y);break;case hu.ARC:var h=s.points[5],u=s.points[4]+h;if(o=s.points[4]+a/s.pathLength*h,h<0&&o<u||h>=0&&o>u)break;e=this.getPointOnEllipticalArc(s.points[0],s.points[1],s.points[2],s.points[3],o,s.points[6]);break;case hu.CURVE_TO:(o=a/s.pathLength)>1&&(o=1),e=this.getPointOnCubicBezier(o,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 hu.QUAD_TO:(o=a/s.pathLength)>1&&(o=1),e=this.getPointOnQuadraticBezier(o,s.start.x,s.start.y,s.points[0],s.points[1],s.points[2],s.points[3])}if(e)return e;break}i+=s.pathLength}return null}getLineLength(t,r,i,e){return Math.sqrt((i-t)*(i-t)+(e-r)*(e-r))}getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(((t,r)=>r.pathLength>0?t+r.pathLength:t),0)),this.pathLength}getPointOnCubicBezier(t,r,i,e,n,s,a,o,h){return{x:o*Th(t)+s*Ch(t)+e*Ah(t)+r*Rh(t),y:h*Th(t)+a*Ch(t)+n*Ah(t)+i*Rh(t)}}getPointOnQuadraticBezier(t,r,i,e,n,s,a){return{x:s*Bh(t)+e*Lh(t)+r*$h(t),y:a*Bh(t)+n*Lh(t)+i*$h(t)}}getPointOnEllipticalArc(t,r,i,e,n,s){var a=Math.cos(s),o=Math.sin(s),h=i*Math.cos(n),u=e*Math.sin(n);return{x:t+(h*a-u*o),y:r+(h*o+u*a)}}buildEquidistantCache(t,r){var i=this.getPathLength(),e=r||.25,n=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==n||this.equidistantCache.precision!==e){this.equidistantCache={step:n,precision:e,points:[]};for(var s=0,a=0;a<=i;a+=e){var o=this.getPointOnPath(a),h=this.getPointOnPath(a+e);o&&h&&(s+=this.getLineLength(o.x,o.y,h.x,h.y))>=n&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:a}),s-=n)}}}getEquidistantPointOnPath(t,r,i){if(this.buildEquidistantCache(r,i),t<0||t-this.getPathLength()>5e-5)return null;var e=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[e]||null}}var _u=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Yu extends uu{constructor(t,r,i){super(t,r,i),this.type="image",this.loaded=!1;var e=this.getHrefAttribute().getString();if(e){var n=e.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(e);t.images.push(this),n?this.loadSvg(e):this.loadImage(e),this.isSvg=n}}loadImage(t){var r=this;return bn((function*(){try{var i=yield r.document.createImage(t);r.image=i}catch(r){console.error('Error while loading image "'.concat(t,'":'),r)}r.loaded=!0}))()}loadSvg(t){var r=this;return bn((function*(){var i=_u.exec(t);if(i){var e=i[5];r.image="base64"===i[4]?atob(e):decodeURIComponent(e)}else try{var n=yield r.document.fetch(t),s=yield n.text();r.image=s}catch(r){console.error('Error while loading image "'.concat(t,'":'),r)}r.loaded=!0}))()}renderChildren(t){var{document:r,image:i,loaded:e}=this,n=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(e&&i&&a&&o){if(t.save(),t.translate(n,s),this.isSvg){var h=r.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o});h.document.documentElement.parent=this,h.render()}else{var u=this.image;r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:u.width,height:o,desiredHeight:u.height}),this.loaded&&(void 0===u.complete||u.complete)&&t.drawImage(u,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),e=this.getStyle("height").getPixels("y");return new ou(t,r,t+i,r+e)}}class Xu extends uu{constructor(){super(...arguments),this.type="symbol"}render(t){}}class qu{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,r){var i=this;return bn((function*(){try{var{document:e}=i,n=(yield e.canvg.parser.load(r)).getElementsByTagName("font");Array.from(n).forEach((r=>{var i=e.createElement(r);e.definitions[t]=i}))}catch(t){console.error('Error while loading font "'.concat(r,'":'),t)}i.loaded=!0}))()}}class Gu extends ru{constructor(t,r,i){super(t,r,i),this.type="style";var e=uh(Array.from(r.childNodes).map((t=>t.textContent)).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,""));e.split("}").forEach((r=>{var i=r.trim();if(i){var e=i.split("{"),n=e[0].split(","),s=e[1].split(";");n.forEach((r=>{var i=r.trim();if(i){var e=t.styles[i]||{};if(s.forEach((r=>{var i=r.indexOf(":"),n=r.substr(0,i).trim(),s=r.substr(i+1,r.length-i).trim();n&&s&&(e[n]=new Ih(t,n,s))})),t.styles[i]=e,t.stylesSpecificity[i]=Nh(i),"@font-face"===i){var n=e["font-family"].getString().replace(/"|'/g,"");e.src.getString().split(",").forEach((r=>{if(r.indexOf('format("svg")')>0){var i=ph(r);i&&new qu(t).load(n,i)}}))}}}))}}))}}Gu.parseExternalUrl=ph;class Uu extends uu{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var r=this.getAttribute("x"),i=this.getAttribute("y");r.hasValue()&&t.translate(r.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}path(t){var{element:r}=this;r&&r.path(t)}renderChildren(t){var{document:r,element:i}=this;if(i){var e=i;if("symbol"===i.type&&((e=new pu(r,null)).attributes.viewBox=new Ih(r,"viewBox",i.getAttribute("viewBox").getString()),e.attributes.preserveAspectRatio=new Ih(r,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),e.attributes.overflow=new Ih(r,"overflow",i.getAttribute("overflow").getString()),e.children=i.children,i.styles.opacity=new Ih(r,"opacity",this.calculateOpacity())),"svg"===e.type){var n=this.getStyle("width",!1,!0),s=this.getStyle("height",!1,!0);n.hasValue()&&(e.attributes.width=new Ih(r,"width",n.getString())),s.hasValue()&&(e.attributes.height=new Ih(r,"height",s.getString()))}var a=e.parent;e.parent=this,e.render(t),e.parent=a}}getBoundingBox(t){var{element:r}=this;return r?r.getBoundingBox(t):null}elementTransform(){var{document:t,element:r}=this;return tu.fromElement(t,r)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function Vu(t,r,i,e,n,s){return t[i*e*4+4*r+s]}function Hu(t,r,i,e,n,s,a){t[i*e*4+4*r+s]=a}function Wu(t,r,i){return t[r]*i}function Qu(t,r,i,e){return r+Math.cos(t)*i+Math.sin(t)*e}class Zu extends ru{constructor(t,r,i){super(t,r,i),this.type="feColorMatrix";var e=lh(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":var n=e[0];e=[.213+.787*n,.715-.715*n,.072-.072*n,0,0,.213-.213*n,.715+.285*n,.072-.072*n,0,0,.213-.213*n,.715-.715*n,.072+.928*n,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var s=e[0]*Math.PI/180;e=[Qu(s,.213,.787,-.213),Qu(s,.715,-.715,-.715),Qu(s,.072,-.072,.928),0,0,Qu(s,.213,-.213,.143),Qu(s,.715,.285,.14),Qu(s,.072,-.072,-.283),0,0,Qu(s,.213,-.213,-.787),Qu(s,.715,-.715,.715),Qu(s,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[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]}this.matrix=e,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,r,i,e,n){for(var{includeOpacity:s,matrix:a}=this,o=t.getImageData(0,0,e,n),h=0;h<n;h++)for(var u=0;u<e;u++){var c=Vu(o.data,u,h,e,0,0),f=Vu(o.data,u,h,e,0,1),l=Vu(o.data,u,h,e,0,2),v=Vu(o.data,u,h,e,0,3),d=Wu(a,0,c)+Wu(a,1,f)+Wu(a,2,l)+Wu(a,3,v)+Wu(a,4,1),p=Wu(a,5,c)+Wu(a,6,f)+Wu(a,7,l)+Wu(a,8,v)+Wu(a,9,1),y=Wu(a,10,c)+Wu(a,11,f)+Wu(a,12,l)+Wu(a,13,v)+Wu(a,14,1),g=Wu(a,15,c)+Wu(a,16,f)+Wu(a,17,l)+Wu(a,18,v)+Wu(a,19,1);s&&(d=0,p=0,y=0,g*=v/255),Hu(o.data,u,h,e,0,0,d),Hu(o.data,u,h,e,0,1,p),Hu(o.data,u,h,e,0,2,y),Hu(o.data,u,h,e,0,3,g)}t.clearRect(0,0,e,n),t.putImageData(o,0,0)}}class Ku extends ru{constructor(){super(...arguments),this.type="mask"}apply(t,r){var{document:i}=this,e=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!s&&!a){var o=new ou;this.children.forEach((r=>{o.addBoundingBox(r.getBoundingBox(t))})),e=Math.floor(o.x1),n=Math.floor(o.y1),s=Math.floor(o.width),a=Math.floor(o.height)}var h=this.removeStyles(r,Ku.ignoreStyles),u=i.createCanvas(e+s,n+a),c=u.getContext("2d");i.screen.setDefaults(c),this.renderChildren(c),new Zu(i,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,e+s,n+a);var f=i.createCanvas(e+s,n+a),l=f.getContext("2d");i.screen.setDefaults(l),r.render(l),l.globalCompositeOperation="destination-in",l.fillStyle=c.createPattern(u,"no-repeat"),l.fillRect(0,0,e+s,n+a),t.fillStyle=l.createPattern(f,"no-repeat"),t.fillRect(0,0,e+s,n+a),this.restoreStyles(r,h)}render(t){}}Ku.ignoreStyles=["mask","transform","clip-path"];var Ju=()=>{};class tc extends ru{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:r}=this,i=Reflect.getPrototypeOf(t),{beginPath:e,closePath:n}=t;i&&(i.beginPath=Ju,i.closePath=Ju),Reflect.apply(e,t,[]),this.children.forEach((e=>{if(void 0!==e.path){var s=void 0!==e.elementTransform?e.elementTransform():null;s||(s=tu.fromElement(r,e)),s&&s.apply(t),e.path(t),i&&(i.closePath=n),s&&s.unapply(t)}})),Reflect.apply(n,t,[]),t.clip(),i&&(i.beginPath=e,i.closePath=n)}render(t){}}class rc extends ru{constructor(){super(...arguments),this.type="filter"}apply(t,r){var{document:i,children:e}=this,n=r.getBoundingBox(t);if(n){var s=0,a=0;e.forEach((t=>{var r=t.extraFilterDistance||0;s=Math.max(s,r),a=Math.max(a,r)}));var o=Math.floor(n.width),h=Math.floor(n.height),u=o+2*s,c=h+2*a;if(!(u<1||c<1)){var f=Math.floor(n.x),l=Math.floor(n.y),v=this.removeStyles(r,rc.ignoreStyles),d=i.createCanvas(u,c),p=d.getContext("2d");i.screen.setDefaults(p),p.translate(-f+s,-l+a),r.render(p),e.forEach((t=>{"function"==typeof t.apply&&t.apply(p,0,0,u,c)})),t.drawImage(d,0,0,u,c,f-s,l-a,u,c),this.restoreStyles(r,v)}}}render(t){}}rc.ignoreStyles=["filter","transform","clip-path"];class ic extends ru{constructor(t,r,i){super(t,r,i),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,r,i,e,n){}}class ec extends ru{constructor(){super(...arguments),this.type="feMorphology"}apply(t,r,i,e,n){}}class nc extends ru{constructor(){super(...arguments),this.type="feComposite"}apply(t,r,i,e,n){}}class sc extends ru{constructor(t,r,i){super(t,r,i),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,r,i,e,n){var{document:s,blurRadius:a}=this,o=s.window?s.window.document.body:null,h=t.canvas;h.id=s.getUniqueId(),o&&(h.style.display="none",o.appendChild(h)),ah(h,r,i,e,n,a),o&&o.removeChild(h)}}class ac extends ru{constructor(){super(...arguments),this.type="title"}}class oc extends ru{constructor(){super(...arguments),this.type="desc"}}var hc={svg:pu,rect:yu,circle:gu,ellipse:mu,line:bu,polyline:wu,polygon:xu,path:cu,pattern:Mu,marker:ku,defs:Su,linearGradient:ju,radialGradient:Ou,stop:Eu,animate:Tu,animateColor:Cu,animateTransform:Au,font:Ru,"font-face":Bu,"missing-glyph":Lu,glyph:fu,text:lu,tspan:vu,tref:$u,a:Iu,textPath:zu,image:Yu,g:Nu,symbol:Xu,style:Gu,use:Uu,mask:Ku,clipPath:tc,filter:rc,feDropShadow:ic,feMorphology:ec,feComposite:nc,feColorMatrix:Zu,feGaussianBlur:sc,title:ac,desc:oc};function uc(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,e)}return i}function cc(){return cc=bn((function*(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=document.createElement("img");return r&&(i.crossOrigin="Anonymous"),new Promise(((r,e)=>{i.onload=()=>{r(i)},i.onerror=(t,r,i,n,s)=>{e(s)},i.src=t}))})),cc.apply(this,arguments)}class fc{constructor(t){var{rootEmSize:r=12,emSize:i=12,createCanvas:e=fc.createCanvas,createImage:n=fc.createImage,anonymousCrossOrigin:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.canvg=t,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=r,this.emSize=i,this.createCanvas=e,this.createImage=this.bindCreateImage(n,s),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,r){return"boolean"==typeof r?(i,e)=>t(i,"boolean"==typeof e?e:r):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:r}=this;r.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every((t=>t.loaded))}isFontsLoaded(){return this.fonts.every((t=>t.loaded))}createDocumentElement(t){var r=this.createElement(t.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}createElement(t){var r=t.nodeName.replace(/^[^:]+:/,""),i=fc.elementTypes[r];return void 0!==i?new i(this,t):new iu(this,t)}createTextNode(t){return new du(this,t)}setViewBox(t){this.screen.setViewBox(function(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?uc(Object(i),!0).forEach((function(r){Ba(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):uc(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({document:this},t))}}function lc(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,e)}return i}function vc(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?lc(Object(i),!0).forEach((function(r){Ba(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):lc(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}fc.createCanvas=function(t,r){var i=document.createElement("canvas");return i.width=t,i.height=r,i},fc.createImage=function(t){return cc.apply(this,arguments)},fc.elementTypes=hc;class dc{constructor(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.parser=new Uh(i),this.screen=new Xh(t,i),this.options=i;var e=new fc(this,i),n=e.createDocumentElement(r);this.document=e,this.documentElement=n}static from(t,r){var i=arguments;return bn((function*(){var e=i.length>2&&void 0!==i[2]?i[2]:{},n=new Uh(e),s=yield n.parse(r);return new dc(t,s,e)}))()}static fromString(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=new Uh(i).parseFromString(r);return new dc(t,e,i)}fork(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return dc.from(t,r,vc(vc({},this.options),i))}forkString(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return dc.fromString(t,r,vc(vc({},this.options),i))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,r=this;return bn((function*(){r.start(vc({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},t.length>0&&void 0!==t[0]?t[0]:{})),yield r.ready(),r.stop()}))()}start(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{documentElement:r,screen:i,options:e}=this;i.start(r,vc(vc({enableRedraw:!0},e),t))}stop(){this.screen.stop()}resize(t){this.documentElement.resize(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])}}export default dc;export{Iu as AElement,Cu as AnimateColorElement,Tu as AnimateElement,Au as AnimateTransformElement,ou as BoundingBox,Th as CB1,Ch as CB2,Ah as CB3,Rh as CB4,dc as Canvg,gu as CircleElement,tc as ClipPathElement,Su as DefsElement,oc as DescElement,fc as Document,ru as Element,mu as EllipseElement,Zu as FeColorMatrixElement,nc as FeCompositeElement,ic as FeDropShadowElement,sc as FeGaussianBlurElement,ec as FeMorphologyElement,rc as FilterElement,au as Font,Ru as FontElement,Bu as FontFaceElement,Nu as GElement,fu as GlyphElement,Pu as GradientElement,Yu as ImageElement,bu as LineElement,ju as LinearGradientElement,ku as MarkerElement,Ku as MaskElement,Qh as Matrix,Lu as MissingGlyphElement,zh as Mouse,Ph as PSEUDO_ZERO,Uh as Parser,cu as PathElement,hu as PathParser,Mu as PatternElement,Fh as Point,xu as PolygonElement,wu as PolylineElement,Ih as Property,Bh as QB1,Lh as QB2,$h as QB3,Ou as RadialGradientElement,yu as RectElement,uu as RenderedElement,Hh as Rotate,pu as SVGElement,qu as SVGFontLoader,Wh as Scale,Xh as Screen,Zh as Skew,Kh as SkewX,Jh as SkewY,Eu as StopElement,Gu as StyleElement,Xu as SymbolElement,$u as TRefElement,vu as TSpanElement,lu as TextElement,zu as TextPathElement,ac as TitleElement,tu as Transform,Vh as Translate,iu as UnknownElement,Uu as UseElement,Dh as ViewPort,uh as compressSpaces,Nh as getSelectorSpecificity,dh as normalizeAttributeName,yh as normalizeColor,ph as parseExternalUrl,hh as presets,lh as toNumbers,ch as trimLeft,fh as trimRight,jh as vectorMagnitude,Eh as vectorsAngle,Oh as vectorsRatio}