PageSourceSearch

https://www.bettersense.co.kr/_next/static/chunks/948d068f.a2ccd4a3d7e556fb.js

js bettersense.co.kr collected 2026-10-02 02:00:58 UTC 122,006 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9943],{63396:function(t,e,r){r.r(e),r.d(e,{AElement:function(){return tU},AnimateColorElement:function(){return t$},AnimateElement:function(){return tj},AnimateTransformElement:function(){return tq},BoundingBox:function(){return tx},CB1:function(){return G},CB2:function(){return X},CB3:function(){return W},CB4:function(){return H},Canvg:function(){return ef},CircleElement:function(){return tC},ClipPathElement:function(){return t6},DefsElement:function(){return tL},DescElement:function(){return eo},Document:function(){return ec},Element:function(){return tp},EllipseElement:function(){return tM},FeColorMatrixElement:function(){return t7},FeCompositeElement:function(){return en},FeDropShadowElement:function(){return ee},FeGaussianBlurElement:function(){return ei},FeMorphologyElement:function(){return er},FilterElement:function(){return et},Font:function(){return tm},FontElement:function(){return tX},FontFaceElement:function(){return tW},GElement:function(){return tN},GlyphElement:function(){return t_},GradientElement:function(){return tz},ImageElement:function(){return tK},LineElement:function(){return tE},LinearGradientElement:function(){return tB},MarkerElement:function(){return tO},MaskElement:function(){return t8},Matrix:function(){return tl},MissingGlyphElement:function(){return tH},Mouse:function(){return tt},PSEUDO_ZERO:function(){return F},Parser:function(){return to},PathElement:function(){return tZ},PathParser:function(){return tP},PatternElement:function(){return tT},Point:function(){return K},PolygonElement:function(){return tD},PolylineElement:function(){return tV},Property:function(){return Q},QB1:function(){return _},QB2:function(){return Y},QB3:function(){return U},RadialGradientElement:function(){return tI},RectElement:function(){return tA},RenderedElement:function(){return tb},Rotate:function(){return tu},SVGElement:function(){return tR},SVGFontLoader:function(){return t1},Scale:function(){return tc},Screen:function(){return tn},Skew:function(){return th},SkewX:function(){return tf},SkewY:function(){return ty},StopElement:function(){return tF},StyleElement:function(){return t2},SymbolElement:function(){return t0},TRefElement:function(){return tY},TSpanElement:function(){return tS},TextElement:function(){return tk},TextPathElement:function(){return tJ},TitleElement:function(){return ea},Transform:function(){return tg},Translate:function(){return ts},UnknownElement:function(){return tv},UseElement:function(){return t3},ViewPort:function(){return J},compressSpaces:function(){return w},getSelectorSpecificity:function(){return I},normalizeAttributeName:function(){return C},normalizeColor:function(){return E},parseExternalUrl:function(){return M},presets:function(){return ey},toNumbers:function(){return R},trimLeft:function(){return P},trimRight:function(){return Z},vectorMagnitude:function(){return j},vectorsAngle:function(){return q},vectorsRatio:function(){return $}}),r(77284),r(84134),r(4111),r(34125),r(10127),r(49878);var n,i=r(26365);r(30943),r(68740),r(35789),r(74254),r(95735),r(67580),r(81015);var a=r(35750),o=r.n(a),s=r(54580),u=r(11993),c=r(76405),l=r(25049);r(69376),r(28410),r(87042),r(59558),r(53147),r(55892);var h=r(73058),f=r.n(h);r(38606);var y=r(93281),g=r.n(y);r(42702),r(84267);var p=r(37977),v=r(24995),d=r(41690);r(63803),r(51887),r(33083),r(79310),r(11465),r(42344);var m=r(83145);r(75858),r(19500);var x=r(91472);r(53305),r(94307),r(17846);var b=r(63496);r(62231),r(97940),r(63756),r(42389),r(69968),r(71325),r(47852),r(1938);var k=r(28205),S=r(40257);function w(t){return t.replace(/(?!\u3000)\s+/gm," ")}function P(t){return t.replace(/^[\n \t]+/,"")}function Z(t){return t.replace(/[\n \t]+$/,"")}function R(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var A=/^[A-Z-]+$/;function C(t){return A.test(t)?t.toLowerCase():t}function M(t){var e=t.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return e[2]||e[3]||e[4]}function E(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,function(t,r){return e--&&r?String(Math.round(parseFloat(t))):t})}var V=/(\[[^\]]+\])/g,D=/(#[^\s\+>~\.\[:]+)/g,T=/(\.[^\s\+>~\.\[:]+)/g,O=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,L=/(:[\w-]+\([^\)]*\))/gi,N=/(:[^\s\+>~\.\[:]+)/g,z=/([^\s\+>~\.\[:]+)/g;function B(t,e){var r=t.match(e);return r?[t.replace(e," "),r.length]:[t,0]}function I(t){var e=[0,0,0],r=t.replace(/:not\(([^\)]*)\)/g,"     $1 ").replace(/{[\s\S]*/gm," "),n=0,a=B(r,V),o=(0,i.Z)(a,2);r=o[0],n=o[1],e[1]+=n;var s=B(r,D),u=(0,i.Z)(s,2);r=u[0],n=u[1],e[0]+=n;var c=B(r,T),l=(0,i.Z)(c,2);r=l[0],n=l[1],e[1]+=n;var h=B(r,O),f=(0,i.Z)(h,2);r=f[0],n=f[1],e[2]+=n;var y=B(r,L),g=(0,i.Z)(y,2);r=g[0],n=g[1],e[1]+=n;var p=B(r,N),v=(0,i.Z)(p,2);r=v[0],n=v[1],e[1]+=n;var d=B(r=r.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),z),m=(0,i.Z)(d,2);return r=m[0],n=m[1],e[2]+=n,e.join("")}var F=1e-8;function j(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function $(t,e){return(t[0]*e[0]+t[1]*e[1])/(j(t)*j(e))}function q(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos($(t,e))}function G(t){return t*t*t}function X(t){return 3*t*t*(1-t)}function W(t){return 3*t*(1-t)*(1-t)}function H(t){return(1-t)*(1-t)*(1-t)}function _(t){return t*t}function Y(t){return 2*t*(1-t)}function U(t){return(1-t)*(1-t)}(function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,r,n,i){var a,o=Object.create((r&&r.prototype instanceof g?r:g).prototype),s=new Z(i||[]);return o._invoke=(a=l,function(r,i){if(a===h)throw Error("Generator is already running");if(a===f){if("throw"===r)throw i;return A()}for(s.method=r,s.arg=i;;){var o=s.delegate;if(o){var u=function t(r,n){var i=r.iterator[n.method];if(i===e){if(n.delegate=null,"throw"===n.method){if(r.iterator.return&&
vendor: 5,131 bytes, line 1
1(n.method="return",n.arg=e,t(r,n),"throw"===n.method))return y;n.method="throw",n.arg=TypeError("The iterator does not provide a 'throw' method")}return y}var a=c(i,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[r.resultName]=o.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,y)}(o,s);if(u){if(u===y)continue;return u}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(a===l)throw a=f,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);a=h;var g=c(t,n,s);if("normal"===g.type){if(a=s.done?f:"suspendedYield",g.arg===y)continue;return{value:g.arg,done:s.done}}"throw"===g.type&&(a=f,s.method="throw",s.arg=g.arg)}}),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",h="executing",f="completed",y={};function g(){}function p(){}function v(){}var d={};d[a]=function(){return this};var m=Object.getPrototypeOf,x=m&&m(m(R([])));x&&x!==r&&n.call(x,a)&&(d=x);var b=v.prototype=g.prototype=Object.create(d);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t,e){var r;this._invoke=function(i,a){function o(){return new e(function(r,o){!function r(i,a,o,s){var u=c(t[i],t,a);if("throw"===u.type)s(u.arg);else{var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){r("next",t,o,s)},function(t){r("throw",t,o,s)}):e.resolve(h).then(function(t){l.value=t,o(l)},function(t){return r("throw",t,o,s)})}}(i,a,r,o)})}return r=r?r.then(o,o):o()}}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Z(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function R(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:A}}function A(){return{value:e,done:!0}}return p.prototype=b.constructor=v,v.constructor=p,v[s]=p.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},k(S.prototype),S.prototype[o]=function(){return this},t.AsyncIterator=S,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new S(u(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(b),b[s]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=R,Z.prototype={constructor:Z,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else if(c){if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else throw Error("try statement without catch or finally")}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return(o.type=t,o.arg=e,a)?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}}
1,catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:R(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})(n={exports:{}},n.exports),n.exports;var Q=function(){function t(e,r,n){(0,c.Z)(this,t),this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1}return(0,l.Z)(t,[{key:"hasValue",value:function(){var t=this.value;return null!==t&&""!==t&&0!==t&&void 0!==t}},{key:"isString",value:function(t){var e=this.value,r="string"==typeof e;return r&&t?t.test(e):r}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case/px$/.test(t):case/^[0-9]+$/.test(t):return!0;default:return!1}}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getValue",value:function(t){return void 0===t||this.hasValue()?this.value:t}},{key:"getNumber",value:function(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var e=parseFloat(this.value);return this.isString(/%$/)&&(e/=100),e}},{key:"getString",value:function(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}},{key:"getColor",value:function(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=E(e),this.value=e),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(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r=(0,i.Z)("boolean"==typeof t?[void 0,t]:[t],2),n=r[0],a=r[1],o=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(o.computeSize("x"),o.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(o.computeSize("x"),o.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*o.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*o.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);
1case 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(/%$/)&&a:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*o.computeSize(n);default:var s=this.getNumber();if(e&&s<1)return s*o.computeSize(n);return 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()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var t=this.getString(),e=t.match(/#([^\)'"]+)/);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}},{key:"getFillStyleDefinition",value:function(t,e){var r=this.getDefinition();if(!r)return null;if("function"==typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"==typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value)}return r.createPattern(this.document.ctx,t,e)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?t.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(e){for(var r=this.getColor(),n=r.length,i=0,a=0;a<n&&(","===r[a]&&i++,3!==i);a++);if(e.hasValue()&&this.isString()&&3!==i){var o=new(g())(r);o.ok&&(o.alpha=e.getNumber(),r=o.toRGBA())}return new t(this.document,this.name,r)}}],[{key:"empty",value:function(e){return new t(e,"EMPTY","")}}]),t}();Q.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 J=function(){function t(){(0,c.Z)(this,t),this.viewPorts=[]}return(0,l.Z)(t,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(t,e){this.viewPorts.push({width:t,height:e})}},{key:"removeCurrent",value:function(){this.viewPorts.pop()}},{key:"getCurrent",value:function(){var t=this.viewPorts;return t[t.length-1]}},{key:"computeSize",value:function(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},{key:"width",get:function(){return this.getCurrent().width}},{key:"height",get:function(){return this.getCurrent().height}}]),t}(),K=function(){function t(e,r){(0,c.Z)(this,t),this.x=e,this.y=r}return(0,l.Z)(t,[{key:"angleTo",value:function(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function(t){var e=this.x,r=this.y,n=e*t[0]+r*t[2]+t[4],i=e*t[1]+r*t[3]+t[5];this.x=n,this.y=i}}],[{key:"parse",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=R(e),a=(0,i.Z)(n,2),o=a[0],s=void 0===o?r:o,u=a[1];return new t(s,void 0===u?r:u)}},{key:"parseScale",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=R(e),a=(0,i.Z)(n,2),o=a[0],s=void 0===o?r:o,u=a[1],c=void 0===u?s:u;return new t(s,c)}},{key:"parsePath",value:function(e){for(var r=R(e),n=r.length,i=[],a=0;a<n;a+=2)i.push(new t(r[a],r[a+1]));return i}}]),t}(),tt=function(){function t(e){(0,c.Z)(this,t),this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return(0,l.Z)(t,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var t=this.screen,e=this.onClick,r=this.onMouseMove,n=t.ctx.canvas;n.onclick=e,n.onmousemove=r,this.working=!0}}},{key:"stop",value:function(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}},{key:"hasEvents",value:function(){return this.working&&this.events.length>0}},{key:"runEvents",value:function(){if(this.working){var t=this.screen,e=this.events,r=this.eventElements,n=t.ctx.canvas.style;n&&(n.cursor=""),e.forEach(function(t,e){for(var n=t.run,i=r[e];i;)n(i),i=i.parent}),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach(function(r,i){var a=r.x,o=r.y;!n[i]&&e.isPointInPath&&e.isPointInPath(a,o)&&(n[i]=t)})}}},{key:"checkBoundingBox",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach(function(r,i){var a=r.x,o=r.y;!n[i]&&e.isPointInBox(a,o)&&(n[i]=t)})}}},{key:"mapXY",value:function(t,e){for(var r=this.screen,n=r.window,i=r.ctx,a=new K(t,e),o=i.canvas;o;)a.x-=o.offsetLeft,a.y-=o.offsetTop,o=o.offsetParent;
1return n.scrollX&&(a.x+=n.scrollX),n.scrollY&&(a.y+=n.scrollY),a}},{key:"onClick",value:function(t){var e=this.mapXY((t||event).clientX,(t||event).clientY),r=e.x,n=e.y;this.events.push({type:"onclick",x:r,y:n,run:function(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function(t){var e=this.mapXY((t||event).clientX,(t||event).clientY),r=e.x,n=e.y;this.events.push({type:"onmousemove",x:r,y:n,run:function(t){t.onMouseMove&&t.onMouseMove()}})}}]),t}(),te="undefined"!=typeof window?window:null,tr="undefined"!=typeof fetch?fetch.bind(void 0):null,tn=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,i=void 0===n?tr:n,a=r.window,o=void 0===a?te:a;(0,c.Z)(this,t),this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new J,this.mouse=new tt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=o,this.fetch=i}return(0,l.Z)(t,[{key:"wait",value:function(t){this.waits.push(t)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function(){if(this.isReadyLock)return!0;var t=this.waits.every(function(t){return t()});return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function(t){var e=t.document,r=t.ctx,n=t.aspectRatio,a=t.width,o=t.desiredWidth,s=t.height,u=t.desiredHeight,c=t.minX,l=t.minY,h=t.refX,f=t.refY,y=t.clip,g=t.clipX,p=t.clipY,v=w(n).replace(/^defer\s/,"").split(" "),d=(0,i.Z)(v,2),m=d[0],x=d[1],b=m||"xMidYMid",k=x||"meet",S=a/o,P=s/u,Z=Math.min(S,P),R=Math.max(S,P),A=o,C=u;"meet"===k&&(A*=Z,C*=Z),"slice"===k&&(A*=R,C*=R);var M=new Q(e,"refX",h),E=new Q(e,"refY",f),V=M.hasValue()&&E.hasValue();if(V&&r.translate(-Z*M.getPixels("x"),-Z*E.getPixels("y")),void 0!==y&&y){var D=Z*(void 0===g?0:g),T=Z*(void 0===p?0:p);r.beginPath(),r.moveTo(D,T),r.lineTo(a,T),r.lineTo(a,s),r.lineTo(D,s),r.closePath(),r.clip()}if(!V){var O="meet"===k&&Z===P,L="slice"===k&&R===P,N="meet"===k&&Z===S,z="slice"===k&&R===S;/^xMid/.test(b)&&(O||L)&&r.translate(a/2-A/2,0),/YMid$/.test(b)&&(N||z)&&r.translate(0,s/2-C/2),/^xMax/.test(b)&&(O||L)&&r.translate(a-A,0),/YMax$/.test(b)&&(N||z)&&r.translate(0,s-C)}switch(!0){case"none"===b:r.scale(S,P);break;case"meet"===k:r.scale(Z,Z);break;case"slice"===k:r.scale(R,R)}r.translate(-(void 0===c?0:c),-(void 0===l?0:l))}},{key:"start",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,i=r.ignoreMouse,a=r.ignoreAnimation,o=void 0!==a&&a,s=r.ignoreDimensions,u=void 0!==s&&s,c=r.ignoreClear,l=void 0!==c&&c,h=r.forceRedraw,y=r.scaleWidth,g=r.scaleHeight,p=r.offsetX,v=r.offsetY,d=this.FRAMERATE,m=this.mouse,x=1e3/d;if(this.frameDuration=x,this.readyPromise=new Promise(function(t){e.resolveReady=t}),this.isReady()&&this.render(t,u,l,y,g,p,v),void 0!==n&&n){var b=Date.now(),k=b,S=0;void 0!==i&&i||m.start(),this.intervalId=f()(function r(){(S=(b=Date.now())-k)>=x&&(k=b-S%x,e.shouldUpdate(o,h)&&(e.render(t,u,l,y,g,p,v),m.runEvents())),e.intervalId=f()(r)})}}},{key:"stop",value:function(){this.intervalId&&(f().cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var r=this.frameDuration;if(this.animations.reduce(function(t,e){return e.update(r)||t},!1))return!0}return!!("function"==typeof e&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}},{key:"render",value:function(t,e,r,n,i,a,o){var s=this.CLIENT_WIDTH,u=this.CLIENT_HEIGHT,c=this.viewPort,l=this.ctx,h=this.isFirstRender,f=l.canvas;c.clear(),f.width&&f.height?c.setCurrent(f.width,f.height):c.setCurrent(s,u);var y=t.getStyle("width"),g=t.getStyle("height");!e&&(h||"number"!=typeof n&&"number"!=typeof i)&&(y.hasValue()&&(f.width=y.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),g.hasValue()&&(f.height=g.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var p=f.clientWidth||f.width,v=f.clientHeight||f.height;if(e&&y.hasValue()&&g.hasValue()&&(p=y.getPixels("x"),v=g.getPixels("y")),c.setCurrent(p,v),"number"==typeof a&&t.getAttribute("x",!0).setValue(a),"number"==typeof o&&t.getAttribute("y",!0).setValue(o),"number"==typeof n||"number"==typeof i){var d=R(t.getAttribute("viewBox").getString()),m=0,x=0;if("number"==typeof n){var b=t.getStyle("width");b.hasValue()?m=b.getPixels("x")/n:isNaN(d[2])||(m=d[2]/n)}if("number"==typeof i){var k=t.getStyle("height");k.hasValue()?x=k.getPixels("y")/i:isNaN(d[3])||(x=d[3]/i)}m||(m=x),x||(x=m),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(i);var S=t.getStyle("transform",!0,!0);S.setValue("".concat(S.getString()," scale(").concat(1/m,", ").concat(1/x,")"))}r||l.clearRect(0,0,p,v),t.render(l),h&&(this.isFirstRender=!1)}}]),t}();tn.defaultWindow=te,tn.defaultFetch=tr;var ti=tn.defaultFetch,ta="undefined"!=typeof DOMParser?DOMParser:null,to=function(){var t,e;function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fetch,n=void 0===e?ti:e,i=t.DOMParser,a=void 0===i?ta:i;(0,c.Z)(this,r),this.fetch=n,this.DOMParser=a}return(0,l.Z)(r,[{key:"parse",value:(t=(0,s.Z)(o().mark(function t(e){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!/^</.test(e)){t.next=2;break}return t.abrupt("return",this.parseFromString(e));case 2:return t.abrupt("return",this.load(e));case 3:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"parseFromString",value:function(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(r){return this.checkDocument(e.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw Error(e.textContent);return t}},{key:"load",value:(e=(0,s.Z)(o().mark(function t(e){var r,n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fetch(e);case 2:return r=t.sent,t.next=5,r.text();case 5:return n=t.sent,t.abrupt("return",this.parseFromString(n));case 7:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})}]),r}(),ts=function(){function t(e,r){(0,c.Z)(this,t),this.type="translate",this.point=null,this.point=K.parse(r)}return(0,l.Z)(t,[{key:"apply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(r||0,n||0)}},{key:"unapply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(-1*r||0,-1*n||0)}},{key:"applyToPoint",value:function(t){var e=this.point,r=e.x,n=e.y;t.applyTransform([1,0,0,1,r||0,n||0])}}]),t}(),tu=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];(0,c.Z)(this,t),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var i=R(r);this.angle=new Q(e,"angle",i[0]),this.cx=(i[1]||0)+(n[0]||0),this.cy=(i[2]||0)+(n[1]||0)}return(0,l.Z)(t,[{key:"apply",value:function(t){var e=this.cx,r=this.cy,n=this.angle;t.translate(e,r),t.rotate(n.getRadians()),t.translate(-e,-r)}},{key:"unapply",value:function(t){var e=this.cx,r=this.cy,n=this.angle;t.translate(e,r),t.rotate(-1*n.getRadians()),t.translate(-e,-r)}},{key:"applyToPoint",value:function(t){var e=this.cx,r=this.cy,n=this.angle.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}]),t}(),tc=function(){function t(e,r){(0,c.Z)(this,t),this.type="scale",this.scale=null;var n=K.parseScale(r);(0===n.x||0===n.y)&&(n.x=F,n.y=F),this.scale=n}return(0,l.Z)(t,[{key:"apply",value:function(t){var e=this.scale,r=e.x,n=e.y;t.scale(r,n||r)}},{key:"unapply",value:function(t){var e=this.scale,r=e.x,n=e.y;t.scale(1/r,1/n||r)}},{key:"applyToPoint",value:function(t){var e=this.scale,r=e.x,n=e.y;t.applyTransform([r||0,0,0,n||0,0,0])}}]),t}(),tl=function(){function t(e,r){(0,c.Z)(this,t),this.type="matrix",this.matrix=[],this.matrix=R(r)}return(0,l.Z)(t,[{key:"apply",value:function(t){var e=this.matrix;t.transform(e[0],e[1],e[2],e[3],e[4],e[5])}},{key:"unapply",value:function(t){var e=this.matrix,r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],u=1/(r*(1*o-0*s)-n*(1*a-0*s)+i*(0*a-0*o));t.transform(u*(1*o-0*s),u*(0*s-1*a),u*(0*i-1*n),u*(1*r-0*i),u*(n*s-i*o),u*(i*a-r*s))}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix
1)}}]),t}(),th=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n){var i;return(0,c.Z)(this,r),(i=e.call(this,t,n)).type="skew",i.angle=null,i.angle=new Q(t,"angle",n),i}return r}(tl),tf=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n){var i;return(0,c.Z)(this,r),(i=e.call(this,t,n)).type="skewX",i.matrix=[1,0,Math.tan(i.angle.getRadians()),1,0,0],i}return r}(th),ty=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n){var i;return(0,c.Z)(this,r),(i=e.call(this,t,n)).type="skewY",i.matrix=[1,Math.tan(i.angle.getRadians()),0,1,0,0],i}return r}(th),tg=function(){function t(e,r,n){var a=this;(0,c.Z)(this,t),this.document=e,this.transforms=[];var o=w(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/),s=n?R(n):[];o.forEach(function(e){if("none"!==e){var r,n,o,u,c=(r=e.split("("),o=(n=(0,i.Z)(r,2))[0],u=n[1],[o.trim(),u.trim().replace(")","")]),l=(0,i.Z)(c,2),h=l[0],f=l[1],y=t.transformTypes[h];void 0!==y&&a.transforms.push(new y(a.document,f,s))}})}return(0,l.Z)(t,[{key:"apply",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].apply(t)}},{key:"unapply",value:function(t){for(var e=this.transforms,r=e.length,n=r-1;n>=0;n--)e[n].unapply(t)}},{key:"applyToPoint",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].applyToPoint(t)}}],[{key:"fromElement",value:function(e,r){var n=r.getStyle("transform",!1,!0),i=r.getStyle("transform-origin",!1,!0);return n.hasValue()?new t(e,n.getString(),i.getString()):null}}]),t}();tg.transformTypes={translate:ts,rotate:tu,scale:tc,matrix:tl,skewX:tf,skewY:ty};var tp=function(){function t(e,r){var n=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if((0,c.Z)(this,t),this.document=e,this.node=r,this.captureTextNodes=a,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){Array.from(r.attributes).forEach(function(t){var r=C(t.nodeName);n.attributes[r]=new Q(e,r,t.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()&&this.getAttribute("style").getString().split(";").map(function(t){return t.trim()}).forEach(function(t){if(t){var r=t.split(":").map(function(t){return t.trim()}),a=(0,i.Z)(r,2),o=a[0],s=a[1];n.styles[o]=new Q(e,o,s)}});var o=e.definitions,s=this.getAttribute("id");s.hasValue()&&!o[s.getValue()]&&(o[s.getValue()]=this),Array.from(r.childNodes).forEach(function(t){if(1===t.nodeType)n.addChild(t);else if(a&&(3===t.nodeType||4===t.nodeType)){var r=e.createTextNode(t);r.getText().length>0&&n.addChild(r)}})}}return(0,l.Z)(t,[{key:"getAttribute",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var n=new Q(this.document,t,"");return this.attributes[t]=n,n}return r||Q.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||/:href$/.test(t))return this.attributes[t];return Q.empty(this.document)}},{key:"getStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[t];if(n)return n;var i=this.getAttribute(t);if(i&&i.hasValue())return this.styles[t]=i,i;if(!r){var a=this.parent;if(a){var o=a.getStyle(t);if(o&&o.hasValue())return o}}if(e){var s=new Q(this.document,t,"");return this.styles[t]=s,s}return n||Q.empty(this.document)}},{key:"render",value:function(t){if("none"!==this.getStyle("display").getString()&&"hidden"
1!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function(t){}},{key:"applyEffects",value:function(t){var e=tg.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var n=r.getDefinition();n&&n.apply(t)}}},{key:"clearContext",value:function(t){}},{key:"renderChildren",value:function(t){this.children.forEach(function(e){e.render(t)})}},{key:"addChild",value:function(e){var r=e instanceof t?e:this.document.createElement(e);r.parent=this,t.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function(t){var e=this.node;if("function"==typeof e.matches)return e.matches(t);var r=e.getAttribute("class");return!!r&&""!==r&&r.split(" ").some(function(e){if(".".concat(e)===t)return!0})}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,e=t.styles,r=t.stylesSpecificity;for(var n in e)if("@"!==n[0]&&this.matchesSelector(n)){var i=e[n],a=r[n];if(i)for(var o in i){var s=this.stylesSpecificity[o];void 0===s&&(s="000"),a>=s&&(this.styles[o]=i[o],this.stylesSpecificity[o]=a)}}}},{key:"removeStyles",value:function(t,e){return e.reduce(function(e,r){var n=t.getStyle(r);if(!n.hasValue())return e;var i=n.getString();return n.setValue(""),[].concat((0,m.Z)(e),[[r,i]])},[])}},{key:"restoreStyles",value:function(t,e){e.forEach(function(e){var r=(0,i.Z)(e,2),n=r[0],a=r[1];t.getStyle(n,!0).setValue(a)})}}]),t}();tp.ignoreChildTypes=["title"];var tv=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){return(0,c.Z)(this,r),e.call(this,t,n,i)}return r}(tp);function td(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}var tm=function(){function t(e,r,n,i,a,o){(0,c.Z)(this,t);var s=o?"string"==typeof o?t.parse(o):o:{};this.fontFamily=a||s.fontFamily,this.fontSize=i||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=n||s.fontWeight,this.fontVariant=r||s.fontVariant}return(0,l.Z)(t,[{key:"toString",value:function(){var t;return[function(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:if(/^oblique\s+(-|)\d+deg$/.test(e))return e;return""}}(this.fontStyle),this.fontVariant,function(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:if(/^[\d.]+$/.test(e))return e;return""}}(this.fontWeight),this.fontSize,(t=this.fontFamily,void 0===S?t:t.trim().split(",").map(td).join(","))].join(" ").trim()}}],[{key:"parse",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",a="",o="",s="",u="",c=w(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return c.forEach(function(e){switch(!0){case!l.fontStyle&&t.styles.includes(e):"inherit"!==e&&(n=e),l.fontStyle=!0;break;case!l.fontVariant&&t.variants.includes(e):"inherit"!==e&&(a=e),l.fontStyle=!0,l.fontVariant=!0;break;case!l.fontWeight&&t.weights.includes(e):"inherit"!==e&&(o=e),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:if("inherit"!==e){var r=e.split("/");s=(0,i.Z)(r,1)[0]}l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:"inherit"!==e&&(u+=e)}}),new t(n,a,o,s,u,r)}}]),t}();tm.styles="normal|italic|oblique|inherit",tm.variants="normal|small-caps|inherit",tm.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var tx=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;(0,c.Z)(this,t),this.x1=e,this.y1=r,this.x2=n,this.y2=i,this.addPoint(e,r),this.addPoint(n,i)}return(0,l.Z)(t,[{key:"addPoint",value:function(t,e){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}},{key:"addX",value:function(t){this.addPoint(t,null)}},{key:"addY",value:function(t){this.addPoint(null,t)}}
1,{key:"addBoundingBox",value:function(t){if(t){var e=t.x1,r=t.y1,n=t.x2,i=t.y2;this.addPoint(e,r),this.addPoint(n,i)}}},{key:"sumCubic",value:function(t,e,r,n,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*i}},{key:"bezierCurveAdd",value:function(t,e,r,n,i){var a=6*e-12*r+6*n,o=-3*e+9*r-9*n+3*i,s=3*r-3*e;if(0===o){if(0===a)return;var u=-s/a;0<u&&u<1&&(t?this.addX(this.sumCubic(u,e,r,n,i)):this.addY(this.sumCubic(u,e,r,n,i)));return}var c=Math.pow(a,2)-4*s*o;if(!(c<0)){var l=(-a+Math.sqrt(c))/(2*o);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,n,i)):this.addY(this.sumCubic(l,e,r,n,i)));var h=(-a-Math.sqrt(c))/(2*o);0<h&&h<1&&(t?this.addX(this.sumCubic(h,e,r,n,i)):this.addY(this.sumCubic(h,e,r,n,i)))}}},{key:"addBezierCurve",value:function(t,e,r,n,i,a,o,s){this.addPoint(t,e),this.addPoint(o,s),this.bezierCurveAdd(!0,t,r,i,o),this.bezierCurveAdd(!1,e,n,a,s)}},{key:"addQuadraticCurve",value:function(t,e,r,n,i,a){var o=t+2/3*(r-t),s=e+2/3*(n-e);this.addBezierCurve(t,e,o,o+1/3*(i-t),s,s+1/3*(a-e),i,a)}},{key:"isPointInBox",value:function(t,e){var r=this.x1,n=this.y1,i=this.x2,a=this.y2;return r<=t&&t<=i&&n<=e&&e<=a}},{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}}]),t}(),tb=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.modifiedEmSizeStack=!1,t}return(0,l.Z)(r,[{key:"calculateOpacity",value:function(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue()&&(t*=r.getNumber()),e=e.parent}return t}},{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){var r=this.getStyle("fill"),n=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),a=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var o=r.getFillStyleDefinition(this,n);o&&(t.fillStyle=o)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var s=r.getColor();"inherit"!==s&&(t.fillStyle="none"===s?"rgba(0,0,0,0)":s)}if(n.hasValue()){var u=new Q(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=u}if(i.isUrlDefinition()){var c=i.getFillStyleDefinition(this,a);c&&(t.strokeStyle=c)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var l=i.getString();"inherit"!==l&&(t.strokeStyle="none"===l?"rgba(0,0,0,0)":l)}if(a.hasValue()){var h=new Q(this.document,"stroke",t.strokeStyle).addOpacity(a).getString();t.strokeStyle=h}var f=this.getStyle("stroke-width");if(f.hasValue()){var y=f.getPixels();t.lineWidth=y||F}var g=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),v=this.getStyle("stroke-miterlimit"),d=this.getStyle("paint-order"),m=this.getStyle("stroke-dasharray"),x=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(t.lineCap=g.getString()),p.hasValue()&&(t.lineJoin=p.getString()),v.hasValue()&&(t.miterLimit=v.getNumber()),d.hasValue()&&(t.paintOrder=d.getValue()),m.hasValue()&&"none"!==m.getString()){var b=R(m.getString());void 0!==t.setLineDash?t.setLineDash(b):void 0!==t.webkitLineDash?t.webkitLineDash=b:void 0===t.mozDash||1===b.length&&0===b[0]||(t.mozDash=b);var k=x.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=k:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=k:void 0!==t.mozDashOffset&&(t.mozDashOffset=k)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var S=this.getStyle("font"),w=this.getStyle("font-style"),P=this.getStyle("font-variant"),Z=this.getStyle("font-weight"),A=this.getStyle("font-size"),C=this.getStyle("font-family"),M=new tm(w.getString(),P.getString(),Z.get
1String(),A.hasValue()?"".concat(A.getPixels(!0),"px"):"",C.getString(),tm.parse(S.getString(),t.font));w.setValue(M.fontStyle),P.setValue(M.fontVariant),Z.setValue(M.fontWeight),A.setValue(M.fontSize),C.setValue(M.fontFamily),t.font=M.toString(),A.isPixels()&&(this.document.emSize=A.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(t){(0,x.Z)((0,v.Z)(r.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),r}(tp),tk=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i)).type="text",a.x=0,a.y=0,a.measureCache=-1,a}return(0,l.Z)(r,[{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,x.Z)((0,v.Z)(r.prototype),"setContext",this).call(this,t,e);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n)}},{key:"initializeCoordinates",value:function(t){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var e=this.getAttribute("dx"),r=this.getAttribute("dy");e.hasValue()&&(this.x+=e.getPixels("x")),r.hasValue()&&(this.y+=r.getPixels("y")),this.x+=this.getAnchorDelta(t,this,0)}},{key:"getBoundingBox",value:function(t){var e=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(t);var r=null;return this.children.forEach(function(n,i){var a=e.getChildBoundingBox(t,e,e,i);r?r.addBoundingBox(a):r=a}),r}},{key:"getFontSize",value:function(){var t=this.document,e=this.parent,r=tm.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(r)}},{key:"getTElementBoundingBox",value:function(t){var e=this.getFontSize();return new tx(this.x,this.y-e,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function(t,e,r){var n=e[r],i=null;if(t.isArabic){var a=e.length,o=e[r-1],s=e[r+1],u="isolated";(0===r||" "===o)&&r<a-2&&" "!==s&&(u="terminal"),r>0&&" "!==o&&r<a-2&&" "!==s&&(u="medial"),r>0&&" "!==o&&(r===a-1||" "===s)&&(u="initial"),void 0===t.glyphs[n]||(i=t.glyphs[n][u])||"glyph"!==t.glyphs[n].type||(i=t.glyphs[n])}else i=t.glyphs[n];return i||(i=t.missingGlyph),i}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),n=r.indexOf(e),i=r.length-1,a=w(e.value||e.text||e.textContent||"");return 0===n&&(a=P(a)),n===i&&(a=Z(a)),a}},{key:"renderChildren",value:function(t){var e=this;if("text"!==this.type){this.renderTElementChildren(t);return}this.initializeCoordinates(t),this.children.forEach(function(r,n){e.renderChild(t,e,e,n)});var r=this.document.screen.mouse;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t))}},{key:"renderTElementChildren",value:function(t){var e=this.document,r=this.parent,n=this.getText(),i=r.getStyle("font-family").getDefinition();if(i){for(var a=i.fontFace.unitsPerEm,o=tm.parse(e.ctx.font),s=r.getStyle("font-size").getNumber(o.fontSize),u=r.getStyle("font-style").getString(o.fontStyle),c=s/a,l=i.isRTL?n.split("").reverse().join(""):n,h=R(r.getAttribute("dx").getString()),f=l.length,y=0;y<f;y++){var g=this.getGlyph(i,l,y);t.translate(this.x,this.y),t.scale(c,-c);var p=t.lineWidth;t.lineWidth=t.lineWidth*a/s,"italic"===u&&t.transform(1,0,.4,1,0,0),g.render(t),"italic"===u&&t.transform(1,0,-.4,1,0,0),t.lineWidth=p,t.scale(1/c,-1/c),t.translate(-this.x,-this.y),this.x+=s*(g.horizAdvX||i.horizAdvX)/a,void 0===h[y]||isNaN(h[y])||(this.x+=h[y])}return}var v=this.x,d=this.y;"stroke"===t.paintOrder?(t.strokeStyle&&t.strokeText(n,v,d),t.fillStyle&&t.fillText(n,v,d)):(t.fillStyle&&t.fillText(n,v,d),t.strokeStyle&&t.strokeText(n,v,d))}},{key:"getAnchorDelta",value:function(t,e,r){var n=this.getStyle("text-anchor").getString("start");if("start"!==n){for(var i=e.children,a=i.length,o=null,s=0,u=r;u<a&&(o=i[u],!(u>r&&o.getAttribute("x").hasValue()||o.getAttribute("text-anchor").hasValue()));u++)s+=o.measureTextRecursive(t);return -1*("end"===n?s:s/2)}return 0}}
1,{key:"adjustChildCoordinates",value:function(t,e,r,n){var i=r.children[n];if("function"!=typeof i.measureText)return i;t.save(),i.setContext(t,!0);var a=i.getAttribute("x"),o=i.getAttribute("y"),s=i.getAttribute("dx"),u=i.getAttribute("dy"),c=i.getAttribute("text-anchor").getString("start");if(0!==n||"textNode"===i.type||(a.hasValue()||a.setValue(e.getAttribute("x").getValue("0")),o.hasValue()||o.setValue(e.getAttribute("y").getValue("0")),s.hasValue()||s.setValue(e.getAttribute("dx").getValue("0")),u.hasValue()||u.setValue(e.getAttribute("dy").getValue("0"))),a.hasValue()){if(i.x=a.getPixels("x")+e.getAnchorDelta(t,r,n),"start"!==c){var l=i.measureTextRecursive(t);i.x+=-1*("end"===c?l:l/2)}s.hasValue()&&(i.x+=s.getPixels("x"))}else{if("start"!==c){var h=i.measureTextRecursive(t);e.x+=-1*("end"===c?h:h/2)}s.hasValue()&&(e.x+=s.getPixels("x")),i.x=e.x}return e.x=i.x+i.measureText(t),o.hasValue()?(i.y=o.getPixels("y"),u.hasValue()&&(i.y+=u.getPixels("y"))):(u.hasValue()&&(e.y+=u.getPixels("y")),i.y=e.y),e.y=i.y,i.clearContext(t),t.restore(),i}},{key:"getChildBoundingBox",value:function(t,e,r,n){var i=this.adjustChildCoordinates(t,e,r,n),a=i.getBoundingBox(t);return a?(i.children.forEach(function(r,n){var o=e.getChildBoundingBox(t,e,i,n);a.addBoundingBox(o)}),a):null}},{key:"renderChild",value:function(t,e,r,n){var i=this.adjustChildCoordinates(t,e,r,n);i.render(t),i.children.forEach(function(r,n){e.renderChild(t,e,i,n)})}},{key:"measureTextRecursive",value:function(t){return this.children.reduce(function(e,r){return e+r.measureTextRecursive(t)},this.measureText(t))}},{key:"measureText",value:function(t){var e=this.measureCache;if(~e)return e;var r=this.getText(),n=this.measureTargetText(t,r);return this.measureCache=n,n}},{key:"measureTargetText",value:function(t,e){if(!e.length)return 0;var r=this.parent,n=r.getStyle("font-family").getDefinition();if(n){for(var i=this.getFontSize(),a=n.isRTL?e.split("").reverse().join(""):e,o=R(r.getAttribute("dx").getString()),s=a.length,u=0,c=0;c<s;c++)u+=(this.getGlyph(n,a,c).horizAdvX||n.horizAdvX)*i/n.fontFace.unitsPerEm,void 0===o[c]||isNaN(o[c])||(u+=o[c]);return u}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);var l=t.measureText(e).width;return this.clearContext(t),t.restore(),l}}]),r}(tb),tS=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i)).type="tspan",a.text=a.children.length>0?"":a.getTextFromNode(),a}return(0,l.Z)(r,[{key:"getText",value:function(){return this.text}}]),r}(tk),tw=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="textNode",t}return r}(tS),tP=function(){function t(e){(0,c.Z)(this,t),this.control=null,this.start=null,this.current=null,this.command="",this.tokens=[],this.i=-1,this.previousCommand="",this.points=[],this.angles=[],this.tokens=w(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]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $2 $3 ")).trim().split(" ")}return(0,l.Z)(t,[{key:"reset",value:function(){this.i=-1,this.command="",this.previousCommand="",this.start=new K(0,0),this.control=new K(0,0),this.current=ne
1w K(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){return this.i>=this.tokens.length-1}},{key:"isCommandOrEnd",value:function(){if(this.isEnd())return!0;var t=this.i,e=this.tokens;return/^[A-Za-z]$/.test(e[t+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 t=new K(this.getScalar(),this.getScalar());return this.makeAbsolute(t)}},{key:"getAsControlPoint",value:function(){var t=this.getPoint();return this.control=t,t}},{key:"getAsCurrentPoint",value:function(){var t=this.getPoint();return this.current=t,t}},{key:"getReflectedControlPoint",value:function(){var t=this.previousCommand.toLowerCase();if("c"!==t&&"s"!==t&&"q"!==t&&"t"!==t)return this.current;var e=this.current,r=e.x,n=e.y,i=this.control;return new K(2*r-i.x,2*n-i.y)}},{key:"makeAbsolute",value:function(t){if(this.isRelativeCommand()){var e=this.current,r=e.x,n=e.y;t.x+=r,t.y+=n}return t}},{key:"addMarker",value:function(t,e,r){var n=this.points,i=this.angles;r&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}},{key:"addMarkerAngle",value:function(t,e){this.points.push(t),this.angles.push(e)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var t=this.angles,e=t.length,r=0;r<e;r++)if(!t[r]){for(var n=r+1;n<e;n++)if(t[n]){t[r]=t[n];break}}return t}}]),t}(),tZ=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="path",a.pathParser=null,a.pathParser=new tP(a.getAttribute("d").getString()),a}return(0,l.Z)(r,[{key:"path",value:function(t){var e=this.pathParser,r=new tx;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.nextCommand(),e.command){case"M":case"m":this.pathM(t,r);break;case"L":case"l":this.pathL(t,r);break;case"H":case"h":this.pathH(t,r);break;case"V":case"v":this.pathV(t,r);break;case"C":case"c":this.pathC(t,r);break;case"S":case"s":this.pathS(t,r);break;case"Q":case"q":this.pathQ(t,r);break;case"T":case"t":this.pathT(t,r);break;case"A":case"a":this.pathA(t,r);break;case"Z":case"z":this.pathZ(t,r)}return r}},{key:"getBoundingBox",value:function(t){return this.path()}},{key:"getMarkers",value:function(){var t=this.pathParser,e=t.getMarkerPoints(),r=t.getMarkerAngles();return e.map(function(t,e){return[t,r[e]]})}},{key:"renderChildren",value:function(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&t.stroke();var r=this.getMarkers();if(r){var n=r.length-1,a=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(a.isUrlDefinition()){var u=a.getDefinition(),c=(0,i.Z)(r[0],2),l=c[0],h=c[1];u.render(t,l,h)}if(o.isUrlDefinition())for(var f=o.getDefinition(),y=1;y<n;y++){var g=(0,i.Z)(r[y],2),p=g[0],v=g[1];f.render(t,p,v)}if(s.isUrlDefinition()){var d=s.getDefinition(),m=(0,i.Z)(r[n],2),x=m[0],b=m[1];d.render(t,x,b)}}}},{key:"pathM",value:function(t,e){var r=this.pathParser,n=r.getAsCurrentPoint(),i=n.x,a=n.y;for(r.addMarker(n),e.addPoint(i,a),t&&t.moveTo(i,a),r.start=r.current;!r.isCommandOrEnd();){var o=r.getAsCurrentPoint(),s=o.x,u=o.y;r.addMarker(o,r.start),e.addPoint(s,u),t&&t.lineTo(s,u)}}},{key:"pathL",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=r.getAsCurrentPoint(),a=i.x,o=i.y;r.addMarker(i,n),e.addPoint(a,o),t&&t.lineTo(a,o)}}},{key:"pathH",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=new K((r.isRelativeCommand()?n.x:0)+r.getScalar(),n.y);r.addMarker(i,n),r.current=i,e.addPoint(i.x,i.y),t&&t.lineTo(i.x,i.y)}}},{key:"pathV",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=new K(n.x,(r.isRelativeCommand()?n.y:0)+r.getScalar());r.addMarker(i,n),r.current=i,e.addPoint(i.x,i.y),t&&t.lineTo(i.x,i.y)}}},{key:"pathC",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=r.getPoint(),a=r.getAsControlPoint(),o=r.getAsCurrentPoint();r.addMarker(o,a,i),e.addBezierCurve(n.x,n.y,i.x,i.y,a.x,a.y,o.x,o.y),t&&t.bezierCurveTo(i.x,i.y,a.x,a.y,o.x,o.y)}}},{key:"pathS",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=r.getReflectedControlPoint(),a=r.getAsControlPoint(),o=r.getAsCurrentPoint();r.addMarker(o,a,i),e.addBezierCurve(n.x,n.y,i.x,i.y,a.x,a.y,o.x,o.y),t&&t.bezierCurveTo(i.x,i.y,a.x,a.y,o.x,o.y)}}},{key:"pathQ",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=r.getAsControlPoint(),a=r.getAsCurrentPoint();r.addMarker(a,i,i),e.addQuadraticCurve(n.x,n.y,i.x,i.y,a.x,a.y),t&&t.quadraticCurveTo(i.x,i.y,a.x,a.y)}}},{key:"pathT",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=r.getReflectedControlPoint();r.control=i;var a=r.getAsCurrentPoint();r.addMarker(a,i,i),e.addQuadraticCurve(n.x,n.y,i.x,i.y,a.x,a.y),t&&t.quadraticCurveTo(i.x,i.y,a.x,a.y)}}},{key:"pathA",value:function(t,e){for(var r=this.pathParser;!r.isCommandOrEnd();){var n=r.current,i=r.getScalar(),a=r.getScalar(),o=r.getScalar()*(Math.PI/180),s=r.getScalar(),u=r.getScalar(),c=r.getAsCurrentPoint(),l=new K(Math.cos(o)*(n.x-c.x)/2+Math.sin(o)*(n.y-c.y)/2,-Math.sin(o)*(n.x-c.x)/2+Math.cos(o)*(n.y-c.y)/2),h=Math.pow(l.x,2)/Math.pow(i,2)+Math.pow(l.y,2)/Math.pow(a,2);h>1&&(i*=Math.sqrt(h),a*=Math.sqrt(h));var f=(s===u?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(l.y,2)-Math.pow(a,2)*Math.pow(l.x,2))/(Math.pow(i,2)*Math.pow(l.y,2)+Math.pow(a,2)*Math.pow(l.x,2)));isNaN(f)&&(f=0);var y=new K(f*i*l.y/a,-(f*a)*l.x/i),g=new K((n.x+c.x)/2+Math.cos(o)*y.x-Math.sin(o)*y.y,(n.y+c.y)/2+Math.sin(o)*y.x+Math.cos(o)*y.y),p=q([1,0],[(l.x-y.x)/i,(l.y-y.y)/a]),v=[(l.x-y.x)/i,(l.y-y.y)/a],d=[(-l.x-y.x)/i,(-l.y-y.y)/a],m=q(v,d);-1>=$(v,d)&&(m=Math.PI),$(v,d)>=1&&(m=0);var x=1-u?1:-1,b=p+m/2*x,k=new K(g.x+i*Math.cos(b),g.y+a*Math.sin(b));if(r.addMarkerAngle(k,b-x*Math.PI/2),r.addMarkerAngle(c,b-x*Math.PI),e.addPoint(c.x,c.y),t&&!isNaN(p)&&!isNaN(m)){var S=i>a?i:a,w=i>a?1:i/a,P=i>a?a/i:1;t.translate(g.x,g.y),t.rotate(o),t.scale(w,P),t.arc(0,0,S,p,p+m,!!(1-u)),t.scale(1/w,
11/P),t.rotate(-o),t.translate(-g.x,-g.y)}}}},{key:"pathZ",value:function(t,e){var r=this.pathParser;t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath(),r.current=r.start}}]),r}(tb),tR=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="svg",t.root=!1,t}return(0,l.Z)(r,[{key:"clearContext",value:function(t){(0,x.Z)((0,v.Z)(r.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"setContext",value:function(t){var e=this.document,n=e.screen,i=e.window,a=t.canvas;if(n.setDefaults(t),a.style&&void 0!==t.font&&i&&void 0!==i.getComputedStyle){t.font=i.getComputedStyle(a).getPropertyValue("font");var o=new Q(e,"fontSize",tm.parse(t.font).fontSize);o.hasValue()&&(e.rootEmSize=o.getPixels("y"),e.emSize=e.rootEmSize)}(0,x.Z)((0,v.Z)(r.prototype),"setContext",this).call(this,t),this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y"));var s=n.viewPort,u=s.width,c=s.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var l=this.getAttribute("refX"),h=this.getAttribute("refY"),f=this.getAttribute("viewBox"),y=f.hasValue()?R(f.getString()):null,g=!this.root&&"visible"!==this.getAttribute("overflow").getValue("hidden"),p=0,d=0,m=0,b=0;y&&(p=y[0],d=y[1]),this.root||(u=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y"),"marker"!==this.type||(m=p,b=d,p=0,d=0)),n.viewPort.setCurrent(u,c),y&&(u=y[2],c=y[3]),e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:u,height:n.viewPort.height,desiredHeight:c,minX:p,minY:d,refX:l.getValue(),refY:h.getValue(),clip:g,clipX:m,clipY:b}),y&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(u,c))}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getAttribute("width",!0),i=this.getAttribute("height",!0),a=this.getAttribute("viewBox"),o=this.getAttribute("style"),s=n.getNumber(0),u=i.getNumber(0);if(r){if("string"==typeof r)this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}}if(n.setValue(t),i.setValue(e),a.hasValue()||a.setValue("0 0 ".concat(s||t," ").concat(u||e)),o.hasValue()){var l=this.getStyle("width"),h=this.getStyle("height");l.hasValue()&&l.setValue("".concat(t,"px")),h.hasValue()&&h.setValue("".concat(e,"px"))}}}]),r}(tb),tA=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="rect",t}return(0,l.Z)(r,[{key:"path",value:function(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y"),a=this.getAttribute("rx"),o=this.getAttribute("ry"),s=a.getPixels("x"),u=o.getPixels("y");if(a.hasValue()&&!o.hasValue()&&(u=s),o.hasValue()&&!a.hasValue()&&(s=u),s=Math.min(s,n/2),u=Math.min(u,i/2),t){var c=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&n>0&&(t.moveTo(e+s,r),t.lineTo(e+n-s,r),t.bezierCurveTo(e+n-s+c*s,r,e+n,r+u-c*u,e+n,r+u),t.lineTo(e+n,r+i-u),t.bezierCurveTo(e+n,r+i-u+c*u,e+n-s+c*s,r+i,e+n-s,r+i),t.lineTo(e+s,r+i),t.bezierCurveTo(e+s-c*s,r+i,e,r+i-u+c*u,e,r+i-u),t.lineTo(e,r+u),t.bezierCurveTo(e,r+u-c*u,e+s-c*s,r,e+s,r),t.closePath())}return new tx(e,r,e+n,r+i)}},{key:"getMarkers",value:function(){return null}}]),r}(tZ),tC=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="circle",t}return(0,l.Z)(r,[{key:"path",value:function(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,r,n,0,2*Math.PI,!1),t.closePath()),new tx(e-n,r-n,e+n,r+n)}},{key:"getMarkers",value:function(){return null}}]),r}(tZ),tM=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="ellipse",t}return(0,l.Z)(r,[{key:"path",value:function(t){var e=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),a=this.getAttribute("cy").getPixels("y");return t&&r>0&&n>0&&(t.beginPath(),t.moveTo(i+r,a),t.bezierCurveTo(i+r,a+e*n,i+e*r,a+n,i,a+n),t.bezierCurveTo(i-e*r,a+n,i-r,a+e*n,i-r,a),t.bezierCurveTo(i-r,a-e*n,i-e*r,a-n,i,a-n),t.bezierCurveTo(i+e*r,a-n,i+r,a-e*n,i+r,a),t.closePath()),new tx(i-r,a-n,i+r,a+n)}},{key:"getMarkers",value:function(){return null}}]),r}(tZ),tE=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="line",t}
1return(0,l.Z)(r,[{key:"getPoints",value:function(){return[new K(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new K(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(t){var e=this.getPoints(),r=(0,i.Z)(e,2),n=r[0],a=n.x,o=n.y,s=r[1],u=s.x,c=s.y;return t&&(t.beginPath(),t.moveTo(a,o),t.lineTo(u,c)),new tx(a,o,u,c)}},{key:"getMarkers",value:function(){var t=this.getPoints(),e=(0,i.Z)(t,2),r=e[0],n=e[1],a=r.angleTo(n);return[[r,a],[n,a]]}}]),r}(tZ),tV=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="polyline",a.points=[],a.points=K.parsePath(a.getAttribute("points").getString()),a}return(0,l.Z)(r,[{key:"path",value:function(t){var e=this.points,r=(0,i.Z)(e,1)[0],n=r.x,a=r.y,o=new tx(n,a);return t&&(t.beginPath(),t.moveTo(n,a)),e.forEach(function(e){var r=e.x,n=e.y;o.addPoint(r,n),t&&t.lineTo(r,n)}),o}},{key:"getMarkers",value:function(){var t=this.points,e=t.length-1,r=[];return t.forEach(function(n,i){i!==e&&r.push([n,n.angleTo(t[i+1])])}),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}]),r}(tZ),tD=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="polygon",t}return(0,l.Z)(r,[{key:"path",value:function(t){var e=(0,x.Z)((0,v.Z)(r.prototype),"path",this).call(this,t),n=(0,i.Z)(this.points,1)[0],a=n.x,o=n.y;return t&&(t.lineTo(a,o),t.closePath()),e}}]),r}(tV),tT=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="pattern",t}return(0,l.Z)(r,[{key:"createPattern",value:function(t,e,r){var n=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),a=new tR(this.document,null);a.attributes.viewBox=new Q(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.width=new Q(this.document,"width","".concat(n,"px")),a.attributes.height=new Q(this.document,"height","".concat(i,"px")),a.attributes.transform=new Q(this.document,"transform",this.getAttribute("patternTransform").getValue()),a.children=this.children;var o=this.document.createCanvas(n,i),s=o.getContext("2d"),u=this.getAttribute("x"),c=this.getAttribute("y");u.hasValue()&&c.hasValue()&&s.translate(u.getPixels("x",!0),c.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var l=-1;l<=1;l++)for(var h=-1;h<=1;h++)s.save(),a.attributes.x=new Q(this.document,"x",l*o.width),a.attributes.y=new Q(this.document,"y",h*o.height),a.render(s),s.restore();return t.createPattern(o,"repeat")}}]),r}(tp),tO=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="marker",t}return(0,l.Z)(r,[{key:"render",value:function(t,e,r){if(e){var n=e.x,i=e.y,a=this.getAttribute("orient").getValue("auto"),o=this.getAttribute("markerUnits").getValue("strokeWidth");t.translate(n,i),"auto"===a&&t.rotate(r),"strokeWidth"===o&&t.scale(t.lineWidth,t.lineWidth),t.save();var s=new tR(this.document,null);
1s.type=this.type,s.attributes.viewBox=new Q(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.refX=new Q(this.document,"refX",this.getAttribute("refX").getValue()),s.attributes.refY=new Q(this.document,"refY",this.getAttribute("refY").getValue()),s.attributes.width=new Q(this.document,"width",this.getAttribute("markerWidth").getValue()),s.attributes.height=new Q(this.document,"height",this.getAttribute("markerHeight").getValue()),s.attributes.overflow=new Q(this.document,"overflow",this.getAttribute("overflow").getValue()),s.attributes.fill=new Q(this.document,"fill",this.getAttribute("fill").getColor("black")),s.attributes.stroke=new Q(this.document,"stroke",this.getAttribute("stroke").getValue("none")),s.children=this.children,s.render(t),t.restore(),"strokeWidth"===o&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===a&&t.rotate(-r),t.translate(-n,-i)}}}]),r}(tp),tL=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="defs",t}return(0,l.Z)(r,[{key:"render",value:function(){}}]),r}(tp),tN=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="g",t}return(0,l.Z)(r,[{key:"getBoundingBox",value:function(t){var e=new tx;return this.children.forEach(function(r){e.addBoundingBox(r.getBoundingBox(t))}),e}}]),r}(tb),tz=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){(0,c.Z)(this,r),(a=e.call(this,t,n,i)).attributesToInherit=["gradientUnits"],a.stops=[];var a,o=(0,b.Z)(a),s=o.stops;return o.children.forEach(function(t){"stop"===t.type&&s.push(t)}),a}return(0,l.Z)(r,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(t,e,r){var n=this,a=this;this.getHrefAttribute().hasValue()&&(a=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(a));var o=a.stops,s=this.getGradient(t,e);if(!s)return this.addParentOpacity(r,o[o.length-1].color);if(o.forEach(function(t){s.addColorStop(t.offset,n.addParentOpacity(r,t.color))}),this.getAttribute("gradientTransform").hasValue()){var u=this.document,c=u.screen,l=c.MAX_VI
1RTUAL_PIXELS,h=c.viewPort,f=(0,i.Z)(h.viewPorts,1)[0],y=new tA(u,null);y.attributes.x=new Q(u,"x",-l/3),y.attributes.y=new Q(u,"y",-l/3),y.attributes.width=new Q(u,"width",l),y.attributes.height=new Q(u,"height",l);var g=new tN(u,null);g.attributes.transform=new Q(u,"transform",this.getAttribute("gradientTransform").getValue()),g.children=[y];var p=new tR(u,null);p.attributes.x=new Q(u,"x",0),p.attributes.y=new Q(u,"y",0),p.attributes.width=new Q(u,"width",f.width),p.attributes.height=new Q(u,"height",f.height),p.children=[g];var v=u.createCanvas(f.width,f.height),d=v.getContext("2d");return d.fillStyle=s,p.render(d),d.createPattern(v,"no-repeat")}return s}},{key:"inheritStopContainer",value:function(t){var e=this;this.attributesToInherit.forEach(function(r){!e.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&e.getAttribute(r,!0).setValue(t.getAttribute(r).getValue())})}},{key:"addParentOpacity",value:function(t,e){return t.hasValue()?new Q(this.document,"color",e).addOpacity(t).getColor():e}}]),r}(tp),tB=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="linearGradient",a.attributesToInherit.push("x1","y1","x2","y2"),a}return(0,l.Z)(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=r?e.getBoundingBox(t):null;if(r&&!n)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 i=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),a=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),o=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),s=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===o&&a===s?null:t.createLinearGradient(i,a,o,s)}}]),r}(tz),tI=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="radialGradient",a.attributesToInherit.push("cx","cy","r","fx","fy","fr"),a}return(0,l.Z)(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=e.getBoundingBox(t);if(r&&!n)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=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),a=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),o=i,s=a;this.getAttribute("fx").hasValue()&&(o=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(s=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var u=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return t.createRadialGradient(o,s,c,i,a,u)}}]),r}(tz),tF=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};
1function r(t,n,i){(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="stop";var a,o=Math.max(0,Math.min(1,a.getAttribute("offset").getNumber())),s=a.getStyle("stop-opacity"),u=a.getStyle("stop-color",!0);return""===u.getString()&&u.setValue("#000"),s.hasValue()&&(u=u.addOpacity(s)),a.offset=o,a.color=u.getColor(),a}return r}(tp),tj=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="animate",a.duration=0,a.initialValue=null,a.initialUnits="",a.removed=!1,a.frozen=!1,t.screen.animations.push((0,b.Z)(a)),a.begin=a.getAttribute("begin").getMilliseconds(),a.maxDuration=a.begin+a.getAttribute("dur").getMilliseconds(),a.from=a.getAttribute("from"),a.to=a.getAttribute("to"),a.values=a.getAttribute("values"),a.values.hasValue()&&a.values.setValue(a.values.getString().split(";")),a}return(0,l.Z)(r,[{key:"getProperty",value:function(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}},{key:"calcValue",value:function(){var t=this.initialUnits,e=this.getProgress(),r=e.progress,n=e.from,i=e.to,a=n.getNumber()+(i.getNumber()-n.getNumber())*r;return"%"===t&&(a*=100),"".concat(a).concat(t)}},{key:"update",value:function(t){var e=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==n||this.frozen){if("remove"===n&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();return!1}this.duration+=t;var i=!1;if(this.begin<this.duration){var a=this.calcValue(),o=this.getAttribute("type");if(o.hasValue()){var s=o.getString();a="".concat(s,"(").concat(a,")")}r.setValue(a),i=!0}return i}},{key:"getProgress",value:function(){var t=this.document,e=this.values,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var n=r.progress*(e.getValue().length-1),i=Math.floor(n),a=Math.ceil(n);r.from=new Q(t,"from",parseFloat(e.getValue()[i])),r.to=new Q(t,"to",parseFloat(e.getValue()[a])),r.progress=(n-i)/(a-i)}else r.from=this.from,r.to=this.to;return r}}]),r}(tp),t$=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="animateColor",t}return(0,l.Z)(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=new(g())(r.getColor()),a=new(g())(n.getColor());if(i.ok&&a.ok){var o=i.r+(a.r-i.r)*e,s=i.g+(a.g-i.g)*e,u=i.b+(a.b-i.b)*e;return"rgb(".concat(parseInt(o,10),", ").concat(parseInt(s,10),", ").concat(parseInt(u,10),")")}return this.getAttribute("from").getColor()}}]),r}(tj),tq=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="animateTransform",t}return(0,l.Z)(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=R(r.getString()),a=R(n.get
1String());return i.map(function(t,r){return t+(a[r]-t)*e}).join(" ")}}]),r}(tj);function tG(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var tX=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="font",a.glyphs={},a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber();var a,o,s=t.definitions,u=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return tG(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tG(t,void 0)}}(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i,a=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){o=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}((0,b.Z)(a).children);try{for(u.s();!(o=u.n()).done;){var l=o.value;switch(l.type){case"font-face":a.fontFace=l;var h=l.getStyle("font-family");h.hasValue()&&(s[h.getString()]=(0,b.Z)(a));break;case"missing-glyph":a.missingGlyph=l;break;case"glyph":l.arabicForm?(a.isRTL=!0,a.isArabic=!0,void 0===a.glyphs[l.unicode]&&(a.glyphs[l.unicode]={}),a.glyphs[l.unicode][l.arabicForm]=l):a.glyphs[l.unicode]=l}}}catch(t){u.e(t)}finally{u.f()}return a}return(0,l.Z)(r,[{key:"render",value:function(){}}]),r}(tp),tW=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="font-face",a.ascent=a.getAttribute("ascent").getNumber(),a.descent=a.getAttribute("descent").getNumber(),a.unitsPerEm=a.getAttribute("units-per-em").getNumber(),a}return r}(tp),tH=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="missing-glyph",t.horizAdvX=0,t}return r}(tZ),t_=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="glyph",a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber(),a.unicode=a.getAttribute("unicode").getString(),a.arabicForm=a.getAttribute("arabic-form").getString(),a}return r}(tZ),tY=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="tref",t}return(0,l.Z)(r,[{key:"getText",value:function(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}]),r}(tk),tU=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};
1function r(t,n,i){(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="a";var a,o=n.childNodes,s=o[0],u=o.length>0&&Array.from(o).every(function(t){return 3===t.nodeType});return a.hasText=u,a.text=u?a.getTextFromNode(s):"",a}return(0,l.Z)(r,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(t){if(this.hasText){(0,x.Z)((0,v.Z)(r.prototype),"renderChildren",this).call(this,t);var e=this.document,n=this.x,i=this.y,a=e.screen.mouse,o=new Q(e,"fontSize",tm.parse(e.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new tx(n,i-o.getPixels("y"),n+this.measureText(t),i))}else if(this.children.length>0){var s=new tN(this.document,null);s.children=this.children,s.parent=this,s.render(t)}}},{key:"onClick",value:function(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){this.document.ctx.canvas.style.cursor="pointer"}}]),r}(tk);function tQ(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var tJ=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="textPath",a.textWidth=0,a.textHeight=0,a.pathLength=-1,a.glyphInfo=null,a.letterSpacingCache=[],a.measuresCache=new Map([["",0]]);var a,o=a.getHrefAttribute().getDefinition();return a.text=a.getTextFromNode(),a.dataArray=a.parsePathData(o),a}return(0,l.Z)(r,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(t){var e=this.dataArray;t&&t.beginPath(),e.forEach(function(e){var r=e.command,n=e.points;switch(r){case"L":t&&t.lineTo(n[0],n[1]);break;case"M":t&&t.moveTo(n[0],n[1]);break;case"C":t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"Q":t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case"A":var i=n[0],a=n[1],o=n[2],s=n[3],u=n[4],c=n[5],l=n[6],h=n[7],f=o>s?1:o/s,y=o>s?s/o:1;t&&(t.translate(i,a),t.rotate(l),t.scale(f,y),t.arc(0,0,o>s?o:s,u,u+c,!!(1-h)),t.scale(1/f,1/y),t.rotate(-l),t.translate(-i,-a));break;case"z":t&&t.closePath()}})}},{key:"renderChildren",value:function(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),n=this.glyphInfo,i=t.fillStyle;"underline"===e&&t.beginPath(),n.forEach(function(i,a){var o=i.p0,s=i.p1,u=i.text;t.save(),t.translate(o.x,o.y),t.rotate(n[a].rotation),t.fillStyle&&t.fillText(u,0,0),t.strokeStyle&&t.strokeText(u,0,0),t.restore(),"underline"===e&&(0===a&&t.moveTo(o.x,o.y+r/8),t.lineTo(s.x,s.y+r/5))}),"underline"===e&&(t.lineWidth=r/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}},{key:"findSegmentToFitChar",value:function(t,e,r,n,i,a,o,s){var u=a,c=this.measureText(t,o);" "===o&&"justify"===e&&r<n&&(c+=(n-r)/i),s>-1&&(u+=this.getLetterSpacingAt(s));var l=this.textHeight/20,h={p0:this.getEquidistantPointOnPath(u,l),p1:this.getEquidistantPointOnPath(u+c,l)};return{offset:u+=c,segment:h}}},{key:"measureText",value:function(t,e){var r=this.measuresCache,n=e||this.getText();if(r.has(n))return r.get(n);var i=this.measureTargetText(t,n);return r.set(n,i),i}},{key:"setTextData",value:function(t){var e=this;if(!this.glyphInfo){var r=this.getText(),n=r.split(""),i=r.split(" ").length-1,a=R(this.parent.getAttribute("dx").getString("0")),o=this.parent.getStyle("text-anchor").getString("start"),s=this.getStyle("letter-spacing"),u=this.parent.getStyle("letter-spacing"),c=0;s.hasValue()&&"inherit"!==s.getValue()?s.hasValue()&&"initial"!==s.getValue()&&"unset"!==s.getValue()&&(c=s.getPixels()):c=u.getPixels();var l=[],h=r.length;this.letterSpacingCache=l;for(var f=0;f<h;f++)l.push(void 0!==a[f]?a[f]:c);var y=l.reduce(function(t,e){return t+e||0},0);this.textWidth=this.measureText(t),this.textHeight=this.getFontSize();var g=Math.max(this.textWidth+y,0);this.glyphInfo=[];var p=this.getPathLength(),v=this.getStyle("startOffset").getNumber(0)*p,d=0;("middle"===o||"center"===o)&&(d=-g/2),("end"===o||"right"===o)&&(d=-g),d+=v,n.forEac
1h(function(r,a){var s=e.findSegmentToFitChar(t,o,g,p,i,d,r,a),u=s.offset,c=s.segment;if(d=u,c.p0&&c.p1){var l=e.getLineLength(c.p0.x,c.p0.y,c.p1.x,c.p1.y),h=e.getPointOnLine(0+l/2,c.p0.x,c.p0.y,c.p1.x,c.p1.y),f=Math.atan2(c.p1.y-c.p0.y,c.p1.x-c.p0.x);e.glyphInfo.push({transposeX:h.x,transposeY:h.y,text:n[a],p0:c.p0,p1:c.p1,rotation:f})}})}}},{key:"parsePathData",value:function(t){if(this.pathLength=-1,!t)return[];var e=[],r=t.pathParser;for(r.reset();!r.isEnd();){var n=r.current,i=n?n.x:0,a=n?n.y:0,o="",s=[];r.nextCommand();var u=r.command.toUpperCase();switch(r.command){case"M":case"m":o=this.pathM(r,s);break;case"L":case"l":o=this.pathL(r,s);break;case"H":case"h":o=this.pathH(r,s);break;case"V":case"v":o=this.pathV(r,s);break;case"C":case"c":this.pathC(r,s);break;case"S":case"s":o=this.pathS(r,s);break;case"Q":case"q":this.pathQ(r,s);break;case"T":case"t":o=this.pathT(r,s);break;case"A":case"a":s=this.pathA(r);break;case"Z":case"z":r.current=r.start}"Z"!==u?e.push({command:o||u,points:s,start:{x:i,y:a},pathLength:this.calcLength(i,a,o||u,s)}):e.push({command:"z",points:[],pathLength:0})}return e}},{key:"pathM",value:function(t,e){var r=t.getAsCurrentPoint();for(e.push(r.x,r.y),t.start=t.current;!t.isCommandOrEnd();){var n=t.getAsCurrentPoint();return e.push(n.x,n.y),"L"}}},{key:"pathL",value:function(t,e){for(;!t.isCommandOrEnd();){var r=t.getAsCurrentPoint();e.push(r.x,r.y)}return"L"}},{key:"pathH",value:function(t,e){for(;!t.isCommandOrEnd();){var r=t.current,n=new K((t.isRelativeCommand()?r.x:0)+t.getScalar(),r.y);e.push(n.x,n.y),t.current=n}return"L"}},{key:"pathV",value:function(t,e){for(;!t.isCommandOrEnd();){var r=t.current,n=new K(r.x,(t.isRelativeCommand()?r.y:0)+t.getScalar());e.push(n.x,n.y),t.current=n}return"L"}},{key:"pathC",value:function(t,e){for(;!t.isCommandOrEnd();){var r=t.getPoint(),n=t.getAsControlPoint(),i=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y,i.x,i.y)}}},{key:"pathS",value:function(t,e){for(;!t.isCommandOrEnd();){var r=t.getReflectedControlPoint(),n=t.getAsControlPoint(),i=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y,i.x,i.y)}return"C"}},{key:"pathQ",value:function(t,e){for(;!t.isCommandOrEnd();){var r=t.getAsControlPoint(),n=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y)}}},{key:"pathT",value:function(t,e){for(;!t.isCommandOrEnd();){var r=t.getReflectedControlPoint();t.control=r;var n=t.getAsCurrentPoint();e.push(r.x,r.y,n.x,n.y)}return"Q"}},{key:"pathA",value:function(t){for(;!t.isCommandOrEnd();){var e=t.current,r=t.getScalar(),n=t.getScalar(),i=t.getScalar()*(Math.PI/180),a=t.getScalar(),o=t.getScalar(),s=t.getAsCurrentPoint(),u=new K(Math.cos(i)*(e.x-s.x)/2+Math.sin(i)*(e.y-s.y)/2,-Math.sin(i)*(e.x-s.x)/2+Math.cos(i)*(e.y-s.y)/2),c=Math.pow(u.x,2)/Math.pow(r,2)+Math.pow(u.y,2)/Math.pow(n,2);c>1&&(r*=Math.sqrt(c),n*=Math.sqrt(c));var l=(a===o?-1:1)*Math.sqrt((Math.pow(r,2)*Math.pow(n,2)-Math.pow(r,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(r,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)));isNaN(l)&&(l=0);var h=new K(l*r*u.y/n,-(l*n)*u.x/r),f=new K((e.x+s.x)/2+Math.cos(i)*h.x-Math.sin(i)*h.y,(e.y+s.y)/2+Math.sin(i)*h.x+Math.cos(i)*h.y),y=q([1,0],[(u.x-h.x)/r,(u.y-h.y)/n]),g=[(u.x-h.x)/r,(u.y-h.y)/n],p=[(-u.x-h.x)/r,(-u.y-h.y)/n],v=q(g,p);return -1>=$(g,p)&&(v=Math.PI),$(g,p)>=1&&(v=0),0===o&&v>0&&(v-=2*Math.PI),1===o&&v<0&&(v+=2*Math.PI),[f.x,f.y,r,n,y,v,i,o]}}},{key:"calcLength",value:function(t,e,r,n){var i=0,a=null,o=null,s=0;switch(r){case"L":return this.getLineLength(t,e,n[0],n[1]);case"C":for(s=.01,i=0,a=this.getPointOnCubicBezier(0,t,e,n[0],n[1],n[2],n[3],n[4],n[5]);s<=1;s+=.01)o=this.getPointOnCubicBezier(s,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;return i;case"Q":for(s=.01,i=0,a=this.getPointOnQuadraticBezier(0,t,e,n[0],n[1],n[2],n[3]);s<=1;s+=.01)o=this.getPointOnQuadraticBezier(s,t,e,n[0],n[1],n[2],n[3]),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;return i;case"A":i=0;var u=n[4],c=n[5],l=n[4]+c,h=Math.PI/180;if(Math.abs(u-l)<h&&(h=Math.abs(u-l)),a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),c<0)for(s=u-h;s>l;s-=h)o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],s,0),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(s=u+h;s<l;s+=h)o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],s,0),i+=this.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),i+=this.getLineLength(a.x,a.y,o.x,o.y)}return 0}},{key:"getPointOnLine",value:function(t,e,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,s=(i-r)/(n-e+F),u=Math.sqrt(t*t/(1+s*s));n<e&&(u*=-1);var c=s*u,l=null;if(n===e)l={x:a,y:o+c};else if((o-r)/(a-e+F)===s)l={x:a+u,y:o+c};else{var h=0,f=0,y=this.getLineLength(e,r,n,i);if(y<F)return null;var g=(a-e)*(n-e)+(o-r)*(i-r);g/=y*y,h=e+g*(n-e),f=r+g*(i-r);var p=this.getLineLength(a,o,h,f),v=Math.sqrt(t*t-p*p);u=Math.sqrt(v*v/(1+s*s)),n<e&&(u*=-1),c=s*u,l={x:h+u,y:f+c}}return l}},{key:"getPointOnPath",value:function(t){var e=this.getPathLength(),r=0,n=null;if(t<-.00005||t-5e-5>e)return null;var i,a=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return tQ(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tQ(t,void 0)}}(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i,a=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){o=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(this.dataArray);try{for(a.s();!(i=a.n()).done;){var o=i.value;if(o&&(o.pathLength<5e-5||r+o.pathLength+5e-5<t)){r+=o.pathLength;continue}var s=t-r,u=0;switch(o.command){case"L":n=this.getPointOnLine(s,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case"A":var c=o.points[4],l=o.points[5],h=o.points[4]+l;if(u=c+s/o.pathLength*l,l<0&&u<h||l>=0&&u>h)break;n=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],u,o.points[6]);break;case"C":(u=s/o.pathLength)>1&&(u=1),n=this.getPointOnCubicBezier(u,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case"Q":(u=s/o.pathLength)>1&&(u=1),n=this.getPointOnQuadraticBezier(u,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3])}if(n)return n;break}}catch(t){a.e(t)}finally{a.f()}return null}},{key:"getLineLength",value:function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))}},{key:"getPathLength",value:function(){return -1===this.pathLength&&(this.pathLength=this.dataArray.reduce(function(t,e){return e.pathLength>0?t+e.pathLength:t},0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(t,e,r,n,i,a,o,s,u){return{x:s*G(t)+a*X(t)+n*W(t)+e*H(t),y:u*G(t)+o*X(t)+i*W(t)+r*H(t)}}},{key:"getPointOnQuadraticBezier",value:function(t,e,r,n,i,a,o){return{x:t*t*a+n*Y(t)+e*U(t),y:t*t*o+i*Y(t)+r*U(t)}}},{key:"getPointOnEllipticalArc",value:function(t,e,r,n,i,a){var o=Math.cos(a),s=Math.sin(a),u={x:r*Math.cos(i),y:n*Math.sin(i)};return{x:t+(u.x*o-u.y*s),y:e+(u.x*s+u.y*o)}}},{key:"buildEquidistantCache",value:function(t,e){var r=this.getPathLength(),n=e||.25,i=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==n){this.equidistantCache={step:i,precision:n,points:[]};for(var a=0,o=0;o<=r;o+=n){var s=this.getPointOnPath(o),u=this.getPointOnPath(o+n);s&&u&&(a+=this.getLineLength(s.x,s.y,u.x,u.y))>=i&&(this.equidistantCache.points.push({x:s.x,y:s.y,distance:o}),a-=i)}}}},{key:"getEquidistantPointOnPath",value:function(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var n=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}]),r}(tk),tK=function(t){(0,d.Z)(i,t);var e,r,n=function(){var t,e=(0,v.Z)(i);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function i(t,e,r){(0,c.Z)(this,i),(a=n.call(this,t,e,r)).type="image",a.loaded=!1;var a,o=a.getHrefAttribute().getString();if(!o)return(0,p.Z)(a);var s=/\.svg$/.test(o);return t.images.push((0,b.Z)(a)),s?a.loadSvg(o):a.loadImage(o),a.isSvg=s,a}return(0,l.Z)(i,[{key:"loadImage",value:(e=(0,s.Z)(o().mark(function t(e){var r;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.createImage(e);case 3:r=t.sent,this.image=r,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error('Error while loading image "'.concat(e,'":'),t.t0);case 10:this.loaded=!0;case 11:case"end":return t.stop()}},t,this,[[0,7]])})),function(t){return e.apply(this,arguments)})},{key:"loadSvg",value:(r=(0,s.Z)(o().mark(function t(e){var r,n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.fetch(e);case 3:return r=t.sent,t.next=6,r.text();case 6:n=t.sent,this.image=n,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.error('Error while loading image "'.concat(e,'":'),t.t0);case 13:this.loaded=!0;case 14:case"end":return t.stop()}},t,this,[[0,10]])})),function(t){return r.apply(this,arguments)})},{key:"renderChildren",value:function(t){var e=this.document,r=this.image,n=this.loaded,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");
1if(n&&r&&o&&s){if(t.save(),this.isSvg)e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:i,offsetY:a,scaleWidth:o,scaleHeight:s}).render();else{var u=this.image;t.translate(i,a),e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:o,desiredWidth:u.width,height:s,desiredHeight:u.height}),this.loaded&&(void 0===u.complete||u.complete)&&t.drawImage(u,0,0)}t.restore()}}},{key:"getBoundingBox",value:function(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y");return new tx(t,e,t+this.getStyle("width").getPixels("x"),e+this.getStyle("height").getPixels("y"))}}]),i}(tb),t0=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="symbol",t}return(0,l.Z)(r,[{key:"render",value:function(t){}}]),r}(tb),t1=function(){var t;function e(t){(0,c.Z)(this,e),this.document=t,this.loaded=!1,t.fonts.push(this)}return(0,l.Z)(e,[{key:"load",value:(t=(0,s.Z)(o().mark(function t(e,r){var n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=this.document,t.next=4,n.canvg.parser.load(r);case 4:Array.from(t.sent.getElementsByTagName("font")).forEach(function(t){var r=n.createElement(t);n.definitions[e]=r}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.error('Error while loading font "'.concat(r,'":'),t.t0);case 12:this.loaded=!0;case 13:case"end":return t.stop()}},t,this,[[0,9]])})),function(e,r){return t.apply(this,arguments)})}]),e}(),t2=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="style",w(Array.from(n.childNodes).map(function(t){return t.data}).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach(function(e){var r=e.trim();if(r){var n=r.split("{"),i=n[0].split(","),a=n[1].split(";");i.forEach(function(e){var r=e.trim();if(r){var n=t.styles[r]||{};if(a.forEach(function(e){var r=e.indexOf(":"),i=e.substr(0,r).trim(),a=e.substr(r+1,e.length-r).trim();i&&a&&(n[i]=new Q(t,i,a))}),t.styles[r]=n,t.stylesSpecificity[r]=I(r),"@font-face"===r){var i=n["font-family"].getString().replace(/"|'/g,"");n.src.getString().split(",").forEach(function(e){if(e.indexOf('format("svg")')>0){var r=M(e);r&&new t1(t).load(i,r)}})}}})}}),a}return r}(tp);t2.parseExternalUrl=M;var t3=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="use",t}return(0,l.Z)(r,[{key:"setContext",value:function(t){(0,x.Z)((0,v.Z)(r.prototype),"setContext",this).call(this,t);var e=this.getAttribute("x"),n=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"))}},{key:"path",value:function(t){var e=this.element;e&&e.path(t)}},{key:"renderChildren",value:function(t){var e=this.document,r=this.element;if(r){var n=r;if("symbol"===r.type&&((n=new tR(e,null)).attributes.viewBox=new Q(e,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new Q(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new Q(e,"overflow",r.getAttribute("overflow").getString()),n.children=r.children),"svg"===n.type){var i=this.getStyle("width",!1,!0),a=this.getStyle("height",!1,!0);i.hasValue()&&(n.attributes.width=new Q(e,"width",i.getString())),a.hasValue()&&(n.attributes.height=new Q(e,"height",a.getString()))}var o=n.parent;n.parent=this,n.render(t),n.parent=o}}},{key:"getBoundingBox",value:function(t){var e=this.element;return e?e.getBoundingBox(t):null}},{key:"elementTransform",value:function(){var t=this.document,e=this.element;return tg.fromElement(t,e)}},{key:"element",get:function(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),r}(tb);function t5(t,e,r){var n=t[e];return n*(n<0?r-255:r)}
1function t4(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n}var t7=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="feColorMatrix";var a,o=R(a.getAttribute("values").getString());switch(a.getAttribute("type").getString("matrix")){case"saturate":var s=o[0];o=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var u=o[0]*Math.PI/180;o=[t4(u,.213,.787,-.213),t4(u,.715,-.715,-.715),t4(u,.072,-.072,.928),0,0,t4(u,.213,-.213,.143),t4(u,.715,.285,.14),t4(u,.072,-.072,-.283),0,0,t4(u,.213,-.213,-.787),t4(u,.715,-.715,.715),t4(u,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":o=[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 a.matrix=o,a.includeOpacity=a.getAttribute("includeOpacity").hasValue(),a}return(0,l.Z)(r,[{key:"apply",value:function(t,e,r,n,i){for(var a=this.includeOpacity,o=this.matrix,s=t.getImageData(0,0,n,i),u=0;u<i;u++)for(var c=0;c<n;c++){var l,h,f,y,g,p,v,d,m,x,b,k,S,w,P,Z,R,A,C,M,E=(l=s.data)[u*n*4+4*c+0],V=(h=s.data)[u*n*4+4*c+1],D=(f=s.data)[u*n*4+4*c+2],T=(y=s.data)[u*n*4+4*c+3],O=t5(o,0,E)+t5(o,1,V)+t5(o,2,D)+t5(o,3,T)+t5(o,4,1),L=t5(o,5,E)+t5(o,6,V)+t5(o,7,D)+t5(o,8,T)+t5(o,9,1),N=t5(o,10,E)+t5(o,11,V)+t5(o,12,D)+t5(o,13,T)+t5(o,14,1),z=t5(o,15,E)+t5(o,16,V)+t5(o,17,D)+t5(o,18,T)+t5(o,19,1);a&&(O=L=N=0,z*=T/255),g=s.data,p=c,v=u,d=O,g[v*n*4+4*p+0]=d,m=s.data,x=c,b=u,k=L,m[b*n*4+4*x+1]=k,S=s.data,w=c,P=u,Z=N,S[P*n*4+4*w+2]=Z,R=s.data,A=c,C=u,M=z,R[C*n*4+4*A+3]=M}t.clearRect(0,0,n,i),t.putImageData(s,0,0)}}]),r}(tp),t8=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="mask",t}return(0,l.Z)(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var u=new tx;this.children.forEach(function(e){u.addBoundingBox(e.getBoundingBox(t))}),i=Math.floor(u.x1),a=Math.floor(u.y1),o=Math.floor(u.width),s=Math.floor(u.height)}var c=this.removeStyles(e,r.ignoreStyles),l=n.createCanvas(i+o,a+s),h=l.getContext("2d");n.screen.setDefaults(h),this.renderChildren(h),new t7(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(h,0,0,i+o,a+s);var f=n.createCanvas(i+o,a+s),y=f.getContext("2d");n.screen.setDefaults(y),e.render(y),y.globalCompositeOperation="destination-in",y.fillStyle=h.createPattern(l,"no-repeat"),y.fillRect(0,0,i+o,a+s),t.fillStyle=y.createPattern(f,"no-repeat"),t.fillRect(0,0,i+o,a+s),this.restoreStyles(e,c)}},{key:"render",value:function(t){}}]),r}(tp);t8.ignoreStyles=["mask","transform","clip-path"];var t9=function(){},t6=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="clipPath",t}return(0,l.Z)(r,[{key:"apply",value:function(t){var e=this.document,r=Reflect.getPrototypeOf(t),n=t.beginPath,i=t.closePath;r&&(r.beginPath=t9,r.closePath=t9),Reflect.apply(n,t,[]),this.children.forEac
1h(function(n){if(void 0!==n.path){var a=void 0!==n.elementTransform?n.elementTransform():null;a||(a=tg.fromElement(e,n)),a&&a.apply(t),n.path(t),r&&(r.closePath=i),a&&a.unapply(t)}}),Reflect.apply(i,t,[]),t.clip(),r&&(r.beginPath=n,r.closePath=i)}},{key:"render",value:function(t){}}]),r}(tp),et=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="filter",t}return(0,l.Z)(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.children,a=e.getBoundingBox(t);if(a){var o=0,s=0;i.forEach(function(t){var e=t.extraFilterDistance||0;o=Math.max(o,e),s=Math.max(s,e)});var u=Math.floor(a.width),c=Math.floor(a.height),l=u+2*o,h=c+2*s;if(!(l<1)&&!(h<1)){var f=Math.floor(a.x),y=Math.floor(a.y),g=this.removeStyles(e,r.ignoreStyles),p=n.createCanvas(l,h),v=p.getContext("2d");n.screen.setDefaults(v),v.translate(-f+o,-y+s),e.render(v),i.forEach(function(t){"function"==typeof t.apply&&t.apply(v,0,0,l,h)}),t.drawImage(p,0,0,l,h,f-o,y-s,l,h),this.restoreStyles(e,g)}}}},{key:"render",value:function(t){}}]),r}(tp);et.ignoreStyles=["filter","transform","clip-path"];var ee=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="feDropShadow",a.addStylesFromStyleDefinition(),a}return(0,l.Z)(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(tp),er=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="feMorphology",t}return(0,l.Z)(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(tp),en=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="feComposite",t}return(0,l.Z)(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(tp),ei=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(t,n,i){var a;return(0,c.Z)(this,r),(a=e.call(this,t,n,i)).type="feGaussianBlur",a.blurRadius=Math.floor(a.getAttribute("stdDeviation").getNumber()),a.extraFilterDistance=a.blurRadius,a}return(0,l.Z)(r,[{key:"apply",value:function(t,e,r,n,i){var a=this.document,o=this.blurRadius,s=a.window?a.window.document.body:null,u=t.canvas;u.id=a.getUniqueId(),s&&(u.style.display="none",s.appendChild(u)),(0,k.vR)(u,e,r,n,i,o),s&&s.removeChild(u)}}]),r}(tp),ea=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="title",t}return r}(tp),eo=function(t){(0,d.Z)(r,t);var e=function(){var t,e=(0,v.Z)(r);return t=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?e.apply(this,arguments):Reflect.construct(e,arguments,(0,v.Z)(this).constructor),(0,p.Z)(this,t)};function r(){var t;return(0,c.Z)(this,r),t=e.apply(this,arguments),t.type="desc",t}return r}(tp);function es(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function eu(){return(eu=(0,s.Z)(o().mark(function t(e){var r,n,i=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],n=document.createElement("img"),r&&(n.crossOrigin="Anonymous"),t.abrupt("return",new Promise(function(t,r){n.onload=function(){t(n)},n.onerror=function(){r()},n.src=e}));case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}var ec=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.rootEmSize,i=r.emSize,a=r.createCanvas,o=void 0===a?t.createCanvas:a,s=r.createImage,u=void 0===s?t.createImage:s,l=r.anonymousCrossOrigin;(0,c.Z)(this,t),this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=void 0===n?12:n,this.emSize=void 0===i?12:i,this.createCanvas=o,this.createImage=this.bindCreateImage(u,l),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return(0,l.Z)(t,[{key:"bindCreateImage",value:function(t,e){return"boolean"==typeof e?function(r,n){return t(r,"boolean"==typeof n?n:e)}:t}},{key:"popEmSize",value:function(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){return this.images.every(function(t){return t.loaded})}},{key:"isFontsLoaded",value:function(){return this.fonts.every(function(t){return t.loaded})}},{key:"createDocumentElement",value:function(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}},{key:"createElement",value:function(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=t.elementTypes[r];return void 0!==n?new n(this,e):new tv(this,e)}},{key:"createTextNode",value:function(t){return new tw(this,t)}}
1,{key:"setViewBox",value:function(t){this.screen.setViewBox(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?es(Object(r),!0).forEach(function(e){(0,u.Z)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):es(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({document:this},t))}},{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 t=this.emSizeStack;return t[t.length-1]},set:function(t){this.emSizeStack.push(t)}}]),t}();function el(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function eh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?el(Object(r),!0).forEach(function(e){(0,u.Z)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):el(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}ec.createCanvas=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r},ec.createImage=function(t){return eu.apply(this,arguments)},ec.elementTypes={svg:tR,rect:tA,circle:tC,ellipse:tM,line:tE,polyline:tV,polygon:tD,path:tZ,pattern:tT,marker:tO,defs:tL,linearGradient:tB,radialGradient:tI,stop:tF,animate:tj,animateColor:t$,animateTransform:tq,font:tX,"font-face":tW,"missing-glyph":tH,glyph:t_,text:tk,tspan:tS,tref:tY,a:tU,textPath:tJ,image:tK,g:tN,symbol:t0,style:t2,use:t3,mask:t8,clipPath:t6,filter:et,feDropShadow:ee,feMorphology:er,feComposite:en,feColorMatrix:t7,feGaussianBlur:ei,title:ea,desc:eo};var ef=function(){var t,e;function r(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,c.Z)(this,r),this.parser=new to(n),this.screen=new tn(t,n),this.options=n;var i=new ec(this,n),a=i.createDocumentElement(e);this.document=i,this.documentElement=a}return(0,l.Z)(r,[{key:"fork",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.from(t,e,eh({},this.options,{},n))}},{key:"forkString",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.fromString(t,e,eh({},this.options,{},n))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:(t=(0,s.Z)(o().mark(function t(){var e,r=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.start(eh({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},e)),t.next=4,this.ready();case 4:this.stop();case 5:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.documentElement,r=this.screen,n=this.options;r.start(e,eh({enableRedraw:!0},n,{},t))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,r)}}],[{key:"from",value:(e=(0,s.Z)(o().mark(function t(e,n){var i,a,s,u=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=new to(i=u.length>2&&void 0!==u[2]?u[2]:{}),t.next=4,a.parse(n);case 4:return s=t.sent,t.abrupt("return",new r(e,s,i));case 6:case"end":return t.stop()}},t)})),function(t,r){return e.apply(this,arguments)})},{key:"fromString",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new r(t,new to(n).parseFromString(e),n)}}]),r}(),ey=Object.freeze({__proto__:null,offscreen:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.DOMParser,r={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,createCanvas:function(t,e){return new OffscreenCanvas(t,e)},createImage:function(t){return(0,s.Z)(o().mark(function e(){var r,n,i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return r=e.sent,e.next=5,r.blob();case 5:return n=e.sent,e.next=8,createImageBitmap(n);case 8:return i=e.sent,e.abrupt("return",i);case 10:case"end":return e.stop()}},e)}))()}};return("undefined"!=typeof DOMParser||void 0===e)&&Reflect.deleteProperty(r,"DOMParser"),r},node:function(t){var e=t.DOMParser,r=t.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:t.fetch,createCanvas:r.createCanvas,createImage:r.loadImage}}});e.default=ef}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.