Agriculture-front-end/public/libs/canvg/3.0.2/canvg.min.js
2023-06-22 06:50:23 +08:00

6 lines
153 KiB
JavaScript

/**
* Skipped minification because the original files appears to be already minified.
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e=e||self,t(e.canvg={}))})(this,function(e){'use strict';var ge=Math.tan,ce=Math.atan2,pe=Math.PI,ye=Math.round,he=String.prototype,fe=Math.max,me=Math.min,xe=Math.ceil,be=Math.sin,ve=Math.cos,ke=Math.floor,Se=Math.sqrt,Pe=Math.pow;function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(e){return e.replace(/(?!\u3000)\s+/gm," ")}function a(e){return e.replace(/^[\n \t]+/,"")}function r(e){return e.replace(/[\n \t]+$/,"")}function o(e){var t=(e||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return t.map(parseFloat)}function l(e){return ra.test(e)?e.toLowerCase():e}function s(e){var t=e.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return t[2]||t[3]||t[4]}function d(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],a=!0,r=!1,i=void 0;try{for(var o=e[Symbol.iterator](),l;!(a=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));a=!0);}catch(e){r=!0,i=e}finally{try{a||null==o["return"]||o["return"]()}finally{if(r)throw i}}return n}}function u(e,t){return da(e)||ua(e,t)||ga()}function g(e,t){var n=e.match(t);return n?[e.replace(t," "),n.length]:[e,0]}function p(e){var t=[0,0,0],n=e.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),a=0,r=g(n,pa),i=ca(r,2);n=i[0],a=i[1],t[1]+=a;var o=g(n,ya),l=ca(o,2);n=l[0],a=l[1],t[0]+=a;var s=g(n,ha),d=ca(s,2);n=d[0],a=d[1],t[1]+=a;var u=g(n,fa),c=ca(u,2);n=c[0],a=c[1],t[2]+=a;var p=g(n,ma),y=ca(p,2);n=y[0],a=y[1],t[1]+=a;var h=g(n,xa),f=ca(h,2);n=f[0],a=f[1],t[1]+=a,n=n.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," ");var m=g(n,ba),x=ca(m,2);return n=x[0],a=x[1],t[2]+=a,t.join("")}function y(e){return Se(Pe(e[0],2)+Pe(e[1],2))}function h(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))}function x(e,t){var n=Math.acos;return(e[0]*t[1]<e[1]*t[0]?-1:1)*n(h(e,t))}function b(e){return e*e*e}function v(e){return 3*e*e*(1-e)}function k(e){return 3*e*(1-e)*(1-e)}function S(e){return(1-e)*(1-e)*(1-e)}function P(e){return e*e}function A(e){return 2*e*(1-e)}function E(e){return(1-e)*(1-e)}function T(e,t,n,a,r,i,o){try{var l=e[i](o),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(a,r)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){for(var n=0,a;n<t.length;n++)a=t[n],a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}function O(){throw new Error("setTimeout has not been defined")}function V(){throw new Error("clearTimeout has not been defined")}function L(t){if(Jo===setTimeout)return setTimeout(t,0);if((Jo===O||!Jo)&&setTimeout)return Jo=setTimeout,setTimeout(t,0);try{return Jo(t,0)}catch(n){try{return Jo.call(null,t,0)}catch(n){return Jo.call(this,t,0)}}}function R(t){if(el===clearTimeout)return clearTimeout(t);if((el===V||!el)&&clearTimeout)return el=clearTimeout,clearTimeout(t);try{return el(t)}catch(n){try{return el.call(null,t)}catch(n){return el.call(this,t)}}}function I(){nl&&rl&&(nl=!1,rl.length?tl=rl.concat(tl):al=-1,tl.length&&D())}function D(){if(!nl){var e=L(I);nl=!0;for(var t=tl.length;t;){for(rl=tl,tl=[];++al<t;)rl&&rl[al].run();al=-1,t=tl.length}rl=null,nl=!1,R(e)}}function N(e){var t=Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];tl.push(new M(e,t)),1!==tl.length||nl||L(D)}function M(e,t){this.fun=e,this.array=t}function z(){}function B(){throw new Error("process.binding is not supported")}function _(){return"/"}function F(){throw new Error("process.chdir is not supported")}function G(){return 0}function H(e){var t=1e-3*gl.call(ul),n=ke(t),a=ke(1e9*(t%1));return e&&(n-=e[0],a-=e[1],0>a&&(n--,a+=1e9)),[n,a]}function Y(){var e=new Date;return(e-cl)/1e3}function $(e){var t=e.trim();return /^('|")/.test(t)?t:"\"".concat(t,"\"")}function U(e){return"undefined"==typeof process?e:e.trim().split(",").map($).join(",")}function W(e){if(!e)return"";var t=e.trim().toLowerCase();return"normal"===t||"italic"===t||"oblique"===t||"inherit"===t||"initial"===t||"unset"===t?t:/^oblique\s+(-|)\d+deg$/.test(t)?t:""}function q(e){if(!e)return"";var t=e.trim().toLowerCase();return"normal"===t||"bold"===t||"lighter"===t||"bolder"===t||"inherit"===t||"initial"===t||"unset"===t?t:/^[\d.]+$/.test(t)?t:""}function X(e){return n(e).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Q(e){var t=e.split("("),n=ca(t,2),a=n[0],r=n[1];return[a.trim(),r.trim().replace(")","")]}function K(e){var t=e.replace(/,/gm," ").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2").replace(/([0-9])([+\-])/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");return n(t).trim()}function Z(e,t,n,a,r,i){return e[4*(n*a)+4*t+i]}function J(e,t,n,a,r,i,o){e[4*(n*a)+4*t+i]=o}function ee(e,t,n){var a=e[t];return a*(0>a?n-255:n)}function m(e,t,n,a){return t+ve(e)*n+be(e)*a}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t,n,a,r){if("string"==typeof e&&(e=document.getElementById(e)),!e||"object"!==c(e)||!("getContext"in e))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var i=e.getContext("2d");try{return i.getImageData(t,n,a,r)}catch(t){throw new Error("unable to access image data: "+t)}}function ae(e,t,n,a,r,i){if(!(isNaN(i)||1>i)){i|=0;var o=ne(e,t,n,a,r);o=re(o,t,n,a,r,i),e.getContext("2d").putImageData(o,t,n)}}function re(e,t,n,a,r,o){var l=e.data,s=a-1,d=r-1,u=o+1,g=u*(u+1)/2,c=new qu,h=c,f,m,b,v,k,S,P,A,E,T,C,w,O,V,L,R,I,D,N,M,z,B,_,F,j;for(b=1;b<2*o+1;b++)h=h.next=new qu,b===u&&(j=h);h.next=c;var G=null,H=null;P=S=0;var Y=Uu[o],$=Wu[o];for(m=0;m<r;m++){for(R=I=D=N=A=E=T=C=0,w=u*(M=l[S]),O=u*(z=l[S+1]),V=u*(B=l[S+2]),L=u*(_=l[S+3]),A+=g*M,E+=g*z,T+=g*B,C+=g*_,h=c,b=0;b<u;b++)h.r=M,h.g=z,h.b=B,h.a=_,h=h.next;for(b=1;b<u;b++)v=S+((s<b?s:b)<<2),A+=(h.r=M=l[v])*(F=u-b),E+=(h.g=z=l[v+1])*F,T+=(h.b=B=l[v+2])*F,C+=(h.a=_=l[v+3])*F,R+=M,I+=z,D+=B,N+=_,h=h.next;for(G=c,H=j,f=0;f<a;f++)l[S+3]=_=C*Y>>$,0===_?l[S]=l[S+1]=l[S+2]=0:(_=255/_,l[S]=(A*Y>>$)*_,l[S+1]=(E*Y>>$)*_,l[S+2]=(T*Y>>$)*_),A-=w,E-=O,T-=V,C-=L,w-=G.r,O-=G.g,V-=G.b,L-=G.a,v=P+((v=f+o+1)<s?v:s)<<2,R+=G.r=l[v],I+=G.g=l[v+1],D+=G.b=l[v+2],N+=G.a=l[v+3],A+=R,E+=I,T+=D,C+=N,G=G.next,w+=M=H.r,O+=z=H.g,V+=B=H.b,L+=_=H.a,R-=M,I-=z,D-=B,N-=_,H=H.next,S+=4;P+=a}for(f=0;f<a;f++){for(I=D=N=R=E=T=C=A=0,S=f<<2,w=u*(M=l[S]),O=u*(z=l[S+1]),V=u*(B=l[S+2]),L=u*(_=l[S+3]),A+=g*M,E+=g*z,T+=g*B,C+=g*_,h=c,b=0;b<u;b++)h.r=M,h.g=z,h.b=B,h.a=_,h=h.next;for(k=a,b=1;b<=o;b++)S=k+f<<2,A+=(h.r=M=l[S])*(F=u-b),E+=(h.g=z=l[S+1])*F,T+=(h.b=B=l[S+2])*F,C+=(h.a=_=l[S+3])*F,R+=M,I+=z,D+=B,N+=_,h=h.next,b<d&&(k+=a);for(S=f,G=c,H=j,m=0;m<r;m++)v=S<<2,l[v+3]=_=C*Y>>$,0<_?(_=255/_,l[v]=(A*Y>>$)*_,l[v+1]=(E*Y>>$)*_,l[v+2]=(T*Y>>$)*_):l[v]=l[v+1]=l[v+2]=0,A-=w,E-=O,T-=V,C-=L,w-=G.r,O-=G.g,V-=G.b,L-=G.a,v=f+((v=m+u)<d?v:d)*a<<2,A+=R+=G.r=l[v],E+=I+=G.g=l[v+1],T+=D+=G.b=l[v+2],C+=N+=G.a=l[v+3],G=G.next,w+=M=H.r,O+=z=H.g,V+=B=H.b,L+=_=H.a,R-=M,I-=z,D-=B,N-=_,H=H.next,S+=a}return e}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function oe(e){for(var t=1,n;t<arguments.length;t++)n=null==arguments[t]?{}:arguments[t],t%2?ie(Object(n),!0).forEach(function(t){Ir(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))});return e}function le(){return se.apply(this,arguments)}function se(){return se=Rr(Lr.mark(function e(t){var n;return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=document.createElement("img"),e.abrupt("return",new Promise(function(e,a){n.onload=function(){e(n)},n.onerror=function(){a()},n.src=t}));case 2:case"end":return e.stop();}},e)})),se.apply(this,arguments)}function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function ue(e){for(var t=1,n;t<arguments.length;t++)n=null==arguments[t]?{}:arguments[t],t%2?de(Object(n),!0).forEach(function(t){Ir(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))});return e}var Ae="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis,Ee=function(e){return e&&e.Math==Math&&e},Te=Ee("object"==typeof globalThis&&globalThis)||Ee("object"==typeof window&&window)||Ee("object"==typeof self&&self)||Ee("object"==typeof Ae&&Ae)||Function("return this")(),Ce=function(e){try{return!!e()}catch(e){return!0}},we=!Ce(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),Oe={}.propertyIsEnumerable,Ve=Object.getOwnPropertyDescriptor,Le=Ve&&!Oe.call({1:2},1),Re=Le?function(e){var t=Ve(this,e);return!!t&&t.enumerable}:Oe,f={f:Re},Ie=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},De={}.toString,Ne=function(e){return De.call(e).slice(8,-1)},Me="".split,ze=Ce(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==Ne(e)?Me.call(e,""):Object(e)}:Object,Be=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},_e=function(e){return ze(Be(e))},Fe=function(e){return"object"==typeof e?null!==e:"function"==typeof e},je=function(e,t){if(!Fe(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!Fe(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!Fe(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!Fe(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")},Ge={}.hasOwnProperty,He=function(e,t){return Ge.call(e,t)},Ye=Te.document,$e=Fe(Ye)&&Fe(Ye.createElement),Ue=function(e){return $e?Ye.createElement(e):{}},We=!we&&!Ce(function(){return 7!=Object.defineProperty(Ue("div"),"a",{get:function(){return 7}}).a}),qe=Object.getOwnPropertyDescriptor,Xe=we?qe:function(e,t){if(e=_e(e),t=je(t,!0),We)try{return qe(e,t)}catch(e){}return He(e,t)?Ie(!f.f.call(e,t),e[t]):void 0},Qe={f:Xe},Ke=function(e){if(!Fe(e))throw TypeError(e+" is not an object");return e},Ze=Object.defineProperty,Je=we?Ze:function(e,t,n){if(Ke(e),t=je(t,!0),Ke(n),We)try{return Ze(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e},et={f:Je},tt=we?function(e,t,n){return et.f(e,t,Ie(1,n))}:function(e,t,n){return e[t]=n,e},nt=function(e,t){try{tt(Te,e,t)}catch(n){Te[e]=t}return t},at="__core-js_shared__",rt=Te[at]||nt(at,{}),it=rt,ot=t(function(e){(e.exports=function(e,t){return it[e]||(it[e]=void 0===t?{}:t)})("versions",[]).push({version:"3.4.7",mode:"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),lt=Function.toString,st=ot("inspectSource",function(e){return lt.call(e)}),dt=Te.WeakMap,ut="function"==typeof dt&&/native code/.test(st(dt)),gt=0,ct=Math.random(),pt=function(e){return"Symbol("+((void 0===e?"":e)+")_")+(++gt+ct).toString(36)},yt=ot("keys"),ht=function(e){return yt[e]||(yt[e]=pt(e))},ft={},mt=Te.WeakMap,xt=function(e){return kt(e)?vt(e):bt(e,{})},bt,vt,kt;if(ut){var St=new mt,Pt=St.get,At=St.has,Et=St.set;bt=function(e,t){return Et.call(St,e,t),t},vt=function(e){return Pt.call(St,e)||{}},kt=function(e){return At.call(St,e)}}else{var Tt=ht("state");ft[Tt]=!0,bt=function(e,t){return tt(e,Tt,t),t},vt=function(e){return He(e,Tt)?e[Tt]:{}},kt=function(e){return He(e,Tt)}}var Ct={set:bt,get:vt,has:kt,enforce:xt,getterFor:function(e){return function(t){var n;if(!Fe(t)||(n=vt(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},wt=t(function(e){var t=Ct.get,n=Ct.enforce,a=(String+"").split("String");(e.exports=function(e,t,r,i){var o=!!i&&!!i.unsafe,l=!!i&&!!i.enumerable,s=!!i&&!!i.noTargetGet;return("function"==typeof r&&("string"==typeof t&&!He(r,"name")&&tt(r,"name",t),n(r).source=a.join("string"==typeof t?t:"")),e===Te)?void(l?e[t]=r:nt(t,r)):void(o?!s&&e[t]&&(l=!0):delete e[t],l?e[t]=r:tt(e,t,r))})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||st(this)})}),Ot=Te,Vt=function(e){return"function"==typeof e?e:void 0},Lt=function(e,t){return 2>arguments.length?Vt(Ot[e])||Vt(Te[e]):Ot[e]&&Ot[e][t]||Te[e]&&Te[e][t]},Rt=function(e){return isNaN(e=+e)?0:(0<e?ke:xe)(e)},It=function(e){return 0<e?me(Rt(e),9007199254740991):0},Dt=function(e,t){var n=Rt(e);return 0>n?fe(n+t,0):me(n,t)},Nt=function(e){return function(t,n,a){var r=_e(t),i=It(r.length),o=Dt(a,i),l;if(e&&n!=n){for(;i>o;)if(l=r[o++],l!=l)return!0;}else for(;i>o;o++)if((e||o in r)&&r[o]===n)return e||o||0;return!e&&-1}},Mt={includes:Nt(!0),indexOf:Nt(!1)},zt=Mt.indexOf,Bt=function(e,t){var n=_e(e),a=0,r=[],o;for(o in n)!He(ft,o)&&He(n,o)&&r.push(o);for(;t.length>a;)He(n,o=t[a++])&&(~zt(r,o)||r.push(o));return r},_t=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ft=_t.concat("length","prototype"),jt=Object.getOwnPropertyNames||function(e){return Bt(e,Ft)},Gt={f:jt},Ht=Object.getOwnPropertySymbols,Yt={f:Ht},$t=Lt("Reflect","ownKeys")||function(e){var t=Gt.f(Ke(e)),n=Yt.f;return n?t.concat(n(e)):t},Ut=function(e,t){for(var n=$t(t),a=et.f,r=Qe.f,o=0,l;o<n.length;o++)l=n[o],He(e,l)||a(e,l,r(t,l))},Wt=/#|\.prototype\./,qt=function(e,t){var n=Qt[Xt(e)];return n==Zt||n!=Kt&&("function"==typeof t?Ce(t):!!t)},Xt=qt.normalize=function(e){return(e+"").replace(Wt,".").toLowerCase()},Qt=qt.data={},Kt=qt.NATIVE="N",Zt=qt.POLYFILL="P",Jt=qt,en=Qe.f,tn=function(e,t){var n=e.target,a=e.global,r=e.stat,i,o,l,s,d,u;if(o=a?Te:r?Te[n]||nt(n,{}):(Te[n]||{}).prototype,o)for(l in t){if(d=t[l],e.noTargetGet?(u=en(o,l),s=u&&u.value):s=o[l],i=Jt(a?l:n+(r?".":"#")+l,e.forced),!i&&void 0!==s){if(typeof d==typeof s)continue;Ut(d,s)}(e.sham||s&&s.sham)&&tt(d,"sham",!0),wt(o,l,d,e)}},nn=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return e},an=function(e,t,n){return(nn(e),void 0===t)?e:0===n?function(){return e.call(t)}:1===n?function(n){return e.call(t,n)}:2===n?function(n,a){return e.call(t,n,a)}:3===n?function(n,a,r){return e.call(t,n,a,r)}:function(){return e.apply(t,arguments)}},rn=function(e){return Object(Be(e))},on=Array.isArray||function(e){return"Array"==Ne(e)},ln=!!Object.getOwnPropertySymbols&&!Ce(function(){return!(Symbol()+"")}),sn=ln&&!Symbol.sham&&"symbol"==typeof Symbol(),dn=ot("wks"),un=Te.Symbol,gn=sn?un:pt,cn=function(e){return He(dn,e)||(ln&&He(un,e)?dn[e]=un[e]:dn[e]=gn("Symbol."+e)),dn[e]},pn=cn("species"),yn=function(e,t){var n;return on(e)&&(n=e.constructor,"function"==typeof n&&(n===Array||on(n.prototype))?n=void 0:Fe(n)&&(n=n[pn],null===n&&(n=void 0))),new(void 0===n?Array:n)(0===t?0:t)},hn=[].push,fn=function(e){var t=1==e,n=4==e,a=6==e;return function(r,i,o,l){for(var s=rn(r),d=ze(s),u=an(i,o,3),g=It(d.length),c=0,p=l||yn,y=t?p(r,g):2==e?p(r,0):void 0,h,f;g>c;c++)if((5==e||a||c in d)&&(h=d[c],f=u(h,c,s),e))if(t)y[c]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return c;case 2:hn.call(y,h);}else if(n)return!1;return a?-1:3==e||n?n:y}},mn={forEach:fn(0),map:fn(1),filter:fn(2),some:fn(3),every:fn(4),find:fn(5),findIndex:fn(6)},xn=Lt("navigator","userAgent")||"",bn=Te.process,vn=bn&&bn.versions,kn=vn&&vn.v8,Sn,Pn;kn?(Sn=kn.split("."),Pn=Sn[0]+Sn[1]):xn&&(Sn=xn.match(/Edge\/(\d+)/),(!Sn||74<=Sn[1])&&(Sn=xn.match(/Chrome\/(\d+)/),Sn&&(Pn=Sn[1])));var An=Pn&&+Pn,En=cn("species"),Tn=function(e){return 51<=An||!Ce(function(){var t=[],n=t.constructor={};return n[En]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Cn=mn.map,wn=Tn("map"),On=wn&&!Ce(function(){[].map.call({length:-1,0:1},function(e){throw e})});tn({target:"Array",proto:!0,forced:!wn||!On},{map:function(e){return Cn(this,e,1<arguments.length?arguments[1]:void 0)}});var Vn="[\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]",Ln=RegExp("^"+Vn+Vn+"*"),Rn=RegExp(Vn+Vn+"*$"),In=function(e){return function(t){var n=Be(t)+"";return 1&e&&(n=n.replace(Ln,"")),2&e&&(n=n.replace(Rn,"")),n}},Dn={start:In(1),end:In(2),trim:In(3)},Nn=Dn.trim,Mn=Te.parseFloat,zn=1/Mn("\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF-0")!=-Infinity,Bn=zn?function(e){var t=Nn(e+""),n=Mn(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Mn;tn({global:!0,forced:parseFloat!=Bn},{parseFloat:Bn});var _n=function(){var e=Ke(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Fn=RegExp.prototype.exec,jn=he.replace,Gn=Fn,Hn=function(){var e=/a/,t=/b*/g;return Fn.call(e,"a"),Fn.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Yn=void 0!==/()??/.exec("")[1];(Hn||Yn)&&(Gn=function(e){var t=this,n,a,r,o;return Yn&&(a=new RegExp("^"+t.source+"$(?!\\s)",_n.call(t))),Hn&&(n=t.lastIndex),r=Fn.call(t,e),Hn&&r&&(t.lastIndex=t.global?r.index+r[0].length:n),Yn&&r&&1<r.length&&jn.call(r[0],a,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r});var $n=Gn;tn({target:"RegExp",proto:!0,forced:/./.exec!==$n},{exec:$n});var Un=cn("species"),Wn=!Ce(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),qn=!Ce(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),Xn=function(e,t,n,a){var r=cn(e),i=!Ce(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)}),o=i&&!Ce(function(){var t=!1,n=/a/;return"split"===e&&(n={},n.constructor={},n.constructor[Un]=function(){return n},n.flags="",n[r]=/./[r]),n.exec=function(){return t=!0,null},n[r](""),!t});if(!i||!o||"replace"===e&&!Wn||"split"===e&&!qn){var l=/./[r],s=n(r,""[e],function(e,t,n,a,r){return t.exec===$n?i&&!r?{done:!0,value:l.call(t,n,a)}:{done:!0,value:e.call(n,t,a)}:{done:!1}}),d=s[0],u=s[1];wt(String.prototype,e,d),wt(RegExp.prototype,r,2==t?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)}),a&&tt(RegExp.prototype[r],"sham",!0)}},Qn=function(e){return function(t,n){var a=Be(t)+"",r=Rt(n),i=a.length,o,l;return 0>r||r>=i?e?"":void 0:(o=a.charCodeAt(r),55296>o||56319<o||r+1===i||56320>(l=a.charCodeAt(r+1))||57343<l?e?a.charAt(r):o:e?a.slice(r,r+2):(o-55296<<10)+(l-56320)+65536)}},Kn={codeAt:Qn(!1),charAt:Qn(!0)},Zn=Kn.charAt,Jn=function(e,t,n){return t+(n?Zn(e,t).length:1)},ea=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==Ne(e))throw TypeError("RegExp#exec called on incompatible receiver");return $n.call(e,t)};Xn("match",1,function(e,t,a){return[function(t){var n=Be(this),a=null==t?void 0:t[e];return void 0===a?new RegExp(t)[e](n+""):a.call(t,n)},function(e){var r=a(t,e,this);if(r.done)return r.value;var i=Ke(e),o=this+"";if(!i.global)return ea(i,o);var l=i.unicode;i.lastIndex=0;for(var s=[],d=0,u,g;null!==(u=ea(i,o));)g=u[0]+"",s[d]=g,""==g&&(i.lastIndex=Jn(o,It(i.lastIndex),l)),d++;return 0===d?null:s}]});var ta=/\$([$&'`]|\d\d?|<[^>]*>)/g,na=/\$([$&'`]|\d\d?)/g,aa=function(e){return void 0===e?e:e+""};Xn("replace",2,function(e,t,n){function a(e,a,r,i,o,l){var s=r+e.length,d=i.length,n=na;return void 0!==o&&(o=rn(o),n=ta),t.call(l,n,function(t,l){var u;switch(l.charAt(0)){case"$":return"$";case"&":return e;case"`":return a.slice(0,r);case"'":return a.slice(s);case"<":u=o[l.slice(1,-1)];break;default:var g=+l;if(0==g)return t;if(g>d){var n=ke(g/10);return 0===n?t:n<=d?void 0===i[n-1]?l.charAt(1):i[n-1]+l.charAt(1):t}u=i[g-1];}return void 0===u?"":u})}return[function(n,a){var r=Be(this),i=null==n?void 0:n[e];return void 0===i?t.call(r+"",n,a):i.call(n,r,a)},function(e,r){var o=n(t,e,this,r);if(o.done)return o.value;var l=Ke(e),s=this+"",d="function"==typeof r;d||(r+="");var u=l.global;if(u){var g=l.unicode;l.lastIndex=0}for(var c=[],p,y;(p=ea(l,s),null!==p)&&(c.push(p),!!u);)y=p[0]+"",""==y&&(l.lastIndex=Jn(s,It(l.lastIndex),g));for(var h="",f=0,m=0;m<c.length;m++){p=c[m];for(var x=p[0]+"",b=fe(me(Rt(p.index),s.length),0),v=[],k=1;k<p.length;k++)v.push(aa(p[k]));var S=p.groups;if(d){var P=[x].concat(v,b,s);void 0!==S&&P.push(S);var A=r.apply(void 0,P)+""}else A=a(x,s,b,v,S,r);b>=f&&(h+=s.slice(f,b)+A,f=b+x.length)}return h+s.slice(f)}]});var ra=/^[A-Z-]+$/,ia=function(e,t){var n=[][e];return!n||!Ce(function(){n.call(null,t||function(){throw 1},1)})},oa=[].join,la=ze!=Object,sa=ia("join",",");tn({target:"Array",proto:!0,forced:la||sa},{join:function(e){return oa.call(_e(this),void 0===e?",":e)}});var da=function(e){if(Array.isArray(e))return e},ua=d,ga=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")},ca=u,pa=/(\[[^\]]+\])/g,ya=/(#[^\s\+>~\.\[:]+)/g,ha=/(\.[^\s\+>~\.\[:]+)/g,fa=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,ma=/(:[\w-]+\([^\)]*\))/gi,xa=/(:[^\s\+>~\.\[:]+)/g,ba=/([^\s\+>~\.\[:]+)/g,va=1e-8,ka=Object.keys||function(e){return Bt(e,_t)},Sa=we?Object.defineProperties:function(e,t){Ke(e);for(var n=ka(t),a=n.length,r=0,i;a>r;)et.f(e,i=n[r++],t[i]);return e},Pa=Lt("document","documentElement"),Aa=ht("IE_PROTO"),Ea="prototype",Ta=function(){},Ca=function(){var e=Ue("iframe"),t=_t.length,n="<",a="script",r=">",i;for(e.style.display="none",Pa.appendChild(e),e.src="java"+a+":"+"",i=e.contentWindow.document,i.open(),i.write(n+a+r+"document.F=Object"+n+"/"+a+r),i.close(),Ca=i.F;t--;)delete Ca[Ea][_t[t]];return Ca()},wa=Object.create||function(e,t){var n;return null===e?n=Ca():(Ta[Ea]=Ke(e),n=new Ta,Ta[Ea]=null,n[Aa]=e),void 0===t?n:Sa(n,t)};ft[Aa]=!0;var Oa=Gt.f,Va={}.toString,La="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ra=function(e){try{return Oa(e)}catch(e){return La.slice()}},Ia={f:function(e){return La&&"[object Window]"==Va.call(e)?Ra(e):Oa(_e(e))}},Da={f:cn},Na=et.f,Ma=function(e){var t=Ot.Symbol||(Ot.Symbol={});He(t,e)||Na(t,e,{value:Da.f(e)})},za=et.f,Ba=cn("toStringTag"),_a=function(e,t,n){e&&!He(e=n?e:e.prototype,Ba)&&za(e,Ba,{configurable:!0,value:t})},Fa=mn.forEach,ja=ht("hidden"),Ga="Symbol",Ha="prototype",Ya=cn("toPrimitive"),$a=Ct.set,Ua=Ct.getterFor(Ga),Wa=Object[Ha],qa=Te.Symbol,Xa=Lt("JSON","stringify"),Qa=Qe.f,Ka=et.f,Za=Ia.f,Ja=f.f,er=ot("symbols"),tr=ot("op-symbols"),nr=ot("string-to-symbol-registry"),ar=ot("symbol-to-string-registry"),rr=ot("wks"),ir=Te.QObject,or=!ir||!ir[Ha]||!ir[Ha].findChild,lr=we&&Ce(function(){return 7!=wa(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a})?function(e,t,n){var a=Qa(Wa,t);a&&delete Wa[t],Ka(e,t,n),a&&e!==Wa&&Ka(Wa,t,a)}:Ka,sr=function(e,t){var n=er[e]=wa(qa[Ha]);return $a(n,{type:Ga,tag:e,description:t}),we||(n.description=t),n},dr=ln&&"symbol"==typeof qa.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof qa},ur=function(e,t,n){e===Wa&&ur(tr,t,n),Ke(e);var a=je(t,!0);return Ke(n),He(er,a)?(n.enumerable?(He(e,ja)&&e[ja][a]&&(e[ja][a]=!1),n=wa(n,{enumerable:Ie(0,!1)})):(!He(e,ja)&&Ka(e,ja,Ie(1,{})),e[ja][a]=!0),lr(e,a,n)):Ka(e,a,n)},gr=function(e,t){Ke(e);var n=_e(t),a=ka(n).concat(hr(n));return Fa(a,function(t){(!we||cr.call(n,t))&&ur(e,t,n[t])}),e},cr=function(e){var t=je(e,!0),n=Ja.call(this,t);return(this!==Wa||!He(er,t)||He(tr,t))&&(!(n||!He(this,t)||!He(er,t)||He(this,ja)&&this[ja][t])||n)},pr=function(e,t){var n=_e(e),a=je(t,!0);if(n!==Wa||!He(er,a)||He(tr,a)){var r=Qa(n,a);return r&&He(er,a)&&!(He(n,ja)&&n[ja][a])&&(r.enumerable=!0),r}},yr=function(e){var t=Za(_e(e)),n=[];return Fa(t,function(e){He(er,e)||He(ft,e)||n.push(e)}),n},hr=function(e){var t=e===Wa,n=Za(t?tr:_e(e)),a=[];return Fa(n,function(e){He(er,e)&&(!t||He(Wa,e))&&a.push(er[e])}),a};if(ln||(qa=function(){if(this instanceof qa)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?arguments[0]+"":void 0,t=pt(e),n=function(e){this===Wa&&n.call(tr,e),He(this,ja)&&He(this[ja],t)&&(this[ja][t]=!1),lr(this,t,Ie(1,e))};return we&&or&&lr(Wa,t,{configurable:!0,set:n}),sr(t,e)},wt(qa[Ha],"toString",function(){return Ua(this).tag}),f.f=cr,et.f=ur,Qe.f=pr,Gt.f=Ia.f=yr,Yt.f=hr,we&&(Ka(qa[Ha],"description",{configurable:!0,get:function(){return Ua(this).description}}),wt(Wa,"propertyIsEnumerable",cr,{unsafe:!0}))),sn||(Da.f=function(e){return sr(cn(e),e)}),tn({global:!0,wrap:!0,forced:!ln,sham:!ln},{Symbol:qa}),Fa(ka(rr),function(e){Ma(e)}),tn({target:Ga,stat:!0,forced:!ln},{for:function(e){var t=e+"";if(He(nr,t))return nr[t];var n=qa(t);return nr[t]=n,ar[n]=t,n},keyFor:function(e){if(!dr(e))throw TypeError(e+" is not a symbol");return He(ar,e)?ar[e]:void 0},useSetter:function(){or=!0},useSimple:function(){or=!1}}),tn({target:"Object",stat:!0,forced:!ln,sham:!we},{create:function(e,t){return void 0===t?wa(e):gr(wa(e),t)},defineProperty:ur,defineProperties:gr,getOwnPropertyDescriptor:pr}),tn({target:"Object",stat:!0,forced:!ln},{getOwnPropertyNames:yr,getOwnPropertySymbols:hr}),tn({target:"Object",stat:!0,forced:Ce(function(){Yt.f(1)})},{getOwnPropertySymbols:function(e){return Yt.f(rn(e))}}),Xa){var fr=!ln||Ce(function(){var e=qa();return"[null]"!=Xa([e])||"{}"!=Xa({a:e})||"{}"!=Xa(Object(e))});tn({target:"JSON",stat:!0,forced:fr},{stringify:function(e,t){for(var n=[e],a=1,r;arguments.length>a;)n.push(arguments[a++]);if(r=t,(Fe(t)||void 0!==e)&&!dr(e))return on(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!dr(t))return t}),n[1]=t,Xa.apply(null,n)}})}qa[Ha][Ya]||tt(qa[Ha],Ya,qa[Ha].valueOf),_a(qa,Ga),ft[ja]=!0;var mr=mn.filter,xr=Tn("filter"),br=xr&&!Ce(function(){[].filter.call({length:-1,0:1},function(e){throw e})});tn({target:"Array",proto:!0,forced:!xr||!br},{filter:function(e){return mr(this,e,1<arguments.length?arguments[1]:void 0)}});var vr=mn.forEach,kr=ia("forEach")?function(e){return vr(this,e,1<arguments.length?arguments[1]:void 0)}:[].forEach;tn({target:"Array",proto:!0,forced:[].forEach!=kr},{forEach:kr}),tn({target:"Object",stat:!0,forced:!we,sham:!we},{defineProperties:Sa}),tn({target:"Object",stat:!0,forced:!we,sham:!we},{defineProperty:et.f});var Sr=Qe.f,Pr=Ce(function(){Sr(1)});tn({target:"Object",stat:!0,forced:!we||Pr,sham:!we},{getOwnPropertyDescriptor:function(e,t){return Sr(_e(e),t)}});var Ar=function(e,t,n){var a=je(t);a in e?et.f(e,a,Ie(0,n)):e[a]=n};tn({target:"Object",stat:!0,sham:!we},{getOwnPropertyDescriptors:function(e){for(var t=_e(e),n=Qe.f,a=$t(t),r={},i=0,o,l;a.length>i;)l=n(t,o=a[i++]),void 0!==l&&Ar(r,o,l);return r}});var Er=Ce(function(){ka(1)});tn({target:"Object",stat:!0,forced:Er},{keys:function(e){return ka(rn(e))}});var Tr={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};for(var Cr in Tr){var wr=Te[Cr],Or=wr&&wr.prototype;if(Or&&Or.forEach!==kr)try{tt(Or,"forEach",kr)}catch(e){Or.forEach=kr}}var Vr=t(function(e){var t=function(e){function t(e,t,n,r){var i=t&&t.prototype instanceof a?t:a,o=Object.create(i.prototype),l=new c(r||[]);return o._invoke=s(e,n,l),o}function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function a(){}function r(){}function i(){}function o(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){function t(a,r,i,o){var l=n(e[a],e,r);if("throw"===l.type)o(l.arg);else{var s=l.arg,d=s.value;return d&&"object"==typeof d&&f.call(d,"__await")?Promise.resolve(d.__await).then(function(e){t("next",e,i,o)},function(e){t("throw",e,i,o)}):Promise.resolve(d).then(function(e){s.value=e,i(s)},function(e){return t("throw",e,i,o)})}}function a(e,n){function a(){return new Promise(function(a,r){t(e,n,a,r)})}return r=r?r.then(a,a):a()}var r;this._invoke=a}function s(e,t,a){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return y()}for(a.method=i,a.arg=o;;){var l=a.delegate;if(l){var s=d(l,a);if(s){if(s===S)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var u=n(e,t,a);if("normal"===u.type){if(r=a.done?"completed":"suspendedYield",u.arg===S)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(r="completed",a.method="throw",a.arg=u.arg)}}}function d(e,t){var a=e.iterator[t.method];if(a===k){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=k,d(e,t),"throw"===t.method))return S;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var r=n(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,S;var i=r.arg;if(!i)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,S;if(i.done)t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=k);else return i;return t.delegate=null,S}function u(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function g(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function c(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(u,this),this.reset(!0)}function p(e){if(e){var t=e[x];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(f.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=k,t.done=!0,t};return a.next=a}}return{next:y}}function y(){return{value:k,done:!0}}var h=Object.prototype,f=h.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},x=m.iterator||"@@iterator",b=m.asyncIterator||"@@asyncIterator",v=m.toStringTag||"@@toStringTag",k;e.wrap=t;var S={},P={};P[x]=function(){return this};var A=Object.getPrototypeOf,E=A&&A(A(p([])));E&&E!==h&&f.call(E,x)&&(P=E);var T=i.prototype=a.prototype=Object.create(P);return r.prototype=T.constructor=i,i.constructor=r,i[v]=r.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===r||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,!(v in e)&&(e[v]="GeneratorFunction")),e.prototype=Object.create(T),e},e.awrap=function(e){return{__await:e}},o(l.prototype),l.prototype[b]=function(){return this},e.AsyncIterator=l,e.async=function(n,a,r,i){var o=new l(t(n,a,r,i));return e.isGeneratorFunction(a)?o:o.next().then(function(e){return e.done?e.value:o.next()})},o(T),T[v]="Generator",T[x]=function(){return this},T.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var a=t.pop();if(a in e)return n.value=a,n.done=!1,n}return n.done=!0,n}},e.values=p,c.prototype={constructor:c,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=k,this.done=!1,this.delegate=null,this.method="next",this.arg=k,this.tryEntries.forEach(g),!e)for(var t in this)"t"===t.charAt(0)&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=k)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,a){return o.type="throw",o.arg=e,n.next=t,a&&(n.method="next",n.arg=k),!!a}if(this.done)throw e;for(var n=this,a=this.tryEntries.length-1;0<=a;--a){var r=this.tryEntries[a],o=r.completion;if("root"===r.tryLoc)return t("end");if(r.tryLoc<=this.prev){var l=f.call(r,"catchLoc"),s=f.call(r,"finallyLoc");if(l&&s){if(this.prev<r.catchLoc)return t(r.catchLoc,!0);if(this.prev<r.finallyLoc)return t(r.finallyLoc)}else if(l){if(this.prev<r.catchLoc)return t(r.catchLoc,!0);}else if(!s)throw new Error("try statement without catch or finally");else if(this.prev<r.finallyLoc)return t(r.finallyLoc)}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1,a;0<=n;--n)if(a=this.tryEntries[n],a.tryLoc<=this.prev&&f.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var r=a;break}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,S):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1,n;0<=t;--t)if(n=this.tryEntries[t],n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),g(n),S},catch:function(e){for(var t=this.tryEntries.length-1,n;0<=t;--t)if(n=this.tryEntries[t],n.tryLoc===e){var a=n.completion;if("throw"===a.type){var r=a.arg;g(n)}return r}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:p(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=k),S}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}),Lr=Vr,Rr=function(e){return function(){var t=this,n=arguments;return new Promise(function(a,r){function i(e){T(l,a,r,i,o,"next",e)}function o(e){T(l,a,r,i,o,"throw",e)}var l=e.apply(t,n);i(void 0)})}},Ir=C,Dr=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Nr=function(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e},Mr=cn("isConcatSpreadable"),zr=9007199254740991,Br="Maximum allowed index exceeded",_r=51<=An||!Ce(function(){var e=[];return e[Mr]=!1,e.concat()[0]!==e}),Fr=Tn("concat"),jr=function(e){if(!Fe(e))return!1;var t=e[Mr];return void 0===t?on(e):!!t};tn({target:"Array",proto:!0,forced:!_r||!Fr},{concat:function(){var e=rn(this),t=yn(e,0),a=0,r,o,l,s,d;for(r=-1,l=arguments.length;r<l;r++)if(d=-1===r?e:arguments[r],jr(d)){if(s=It(d.length),a+s>zr)throw TypeError(Br);for(o=0;o<s;o++,a++)o in d&&Ar(t,a,d[o])}else{if(a>=zr)throw TypeError(Br);Ar(t,a++,d)}return t.length=a,t}});var Gr=mn.every;tn({target:"Array",proto:!0,forced:ia("every")},{every:function(e){return Gr(this,e,1<arguments.length?arguments[1]:void 0)}});var Hr=function(e){return function(t,n,a,r){nn(n);var o=rn(t),l=ze(o),s=It(o.length),d=e?s-1:0,u=e?-1:1;if(2>a)for(;;){if(d in l){r=l[d],d+=u;break}if(d+=u,e?0>d:s<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?0<=d:s>d;d+=u)d in l&&(r=n(r,l[d],d,o));return r}},Yr={left:Hr(!1),right:Hr(!0)},$r=Yr.left;tn({target:"Array",proto:!0,forced:ia("reduce")},{reduce:function(e){return $r(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}});var Ur=Date.prototype,Wr="Invalid Date",qr="toString",Xr=Ur[qr],Qr=Ur.getTime;new Date(NaN)+""!=Wr&&wt(Ur,qr,function(){var e=Qr.call(this);return e===e?Xr.call(this):Wr});var Kr=cn("toStringTag"),Zr={};Zr[Kr]="z";var Jr="[object z]"===Zr+"",ei=cn("toStringTag"),ti="Arguments"==Ne(function(){return arguments}()),ni=function(e,t){try{return e[t]}catch(e){}},ai=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=ni(t=Object(e),ei))?n:ti?Ne(t):"Object"==(a=Ne(t))&&"function"==typeof t.callee?"Arguments":a},ri=function(){return"[object "+ai(this)+"]"};Jr||wt(Object.prototype,"toString",ri,{unsafe:!0});var ii=Te.Promise,oi=function(e,t,n){for(var a in t)wt(e,a,t[a],n);return e},li=cn("species"),si=function(e){var t=Lt(e),n=et.f;we&&t&&!t[li]&&n(t,li,{configurable:!0,get:function(){return this}})},di=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},ui={},gi=cn("iterator"),ci=Array.prototype,pi=function(e){return void 0!==e&&(ui.Array===e||ci[gi]===e)},yi=cn("iterator"),hi=function(e){if(null!=e)return e[yi]||e["@@iterator"]||ui[ai(e)]},fi=function(e,t,n,a){try{return a?t(Ke(n)[0],n[1]):t(n)}catch(t){var r=e["return"];throw void 0!==r&&Ke(r.call(e)),t}},mi=t(function(e){var t=function(e,t){this.stopped=e,this.result=t},n=e.exports=function(e,n,a,r,i){var o=an(n,a,r?2:1),l,s,d,u,g,c,p;if(i)l=e;else{if(s=hi(e),"function"!=typeof s)throw TypeError("Target is not iterable");if(pi(s)){for(d=0,u=It(e.length);u>d;d++)if(g=r?o(Ke(p=e[d])[0],p[1]):o(e[d]),g&&g instanceof t)return g;return new t(!1)}l=s.call(e)}for(c=l.next;!(p=c.call(l)).done;)if(g=fi(l,o,p.value,r),"object"==typeof g&&g&&g instanceof t)return g;return new t(!1)};n.stop=function(e){return new t(!0,e)}}),xi=cn("iterator"),bi=!1;try{var vi=0,ki={next:function(){return{done:!!vi++}},return:function(){bi=!0}};ki[xi]=function(){return this},Array.from(ki,function(){throw 2})}catch(e){}var Si=function(e,t){if(!t&&!bi)return!1;var n=!1;try{var a={};a[xi]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n},Pi=cn("species"),Ai=function(e,t){var n=Ke(e).constructor,a;return void 0===n||null==(a=Ke(n)[Pi])?t:nn(a)},Ei=/(iphone|ipod|ipad).*applewebkit/i.test(xn),Ti=Te.location,Ci=Te.setImmediate,wi=Te.clearImmediate,Oi=Te.process,Vi=Te.MessageChannel,Li=Te.Dispatch,Ri=0,Ii={},Di="onreadystatechange",Ni=function(e){if(Ii.hasOwnProperty(e)){var t=Ii[e];delete Ii[e],t()}},Mi=function(e){return function(){Ni(e)}},zi=function(e){Ni(e.data)},Bi=function(e){Te.postMessage(e+"",Ti.protocol+"//"+Ti.host)},_i,Fi,ji;Ci&&wi||(Ci=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Ii[++Ri]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},_i(Ri),Ri},wi=function(e){delete Ii[e]},"process"==Ne(Oi)?_i=function(e){Oi.nextTick(Mi(e))}:Li&&Li.now?_i=function(e){Li.now(Mi(e))}:Vi&&!Ei?(Fi=new Vi,ji=Fi.port2,Fi.port1.onmessage=zi,_i=an(ji.postMessage,ji,1)):!Te.addEventListener||"function"!=typeof postMessage||Te.importScripts||Ce(Bi)?Di in Ue("script")?_i=function(e){Pa.appendChild(Ue("script"))[Di]=function(){Pa.removeChild(this),Ni(e)}}:_i=function(e){setTimeout(Mi(e),0)}:(_i=Bi,Te.addEventListener("message",zi,!1)));var Gi={set:Ci,clear:wi},Hi=Qe.f,Yi=Gi.set,$i=Te.MutationObserver||Te.WebKitMutationObserver,Ui=Te.process,Wi=Te.Promise,qi="process"==Ne(Ui),Xi=Hi(Te,"queueMicrotask"),Qi=Xi&&Xi.value,Ki,Zi,Ji,eo,to,no,ao,ro;Qi||(Ki=function(){var e,t;for(qi&&(e=Ui.domain)&&e.exit();Zi;){t=Zi.fn,Zi=Zi.next;try{t()}catch(e){throw Zi?eo():Ji=void 0,e}}Ji=void 0,e&&e.enter()},qi?eo=function(){Ui.nextTick(Ki)}:$i&&!Ei?(to=!0,no=document.createTextNode(""),new $i(Ki).observe(no,{characterData:!0}),eo=function(){no.data=to=!to}):Wi&&Wi.resolve?(ao=Wi.resolve(void 0),ro=ao.then,eo=function(){ro.call(ao,Ki)}):eo=function(){Yi.call(Te,Ki)});var io=Qi||function(e){var t={fn:e,next:void 0};Ji&&(Ji.next=t),Zi||(Zi=t,eo()),Ji=t},oo=function(e){var t,n;this.promise=new e(function(e,a){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=a}),this.resolve=nn(t),this.reject=nn(n)},lo={f:function(e){return new oo(e)}},so=function(e,t){if(Ke(e),Fe(t)&&t.constructor===e)return t;var n=lo.f(e),a=n.resolve;return a(t),n.promise},uo=function(e,t){var n=Te.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},go=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},co=Gi.set,po=cn("species"),yo="Promise",ho=Ct.get,fo=Ct.set,mo=Ct.getterFor(yo),xo=ii,bo=Te.TypeError,vo=Te.document,ko=Te.process,So=Lt("fetch"),Po=lo.f,Ao=Po,Eo="process"==Ne(ko),To=!!(vo&&vo.createEvent&&Te.dispatchEvent),Co="unhandledrejection",wo=0,Oo=1,Vo=1,Lo=2,Ro=Jt(yo,function(){var e=st(xo)!==xo+"";if(!e){if(66===An)return!0;if(!Eo&&"function"!=typeof PromiseRejectionEvent)return!0}if(51<=An&&/native code/.test(xo))return!1;var t=xo.resolve(1),n=function(e){e(function(){},function(){})},a=t.constructor={};return a[po]=n,!(t.then(function(){})instanceof n)}),Io=Ro||!Si(function(e){xo.all(e)["catch"](function(){})}),Do=function(e){var t;return!!(Fe(e)&&"function"==typeof(t=e.then))&&t},No=function(e,t,n){if(!t.notified){t.notified=!0;var a=t.reactions;io(function(){for(var r=t.value,i=t.state==Oo,o=0;a.length>o;){var l=a[o++],s=i?l.ok:l.fail,d=l.resolve,u=l.reject,g=l.domain,c,p,y;try{s?(!i&&(t.rejection===Lo&&_o(e,t),t.rejection=Vo),!0===s?c=r:(g&&g.enter(),c=s(r),g&&(g.exit(),y=!0)),c===l.promise?u(bo("Promise-chain cycle")):(p=Do(c))?p.call(c,d,u):d(c)):u(r)}catch(e){g&&!y&&g.exit(),u(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&zo(e,t)})}},Mo=function(e,t,n){var a,r;To?(a=vo.createEvent("Event"),a.promise=t,a.reason=n,a.initEvent(e,!1,!0),Te.dispatchEvent(a)):a={promise:t,reason:n},(r=Te["on"+e])?r(a):e===Co&&uo("Unhandled promise rejection",n)},zo=function(e,t){co.call(Te,function(){var n=t.value,a=Bo(t),r;if(a&&(r=go(function(){Eo?ko.emit("unhandledRejection",n,e):Mo(Co,e,n)}),t.rejection=Eo||Bo(t)?Lo:Vo,r.error))throw r.value})},Bo=function(e){return e.rejection!==Vo&&!e.parent},_o=function(e,t){co.call(Te,function(){Eo?ko.emit("rejectionHandled",e):Mo("rejectionhandled",e,t.value)})},Fo=function(e,t,n,a){return function(r){e(t,n,r,a)}},jo=function(e,t,n,a){t.done||(t.done=!0,a&&(t=a),t.value=n,t.state=2,No(e,t,!0))},Go=function(e,t,n,a){if(!t.done){t.done=!0,a&&(t=a);try{if(e===n)throw bo("Promise can't be resolved itself");var r=Do(n);r?io(function(){var a={done:!1};try{r.call(n,Fo(Go,e,a,t),Fo(jo,e,a,t))}catch(n){jo(e,a,n,t)}}):(t.value=n,t.state=Oo,No(e,t,!1))}catch(n){jo(e,{done:!1},n,t)}}},Ho,Yo,$o,Uo;Ro&&(xo=function(e){di(this,xo,yo),nn(e),Ho.call(this);var t=ho(this);try{e(Fo(Go,this,t),Fo(jo,this,t))}catch(e){jo(this,t,e)}},Ho=function(){fo(this,{type:yo,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:wo,value:void 0})},Ho.prototype=oi(xo.prototype,{then:function(e,t){var n=mo(this),a=Po(Ai(this,xo));return a.ok="function"!=typeof e||e,a.fail="function"==typeof t&&t,a.domain=Eo?ko.domain:void 0,n.parent=!0,n.reactions.push(a),n.state!=wo&&No(this,n,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),Yo=function(){var e=new Ho,t=ho(e);this.promise=e,this.resolve=Fo(Go,e,t),this.reject=Fo(jo,e,t)},lo.f=Po=function(e){return e===xo||e===$o?new Yo(e):Ao(e)},"function"==typeof ii&&(Uo=ii.prototype.then,wt(ii.prototype,"then",function(e,t){var n=this;return new xo(function(e,t){Uo.call(n,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof So&&tn({global:!0,enumerable:!0,forced:!0},{fetch:function(){return so(xo,So.apply(Te,arguments))}}))),tn({global:!0,wrap:!0,forced:Ro},{Promise:xo}),_a(xo,yo,!1),si(yo),$o=Lt(yo),tn({target:yo,stat:!0,forced:Ro},{reject:function(e){var t=Po(this);return t.reject.call(void 0,e),t.promise}}),tn({target:yo,stat:!0,forced:Ro},{resolve:function(e){return so(this,e)}}),tn({target:yo,stat:!0,forced:Io},{all:function(e){var t=this,n=Po(t),a=n.resolve,r=n.reject,i=go(function(){var n=nn(t.resolve),i=[],o=0,l=1;mi(e,function(e){var s=o++,d=!1;i.push(void 0),l++,n.call(t,e).then(function(e){d||(d=!0,i[s]=e,--l||a(i))},r)}),--l||a(i)});return i.error&&r(i.value),n.promise},race:function(e){var t=this,n=Po(t),a=n.reject,r=go(function(){var r=nn(t.resolve);mi(e,function(e){r.call(t,e).then(n.resolve,a)})});return r.error&&a(r.value),n.promise}});var Wo=cn("match"),qo=function(e){var t;return Fe(e)&&(void 0===(t=e[Wo])?"RegExp"==Ne(e):!!t)},Xo=[].push,Qo=4294967295,Ko=!Ce(function(){return!RegExp(Qo,"y")});Xn("split",2,function(e,t,n){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(e,n){var a=Be(this)+"",r=void 0===n?Qo:n>>>0;if(0===r)return[];if(void 0===e)return[a];if(!qo(e))return t.call(a,e,r);for(var i=[],o=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,s=new RegExp(e.source,o+"g"),d,u,g;(d=$n.call(s,a))&&(u=s.lastIndex,!(u>l&&(i.push(a.slice(l,d.index)),1<d.length&&d.index<a.length&&Xo.apply(i,d.slice(1)),g=d[0].length,l=u,i.length>=r)));)s.lastIndex===d.index&&s.lastIndex++;return l===a.length?(g||!s.test(""))&&i.push(""):i.push(a.slice(l)),i.length>r?i.slice(0,r):i}:function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)},[function(t,n){var r=Be(this),i=null==t?void 0:t[e];return void 0===i?a.call(r+"",t,n):i.call(t,r,n)},function(r,o){var l=n(a,r,this,o,a!==t);if(l.done)return l.value;var s=Ke(r),d=this+"",u=Ai(s,RegExp),g=s.unicode,c=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Ko?"y":"g"),y=new u(Ko?s:"^(?:"+s.source+")",c),h=void 0===o?Qo:o>>>0;if(0===h)return[];if(0===d.length)return null===ea(y,d)?[d]:[];for(var f=0,m=0,x=[];m<d.length;){y.lastIndex=Ko?m:0;var b=ea(y,Ko?d:d.slice(m)),v;if(null===b||(v=me(It(y.lastIndex+(Ko?0:m)),d.length))===f)m=Jn(d,m,g);else{if(x.push(d.slice(f,m)),x.length===h)return x;for(var k=1;k<=b.length-1;k++)if(x.push(b[k]),x.length===h)return x;m=f=v}}return x.push(d.slice(f)),x}]},!Ko);var Zo="undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,Jo=O,el=V;"function"==typeof Zo.setTimeout&&(Jo=setTimeout),"function"==typeof Zo.clearTimeout&&(el=clearTimeout);var tl=[],nl=!1,al=-1,rl;M.prototype.run=function(){this.fun.apply(null,this.array)};for(var il={},ol=[],ll={},sl={},dl={},ul=Zo.performance||{},gl=ul.now||ul.mozNow||ul.msNow||ul.oNow||ul.webkitNow||function(){return new Date().getTime()},cl=new Date,pl={nextTick:N,title:"browser",browser:!0,env:il,argv:ol,version:"",versions:ll,on:z,addListener:z,once:z,off:z,removeListener:z,removeAllListeners:z,emit:z,binding:B,cwd:_,chdir:F,umask:G,hrtime:H,platform:"browser",release:sl,config:dl,uptime:Y},yl=t(function(e){(function(){var t,n,a,r,i,o;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof pl&&null!==pl&&pl.hrtime?(e.exports=function(){return(t()-i)/1e6},n=pl.hrtime,t=function(){var e;return e=n(),1e9*e[0]+e[1]},r=t(),o=1e9*pl.uptime(),i=r-o):Date.now?(e.exports=function(){return Date.now()-a},a=Date.now()):(e.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(Ae)}),hl="undefined"==typeof window?Ae:window,fl=["moz","webkit"],ml="AnimationFrame",xl=hl["request"+ml],bl=hl["cancel"+ml]||hl["cancelRequest"+ml],vl=0;!xl&&vl<fl.length;vl++)xl=hl[fl[vl]+"Request"+ml],bl=hl[fl[vl]+"Cancel"+ml]||hl[fl[vl]+"CancelRequest"+ml];if(!xl||!bl){var kl=0,Sl=0,Pl=[];xl=function(e){if(0===Pl.length){var t=yl(),n=fe(0,1e3/60-(t-kl));kl=n+t,setTimeout(function(){var e=Pl.slice(0);Pl.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(kl)}catch(t){setTimeout(function(){throw t},0)}},ye(n))}return Pl.push({handle:++Sl,callback:e,cancelled:!1}),Sl},bl=function(e){for(var t=0;t<Pl.length;t++)Pl[t].handle===e&&(Pl[t].cancelled=!0)}}var Al=function(e){return xl.call(hl,e)},El=function(){bl.apply(hl,arguments)},Tl=function(e){e||(e=hl),e.requestAnimationFrame=xl,e.cancelAnimationFrame=bl};Al.cancel=El,Al.polyfill=Tl;var Cl=et.f,wl=Function.prototype,Ol=wl.toString,Vl=/^\s*function ([^ (]*)/,Ll="name";we&&!(Ll in wl)&&Cl(wl,Ll,{configurable:!0,get:function(){try{return Ol.call(this).match(Vl)[1]}catch(e){return""}}});var Rl=function(e){this.ok=!1,this.alpha=1,"#"==e.charAt(0)&&(e=e.substr(1,6)),e=e.replace(/ /g,""),e=e.toLowerCase();var t={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"};e=t[e]||e;for(var n=[{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(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3]),parseFloat(e[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(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],a=0;a<n.length;a++){var r=n[a].re,o=n[a].process,l=r.exec(e);if(l){var s=o(l);this.r=s[0],this.g=s[1],this.b=s[2],3<s.length&&(this.alpha=s[3]),this.ok=!0}}this.r=0>this.r||isNaN(this.r)?0:255<this.r?255:this.r,this.g=0>this.g||isNaN(this.g)?0:255<this.g?255:this.g,this.b=0>this.b||isNaN(this.b)?0:255<this.b?255:this.b,this.alpha=0>this.alpha?0:1<this.alpha||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 e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return 1==e.length&&(e="0"+e),1==t.length&&(t="0"+t),1==n.length&&(n="0"+n),"#"+e+t+n},this.getHelpXML=function(){for(var e=[],a=0,r;a<n.length;a++){r=n[a].example;for(var o=0;o<r.length;o++)e[e.length]=r[o]}for(var l in t)e[e.length]=l;var s=document.createElement("ul");s.setAttribute("id","rgbcolor-examples");for(var a=0;a<e.length;a++)try{var d=document.createElement("li"),u=new RGBColor(e[a]),g=document.createElement("div");g.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),g.appendChild(document.createTextNode("test"));var c=document.createTextNode(" "+e[a]+" -> "+u.toRGB()+" -> "+u.toHex());d.appendChild(g),d.appendChild(c),s.appendChild(d)}catch(t){}return s}},Il=function(){function e(t,n,a){Dr(this,e),this.document=t,this.name=n,this.value=a}return Nr(e,[{key:"hasValue",value:function(){var e=this.value;return null!==e&&""!==e&&0!==e&&"undefined"!=typeof e}},{key:"isString",value:function(e){var t=this.value,n="string"==typeof t;return n&&e?e.test(t):n}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case /px$/.test(e):case /^[0-9]+$/.test(e):return!0;default:return!1;}}},{key:"setValue",value:function(e){return this.value=e,this}},{key:"getValue",value:function(e){return"undefined"==typeof e||this.hasValue()?this.value:e}},{key:"getNumber",value:function(e){if(!this.hasValue())return"undefined"==typeof e?0:parseFloat(e);var t=this.value,a=parseFloat(t);return this.isString(/%$/)&&(a/=100),a}},{key:"getString",value:function(e){return"undefined"==typeof e||this.hasValue()?"undefined"==typeof this.value?"":this.value+"":e+""}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9\.\-]/g,"")}},{key:"getPixels",value:function(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(!this.hasValue())return 0;var a="boolean"==typeof e?[void 0,e]:[e],r=ca(a,2),i=r[0],o=r[1],l=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*me(l.computeSize("x"),l.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*fe(l.computeSize("x"),l.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*l.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*l.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(/%$/)&&o:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*l.computeSize(i);default:{var s=this.getNumber();return t&&1>s?s*l.computeSize(i):s}}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(pe/180);case this.isString(/grad$/):return this.getNumber()*(pe/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(pe/180);}}},{key:"getDefinition",value:function(){var e=this.getString(),t=e.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=e),this.document.definitions[t]}},{key:"getFillStyleDefinition",value:function(e,t){var n=this.getDefinition();if(!n)return null;if("function"==typeof n.createGradient)return n.createGradient(this.document.ctx,e,t);if("function"==typeof n.createPattern){if(n.getHrefAttribute().hasValue()){var a=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),a.hasValue()&&n.getAttribute("patternTransform",!0).setValue(a.value)}return n.createPattern(this.document.ctx,e,t)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?e.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(t){for(var n=this.value,a=n.length,r=0,o=0;o<a&&(","===n[o]&&r++,3!==r);o++);if(t.hasValue()&&this.isString()&&3!==r){var l=new Rl(n);l.ok&&(n="rgba(".concat(l.r,", ").concat(l.g,", ").concat(l.b,", ").concat(t.getNumber(),")"))}return new e(this.document,this.name,n)}}],[{key:"empty",value:function(t){return new e(t,"EMPTY","")}}]),e}();Il.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"};var Dl=function(){function e(){Dr(this,e),this.viewPorts=[]}return Nr(e,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(e,t){this.viewPorts.push({width:e,height:t})}},{key:"removeCurrent",value:function(){this.viewPorts.pop()}},{key:"getCurrent",value:function(){var e=this.viewPorts;return e[e.length-1]}},{key:"computeSize",value:function(e){return"number"==typeof e?e:"x"===e?this.width:"y"===e?this.height:Se(Pe(this.width,2)+Pe(this.height,2))/Se(2)}},{key:"width",get:function(){return this.getCurrent().width}},{key:"height",get:function(){return this.getCurrent().height}}]),e}(),Nl=function(){function e(t,n){Dr(this,e),this.x=t,this.y=n}return Nr(e,[{key:"angleTo",value:function(e){return ce(e.y-this.y,e.x-this.x)}},{key:"applyTransform",value:function(e){var t=this.x,n=this.y,a=t*e[0]+n*e[2]+e[4],r=t*e[1]+n*e[3]+e[5];this.x=a,this.y=r}}],[{key:"parse",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,a=o(t),r=ca(a,2),i=r[0],l=void 0===i?n:i,s=r[1],d=void 0===s?n:s;return new e(l,d)}},{key:"parseScale",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,a=o(t),r=ca(a,2),i=r[0],l=void 0===i?n:i,s=r[1],d=void 0===s?l:s;return new e(l,d)}},{key:"parsePath",value:function(t){for(var n=o(t),a=n.length,r=[],l=0;l<a;l+=2)r.push(new e(n[l],n[l+1]));return r}}]),e}(),Ml=function(){function e(t){Dr(this,e),this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return Nr(e,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var e=this.screen,t=this.onClick,n=this.onMouseMove,a=e.ctx.canvas;a.onclick=t,a.onmousemove=n,this.working=!0}}},{key:"stop",value:function(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}},{key:"hasEvents",value:function(){return this.working&&0<this.events.length}},{key:"runEvents",value:function(){if(this.working){var e=this.screen,t=this.events,n=this.eventElements,a=e.ctx.canvas.style;a&&(a.cursor=""),t.forEach(function(e,t){for(var a=e.run,r=n[t];r;)a(r),r=r.parent}),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(e,t){if(this.working&&t){var n=this.events,a=this.eventElements;n.forEach(function(n,r){var i=n.x,o=n.y;!a[r]&&t.isPointInPath&&t.isPointInPath(i,o)&&(a[r]=e)})}}},{key:"checkBoundingBox",value:function(e,t){if(this.working&&t){var n=this.events,a=this.eventElements;n.forEach(function(n,r){var i=n.x,o=n.y;!a[r]&&t.isPointInBox(i,o)&&(a[r]=e)})}}},{key:"mapXY",value:function(e,t){for(var n=this.screen,a=n.window,r=n.ctx,i=new Nl(e,t),o=r.canvas;o;)i.x-=o.offsetLeft,i.y-=o.offsetTop,o=o.offsetParent;return a.scrollX&&(i.x+=a.scrollX),a.scrollY&&(i.y+=a.scrollY),i}},{key:"onClick",value:function(e){var t=this.mapXY((e||event).clientX,(e||event).clientY),n=t.x,a=t.y;this.events.push({type:"onclick",x:n,y:a,run:function(e){e.onClick&&e.onClick()}})}},{key:"onMouseMove",value:function(e){var t=this.mapXY((e||event).clientX,(e||event).clientY),n=t.x,a=t.y;this.events.push({type:"onmousemove",x:n,y:a,run:function(e){e.onMouseMove&&e.onMouseMove()}})}}]),e}(),zl="undefined"==typeof window?null:window,Bl="undefined"==typeof fetch?null:fetch.bind(window),_l=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=n.fetch,r=void 0===a?Bl:a,i=n.window,o=void 0===i?zl:i;Dr(this,e),this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Dl,this.mouse=new Ml(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=o,this.fetch=r}return Nr(e,[{key:"wait",value:function(e){this.waits.push(e)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function(){if(this.isReadyLock)return!0;var e=this.waits.every(function(e){return e()});return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}},{key:"setDefaults",value:function(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}},{key:"setViewBox",value:function(e){var t=e.document,a=e.ctx,r=e.aspectRatio,i=e.width,o=e.desiredWidth,l=e.height,s=e.desiredHeight,d=e.minX,u=void 0===d?0:d,g=e.minY,c=void 0===g?0:g,p=e.refX,y=e.refY,h=e.clip,f=e.clipX,m=void 0===f?0:f,x=e.clipY,b=void 0===x?0:x,v=n(r).replace(/^defer\s/,""),k=v.split(" "),S=ca(k,2),P=S[0],A=S[1],E=P||"xMidYMid",T=A||"meet",C=i/o,w=l/s,O=me(C,w),V=fe(C,w),L=o,R=s;"meet"===T&&(L*=O,R*=O),"slice"===T&&(L*=V,R*=V);var I=new Il(t,"refX",p),D=new Il(t,"refY",y),N=I.hasValue()&&D.hasValue();if(N&&a.translate(-O*I.getPixels("x"),-O*D.getPixels("y")),void 0!==h&&h){var M=O*m,z=O*b;a.beginPath(),a.moveTo(M,z),a.lineTo(i,z),a.lineTo(i,l),a.lineTo(M,l),a.closePath(),a.clip()}if(!N){var B="meet"===T&&O===w,_="slice"===T&&V===w,F="meet"===T&&O===C,j="slice"===T&&V===C;/^xMid/.test(E)&&(B||_)&&a.translate(i/2-L/2,0),/YMid$/.test(E)&&(F||j)&&a.translate(0,l/2-R/2),/^xMax/.test(E)&&(B||_)&&a.translate(i-L,0),/YMax$/.test(E)&&(F||j)&&a.translate(0,l-R)}switch(!0){case"none"===E:a.scale(C,w);break;case"meet"===T:a.scale(O,O);break;case"slice"===T:a.scale(V,V);}a.translate(-u,-c)}},{key:"start",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=n.enableRedraw,r=n.ignoreMouse,i=n.ignoreAnimation,o=n.ignoreDimensions,l=void 0!==o&&o,s=n.ignoreClear,d=void 0!==s&&s,u=n.forceRedraw,g=n.scaleWidth,c=n.scaleHeight,p=n.offsetX,y=n.offsetY,h=this.FRAMERATE,f=this.mouse,m=1e3/h;if(this.frameDuration=m,this.readyPromise=new Promise(function(e){t.resolveReady=e}),this.isReady()&&this.render(e,l,d,g,c,p,y),!!(void 0!==a&&a)){var x=Date.now(),b=x,v=0,k=function n(){x=Date.now(),v=x-b,v>=m&&(b=x-v%m,t.shouldUpdate(void 0!==i&&i,u)&&(t.render(e,l,d,g,c,p,y),f.runEvents())),t.intervalId=Al(n)};void 0!==r&&r||f.start(),this.intervalId=Al(k)}}},{key:"stop",value:function(){this.intervalId&&(Al.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function e(t,n){if(!t){var a=this.frameDuration,e=this.animations.reduce(function(e,t){return t.update(a)||e},!1);if(e)return!0}return!!("function"==typeof n&&n())||!this.isReadyLock&&this.isReady()||!!this.mouse.hasEvents()}},{key:"render",value:function(e,t,n,a,r,i,l){var s=this.CLIENT_WIDTH,d=this.CLIENT_HEIGHT,u=this.viewPort,g=this.ctx,c=this.isFirstRender,p=g.canvas;u.clear(),p.width&&p.height?u.setCurrent(p.width,p.height):u.setCurrent(s,d);var y=e.getStyle("width"),h=e.getStyle("height");!t&&(c||"number"!=typeof a&&"number"!=typeof r)&&(y.hasValue()&&(p.width=y.getPixels("x"),p.style&&(p.style.width="".concat(p.width,"px"))),h.hasValue()&&(p.height=h.getPixels("y"),p.style&&(p.style.height="".concat(p.height,"px"))));var f=p.clientWidth||p.width,m=p.clientHeight||p.height;if(t&&y.hasValue()&&h.hasValue()&&(f=y.getPixels("x"),m=h.getPixels("y")),u.setCurrent(f,m),"number"==typeof i&&e.getAttribute("x",!0).setValue(i),"number"==typeof l&&e.getAttribute("y",!0).setValue(l),"number"==typeof a||"number"==typeof r){var x=o(e.getAttribute("viewBox").getString()),b=0,v=0;if("number"==typeof a){var k=e.getAttribute("width");k.hasValue()?b=k.getPixels("x")/a:!isNaN(x[2])&&(b=x[2]/a)}if("number"==typeof r){var S=e.getAttribute("height");S.hasValue()?v=S.getPixels("y")/r:!isNaN(x[3])&&(v=x[3]/r)}b||(b=v),v||(v=b),e.getAttribute("width",!0).setValue(a),e.getAttribute("height",!0).setValue(r);var P=e.getStyle("transform",!0,!0);P.setValue("".concat(P.getString()," scale(").concat(1/b,", ").concat(1/v,")"))}n||g.clearRect(0,0,f,m),e.render(g),c&&(this.isFirstRender=!1)}}]),e}();_l.defaultWindow=zl,_l.defaultFetch=Bl;var Fl=_l.defaultFetch,jl="undefined"==typeof DOMParser?null:DOMParser,Gl=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=t.fetch,a=void 0===n?Fl:n,r=t.DOMParser,i=void 0===r?jl:r;Dr(this,e),this.fetch=a,this.DOMParser=i}return Nr(e,[{key:"parse",value:function(){var e=Rr(Lr.mark(function e(t){return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!/^</.test(t)){e.next=2;break}return e.abrupt("return",this.parseFromString(t));case 2:return e.abrupt("return",this.load(t));case 3:case"end":return e.stop();}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"parseFromString",value:function(e){try{var t=new this.DOMParser;return t.parseFromString(e,"image/svg+xml")}catch(t){var n=new this.DOMParser;return n.parseFromString(e,"text/xml")}}},{key:"load",value:function(){var e=Rr(Lr.mark(function e(t){var n,a;return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch(t);case 2:return n=e.sent,e.next=5,n.text();case 5:return a=e.sent,e.abrupt("return",this.parseFromString(a));case 7:case"end":return e.stop();}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}(),Hl=t(function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(a){return e.exports="function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?n=function(e){return t(e)}:n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(a)}e.exports=n}),Yl=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},$l=function(e,t){return t&&("object"===Hl(t)||"function"==typeof t)?t:Yl(e)},Ul=t(function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}),Wl=t(function(e){function t(n,a){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,a)}e.exports=t}),ql=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wl(e,t)},Xl=!Si(function(e){Array.from(e)});tn({target:"Array",stat:!0,forced:Xl},{from:function(e){var t=rn(e),n="function"==typeof this?this:Array,a=arguments.length,r=1<a?arguments[1]:void 0,i=void 0!==r,o=0,l=hi(t),s,d,u,g,c;if(i&&(r=an(r,2<a?arguments[2]:void 0,2)),null!=l&&!(n==Array&&pi(l)))for(g=l.call(t),c=g.next,d=new n;!(u=c.call(g)).done;o++)Ar(d,o,i?fi(g,r,[u.value,o],!0):u.value);else for(s=It(t.length),d=new n(s);s>o;o++)Ar(d,o,i?r(t[o],o):t[o]);return d.length=o,d}});var Ql=cn("unscopables"),Kl=Array.prototype;null==Kl[Ql]&&tt(Kl,Ql,wa(null));var Zl=function(e){Kl[Ql][e]=!0},Jl=Mt.includes;tn({target:"Array",proto:!0},{includes:function(e){return Jl(this,e,1<arguments.length?arguments[1]:void 0)}}),Zl("includes");var es=mn.some;tn({target:"Array",proto:!0,forced:ia("some")},{some:function(e){return es(this,e,1<arguments.length?arguments[1]:void 0)}});var ts=function(e){if(qo(e))throw TypeError("The method doesn't accept regular expressions");return e},ns=cn("match");tn({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ns]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~(Be(this)+"").indexOf(ts(e),1<arguments.length?arguments[1]:void 0)}});var as=!Ce(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),rs=ht("IE_PROTO"),is=Object.prototype,os=as?Object.getPrototypeOf:function(e){return e=rn(e),He(e,rs)?e[rs]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?is:null},ls=cn("iterator"),ss=!1,ds,us,gs;[].keys&&(gs=[].keys(),"next"in gs?(us=os(os(gs)),us!==Object.prototype&&(ds=us)):ss=!0),null==ds&&(ds={}),He(ds,ls)||tt(ds,ls,function(){return this});var cs={IteratorPrototype:ds,BUGGY_SAFARI_ITERATORS:ss},ps=cs.IteratorPrototype,ys=function(){return this},hs=function(e,t,n){var a=t+" Iterator";return e.prototype=wa(ps,{next:Ie(1,n)}),_a(e,a,!1),ui[a]=ys,e},fs=function(e){if(!Fe(e)&&null!==e)throw TypeError("Can't set "+(e+" as a prototype"));return e},ms=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},n;try{n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,n.call(t,[]),e=t instanceof Array}catch(e){}return function(t,a){return Ke(t),fs(a),e?n.call(t,a):t.__proto__=a,t}}():void 0),xs=cs.IteratorPrototype,bs=cs.BUGGY_SAFARI_ITERATORS,vs=cn("iterator"),ks="keys",Ss="values",Ps="entries",As=function(){return this},Es=function(e,t,n,a,r,i,o){hs(n,t,a);var l=function(e){return e===r&&g?g:!bs&&e in d?d[e]:e===ks?function(){return new n(this,e)}:e===Ss?function(){return new n(this,e)}:e===Ps?function(){return new n(this,e)}:function(){return new n(this)}},s=!1,d=e.prototype,u=d[vs]||d["@@iterator"]||r&&d[r],g=!bs&&u||l(r),c="Array"==t?d.entries||u:u,p,y,h;if(c&&(p=os(c.call(new e)),xs!==Object.prototype&&p.next&&(os(p)!==xs&&(ms?ms(p,xs):"function"!=typeof p[vs]&&tt(p,vs,As)),_a(p,t+" Iterator",!0))),r==Ss&&u&&u.name!==Ss&&(s=!0,g=function(){return u.call(this)}),d[vs]!==g&&tt(d,vs,g),ui[t]=g,r)if(y={values:l(Ss),keys:i?g:l(ks),entries:l(Ps)},o)for(h in y)(bs||s||!(h in d))&&wt(d,h,y[h]);else tn({target:t,proto:!0,forced:bs||s},y);return y},Ts=Kn.charAt,Cs="String Iterator",ws=Ct.set,Os=Ct.getterFor(Cs);Es(String,"String",function(e){ws(this,{type:Cs,string:e+"",index:0})},function(){var e=Os(this),t=e.string,n=e.index,a;return n>=t.length?{value:void 0,done:!0}:(a=Ts(t,n),e.index+=a.length,{value:a,done:!1})});var Vs=Dn.trim;tn({target:"String",proto:!0,forced:function(e){return Ce(function(){return!!"\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"[e]()||"\u200B\x85\u180E"!="\u200B\x85\u180E"[e]()||"\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"[e].name!==e})}("trim")},{trim:function(){return Vs(this)}});var Ls=function(){function e(t,n){var a=this,r=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];if(Dr(this,e),this.document=t,this.node=n,this.captureTextNodes=r,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],n&&1===n.nodeType){if(Array.from(n.attributes).forEach(function(e){var n=l(e.nodeName);a.attributes[n]=new Il(t,n,e.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(function(e){return e.trim()});i.forEach(function(e){if(e){var n=e.split(":"),r=ca(n,2),i=r[0],o=r[1];a.styles[i]=new Il(t,i.trim(),o.trim())}})}var o=t.definitions,s=this.getAttribute("id");s.hasValue()&&!o[s.getValue()]&&(o[s.getValue()]=this),Array.from(n.childNodes).forEach(function(e){if(1===e.nodeType)a.addChild(e);else if(r&&(3===e.nodeType||4===e.nodeType)){var n=t.createTextNode(e);0<n.getText().length&&a.addChild(n)}})}}return Nr(e,[{key:"getAttribute",value:function(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],n=this.attributes[e];if(!n&&t){var a=new Il(this.document,e,"");return this.attributes[e]=a,a}return n||Il.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var e in this.attributes)if("href"==e||/:href$/.test(e))return this.attributes[e];return Il.empty(this.document)}},{key:"getStyle",value:function(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],a=this.styles[e];if(a)return a;var r=this.getAttribute(e);if(r&&r.hasValue())return this.styles[e]=r,r;if(!n){var i=this.parent;if(i){var o=i.getStyle(e);if(o&&o.hasValue())return o}}if(t){var l=new Il(this.document,e,"");return this.styles[e]=l,l}return a||Il.empty(this.document)}},{key:"render",value:function(e){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(e.save(),this.getStyle("mask").hasValue()){var t=this.getStyle("mask").getDefinition();t&&t.apply(e,this)}else if("none"!==this.getStyle("filter").getValue("none")){var n=this.getStyle("filter").getDefinition();n&&n.apply(e,this)}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}},{key:"setContext",value:function(){}},{key:"clearContext",value:function(){}},{key:"renderChildren",value:function(e){this.children.forEach(function(t){t.render(e)})}},{key:"addChild",value:function(t){var n=t instanceof e?t:this.document.createElement(t);n.parent=this,e.ignoreChildTypes.includes(n.type)||this.children.push(n)}},{key:"matchesSelector",value:function(e){var t=this.node;if("function"==typeof t.matches)return t.matches(e);var n=t.getAttribute("class");return!!(n&&""!==n)&&n.split(" ").some(function(t){if(".".concat(t)===e)return!0})}},{key:"addStylesFromStyleDefinition",value:function(){var e=this.document,t=e.styles,n=e.stylesSpecificity;for(var a in t)if("@"!==a[0]&&this.matchesSelector(a)){var r=t[a],i=n[a];if(r)for(var o in r){var l=this.stylesSpecificity[o];"undefined"==typeof l&&(l="000"),i>=l&&(this.styles[o]=r[o],this.stylesSpecificity[o]=i)}}}}]),e}();Ls.ignoreChildTypes=["title"];var Rs=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),console.warn("Element ".concat(n.nodeName," not yet implemented.")),r}return ql(t,e),t}(Ls),Is=Mt.indexOf,Ds=[].indexOf,Ns=!!Ds&&0>1/[1].indexOf(1,-0),Ms=ia("indexOf");tn({target:"Array",proto:!0,forced:Ns||Ms},{indexOf:function(e){return Ns?Ds.apply(this,arguments)||0:Is(this,e,1<arguments.length?arguments[1]:void 0)}});var zs=[].reverse,Bs=[1,2];tn({target:"Array",proto:!0,forced:Bs+""===Bs.reverse()+""},{reverse:function(){return on(this)&&(this.length=this.length),zs.call(this)}});var _s=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ul(e),null!==e););return e},Fs=t(function(e){function t(n,a,r){return e.exports="undefined"!=typeof Reflect&&Reflect.get?t=Reflect.get:t=function(e,t,n){var a=_s(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(n):r.value}},t(n,a,r||n)}e.exports=t}),js=function(){function e(t,n,a,r,i,o){Dr(this,e);var l=o?"string"==typeof o?e.parse(o):o:{};this.fontFamily=i||l.fontFamily,this.fontSize=r||l.fontSize,this.fontStyle=t||l.fontStyle,this.fontWeight=a||l.fontWeight,this.fontVariant=n||l.fontVariant}return Nr(e,[{key:"toString",value:function(){return[W(this.fontStyle),this.fontVariant,q(this.fontWeight),this.fontSize,U(this.fontFamily)].join(" ").trim()}}],[{key:"parse",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",a=1<arguments.length?arguments[1]:void 0,r="",i="",o="",l="",s="",d=n(t).trim().split(" "),u={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return d.forEach(function(t){switch(!0){case!u.fontStyle&&e.styles.includes(t):"inherit"!==t&&(r=t),u.fontStyle=!0;break;case!u.fontVariant&&e.variants.includes(t):"inherit"!==t&&(i=t),u.fontStyle=!0,u.fontVariant=!0;break;case!u.fontWeight&&e.weights.includes(t):"inherit"!==t&&(o=t),u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0;break;case!u.fontSize:if("inherit"!==t){var n=t.split("/"),a=ca(n,1);l=a[0]}u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0,u.fontSize=!0;break;default:"inherit"!==t&&(s+=t);}}),new e(r,i,o,l,s,a)}}]),e}();js.styles="normal|italic|oblique|inherit",js.variants="normal|small-caps|inherit",js.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Gs=function(e,t,n){var a,r;return ms&&"function"==typeof(a=t.constructor)&&a!==n&&Fe(r=a.prototype)&&r!==n.prototype&&ms(e,r),e},Hs=Gt.f,Ys=Qe.f,$s=et.f,Us=Dn.trim,Ws="Number",qs=Te[Ws],Xs=qs.prototype,Qs=Ne(wa(Xs))==Ws,Ks=function(e){var t=je(e,!1),n,a,r,i,o,l,s,d;if("string"==typeof t&&2<t.length)if(t=Us(t),n=t.charCodeAt(0),43===n||45===n){if(a=t.charCodeAt(2),88===a||120===a)return NaN;}else if(48===n){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t;}for(o=t.slice(2),l=o.length,s=0;s<l;s++)if(d=o.charCodeAt(s),48>d||d>i)return NaN;return parseInt(o,r)}return+t};if(Jt(Ws,!qs(" 0o1")||!qs("0b1")||qs("+0x1"))){for(var Zs=function(e){var t=1>arguments.length?0:e,n=this;return n instanceof Zs&&(Qs?Ce(function(){Xs.valueOf.call(n)}):Ne(n)!=Ws)?Gs(new qs(Ks(t)),n,Zs):Ks(t)},Js=we?Hs(qs):["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY","EPSILON","isFinite","isInteger","isNaN","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","parseFloat","parseInt","isInteger"],ed=0,td;Js.length>ed;ed++)He(qs,td=Js[ed])&&!He(Zs,td)&&$s(Zs,td,Ys(qs,td));Zs.prototype=Xs,Xs.constructor=Zs,wt(Te,Ws,Zs)}var nd=function(){function e(){var t=Number.NaN,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:t,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t;Dr(this,e),this.x1=n,this.y1=a,this.x2=r,this.y2=i,this.addPoint(n,a),this.addPoint(r,i)}return Nr(e,[{key:"addPoint",value:function(e,t){"undefined"!=typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"undefined"!=typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))}},{key:"addX",value:function(e){this.addPoint(e,null)}},{key:"addY",value:function(e){this.addPoint(null,e)}},{key:"addBoundingBox",value:function(e){if(e){var t=e.x1,n=e.y1,a=e.x2,r=e.y2;this.addPoint(t,n),this.addPoint(a,r)}}},{key:"sumCubic",value:function(e,t,n,a,r){return Pe(1-e,3)*t+3*Pe(1-e,2)*e*n+3*(1-e)*Pe(e,2)*a+Pe(e,3)*r}},{key:"bezierCurveAdd",value:function(e,n,r,i,o){var l=6*n-12*r+6*i,s=-3*n+9*r-9*i+3*o,a=3*r-3*n;if(0===s){if(0===l)return;var d=-a/l;return void(0<d&&1>d&&(e?this.addX(this.sumCubic(d,n,r,i,o)):this.addY(this.sumCubic(d,n,r,i,o))))}var t=Pe(l,2)-4*a*s;if(!(0>t)){var u=(-l+Se(t))/(2*s);0<u&&1>u&&(e?this.addX(this.sumCubic(u,n,r,i,o)):this.addY(this.sumCubic(u,n,r,i,o)));var g=(-l-Se(t))/(2*s);0<g&&1>g&&(e?this.addX(this.sumCubic(g,n,r,i,o)):this.addY(this.sumCubic(g,n,r,i,o)))}}},{key:"addBezierCurve",value:function(e,t,n,a,r,i,o,l){this.addPoint(e,t),this.addPoint(o,l),this.bezierCurveAdd(!0,e,n,r,o),this.bezierCurveAdd(!1,t,a,i,l)}},{key:"addQuadraticCurve",value:function(e,t,n,a,r,i){var o=e+2/3*(n-e),l=t+2/3*(a-t);this.addBezierCurve(e,t,o,o+1/3*(r-e),l,l+1/3*(i-t),r,i)}},{key:"isPointInBox",value:function(e,t){var n=this.x1,a=this.y1,r=this.x2,i=this.y2;return n<=e&&e<=r&&a<=t&&t<=i}},{key:"x",get:function(){return this.x1}},{key:"y",get:function(){return this.y1}},{key:"width",get:function(){return this.x2-this.x1}},{key:"height",get:function(){return this.y2-this.y1}}]),e}(),ad="toString",rd=RegExp.prototype,od=rd[ad],ld=Ce(function(){return"/a/b"!=od.call({source:"a",flags:"b"})}),sd=od.name!=ad;(ld||sd)&&wt(RegExp.prototype,ad,function(){var e=Ke(this),t=e.source+"",n=e.flags,a=(void 0===n&&e instanceof RegExp&&!("flags"in rd)?_n.call(e):n)+"";return"/"+t+"/"+a},{unsafe:!0});var dd=function(){function e(t,n){Dr(this,e),this.type="translate",this.point=null,this.point=Nl.parse(n)}return Nr(e,[{key:"apply",value:function(e){var t=this.point,n=t.x,a=t.y;e.translate(n||0,a||0)}},{key:"unapply",value:function(e){var t=this.point,n=t.x,a=t.y;e.translate(-1*n||0,-1*a||0)}},{key:"applyToPoint",value:function(e){var t=this.point,n=t.x,a=t.y;e.applyTransform([1,0,0,1,n||0,a||0])}}]),e}(),ud=function(){function e(t,n){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];Dr(this,e),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var r=o(n);this.angle=new Il(t,"angle",r[0]),this.cx=(r[1]||0)+(a[0]||0),this.cy=(r[2]||0)+(a[1]||0)}return Nr(e,[{key:"apply",value:function(e){var t=this.cx,n=this.cy,a=this.angle;e.translate(t,n),e.rotate(a.getRadians()),e.translate(-t,-n)}},{key:"unapply",value:function(e){var t=this.cx,n=this.cy,a=this.angle;e.translate(t,n),e.rotate(-1*a.getRadians()),e.translate(-t,-n)}},{key:"applyToPoint",value:function(e){var t=this.cx,n=this.cy,a=this.angle,r=a.getRadians();e.applyTransform([1,0,0,1,t||0,n||0]),e.applyTransform([ve(r),be(r),-be(r),ve(r),0,0]),e.applyTransform([1,0,0,1,-t||0,-n||0])}}]),e}(),gd=function(){function e(t,n){Dr(this,e),this.type="scale",this.scale=null;var a=Nl.parseScale(n);(0===a.x||0===a.y)&&(a.x=va,a.y=va),this.scale=a}return Nr(e,[{key:"apply",value:function(e){var t=this.scale,n=t.x,a=t.y;e.scale(n,a||n)}},{key:"unapply",value:function(e){var t=this.scale,n=t.x,a=t.y;e.scale(1/n,1/a||n)}},{key:"applyToPoint",value:function(e){var t=this.scale,n=t.x,a=t.y;e.applyTransform([n||0,0,0,a||0,0,0])}}]),e}(),cd=function(){function e(t,n){Dr(this,e),this.type="matrix",this.matrix=[],this.matrix=o(n)}return Nr(e,[{key:"apply",value:function(e){var t=this.matrix;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}},{key:"unapply",value:function(t){var n=this.matrix,r=n[0],a=n[2],o=n[4],l=n[1],s=n[3],e=n[5],d=0,u=0,g=1,i=1/(r*(s*g-e*u)-a*(l*g-e*d)+o*(l*u-s*d));t.transform(i*(s*g-e*u),i*(e*d-l*g),i*(o*u-a*g),i*(r*g-o*d),i*(a*e-o*s),i*(o*l-r*e))}},{key:"applyToPoint",value:function(e){e.applyTransform(this.matrix)}}]),e}(),pd=function(e){function t(e,n){var a;return Dr(this,t),a=$l(this,Ul(t).call(this,e,n)),a.type="skew",a.angle=null,a.angle=new Il(e,"angle",n),a}return ql(t,e),t}(cd),yd=function(e){function t(e,n){var a;return Dr(this,t),a=$l(this,Ul(t).call(this,e,n)),a.type="skewX",a.matrix=[1,0,ge(a.angle.getRadians()),1,0,0],a}return ql(t,e),t}(pd),hd=function(e){function t(e,n){var a;return Dr(this,t),a=$l(this,Ul(t).call(this,e,n)),a.type="skewY",a.matrix=[1,ge(a.angle.getRadians()),0,1,0,0],a}return ql(t,e),t}(pd),fd=function(){function e(t,n,a){var r=this;Dr(this,e),this.document=t,this.transforms=[];var i=X(n),l=a?o(a):[];i.forEach(function(t){if("none"!==t){var n=Q(t),a=ca(n,2),i=a[0],o=a[1],s=e.transformTypes[i];"undefined"!=typeof s&&r.transforms.push(new s(r.document,o,l))}})}return Nr(e,[{key:"apply",value:function(e){for(var t=this.transforms,n=t.length,a=0;a<n;a++)t[a].apply(e)}},{key:"unapply",value:function(e){for(var t=this.transforms,n=t.length,a=n-1;0<=a;a--)t[a].unapply(e)}},{key:"applyToPoint",value:function(e){for(var t=this.transforms,n=t.length,a=0;a<n;a++)t[a].applyToPoint(e)}}],[{key:"fromElement",value:function(t,n){var a=n.getStyle("transform",!1,!0),r=n.getStyle("transform-origin",!1,!0);return a.hasValue()?new e(t,a.getString(),r.getString()):null}}]),e}();fd.transformTypes={translate:dd,rotate:ud,scale:gd,matrix:cd,skewX:yd,skewY:hd};var md=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.modifiedEmSizeStack=!1,e}return ql(t,e),Nr(t,[{key:"calculateOpacity",value:function(){for(var e=1,t=this,n;t;)n=t.getStyle("opacity",!1,!0),n.hasValue()&&(e*=n.getNumber()),t=t.parent;return e}},{key:"setContext",value:function(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(!t){var n=this.getStyle("fill"),a=this.getStyle("fill-opacity"),r=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(n.isUrlDefinition()){var l=n.getFillStyleDefinition(this,a);l&&(e.fillStyle=l)}else if(n.hasValue()){"currentColor"===n.getString()&&n.setValue(this.getStyle("color").getValue());var s=n.getString();"inherit"!==s&&(e.fillStyle="none"===s?"rgba(0,0,0,0)":s)}if(a.hasValue()){var d=new Il(this.document,"fill",e.fillStyle).addOpacity(a).getString();e.fillStyle=d}if(r.isUrlDefinition()){var u=r.getFillStyleDefinition(this,i);u&&(e.strokeStyle=u)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getValue());var g=r.getString();"inherit"!==g&&(e.strokeStyle="none"===g?"rgba(0,0,0,0)":g)}if(i.hasValue()){var c=new Il(this.document,"stroke",e.strokeStyle).addOpacity(i).getString();e.strokeStyle=c}var p=this.getStyle("stroke-width");if(p.hasValue()){var y=p.getPixels();e.lineWidth=y?y:va}var h=this.getStyle("stroke-linecap"),f=this.getStyle("stroke-linejoin"),m=this.getStyle("stroke-miterlimit"),x=this.getStyle("paint-order"),b=this.getStyle("stroke-dasharray"),v=this.getStyle("stroke-dashoffset");if(h.hasValue()&&(e.lineCap=h.getString()),f.hasValue()&&(e.lineJoin=f.getString()),m.hasValue()&&(e.miterLimit=m.getNumber()),x.hasValue()&&(e.paintOrder=x.getValue()),b.hasValue()&&"none"!==b.getString()){var k=o(b.getString());"undefined"==typeof e.setLineDash?"undefined"==typeof e.webkitLineDash?"undefined"!=typeof e.mozDash&&(1!==k.length||0!==k[0])&&(e.mozDash=k):e.webkitLineDash=k:e.setLineDash(k);var S=v.getPixels();"undefined"==typeof e.lineDashOffset?"undefined"==typeof e.webkitLineDashOffset?"undefined"!=typeof e.mozDashOffset&&(e.mozDashOffset=S):e.webkitLineDashOffset=S:e.lineDashOffset=S}}if(this.modifiedEmSizeStack=!1,"undefined"!=typeof e.font){var P=this.getStyle("font"),A=this.getStyle("font-style"),E=this.getStyle("font-variant"),T=this.getStyle("font-weight"),C=this.getStyle("font-size"),w=this.getStyle("font-family"),O=new js(A.getString(),E.getString(),T.getString(),C.hasValue()?"".concat(C.getPixels(!0),"px"):"",w.getString(),js.parse(P.getString(),e.font));A.setValue(O.fontStyle),E.setValue(O.fontVariant),T.setValue(O.fontWeight),C.setValue(O.fontSize),w.setValue(O.fontFamily),e.font=O.toString(),C.isPixels()&&(this.document.emSize=C.getPixels(),this.modifiedEmSizeStack=!0)}var V=fd.fromElement(this.document,this);V&&V.apply(e);var L=this.getStyle("clip-path",!1,!0);if(L.hasValue()){var R=L.getDefinition();R&&R.apply(e)}e.globalAlpha=this.calculateOpacity()}},{key:"clearContext",value:function(e){Fs(Ul(t.prototype),"clearContext",this).call(this,e),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),t}(Ls),xd=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,(this instanceof t?this.constructor:void 0)===t||a)),r.type="text",r.x=0,r.y=0,r.measureCache=-1,r}return ql(t,e),Nr(t,[{key:"setContext",value:function(e){var n=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];Fs(Ul(t.prototype),"setContext",this).call(this,e,n);var a=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();a&&(e.textBaseline=a)}},{key:"initializeCoordinates",value:function(e){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var t=this.getAttribute("dx"),n=this.getAttribute("dy");t.hasValue()&&(this.x+=t.getPixels("x")),n.hasValue()&&(this.y+=n.getPixels("y")),this.x+=this.getAnchorDelta(e,this,0)}},{key:"getBoundingBox",value:function(e){var t=this;if("text"!==this.type)return this.getTElementBoundingBox(e);this.initializeCoordinates(e);var n=null;return this.children.forEach(function(a,r){var i=t.getChildBoundingBox(e,t,t,r);n?n.addBoundingBox(i):n=i}),n}},{key:"getFontSize",value:function(){var e=this.document,t=this.parent,n=js.parse(e.ctx.font).fontSize,a=t.getStyle("font-size").getNumber(n);return a}},{key:"getTElementBoundingBox",value:function(e){var t=this.getFontSize();return new nd(this.x,this.y-t,this.x+this.measureText(e),this.y)}},{key:"getGlyph",value:function(e,t,n){var a=t[n],r=null;if(e.isArabic){var i=t.length,o=t[n-1],l=t[n+1],s="isolated";(0===n||" "===o)&&n<i-2&&" "!==l&&(s="terminal"),0<n&&" "!==o&&n<i-2&&" "!==l&&(s="medial"),0<n&&" "!==o&&(n===i-1||" "===l)&&(s="initial"),"undefined"!=typeof e.glyphs[a]&&(r=e.glyphs[a][s],!r&&"glyph"===e.glyphs[a].type&&(r=e.glyphs[a]))}else r=e.glyphs[a];return r||(r=e.missingGlyph),r}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(e){var t=e||this.node,i=Array.from(t.parentNode.childNodes),o=i.indexOf(t),l=i.length-1,s=n(t.value||t.text||t.textContent||"");return 0===o&&(s=a(s)),o===l&&(s=r(s)),s}},{key:"renderChildren",value:function(e){var t=this;if("text"!==this.type)return void this.renderTElementChildren(e);this.initializeCoordinates(e),this.children.forEach(function(n,a){t.renderChild(e,t,t,a)});var n=this.document.screen.mouse;n.isWorking()&&n.checkBoundingBox(this,this.getBoundingBox(e))}},{key:"renderTElementChildren",value:function(e){var t=this.document,n=this.parent,a=this.getText(),r=n.getStyle("font-family").getDefinition();if(r){for(var l=r.fontFace.unitsPerEm,s=js.parse(t.ctx.font),d=n.getStyle("font-size").getNumber(s.fontSize),u=n.getStyle("font-style").getString(s.fontStyle),g=d/l,c=r.isRTL?a.split("").reverse().join(""):a,p=o(n.getAttribute("dx").getString()),h=c.length,f=0,m;f<h;f++){m=this.getGlyph(r,c,f),e.translate(this.x,this.y),e.scale(g,-g);var b=e.lineWidth;e.lineWidth=e.lineWidth*l/d,"italic"===u&&e.transform(1,0,.4,1,0,0),m.render(e),"italic"===u&&e.transform(1,0,-.4,1,0,0),e.lineWidth=b,e.scale(1/g,-1/g),e.translate(-this.x,-this.y),this.x+=d*(m.horizAdvX||r.horizAdvX)/l,"undefined"==typeof p[f]||isNaN(p[f])||(this.x+=p[f])}return}var v=this.x,x=this.y;"stroke"===e.paintOrder?(e.strokeStyle&&e.strokeText(a,v,x),e.fillStyle&&e.fillText(a,v,x)):(e.fillStyle&&e.fillText(a,v,x),e.strokeStyle&&e.strokeText(a,v,x))}},{key:"getAnchorDelta",value:function(e,t,n){var a=this.getStyle("text-anchor").getString("start");if("start"!==a){for(var r=t.children,o=r.length,l=null,s=0,d=n;d<o&&(l=r[d],!(d>n&&l.getAttribute("x").hasValue()||l.getAttribute("text-anchor").hasValue()));d++)s+=l.measureTextRecursive(e);return-1*("end"===a?s:s/2)}return 0}},{key:"adjustChildCoordinates",value:function(e,t,n,a){var r=n.children[a];if("function"!=typeof r.measureText)return r;var i=r.getAttribute("x"),o=r.getAttribute("y"),l=r.getAttribute("dx"),s=r.getAttribute("dy"),d=r.getAttribute("text-anchor").getString("start");if(0===a&&"textNode"!==r.type&&(!i.hasValue()&&i.setValue(t.getAttribute("x").getValue("0")),!o.hasValue()&&o.setValue(t.getAttribute("y").getValue("0")),!l.hasValue()&&l.setValue(t.getAttribute("dx").getValue("0")),!s.hasValue()&&s.setValue(t.getAttribute("dy").getValue("0"))),i.hasValue()){if(r.x=i.getPixels("x")+t.getAnchorDelta(e,n,a),"start"!==d){var u=r.measureTextRecursive(e);r.x+=-1*("end"===d?u:u/2)}l.hasValue()&&(r.x+=l.getPixels("x"))}else{if("start"!==d){var g=r.measureTextRecursive(e);t.x+=-1*("end"===d?g:g/2)}l.hasValue()&&(t.x+=l.getPixels("x")),r.x=t.x}return t.x=r.x+r.measureText(e),o.hasValue()?(r.y=o.getPixels("y"),s.hasValue()&&(r.y+=s.getPixels("y"))):(s.hasValue()&&(t.y+=s.getPixels("y")),r.y=t.y),t.y=r.y,r}},{key:"getChildBoundingBox",value:function(e,t,n,a){var r=this.adjustChildCoordinates(e,t,n,a),o=r.getBoundingBox(e);return o?(r.children.forEach(function(n,a){var i=t.getChildBoundingBox(e,t,r,a);o.addBoundingBox(i)}),o):null}},{key:"renderChild",value:function(e,t,n,a){var r=this.adjustChildCoordinates(e,t,n,a);r.render(e),r.children.forEach(function(n,a){t.renderChild(e,t,r,a)})}},{key:"measureTextRecursive",value:function(e){var t=this.children.reduce(function(t,n){return t+n.measureTextRecursive(e)},this.measureText(e));return t}},{key:"measureText",value:function(e){var t=this.measureCache;if(~t)return t;var n=this.getText(),a=this.measureTargetText(e,n);return this.measureCache=a,a}},{key:"measureTargetText",value:function(e,t){if(!t.length)return 0;var n=this.parent,a=n.getStyle("font-family").getDefinition();if(a){for(var r=this.getFontSize(),l=a.isRTL?t.split("").reverse().join(""):t,s=o(n.getAttribute("dx").getString()),d=l.length,u=0,g=0,c;g<d;g++)c=this.getGlyph(a,l,g),u+=(c.horizAdvX||a.horizAdvX)*r/a.fontFace.unitsPerEm,"undefined"==typeof s[g]||isNaN(s[g])||(u+=s[g]);return u}if(!e.measureText)return 10*t.length;e.save(),this.setContext(e,!0);var p=e.measureText(t),y=p.width;return e.restore(),y}}]),t}(md),bd=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,(this instanceof t?this.constructor:void 0)===t||a)),r.type="tspan",r.text=0<r.children.length?"":r.getTextFromNode(),r}return ql(t,e),Nr(t,[{key:"getText",value:function(){return this.text}}]),t}(xd),vd=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="textNode",e}return ql(t,e),t}(bd);tn({target:"Array",proto:!0},{fill:function(e){for(var t=rn(this),n=It(t.length),a=arguments.length,r=Dt(1<a?arguments[1]:void 0,n),i=2<a?arguments[2]:void 0,o=void 0===i?n:Dt(i,n);o>r;)t[r++]=e;return t}}),Zl("fill");var kd=function(){function e(t){Dr(this,e),this.control=null,this.start=null,this.current=null,this.command="",this.tokens=[],this.i=-1,this.previousCommand="",this.points=[],this.angles=[],this.tokens=K(t).split(" ")}return Nr(e,[{key:"reset",value:function(){this.i=-1,this.command="",this.previousCommand="",this.start=new Nl(0,0),this.control=new Nl(0,0),this.current=new Nl(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){var e=this.i,t=this.tokens;return e>=t.length-1}},{key:"isCommandOrEnd",value:function(){if(this.isEnd())return!0;var e=this.i,t=this.tokens;return /^[A-Za-z]$/.test(t[e+1])}},{key:"isRelativeCommand",value:function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0;default:return!1;}}},{key:"getToken",value:function(){return this.i++,this.tokens[this.i]}},{key:"getScalar",value:function(){return parseFloat(this.getToken())}},{key:"nextCommand",value:function(){this.previousCommand=this.command,this.command=this.getToken()}},{key:"getPoint",value:function(){var e=new Nl(this.getScalar(),this.getScalar());return this.makeAbsolute(e)}},{key:"getAsControlPoint",value:function(){var e=this.getPoint();return this.control=e,e}},{key:"getAsCurrentPoint",value:function(){var e=this.getPoint();return this.current=e,e}},{key:"getReflectedControlPoint",value:function(){var e=this.previousCommand.toLowerCase();if("c"!==e&&"s"!==e&&"q"!==e&&"t"!==e)return this.current;var t=this.current,n=t.x,a=t.y,r=this.control,i=r.x,o=r.y,l=new Nl(2*n-i,2*a-o);return l}},{key:"makeAbsolute",value:function(e){if(this.isRelativeCommand()){var t=this.current,n=t.x,a=t.y;e.x+=n,e.y+=a}return e}},{key:"addMarker",value:function(e,t,n){var a=this.points,r=this.angles;n&&0<r.length&&!r[r.length-1]&&(r[r.length-1]=a[a.length-1].angleTo(n)),this.addMarkerAngle(e,t?t.angleTo(e):null)}},{key:"addMarkerAngle",value:function(e,t){this.points.push(e),this.angles.push(t)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var e=this.angles,t=e.length,n=0;n<t;n++)if(!e[n])for(var a=n+1;a<t;a++)if(e[a]){e[n]=e[a];break}return e}}]),e}(),Sd=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="path",r.pathParser=null,r.pathParser=new kd(r.getAttribute("d").getString()),r}return ql(t,e),Nr(t,[{key:"path",value:function(e){var t=this.pathParser,n=new nd;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.nextCommand(),t.command){case"M":case"m":this.pathM(e,n);break;case"L":case"l":this.pathL(e,n);break;case"H":case"h":this.pathH(e,n);break;case"V":case"v":this.pathV(e,n);break;case"C":case"c":this.pathC(e,n);break;case"S":case"s":this.pathS(e,n);break;case"Q":case"q":this.pathQ(e,n);break;case"T":case"t":this.pathT(e,n);break;case"A":case"a":this.pathA(e,n);break;case"Z":case"z":this.pathZ(e,n);}return n}},{key:"getBoundingBox",value:function(){return this.path()}},{key:"getMarkers",value:function(){var e=this.pathParser,t=e.getMarkerPoints(),n=e.getMarkerAngles(),a=t.map(function(e,t){return[e,n[t]]});return a}},{key:"renderChildren",value:function(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var t=this.getStyle("fill-rule");""!==e.fillStyle&&("inherit"===t.getString("inherit")?e.fill():e.fill(t.getString())),""!==e.strokeStyle&&e.stroke();var n=this.getMarkers();if(n){var a=n.length-1,r=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),l=this.getStyle("marker-end");if(r.isUrlDefinition()){var s=r.getDefinition(),d=ca(n[0],2),u=d[0],g=d[1];s.render(e,u,g)}if(o.isUrlDefinition())for(var c=o.getDefinition(),p=1;p<a;p++){var y=ca(n[p],2),h=y[0],f=y[1];c.render(e,h,f)}if(l.isUrlDefinition()){var m=l.getDefinition(),x=ca(n[a],2),b=x[0],v=x[1];m.render(e,b,v)}}}},{key:"pathM",value:function(e,t){var n=this.pathParser,a=n.getAsCurrentPoint(),r=a.x,i=a.y;for(n.addMarker(a),t.addPoint(r,i),e&&e.moveTo(r,i),n.start=n.current;!n.isCommandOrEnd();){var o=n.getAsCurrentPoint(),l=o.x,s=o.y;n.addMarker(o,n.start),t.addPoint(l,s),e&&e.lineTo(l,s)}}},{key:"pathL",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,r=n.getAsCurrentPoint(),i=r.x,o=r.y;n.addMarker(r,a),t.addPoint(i,o),e&&e.lineTo(i,o)}}},{key:"pathH",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,r=new Nl((n.isRelativeCommand()?a.x:0)+n.getScalar(),a.y);n.addMarker(r,a),n.current=r,t.addPoint(r.x,r.y),e&&e.lineTo(r.x,r.y)}}},{key:"pathV",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,r=new Nl(a.x,(n.isRelativeCommand()?a.y:0)+n.getScalar());n.addMarker(r,a),n.current=r,t.addPoint(r.x,r.y),e&&e.lineTo(r.x,r.y)}}},{key:"pathC",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,r=n.getPoint(),i=n.getAsControlPoint(),o=n.getAsCurrentPoint();n.addMarker(o,i,r),t.addBezierCurve(a.x,a.y,r.x,r.y,i.x,i.y,o.x,o.y),e&&e.bezierCurveTo(r.x,r.y,i.x,i.y,o.x,o.y)}}},{key:"pathS",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,r=n.getReflectedControlPoint(),i=n.getAsControlPoint(),o=n.getAsCurrentPoint();n.addMarker(o,i,r),t.addBezierCurve(a.x,a.y,r.x,r.y,i.x,i.y,o.x,o.y),e&&e.bezierCurveTo(r.x,r.y,i.x,i.y,o.x,o.y)}}},{key:"pathQ",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,r=n.getAsControlPoint(),i=n.getAsCurrentPoint();n.addMarker(i,r,r),t.addQuadraticCurve(a.x,a.y,r.x,r.y,i.x,i.y),e&&e.quadraticCurveTo(r.x,r.y,i.x,i.y)}}},{key:"pathT",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,r=n.getReflectedControlPoint();n.control=r;var i=n.getAsCurrentPoint();n.addMarker(i,r,r),t.addQuadraticCurve(a.x,a.y,r.x,r.y,i.x,i.y),e&&e.quadraticCurveTo(r.x,r.y,i.x,i.y)}}},{key:"pathA",value:function(e,t){for(var n=this.pathParser;!n.isCommandOrEnd();){var a=n.current,i=n.getScalar(),o=n.getScalar(),d=n.getScalar()*(pe/180),g=n.getScalar(),c=n.getScalar(),p=n.getAsCurrentPoint(),y=new Nl(ve(d)*(a.x-p.x)/2+be(d)*(a.y-p.y)/2,-be(d)*(a.x-p.x)/2+ve(d)*(a.y-p.y)/2),f=Pe(y.x,2)/Pe(i,2)+Pe(y.y,2)/Pe(o,2);1<f&&(i*=Se(f),o*=Se(f));var l=(g===c?-1:1)*Se((Pe(i,2)*Pe(o,2)-Pe(i,2)*Pe(y.y,2)-Pe(o,2)*Pe(y.x,2))/(Pe(i,2)*Pe(y.y,2)+Pe(o,2)*Pe(y.x,2)));isNaN(l)&&(l=0);var m=new Nl(l*i*y.y/o,l*-o*y.x/i),b=new Nl((a.x+p.x)/2+ve(d)*m.x-be(d)*m.y,(a.y+p.y)/2+be(d)*m.x+ve(d)*m.y),k=x([1,0],[(y.x-m.x)/i,(y.y-m.y)/o]),S=[(y.x-m.x)/i,(y.y-m.y)/o],u=[(-y.x-m.x)/i,(-y.y-m.y)/o],v=x(S,u);-1>=h(S,u)&&(v=pe),1<=h(S,u)&&(v=0);var P=1-c?1:-1,A=k+P*(v/2),E=new Nl(b.x+i*ve(A),b.y+o*be(A));if(n.addMarkerAngle(E,A-P*pe/2),n.addMarkerAngle(p,A-P*pe),t.addPoint(p.x,p.y),e&&!isNaN(k)&&!isNaN(v)){var T=i>o?i:o,r=i>o?1:i/o,C=i>o?o/i:1;e.translate(b.x,b.y),e.rotate(d),e.scale(r,C),e.arc(0,0,T,k,k+v,!!(1-c)),e.scale(1/r,1/C),e.rotate(-d),e.translate(-b.x,-b.y)}}}},{key:"pathZ",value:function(e,t){var n=this.pathParser;e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath(),n.current=n.start}}]),t}(md),Pd=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="svg",e.root=!1,e}return ql(t,e),Nr(t,[{key:"clearContext",value:function(e){Fs(Ul(t.prototype),"clearContext",this).call(this,e),this.document.screen.viewPort.removeCurrent()}},{key:"setContext",value:function(e){var n=this.document,a=n.screen,r=n.window,i=e.canvas;if(a.setDefaults(e),i.style&&"undefined"!=typeof e.font&&r&&"undefined"!=typeof r.getComputedStyle){e.font=r.getComputedStyle(i).getPropertyValue("font");var l=new Il(n,"fontSize",js.parse(e.font).fontSize);l.hasValue()&&(n.rootEmSize=l.getPixels("y"),n.emSize=n.rootEmSize)}Fs(Ul(t.prototype),"setContext",this).call(this,e),this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y"));var s=a.viewPort,d=s.width,u=s.height;this.getAttribute("width").hasValue()||this.getAttribute("width",!0).setValue("100%"),this.getAttribute("height").hasValue()||this.getAttribute("height",!0).setValue("100%");var g=this.getAttribute("refX"),c=this.getAttribute("refY"),p=this.getAttribute("viewBox"),y=p.hasValue()?o(p.getString()):null,h=!this.root&&"visible"!==this.getAttribute("overflow").getValue("hidden"),f=0,m=0,x=0,b=0;y&&(f=y[0],m=y[1]),this.root||(d=this.getAttribute("width").getPixels("x"),u=this.getAttribute("height").getPixels("y"),"marker"===this.type&&(x=f,b=m,f=0,m=0)),a.viewPort.setCurrent(d,u),y&&(d=y[2],u=y[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a.viewPort.width,desiredWidth:d,height:a.viewPort.height,desiredHeight:u,minX:f,minY:m,refX:g.getValue(),refY:c.getValue(),clip:h,clipX:x,clipY:b}),y&&(a.viewPort.removeCurrent(),a.viewPort.setCurrent(d,u))}},{key:"resize",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],a=this.getAttribute("width",!0),r=this.getAttribute("height",!0),i=this.getAttribute("viewBox"),o=this.getAttribute("style"),l=a.getNumber(0),s=r.getNumber(0);if(n)if("string"==typeof n)this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var d=this.getAttribute("preserveAspectRatio");d.hasValue()&&d.setValue(d.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(a.setValue(e),r.setValue(t),i.hasValue()||i.setValue("0 0 ".concat(l||e," ").concat(s||t)),o.hasValue()){var u=this.getStyle("width"),g=this.getStyle("height");u.hasValue()&&u.setValue("".concat(e,"px")),g.hasValue()&&g.setValue("".concat(t,"px"))}}}]),t}(md),Ad=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="rect",e}return ql(t,e),Nr(t,[{key:"path",value:function(e){var t=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),a=this.getAttribute("width").getPixels("x"),r=this.getAttribute("height").getPixels("y"),i=this.getAttribute("rx"),o=this.getAttribute("ry"),l=i.getPixels("x"),s=o.getPixels("y");if(i.hasValue()&&!o.hasValue()&&(s=l),o.hasValue()&&!i.hasValue()&&(l=s),l=me(l,a/2),s=me(s,r/2),e){var d=4*((Se(2)-1)/3);e.beginPath(),0<r&&0<a&&(e.moveTo(t+l,n),e.lineTo(t+a-l,n),e.bezierCurveTo(t+a-l+d*l,n,t+a,n+s-d*s,t+a,n+s),e.lineTo(t+a,n+r-s),e.bezierCurveTo(t+a,n+r-s+d*s,t+a-l+d*l,n+r,t+a-l,n+r),e.lineTo(t+l,n+r),e.bezierCurveTo(t+l-d*l,n+r,t,n+r-s+d*s,t,n+r-s),e.lineTo(t,n+s),e.bezierCurveTo(t,n+s-d*s,t+l-d*l,n,t+l,n),e.closePath())}return new nd(t,n,t+a,n+r)}},{key:"getMarkers",value:function(){return null}}]),t}(Sd),Ed=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="circle",e}return ql(t,e),Nr(t,[{key:"path",value:function(e){var t=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),a=this.getAttribute("r").getPixels();return e&&0<a&&(e.beginPath(),e.arc(t,n,a,0,2*pe,!1),e.closePath()),new nd(t-a,n-a,t+a,n+a)}},{key:"getMarkers",value:function(){return null}}]),t}(Sd),Td=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="ellipse",e}return ql(t,e),Nr(t,[{key:"path",value:function(e){var t=4*((Se(2)-1)/3),n=this.getAttribute("rx").getPixels("x"),a=this.getAttribute("ry").getPixels("y"),r=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y");return e&&(e.beginPath(),e.moveTo(r+n,i),e.bezierCurveTo(r+n,i+t*a,r+t*n,i+a,r,i+a),e.bezierCurveTo(r-t*n,i+a,r-n,i+t*a,r-n,i),e.bezierCurveTo(r-n,i-t*a,r-t*n,i-a,r,i-a),e.bezierCurveTo(r+t*n,i-a,r+n,i-t*a,r+n,i),e.closePath()),new nd(r-n,i-a,r+n,i+a)}},{key:"getMarkers",value:function(){return null}}]),t}(Sd),Cd=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="line",e}return ql(t,e),Nr(t,[{key:"getPoints",value:function(){return[new Nl(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Nl(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(e){var t=this.getPoints(),n=ca(t,2),a=n[0],r=a.x,i=a.y,o=n[1],l=o.x,s=o.y;return e&&(e.beginPath(),e.moveTo(r,i),e.lineTo(l,s)),new nd(r,i,l,s)}},{key:"getMarkers",value:function(){var e=this.getPoints(),t=ca(e,2),n=t[0],r=t[1],i=n.angleTo(r);return[[n,i],[r,i]]}}]),t}(Sd),wd=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="polyline",r.points=[],r.points=Nl.parsePath(r.getAttribute("points").getString()),r}return ql(t,e),Nr(t,[{key:"path",value:function(e){var t=this.points,n=ca(t,1),a=n[0],r=a.x,i=a.y,o=new nd(r,i);return e&&(e.beginPath(),e.moveTo(r,i)),t.forEach(function(t){var n=t.x,a=t.y;o.addPoint(n,a),e&&e.lineTo(n,a)}),o}},{key:"getMarkers",value:function(){var e=this.points,t=e.length-1,n=[];return e.forEach(function(a,r){r===t||n.push([a,a.angleTo(e[r+1])])}),0<n.length&&n.push([e[e.length-1],n[n.length-1][1]]),n}}]),t}(Sd),Od=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="polygon",e}return ql(t,e),Nr(t,[{key:"path",value:function(e){var n=Fs(Ul(t.prototype),"path",this).call(this,e),a=ca(this.points,1),r=a[0],i=r.x,o=r.y;return e&&(e.lineTo(i,o),e.closePath()),n}}]),t}(wd),Vd=Qe.f;tn({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=Vd(Ke(e),t);return(!n||n.configurable)&&delete e[t]}});var Ld=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="pattern",e}return ql(t,e),Nr(t,[{key:"createPattern",value:function(e,t,n){var a=this.getAttribute("width").getPixels("x",!0),r=this.getAttribute("height").getPixels("y",!0),i=new Pd(this.document,null);i.attributes.viewBox=new Il(this.document,"viewBox",this.getAttribute("viewBox").getValue()),i.attributes.width=new Il(this.document,"width","".concat(a,"px")),i.attributes.height=new Il(this.document,"height","".concat(r,"px")),i.attributes.transform=new Il(this.document,"transform",this.getAttribute("patternTransform").getValue()),i.children=this.children;var o=this.document.createCanvas(a,r),l=o.getContext("2d"),s=this.getAttribute("x"),d=this.getAttribute("y");s.hasValue()&&d.hasValue()&&l.translate(s.getPixels("x",!0),d.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(var u=-1;1>=u;u++)for(var g=-1;1>=g;g++)l.save(),i.attributes.x=new Il(this.document,"x",u*o.width),i.attributes.y=new Il(this.document,"y",g*o.height),i.render(l),l.restore();var c=e.createPattern(o,"repeat");return c}}]),t}(Ls),Rd=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="marker",e}return ql(t,e),Nr(t,[{key:"render",value:function(e,t,n){if(t){var a=t.x,r=t.y,i=this.getAttribute("orient").getValue("auto"),o=this.getAttribute("markerUnits").getValue("strokeWidth");e.translate(a,r),"auto"===i&&e.rotate(n),"strokeWidth"===o&&e.scale(e.lineWidth,e.lineWidth),e.save();var l=new Pd(this.document,null);l.type=this.type,l.attributes.viewBox=new Il(this.document,"viewBox",this.getAttribute("viewBox").getValue()),l.attributes.refX=new Il(this.document,"refX",this.getAttribute("refX").getValue()),l.attributes.refY=new Il(this.document,"refY",this.getAttribute("refY").getValue()),l.attributes.width=new Il(this.document,"width",this.getAttribute("markerWidth").getValue()),l.attributes.height=new Il(this.document,"height",this.getAttribute("markerHeight").getValue()),l.attributes.overflow=new Il(this.document,"overflow",this.getAttribute("overflow").getValue()),l.attributes.fill=new Il(this.document,"fill",this.getAttribute("fill").getValue("black")),l.attributes.stroke=new Il(this.document,"stroke",this.getAttribute("stroke").getValue("none")),l.children=this.children,l.render(e),e.restore(),"strokeWidth"===o&&e.scale(1/e.lineWidth,1/e.lineWidth),"auto"===i&&e.rotate(-n),e.translate(-a,-r)}}}]),t}(Ls),Id=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="defs",e}return ql(t,e),Nr(t,[{key:"render",value:function(){}}]),t}(Ls),Dd=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="g",e}return ql(t,e),Nr(t,[{key:"getBoundingBox",value:function(e){var t=new nd;return this.children.forEach(function(n){t.addBoundingBox(n.getBoundingBox(e))}),t}}]),t}(md),Nd=function(e){function t(e,n,a){var r;Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.attributesToInherit=["gradientUnits"],r.stops=[];var i=Yl(r),o=i.stops,l=i.children;return l.forEach(function(e){"stop"===e.type&&o.push(e)}),r}return ql(t,e),Nr(t,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(e,t,n){var a=this,r=this;this.getHrefAttribute().hasValue()&&(r=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(r));var i=r,o=i.stops,l=this.getGradient(e,t);if(!l)return this.addParentOpacity(n,o[o.length-1].color);if(o.forEach(function(e){l.addColorStop(e.offset,a.addParentOpacity(n,e.color))}),this.getAttribute("gradientTransform").hasValue()){var s=this.document,d=s.screen,u=d.MAX_VIRTUAL_PIXELS,g=d.viewPort,c=ca(g.viewPorts,1),p=c[0],y=new Ad(s,null);y.attributes.x=new Il(s,"x",-u/3),y.attributes.y=new Il(s,"y",-u/3),y.attributes.width=new Il(s,"width",u),y.attributes.height=new Il(s,"height",u);var h=new Dd(s,null);h.attributes.transform=new Il(s,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[y];var f=new Pd(s,null);f.attributes.x=new Il(s,"x",0),f.attributes.y=new Il(s,"y",0),f.attributes.width=new Il(s,"width",p.width),f.attributes.height=new Il(s,"height",p.height),f.children=[h];var m=s.createCanvas(p.width,p.height),x=m.getContext("2d");return x.fillStyle=l,f.render(x),x.createPattern(m,"no-repeat")}return l}},{key:"inheritStopContainer",value:function(e){var t=this;this.attributesToInherit.forEach(function(n){!t.getAttribute(n).hasValue()&&e.getAttribute(n).hasValue()&&t.getAttribute(n,!0).setValue(e.getAttribute(n).getValue())})}},{key:"addParentOpacity",value:function(e,t){if(e.hasValue()){var n=new Il(this.document,"color",t);return n.addOpacity(e).getString()}return t}}]),t}(Ls),Md=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="linearGradient",r.attributesToInherit.push("x1","y1","x2","y2"),r}return ql(t,e),Nr(t,[{key:"getGradient",value:function(e,t){var n="objectBoundingBox"===this.getGradientUnits(),a=n?t.getBoundingBox(e):null;if(n&&!a)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 r=n?a.x+a.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),i=n?a.y+a.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),o=n?a.x+a.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),l=n?a.y+a.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return r===o&&i===l?null:e.createLinearGradient(r,i,o,l)}}]),t}(Nd),zd=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="radialGradient",r.attributesToInherit.push("cx","cy","r","fx","fy","fr"),r}return ql(t,e),Nr(t,[{key:"getGradient",value:function(e,t){var n="objectBoundingBox"===this.getGradientUnits(),a=t.getBoundingBox(e);if(n&&!a)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 i=n?a.x+a.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=n?a.y+a.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),l=i,s=o;this.getAttribute("fx").hasValue()&&(l=n?a.x+a.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(s=n?a.y+a.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var d=n?(a.width+a.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),r=this.getAttribute("fr").getPixels();return e.createRadialGradient(l,s,r,i,o,d)}}]),t}(Nd),Bd=function(e){function t(e,n,a){var r;Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="stop";var i=fe(0,me(1,r.getAttribute("offset").getNumber())),o=r.getStyle("stop-opacity"),l=r.getStyle("stop-color",!0);return""===l.getString()&&l.setValue("#000"),o.hasValue()&&(l=l.addOpacity(o)),r.offset=i,r.color=l.getString(),r}return ql(t,e),t}(Ls),_d="Array Iterator",Fd=Ct.set,jd=Ct.getterFor(_d),Gd=Es(Array,"Array",function(e,t){Fd(this,{type:_d,target:_e(e),index:0,kind:t})},function(){var e=jd(this),t=e.target,n=e.kind,a=e.index++;return!t||a>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:a,done:!1}:"values"==n?{value:t[a],done:!1}:{value:[a,t[a]],done:!1}},"values");ui.Arguments=ui.Array,Zl("keys"),Zl("values"),Zl("entries");var Hd=cn("iterator"),Yd=cn("toStringTag"),$d=Gd.values;for(var Ud in Tr){var Wd=Te[Ud],qd=Wd&&Wd.prototype;if(qd){if(qd[Hd]!==$d)try{tt(qd,Hd,$d)}catch(e){qd[Hd]=$d}if(qd[Yd]||tt(qd,Yd,Ud),Tr[Ud])for(var Xd in Gd)if(qd[Xd]!==Gd[Xd])try{tt(qd,Xd,Gd[Xd])}catch(e){qd[Xd]=Gd[Xd]}}}var Qd=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="animate",r.duration=0,r.initialValue=null,r.initialUnits="",r.removed=!1,r.frozen=!1,e.screen.animations.push(Yl(r)),r.begin=r.getAttribute("begin").getMilliseconds(),r.maxDuration=r.begin+r.getAttribute("dur").getMilliseconds(),r.from=r.getAttribute("from"),r.to=r.getAttribute("to"),r.values=r.getAttribute("values"),r.values.hasValue()&&r.values.setValue(r.values.getString().split(";")),r}return ql(t,e),Nr(t,[{key:"getProperty",value:function(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return"CSS"===e?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}},{key:"calcValue",value:function(){var e=this.initialUnits,t=this.getProgress(),n=t.progress,a=t.from,r=t.to,i=a.getNumber()+(r.getNumber()-a.getNumber())*n;return"%"===e&&(i*=100),"".concat(i).concat(e)}},{key:"update",value:function(e){var t=this.parent,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var a=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"===a&&!this.frozen)this.frozen=!0,t.animationFrozen=!0,t.animationFrozenValue=n.getString();else if("remove"===a&&!this.removed)return this.removed=!0,n.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var r=!1;if(this.begin<this.duration){var i=this.calcValue(),o=this.getAttribute("type");if(o.hasValue()){var l=o.getString();i="".concat(l,"(").concat(i,")")}n.setValue(i),r=!0}return r}},{key:"getProgress",value:function(){var e=this.document,t=this.values,n={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(t.hasValue()){var a=n.progress*(t.getValue().length-1),r=ke(a),i=xe(a);n.from=new Il(e,"from",parseFloat(t.getValue()[r])),n.to=new Il(e,"to",parseFloat(t.getValue()[i])),n.progress=(a-r)/(i-r)}else n.from=this.from,n.to=this.to;return n}}]),t}(Ls),Kd=Dn.trim,Zd=Te.parseInt,Jd=/^[+-]?0[Xx]/,eu=8!==Zd("\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF08")||22!==Zd("\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF0x16"),tu=eu?function(e,t){var n=Kd(e+"");return Zd(n,t>>>0||(Jd.test(n)?16:10))}:Zd;tn({global:!0,forced:parseInt!=tu},{parseInt:tu});var nu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="animateColor",e}return ql(t,e),Nr(t,[{key:"calcValue",value:function(){var e=this.getProgress(),t=e.progress,n=e.from,a=e.to,i=new Rl(n.getString()),o=new Rl(a.getString());if(i.ok&&o.ok){var l=i.r+(o.r-i.r)*t,r=i.g+(o.g-i.g)*t,s=i.b+(o.b-i.b)*t;return"rgb(".concat(parseInt(l,10),", ").concat(parseInt(r,10),", ").concat(parseInt(s,10),")")}return this.getAttribute("from").getString()}}]),t}(Qd),au=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="animateTransform",e}return ql(t,e),Nr(t,[{key:"calcValue",value:function(){var e=this.getProgress(),t=e.progress,n=e.from,a=e.to,r=o(n.getString()),l=o(a.getString()),s=r.map(function(e,n){var a=l[n];return e+(a-e)*t}).join(" ");return s}}]),t}(Qd),ru=et.f,iu=Te.Symbol;if(we&&"function"==typeof iu&&(!("description"in iu.prototype)||void 0!==iu().description)){var ou={},lu=function(){var e=1>arguments.length||void 0===arguments[0]?void 0:arguments[0]+"",t=this instanceof lu?new iu(e):void 0===e?iu():iu(e);return""===e&&(ou[t]=!0),t};Ut(lu,iu);var su=lu.prototype=iu.prototype;su.constructor=lu;var du=su.toString,uu="Symbol(test)"==iu("test")+"",gu=/^Symbol\((.*)\)[^)]+$/;ru(su,"description",{configurable:!0,get:function(){var e=Fe(this)?this.valueOf():this,t=du.call(e);if(He(ou,e))return"";var n=uu?t.slice(7,-1):t.replace(gu,"$1");return""===n?void 0:n}}),tn({global:!0,forced:!0},{Symbol:lu})}Ma("iterator");var cu=function(e){function t(e,n,a){var r;Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="font",r.glyphs={},r.horizAdvX=r.getAttribute("horiz-adv-x").getNumber();var i=e.definitions,o=Yl(r),l=o.children,s=!0,d=!1,u=void 0;try{for(var g=l[Symbol.iterator](),c,p;!(s=(c=g.next()).done);s=!0)switch(p=c.value,p.type){case"font-face":{r.fontFace=p;var y=p.getStyle("font-family");y.hasValue()&&(i[y.getString()]=Yl(r));break}case"missing-glyph":r.missingGlyph=p;break;case"glyph":{var h=p;h.arabicForm?(r.isRTL=!0,r.isArabic=!0,"undefined"==typeof r.glyphs[h.unicode]&&(r.glyphs[h.unicode]={}),r.glyphs[h.unicode][h.arabicForm]=h):r.glyphs[h.unicode]=h;break}default:}}catch(e){d=!0,u=e}finally{try{s||null==g.return||g.return()}finally{if(d)throw u}}return r}return ql(t,e),Nr(t,[{key:"render",value:function(){}}]),t}(Ls),pu=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="font-face",r.ascent=r.getAttribute("ascent").getNumber(),r.descent=r.getAttribute("descent").getNumber(),r.unitsPerEm=r.getAttribute("units-per-em").getNumber(),r}return ql(t,e),t}(Ls),yu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="missing-glyph",e.horizAdvX=0,e}return ql(t,e),t}(Sd),hu=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="glyph",r.horizAdvX=r.getAttribute("horiz-adv-x").getNumber(),r.unicode=r.getAttribute("unicode").getString(),r.arabicForm=r.getAttribute("arabic-form").getString(),r}return ql(t,e),t}(Sd),fu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="tref",e}return ql(t,e),Nr(t,[{key:"getText",value:function(){var e=this.getHrefAttribute().getDefinition();if(e){var t=e.children[0];if(t)return t.getText()}return""}}]),t}(xd),mu=function(e){function t(e,n,a){var r;Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="a";var i=n.childNodes,o=i[0],l=0<i.length&&Array.from(i).every(function(e){return 3===e.nodeType});return r.hasText=l,r.text=l?r.getTextFromNode(o):"",r}return ql(t,e),Nr(t,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(e){if(this.hasText){Fs(Ul(t.prototype),"renderChildren",this).call(this,e);var n=this.document,a=this.x,r=this.y,i=n.screen.mouse,o=new Il(n,"fontSize",js.parse(n.ctx.font).fontSize);i.isWorking()&&i.checkBoundingBox(this,new nd(a,r-o.getPixels("y"),a+this.measureText(e),r))}else if(0<this.children.length){var l=new Dd(this.document,null);l.children=this.children,l.parent=this,l.render(e)}}},{key:"onClick",value:function(){var e=this.document.window;e&&e.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}]),t}(xd),xu=!Ce(function(){return Object.isExtensible(Object.preventExtensions({}))}),bu=t(function(e){var t=et.f,n=pt("meta"),a=0,r=Object.isExtensible||function(){return!0},i=function(e){t(e,n,{value:{objectID:"O"+ ++a,weakData:{}}})},o=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!Fe(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!He(e,n)){if(!r(e))return"F";if(!t)return"E";i(e)}return e[n].objectID},getWeakData:function(e,t){if(!He(e,n)){if(!r(e))return!0;if(!t)return!1;i(e)}return e[n].weakData},onFreeze:function(e){return xu&&o.REQUIRED&&r(e)&&!He(e,n)&&i(e),e}};ft[n]=!0}),vu=bu.REQUIRED,ku=bu.fastKey,Su=bu.getWeakData,Pu=bu.onFreeze,Au=et.f,Eu=bu.fastKey,Tu=Ct.set,Cu=Ct.getterFor,wu=function(e,t,n){var a=-1!==e.indexOf("Map"),r=-1!==e.indexOf("Weak"),i=a?"set":"add",o=Te[e],l=o&&o.prototype,s=o,d={},u=function(e){var t=l[e];wt(l,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return(!r||Fe(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return r&&!Fe(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return(!r||Fe(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(Jt(e,"function"!=typeof o||!(r||l.forEach&&!Ce(function(){new o().entries().next()}))))s=n.getConstructor(t,e,a,i),bu.REQUIRED=!0;else if(Jt(e,!0)){var g=new s,c=g[i](r?{}:-0,1)!=g,p=Ce(function(){g.has(1)}),y=Si(function(e){new o(e)}),h=!r&&Ce(function(){for(var e=new o,t=5;t--;)e[i](t,t);return!e.has(-0)});y||(s=t(function(t,n){di(t,s,e);var r=Gs(new o,t,s);return null!=n&&mi(n,r[i],r,a),r}),s.prototype=l,l.constructor=s),(p||h)&&(u("delete"),u("has"),a&&u("get")),(h||c)&&u(i),r&&l.clear&&delete l.clear}return d[e]=s,tn({global:!0,forced:s!=o},d),_a(s,e),r||n.setStrong(s,e,a),s}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,t,n,a){var r=e(function(e,i){di(e,r,t),Tu(e,{type:t,index:wa(null),first:void 0,last:void 0,size:0}),we||(e.size=0),null!=i&&mi(i,e[a],e,n)}),i=Cu(t),o=function(e,t,n){var a=i(e),r=l(e,t),o,s;return r?r.value=n:(a.last=r={index:s=Eu(t,!0),key:t,value:n,previous:o=a.last,next:void 0,removed:!1},!a.first&&(a.first=r),o&&(o.next=r),we?a.size++:e.size++,"F"!==s&&(a.index[s]=r)),e},l=function(e,t){var n=i(e),a=Eu(t),r;if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return oi(r.prototype,{clear:function(){for(var e=this,t=i(e),n=t.index,a=t.first;a;)a.removed=!0,a.previous&&(a.previous=a.previous.next=void 0),delete n[a.index],a=a.next;t.first=t.last=void 0,we?t.size=0:e.size=0},delete:function(e){var t=this,n=i(t),a=l(t,e);if(a){var r=a.next,o=a.previous;delete n.index[a.index],a.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==a&&(n.first=r),n.last==a&&(n.last=o),we?n.size--:t.size--}return!!a},forEach:function(e){for(var t=i(this),n=an(e,1<arguments.length?arguments[1]:void 0,3),a;a=a?a.next:t.first;)for(n(a.value,a.key,this);a&&a.removed;)a=a.previous},has:function(e){return!!l(this,e)}}),oi(r.prototype,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),we&&Au(r.prototype,"size",{get:function(){return i(this).size}}),r},setStrong:function(e,t,n){var a=t+" Iterator",r=Cu(t),i=Cu(a);Es(e,t,function(e,t){Tu(this,{type:a,target:e,state:r(e),kind:t,last:void 0})},function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),si(t)}}),Ou=function(e){function t(e,n,a){var r;Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="textPath",r.textWidth=0,r.textHeight=0,r.pathLength=-1,r.glyphInfo=null,r.letterSpacingCache=[],r.measuresCache=new Map([["",0]]);var i=r.getHrefAttribute().getDefinition();return r.text=r.getTextFromNode(),r.dataArray=r.parsePathData(i),r}return ql(t,e),Nr(t,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(e){var t=this.dataArray;e&&e.beginPath(),t.forEach(function(t){var n=t.command,a=t.points;switch(n){case"L":e&&e.lineTo(a[0],a[1]);break;case"M":e&&e.moveTo(a[0],a[1]);break;case"C":e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":{var i=a[0],o=a[1],l=a[2],s=a[3],d=a[4],u=a[5],g=a[6],c=a[7],p=l>s?l:s,r=l>s?1:l/s,y=l>s?s/l:1;e&&(e.translate(i,o),e.rotate(g),e.scale(r,y),e.arc(0,0,p,d,d+u,!!(1-c)),e.scale(1/r,1/y),e.rotate(-g),e.translate(-i,-o));break}case"z":e&&e.closePath();}})}},{key:"renderChildren",value:function(e){this.setTextData(e),e.save();var t=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),a=this.glyphInfo,r=e.fillStyle;"underline"===t&&e.beginPath(),a.forEach(function(r,o){var i=r.p0,l=r.p1,s=r.text;e.save(),e.translate(i.x,i.y),e.rotate(a[o].rotation),e.fillStyle&&e.fillText(s,0,0),e.strokeStyle&&e.strokeText(s,0,0),e.restore(),"underline"===t&&(0===o&&e.moveTo(i.x,i.y+n/8),e.lineTo(l.x,l.y+n/5))}),"underline"===t&&(e.lineWidth=n/20,e.strokeStyle=r,e.stroke(),e.closePath()),e.restore()}},{key:"getLetterSpacingAt",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[e]||0}},{key:"findSegmentToFitChar",value:function(e,t,n,a,r,i,o,l){var s=i,d=this.measureText(e,o);" "===o&&"justify"===t&&n<a&&(d+=(a-n)/r),-1<l&&(s+=this.getLetterSpacingAt(l));var u=this.textHeight/20,g={p0:this.getEquidistantPointOnPath(s,u),p1:this.getEquidistantPointOnPath(s+d,u)};return s+=d,{offset:s,segment:g}}},{key:"measureText",value:function(e,t){var n=this.measuresCache,a=t||this.getText();if(n.has(a))return n.get(a);var r=this.measureTargetText(e,a);return n.set(a,r),r}},{key:"setTextData",value:function(e){var t=this;if(!this.glyphInfo){var n=this.getText(),a=n.split(""),r=n.split(" ").length-1,l=o(this.parent.getAttribute("dx").getString("0")),s=this.parent.getStyle("text-anchor").getString("start"),d=this.getStyle("letter-spacing"),u=this.parent.getStyle("letter-spacing"),g=0;d.hasValue()&&"inherit"!==d.getValue()?d.hasValue()&&"initial"!==d.getValue()&&"unset"!==d.getValue()&&(g=d.getPixels()):g=u.getPixels();var c=[],p=n.length;this.letterSpacingCache=c;for(var y=0;y<p;y++)c.push("undefined"==typeof l[y]?g:l[y]);var h=c.reduce(function(e,t){return e+t||0},0);this.textWidth=this.measureText(e),this.textHeight=this.getFontSize();var f=fe(this.textWidth+h,0);this.glyphInfo=[];var m=this.getPathLength(),x=this.getStyle("startOffset").getNumber(0)*m,b=0;("middle"===s||"center"===s)&&(b=-f/2),("end"===s||"right"===s)&&(b=-f),b+=x,a.forEach(function(n,o){var i=t.findSegmentToFitChar(e,s,f,m,r,b,n,o),l=i.offset,d=i.segment;if(b=l,d.p0&&d.p1){var u=t.getLineLength(d.p0.x,d.p0.y,d.p1.x,d.p1.y),g=t.getPointOnLine(0+u/2,d.p0.x,d.p0.y,d.p1.x,d.p1.y),c=ce(d.p1.y-d.p0.y,d.p1.x-d.p0.x);t.glyphInfo.push({transposeX:g.x,transposeY:g.y,text:a[o],p0:d.p0,p1:d.p1,rotation:c})}})}}},{key:"parsePathData",value:function(e){if(this.pathLength=-1,!e)return[];var t=[],n=e.pathParser;for(n.reset();!n.isEnd();){var a=n.current,r=a?a.x:0,i=a?a.y:0,o="",l=[];n.nextCommand();var s=n.command.toUpperCase();switch(n.command){case"M":case"m":o=this.pathM(n,l);break;case"L":case"l":o=this.pathL(n,l);break;case"H":case"h":o=this.pathH(n,l);break;case"V":case"v":o=this.pathV(n,l);break;case"C":case"c":this.pathC(n,l);break;case"S":case"s":o=this.pathS(n,l);break;case"Q":case"q":this.pathQ(n,l);break;case"T":case"t":o=this.pathT(n,l);break;case"A":case"a":l=this.pathA(n);break;case"Z":case"z":n.current=n.start;}"Z"===s?t.push({command:"z",points:[],pathLength:0}):t.push({command:o||s,points:l,start:{x:r,y:i},pathLength:this.calcLength(r,i,o||s,l)})}return t}},{key:"pathM",value:function(e,t){var n=e.getAsCurrentPoint();for(t.push(n.x,n.y),e.start=e.current;!e.isCommandOrEnd();){var a=e.getAsCurrentPoint();return t.push(a.x,a.y),"L"}}},{key:"pathL",value:function(e,t){for(;!e.isCommandOrEnd();){var n=e.getAsCurrentPoint();t.push(n.x,n.y)}return"L"}},{key:"pathH",value:function(e,t){for(;!e.isCommandOrEnd();){var n=e.current,a=new Nl((e.isRelativeCommand()?n.x:0)+e.getScalar(),n.y);t.push(a.x,a.y),e.current=a}return"L"}},{key:"pathV",value:function(e,t){for(;!e.isCommandOrEnd();){var n=e.current,a=new Nl(n.x,(e.isRelativeCommand()?n.y:0)+e.getScalar());t.push(a.x,a.y),e.current=a}return"L"}},{key:"pathC",value:function(e,t){for(;!e.isCommandOrEnd();){var n=e.getPoint(),a=e.getAsControlPoint(),r=e.getAsCurrentPoint();t.push(n.x,n.y,a.x,a.y,r.x,r.y)}}},{key:"pathS",value:function(e,t){for(;!e.isCommandOrEnd();){var n=e.getReflectedControlPoint(),a=e.getAsControlPoint(),r=e.getAsCurrentPoint();t.push(n.x,n.y,a.x,a.y,r.x,r.y)}return"C"}},{key:"pathQ",value:function(e,t){for(;!e.isCommandOrEnd();){var n=e.getAsControlPoint(),a=e.getAsCurrentPoint();t.push(n.x,n.y,a.x,a.y)}}},{key:"pathT",value:function(e,t){for(;!e.isCommandOrEnd();){var n=e.getReflectedControlPoint();e.control=n;var a=e.getAsCurrentPoint();t.push(n.x,n.y,a.x,a.y)}return"Q"}},{key:"pathA",value:function(e){for(;!e.isCommandOrEnd();){var t=e.current,n=e.getScalar(),a=e.getScalar(),r=e.getScalar()*(pe/180),i=e.getScalar(),o=e.getScalar(),d=e.getAsCurrentPoint(),g=new Nl(ve(r)*(t.x-d.x)/2+be(r)*(t.y-d.y)/2,-be(r)*(t.x-d.x)/2+ve(r)*(t.y-d.y)/2),c=Pe(g.x,2)/Pe(n,2)+Pe(g.y,2)/Pe(a,2);1<c&&(n*=Se(c),a*=Se(c));var l=(i===o?-1:1)*Se((Pe(n,2)*Pe(a,2)-Pe(n,2)*Pe(g.y,2)-Pe(a,2)*Pe(g.x,2))/(Pe(n,2)*Pe(g.y,2)+Pe(a,2)*Pe(g.x,2)));isNaN(l)&&(l=0);var p=new Nl(l*n*g.y/a,l*-a*g.x/n),y=new Nl((t.x+d.x)/2+ve(r)*p.x-be(r)*p.y,(t.y+d.y)/2+be(r)*p.x+ve(r)*p.y),f=x([1,0],[(g.x-p.x)/n,(g.y-p.y)/a]),m=[(g.x-p.x)/n,(g.y-p.y)/a],u=[(-g.x-p.x)/n,(-g.y-p.y)/a],b=x(m,u);return-1>=h(m,u)&&(b=pe),1<=h(m,u)&&(b=0),0===o&&0<b&&(b-=2*pe),1===o&&0>b&&(b+=2*pe),[y.x,y.y,n,a,f,b,r,o]}}},{key:"calcLength",value:function(e,n,a,r){var i=Math.abs,o=0,l=null,s=null,d=0;switch(a){case"L":return this.getLineLength(e,n,r[0],r[1]);case"C":for(o=0,l=this.getPointOnCubicBezier(0,e,n,r[0],r[1],r[2],r[3],r[4],r[5]),d=.01;1>=d;d+=.01)s=this.getPointOnCubicBezier(d,e,n,r[0],r[1],r[2],r[3],r[4],r[5]),o+=this.getLineLength(l.x,l.y,s.x,s.y),l=s;return o;case"Q":for(o=0,l=this.getPointOnQuadraticBezier(0,e,n,r[0],r[1],r[2],r[3]),d=.01;1>=d;d+=.01)s=this.getPointOnQuadraticBezier(d,e,n,r[0],r[1],r[2],r[3]),o+=this.getLineLength(l.x,l.y,s.x,s.y),l=s;return o;case"A":o=0;var u=r[4],g=r[5],c=r[4]+g,p=pe/180;if(i(u-c)<p&&(p=i(u-c)),l=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),0>g)for(d=u-p;d>c;d-=p)s=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),o+=this.getLineLength(l.x,l.y,s.x,s.y),l=s;else for(d=u+p;d<c;d+=p)s=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),o+=this.getLineLength(l.x,l.y,s.x,s.y),l=s;return s=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),o+=this.getLineLength(l.x,l.y,s.x,s.y),o;}return 0}},{key:"getPointOnLine",value:function(e,t,n,a,r){var i=5<arguments.length&&void 0!==arguments[5]?arguments[5]:t,o=6<arguments.length&&void 0!==arguments[6]?arguments[6]:n,l=(r-n)/(a-t+va),s=Se(e*e/(1+l*l));a<t&&(s*=-1);var d=l*s,g=null;if(a===t)g={x:i,y:o+d};else if((o-n)/(i-t+va)===l)g={x:i+s,y:o+d};else{var c=0,p=0,y=this.getLineLength(t,n,a,r);if(y<va)return null;var h=(i-t)*(a-t)+(o-n)*(r-n);h/=y*y,c=t+h*(a-t),p=n+h*(r-n);var f=this.getLineLength(i,o,c,p),m=Se(e*e-f*f);s=Se(m*m/(1+l*l)),a<t&&(s*=-1),d=l*s,g={x:c+s,y:p+d}}return g}},{key:"getPointOnPath",value:function(e){var t=this.getPathLength(),n=0,a=null;if(-5e-5>e||e-5e-5>t)return null;var r=this.dataArray,i=!0,o=!1,l=void 0;try{for(var s=r[Symbol.iterator](),d,u;!(i=(d=s.next()).done);i=!0){if(u=d.value,u&&(5e-5>u.pathLength||n+u.pathLength+5e-5<e)){n+=u.pathLength;continue}var g=e-n,c=0;switch(u.command){case"L":a=this.getPointOnLine(g,u.start.x,u.start.y,u.points[0],u.points[1],u.start.x,u.start.y);break;case"A":var y=u.points[4],h=u.points[5],f=u.points[4]+h;if(c=y+g/u.pathLength*h,0>h&&c<f||0<=h&&c>f)break;a=this.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],c,u.points[6]);break;case"C":c=g/u.pathLength,1<c&&(c=1),a=this.getPointOnCubicBezier(c,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);break;case"Q":c=g/u.pathLength,1<c&&(c=1),a=this.getPointOnQuadraticBezier(c,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3]);break;default:}if(a)return a;break}}catch(e){o=!0,l=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw l}}return null}},{key:"getLineLength",value:function(e,t,n,a){return Se((n-e)*(n-e)+(a-t)*(a-t))}},{key:"getPathLength",value:function(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(function(e,t){return 0<t.pathLength?e+t.pathLength:e},0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(e,t,n,a,r,i,o,l,s){var d=l*b(e)+i*v(e)+a*k(e)+t*S(e),u=s*b(e)+o*v(e)+r*k(e)+n*S(e);return{x:d,y:u}}},{key:"getPointOnQuadraticBezier",value:function(e,t,n,a,r,i,o){var l=i*P(e)+a*A(e)+t*E(e),s=o*P(e)+r*A(e)+n*E(e);return{x:l,y:s}}},{key:"getPointOnEllipticalArc",value:function(e,t,n,a,r,i){var o=ve(i),l=be(i),s={x:n*ve(r),y:a*be(r)};return{x:e+(s.x*o-s.y*l),y:t+(s.x*l+s.y*o)}}},{key:"buildEquidistantCache",value:function(e,t){var n=this.getPathLength(),a=t||.25,r=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==r||this.equidistantCache.precision!==a){this.equidistantCache={step:r,precision:a,points:[]};for(var i=0,o=0;o<=n;o+=a){var d=this.getPointOnPath(o),u=this.getPointOnPath(o+a);d&&u&&(i+=this.getLineLength(d.x,d.y,u.x,u.y),i>=r&&(this.equidistantCache.points.push({x:d.x,y:d.y,distance:o}),i-=r))}}}},{key:"getEquidistantPointOnPath",value:function(e,t,n){if(this.buildEquidistantCache(t,n),0>e||5e-5<e-this.getPathLength())return null;var a=ye(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[a]||null}}]),t}(xd),Vu=function(e){function t(e,n,a){var r;Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="image",r.loaded=!1;var i=r.getHrefAttribute().getString();if(!i)return $l(r);var o=/\.svg$/.test(i);return e.images.push(Yl(r)),o?r.loadSvg(i):r.loadImage(i),r.isSvg=o,r}return ql(t,e),Nr(t,[{key:"loadImage",value:function(){var e=Rr(Lr.mark(function e(t){var n;return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.document.createImage(t);case 3:n=e.sent,this.image=n,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),console.error("ERROR: image \"".concat(t,"\" not found"),e.t0);case 10:this.loaded=!0;case 11:case"end":return e.stop();}},e,this,[[0,7]])}));return function(){return e.apply(this,arguments)}}()},{key:"loadSvg",value:function(){var e=Rr(Lr.mark(function e(t){var n,a;return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.document.fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:a=e.sent,this.image=a,e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),console.error("ERROR: image \"".concat(t,"\" not found"),e.t0);case 13:this.loaded=!0;case 14:case"end":return e.stop();}},e,this,[[0,10]])}));return function(){return e.apply(this,arguments)}}()},{key:"renderChildren",value:function(e){var t=this.document,n=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),r=this.getAttribute("width").getPixels("x"),i=this.getAttribute("height").getPixels("y");if(r&&i){if(e.save(),this.isSvg)t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:n,offsetY:a,scaleWidth:r,scaleHeight:i}).render();else{var o=this.image;e.translate(n,a),t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r,desiredWidth:o.width,height:i,desiredHeight:o.height}),this.loaded&&("undefined"==typeof o.complete||o.complete)&&e.drawImage(o,0,0)}e.restore()}}},{key:"getBoundingBox",value:function(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),n=this.getAttribute("width").getPixels("x"),a=this.getAttribute("height").getPixels("y");return new nd(e,t,e+n,t+a)}}]),t}(md),Lu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="symbol",e}return ql(t,e),Nr(t,[{key:"render",value:function(){}}]),t}(md),Ru=function(){function e(t){Dr(this,e),this.document=t,this.loaded=!1,t.fonts.push(this)}return Nr(e,[{key:"load",value:function(){var e=Rr(Lr.mark(function e(t,n){var a,r,i;return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a=this.document,e.next=4,a.canvg.parser.load(n);case 4:r=e.sent,i=r.getElementsByTagName("font"),Array.from(i).forEach(function(e){var n=a.createElement(e);a.definitions[t]=n}),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),console.error("ERROR: font \"".concat(n,"\" not found"),e.t0);case 12:this.loaded=!0;case 13:case"end":return e.stop();}},e,this,[[0,9]])}));return function(){return e.apply(this,arguments)}}()}]),e}(),Iu=function(e){function t(e,a,r){var i;Dr(this,t),i=$l(this,Ul(t).call(this,e,a,r)),i.type="style";var o=n(Array.from(a.childNodes).map(function(e){return e.data}).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"")),l=o.split("}");return l.forEach(function(t){var n=t.trim();if(n){var a=n.split("{"),r=a[0].split(","),i=a[1].split(";");r.forEach(function(t){var n=t.trim();if(n){var a=e.styles[n]||{};if(i.forEach(function(t){var n=t.indexOf(":"),r=t.substr(0,n).trim(),i=t.substr(n+1,t.length-n).trim();r&&i&&(a[r]=new Il(e,r,i))}),e.styles[n]=a,e.stylesSpecificity[n]=p(n),"@font-face"===n){var r=a["font-family"].getString().replace(/"|'/g,""),o=a.src.getString().split(",");o.forEach(function(t){if(0<t.indexOf("format(\"svg\")")){var n=s(t);n&&new Ru(e).load(r,n)}})}}})}}),i}return ql(t,e),t}(Ls);Iu.parseExternalUrl=s;var Du=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="use",e}return ql(t,e),Nr(t,[{key:"setContext",value:function(e){Fs(Ul(t.prototype),"setContext",this).call(this,e);var n=this.getAttribute("x"),a=this.getAttribute("y");n.hasValue()&&e.translate(n.getPixels("x"),0),a.hasValue()&&e.translate(0,a.getPixels("y"))}},{key:"path",value:function(e){var t=this.element;t&&t.path(e)}},{key:"renderChildren",value:function(e){var t=this.document,n=this.element;if(n){var a=n;if("symbol"===n.type&&(a=new Pd(t,null),a.attributes.viewBox=new Il(t,"viewBox",n.getAttribute("viewBox").getString()),a.attributes.preserveAspectRatio=new Il(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),a.attributes.overflow=new Il(t,"overflow",n.getAttribute("overflow").getString()),a.children=n.children),"svg"===a.type){var r=this.getAttribute("width"),i=this.getAttribute("height");r.hasValue()&&(a.attributes.width=new Il(t,"width",this.getAttribute("width").getString())),i.hasValue()&&(a.attributes.height=new Il(t,"height",i.getString()))}var o=a.parent;a.parent=null,a.render(e),a.parent=o}}},{key:"getBoundingBox",value:function(e){var t=this.element;return t?t.getBoundingBox(e):null}},{key:"elementTransform",value:function(){var e=this.document,t=this.element;return fd.fromElement(e,t)}},{key:"element",get:function(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),t}(md),Nu=function(e){function t(e,n,r){var i;Dr(this,t),i=$l(this,Ul(t).call(this,e,n,r)),i.type="feColorMatrix";var l=o(i.getAttribute("values").getString());switch(i.getAttribute("type").getString("matrix")){case"saturate":{var d=l[0];l=[.213+.787*d,.715-.715*d,.072-.072*d,0,0,.213-.213*d,.715+.285*d,.072-.072*d,0,0,.213-.213*d,.715-.715*d,.072+.928*d,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var s=l[0]*pe/180;l=[m(s,.213,.787,-.213),m(s,.715,-.715,-.715),m(s,.072,-.072,.928),0,0,m(s,.213,-.213,.143),m(s,.715,.285,.14),m(s,.072,-.072,-.283),0,0,m(s,.213,-.213,-.787),m(s,.715,-.715,.715),m(s,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":l=[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];}return i.matrix=l,i.includeOpacity=i.getAttribute("includeOpacity").hasValue(),i}return ql(t,e),Nr(t,[{key:"apply",value:function(e,t,n,i,o){for(var l=this.includeOpacity,s=this.matrix,d=e.getImageData(0,0,i,o),u=0;u<o;u++)for(var c=0;c<i;c++){var p=Z(d.data,c,u,i,o,0),r=Z(d.data,c,u,i,o,1),g=Z(d.data,c,u,i,o,2),h=Z(d.data,c,u,i,o,3),a=ee(s,0,p)+ee(s,1,r)+ee(s,2,g)+ee(s,3,h)+ee(s,4,1),f=ee(s,5,p)+ee(s,6,r)+ee(s,7,g)+ee(s,8,h)+ee(s,9,1),m=ee(s,10,p)+ee(s,11,r)+ee(s,12,g)+ee(s,13,h)+ee(s,14,1),b=ee(s,15,p)+ee(s,16,r)+ee(s,17,g)+ee(s,18,h)+ee(s,19,1);l&&(a=f=m=0,b*=h/255),J(d.data,c,u,i,o,0,a),J(d.data,c,u,i,o,1,f),J(d.data,c,u,i,o,2,m),J(d.data,c,u,i,o,3,b)}e.clearRect(0,0,i,o),e.putImageData(d,0,0)}}]),t}(Ls),Mu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="mask",e}return ql(t,e),Nr(t,[{key:"apply",value:function(e,t){var n=this.document,a=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getAttribute("width").getPixels("x"),o=this.getAttribute("height").getPixels("y");if(!i&&!o){var l=new nd;this.children.forEach(function(t){l.addBoundingBox(t.getBoundingBox(e))}),a=ke(l.x1),r=ke(l.y1),i=ke(l.width),o=ke(l.height)}var s=t.getStyle("mask").getString();t.getStyle("mask").setValue("");var d=n.createCanvas(a+i,r+o),u=d.getContext("2d");n.screen.setDefaults(u),this.renderChildren(u);var g=new Nu(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]});g.apply(u,0,0,a+i,r+o);var p=n.createCanvas(a+i,r+o),c=p.getContext("2d");n.screen.setDefaults(c),t.render(c),c.globalCompositeOperation="destination-in",c.fillStyle=u.createPattern(d,"no-repeat"),c.fillRect(0,0,a+i,r+o),e.fillStyle=c.createPattern(p,"no-repeat"),e.fillRect(0,0,a+i,r+o),t.getStyle("mask").setValue(s)}},{key:"render",value:function(){}}]),t}(Ls),zu=Lt("Reflect","apply"),Bu=Function.apply,_u=!Ce(function(){zu(function(){})});tn({target:"Reflect",stat:!0,forced:_u},{apply:function(e,t,n){return nn(e),Ke(n),zu?zu(e,t,n):Bu.call(e,t,n)}}),tn({target:"Reflect",stat:!0,sham:!as},{getPrototypeOf:function(e){return os(Ke(e))}});var Fu=function(){},ju=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="clipPath",e}return ql(t,e),Nr(t,[{key:"apply",value:function(e){var t=this.document,n=Reflect.getPrototypeOf(e),a=e.beginPath,r=e.closePath;n&&(n.beginPath=Fu,n.closePath=Fu),Reflect.apply(a,e,[]),this.children.forEach(function(a){if("undefined"!=typeof a.path){var i="undefined"==typeof a.elementTransform?null:a.elementTransform();i||(i=fd.fromElement(t,a)),i&&i.apply(e),a.path(e),n&&(n.closePath=r),i&&i.unapply(e)}}),Reflect.apply(r,e,[]),e.clip(),n&&(n.beginPath=a,n.closePath=r)}},{key:"render",value:function(){}}]),t}(Ls),Gu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="filter",e}return ql(t,e),Nr(t,[{key:"apply",value:function(e,t){var n=this.document,a=t.getBoundingBox(e);if(a){var r=ke(a.x1),i=ke(a.y1),o=ke(a.width),l=ke(a.height),s=t.getStyle("filter").getString();t.getStyle("filter").setValue("");var d=0,u=0;this.children.forEach(function(e){var t=e.extraFilterDistance||0;d=fe(d,t),u=fe(u,t)});var g=n.createCanvas(o+2*d,l+2*u),c=g.getContext("2d");n.screen.setDefaults(c),c.translate(-r+d,-i+u),t.render(c),this.children.forEach(function(e){"function"==typeof e.apply&&e.apply(c,0,0,o+2*d,l+2*u)}),e.drawImage(g,0,0,o+2*d,l+2*u,r-d,i-u,o+2*d,l+2*u),t.getStyle("filter",!0).setValue(s)}}},{key:"render",value:function(){}}]),t}(Ls),Hu=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="feDropShadow",r.addStylesFromStyleDefinition(),r}return ql(t,e),Nr(t,[{key:"apply",value:function(){}}]),t}(Ls),Yu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="feMorphology",e}return ql(t,e),Nr(t,[{key:"apply",value:function(){}}]),t}(Ls),$u=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="feComposite",e}return ql(t,e),Nr(t,[{key:"apply",value:function(){}}]),t}(Ls),Uu=[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],Wu=[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],qu=function e(){te(this,e),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},Xu=function(e){function t(e,n,a){var r;return Dr(this,t),r=$l(this,Ul(t).call(this,e,n,a)),r.type="feGaussianBlur",r.blurRadius=ke(r.getAttribute("stdDeviation").getNumber()),r.extraFilterDistance=r.blurRadius,r}return ql(t,e),Nr(t,[{key:"apply",value:function(e,t,n,a,r){var i=this.document,o=this.blurRadius,l=i.window?i.window.document.body:null,s=e.canvas;s.id=i.getUniqueId(),l&&(s.style.display="none",l.appendChild(s)),ae(s,t,n,a,r,o),l&&l.removeChild(s)}}]),t}(Ls),Qu=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="title",e}return ql(t,e),t}(Ls),Ku=function(e){function t(){var e;return Dr(this,t),e=$l(this,Ul(t).apply(this,arguments)),e.type="desc",e}return ql(t,e),t}(Ls),Zu=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=n.rootEmSize,r=void 0===a?12:a,i=n.emSize,o=void 0===i?12:i,l=n.createCanvas,s=void 0===l?e.createCanvas:l,d=n.createImage,u=void 0===d?e.createImage:d;Dr(this,e),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=o,this.createCanvas=s,this.createImage=u,this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return Nr(e,[{key:"popEmSize",value:function(){var e=this.emSizeStack;e.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){return this.images.every(function(e){return e.loaded})}},{key:"isFontsLoaded",value:function(){return this.fonts.every(function(e){return e.loaded})}},{key:"createDocumentElement",value:function(e){var t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}},{key:"createElement",value:function(t){var n=t.nodeName.replace(/^[^:]+:/,""),a=e.elementTypes[n];return"undefined"==typeof a?new Rs(this,t):new a(this,t)}},{key:"createTextNode",value:function(e){return new vd(this,e)}},{key:"setViewBox",value:function(e){this.screen.setViewBox(oe({document:this},e))}},{key:"window",get:function(){return this.screen.window}},{key:"fetch",get:function(){return this.screen.fetch}},{key:"ctx",get:function(){return this.screen.ctx}},{key:"emSize",get:function(){var e=this.emSizeStack;return e[e.length-1]},set:function(e){var t=this.emSizeStack;t.push(e)}}]),e}();Zu.createCanvas=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},Zu.createImage=le,Zu.elementTypes={svg:Pd,rect:Ad,circle:Ed,ellipse:Td,line:Cd,polyline:wd,polygon:Od,path:Sd,pattern:Ld,marker:Rd,defs:Id,linearGradient:Md,radialGradient:zd,stop:Bd,animate:Qd,animateColor:nu,animateTransform:au,font:cu,"font-face":pu,"missing-glyph":yu,glyph:hu,text:xd,tspan:bd,tref:fu,a:mu,textPath:Ou,image:Vu,g:Dd,symbol:Lu,style:Iu,use:Du,mask:Mu,clipPath:ju,filter:Gu,feDropShadow:Hu,feMorphology:Yu,feComposite:$u,feColorMatrix:Nu,feGaussianBlur:Xu,title:Qu,desc:Ku};var Ju=function(){function e(t,n){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};Dr(this,e),this.parser=new Gl(a),this.screen=new _l(t,a),this.options=a;var r=new Zu(this,a),i=r.createDocumentElement(n);this.document=r,this.documentElement=i}return Nr(e,[{key:"fork",value:function(t,n){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return e.from(t,n,ue({},this.options,{},a))}},{key:"forkString",value:function(t,n){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return e.fromString(t,n,ue({},this.options,{},a))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:function(){var e=Rr(Lr.mark(function e(){var t=arguments,n;return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=0<t.length&&void 0!==t[0]?t[0]:{},this.start(ue({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),e.next=4,this.ready();case 4:this.stop();case 5:case"end":return e.stop();}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"start",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=this.documentElement,n=this.screen,a=this.options;n.start(t,ue({enableRedraw:!0},a,{},e))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];this.documentElement.resize(e,t,n)}}],[{key:"from",value:function(){var t=Rr(Lr.mark(function t(n,a){var r=arguments,i,o,l;return Lr.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=2<r.length&&void 0!==r[2]?r[2]:{},o=new Gl(i),t.next=4,o.parse(a);case 4:return l=t.sent,t.abrupt("return",new e(n,l,i));case 6:case"end":return t.stop();}},t)}));return function(){return t.apply(this,arguments)}}()},{key:"fromString",value:function(t,n){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=new Gl(a),i=r.parseFromString(n);return new e(t,i,a)}}]),e}(),eg=Object.freeze({__proto__:null,offscreen:function(){return{window:null,ignoreAnimation:!0,ignoreMouse:!0,createCanvas:function(e,t){return new OffscreenCanvas(e,t)},createImage:function(){var e=Rr(Lr.mark(function e(t){var n,a,r;return Lr.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return n=e.sent,e.next=5,n.blob();case 5:return a=e.sent,e.next=8,createImageBitmap(a);case 8:return r=e.sent,e.abrupt("return",r);case 10:case"end":return e.stop();}},e)}));return function(){return e.apply(this,arguments)}}()}},node:function(e){var t=e.DOMParser,n=e.canvas,a=e.fetch;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:a,createCanvas:n.createCanvas,createImage:n.loadImage}}});e.AElement=mu,e.AnimateColorElement=nu,e.AnimateElement=Qd,e.AnimateTransformElement=au,e.BoundingBox=nd,e.CB1=b,e.CB2=v,e.CB3=k,e.CB4=S,e.Canvg=Ju,e.CircleElement=Ed,e.ClipPathElement=ju,e.DefsElement=Id,e.DescElement=Ku,e.Document=Zu,e.Element=Ls,e.EllipseElement=Td,e.FeColorMatrixElement=Nu,e.FeCompositeElement=$u,e.FeDropShadowElement=Hu,e.FeGaussianBlurElement=Xu,e.FeMorphologyElement=Yu,e.FilterElement=Gu,e.Font=js,e.FontElement=cu,e.FontFaceElement=pu,e.GElement=Dd,e.GlyphElement=hu,e.GradientElement=Nd,e.ImageElement=Vu,e.LineElement=Cd,e.LinearGradientElement=Md,e.MarkerElement=Rd,e.MaskElement=Mu,e.Matrix=cd,e.MissingGlyphElement=yu,e.Mouse=Ml,e.PSEUDO_ZERO=va,e.Parser=Gl,e.PathElement=Sd,e.PathParser=kd,e.PatternElement=Ld,e.Point=Nl,e.PolygonElement=Od,e.PolylineElement=wd,e.Property=Il,e.QB1=P,e.QB2=A,e.QB3=E,e.RadialGradientElement=zd,e.RectElement=Ad,e.RenderedElement=md,e.Rotate=ud,e.SVGElement=Pd,e.SVGFontLoader=Ru,e.Scale=gd,e.Screen=_l,e.Skew=pd,e.SkewX=yd,e.SkewY=hd,e.StopElement=Bd,e.StyleElement=Iu,e.SymbolElement=Lu,e.TRefElement=fu,e.TSpanElement=bd,e.TextElement=xd,e.TextPathElement=Ou,e.TitleElement=Qu,e.Transform=fd,e.Translate=dd,e.UnknownElement=Rs,e.UseElement=Du,e.ViewPort=Dl,e.compressSpaces=n,e.default=Ju,e.getSelectorSpecificity=p,e.normalizeAttributeName=l,e.parseExternalUrl=s,e.presets=eg,e.toNumbers=o,e.trimLeft=a,e.trimRight=r,e.vectorMagnitude=y,e.vectorsAngle=x,e.vectorsRatio=h,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=umd.js.map