react-node-easy-crud
Version:
create crud table in react which can work flowlessly with node-easy-crud
1 lines • 196 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],Array(417).concat([function(t,e,r){"use strict";r.r(e),function(t){r.d(e,"AElement",(function(){return _e})),r.d(e,"AnimateColorElement",(function(){return Re})),r.d(e,"AnimateElement",(function(){return ke})),r.d(e,"AnimateTransformElement",(function(){return Ee})),r.d(e,"BoundingBox",(function(){return Lt})),r.d(e,"CB1",(function(){return J})),r.d(e,"CB2",(function(){return tt})),r.d(e,"CB3",(function(){return et})),r.d(e,"CB4",(function(){return rt})),r.d(e,"Canvg",(function(){return Dr})),r.d(e,"CircleElement",(function(){return Zt})),r.d(e,"ClipPathElement",(function(){return lr})),r.d(e,"DefsElement",(function(){return le})),r.d(e,"DescElement",(function(){return Rr})),r.d(e,"Document",(function(){return Tr})),r.d(e,"Element",(function(){return Et})),r.d(e,"EllipseElement",(function(){return Jt})),r.d(e,"FeColorMatrixElement",(function(){return ar})),r.d(e,"FeCompositeElement",(function(){return xr})),r.d(e,"FeDropShadowElement",(function(){return gr})),r.d(e,"FeGaussianBlurElement",(function(){return wr})),r.d(e,"FeMorphologyElement",(function(){return dr})),r.d(e,"FilterElement",(function(){return pr})),r.d(e,"Font",(function(){return Vt})),r.d(e,"FontElement",(function(){return Me})),r.d(e,"FontFaceElement",(function(){return Ve})),r.d(e,"GElement",(function(){return pe})),r.d(e,"GlyphElement",(function(){return je})),r.d(e,"GradientElement",(function(){return ge})),r.d(e,"ImageElement",(function(){return He})),r.d(e,"LineElement",(function(){return ee})),r.d(e,"LinearGradientElement",(function(){return de})),r.d(e,"MarkerElement",(function(){return ce})),r.d(e,"MaskElement",(function(){return sr})),r.d(e,"Matrix",(function(){return xt})),r.d(e,"MissingGlyphElement",(function(){return Ne})),r.d(e,"Mouse",(function(){return ct})),r.d(e,"PSEUDO_ZERO",(function(){return Y})),r.d(e,"Parser",(function(){return gt})),r.d(e,"PathElement",(function(){return Ut})),r.d(e,"PathParser",(function(){return Gt})),r.d(e,"PatternElement",(function(){return ue})),r.d(e,"Point",(function(){return st})),r.d(e,"PolygonElement",(function(){return oe})),r.d(e,"PolylineElement",(function(){return ne})),r.d(e,"Property",(function(){return at})),r.d(e,"QB1",(function(){return nt})),r.d(e,"QB2",(function(){return it})),r.d(e,"QB3",(function(){return ot})),r.d(e,"RadialGradientElement",(function(){return xe})),r.d(e,"RectElement",(function(){return Yt})),r.d(e,"RenderedElement",(function(){return It})),r.d(e,"Rotate",(function(){return dt})),r.d(e,"SVGElement",(function(){return Ht})),r.d(e,"SVGFontLoader",(function(){return Qe})),r.d(e,"Scale",(function(){return mt})),r.d(e,"Screen",(function(){return ht})),r.d(e,"Skew",(function(){return wt})),r.d(e,"SkewX",(function(){return kt})),r.d(e,"SkewY",(function(){return Rt})),r.d(e,"StopElement",(function(){return we})),r.d(e,"StyleElement",(function(){return Ke})),r.d(e,"SymbolElement",(function(){return Ye})),r.d(e,"TRefElement",(function(){return Be})),r.d(e,"TSpanElement",(function(){return Ft})),r.d(e,"TextElement",(function(){return zt})),r.d(e,"TextPathElement",(function(){return Ue})),r.d(e,"TitleElement",(function(){return kr})),r.d(e,"Transform",(function(){return At})),r.d(e,"Translate",(function(){return yt})),r.d(e,"UnknownElement",(function(){return Tt})),r.d(e,"UseElement",(function(){return tr})),r.d(e,"ViewPort",(function(){return ut})),r.d(e,"compressSpaces",(function(){return D})),r.d(e,"getSelectorSpecificity",(function(){return X})),r.d(e,"normalizeAttributeName",(function(){return j})),r.d(e,"normalizeColor",(function(){return B})),r.d(e,"parseExternalUrl",(function(){return z})),r.d(e,"presets",(function(){return Vr})),r.d(e,"toNumbers",(function(){return N})),r.d(e,"trimLeft",(function(){return V})),r.d(e,"trimRight",(function(){return L})),r.d(e,"vectorMagnitude",(function(){return Q})),r.d(e,"vectorsAngle",(function(){return K})),r.d(e,"vectorsRatio",(function(){return Z}));r(535),r(506),r(538),r(539),r(540),r(541);var n=r(229),i=r.n(n),o=(r(542),r(545),r(546),r(547),r(548),r(549),r(550),r(551)),a=r.n(o),u=r(553),s=r.n(u),c=r(38),f=r.n(c),l=r(31),h=r.n(l),p=r(32),v=r.n(p),g=(r(554),r(555),r(556),r(558),r(560),r(566),r(567)),y=r.n(g),d=(r(569),r(570)),m=r.n(d),x=(r(571),r(573),r(40)),b=r.n(x),w=r(37),S=r.n(w),k=r(39),P=r.n(k),R=(r(574),r(576),r(577),r(578),r(579),r(582),r(116)),A=r.n(R),E=(r(584),r(585),r(586)),C=r.n(E),T=(r(588),r(589),r(591),r(52)),O=r.n(T),M=(r(533),r(592),r(593),r(594),r(595),r(596),r(600),r(601),r(602));function D(t){return t.replace(/(?!\u3000)\s+/gm," ")}function V(t){return t.replace(/^[\n \t]+/,"")}function L(t){return t.replace(/[\n \t]+$/,"")}function N(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var I=/^[A-Z-]+$/;function j(t){return I.test(t)?t.toLowerCase():t}function z(t){var e=t.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return e[2]||e[3]||e[4]}function B(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 F=/(\[[^\]]+\])/g,_=/(#[^\s\+>~\.\[:]+)/g,$=/(\.[^\s\+>~\.\[:]+)/g,G=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,q=/(:[\w-]+\([^\)]*\))/gi,U=/(:[^\s\+>~\.\[:]+)/g,W=/([^\s\+>~\.\[:]+)/g;function H(t,e){var r=t.match(e);return r?[t.replace(e," "),r.length]:[t,0]}function X(t){var e=[0,0,0],r=t.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0,o=H(r,F),a=i()(o,2);r=a[0],n=a[1],e[1]+=n;var u=H(r,_),s=i()(u,2);r=s[0],n=s[1],e[0]+=n;var c=H(r,$),f=i()(c,2);r=f[0],n=f[1],e[1]+=n;var l=H(r,G),h=i()(l,2);r=h[0],n=h[1],e[2]+=n;var p=H(r,q),v=i()(p,2);r=v[0],n=v[1],e[1]+=n;var g=H(r,U),y=i()(g,2);r=y[0],n=y[1],e[1]+=n;var d=H(r=r.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),W),m=i()(d,2);return r=m[0],n=m[1],e[2]+=n,e.join("")}var Y=1e-8;function Q(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Z(t,e){return(t[0]*e[0]+t[1]*e[1])/(Q(t)*Q(e))}function K(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Z(t,e))}function J(t){return t*t*t}function tt(t){return 3*t*t*(1-t)}function et(t){return 3*t*(1-t)*(1-t)}function rt(t){return(1-t)*(1-t)*(1-t)}function nt(t){return t*t}function it(t){return 2*t*(1-t)}function ot(t){return(1-t)*(1-t)}!function(t,e){t(e={exports:{}},e.exports)}((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r,n){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return P()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=x(a,r);if(u){if(u===c)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=s(t,e,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===c)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(t,r,a),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c={};function f(){}function l(){}function h(){}var p={};p[i]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&r.call(g,i)&&(p=g);var y=h.prototype=f.prototype=Object.create(p);function d(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function m(t,e){var n;this._invoke=function(i,o){function a(){return new e((function(n,a){!function n(i,o,a,u){var c=s(t[i],t,o);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(i,o,n,a)}))}return n=n?n.then(a,a):a()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function b(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 w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return l.prototype=y.constructor=h,h.constructor=l,h[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},d(m.prototype),m.prototype[o]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new m(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},d(y),y[a]="Generator",y[i]=function(){return this},y.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=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},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),c},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),w(r),c}},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;w(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));var at=function(){function t(e,r,n){h()(this,t),this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1}return v()(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=this.value,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}},{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=B(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="boolean"==typeof t?[void 0,t]:[t],n=i()(r,2),o=n[0],a=n[1],u=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(u.computeSize("x"),u.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(u.computeSize("x"),u.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*u.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*u.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&a:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*u.computeSize(o);default:var s=this.getNumber();return e&&s<1?s*u.computeSize(o):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,o=0;o<n&&(","===r[o]&&i++,3!==i);o++);if(e.hasValue()&&this.isString()&&3!==i){var a=new m.a(r);a.ok&&(a.alpha=e.getNumber(),r=a.toRGBA())}return new t(this.document,this.name,r)}}],[{key:"empty",value:function(e){return new t(e,"EMPTY","")}}]),t}();at.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 ut=function(){function t(){h()(this,t),this.viewPorts=[]}return v()(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}(),st=function(){function t(e,r){h()(this,t),this.x=e,this.y=r}return v()(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=N(e),o=i()(n,2),a=o[0],u=void 0===a?r:a,s=o[1],c=void 0===s?r:s;return new t(u,c)}},{key:"parseScale",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=N(e),o=i()(n,2),a=o[0],u=void 0===a?r:a,s=o[1],c=void 0===s?u:s;return new t(u,c)}},{key:"parsePath",value:function(e){for(var r=N(e),n=r.length,i=[],o=0;o<n;o+=2)i.push(new t(r[o],r[o+1]));return i}}]),t}(),ct=function(){function t(e){h()(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 v()(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 o=r.x,a=r.y;!n[i]&&e.isPointInPath&&e.isPointInPath(o,a)&&(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 o=r.x,a=r.y;!n[i]&&e.isPointInBox(o,a)&&(n[i]=t)}))}}},{key:"mapXY",value:function(t,e){for(var r=this.screen,n=r.window,i=r.ctx,o=new st(t,e),a=i.canvas;a;)o.x-=a.offsetLeft,o.y-=a.offsetTop,a=a.offsetParent;return n.scrollX&&(o.x+=n.scrollX),n.scrollY&&(o.y+=n.scrollY),o}},{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}(),ft="undefined"!=typeof window?window:null,lt="undefined"!=typeof fetch?fetch.bind(void 0):null,ht=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,i=void 0===n?lt:n,o=r.window,a=void 0===o?ft:o;h()(this,t),this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new ut,this.mouse=new ct(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=a,this.fetch=i}return v()(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,o=t.width,a=t.desiredWidth,u=t.height,s=t.desiredHeight,c=t.minX,f=void 0===c?0:c,l=t.minY,h=void 0===l?0:l,p=t.refX,v=t.refY,g=t.clip,y=void 0!==g&&g,d=t.clipX,m=void 0===d?0:d,x=t.clipY,b=void 0===x?0:x,w=D(n).replace(/^defer\s/,"").split(" "),S=i()(w,2),k=S[0]||"xMidYMid",P=S[1]||"meet",R=o/a,A=u/s,E=Math.min(R,A),C=Math.max(R,A),T=a,O=s;"meet"===P&&(T*=E,O*=E),"slice"===P&&(T*=C,O*=C);var M=new at(e,"refX",p),V=new at(e,"refY",v),L=M.hasValue()&&V.hasValue();if(L&&r.translate(-E*M.getPixels("x"),-E*V.getPixels("y")),y){var N=E*m,I=E*b;r.beginPath(),r.moveTo(N,I),r.lineTo(o,I),r.lineTo(o,u),r.lineTo(N,u),r.closePath(),r.clip()}if(!L){var j="meet"===P&&E===A,z="slice"===P&&C===A,B="meet"===P&&E===R,F="slice"===P&&C===R;/^xMid/.test(k)&&(j||z)&&r.translate(o/2-T/2,0),/YMid$/.test(k)&&(B||F)&&r.translate(0,u/2-O/2),/^xMax/.test(k)&&(j||z)&&r.translate(o-T,0),/YMax$/.test(k)&&(B||F)&&r.translate(0,u-O)}switch(!0){case"none"===k:r.scale(R,A);break;case"meet"===P:r.scale(E,E);break;case"slice"===P:r.scale(C,C)}r.translate(-f,-h)}},{key:"start",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,i=void 0!==n&&n,o=r.ignoreMouse,a=void 0!==o&&o,u=r.ignoreAnimation,s=void 0!==u&&u,c=r.ignoreDimensions,f=void 0!==c&&c,l=r.ignoreClear,h=void 0!==l&&l,p=r.forceRedraw,v=r.scaleWidth,g=r.scaleHeight,d=r.offsetX,m=r.offsetY,x=this.FRAMERATE,b=this.mouse,w=1e3/x;if(this.frameDuration=w,this.readyPromise=new Promise((function(t){e.resolveReady=t})),this.isReady()&&this.render(t,f,h,v,g,d,m),i){var S=Date.now(),k=S,P=0,R=function r(){S=Date.now(),(P=S-k)>=w&&(k=S-P%w,e.shouldUpdate(s,p)&&(e.render(t,f,h,v,g,d,m),b.runEvents())),e.intervalId=y()(r)};a||b.start(),this.intervalId=y()(R)}}},{key:"stop",value:function(){this.intervalId&&(y.a.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var r=this.frameDuration,n=this.animations.reduce((function(t,e){return e.update(r)||t}),!1);if(n)return!0}return!("function"!=typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function(t,e,r,n,i,o,a){var u=this.CLIENT_WIDTH,s=this.CLIENT_HEIGHT,c=this.viewPort,f=this.ctx,l=this.isFirstRender,h=f.canvas;c.clear(),h.width&&h.height?c.setCurrent(h.width,h.height):c.setCurrent(u,s);var p=t.getStyle("width"),v=t.getStyle("height");!e&&(l||"number"!=typeof n&&"number"!=typeof i)&&(p.hasValue()&&(h.width=p.getPixels("x"),h.style&&(h.style.width="".concat(h.width,"px"))),v.hasValue()&&(h.height=v.getPixels("y"),h.style&&(h.style.height="".concat(h.height,"px"))));var g=h.clientWidth||h.width,y=h.clientHeight||h.height;if(e&&p.hasValue()&&v.hasValue()&&(g=p.getPixels("x"),y=v.getPixels("y")),c.setCurrent(g,y),"number"==typeof o&&t.getAttribute("x",!0).setValue(o),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof n||"number"==typeof i){var d=N(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 w=t.getStyle("height");w.hasValue()?x=w.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||f.clearRect(0,0,g,y),t.render(f),l&&(this.isFirstRender=!1)}}]),t}();ht.defaultWindow=ft,ht.defaultFetch=lt;var pt=ht.defaultFetch,vt="undefined"!=typeof DOMParser?DOMParser:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.fetch,n=void 0===r?pt:r,i=e.DOMParser,o=void 0===i?vt:i;h()(this,t),this.fetch=n,this.DOMParser=o}var e,r;return v()(t,[{key:"parse",value:(r=s()(a.a.mark((function t(e){return a.a.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(t){return r.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 new Error(e.textContent);return t}},{key:"load",value:(e=s()(a.a.mark((function t(e){var r,n;return a.a.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)})}]),t}(),yt=function(){function t(e,r){h()(this,t),this.type="translate",this.point=null,this.point=st.parse(r)}return v()(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}(),dt=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];h()(this,t),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var i=N(r);this.angle=new at(e,"angle",i[0]),this.cx=(i[1]||0)+(n[0]||0),this.cy=(i[2]||0)+(n[1]||0)}return v()(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}(),mt=function(){function t(e,r){h()(this,t),this.type="scale",this.scale=null;var n=st.parseScale(r);0!==n.x&&0!==n.y||(n.x=Y,n.y=Y),this.scale=n}return v()(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}(),xt=function(){function t(e,r){h()(this,t),this.type="matrix",this.matrix=[],this.matrix=N(r)}return v()(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],o=e[1],a=e[3],u=e[5],s=1/(r*(1*a-0*u)-n*(1*o-0*u)+i*(0*o-0*a));t.transform(s*(1*a-0*u),s*(0*u-1*o),s*(0*i-1*n),s*(1*r-0*i),s*(n*u-i*a),s*(i*o-r*u))}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),t}();function bt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}var wt=function(t){P()(n,t);var e,r=(e=n,function(){var t,r=S()(e);if(bt()){var n=S()(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return b()(this,t)});function n(t,e){var i;return h()(this,n),(i=r.call(this,t,e)).type="skew",i.angle=null,i.angle=new at(t,"angle",e),i}return n}(xt);function St(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}var kt=function(t){P()(n,t);var e,r=(e=n,function(){var t,r=S()(e);if(St()){var n=S()(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return b()(this,t)});function n(t,e){var i;return h()(this,n),(i=r.call(this,t,e)).type="skewX",i.matrix=[1,0,Math.tan(i.angle.getRadians()),1,0,0],i}return n}(wt);function Pt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}var Rt=function(t){P()(n,t);var e,r=(e=n,function(){var t,r=S()(e);if(Pt()){var n=S()(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return b()(this,t)});function n(t,e){var i;return h()(this,n),(i=r.call(this,t,e)).type="skewY",i.matrix=[1,Math.tan(i.angle.getRadians()),0,1,0,0],i}return n}(wt);var At=function(){function t(e,r,n){var o=this;h()(this,t),this.document=e,this.transforms=[];var a=function(t){return D(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(r),u=n?N(n):[];a.forEach((function(e){if("none"!==e){var r=function(t){var e=t.split("("),r=i()(e,2),n=r[0],o=r[1];return[n.trim(),o.trim().replace(")","")]}(e),n=i()(r,2),a=n[0],s=n[1],c=t.transformTypes[a];void 0!==c&&o.transforms.push(new c(o.document,s,u))}}))}return v()(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-1;r>=0;r--)e[r].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}();At.transformTypes={translate:yt,rotate:dt,scale:mt,matrix:xt,skewX:kt,skewY:Rt};var Et=function(){function t(e,r){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(h()(this,t),this.document=e,this.node=r,this.captureTextNodes=o,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach((function(t){var r=j(t.nodeName);n.attributes[r]=new at(e,r,t.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a=this.getAttribute("style").getString().split(";").map((function(t){return t.trim()}));a.forEach((function(t){if(t){var r=t.split(":").map((function(t){return t.trim()})),o=i()(r,2),a=o[0],u=o[1];n.styles[a]=new at(e,a,u)}}))}var u=e.definitions,s=this.getAttribute("id");s.hasValue()&&(u[s.getValue()]||(u[s.getValue()]=this)),Array.from(r.childNodes).forEach((function(t){if(1===t.nodeType)n.addChild(t);else if(o&&(3===t.nodeType||4===t.nodeType)){var r=e.createTextNode(t);r.getText().length>0&&n.addChild(r)}}))}}return v()(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 at(this.document,t,"");return this.attributes[t]=n,n}return r||at.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||/:href$/.test(t))return this.attributes[t];return at.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 o=this.parent;if(o){var a=o.getStyle(t);if(a&&a.hasValue())return a}}if(e){var u=new at(this.document,t,"");return this.styles[t]=u,u}return n||at.empty(this.document)}},{key:"render",value:function(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==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=At.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],o=r[n];if(i)for(var a in i){var u=this.stylesSpecificity[a];void 0===u&&(u="000"),o>=u&&(this.styles[a]=i[a],this.stylesSpecificity[a]=o)}}}},{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(A()(e),[[r,i]])}),[])}},{key:"restoreStyles",value:function(t,e){e.forEach((function(e){var r=i()(e,2),n=r[0],o=r[1];t.getStyle(n,!0).setValue(o)}))}}]),t}();function Ct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}Et.ignoreChildTypes=["title"];var Tt=function(t){P()(n,t);var e,r=(e=n,function(){var t,r=S()(e);if(Ct()){var n=S()(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return b()(this,t)});function n(t,e,i){return h()(this,n),r.call(this,t,e,i)}return n}(Et);function Ot(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function Mt(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:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function Dt(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:return/^[\d.]+$/.test(e)?e:""}}var Vt=function(){function e(t,r,n,i,o,a){h()(this,e);var u=a?"string"==typeof a?e.parse(a):a:{};this.fontFamily=o||u.fontFamily,this.fontSize=i||u.fontSize,this.fontStyle=t||u.fontStyle,this.fontWeight=n||u.fontWeight,this.fontVariant=r||u.fontVariant}return v()(e,[{key:"toString",value:function(){return[Mt(this.fontStyle),this.fontVariant,Dt(this.fontWeight),this.fontSize,(e=this.fontFamily,void 0===t?e:e.trim().split(",").map(Ot).join(","))].join(" ").trim();var e}}],[{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",o="",a="",u="",s="",c=D(t).trim().split(" "),f={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return c.forEach((function(t){switch(!0){case!f.fontStyle&&e.styles.includes(t):"inherit"!==t&&(n=t),f.fontStyle=!0;break;case!f.fontVariant&&e.variants.includes(t):"inherit"!==t&&(o=t),f.fontStyle=!0,f.fontVariant=!0;break;case!f.fontWeight&&e.weights.includes(t):"inherit"!==t&&(a=t),f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0;break;case!f.fontSize:if("inherit"!==t){var r=t.split("/"),c=i()(r,1);u=c[0]}f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0,f.fontSize=!0;break;default:"inherit"!==t&&(s+=t)}})),new e(n,o,a,u,s,r)}}]),e}();Vt.styles="normal|italic|oblique|inherit",Vt.variants="normal|small-caps|inherit",Vt.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Lt=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;h()(this,t),this.x1=e,this.y1=r,this.x2=n,this.y2=i,this.addPoint(e,r),this.addPoint(n,i)}return v()(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)}},{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 o=6*e-12*r+6*n,a=-3*e+9*r-9*n+3*i,u=3*r-3*e;if(0!==a){var s=Math.pow(o,2)-4*u*a;if(!(s<0)){var c=(-o+Math.sqrt(s))/(2*a);0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,r,n,i)):this.addY(this.sumCubic(c,e,r,n,i)));var f=(-o-Math.sqrt(s))/(2*a);0<f&&f<1&&(t?this.addX(this.sumCubic(f,e,r,n,i)):this.addY(this.sumCubic(f,e,r,n,i)))}}else{if(0===o)return;var l=-u/o;0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,n,i)):this.addY(this.sumCubic(l,e,r,n,i)))}}},{key:"addBezierCurve",value:function(t,e,r,n,i,o,a,u){this.addPoint(t,e),this.addPoint(a,u),this.bezierCurveAdd(!0,t,r,i,a),this.bezierCurveAdd(!1,e,n,o,u)}},{key:"addQuadraticCurve",value:function(t,e,r,n,i,o){var a=t+2/3*(r-t),u=e+2/3*(n-e),s=a+1/3*(i-t),c=u+1/3*(o-e);this.addBezierCurve(t,e,a,s,u,c,i,o)}},{key:"isPointInBox",value:function(t,e){var r=this.x1,n=this.y1,i=this.x2,o=this.y2;return r<=t&&t<=i&&n<=e&&e<=o}},{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}();function Nt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}var It=function(t){P()(n,t);var e,r=(e=n,function(){var t,r=S()(e);if(Nt()){var n=S()(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return b()(this,t)});function n(){var t;return h()(this,n),(t=r.apply(this,arguments)).modifiedEmSizeStack=!1,t}return v()(n,[{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"),o=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var a=r.getFillStyleDefinition(this,n);a&&(t.fillStyle=a)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var u=r.getColor();"inherit"!==u&&(t.fillStyle="none"===u?"rgba(0,0,0,0)":u)}if(n.hasValue()){var s=new at(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=s}if(i.isUrlDefinition()){var c=i.getFillStyleDefinition(this,o);c&&(t.strokeStyle=c)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var f=i.getString();"inherit"!==f&&(t.strokeStyle="none"===f?"rgba(0,0,0,0)":f)}if(o.hasValue()){var l=new at(this.document,"stroke",t.strokeStyle).addOpacity(o).getString();t.strokeStyle=l}var h=this.getStyle("stroke-width");if(h.hasValue()){var p=h.getPixels();t.lineWidth=p||Y}var v=this.getStyle("stroke-linecap"),g=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),d=this.getStyle("paint-order"),m=this.getStyle("stroke-dasharray"),x=this.getStyle("stroke-dashoffset");if(v.hasValue()&&(t.lineCap=v.getString()),g.hasValue()&&(t.lineJoin=g.getString()),y.hasValue()&&(t.miterLimit=y.getNumber()),d.hasValue()&&(t.paintOrder=d.getValue()),m.hasValue()&&"none"!==m.getString()){var b=N(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 w=x.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=w:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=w:void 0!==t.mozDashOffset&&(t.mozDashOffset=w)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var S=this.getStyle("font"),k=this.getStyle("font-style"),P=this.getStyle("font-variant"),R=this.getStyle("font-weight"),A=this.getStyle("font-size"),E=this.getStyle("font-family"),C=new Vt(k.getString(),P.getString(),R.getString(),A.hasValue()?"".concat(A.getPixels(!0),"px"):"",E.getString(),Vt.parse(S.getString(),t.font));k.setValue(C.fontStyle),P.setValue(C.fontVariant),R.setValue(C.fontWeight),A.setValue(C.fontSize),E.setValue(C.fontFamily),t.font=C.toString(),A.isPixels()&&(this.document.emSize=A.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(t){C()(S()(n.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),n}(Et);function jt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}var zt=function(t){P()(n,t);var e,r=(e=n,function(){var t,r=S()(e);if(jt()){var n=S()(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return b()(this,t)});function n(t,e,i){var o;return h()(this,n),(o=r.call(this,t,e,(this instanceof n?this.constructor:void 0)===n||i)).type="text",o.x=0,o.y=0,o.measureCache=-1,o}return v()(n,[{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];C()(S()(n.prototype),"setContext",this).call(this,t,e);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(t.textBaseline=r)}},{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 o=e.getChildBoundingBox(t,e,e,i);r?r.addBoundingBox(o):r=o})),r}},{key:"getFontSize",value:function(){var t=this.document,e=this.parent,r=Vt.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(r)}},{key:"getTElementBoundingBox",value:function(t){var e=this.getFontSize();return new Lt(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 o=e.length,a=e[r-1],u=e[r+1],s="isolated";(0===r||" "===a)&&r<o-2&&" "!==u&&(s="terminal"),r>0&&" "!==a&&r<o-2&&" "!==u&&(s="medial"),r>0&&" "!==a&&(r===o-1||" "===u)&&(s="initial"),void 0!==t.glyphs[n]&&((i=t.glyphs[n][s])||"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,o=D(e.value||e.text||e.textContent||"");return 0===n&&(o=V(o)),n===i&&(o=L(o)),o}},{key:"renderChildren",value:function(t){var e=this;if("text"===this.type){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))}else this.renderTElementChildren(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 o=i.fontFace.unitsPerEm,a=Vt.parse(e.ctx.font),u=r.getStyle("font-size").getNumber(a.fontSize),s=r.getStyle("font-style").getString(a.fontStyle),c=u/o,f=i.isRTL?n.split("").reverse().join(""):n,l=N(r.getAttribute("dx").getString()),h=f.length,p=0;p<h;p++){var v=this.getGlyph(i,f,p);t.translate(this.x,this.y),t.scale(c,-c);var g=t.lineWidth;t.lineWidth=t.lineWidth*o/u,"italic"===s&&t.transform(1,0,.4,1,0,0),v.render(t),"italic"===s&&t.transform(1,0,-.4,1,0,0),t.lineWidth=g,t.scale(1/c,-1/c),t.translate(-this.x,-this.y),this.x+=u*(v.horizAdvX||i.horizAdvX)/o,void 0===l[p]||isNaN(l[p])||(this.x+=l[p])}else{var y=this.x,d=this.y;"stroke"===t.paintOrder?(t.strokeStyle&&t.strokeText(n,y,d),t.fillStyle&&t.fillText(n,y,d)):(t.fillStyle&&t.fillText(n,y,d),t.strokeStyle&&t.strokeText(n,y,d))}}},{key:"getAnchorDelta",value:function(t,e,r){var n=this.getStyle("text-anchor").getString("start");if("start"!==n){for(var i=e.children,o=i.length,a=null,u=0,s=r;s<o&&(a=i[s],!(s>r&&a.getAttribute("x").hasValue()||a.getAttribute("text-anchor").hasValue()));s++)u+=a.measureTextRecursive(t);return-1*("end"===n?u:u/2)}return 0}},{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 o=i.getAttribute("x"),a=i.getAttribute("y"),u=i.getAttribute("dx"),s=i.getAttribute("dy"),c=i.getAttribute("text-anchor").getString("start");if(0===n&&"textNode"!==i.type&&(o.hasValue()||o.setValue(e.getAttribute("x").getValue("0")),a.hasValue()||a.setValue(e.getAttribute("y").getValue("0")),u.hasValue()||u.setValue(e.getAttribute("dx").getValue("0")),s.hasValue()||s.setValue(e.getAttribute("dy").getValue("0"))),o.hasValue()){if(i.x=o.getPixels("x")+e.getAnchorDelta(t,r,n),"start"!==c){var f=i.measureTextRecursive(t);i.x+=-1*("end"===c?f:f/2)}u.hasValue()&&(i.x+=u.getPixels("x"))}else{if("start"!==c){var l=i.measureTextRecursive(t);e.x+=-1*("end"===c?l:l/2)}u.hasValue()&&(e.x+=u.getPixels("x")),i.x=e.x}return e.x=i.x+i.measureText(t),a.hasValue()?(i.y=a.getPixels("y"),s.hasValue()&&(i.y+=s.getPixels("y"))):(s.hasValue()&&(e.y+=s.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),o=i.getBoundingBox(t);return o?(i.children.forEach((function(r,n){var a=e.getChildBoundingBox(t,e,i,n);o.addBoundingBox(a)})),o):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(),o=n.isRTL?e.split("").reverse().join(""):e,a=N(r.getAttribute("dx").getString()),u=o.length,s=0,c=0;c<u;c++){s+=(this.getGlyph(n,o,c).horizAdvX||n.horizAdvX)*i/n.fontFace.unitsPerEm,void 0===a[c]||isNaN(a[c])||(s+=a[c])}return s}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);var f=t.measureText(e).width;return this.clearContext(t),t.restore(),f}}]),n}(It);function Bt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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}}var Ft=function(t){P()(n,t);var e,r=(e=n,function(){var t,r=S()(e);if(Bt()){var n=S()(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return b()(this,t)});function n(t,e,i){var o;return h()(this,n),(o=r.call(this,t,e,(this instanceof n?this.constructor:void 0)===n||i)).type="tspan",o.text=o.children.length>0?"":o.getTextFromNode(),o}retu