svgedit/dist/editor/system/extensions/ext-server_opensave/ext-server_opensave.js

2 lines
212 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

System.register([],(function(t){"use strict";return{execute:function(){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,r,i){return t(i={path:r,exports:{},require:function(t,r){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==r&&i.path)}},i.exports),i.exports}var check=function(t){return t&&t.Math==Math&&t},i=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r&&r)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},o=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!a.call({1:2},1)?function propertyIsEnumerable(t){var r=u(this,t);return!!r&&r.enumerable}:a},createPropertyDescriptor=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},h={}.toString,classofRaw=function(t){return h.call(t).slice(8,-1)},p="".split,y=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?p.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return y(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,r){if(!isObject(t))return t;var i,o;if(r&&"function"==typeof(i=t.toString)&&!isObject(o=i.call(t)))return o;if("function"==typeof(i=t.valueOf)&&!isObject(o=i.call(t)))return o;if(!r&&"function"==typeof(i=t.toString)&&!isObject(o=i.call(t)))return o;throw TypeError("Can't convert object to primitive value")},g={}.hasOwnProperty,has=function(t,r){return g.call(t,r)},d=i.document,v=isObject(d)&&isObject(d.createElement),documentCreateElement=function(t){return v?d.createElement(t):{}},x=!o&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),b=Object.getOwnPropertyDescriptor,S={f:o?b:function getOwnPropertyDescriptor(t,r){if(t=toIndexedObject(t),r=toPrimitive(r,!0),x)try{return b(t,r)}catch(t){}if(has(t,r))return createPropertyDescriptor(!l.f.call(t,r),t[r])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},w=Object.defineProperty,k={f:o?w:function defineProperty(t,r,i){if(anObject(t),r=toPrimitive(r,!0),anObject(i),x)try{return w(t,r,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[r]=i.value),t}},E=o?function(t,r,i){return k.f(t,r,createPropertyDescriptor(1,i))}:function(t,r,i){return t[r]=i,t},setGlobal=function(t,r){try{E(i,t,r)}catch(o){i[t]=r}return r},P="__core-js_shared__",C=i[P]||setGlobal(P,{}),R=Function.toString;"function"!=typeof C.inspectSource&&(C.inspectSource=function(t){return R.call(t)});var A,T,_,M=C.inspectSource,N=i.WeakMap,O="function"==typeof N&&/native code/.test(M(N)),D=createCommonjsModule((function(t){(t.exports=function(t,r){return C[t]||(C[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),$=0,I=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++$+I).toString(36)},V=D("keys"),sharedKey=function(t){return V[t]||(V[t]=uid(t))},L={},j=i.WeakMap;if(O){var B=new j,G=B.get,z=B.has,U=B.set;A=function(t,r){return U.call(B,t,r),r},T=function(t){return G.call(B,t)||{}},_=function(t){return z.call(B,t)}}else{var q=sharedKey("state");L[q]=!0,A=function(t,r){return E(t,q,r),r},T=function(t){return has(t,q)?t[q]:{}},_=function(t){return has(t,q)}}var W,H,X={set:A,get:T,has:_,enforce:function(t){return _(t)?T(t):A(t,{})},getterFor:function(t){return function(r){var i;if(!isObject(r)||(i=T(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},Y=createCommonjsModule((function(t){var r=X.get,o=X.enforce,a=String(String).split("String");(t.exports=function(t,r,u,l){var h=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,y=!!l&&!!l.noTargetGet;"function"==typeof u&&("string"!=typeof r||has(u,"name")||E(u,"name",r),o(u).source=a.join("string"==typeof r?r:"")),t!==i?(h?!y&&t[r]&&(p=!0):delete t[r],p?t[r]=u:E(t,r,u)):p?t[r]=u:setGlobal(r,u)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&r(this).source||M(this)}))})),Q=i,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,r){return arguments.length<2?aFunction(Q[t])||aFunction(i[t]):Q[t]&&Q[t][r]||i[t]&&i[t][r]},K=Math.ceil,Z=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?Z:K)(t)},J=Math.min,toLength=function(t){return t>0?J(toInteger(t),9007199254740991):0},tt=Math.max,et=Math.min,toAbsoluteIndex=function(t,r){var i=toInteger(t);return i<0?tt(i+r,0):et(i,r)},createMethod=function(t){return function(r,i,o){var a,u=toIndexedObject(r),l=toLength(u.length),h=toAbsoluteIndex(o,l);if(t&&i!=i){for(;l>h;)if((a=u[h++])!=a)return!0}else for(;l>h;h++)if((t||h in u)&&u[h]===i)return t||h||0;return!t&&-1}},rt={includes:createMethod(!0),indexOf:createMethod(!1)},nt=rt.indexOf,objectKeysInternal=function(t,r){var i,o=toIndexedObject(t),a=0,u=[];for(i in o)!has(L,i)&&has(o,i)&&u.push(i);for(;r.length>a;)has(o,i=r[a++])&&(~nt(u,i)||u.push(i));return u},it=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ot=it.concat("length","prototype"),at={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,ot)}},ut={f:Object.getOwnPropertySymbols},st=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var r=at.f(anObject(t)),i=ut.f;return i?r.concat(i(t)):r},copyConstructorProperties=function(t,r){for(var i=st(r),o=k.f,a=S.f,u=0;u<i.length;u++){var l=i[u];has(t,l)||o(t,l,a(r,l))}},ct=/#|\.prototype\./,isForced=function(t,r){var i=ft[lt(t)];return i==pt||i!=ht&&("function"==typeof r?fails(r):!!r)},lt=isForced.normalize=function(t){return String(t).replace(ct,".").toLowerCase()},ft=isForced.data={},ht=isForced.NATIVE="N",pt=isForced.POLYFILL="P",yt=isForced,gt=S.f,_export=function(t,r){var o,a,u,l,h,p=t.target,y=t.global,g=t.stat;if(o=y?i:g?i[p]||setGlobal(p,{}):(i[p]||{}).prototype)for(a in r){if(l=r[a],u=t.noTargetGet?(h=gt(o,a))&&h.value:o[a],!yt(y?a:p+(g?".":"#")+a,t.forced)&&void 0!==u){if(typeof l==typeof u)continue;copyConstructorProperties(l,u)}(t.sham||u&&u.sham)&&E(l,"sham",!0),Y(o,a,l,t)}},dt=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},toObject=function(t){return Object(requireObjectCoercible(t))},createProperty=function(t,r,i){var o=toPrimitive(r);o in t?k.f(t,o,createPropertyDescriptor(0,i)):t[o]=i},vt=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),mt=vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,xt=D("wks"),bt=i.Symbol,St=mt?bt:bt&&bt.withoutSetter||uid,wellKnownSymbol=function(t){return has(xt,t)||(vt&&has(bt,t)?xt[t]=bt[t]:xt[t]=St("Symbol."+t)),xt[t]},wt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,r){var i;return dt(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!dt(i.prototype)?isObject(i)&&null===(i=i[wt])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===r?0:r)},kt=getBuiltIn("navigator","userAgent")||"",Et=i.process,Pt=Et&&Et.versions,Ct=Pt&&Pt.v8;Ct?H=(W=Ct.split("."))[0]+W[1]:kt&&(!(W=kt.match(/Edge\/(\d+)/))||W[1]>=74)&&(W=kt.match(/Chrome\/(\d+)/))&&(H=W[1]);var Rt=H&&+H,At=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return Rt>=51||!fails((function(){var r=[];return(r.constructor={})[At]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},Tt=wellKnownSymbol("isConcatSpreadable"),_t=9007199254740991,Mt="Maximum allowed index exceeded",Nt=Rt>=51||!fails((function(){var t=[];return t[Tt]=!1,t.concat()[0]!==t})),Ot=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var r=t[Tt];return void 0!==r?!!r:dt(t)};_export({target:"Array",proto:!0,forced:!Nt||!Ot},{concat:function concat(t){var r,i,o,a,u,l=toObject(this),h=arraySpeciesCreate(l,0),p=0;for(r=-1,o=arguments.length;r<o;r++)if(isConcatSpreadable(u=-1===r?l:arguments[r])){if(p+(a=toLength(u.length))>_t)throw TypeError(Mt);for(i=0;i<a;i++,p++)i in u&&createProperty(h,p,u[i])}else{if(p>=_t)throw TypeError(Mt);createProperty(h,p++,u)}return h.length=p,h}});var arrayMethodIsStrict=function(t,r){var i=[][t];return!!i&&fails((function(){i.call(null,r||function(){throw 1},1)}))},Dt=[].join,$t=y!=Object,It=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:$t||!It},{join:function join(t){return Dt.call(toIndexedObject(this),void 0===t?",":t)}});var Ft={};Ft[wellKnownSymbol("toStringTag")]="z";var Vt="[object z]"===String(Ft),Lt=wellKnownSymbol("toStringTag"),jt="Arguments"==classofRaw(function(){return arguments}()),Bt=Vt?classofRaw:function(t){var r,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=Object(t),Lt))?i:jt?classofRaw(r):"Object"==(o=classofRaw(r))&&"function"==typeof r.callee?"Arguments":o},Gt=Vt?{}.toString:function toString(){return"[object "+Bt(this)+"]"};Vt||Y(Object.prototype,"toString",Gt,{unsafe:!0});var zt=i.Promise,redefineAll=function(t,r,i){for(var o in r)Y(t,o,r[o],i);return t},Ut=k.f,qt=wellKnownSymbol("toStringTag"),setToStringTag=function(t,r,i){t&&!has(t=i?t:t.prototype,qt)&&Ut(t,qt,{configurable:!0,value:r})},Wt=wellKnownSymbol("species"),setSpecies=function(t){var r=getBuiltIn(t),i=k.f;o&&r&&!r[Wt]&&i(r,Wt,{configurable:!0,get:function(){return this}})},aFunction$1=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},anInstance=function(t,r,i){if(!(t instanceof r))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t},Ht={},Xt=wellKnownSymbol("iterator"),Yt=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Ht.Array===t||Yt[Xt]===t)},functionBindContext=function(t,r,i){if(aFunction$1(t),void 0===r)return t;switch(i){case 0:return function(){return t.call(r)};case 1:return function(i){return t.call(r,i)};case 2:return function(i,o){return t.call(r,i,o)};case 3:return function(i,o,a){return t.call(r,i,o,a)}}return function(){return t.apply(r,arguments)}},Qt=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[Qt]||t["@@iterator"]||Ht[Bt(t)]},callWithSafeIterationClosing=function(t,r,i,o){try{return o?r(anObject(i)[0],i[1]):r(i)}catch(r){var a=t.return;throw void 0!==a&&anObject(a.call(t)),r}},Kt=createCommonjsModule((function(t){var Result=function(t,r){this.stopped=t,this.result=r};(t.exports=function(t,r,i,o,a){var u,l,h,p,y,g,d,v=functionBindContext(r,i,o?2:1);if(a)u=t;else{if("function"!=typeof(l=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(l)){for(h=0,p=toLength(t.length);p>h;h++)if((y=o?v(anObject(d=t[h])[0],d[1]):v(t[h]))&&y instanceof Result)return y;return new Result(!1)}u=l.call(t)}for(g=u.next;!(d=g.call(u)).done;)if("object"==typeof(y=callWithSafeIterationClosing(u,v,d.value,o))&&y&&y instanceof Result)return y;return new Result(!1)}).stop=function(t){return new Result(!0,t)}})),Zt=wellKnownSymbol("iterator"),Jt=!1;try{var te=0,ee={next:function(){return{done:!!te++}},return:function(){Jt=!0}};ee[Zt]=function(){return this},Array.from(ee,(function(){throw 2}))}catch(t){}var re,ne,ie,checkCorrectnessOfIteration=function(t,r){if(!r&&!Jt)return!1;var i=!1;try{var o={};o[Zt]=function(){return{next:function(){return{done:i=!0}}}},t(o)}catch(t){}return i},oe=wellKnownSymbol("species"),speciesConstructor=function(t,r){var i,o=anObject(t).constructor;return void 0===o||null==(i=anObject(o)[oe])?r:aFunction$1(i)},ae=getBuiltIn("document","documentElement"),ue=/(iphone|ipod|ipad).*applewebkit/i.test(kt),se=i.location,ce=i.setImmediate,le=i.clearImmediate,fe=i.process,he=i.MessageChannel,pe=i.Dispatch,ye=0,ge={},de="onreadystatechange",run=function(t){if(ge.hasOwnProperty(t)){var r=ge[t];delete ge[t],r()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){i.postMessage(t+"",se.protocol+"//"+se.host)};ce&&le||(ce=function setImmediate(t){for(var r=[],i=1;arguments.length>i;)r.push(arguments[i++]);return ge[++ye]=function(){("function"==typeof t?t:Function(t)).apply(void 0,r)},re(ye),ye},le=function clearImmediate(t){delete ge[t]},"process"==classofRaw(fe)?re=function(t){fe.nextTick(runner(t))}:pe&&pe.now?re=function(t){pe.now(runner(t))}:he&&!ue?(ie=(ne=new he).port2,ne.port1.onmessage=listener,re=functionBindContext(ie.postMessage,ie,1)):!i.addEventListener||"function"!=typeof postMessage||i.importScripts||fails(post)||"file:"===se.protocol?re=de in documentCreateElement("script")?function(t){ae.appendChild(documentCreateElement("script")).onreadystatechange=function(){ae.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(re=post,i.addEventListener("message",listener,!1)));var ve,me,xe,be,Se,we,ke,Ee,Pe={set:ce,clear:le},Ce=S.f,Re=Pe.set,Ae=i.MutationObserver||i.WebKitMutationObserver,Te=i.process,_e=i.Promise,Me="process"==classofRaw(Te),Ne=Ce(i,"queueMicrotask"),Oe=Ne&&Ne.value;Oe||(ve=function(){var t,r;for(Me&&(t=Te.domain)&&t.exit();me;){r=me.fn,me=me.next;try{r()}catch(t){throw me?be():xe=void 0,t}}xe=void 0,t&&t.enter()},Me?be=function(){Te.nextTick(ve)}:Ae&&!ue?(Se=!0,we=document.createTextNode(""),new Ae(ve).observe(we,{characterData:!0}),be=function(){we.data=Se=!Se}):_e&&_e.resolve?(ke=_e.resolve(void 0),Ee=ke.then,be=function(){Ee.call(ke,ve)}):be=function(){Re.call(i,ve)});var De,$e,Ie,Fe,Ve=Oe||function(t){var r={fn:t,next:void 0};xe&&(xe.next=r),me||(me=r,be()),xe=r},PromiseCapability=function(t){var r,i;this.promise=new t((function(t,o){if(void 0!==r||void 0!==i)throw TypeError("Bad Promise constructor");r=t,i=o})),this.resolve=aFunction$1(r),this.reject=aFunction$1(i)},Le={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,r){if(anObject(t),isObject(r)&&r.constructor===t)return r;var i=Le.f(t);return(0,i.resolve)(r),i.promise},perform=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},je=Pe.set,Be=wellKnownSymbol("species"),Ge="Promise",ze=X.get,Ue=X.set,qe=X.getterFor(Ge),We=zt,He=i.TypeError,Xe=i.document,Ye=i.process,Qe=getBuiltIn("fetch"),Ke=Le.f,Ze=Ke,Je="process"==classofRaw(Ye),tr=!!(Xe&&Xe.createEvent&&i.dispatchEvent),er="unhandledrejection",rr=yt(Ge,(function(){if(!(M(We)!==String(We))){if(66===Rt)return!0;if(!Je&&"function"!=typeof PromiseRejectionEvent)return!0}if(Rt>=51&&/native code/.test(We))return!1;var t=We.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[Be]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),nr=rr||!checkCorrectnessOfIteration((function(t){We.all(t).catch((function(){}))})),isThenable=function(t){var r;return!(!isObject(t)||"function"!=typeof(r=t.then))&&r},notify$1=function(t,r,i){if(!r.notified){r.notified=!0;var o=r.reactions;Ve((function(){for(var a=r.value,u=1==r.state,l=0;o.length>l;){var h,p,y,g=o[l++],d=u?g.ok:g.fail,v=g.resolve,x=g.reject,b=g.domain;try{d?(u||(2===r.rejection&&onHandleUnhandled(t,r),r.rejection=1),!0===d?h=a:(b&&b.enter(),h=d(a),b&&(b.exit(),y=!0)),h===g.promise?x(He("Promise-chain cycle")):(p=isThenable(h))?p.call(h,v,x):v(h)):x(a)}catch(t){b&&!y&&b.exit(),x(t)}}r.reactions=[],r.notified=!1,i&&!r.rejection&&onUnhandled(t,r)}))}},dispatchEvent=function(t,r,o){var a,u;tr?((a=Xe.createEvent("Event")).promise=r,a.reason=o,a.initEvent(t,!1,!0),i.dispatchEvent(a)):a={promise:r,reason:o},(u=i["on"+t])?u(a):t===er&&function(t,r){var o=i.console;o&&o.error&&(1===arguments.length?o.error(t):o.error(t,r))}("Unhandled promise rejection",o)},onUnhandled=function(t,r){je.call(i,(function(){var i,o=r.value;if(isUnhandled(r)&&(i=perform((function(){Je?Ye.emit("unhandledRejection",o,t):dispatchEvent(er,t,o)})),r.rejection=Je||isUnhandled(r)?2:1,i.error))throw i.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,r){je.call(i,(function(){Je?Ye.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,r.value)}))},bind=function(t,r,i,o){return function(a){t(r,i,a,o)}},internalReject=function(t,r,i,o){r.done||(r.done=!0,o&&(r=o),r.value=i,r.state=2,notify$1(t,r,!0))},internalResolve=function(t,r,i,o){if(!r.done){r.done=!0,o&&(r=o);try{if(t===i)throw He("Promise can't be resolved itself");var a=isThenable(i);a?Ve((function(){var o={done:!1};try{a.call(i,bind(internalResolve,t,o,r),bind(internalReject,t,o,r))}catch(i){internalReject(t,o,i,r)}})):(r.value=i,r.state=1,notify$1(t,r,!1))}catch(i){internalReject(t,{done:!1},i,r)}}};rr&&(We=function Promise(t){anInstance(this,We,Ge),aFunction$1(t),De.call(this);var r=ze(this);try{t(bind(internalResolve,this,r),bind(internalReject,this,r))}catch(t){internalReject(this,r,t)}},(De=function Promise(t){Ue(this,{type:Ge,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(We.prototype,{then:function then(t,r){var i=qe(this),o=Ke(speciesConstructor(this,We));return o.ok="function"!=typeof t||t,o.fail="function"==typeof r&&r,o.domain=Je?Ye.domain:void 0,i.parent=!0,i.reactions.push(o),0!=i.state&&notify$1(this,i,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),$e=function(){var t=new De,r=ze(t);this.promise=t,this.resolve=bind(internalResolve,t,r),this.reject=bind(internalReject,t,r)},Le.f=Ke=function(t){return t===We||t===Ie?new $e(t):Ze(t)},"function"==typeof zt&&(Fe=zt.prototype.then,Y(zt.prototype,"then",(function then(t,r){var i=this;return new We((function(t,r){Fe.call(i,t,r)})).then(t,r)}),{unsafe:!0}),"function"==typeof Qe&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(We,Qe.apply(i,arguments))}}))),_export({global:!0,wrap:!0,forced:rr},{Promise:We}),setToStringTag(We,Ge,!1),setSpecies(Ge),Ie=getBuiltIn(Ge),_export({target:Ge,stat:!0,forced:rr},{reject:function reject(t){var r=Ke(this);return r.reject.call(void 0,t),r.promise}}),_export({target:Ge,stat:!0,forced:rr},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:Ge,stat:!0,forced:nr},{all:function all(t){var r=this,i=Ke(r),o=i.resolve,a=i.reject,u=perform((function(){var i=aFunction$1(r.resolve),u=[],l=0,h=1;Kt(t,(function(t){var p=l++,y=!1;u.push(void 0),h++,i.call(r,t).then((function(t){y||(y=!0,u[p]=t,--h||o(u))}),a)})),--h||o(u)}));return u.error&&a(u.value),i.promise},race:function race(t){var r=this,i=Ke(r),o=i.reject,a=perform((function(){var a=aFunction$1(r.resolve);Kt(t,(function(t){a.call(r,t).then(i.resolve,o)}))}));return a.error&&o(a.value),i.promise}});var regexpFlags=function(){var t=anObject(this),r="";return t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.sticky&&(r+="y"),r};function RE(t,r){return RegExp(t,r)}var ir,or,ar={UNSUPPORTED_Y:fails((function(){var t=RE("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:fails((function(){var t=RE("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},ur=RegExp.prototype.exec,sr=String.prototype.replace,cr=ur,lr=(ir=/a/,or=/b*/g,ur.call(ir,"a"),ur.call(or,"a"),0!==ir.lastIndex||0!==or.lastIndex),fr=ar.UNSUPPORTED_Y||ar.BROKEN_CARET,hr=void 0!==/()??/.exec("")[1];(lr||hr||fr)&&(cr=function exec(t){var r,i,o,a,u=this,l=fr&&u.sticky,h=regexpFlags.call(u),p=u.source,y=0,g=t;return l&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),g=String(t).slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==t[u.lastIndex-1])&&(p="(?: "+p+")",g=" "+g,y++),i=new RegExp("^(?:"+p+")",h)),hr&&(i=new RegExp("^"+p+"$(?!\\s)",h)),lr&&(r=u.lastIndex),o=ur.call(l?i:u,g),l?o?(o.input=o.input.slice(y),o[0]=o[0].slice(y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:lr&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),hr&&o&&o.length>1&&sr.call(o[0],i,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o});var pr=cr;_export({target:"RegExp",proto:!0,forced:/./.exec!==pr},{exec:pr});var yr=wellKnownSymbol("species"),gr=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),dr="$0"==="a".replace(/./,"$0"),vr=wellKnownSymbol("replace"),mr=!!/./[vr]&&""===/./[vr]("a","$0"),xr=!fails((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),fixRegexpWellKnownSymbolLogic=function(t,r,i,o){var a=wellKnownSymbol(t),u=!fails((function(){var r={};return r[a]=function(){return 7},7!=""[t](r)})),l=u&&!fails((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[yr]=function(){return i},i.flags="",i[a]=/./[a]),i.exec=function(){return r=!0,null},i[a](""),!r}));if(!u||!l||"replace"===t&&(!gr||!dr||mr)||"split"===t&&!xr){var h=/./[a],p=i(a,""[t],(function(t,r,i,o,a){return r.exec===pr?u&&!a?{done:!0,value:h.call(r,i,o)}:{done:!0,value:t.call(i,r,o)}:{done:!1}}),{REPLACE_KEEPS_$0:dr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:mr}),y=p[0],g=p[1];Y(String.prototype,t,y),Y(RegExp.prototype,a,2==r?function(t,r){return g.call(t,this,r)}:function(t){return g.call(t,this)})}o&&E(RegExp.prototype[a],"sham",!0)},createMethod$1=function(t){return function(r,i){var o,a,u=String(requireObjectCoercible(r)),l=toInteger(i),h=u.length;return l<0||l>=h?t?"":void 0:(o=u.charCodeAt(l))<55296||o>56319||l+1===h||(a=u.charCodeAt(l+1))<56320||a>57343?t?u.charAt(l):o:t?u.slice(l,l+2):a-56320+(o-55296<<10)+65536}},br={codeAt:createMethod$1(!1),charAt:createMethod$1(!0)},Sr=br.charAt,advanceStringIndex=function(t,r,i){return r+(i?Sr(t,r).length:1)},regexpExecAbstract=function(t,r){var i=t.exec;if("function"==typeof i){var o=i.call(t,r);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==classofRaw(t))throw TypeError("RegExp#exec called on incompatible receiver");return pr.call(t,r)},wr=Math.max,kr=Math.min,Er=Math.floor,Pr=/\$([$&'`]|\d\d?|<[^>]*>)/g,Cr=/\$([$&'`]|\d\d?)/g;fixRegexpWellKnownSymbolLogic("replace",2,(function(t,r,i,o){var a=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,u=o.REPLACE_KEEPS_$0,l=a?"$":"$0";return[function replace(i,o){var a=requireObjectCoercible(this),u=null==i?void 0:i[t];return void 0!==u?u.call(i,a,o):r.call(String(a),i,o)},function(t,o){if(!a&&u||"string"==typeof o&&-1===o.indexOf(l)){var h=i(r,t,this,o);if(h.done)return h.value}var p=anObject(t),y=String(this),g="function"==typeof o;g||(o=String(o));var d=p.global;if(d){var v=p.unicode;p.lastIndex=0}for(var x=[];;){var b=regexpExecAbstract(p,y);if(null===b)break;if(x.push(b),!d)break;""===String(b[0])&&(p.lastIndex=advanceStringIndex(y,toLength(p.lastIndex),v))}for(var S,w="",k=0,E=0;E<x.length;E++){b=x[E];for(var P=String(b[0]),C=wr(kr(toInteger(b.index),y.length),0),R=[],A=1;A<b.length;A++)R.push(void 0===(S=b[A])?S:String(S));var T=b.groups;if(g){var _=[P].concat(R,C,y);void 0!==T&&_.push(T);var M=String(o.apply(void 0,_))}else M=getSubstitution(P,y,C,R,T,o);C>=k&&(w+=y.slice(k,C)+M,k=C+P.length)}return w+y.slice(k)}];function getSubstitution(t,i,o,a,u,l){var h=o+t.length,p=a.length,y=Cr;return void 0!==u&&(u=toObject(u),y=Pr),r.call(l,y,(function(r,l){var y;switch(l.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,o);case"'":return i.slice(h);case"<":y=u[l.slice(1,-1)];break;default:var g=+l;if(0===g)return r;if(g>p){var d=Er(g/10);return 0===d?r:d<=p?void 0===a[d-1]?l.charAt(1):a[d-1]+l.charAt(1):r}y=a[g-1]}return void 0===y?"":y}))}}));var Rr="\t\n\v\f\r    \u2028\u2029\ufeff",Ar="["+Rr+"]",Tr=RegExp("^"+Ar+Ar+"*"),_r=RegExp(Ar+Ar+"*$"),createMethod$2=function(t){return function(r){var i=String(requireObjectCoercible(r));return 1&t&&(i=i.replace(Tr,"")),2&t&&(i=i.replace(_r,"")),i}},Mr={start:createMethod$2(1),end:createMethod$2(2),trim:createMethod$2(3)},Nr=Mr.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!Rr[t]()||"…"!="…"[t]()||Rr[t].name!==t}))}("trim")},{trim:function trim(){return Nr(this)}});var Or,Dr=Object.keys||function keys(t){return objectKeysInternal(t,it)},$r=o?Object.defineProperties:function defineProperties(t,r){anObject(t);for(var i,o=Dr(r),a=o.length,u=0;a>u;)k.f(t,i=o[u++],r[i]);return t},Ir=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{Or=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,r;NullProtoObject=Or?function(t){t.write(scriptTag("")),t.close();var r=t.parentWindow.Object;return t=null,r}(Or):((r=documentCreateElement("iframe")).style.display="none",ae.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var i=it.length;i--;)delete NullProtoObject.prototype[it[i]];return NullProtoObject()};L[Ir]=!0;var Fr=Object.create||function create(t,r){var i;return null!==t?(EmptyConstructor.prototype=anObject(t),i=new EmptyConstructor,EmptyConstructor.prototype=null,i[Ir]=t):i=NullProtoObject(),void 0===r?i:$r(i,r)},Vr=at.f,Lr={}.toString,jr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Br={f:function getOwnPropertyNames(t){return jr&&"[object Window]"==Lr.call(t)?function(t){try{return Vr(t)}catch(t){return jr.slice()}}(t):Vr(toIndexedObject(t))}},Gr={f:wellKnownSymbol},zr=k.f,defineWellKnownSymbol=function(t){var r=Q.Symbol||(Q.Symbol={});has(r,t)||zr(r,t,{value:Gr.f(t)})},Ur=[].push,createMethod$3=function(t){var r=1==t,i=2==t,o=3==t,a=4==t,u=6==t,l=5==t||u;return function(h,p,g,d){for(var v,x,b=toObject(h),S=y(b),w=functionBindContext(p,g,3),k=toLength(S.length),E=0,P=d||arraySpeciesCreate,C=r?P(h,k):i?P(h,0):void 0;k>E;E++)if((l||E in S)&&(x=w(v=S[E],E,b),t))if(r)C[E]=x;else if(x)switch(t){case 3:return!0;case 5:return v;case 6:return E;case 2:Ur.call(C,v)}else if(a)return!1;return u?-1:o||a?a:C}},qr={forEach:createMethod$3(0),map:createMethod$3(1),filter:createMethod$3(2),some:createMethod$3(3),every:createMethod$3(4),find:createMethod$3(5),findIndex:createMethod$3(6)},Wr=qr.forEach,Hr=sharedKey("hidden"),Xr="Symbol",Yr=wellKnownSymbol("toPrimitive"),Qr=X.set,Kr=X.getterFor(Xr),Zr=Object.prototype,Jr=i.Symbol,tn=getBuiltIn("JSON","stringify"),en=S.f,rn=k.f,nn=Br.f,on=l.f,an=D("symbols"),un=D("op-symbols"),sn=D("string-to-symbol-registry"),cn=D("symbol-to-string-registry"),ln=D("wks"),fn=i.QObject,hn=!fn||!fn.prototype||!fn.prototype.findChild,pn=o&&fails((function(){return 7!=Fr(rn({},"a",{get:function(){return rn(this,"a",{value:7}).a}})).a}))?function(t,r,i){var o=en(Zr,r);o&&delete Zr[r],rn(t,r,i),o&&t!==Zr&&rn(Zr,r,o)}:rn,wrap=function(t,r){var i=an[t]=Fr(Jr.prototype);return Qr(i,{type:Xr,tag:t,description:r}),o||(i.description=r),i},yn=mt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Jr},gn=function defineProperty(t,r,i){t===Zr&&gn(un,r,i),anObject(t);var o=toPrimitive(r,!0);return anObject(i),has(an,o)?(i.enumerable?(has(t,Hr)&&t[Hr][o]&&(t[Hr][o]=!1),i=Fr(i,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,Hr)||rn(t,Hr,createPropertyDescriptor(1,{})),t[Hr][o]=!0),pn(t,o,i)):rn(t,o,i)},dn=function defineProperties(t,r){anObject(t);var i=toIndexedObject(r),a=Dr(i).concat(bn(i));return Wr(a,(function(r){o&&!vn.call(i,r)||gn(t,r,i[r])})),t},vn=function propertyIsEnumerable(t){var r=toPrimitive(t,!0),i=on.call(this,r);return!(this===Zr&&has(an,r)&&!has(un,r))&&(!(i||!has(this,r)||!has(an,r)||has(this,Hr)&&this[Hr][r])||i)},mn=function getOwnPropertyDescriptor(t,r){var i=toIndexedObject(t),o=toPrimitive(r,!0);if(i!==Zr||!has(an,o)||has(un,o)){var a=en(i,o);return!a||!has(an,o)||has(i,Hr)&&i[Hr][o]||(a.enumerable=!0),a}},xn=function getOwnPropertyNames(t){var r=nn(toIndexedObject(t)),i=[];return Wr(r,(function(t){has(an,t)||has(L,t)||i.push(t)})),i},bn=function getOwnPropertySymbols(t){var r=t===Zr,i=nn(r?un:toIndexedObject(t)),o=[];return Wr(i,(function(t){!has(an,t)||r&&!has(Zr,t)||o.push(an[t])})),o};if(vt||(Y((Jr=function Symbol(){if(this instanceof Jr)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,r=uid(t),setter=function(t){this===Zr&&setter.call(un,t),has(this,Hr)&&has(this[Hr],r)&&(this[Hr][r]=!1),pn(this,r,createPropertyDescriptor(1,t))};return o&&hn&&pn(Zr,r,{configurable:!0,set:setter}),wrap(r,t)}).prototype,"toString",(function toString(){return Kr(this).tag})),Y(Jr,"withoutSetter",(function(t){return wrap(uid(t),t)})),l.f=vn,k.f=gn,S.f=mn,at.f=Br.f=xn,ut.f=bn,Gr.f=function(t){return wrap(wellKnownSymbol(t),t)},o&&(rn(Jr.prototype,"description",{configurable:!0,get:function description(){return Kr(this).description}}),Y(Zr,"propertyIsEnumerable",vn,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!vt,sham:!vt},{Symbol:Jr}),Wr(Dr(ln),(function(t){defineWellKnownSymbol(t)})),_export({target:Xr,stat:!0,forced:!vt},{for:function(t){var r=String(t);if(has(sn,r))return sn[r];var i=Jr(r);return sn[r]=i,cn[i]=r,i},keyFor:function keyFor(t){if(!yn(t))throw TypeError(t+" is not a symbol");if(has(cn,t))return cn[t]},useSetter:function(){hn=!0},useSimple:function(){hn=!1}}),_export({target:"Object",stat:!0,forced:!vt,sham:!o},{create:function create(t,r){return void 0===r?Fr(t):dn(Fr(t),r)},defineProperty:gn,defineProperties:dn,getOwnPropertyDescriptor:mn}),_export({target:"Object",stat:!0,forced:!vt},{getOwnPropertyNames:xn,getOwnPropertySymbols:bn}),_export({target:"Object",stat:!0,forced:fails((function(){ut.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return ut.f(toObject(t))}}),tn){var Sn=!vt||fails((function(){var t=Jr();return"[null]"!=tn([t])||"{}"!=tn({a:t})||"{}"!=tn(Object(t))}));_export({target:"JSON",stat:!0,forced:Sn},{stringify:function stringify(t,r,i){for(var o,a=[t],u=1;arguments.length>u;)a.push(arguments[u++]);if(o=r,(isObject(r)||void 0!==t)&&!yn(t))return dt(r)||(r=function(t,r){if("function"==typeof o&&(r=o.call(this,t,r)),!yn(r))return r}),a[1]=r,tn.apply(null,a)}})}Jr.prototype[Yr]||E(Jr.prototype,Yr,Jr.prototype.valueOf),setToStringTag(Jr,Xr),L[Hr]=!0;var wn=k.f,kn=i.Symbol;if(o&&"function"==typeof kn&&(!("description"in kn.prototype)||void 0!==kn().description)){var En={},Pn=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),r=this instanceof Pn?new kn(t):void 0===t?kn():kn(t);return""===t&&(En[r]=!0),r};copyConstructorProperties(Pn,kn);var Cn=Pn.prototype=kn.prototype;Cn.constructor=Pn;var Rn=Cn.toString,An="Symbol(test)"==String(kn("test")),Tn=/^Symbol\((.*)\)[^)]+$/;wn(Cn,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,r=Rn.call(t);if(has(En,t))return"";var i=An?r.slice(7,-1):r.replace(Tn,"$1");return""===i?void 0:i}}),_export({global:!0,forced:!0},{Symbol:Pn})}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var _n=Object.defineProperty,Mn={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,r){if(has(Mn,t))return Mn[t];r||(r={});var i=[][t],a=!!has(r,"ACCESSORS")&&r.ACCESSORS,u=has(r,0)?r[0]:thrower,l=has(r,1)?r[1]:void 0;return Mn[t]=!!i&&!fails((function(){if(a&&!o)return!0;var t={length:-1};a?_n(t,1,{enumerable:!0,get:thrower}):t[1]=1,i.call(t,u,l)}))},Nn=qr.forEach,On=arrayMethodIsStrict("forEach"),Dn=arrayMethodUsesToLength("forEach"),$n=On&&Dn?[].forEach:function forEach(t){return Nn(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=$n},{forEach:$n});var In=wellKnownSymbol("unscopables"),Fn=Array.prototype;null==Fn[In]&&k.f(Fn,In,{configurable:!0,value:Fr(null)});var Vn,Ln,jn,addToUnscopables=function(t){Fn[In][t]=!0},Bn=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Gn=sharedKey("IE_PROTO"),zn=Object.prototype,Un=Bn?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,Gn)?t[Gn]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?zn:null},qn=wellKnownSymbol("iterator"),Wn=!1;[].keys&&("next"in(jn=[].keys())?(Ln=Un(Un(jn)))!==Object.prototype&&(Vn=Ln):Wn=!0),null==Vn&&(Vn={}),has(Vn,qn)||E(Vn,qn,(function(){return this}));var Hn={IteratorPrototype:Vn,BUGGY_SAFARI_ITERATORS:Wn},Xn=Hn.IteratorPrototype,returnThis$1=function(){return this},Yn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),r=i instanceof Array}catch(t){}return function setPrototypeOf(i,o){return anObject(i),function(t){if(!isObject(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(o),r?t.call(i,o):i.__proto__=o,i}}():void 0),Qn=Hn.IteratorPrototype,Kn=Hn.BUGGY_SAFARI_ITERATORS,Zn=wellKnownSymbol("iterator"),Jn="keys",ti="values",ei="entries",returnThis$2=function(){return this},defineIterator=function(t,r,i,o,a,u,l){!function(t,r,i){var o=r+" Iterator";t.prototype=Fr(Xn,{next:createPropertyDescriptor(1,i)}),setToStringTag(t,o,!1),Ht[o]=returnThis$1}(i,r,o);var h,p,y,getIterationMethod=function(t){if(t===a&&b)return b;if(!Kn&&t in v)return v[t];switch(t){case Jn:return function keys(){return new i(this,t)};case ti:return function values(){return new i(this,t)};case ei:return function entries(){return new i(this,t)}}return function(){return new i(this)}},g=r+" Iterator",d=!1,v=t.prototype,x=v[Zn]||v["@@iterator"]||a&&v[a],b=!Kn&&x||getIterationMethod(a),S="Array"==r&&v.entries||x;if(S&&(h=Un(S.call(new t)),Qn!==Object.prototype&&h.next&&(Un(h)!==Qn&&(Yn?Yn(h,Qn):"function"!=typeof h[Zn]&&E(h,Zn,returnThis$2)),setToStringTag(h,g,!0))),a==ti&&x&&x.name!==ti&&(d=!0,b=function values(){return x.call(this)}),v[Zn]!==b&&E(v,Zn,b),Ht[r]=b,a)if(p={values:getIterationMethod(ti),keys:u?b:getIterationMethod(Jn),entries:getIterationMethod(ei)},l)for(y in p)(Kn||d||!(y in v))&&Y(v,y,p[y]);else _export({target:r,proto:!0,forced:Kn||d},p);return p},ri="Array Iterator",ni=X.set,ii=X.getterFor(ri),oi=defineIterator(Array,"Array",(function(t,r){ni(this,{type:ri,target:toIndexedObject(t),index:0,kind:r})}),(function(){var t=ii(this),r=t.target,i=t.kind,o=t.index++;return!r||o>=r.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:o,done:!1}:"values"==i?{value:r[o],done:!1}:{value:[o,r[o]],done:!1}}),"values");Ht.Arguments=Ht.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var ai=[].reverse,ui=[1,2];_export({target:"Array",proto:!0,forced:String(ui)===String(ui.reverse())},{reverse:function reverse(){return dt(this)&&(this.length=this.length),ai.call(this)}});var si=arrayMethodHasSpeciesSupport("slice"),ci=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),li=wellKnownSymbol("species"),fi=[].slice,hi=Math.max;_export({target:"Array",proto:!0,forced:!si||!ci},{slice:function slice(t,r){var i,o,a,u=toIndexedObject(this),l=toLength(u.length),h=toAbsoluteIndex(t,l),p=toAbsoluteIndex(void 0===r?l:r,l);if(dt(u)&&("function"!=typeof(i=u.constructor)||i!==Array&&!dt(i.prototype)?isObject(i)&&null===(i=i[li])&&(i=void 0):i=void 0,i===Array||void 0===i))return fi.call(u,h,p);for(o=new(void 0===i?Array:i)(hi(p-h,0)),a=0;h<p;h++,a++)h in u&&createProperty(o,a,u[h]);return o.length=a,o}});var pi=Date.prototype,yi="Invalid Date",gi="toString",di=pi.toString,vi=pi.getTime;new Date(NaN)+""!=yi&&Y(pi,gi,(function toString(){var t=vi.call(this);return t==t?di.call(this):yi}));var mi=k.f,xi=Function.prototype,bi=xi.toString,Si=/^\s*function ([^ (]*)/,wi="name";o&&!(wi in xi)&&mi(xi,wi,{configurable:!0,get:function(){try{return bi.call(this).match(Si)[1]}catch(t){return""}}}),setToStringTag(i.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!o},{create:Fr}),_export({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:k.f});var ki=fails((function(){Un(1)}));_export({target:"Object",stat:!0,forced:ki,sham:!Bn},{getPrototypeOf:function getPrototypeOf(t){return Un(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:Yn});var Ei="toString",Pi=RegExp.prototype,Ci=Pi.toString,Ri=fails((function(){return"/a/b"!=Ci.call({source:"a",flags:"b"})})),Ai=Ci.name!=Ei;(Ri||Ai)&&Y(RegExp.prototype,Ei,(function toString(){var t=anObject(this),r=String(t.source),i=t.flags;return"/"+r+"/"+String(void 0===i&&t instanceof RegExp&&!("flags"in Pi)?regexpFlags.call(t):i)}),{unsafe:!0});var Ti=br.charAt,_i="String Iterator",Mi=X.set,Ni=X.getterFor(_i);defineIterator(String,"String",(function(t){Mi(this,{type:_i,string:String(t),index:0})}),(function next(){var t,r=Ni(this),i=r.string,o=r.index;return o>=i.length?{value:void 0,done:!0}:(t=Ti(i,o),r.index+=t.length,{value:t,done:!1})}));var Oi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var Di in Oi){var $i=i[Di],Ii=$i&&$i.prototype;if(Ii&&Ii.forEach!==$n)try{E(Ii,"forEach",$n)}catch(t){Ii.forEach=$n}}var Fi=wellKnownSymbol("iterator"),Vi=wellKnownSymbol("toStringTag"),Li=oi.values;for(var ji in Oi){var Bi=i[ji],Gi=Bi&&Bi.prototype;if(Gi){if(Gi[Fi]!==Li)try{E(Gi,Fi,Li)}catch(t){Gi[Fi]=Li}if(Gi[Vi]||E(Gi,Vi,ji),Oi[ji])for(var zi in oi)if(Gi[zi]!==oi[zi])try{E(Gi,zi,oi[zi])}catch(t){Gi[zi]=oi[zi]}}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var h=t[u](l),p=h.value}catch(t){return void i(t)}h.done?r(p):Promise.resolve(p).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}var Ui=createCommonjsModule((function(t){var r=function(t){var r,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",h=a.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var a=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(a.prototype),l=new Context(o||[]);return u._invoke=function makeInvokeMethod(t,r,i){var o=p;return function invoke(a,u){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===a)throw u;return doneResult()}for(i.method=a,i.arg=u;;){var l=i.delegate;if(l){var h=maybeInvokeDelegate(l,i);if(h){if(h===v)continue;return h}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=d,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=g;var x=tryCatch(t,r,i);if("normal"===x.type){if(o=i.done?d:y,x.arg===v)continue;return{value:x.arg,done:i.done}}"throw"===x.type&&(o=d,i.method="throw",i.arg=x.arg)}}}(t,i,l),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var p="suspendedStart",y="suspendedYield",g="executing",d="completed",v={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var x={};x[u]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(values([])));S&&S!==i&&o.call(S,u)&&(x=S);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(x);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){var i;this._invoke=function enqueue(a,u){function callInvokeWithMethodAndArg(){return new r((function(i,l){!function invoke(i,a,u,l){var h=tryCatch(t[i],t,a);if("throw"!==h.type){var p=h.arg,y=p.value;return y&&"object"===_typeof(y)&&o.call(y,"__await")?r.resolve(y.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(y).then((function(t){p.value=t,u(p)}),(function(t){return invoke("throw",t,u,l)}))}l(h.arg)}(a,u,i,l)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,i){var o=t.iterator[i.method];if(o===r){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=r,maybeInvokeDelegate(t,i),"throw"===i.method))return v;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var a=tryCatch(o,t.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,v;var u=a.arg;return u?u.done?(i[t.resultName]=u.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=r),i.delegate=null,v):u:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,v)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var i=t[u];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,l=function next(){for(;++a<t.length;)if(o.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=r,next.done=!0,next};return l.next=l}}return{next:doneResult}}function doneResult(){return{value:r,done:!0}}return GeneratorFunction.prototype=w.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[l]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(r,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(r,i,o,a),u);return t.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),w[u]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var i in t)r.push(i);return r.reverse(),function next(){for(;r.length;){var i=r.pop();if(i in t)return next.value=i,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(resetTryEntry),!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=r)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var i=this;function handle(o,a){return l.type="throw",l.arg=t,i.next=o,a&&(i.method="next",i.arg=r),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var h=o.call(u,"catchLoc"),p=o.call(u,"finallyLoc");if(h&&p){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,v):this.complete(l)},complete:function complete(t,r){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&&r&&(this.next=r),v},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),v}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,i,o){return this.delegate={iterator:values(t),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=r),v}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}})),qi="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var Wi=defaultSetTimout,Hi=defaultClearTimeout;function runTimeout(t){if(Wi===setTimeout)return setTimeout(t,0);if((Wi===defaultSetTimout||!Wi)&&setTimeout)return Wi=setTimeout,setTimeout(t,0);try{return Wi(t,0)}catch(r){try{return Wi.call(null,t,0)}catch(r){return Wi.call(this,t,0)}}}"function"==typeof qi.setTimeout&&(Wi=setTimeout),"function"==typeof qi.clearTimeout&&(Hi=clearTimeout);var Xi,Yi=[],Qi=!1,Ki=-1;function cleanUpNextTick(){Qi&&Xi&&(Qi=!1,Xi.length?Yi=Xi.concat(Yi):Ki=-1,Yi.length&&drainQueue())}function drainQueue(){if(!Qi){var t=runTimeout(cleanUpNextTick);Qi=!0;for(var r=Yi.length;r;){for(Xi=Yi,Yi=[];++Ki<r;)Xi&&Xi[Ki].run();Ki=-1,r=Yi.length}Xi=null,Qi=!1,function runClearTimeout(t){if(Hi===clearTimeout)return clearTimeout(t);if((Hi===defaultClearTimeout||!Hi)&&clearTimeout)return Hi=clearTimeout,clearTimeout(t);try{return Hi(t)}catch(r){try{return Hi.call(null,t)}catch(r){return Hi.call(this,t)}}}(t)}}function Item(t,r){this.fun=t,this.array=r}Item.prototype.run=function(){this.fun.apply(null,this.array)};function noop(){}var Zi=noop,Ji=noop,to=noop,eo=noop,ro=noop,no=noop,io=noop;var oo=qi.performance||{},ao=oo.now||oo.mozNow||oo.msNow||oo.oNow||oo.webkitNow||function(){return(new Date).getTime()};var uo=new Date;var so={nextTick:function nextTick(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)r[i-1]=arguments[i];Yi.push(new Item(t,r)),1!==Yi.length||Qi||runTimeout(drainQueue)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Zi,addListener:Ji,once:to,off:eo,removeListener:ro,removeAllListeners:no,emit:io,binding:function binding(t){throw new Error("process.binding is not supported")},cwd:function cwd(){return"/"},chdir:function chdir(t){throw new Error("process.chdir is not supported")},umask:function umask(){return 0},hrtime:function hrtime(t){var r=.001*ao.call(oo),i=Math.floor(r),o=Math.floor(r%1*1e9);return t&&(i-=t[0],(o-=t[1])<0&&(i--,o+=1e9)),[i,o]},platform:"browser",release:{},config:{},uptime:function uptime(){return(new Date-uo)/1e3}},co=qr.every,lo=arrayMethodIsStrict("every"),fo=arrayMethodUsesToLength("every");_export({target:"Array",proto:!0,forced:!lo||!fo},{every:function every(t){return co(this,t,arguments.length>1?arguments[1]:void 0)}});_export({target:"Array",proto:!0},{fill:function fill(t){for(var r=toObject(this),i=toLength(r.length),o=arguments.length,a=toAbsoluteIndex(o>1?arguments[1]:void 0,i),u=o>2?arguments[2]:void 0,l=void 0===u?i:toAbsoluteIndex(u,i);l>a;)r[a++]=t;return r}}),addToUnscopables("fill");var ho=qr.filter,po=arrayMethodHasSpeciesSupport("filter"),yo=arrayMethodUsesToLength("filter");_export({target:"Array",proto:!0,forced:!po||!yo},{filter:function filter(t){return ho(this,t,arguments.length>1?arguments[1]:void 0)}});var go=!checkCorrectnessOfIteration((function(t){Array.from(t)}));_export({target:"Array",stat:!0,forced:go},{from:function from(t){var r,i,o,a,u,l,h=toObject(t),p="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,d=void 0!==g,v=getIteratorMethod(h),x=0;if(d&&(g=functionBindContext(g,y>2?arguments[2]:void 0,2)),null==v||p==Array&&isArrayIteratorMethod(v))for(i=new p(r=toLength(h.length));r>x;x++)l=d?g(h[x],x):h[x],createProperty(i,x,l);else for(u=(a=v.call(h)).next,i=new p;!(o=u.call(a)).done;x++)l=d?callWithSafeIterationClosing(a,g,[o.value,x],!0):o.value,createProperty(i,x,l);return i.length=x,i}});var vo=rt.includes,mo=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!mo},{includes:function includes(t){return vo(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var xo=rt.indexOf,bo=[].indexOf,So=!!bo&&1/[1].indexOf(1,-0)<0,wo=arrayMethodIsStrict("indexOf"),ko=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:So||!wo||!ko},{indexOf:function indexOf(t){return So?bo.apply(this,arguments)||0:xo(this,t,arguments.length>1?arguments[1]:void 0)}}),_export({target:"Array",stat:!0},{isArray:dt});var Eo=qr.map,Po=arrayMethodHasSpeciesSupport("map"),Co=arrayMethodUsesToLength("map");_export({target:"Array",proto:!0,forced:!Po||!Co},{map:function map(t){return Eo(this,t,arguments.length>1?arguments[1]:void 0)}});var createMethod$4=function(t){return function(r,i,o,a){aFunction$1(i);var u=toObject(r),l=y(u),h=toLength(u.length),p=t?h-1:0,g=t?-1:1;if(o<2)for(;;){if(p in l){a=l[p],p+=g;break}if(p+=g,t?p<0:h<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:h>p;p+=g)p in l&&(a=i(a,l[p],p,u));return a}},Ro={left:createMethod$4(!1),right:createMethod$4(!0)}.left,Ao=arrayMethodIsStrict("reduce"),To=arrayMethodUsesToLength("reduce",{1:0});_export({target:"Array",proto:!0,forced:!Ao||!To},{reduce:function reduce(t){return Ro(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var _o=qr.some,Mo=arrayMethodIsStrict("some"),No=arrayMethodUsesToLength("some");_export({target:"Array",proto:!0,forced:!Mo||!No},{some:function some(t){return _o(this,t,arguments.length>1?arguments[1]:void 0)}}),_export({target:"Date",stat:!0},{now:function now(){return(new Date).getTime()}});var Oo=[].slice,Do={},construct=function(t,r,i){if(!(r in Do)){for(var o=[],a=0;a<r;a++)o[a]="a["+a+"]";Do[r]=Function("C,a","return new C("+o.join(",")+")")}return Do[r](t,i)},$o=Function.bind||function bind(t){var r=aFunction$1(this),i=Oo.call(arguments,1),o=function bound(){var a=i.concat(Oo.call(arguments));return this instanceof o?construct(r,a.length,a):r.apply(t,a)};return isObject(r.prototype)&&(o.prototype=r.prototype),o};_export({target:"Function",proto:!0},{bind:$o});var Io=!fails((function(){return Object.isExtensible(Object.preventExtensions({}))})),Fo=createCommonjsModule((function(t){var r=k.f,i=uid("meta"),o=0,a=Object.isExtensible||function(){return!0},setMetadata=function(t){r(t,i,{value:{objectID:"O"+ ++o,weakData:{}}})},u=t.exports={REQUIRED:!1,fastKey:function(t,r){if(!isObject(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!has(t,i)){if(!a(t))return"F";if(!r)return"E";setMetadata(t)}return t[i].objectID},getWeakData:function(t,r){if(!has(t,i)){if(!a(t))return!0;if(!r)return!1;setMetadata(t)}return t[i].weakData},onFreeze:function(t){return Io&&u.REQUIRED&&a(t)&&!has(t,i)&&setMetadata(t),t}};L[i]=!0})),inheritIfRequired=function(t,r,i){var o,a;return Yn&&"function"==typeof(o=r.constructor)&&o!==i&&isObject(a=o.prototype)&&a!==i.prototype&&Yn(t,a),t},Vo=k.f,Lo=Fo.fastKey,jo=X.set,Bo=X.getterFor,Go=(function(t,r,o){var a=-1!==t.indexOf("Map"),u=-1!==t.indexOf("Weak"),l=a?"set":"add",h=i[t],p=h&&h.prototype,y=h,g={},fixMethod=function(t){var r=p[t];Y(p,t,"add"==t?function add(t){return r.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(u&&!isObject(t))&&r.call(this,0===t?0:t)}:"get"==t?function get(t){return u&&!isObject(t)?void 0:r.call(this,0===t?0:t)}:"has"==t?function has(t){return!(u&&!isObject(t))&&r.call(this,0===t?0:t)}:function set(t,i){return r.call(this,0===t?0:t,i),this})};if(yt(t,"function"!=typeof h||!(u||p.forEach&&!fails((function(){(new h).entries().next()})))))y=o.getConstructor(r,t,a,l),Fo.REQUIRED=!0;else if(yt(t,!0)){var d=new y,v=d[l](u?{}:-0,1)!=d,x=fails((function(){d.has(1)})),b=checkCorrectnessOfIteration((function(t){new h(t)})),S=!u&&fails((function(){for(var t=new h,r=5;r--;)t[l](r,r);return!t.has(-0)}));b||((y=r((function(r,i){anInstance(r,y,t);var o=inheritIfRequired(new h,r,y);return null!=i&&Kt(i,o[l],o,a),o}))).prototype=p,p.constructor=y),(x||S)&&(fixMethod("delete"),fixMethod("has"),a&&fixMethod("get")),(S||v)&&fixMethod(l),u&&p.clear&&delete p.clear}g[t]=y,_export({global:!0,forced:y!=h},g),setToStringTag(y,t),u||o.setStrong(y,t,a)}("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,r,i,a){var u=t((function(t,l){anInstance(t,u,r),jo(t,{type:r,index:Fr(null),first:void 0,last:void 0,size:0}),o||(t.size=0),null!=l&&Kt(l,t[a],t,i)})),l=Bo(r),define=function(t,r,i){var a,u,h=l(t),p=getEntry(t,r);return p?p.value=i:(h.last=p={index:u=Lo(r,!0),key:r,value:i,previous:a=h.last,next:void 0,removed:!1},h.first||(h.first=p),a&&(a.next=p),o?h.size++:t.size++,"F"!==u&&(h.index[u]=p)),t},getEntry=function(t,r){var i,o=l(t),a=Lo(r);if("F"!==a)return o.index[a];for(i=o.first;i;i=i.next)if(i.key==r)return i};return redefineAll(u.prototype,{clear:function clear(){for(var t=l(this),r=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete r[i.index],i=i.next;t.first=t.last=void 0,o?t.size=0:this.size=0},delete:function(t){var r=this,i=l(r),a=getEntry(r,t);if(a){var u=a.next,h=a.previous;delete i.index[a.index],a.removed=!0,h&&(h.next=u),u&&(u.previous=h),i.first==a&&(i.first=u),i.last==a&&(i.last=h),o?i.size--:r.size--}return!!a},forEach:function forEach(t){for(var r,i=l(this),o=functionBindContext(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.next:i.first;)for(o(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function has(t){return!!getEntry(this,t)}}),redefineAll(u.prototype,i?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}}),o&&Vo(u.prototype,"size",{get:function(){return l(this).size}}),u},setStrong:function(t,r,i){var o=r+" Iterator",a=Bo(r),u=Bo(o);defineIterator(t,r,(function(t,r){jo(this,{type:o,target:t,state:a(t),kind:r,last:void 0})}),(function(){for(var t=u(this),r=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?"keys"==r?{value:i.key,done:!1}:"values"==r?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),i?"entries":"values",!i,!0),setSpecies(r)}}),at.f),zo=S.f,Uo=k.f,qo=Mr.trim,Wo="Number",Ho=i.Number,Xo=Ho.prototype,Yo=classofRaw(Fr(Xo))==Wo,toNumber=function(t){var r,i,o,a,u,l,h,p,y=toPrimitive(t,!1);if("string"==typeof y&&y.length>2)if(43===(r=(y=qo(y)).charCodeAt(0))||45===r){if(88===(i=y.charCodeAt(2))||120===i)return NaN}else if(48===r){switch(y.charCodeAt(1)){case 66:case 98:o=2,a=49;break;case 79:case 111:o=8,a=55;break;default:return+y}for(l=(u=y.slice(2)).length,h=0;h<l;h++)if((p=u.charCodeAt(h))<48||p>a)return NaN;return parseInt(u,o)}return+y};if(yt(Wo,!Ho(" 0o1")||!Ho("0b1")||Ho("+0x1"))){for(var Qo,Ko=function Number(t){var r=arguments.length<1?0:t,i=this;return i instanceof Ko&&(Yo?fails((function(){Xo.valueOf.call(i)})):classofRaw(i)!=Wo)?inheritIfRequired(new Ho(toNumber(r)),i,Ko):toNumber(r)},Zo=o?Go(Ho):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Jo=0;Zo.length>Jo;Jo++)has(Ho,Qo=Zo[Jo])&&!has(Ko,Qo)&&Uo(Ko,Qo,zo(Ho,Qo));Ko.prototype=Xo,Xo.constructor=Ko,Y(i,Wo,Ko)}_export({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:$r});var ta=Fo.onFreeze,ea=Object.freeze,ra=fails((function(){ea(1)}));_export({target:"Object",stat:!0,forced:ra,sham:!Io},{freeze:function freeze(t){return ea&&isObject(t)?ea(ta(t)):t}});var na=S.f,ia=fails((function(){na(1)}));_export({target:"Object",stat:!0,forced:!o||ia,sham:!o},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return na(toIndexedObject(t),r)}}),_export({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,i,o=toIndexedObject(t),a=S.f,u=st(o),l={},h=0;u.length>h;)void 0!==(i=a(o,r=u[h++]))&&createProperty(l,r,i);return l}});var oa=fails((function(){Dr(1)}));_export({target:"Object",stat:!0,forced:oa},{keys:function keys(t){return Dr(toObject(t))}});var aa=Mr.trim,ua=i.parseFloat,sa=1/ua(Rr+"-0")!=-1/0?function parseFloat(t){var r=aa(String(t)),i=ua(r);return 0===i&&"-"==r.charAt(0)?-0:i}:ua;_export({global:!0,forced:parseFloat!=sa},{parseFloat:sa});var ca=Mr.trim,la=i.parseInt,fa=/^[+-]?0[Xx]/,ha=8!==la(Rr+"08")||22!==la(Rr+"0x16")?function parseInt(t,r){var i=ca(String(t));return la(i,r>>>0||(fa.test(i)?16:10))}:la;_export({global:!0,forced:parseInt!=ha},{parseInt:ha});var pa=getBuiltIn("Reflect","apply"),ya=Function.apply,ga=!fails((function(){pa((function(){}))}));_export({target:"Reflect",stat:!0,forced:ga},{apply:function apply(t,r,i){return aFunction$1(t),anObject(i),pa?pa(t,r,i):ya.call(t,r,i)}});var da=getBuiltIn("Reflect","construct"),va=fails((function(){function F(){}return!(da((function(){}),[],F)instanceof F)})),ma=!fails((function(){da((function(){}))})),xa=va||ma;_export({target:"Reflect",stat:!0,forced:xa,sham:xa},{construct:function construct(t,r){aFunction$1(t),anObject(r);var i=arguments.length<3?t:aFunction$1(arguments[2]);if(ma&&!va)return da(t,r,i);if(t==i){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var o=[null];return o.push.apply(o,r),new($o.apply(t,o))}var a=i.prototype,u=Fr(isObject(a)?a:Object.prototype),l=Function.apply.call(t,u,r);return isObject(l)?l:u}});var ba=S.f;_export({target:"Reflect",stat:!0},{deleteProperty:function deleteProperty(t,r){var i=ba(anObject(t),r);return!(i&&!i.configurable)&&delete t[r]}}),_export({target:"Reflect",stat:!0,sham:!Bn},{getPrototypeOf:function getPrototypeOf(t){return Un(anObject(t))}});var Sa=wellKnownSymbol("match"),isRegexp=function(t){var r;return isObject(t)&&(void 0!==(r=t[Sa])?!!r:"RegExp"==classofRaw(t))},notARegexp=function(t){if(isRegexp(t))throw TypeError("The method doesn't accept regular expressions");return t},wa=wellKnownSymbol("match"),correctIsRegexpLogic=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[wa]=!1,"/./"[t](r)}catch(t){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function includes(t){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(t),arguments.length>1?arguments[1]:void 0)}}),fixRegexpWellKnownSymbolLogic("match",1,(function(t,r,i){return[function match(r){var i=requireObjectCoercible(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i):new RegExp(r)[t](String(i))},function(t){var o=i(r,t,this);if(o.done)return o.value;var a=anObject(t),u=String(this);if(!a.global)return regexpExecAbstract(a,u);var l=a.unicode;a.lastIndex=0;for(var h,p=[],y=0;null!==(h=regexpExecAbstract(a,u));){var g=String(h[0]);p[y]=g,""===g&&(a.lastIndex=advanceStringIndex(u,toLength(a.lastIndex),l)),y++}return 0===y?null:p}]}));var ka=[].push,Ea=Math.min,Pa=4294967295,Ca=!fails((function(){return!RegExp(Pa,"y")}));fixRegexpWellKnownSymbolLogic("split",2,(function(t,r,i){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var o=String(requireObjectCoercible(this)),a=void 0===i?Pa:i>>>0;if(0===a)return[];if(void 0===t)return[o];if(!isRegexp(t))return r.call(o,t,a);for(var u,l,h,p=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,d=new RegExp(t.source,y+"g");(u=pr.call(d,o))&&!((l=d.lastIndex)>g&&(p.push(o.slice(g,u.index)),u.length>1&&u.index<o.length&&ka.apply(p,u.slice(1)),h=u[0].length,g=l,p.length>=a));)d.lastIndex===u.index&&d.lastIndex++;return g===o.length?!h&&d.test("")||p.push(""):p.push(o.slice(g)),p.length>a?p.slice(0,a):p}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:r.call(this,t,i)}:r,[function split(r,i){var a=requireObjectCoercible(this),u=null==r?void 0:r[t];return void 0!==u?u.call(r,a,i):o.call(String(a),r,i)},function(t,a){var u=i(o,t,this,a,o!==r);if(u.done)return u.value;var l=anObject(t),h=String(this),p=speciesConstructor(l,RegExp),y=l.unicode,g=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Ca?"y":"g"),d=new p(Ca?l:"^(?:"+l.source+")",g),v=void 0===a?Pa:a>>>0;if(0===v)return[];if(0===h.length)return null===regexpExecAbstract(d,h)?[h]:[];for(var x=0,b=0,S=[];b<h.length;){d.lastIndex=Ca?b:0;var w,k=regexpExecAbstract(d,Ca?h:h.slice(b));if(null===k||(w=Ea(toLength(d.lastIndex+(Ca?0:b)),h.length))===x)b=advanceStringIndex(h,b,y);else{if(S.push(h.slice(x,b)),S.length===v)return S;for(var E=1;E<=k.length-1;E++)if(S.push(k[E]),S.length===v)return S;b=x=w}}return S.push(h.slice(x)),S}]}),!Ca);var Ra,Aa=S.f,Ta="".startsWith,_a=Math.min,Ma=correctIsRegexpLogic("startsWith"),Na=!(Ma||(Ra=Aa(String.prototype,"startsWith"),!Ra||Ra.writable));_export({target:"String",proto:!0,forced:!Na&&!Ma},{startsWith:function startsWith(t){var r=String(requireObjectCoercible(this));notARegexp(t);var i=toLength(_a(arguments.length>1?arguments[1]:void 0,r.length)),o=String(t);return Ta?Ta.call(r,o,i):r.slice(i,i+o.length)===o}});var Oa=function _arrayWithHoles(t){if(Array.isArray(t))return t};var Da=function _iterableToArrayLimit(t,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],o=!0,a=!1,u=void 0;try{for(var l,h=t[Symbol.iterator]();!(o=(l=h.next()).done)&&(i.push(l.value),!r||i.length!==r);o=!0);}catch(t){a=!0,u=t}finally{try{o||null==h.return||h.return()}finally{if(a)throw u}}return i}};var $a=function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o};var Ia=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return $a(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$a(t,r):void 0}};var Fa=function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var Va=function _slicedToArray(t,r){return Oa(t)||Da(t,r)||Ia(t,r)||Fa()},La=Ui;function asyncGeneratorStep$1(t,r,i,o,a,u,l){try{var h=t[u](l),p=h.value}catch(t){return void i(t)}h.done?r(p):Promise.resolve(p).then(o,a)}var ja=function _asyncToGenerator$1(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep$1(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep$1(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}};var Ba=function _defineProperty(t,r,i){return r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t};var Ga=function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")};function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}for(var za=function _createClass(t,r,i){return r&&_defineProperties(t.prototype,r),i&&_defineProperties(t,i),t},Ua=createCommonjsModule((function(t){(function(){var r,i,o,a,u,l;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=so&&so.hrtime?(t.exports=function(){return(r()-u)/1e6},i=so.hrtime,a=(r=function getNanoSeconds(){var t;return 1e9*(t=i())[0]+t[1]})(),l=1e9*so.uptime(),u=a-l):Date.now?(t.exports=function(){return Date.now()-o},o=Date.now()):(t.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(r)})),qa="undefined"==typeof window?r:window,Wa=["moz","webkit"],Ha="AnimationFrame",Xa=qa["request"+Ha],Ya=qa["cancel"+Ha]||qa["cancelRequest"+Ha],Qa=0;!Xa&&Qa<Wa.length;Qa++)Xa=qa[Wa[Qa]+"Request"+Ha],Ya=qa[Wa[Qa]+"Cancel"+Ha]||qa[Wa[Qa]+"CancelRequest"+Ha];if(!Xa||!Ya){var Ka=0,Za=0,Ja=[];Xa=function raf(t){if(0===Ja.length){var r=Ua(),i=Math.max(0,16.666666666666668-(r-Ka));Ka=i+r,setTimeout((function(){var t=Ja.slice(0);Ja.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(Ka)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return Ja.push({handle:++Za,callback:t,cancelled:!1}),Za},Ya=function caf(t){for(var r=0;r<Ja.length;r++)Ja[r].handle===t&&(Ja[r].cancelled=!0)}}var tu=function raf_1(t){return Xa.call(qa,t)};tu.cancel=function cancel(){Ya.apply(qa,arguments)},tu.polyfill=function polyfill(t){t||(t=qa),t.requestAnimationFrame=Xa,t.cancelAnimationFrame=Ya};var eu=function rgbcolor(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var i=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function process(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function process(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function process(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function process(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],o=0;o<i.length;o++){var a=i[o].re,u=i[o].process,l=a.exec(t);if(l){var h=u(l);this.r=h[0],this.g=h[1],this.b=h[2],h.length>3&&(this.alpha=h[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,o=0;o<i.length;o++)for(var a=i[o].example,u=0;u<a.length;u++)t[t.length]=a[u];for(var l in r)t[t.length]=l;var h=document.createElement("ul");h.setAttribute("id","rgbcolor-examples");for(o=0;o<t.length;o++)try{var p=document.createElement("li"),y=new RGBColor(t[o]),g=document.createElement("div");g.style.cssText="margin: 3px; border: 1px solid black; background:"+y.toHex()+"; color:"+y.toHex(),g.appendChild(document.createTextNode("test"));var d=document.createTextNode(" "+t[o]+" -> "+y.toRGB()+" -> "+y.toHex());p.appendChild(g),p.appendChild(d),h.appendChild(p)}catch(t){}return h}},ru=createCommonjsModule((function(t){function _typeof(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=_typeof=function _typeof(t){return typeof t}:t.exports=_typeof=function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(r)}t.exports=_typeof}));var nu=function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var iu=function _possibleConstructorReturn(t,r){return!r||"object"!==ru(r)&&"function"!=typeof r?nu(t):r},ou=createCommonjsModule((function(t){function _getPrototypeOf(r){return t.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(r)}t.exports=_getPrototypeOf})),au=createCommonjsModule((function(t){function _setPrototypeOf(r,i){return t.exports=_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){return t.__proto__=r,t},_setPrototypeOf(r,i)}t.exports=_setPrototypeOf}));var uu=function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&au(t,r)};var su=function _arrayWithoutHoles(t){if(Array.isArray(t))return $a(t)};var cu=function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)};var lu=function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var fu=function _toConsumableArray(t){return su(t)||cu(t)||Ia(t)||lu()};_export({target:"Reflect",stat:!0},{get:function get$1(t,r){var i,o,a=arguments.length<3?t:arguments[2];return anObject(t)===a?t[r]:(i=S.f(t,r))?has(i,"value")?i.value:void 0===i.get?void 0:i.get.call(a):isObject(o=Un(t))?get$1(o,r,a):void 0}});var hu=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=ou(t)););return t},pu=createCommonjsModule((function(t){function _get(r,i,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=_get=Reflect.get:t.exports=_get=function _get(t,r,i){var o=hu(t,r);if(o){var a=Object.getOwnPropertyDescriptor(o,r);return a.get?a.get.call(i):a.value}},_get(r,i,o||r)}t.exports=_get}));function _typeof$1(t){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var yu=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],gu=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function processCanvasRGBA(t,r,i,o,a,u){if(!(isNaN(u)||u<1)){u|=0;var l=function getImageDataFromCanvas(t,r,i,o,a){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==_typeof$1(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var u=t.getContext("2d");try{return u.getImageData(r,i,o,a)}catch(t){throw new Error("unable to access image data: "+t)}}(t,r,i,o,a);l=function processImageDataRGBA(t,r,i,o,a,u){for(var l,h=t.data,p=2*u+1,y=o-1,g=a-1,d=u+1,v=d*(d+1)/2,x=new du,b=x,S=1;S<p;S++)b=b.next=new du,S===d&&(l=b);b.next=x;for(var w=null,k=null,E=0,P=0,C=yu[u],R=gu[u],A=0;A<a;A++){b=x;for(var T=h[P],_=h[P+1],M=h[P+2],N=h[P+3],O=0;O<d;O++)b.r=T,b.g=_,b.b=M,b.a=N,b=b.next;for(var D=0,$=0,I=0,V=0,L=d*T,j=d*_,B=d*M,G=d*N,z=v*T,U=v*_,q=v*M,W=v*N,H=1;H<d;H++){var X=P+((y<H?y:H)<<2),Y=h[X],Q=h[X+1],K=h[X+2],Z=h[X+3],J=d-H;z+=(b.r=Y)*J,U+=(b.g=Q)*J,q+=(b.b=K)*J,W+=(b.a=Z)*J,D+=Y,$+=Q,I+=K,V+=Z,b=b.next}w=x,k=l;for(var tt=0;tt<o;tt++){var et=W*C>>R;if(h[P+3]=et,0!==et){var rt=255/et;h[P]=(z*C>>R)*rt,h[P+1]=(U*C>>R)*rt,h[P+2]=(q*C>>R)*rt}else h[P]=h[P+1]=h[P+2]=0;z-=L,U-=j,q-=B,W-=G,L-=w.r,j-=w.g,B-=w.b,G-=w.a;var nt=tt+u+1;nt=E+(nt<y?nt:y)<<2,z+=D+=w.r=h[nt],U+=$+=w.g=h[nt+1],q+=I+=w.b=h[nt+2],W+=V+=w.a=h[nt+3],w=w.next;var it=k,ot=it.r,at=it.g,ut=it.b,st=it.a;L+=ot,j+=at,B+=ut,G+=st,D-=ot,$-=at,I-=ut,V-=st,k=k.next,P+=4}E+=o}for(var ct=0;ct<o;ct++){var lt=h[P=ct<<2],ft=h[P+1],ht=h[P+2],pt=h[P+3],yt=d*lt,gt=d*ft,dt=d*ht,vt=d*pt,mt=v*lt,xt=v*ft,bt=v*ht,St=v*pt;b=x;for(var wt=0;wt<d;wt++)b.r=lt,b.g=ft,b.b=ht,b.a=pt,b=b.next;for(var kt=o,Et=0,Pt=0,Ct=0,Rt=0,At=1;At<=u;At++){P=kt+ct<<2;var Tt=d-At;mt+=(b.r=lt=h[P])*Tt,xt+=(b.g=ft=h[P+1])*Tt,bt+=(b.b=ht=h[P+2])*Tt,St+=(b.a=pt=h[P+3])*Tt,Rt+=lt,Et+=ft,Pt+=ht,Ct+=pt,b=b.next,At<g&&(kt+=o)}P=ct,w=x,k=l;for(var _t=0;_t<a;_t++){var Mt=P<<2;h[Mt+3]=pt=St*C>>R,pt>0?(pt=255/pt,h[Mt]=(mt*C>>R)*pt,h[Mt+1]=(xt*C>>R)*pt,h[Mt+2]=(bt*C>>R)*pt):h[Mt]=h[Mt+1]=h[Mt+2]=0,mt-=yt,xt-=gt,bt-=dt,St-=vt,yt-=w.r,gt-=w.g,dt-=w.b,vt-=w.a,Mt=ct+((Mt=_t+d)<g?Mt:g)*o<<2,mt+=Rt+=w.r=h[Mt],xt+=Et+=w.g=h[Mt+1],bt+=Pt+=w.b=h[Mt+2],St+=Ct+=w.a=h[Mt+3],w=w.next,yt+=lt=k.r,gt+=ft=k.g,dt+=ht=k.b,vt+=pt=k.a,Rt-=lt,Et-=ft,Pt-=ht,Ct-=pt,k=k.next,P+=o}}return t}(l,0,0,o,a,u),t.getContext("2d").putImageData(l,r,i)}}var du=function BlurStack(){!function _classCallCheck$1(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,BlurStack),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function compressSpaces(t){return t.replace(/(?!\u3000)\s+/gm," ")}function toNumbers(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var vu=/^[A-Z-]+$/;function normalizeAttributeName(t){return vu.test(t)?t.toLowerCase():t}function parseExternalUrl(t){var r=t.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return r[2]||r[3]||r[4]}var mu=/(\[[^\]]+\])/g,xu=/(#[^\s\+>~\.\[:]+)/g,bu=/(\.[^\s\+>~\.\[:]+)/g,Su=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,wu=/(:[\w-]+\([^\)]*\))/gi,ku=/(:[^\s\+>~\.\[:]+)/g,Eu=/([^\s\+>~\.\[:]+)/g;function findSelectorMatch(t,r){var i=t.match(r);return i?[t.replace(r," "),i.length]:[t,0]}var Pu=1e-8;function vectorMagnitude(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function vectorsRatio(t,r){return(t[0]*r[0]+t[1]*r[1])/(vectorMagnitude(t)*vectorMagnitude(r))}function vectorsAngle(t,r){return(t[0]*r[1]<t[1]*r[0]?-1:1)*Math.acos(vectorsRatio(t,r))}function CB1(t){return t*t*t}function CB2(t){return 3*t*t*(1-t)}function CB3(t){return 3*t*(1-t)*(1-t)}function CB4(t){return(1-t)*(1-t)*(1-t)}function QB1(t){return t*t}function QB2(t){return 2*t*(1-t)}function QB3(t){return(1-t)*(1-t)}(function createCommonjsModule$1(t,r){return t(r={exports:{}},r.exports),r.exports})((function(t){var r=function(t){var r,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",h=a.toStringTag||"@@toStringTag";function wrap(t,r,i,o){var a=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(a.prototype),l=new Context(o||[]);return u._invoke=function makeInvokeMethod(t,r,i){var o=p;return function invoke(a,u){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===a)throw u;return doneResult()}for(i.method=a,i.arg=u;;){var l=i.delegate;if(l){var h=maybeInvokeDelegate(l,i);if(h){if(h===v)continue;return h}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=d,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=g;var x=tryCatch(t,r,i);if("normal"===x.type){if(o=i.done?d:y,x.arg===v)continue;return{value:x.arg,done:i.done}}"throw"===x.type&&(o=d,i.method="throw",i.arg=x.arg)}}}(t,i,l),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var p="suspendedStart",y="suspendedYield",g="executing",d="completed",v={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var x={};x[u]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(values([])));S&&S!==i&&o.call(S,u)&&(x=S);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(x);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function AsyncIterator(t,r){var i;this._invoke=function enqueue(a,u){function callInvokeWithMethodAndArg(){return new r((function(i,l){!function invoke(i,a,u,l){var h=tryCatch(t[i],t,a);if("throw"!==h.type){var p=h.arg,y=p.value;return y&&"object"===_typeof(y)&&o.call(y,"__await")?r.resolve(y.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(y).then((function(t){p.value=t,u(p)}),(function(t){return invoke("throw",t,u,l)}))}l(h.arg)}(a,u,i,l)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,i){var o=t.iterator[i.method];if(o===r){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=r,maybeInvokeDelegate(t,i),"throw"===i.method))return v;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var a=tryCatch(o,t.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,v;var u=a.arg;return u?u.done?(i[t.resultName]=u.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=r),i.delegate=null,v):u:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,v)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var i=t[u];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,l=function next(){for(;++a<t.length;)if(o.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=r,next.done=!0,next};return l.next=l}}return{next:doneResult}}function doneResult(){return{value:r,done:!0}}return GeneratorFunction.prototype=w.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunctionPrototype[h]=GeneratorFunction.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,h in t||(t[h]="GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[l]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(r,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(r,i,o,a),u);return t.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(w),w[h]="Generator",w[u]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var i in t)r.push(i);return r.reverse(),function next(){for(;r.length;){var i=r.pop();if(i in t)return next.value=i,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(resetTryEntry),!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=r)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var i=this;function handle(o,a){return l.type="throw",l.arg=t,i.next=o,a&&(i.method="next",i.arg=r),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var h=o.call(u,"catchLoc"),p=o.call(u,"finallyLoc");if(h&&p){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,v):this.complete(l)},complete:function complete(t,r){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&&r&&(this.next=r),v},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),v}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,i,o){return this.delegate={iterator:values(t),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=r),v}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}));var Cu=function(){function Property(t,r,i){Ga(this,Property),this.document=t,this.name=r,this.value=i,this.isNormalizedColor=!1}return za(Property,[{key:"hasValue",value:function hasValue(){var t=this.value;return null!==t&&""!==t&&0!==t&&void 0!==t}},{key:"isString",value:function isString(t){var r=this.value,i="string"==typeof r;return i&&t?t.test(r):i}},{key:"isUrlDefinition",value:function isUrlDefinition(){return this.isString(/^url\(/)}},{key:"isPixels",value:function isPixels(){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 setValue(t){return this.value=t,this}},{key:"getValue",value:function getValue(t){return void 0===t||this.hasValue()?this.value:t}},{key:"getNumber",value:function getNumber(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var r=this.value,i=parseFloat(r);return this.isString(/%$/)&&(i/=100),i}},{key:"getString",value:function getString(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}},{key:"getColor",value:function getColor(t){var r=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=function normalizeColor(t){if(!t.startsWith("rgb"))return t;var r=3;return t.replace(/\d+(\.\d+)?/g,(function(t,i){return r--&&i?String(Math.round(parseFloat(t))):t}))}(r),this.value=r),r}},{key:"getDpi",value:function getDpi(){return 96}},{key:"getRem",value:function getRem(){return this.document.rootEmSize}},{key:"getEm",value:function getEm(){return this.document.emSize}},{key:"getUnits",value:function getUnits(){return this.getString().replace(/[0-9\.\-]/g,"")}},{key:"getPixels",value:function getPixels(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var i="boolean"==typeof t?[void 0,t]:[t],o=Va(i,2),a=o[0],u=o[1],l=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(l.computeSize("x"),l.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(l.computeSize("x"),l.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*l.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*l.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&u:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*l.computeSize(a);default:var h=this.getNumber();return r&&h<1?h*l.computeSize(a):h}}},{key:"getMilliseconds",value:function getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function getDefinition(){var t=this.getString(),r=t.match(/#([^\)'"]+)/);return r&&(r=r[1]),r||(r=t),this.document.definitions[r]}},{key:"getFillStyleDefinition",value:function getFillStyleDefinition(t,r){var i=this.getDefinition();if(!i)return null;if("function"==typeof i.createGradient)return i.createGradient(this.document.ctx,t,r);if("function"==typeof i.createPattern){if(i.getHrefAttribute().hasValue()){var o=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),o.hasValue()&&i.getAttribute("patternTransform",!0).setValue(o.value)}return i.createPattern(this.document.ctx,t,r)}return null}},{key:"getTextBaseline",value:function getTextBaseline(){return this.hasValue()?Property.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function addOpacity(t){for(var r=this.getColor(),i=r.length,o=0,a=0;a<i&&(","===r[a]&&o++,3!==o);a++);if(t.hasValue()&&this.isString()&&3!==o){var u=new eu(r);u.ok&&(u.alpha=t.getNumber(),r=u.toRGBA())}return new Property(this.document,this.name,r)}}],[{key:"empty",value:function empty(t){return new Property(t,"EMPTY","")}}]),Property}();Cu.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 Ru=function(){function ViewPort(){Ga(this,ViewPort),this.viewPorts=[]}return za(ViewPort,[{key:"clear",value:function clear(){this.viewPorts=[]}},{key:"setCurrent",value:function setCurrent(t,r){this.viewPorts.push({width:t,height:r})}},{key:"removeCurrent",value:function removeCurrent(){this.viewPorts.pop()}},{key:"getCurrent",value:function getCurrent(){var t=this.viewPorts;return t[t.length-1]}},{key:"computeSize",value:function computeSize(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},{key:"width",get:function get(){return this.getCurrent().width}},{key:"height",get:function get(){return this.getCurrent().height}}]),ViewPort}(),Au=function(){function Point(t,r){Ga(this,Point),this.x=t,this.y=r}return za(Point,[{key:"angleTo",value:function angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function applyTransform(t){var r=this.x,i=this.y,o=r*t[0]+i*t[2]+t[4],a=r*t[1]+i*t[3]+t[5];this.x=o,this.y=a}}],[{key:"parse",value:function parse(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=toNumbers(t),o=Va(i,2),a=o[0],u=void 0===a?r:a,l=o[1],h=void 0===l?r:l;return new Point(u,h)}},{key:"parseScale",value:function parseScale(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=toNumbers(t),o=Va(i,2),a=o[0],u=void 0===a?r:a,l=o[1],h=void 0===l?u:l;return new Point(u,h)}},{key:"parsePath",value:function parsePath(t){for(var r=toNumbers(t),i=r.length,o=[],a=0;a<i;a+=2)o.push(new Point(r[a],r[a+1]));return o}}]),Point}(),Tu=function(){function Mouse(t){Ga(this,Mouse),this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return za(Mouse,[{key:"isWorking",value:function isWorking(){return this.working}},{key:"start",value:function start(){if(!this.working){var t=this.screen,r=this.onClick,i=this.onMouseMove,o=t.ctx.canvas;o.onclick=r,o.onmousemove=i,this.working=!0}}},{key:"stop",value:function stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}},{key:"hasEvents",value:function hasEvents(){return this.working&&this.events.length>0}},{key:"runEvents",value:function runEvents(){if(this.working){var t=this.screen,r=this.events,i=this.eventElements,o=t.ctx.canvas.style;o&&(o.cursor=""),r.forEach((function(t,r){for(var o=t.run,a=i[r];a;)o(a),a=a.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function checkPath(t,r){if(this.working&&r){var i=this.events,o=this.eventElements;i.forEach((function(i,a){var u=i.x,l=i.y;!o[a]&&r.isPointInPath&&r.isPointInPath(u,l)&&(o[a]=t)}))}}},{key:"checkBoundingBox",value:function checkBoundingBox(t,r){if(this.working&&r){var i=this.events,o=this.eventElements;i.forEach((function(i,a){var u=i.x,l=i.y;!o[a]&&r.isPointInBox(u,l)&&(o[a]=t)}))}}},{key:"mapXY",value:function mapXY(t,r){for(var i=this.screen,o=i.window,a=i.ctx,u=new Au(t,r),l=a.canvas;l;)u.x-=l.offsetLeft,u.y-=l.offsetTop,l=l.offsetParent;return o.scrollX&&(u.x+=o.scrollX),o.scrollY&&(u.y+=o.scrollY),u}},{key:"onClick",value:function onClick(t){var r=this.mapXY((t||event).clientX,(t||event).clientY),i=r.x,o=r.y;this.events.push({type:"onclick",x:i,y:o,run:function run(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function onMouseMove(t){var r=this.mapXY((t||event).clientX,(t||event).clientY),i=r.x,o=r.y;this.events.push({type:"onmousemove",x:i,y:o,run:function run(t){t.onMouseMove&&t.onMouseMove()}})}}]),Mouse}(),_u="undefined"!=typeof window?window:null,Mu="undefined"!=typeof fetch?fetch.bind(void 0):null,Nu=function(){function Screen(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.fetch,o=void 0===i?Mu:i,a=r.window,u=void 0===a?_u:a;Ga(this,Screen),this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Ru,this.mouse=new Tu(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=u,this.fetch=o}return za(Screen,[{key:"wait",value:function wait(t){this.waits.push(t)}},{key:"ready",value:function ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function isReady(){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 setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function setViewBox(t){var r=t.document,i=t.ctx,o=t.aspectRatio,a=t.width,u=t.desiredWidth,l=t.height,h=t.desiredHeight,p=t.minX,y=void 0===p?0:p,g=t.minY,d=void 0===g?0:g,v=t.refX,x=t.refY,b=t.clip,S=void 0!==b&&b,w=t.clipX,k=void 0===w?0:w,E=t.clipY,P=void 0===E?0:E,C=compressSpaces(o).replace(/^defer\s/,"").split(" "),R=Va(C,2),A=R[0]||"xMidYMid",T=R[1]||"meet",_=a/u,M=l/h,N=Math.min(_,M),O=Math.max(_,M),D=u,$=h;"meet"===T&&(D*=N,$*=N),"slice"===T&&(D*=O,$*=O);var I=new Cu(r,"refX",v),V=new Cu(r,"refY",x),L=I.hasValue()&&V.hasValue();if(L&&i.translate(-N*I.getPixels("x"),-N*V.getPixels("y")),S){var j=N*k,B=N*P;i.beginPath(),i.moveTo(j,B),i.lineTo(a,B),i.lineTo(a,l),i.lineTo(j,l),i.closePath(),i.clip()}if(!L){var G="meet"===T&&N===M,z="slice"===T&&O===M,U="meet"===T&&N===_,q="slice"===T&&O===_;/^xMid/.test(A)&&(G||z)&&i.translate(a/2-D/2,0),/YMid$/.test(A)&&(U||q)&&i.translate(0,l/2-$/2),/^xMax/.test(A)&&(G||z)&&i.translate(a-D,0),/YMax$/.test(A)&&(U||q)&&i.translate(0,l-$)}switch(!0){case"none"===A:i.scale(_,M);break;case"meet"===T:i.scale(N,N);break;case"slice"===T:i.scale(O,O)}i.translate(-y,-d)}},{key:"start",value:function start(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.enableRedraw,a=void 0!==o&&o,u=i.ignoreMouse,l=void 0!==u&&u,h=i.ignoreAnimation,p=void 0!==h&&h,y=i.ignoreDimensions,g=void 0!==y&&y,d=i.ignoreClear,v=void 0!==d&&d,x=i.forceRedraw,b=i.scaleWidth,S=i.scaleHeight,w=i.offsetX,k=i.offsetY,E=this.FRAMERATE,P=this.mouse,C=1e3/E;if(this.frameDuration=C,this.readyPromise=new Promise((function(t){r.resolveReady=t})),this.isReady()&&this.render(t,g,v,b,S,w,k),a){var R=Date.now(),A=R,T=0,_=function tick(){R=Date.now(),(T=R-A)>=C&&(A=R-T%C,r.shouldUpdate(p,x)&&(r.render(t,g,v,b,S,w,k),P.runEvents())),r.intervalId=tu(tick)};l||P.start(),this.intervalId=tu(_)}}},{key:"stop",value:function stop(){this.intervalId&&(tu.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function shouldUpdate(t,r){if(!t){var i=this.frameDuration,shouldUpdate=this.animations.reduce((function(t,r){return r.update(i)||t}),!1);if(shouldUpdate)return!0}return!("function"!=typeof r||!r())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function render(t,r,i,o,a,u,l){var h=this.CLIENT_WIDTH,p=this.CLIENT_HEIGHT,y=this.viewPort,g=this.ctx,d=this.isFirstRender,v=g.canvas;y.clear(),v.width&&v.height?y.setCurrent(v.width,v.height):y.setCurrent(h,p);var x=t.getStyle("width"),b=t.getStyle("height");!r&&(d||"number"!=typeof o&&"number"!=typeof a)&&(x.hasValue()&&(v.width=x.getPixels("x"),v.style&&(v.style.width="".concat(v.width,"px"))),b.hasValue()&&(v.height=b.getPixels("y"),v.style&&(v.style.height="".concat(v.height,"px"))));var S=v.clientWidth||v.width,w=v.clientHeight||v.height;if(r&&x.hasValue()&&b.hasValue()&&(S=x.getPixels("x"),w=b.getPixels("y")),y.setCurrent(S,w),"number"==typeof u&&t.getAttribute("x",!0).setValue(u),"number"==typeof l&&t.getAttribute("y",!0).setValue(l),"number"==typeof o||"number"==typeof a){var k=toNumbers(t.getAttribute("viewBox").getString()),E=0,P=0;if("number"==typeof o){var C=t.getStyle("width");C.hasValue()?E=C.getPixels("x")/o:isNaN(k[2])||(E=k[2]/o)}if("number"==typeof a){var R=t.getStyle("height");R.hasValue()?P=R.getPixels("y")/a:isNaN(k[3])||(P=k[3]/a)}E||(E=P),P||(P=E),t.getAttribute("width",!0).setValue(o),t.getAttribute("height",!0).setValue(a);var A=t.getStyle("transform",!0,!0);A.setValue("".concat(A.getString()," scale(").concat(1/E,", ").concat(1/P,")"))}i||g.clearRect(0,0,S,w),t.render(g),d&&(this.isFirstRender=!1)}}]),Screen}();Nu.defaultWindow=_u,Nu.defaultFetch=Mu;var Ou=Nu.defaultFetch,Du="undefined"!=typeof DOMParser?DOMParser:null,$u=function(){function Parser(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.fetch,i=void 0===r?Ou:r,o=t.DOMParser,a=void 0===o?Du:o;Ga(this,Parser),this.fetch=i,this.DOMParser=a}var t,r;return za(Parser,[{key:"parse",value:(r=ja(La.mark((function _callee(t){return La.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(!/^</.test(t)){r.next=2;break}return r.abrupt("return",this.parseFromString(t));case 2:return r.abrupt("return",this.load(t));case 3:case"end":return r.stop()}}),_callee,this)}))),function parse(t){return r.apply(this,arguments)})},{key:"parseFromString",value:function parseFromString(t){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(t,"image/svg+xml"))}catch(i){return this.checkDocument(r.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function checkDocument(t){var r=t.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return t}},{key:"load",value:(t=ja(La.mark((function _callee2(t){var r,i;return La.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.fetch(t);case 2:return r=o.sent,o.next=5,r.text();case 5:return i=o.sent,o.abrupt("return",this.parseFromString(i));case 7:case"end":return o.stop()}}),_callee2,this)}))),function load(r){return t.apply(this,arguments)})}]),Parser}(),Iu=function(){function Translate(t,r){Ga(this,Translate),this.type="translate",this.point=null,this.point=Au.parse(r)}return za(Translate,[{key:"apply",value:function apply(t){var r=this.point,i=r.x,o=r.y;t.translate(i||0,o||0)}},{key:"unapply",value:function unapply(t){var r=this.point,i=r.x,o=r.y;t.translate(-1*i||0,-1*o||0)}},{key:"applyToPoint",value:function applyToPoint(t){var r=this.point,i=r.x,o=r.y;t.applyTransform([1,0,0,1,i||0,o||0])}}]),Translate}(),Fu=function(){function Rotate(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Ga(this,Rotate),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var o=toNumbers(r);this.angle=new Cu(t,"angle",o[0]),this.cx=(o[1]||0)+(i[0]||0),this.cy=(o[2]||0)+(i[1]||0)}return za(Rotate,[{key:"apply",value:function apply(t){var r=this.cx,i=this.cy,o=this.angle;t.translate(r,i),t.rotate(o.getRadians()),t.translate(-r,-i)}},{key:"unapply",value:function unapply(t){var r=this.cx,i=this.cy,o=this.angle;t.translate(r,i),t.rotate(-1*o.getRadians()),t.translate(-r,-i)}},{key:"applyToPoint",value:function applyToPoint(t){var r=this.cx,i=this.cy,o=this.angle.getRadians();t.applyTransform([1,0,0,1,r||0,i||0]),t.applyTransform([Math.cos(o),Math.sin(o),-Math.sin(o),Math.cos(o),0,0]),t.applyTransform([1,0,0,1,-r||0,-i||0])}}]),Rotate}(),Vu=function(){function Scale(t,r){Ga(this,Scale),this.type="scale",this.scale=null;var i=Au.parseScale(r);0!==i.x&&0!==i.y||(i.x=Pu,i.y=Pu),this.scale=i}return za(Scale,[{key:"apply",value:function apply(t){var r=this.scale,i=r.x,o=r.y;t.scale(i,o||i)}},{key:"unapply",value:function unapply(t){var r=this.scale,i=r.x,o=r.y;t.scale(1/i,1/o||i)}},{key:"applyToPoint",value:function applyToPoint(t){var r=this.scale,i=r.x,o=r.y;t.applyTransform([i||0,0,0,o||0,0,0])}}]),Scale}(),Lu=function(){function Matrix(t,r){Ga(this,Matrix),this.type="matrix",this.matrix=[],this.matrix=toNumbers(r)}return za(Matrix,[{key:"apply",value:function apply(t){var r=this.matrix;t.transform(r[0],r[1],r[2],r[3],r[4],r[5])}},{key:"unapply",value:function unapply(t){var r=this.matrix,i=r[0],o=r[2],a=r[4],u=r[1],l=r[3],h=r[5],p=1/(i*(1*l-0*h)-o*(1*u-0*h)+a*(0*u-0*l));t.transform(p*(1*l-0*h),p*(0*h-1*u),p*(0*a-1*o),p*(1*i-0*a),p*(o*h-a*l),p*(a*u-i*h))}},{key:"applyToPoint",value:function applyToPoint(t){t.applyTransform(this.matrix)}}]),Matrix}();function _isNativeReflectConstruct(){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 ju=function(t){uu(Skew,t);var r=function _createSuper(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(Skew);function Skew(t,i){var o;return Ga(this,Skew),(o=r.call(this,t,i)).type="skew",o.angle=null,o.angle=new Cu(t,"angle",i),o}return Skew}(Lu);function _isNativeReflectConstruct$1(){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 Bu=function(t){uu(SkewX,t);var r=function _createSuper$1(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$1()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(SkewX);function SkewX(t,i){var o;return Ga(this,SkewX),(o=r.call(this,t,i)).type="skewX",o.matrix=[1,0,Math.tan(o.angle.getRadians()),1,0,0],o}return SkewX}(ju);function _isNativeReflectConstruct$2(){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 Gu=function(t){uu(SkewY,t);var r=function _createSuper$2(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$2()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(SkewY);function SkewY(t,i){var o;return Ga(this,SkewY),(o=r.call(this,t,i)).type="skewY",o.matrix=[1,Math.tan(o.angle.getRadians()),0,1,0,0],o}return SkewY}(ju);var zu=function(){function Transform(t,r,i){var o=this;Ga(this,Transform),this.document=t,this.transforms=[];var a=function parseTransforms(t){return compressSpaces(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(r),u=i?toNumbers(i):[];a.forEach((function(t){if("none"!==t){var r=function parseTransform(t){var r=t.split("("),i=Va(r,2),o=i[0],a=i[1];return[o.trim(),a.trim().replace(")","")]}(t),i=Va(r,2),a=i[0],l=i[1],h=Transform.transformTypes[a];void 0!==h&&o.transforms.push(new h(o.document,l,u))}}))}return za(Transform,[{key:"apply",value:function apply(t){for(var r=this.transforms,i=r.length,o=0;o<i;o++)r[o].apply(t)}},{key:"unapply",value:function unapply(t){for(var r=this.transforms,i=r.length-1;i>=0;i--)r[i].unapply(t)}},{key:"applyToPoint",value:function applyToPoint(t){for(var r=this.transforms,i=r.length,o=0;o<i;o++)r[o].applyToPoint(t)}}],[{key:"fromElement",value:function fromElement(t,r){var i=r.getStyle("transform",!1,!0),o=r.getStyle("transform-origin",!1,!0);return i.hasValue()?new Transform(t,i.getString(),o.getString()):null}}]),Transform}();zu.transformTypes={translate:Iu,rotate:Fu,scale:Vu,matrix:Lu,skewX:Bu,skewY:Gu};var Uu=function(){function Element(t,r){var i=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Ga(this,Element),this.document=t,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(r){var o=normalizeAttributeName(r.nodeName);i.attributes[o]=new Cu(t,o,r.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a=this.getAttribute("style").getString().split(";").map((function(t){return t.trim()}));a.forEach((function(r){if(r){var o=r.split(":").map((function(t){return t.trim()})),a=Va(o,2),u=a[0],l=a[1];i.styles[u]=new Cu(t,u,l)}}))}var u=t.definitions,l=this.getAttribute("id");l.hasValue()&&(u[l.getValue()]||(u[l.getValue()]=this)),Array.from(r.childNodes).forEach((function(r){if(1===r.nodeType)i.addChild(r);else if(o&&(3===r.nodeType||4===r.nodeType)){var a=t.createTextNode(r);a.getText().length>0&&i.addChild(a)}}))}}return za(Element,[{key:"getAttribute",value:function getAttribute(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.attributes[t];if(!i&&r){var o=new Cu(this.document,t,"");return this.attributes[t]=o,o}return i||Cu.empty(this.document)}},{key:"getHrefAttribute",value:function getHrefAttribute(){for(var t in this.attributes)if("href"===t||/:href$/.test(t))return this.attributes[t];return Cu.empty(this.document)}},{key:"getStyle",value:function getStyle(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.styles[t];if(o)return o;var a=this.getAttribute(t);if(a&&a.hasValue())return this.styles[t]=a,a;if(!i){var u=this.parent;if(u){var l=u.getStyle(t);if(l&&l.hasValue())return l}}if(r){var h=new Cu(this.document,t,"");return this.styles[t]=h,h}return o||Cu.empty(this.document)}},{key:"render",value:function render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(t),i.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function setContext(t){}},{key:"applyEffects",value:function applyEffects(t){var r=zu.fromElement(this.document,this);r&&r.apply(t);var i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){var o=i.getDefinition();o&&o.apply(t)}}},{key:"clearContext",value:function clearContext(t){}},{key:"renderChildren",value:function renderChildren(t){this.children.forEach((function(r){r.render(t)}))}},{key:"addChild",value:function addChild(t){var r=t instanceof Element?t:this.document.createElement(t);r.parent=this,Element.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function matchesSelector(t){var r=this.node;if("function"==typeof r.matches)return r.matches(t);var i=r.getAttribute("class");return!(!i||""===i)&&i.split(" ").some((function(r){if(".".concat(r)===t)return!0}))}},{key:"addStylesFromStyleDefinition",value:function addStylesFromStyleDefinition(){var t=this.document,r=t.styles,i=t.stylesSpecificity;for(var o in r)if("@"!==o[0]&&this.matchesSelector(o)){var a=r[o],u=i[o];if(a)for(var l in a){var h=this.stylesSpecificity[l];void 0===h&&(h="000"),u>=h&&(this.styles[l]=a[l],this.stylesSpecificity[l]=u)}}}},{key:"removeStyles",value:function removeStyles(t,r){return r.reduce((function(r,i){var o=t.getStyle(i);if(!o.hasValue())return r;var a=o.getString();return o.setValue(""),[].concat(fu(r),[[i,a]])}),[])}},{key:"restoreStyles",value:function restoreStyles(t,r){r.forEach((function(r){var i=Va(r,2),o=i[0],a=i[1];t.getStyle(o,!0).setValue(a)}))}}]),Element}();function _isNativeReflectConstruct$3(){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}}Uu.ignoreChildTypes=["title"];var qu=function(t){uu(UnknownElement,t);var r=function _createSuper$3(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$3()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(UnknownElement);function UnknownElement(t,i,o){return Ga(this,UnknownElement),r.call(this,t,i,o)}return UnknownElement}(Uu);function wrapFontFamily(t){var r=t.trim();return/^('|")/.test(r)?r:'"'.concat(r,'"')}function prepareFontStyle(t){if(!t)return"";var r=t.trim().toLowerCase();switch(r){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return r;default:return/^oblique\s+(-|)\d+deg$/.test(r)?r:""}}function prepareFontWeight(t){if(!t)return"";var r=t.trim().toLowerCase();switch(r){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return r;default:return/^[\d.]+$/.test(r)?r:""}}var Wu=function(){function Font(t,r,i,o,a,u){Ga(this,Font);var l=u?"string"==typeof u?Font.parse(u):u:{};this.fontFamily=a||l.fontFamily,this.fontSize=o||l.fontSize,this.fontStyle=t||l.fontStyle,this.fontWeight=i||l.fontWeight,this.fontVariant=r||l.fontVariant}return za(Font,[{key:"toString",value:function toString(){return[prepareFontStyle(this.fontStyle),this.fontVariant,prepareFontWeight(this.fontWeight),this.fontSize,(t=this.fontFamily,void 0===so?t:t.trim().split(",").map(wrapFontFamily).join(","))].join(" ").trim();var t}}],[{key:"parse",value:function parse(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,i="",o="",a="",u="",l="",h=compressSpaces(t).trim().split(" "),p={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return h.forEach((function(t){switch(!0){case!p.fontStyle&&Font.styles.includes(t):"inherit"!==t&&(i=t),p.fontStyle=!0;break;case!p.fontVariant&&Font.variants.includes(t):"inherit"!==t&&(o=t),p.fontStyle=!0,p.fontVariant=!0;break;case!p.fontWeight&&Font.weights.includes(t):"inherit"!==t&&(a=t),p.fontStyle=!0,p.fontVariant=!0,p.fontWeight=!0;break;case!p.fontSize:if("inherit"!==t){var r=t.split("/"),h=Va(r,1);u=h[0]}p.fontStyle=!0,p.fontVariant=!0,p.fontWeight=!0,p.fontSize=!0;break;default:"inherit"!==t&&(l+=t)}})),new Font(i,o,a,u,l,r)}}]),Font}();Wu.styles="normal|italic|oblique|inherit",Wu.variants="normal|small-caps|inherit",Wu.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Hu=function(){function BoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;Ga(this,BoundingBox),this.x1=t,this.y1=r,this.x2=i,this.y2=o,this.addPoint(t,r),this.addPoint(i,o)}return za(BoundingBox,[{key:"addPoint",value:function addPoint(t,r){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==r&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}},{key:"addX",value:function addX(t){this.addPoint(t,null)}},{key:"addY",value:function addY(t){this.addPoint(null,t)}},{key:"addBoundingBox",value:function addBoundingBox(t){if(t){var r=t.x1,i=t.y1,o=t.x2,a=t.y2;this.addPoint(r,i),this.addPoint(o,a)}}},{key:"sumCubic",value:function sumCubic(t,r,i,o,a){return Math.pow(1-t,3)*r+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*o+Math.pow(t,3)*a}},{key:"bezierCurveAdd",value:function bezierCurveAdd(t,r,i,o,a){var u=6*r-12*i+6*o,l=-3*r+9*i-9*o+3*a,h=3*i-3*r;if(0!==l){var p=Math.pow(u,2)-4*h*l;if(!(p<0)){var y=(-u+Math.sqrt(p))/(2*l);0<y&&y<1&&(t?this.addX(this.sumCubic(y,r,i,o,a)):this.addY(this.sumCubic(y,r,i,o,a)));var g=(-u-Math.sqrt(p))/(2*l);0<g&&g<1&&(t?this.addX(this.sumCubic(g,r,i,o,a)):this.addY(this.sumCubic(g,r,i,o,a)))}}else{if(0===u)return;var d=-h/u;0<d&&d<1&&(t?this.addX(this.sumCubic(d,r,i,o,a)):this.addY(this.sumCubic(d,r,i,o,a)))}}},{key:"addBezierCurve",value:function addBezierCurve(t,r,i,o,a,u,l,h){this.addPoint(t,r),this.addPoint(l,h),this.bezierCurveAdd(!0,t,i,a,l),this.bezierCurveAdd(!1,r,o,u,h)}},{key:"addQuadraticCurve",value:function addQuadraticCurve(t,r,i,o,a,u){var l=t+2/3*(i-t),h=r+2/3*(o-r),p=l+1/3*(a-t),y=h+1/3*(u-r);this.addBezierCurve(t,r,l,p,h,y,a,u)}},{key:"isPointInBox",value:function isPointInBox(t,r){var i=this.x1,o=this.y1,a=this.x2,u=this.y2;return i<=t&&t<=a&&o<=r&&r<=u}},{key:"x",get:function get(){return this.x1}},{key:"y",get:function get(){return this.y1}},{key:"width",get:function get(){return this.x2-this.x1}},{key:"height",get:function get(){return this.y2-this.y1}}]),BoundingBox}();function _isNativeReflectConstruct$4(){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 Xu=function(t){uu(RenderedElement,t);var r=function _createSuper$4(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$4()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(RenderedElement);function RenderedElement(){var t;return Ga(this,RenderedElement),(t=r.apply(this,arguments)).modifiedEmSizeStack=!1,t}return za(RenderedElement,[{key:"calculateOpacity",value:function calculateOpacity(){for(var t=1,r=this;r;){var i=r.getStyle("opacity",!1,!0);i.hasValue()&&(t*=i.getNumber()),r=r.parent}return t}},{key:"setContext",value:function setContext(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!r){var i=this.getStyle("fill"),o=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),u=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){var l=i.getFillStyleDefinition(this,o);l&&(t.fillStyle=l)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var h=i.getColor();"inherit"!==h&&(t.fillStyle="none"===h?"rgba(0,0,0,0)":h)}if(o.hasValue()){var p=new Cu(this.document,"fill",t.fillStyle).addOpacity(o).getColor();t.fillStyle=p}if(a.isUrlDefinition()){var y=a.getFillStyleDefinition(this,u);y&&(t.strokeStyle=y)}else if(a.hasValue()){"currentColor"===a.getString()&&a.setValue(this.getStyle("color").getColor());var g=a.getString();"inherit"!==g&&(t.strokeStyle="none"===g?"rgba(0,0,0,0)":g)}if(u.hasValue()){var d=new Cu(this.document,"stroke",t.strokeStyle).addOpacity(u).getString();t.strokeStyle=d}var v=this.getStyle("stroke-width");if(v.hasValue()){var x=v.getPixels();t.lineWidth=x||Pu}var b=this.getStyle("stroke-linecap"),S=this.getStyle("stroke-linejoin"),w=this.getStyle("stroke-miterlimit"),k=this.getStyle("paint-order"),E=this.getStyle("stroke-dasharray"),P=this.getStyle("stroke-dashoffset");if(b.hasValue()&&(t.lineCap=b.getString()),S.hasValue()&&(t.lineJoin=S.getString()),w.hasValue()&&(t.miterLimit=w.getNumber()),k.hasValue()&&(t.paintOrder=k.getValue()),E.hasValue()&&"none"!==E.getString()){var C=toNumbers(E.getString());void 0!==t.setLineDash?t.setLineDash(C):void 0!==t.webkitLineDash?t.webkitLineDash=C:void 0===t.mozDash||1===C.length&&0===C[0]||(t.mozDash=C);var R=P.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=R:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=R:void 0!==t.mozDashOffset&&(t.mozDashOffset=R)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var A=this.getStyle("font"),T=this.getStyle("font-style"),_=this.getStyle("font-variant"),M=this.getStyle("font-weight"),N=this.getStyle("font-size"),O=this.getStyle("font-family"),D=new Wu(T.getString(),_.getString(),M.getString(),N.hasValue()?"".concat(N.getPixels(!0),"px"):"",O.getString(),Wu.parse(A.getString(),t.font));T.setValue(D.fontStyle),_.setValue(D.fontVariant),M.setValue(D.fontWeight),N.setValue(D.fontSize),O.setValue(D.fontFamily),t.font=D.toString(),N.isPixels()&&(this.document.emSize=N.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function clearContext(t){pu(ou(RenderedElement.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),RenderedElement}(Uu);function _isNativeReflectConstruct$5(){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 Yu=function(t){uu(TextElement,t);var r=function _createSuper$5(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$5()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(TextElement);function TextElement(t,i,o){var a;return Ga(this,TextElement),(a=r.call(this,t,i,(this instanceof TextElement?this.constructor:void 0)===TextElement||o)).type="text",a.x=0,a.y=0,a.measureCache=-1,a}return za(TextElement,[{key:"setContext",value:function setContext(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];pu(ou(TextElement.prototype),"setContext",this).call(this,t,r);var i=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();i&&(t.textBaseline=i)}},{key:"initializeCoordinates",value:function initializeCoordinates(t){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var r=this.getAttribute("dx"),i=this.getAttribute("dy");r.hasValue()&&(this.x+=r.getPixels("x")),i.hasValue()&&(this.y+=i.getPixels("y")),this.x+=this.getAnchorDelta(t,this,0)}},{key:"getBoundingBox",value:function getBoundingBox(t){var r=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(t);var i=null;return this.children.forEach((function(o,a){var u=r.getChildBoundingBox(t,r,r,a);i?i.addBoundingBox(u):i=u})),i}},{key:"getFontSize",value:function getFontSize(){var t=this.document,r=this.parent,i=Wu.parse(t.ctx.font).fontSize;return r.getStyle("font-size").getNumber(i)}},{key:"getTElementBoundingBox",value:function getTElementBoundingBox(t){var r=this.getFontSize();return new Hu(this.x,this.y-r,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function getGlyph(t,r,i){var o=r[i],a=null;if(t.isArabic){var u=r.length,l=r[i-1],h=r[i+1],p="isolated";(0===i||" "===l)&&i<u-2&&" "!==h&&(p="terminal"),i>0&&" "!==l&&i<u-2&&" "!==h&&(p="medial"),i>0&&" "!==l&&(i===u-1||" "===h)&&(p="initial"),void 0!==t.glyphs[o]&&((a=t.glyphs[o][p])||"glyph"!==t.glyphs[o].type||(a=t.glyphs[o]))}else a=t.glyphs[o];return a||(a=t.missingGlyph),a}},{key:"getText",value:function getText(){return""}},{key:"getTextFromNode",value:function getTextFromNode(t){var r=t||this.node,i=Array.from(r.parentNode.childNodes),o=i.indexOf(r),a=i.length-1,u=compressSpaces(r.value||r.text||r.textContent||"");return 0===o&&(u=function trimLeft(t){return t.replace(/^[\n \t]+/,"")}(u)),o===a&&(u=function trimRight(t){return t.replace(/[\n \t]+$/,"")}(u)),u}},{key:"renderChildren",value:function renderChildren(t){var r=this;if("text"===this.type){this.initializeCoordinates(t),this.children.forEach((function(i,o){r.renderChild(t,r,r,o)}));var i=this.document.screen.mouse;i.isWorking()&&i.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function renderTElementChildren(t){var r=this.document,i=this.parent,o=this.getText(),a=i.getStyle("font-family").getDefinition();if(a)for(var u=a.fontFace.unitsPerEm,l=Wu.parse(r.ctx.font),h=i.getStyle("font-size").getNumber(l.fontSize),p=i.getStyle("font-style").getString(l.fontStyle),y=h/u,g=a.isRTL?o.split("").reverse().join(""):o,d=toNumbers(i.getAttribute("dx").getString()),v=g.length,x=0;x<v;x++){var b=this.getGlyph(a,g,x);t.translate(this.x,this.y),t.scale(y,-y);var S=t.lineWidth;t.lineWidth=t.lineWidth*u/h,"italic"===p&&t.transform(1,0,.4,1,0,0),b.render(t),"italic"===p&&t.transform(1,0,-.4,1,0,0),t.lineWidth=S,t.scale(1/y,-1/y),t.translate(-this.x,-this.y),this.x+=h*(b.horizAdvX||a.horizAdvX)/u,void 0===d[x]||isNaN(d[x])||(this.x+=d[x])}else{var w=this.x,k=this.y;"stroke"===t.paintOrder?(t.strokeStyle&&t.strokeText(o,w,k),t.fillStyle&&t.fillText(o,w,k)):(t.fillStyle&&t.fillText(o,w,k),t.strokeStyle&&t.strokeText(o,w,k))}}},{key:"getAnchorDelta",value:function getAnchorDelta(t,r,i){var o=this.getStyle("text-anchor").getString("start");if("start"!==o){for(var a=r.children,u=a.length,l=null,h=0,p=i;p<u&&(l=a[p],!(p>i&&l.getAttribute("x").hasValue()||l.getAttribute("text-anchor").hasValue()));p++)h+=l.measureTextRecursive(t);return-1*("end"===o?h:h/2)}return 0}},{key:"adjustChildCoordinates",value:function adjustChildCoordinates(t,r,i,o){var a=i.children[o];if("function"!=typeof a.measureText)return a;t.save(),a.setContext(t,!0);var u=a.getAttribute("x"),l=a.getAttribute("y"),h=a.getAttribute("dx"),p=a.getAttribute("dy"),y=a.getAttribute("text-anchor").getString("start");if(0===o&&"textNode"!==a.type&&(u.hasValue()||u.setValue(r.getAttribute("x").getValue("0")),l.hasValue()||l.setValue(r.getAttribute("y").getValue("0")),h.hasValue()||h.setValue(r.getAttribute("dx").getValue("0")),p.hasValue()||p.setValue(r.getAttribute("dy").getValue("0"))),u.hasValue()){if(a.x=u.getPixels("x")+r.getAnchorDelta(t,i,o),"start"!==y){var g=a.measureTextRecursive(t);a.x+=-1*("end"===y?g:g/2)}h.hasValue()&&(a.x+=h.getPixels("x"))}else{if("start"!==y){var d=a.measureTextRecursive(t);r.x+=-1*("end"===y?d:d/2)}h.hasValue()&&(r.x+=h.getPixels("x")),a.x=r.x}return r.x=a.x+a.measureText(t),l.hasValue()?(a.y=l.getPixels("y"),p.hasValue()&&(a.y+=p.getPixels("y"))):(p.hasValue()&&(r.y+=p.getPixels("y")),a.y=r.y),r.y=a.y,a.clearContext(t),t.restore(),a}},{key:"getChildBoundingBox",value:function getChildBoundingBox(t,r,i,o){var a=this.adjustChildCoordinates(t,r,i,o),u=a.getBoundingBox(t);return u?(a.children.forEach((function(i,o){var l=r.getChildBoundingBox(t,r,a,o);u.addBoundingBox(l)})),u):null}},{key:"renderChild",value:function renderChild(t,r,i,o){var a=this.adjustChildCoordinates(t,r,i,o);a.render(t),a.children.forEach((function(i,o){r.renderChild(t,r,a,o)}))}},{key:"measureTextRecursive",value:function measureTextRecursive(t){return this.children.reduce((function(r,i){return r+i.measureTextRecursive(t)}),this.measureText(t))}},{key:"measureText",value:function measureText(t){var r=this.measureCache;if(~r)return r;var i=this.getText(),o=this.measureTargetText(t,i);return this.measureCache=o,o}},{key:"measureTargetText",value:function measureTargetText(t,r){if(!r.length)return 0;var i=this.parent,o=i.getStyle("font-family").getDefinition();if(o){for(var a=this.getFontSize(),u=o.isRTL?r.split("").reverse().join(""):r,l=toNumbers(i.getAttribute("dx").getString()),h=u.length,p=0,y=0;y<h;y++){p+=(this.getGlyph(o,u,y).horizAdvX||o.horizAdvX)*a/o.fontFace.unitsPerEm,void 0===l[y]||isNaN(l[y])||(p+=l[y])}return p}if(!t.measureText)return 10*r.length;t.save(),this.setContext(t,!0);var g=t.measureText(r).width;return this.clearContext(t),t.restore(),g}}]),TextElement}(Xu);function _isNativeReflectConstruct$6(){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 Qu=function(t){uu(TSpanElement,t);var r=function _createSuper$6(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$6()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(TSpanElement);function TSpanElement(t,i,o){var a;return Ga(this,TSpanElement),(a=r.call(this,t,i,(this instanceof TSpanElement?this.constructor:void 0)===TSpanElement||o)).type="tspan",a.text=a.children.length>0?"":a.getTextFromNode(),a}return za(TSpanElement,[{key:"getText",value:function getText(){return this.text}}]),TSpanElement}(Yu);function _isNativeReflectConstruct$7(){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 Ku=function(t){uu(TextNode,t);var r=function _createSuper$7(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$7()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(TextNode);function TextNode(){var t;return Ga(this,TextNode),(t=r.apply(this,arguments)).type="textNode",t}return TextNode}(Qu);var Zu=function(){function PathParser(t){Ga(this,PathParser),this.control=null,this.start=null,this.current=null,this.command="",this.tokens=[],this.i=-1,this.previousCommand="",this.points=[],this.angles=[],this.tokens=function preparePath(t){return compressSpaces(t.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()}(t).split(" ")}return za(PathParser,[{key:"reset",value:function reset(){this.i=-1,this.command="",this.previousCommand="",this.start=new Au(0,0),this.control=new Au(0,0),this.current=new Au(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function isEnd(){return this.i>=this.tokens.length-1}},{key:"isCommandOrEnd",value:function isCommandOrEnd(){if(this.isEnd())return!0;var t=this.i,r=this.tokens;return/^[A-Za-z]$/.test(r[t+1])}},{key:"isRelativeCommand",value:function isRelativeCommand(){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 getToken(){return this.i++,this.tokens[this.i]}},{key:"getScalar",value:function getScalar(){return parseFloat(this.getToken())}},{key:"nextCommand",value:function nextCommand(){this.previousCommand=this.command,this.command=this.getToken()}},{key:"getPoint",value:function getPoint(){var t=new Au(this.getScalar(),this.getScalar());return this.makeAbsolute(t)}},{key:"getAsControlPoint",value:function getAsControlPoint(){var t=this.getPoint();return this.control=t,t}},{key:"getAsCurrentPoint",value:function getAsCurrentPoint(){var t=this.getPoint();return this.current=t,t}},{key:"getReflectedControlPoint",value:function getReflectedControlPoint(){var t=this.previousCommand.toLowerCase();if("c"!==t&&"s"!==t&&"q"!==t&&"t"!==t)return this.current;var r=this.current,i=r.x,o=r.y,a=this.control,u=a.x,l=a.y;return new Au(2*i-u,2*o-l)}},{key:"makeAbsolute",value:function makeAbsolute(t){if(this.isRelativeCommand()){var r=this.current,i=r.x,o=r.y;t.x+=i,t.y+=o}return t}},{key:"addMarker",value:function addMarker(t,r,i){var o=this.points,a=this.angles;i&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=o[o.length-1].angleTo(i)),this.addMarkerAngle(t,r?r.angleTo(t):null)}},{key:"addMarkerAngle",value:function addMarkerAngle(t,r){this.points.push(t),this.angles.push(r)}},{key:"getMarkerPoints",value:function getMarkerPoints(){return this.points}},{key:"getMarkerAngles",value:function getMarkerAngles(){for(var t=this.angles,r=t.length,i=0;i<r;i++)if(!t[i])for(var o=i+1;o<r;o++)if(t[o]){t[i]=t[o];break}return t}}]),PathParser}();function _isNativeReflectConstruct$8(){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 Ju=function(t){uu(PathElement,t);var r=function _createSuper$8(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$8()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(PathElement);function PathElement(t,i,o){var a;return Ga(this,PathElement),(a=r.call(this,t,i,o)).type="path",a.pathParser=null,a.pathParser=new Zu(a.getAttribute("d").getString()),a}return za(PathElement,[{key:"path",value:function path(t){var r=this.pathParser,i=new Hu;for(r.reset(),t&&t.beginPath();!r.isEnd();)switch(r.nextCommand(),r.command){case"M":case"m":this.pathM(t,i);break;case"L":case"l":this.pathL(t,i);break;case"H":case"h":this.pathH(t,i);break;case"V":case"v":this.pathV(t,i);break;case"C":case"c":this.pathC(t,i);break;case"S":case"s":this.pathS(t,i);break;case"Q":case"q":this.pathQ(t,i);break;case"T":case"t":this.pathT(t,i);break;case"A":case"a":this.pathA(t,i);break;case"Z":case"z":this.pathZ(t,i)}return i}},{key:"getBoundingBox",value:function getBoundingBox(t){return this.path()}},{key:"getMarkers",value:function getMarkers(){var t=this.pathParser,r=t.getMarkerPoints(),i=t.getMarkerAngles();return r.map((function(t,r){return[t,i[r]]}))}},{key:"renderChildren",value:function renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var r=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==r.getString("inherit")?t.fill(r.getString()):t.fill()),""!==t.strokeStyle&&t.stroke();var i=this.getMarkers();if(i){var o=i.length-1,a=this.getStyle("marker-start"),u=this.getStyle("marker-mid"),l=this.getStyle("marker-end");if(a.isUrlDefinition()){var h=a.getDefinition(),p=Va(i[0],2),y=p[0],g=p[1];h.render(t,y,g)}if(u.isUrlDefinition())for(var d=u.getDefinition(),v=1;v<o;v++){var x=Va(i[v],2),b=x[0],S=x[1];d.render(t,b,S)}if(l.isUrlDefinition()){var w=l.getDefinition(),k=Va(i[o],2),E=k[0],P=k[1];w.render(t,E,P)}}}},{key:"pathM",value:function pathM(t,r){var i=this.pathParser,o=i.getAsCurrentPoint(),a=o.x,u=o.y;for(i.addMarker(o),r.addPoint(a,u),t&&t.moveTo(a,u),i.start=i.current;!i.isCommandOrEnd();){var l=i.getAsCurrentPoint(),h=l.x,p=l.y;i.addMarker(l,i.start),r.addPoint(h,p),t&&t.lineTo(h,p)}}},{key:"pathL",value:function pathL(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getAsCurrentPoint(),u=a.x,l=a.y;i.addMarker(a,o),r.addPoint(u,l),t&&t.lineTo(u,l)}}},{key:"pathH",value:function pathH(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=new Au((i.isRelativeCommand()?o.x:0)+i.getScalar(),o.y);i.addMarker(a,o),i.current=a,r.addPoint(a.x,a.y),t&&t.lineTo(a.x,a.y)}}},{key:"pathV",value:function pathV(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=new Au(o.x,(i.isRelativeCommand()?o.y:0)+i.getScalar());i.addMarker(a,o),i.current=a,r.addPoint(a.x,a.y),t&&t.lineTo(a.x,a.y)}}},{key:"pathC",value:function pathC(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getPoint(),u=i.getAsControlPoint(),l=i.getAsCurrentPoint();i.addMarker(l,u,a),r.addBezierCurve(o.x,o.y,a.x,a.y,u.x,u.y,l.x,l.y),t&&t.bezierCurveTo(a.x,a.y,u.x,u.y,l.x,l.y)}}},{key:"pathS",value:function pathS(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getReflectedControlPoint(),u=i.getAsControlPoint(),l=i.getAsCurrentPoint();i.addMarker(l,u,a),r.addBezierCurve(o.x,o.y,a.x,a.y,u.x,u.y,l.x,l.y),t&&t.bezierCurveTo(a.x,a.y,u.x,u.y,l.x,l.y)}}},{key:"pathQ",value:function pathQ(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getAsControlPoint(),u=i.getAsCurrentPoint();i.addMarker(u,a,a),r.addQuadraticCurve(o.x,o.y,a.x,a.y,u.x,u.y),t&&t.quadraticCurveTo(a.x,a.y,u.x,u.y)}}},{key:"pathT",value:function pathT(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getReflectedControlPoint();i.control=a;var u=i.getAsCurrentPoint();i.addMarker(u,a,a),r.addQuadraticCurve(o.x,o.y,a.x,a.y,u.x,u.y),t&&t.quadraticCurveTo(a.x,a.y,u.x,u.y)}}},{key:"pathA",value:function pathA(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getScalar(),u=i.getScalar(),l=i.getScalar()*(Math.PI/180),h=i.getScalar(),p=i.getScalar(),y=i.getAsCurrentPoint(),g=new Au(Math.cos(l)*(o.x-y.x)/2+Math.sin(l)*(o.y-y.y)/2,-Math.sin(l)*(o.x-y.x)/2+Math.cos(l)*(o.y-y.y)/2),d=Math.pow(g.x,2)/Math.pow(a,2)+Math.pow(g.y,2)/Math.pow(u,2);d>1&&(a*=Math.sqrt(d),u*=Math.sqrt(d));var v=(h===p?-1:1)*Math.sqrt((Math.pow(a,2)*Math.pow(u,2)-Math.pow(a,2)*Math.pow(g.y,2)-Math.pow(u,2)*Math.pow(g.x,2))/(Math.pow(a,2)*Math.pow(g.y,2)+Math.pow(u,2)*Math.pow(g.x,2)));isNaN(v)&&(v=0);var x=new Au(v*a*g.y/u,v*-u*g.x/a),b=new Au((o.x+y.x)/2+Math.cos(l)*x.x-Math.sin(l)*x.y,(o.y+y.y)/2+Math.sin(l)*x.x+Math.cos(l)*x.y),S=vectorsAngle([1,0],[(g.x-x.x)/a,(g.y-x.y)/u]),w=[(g.x-x.x)/a,(g.y-x.y)/u],k=[(-g.x-x.x)/a,(-g.y-x.y)/u],E=vectorsAngle(w,k);vectorsRatio(w,k)<=-1&&(E=Math.PI),vectorsRatio(w,k)>=1&&(E=0);var P=1-p?1:-1,C=S+P*(E/2),R=new Au(b.x+a*Math.cos(C),b.y+u*Math.sin(C));if(i.addMarkerAngle(R,C-P*Math.PI/2),i.addMarkerAngle(y,C-P*Math.PI),r.addPoint(y.x,y.y),t&&!isNaN(S)&&!isNaN(E)){var A=a>u?a:u,T=a>u?1:a/u,_=a>u?u/a:1;t.translate(b.x,b.y),t.rotate(l),t.scale(T,_),t.arc(0,0,A,S,S+E,Boolean(1-p)),t.scale(1/T,1/_),t.rotate(-l),t.translate(-b.x,-b.y)}}}},{key:"pathZ",value:function pathZ(t,r){var i=this.pathParser;t&&r.x1!==r.x2&&r.y1!==r.y2&&t.closePath(),i.current=i.start}}]),PathElement}(Xu);function _isNativeReflectConstruct$9(){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 ts=function(t){uu(SVGElement,t);var r=function _createSuper$9(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$9()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(SVGElement);function SVGElement(){var t;return Ga(this,SVGElement),(t=r.apply(this,arguments)).type="svg",t.root=!1,t}return za(SVGElement,[{key:"clearContext",value:function clearContext(t){pu(ou(SVGElement.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"setContext",value:function setContext(t){var r=this.document,i=r.screen,o=r.window,a=t.canvas;if(i.setDefaults(t),a.style&&void 0!==t.font&&o&&void 0!==o.getComputedStyle){t.font=o.getComputedStyle(a).getPropertyValue("font");var u=new Cu(r,"fontSize",Wu.parse(t.font).fontSize);u.hasValue()&&(r.rootEmSize=u.getPixels("y"),r.emSize=r.rootEmSize)}pu(ou(SVGElement.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 l=i.viewPort,h=l.width,p=l.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 y=this.getAttribute("refX"),g=this.getAttribute("refY"),d=this.getAttribute("viewBox"),v=d.hasValue()?toNumbers(d.getString()):null,x=!this.root&&"visible"!==this.getAttribute("overflow").getValue("hidden"),b=0,S=0,w=0,k=0;v&&(b=v[0],S=v[1]),this.root||(h=this.getStyle("width").getPixels("x"),p=this.getStyle("height").getPixels("y"),"marker"===this.type&&(w=b,k=S,b=0,S=0)),i.viewPort.setCurrent(h,p),v&&(h=v[2],p=v[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:h,height:i.viewPort.height,desiredHeight:p,minX:b,minY:S,refX:y.getValue(),refY:g.getValue(),clip:x,clipX:w,clipY:k}),v&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(h,p))}},{key:"resize",value:function resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.getAttribute("width",!0),a=this.getAttribute("height",!0),u=this.getAttribute("viewBox"),l=this.getAttribute("style"),h=o.getNumber(0),p=a.getNumber(0);if(i)if("string"==typeof i)this.getAttribute("preserveAspectRatio",!0).setValue(i);else{var y=this.getAttribute("preserveAspectRatio");y.hasValue()&&y.setValue(y.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(o.setValue(t),a.setValue(r),u.hasValue()||u.setValue("0 0 ".concat(h||t," ").concat(p||r)),l.hasValue()){var g=this.getStyle("width"),d=this.getStyle("height");g.hasValue()&&g.setValue("".concat(t,"px")),d.hasValue()&&d.setValue("".concat(r,"px"))}}}]),SVGElement}(Xu);function _isNativeReflectConstruct$a(){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 es=function(t){uu(RectElement,t);var r=function _createSuper$a(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$a()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(RectElement);function RectElement(){var t;return Ga(this,RectElement),(t=r.apply(this,arguments)).type="rect",t}return za(RectElement,[{key:"path",value:function path(t){var r=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y"),u=this.getAttribute("rx"),l=this.getAttribute("ry"),h=u.getPixels("x"),p=l.getPixels("y");if(u.hasValue()&&!l.hasValue()&&(p=h),l.hasValue()&&!u.hasValue()&&(h=p),h=Math.min(h,o/2),p=Math.min(p,a/2),t){var y=(Math.sqrt(2)-1)/3*4;t.beginPath(),a>0&&o>0&&(t.moveTo(r+h,i),t.lineTo(r+o-h,i),t.bezierCurveTo(r+o-h+y*h,i,r+o,i+p-y*p,r+o,i+p),t.lineTo(r+o,i+a-p),t.bezierCurveTo(r+o,i+a-p+y*p,r+o-h+y*h,i+a,r+o-h,i+a),t.lineTo(r+h,i+a),t.bezierCurveTo(r+h-y*h,i+a,r,i+a-p+y*p,r,i+a-p),t.lineTo(r,i+p),t.bezierCurveTo(r,i+p-y*p,r+h-y*h,i,r+h,i),t.closePath())}return new Hu(r,i,r+o,i+a)}},{key:"getMarkers",value:function getMarkers(){return null}}]),RectElement}(Ju);function _isNativeReflectConstruct$b(){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 rs=function(t){uu(CircleElement,t);var r=function _createSuper$b(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$b()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(CircleElement);function CircleElement(){var t;return Ga(this,CircleElement),(t=r.apply(this,arguments)).type="circle",t}return za(CircleElement,[{key:"path",value:function path(t){var r=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),o=this.getAttribute("r").getPixels();return t&&o>0&&(t.beginPath(),t.arc(r,i,o,0,2*Math.PI,!1),t.closePath()),new Hu(r-o,i-o,r+o,i+o)}},{key:"getMarkers",value:function getMarkers(){return null}}]),CircleElement}(Ju);function _isNativeReflectConstruct$c(){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 ns=function(t){uu(EllipseElement,t);var r=function _createSuper$c(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$c()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(EllipseElement);function EllipseElement(){var t;return Ga(this,EllipseElement),(t=r.apply(this,arguments)).type="ellipse",t}return za(EllipseElement,[{key:"path",value:function path(t){var r=(Math.sqrt(2)-1)/3*4,i=this.getAttribute("rx").getPixels("x"),o=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),u=this.getAttribute("cy").getPixels("y");return t&&i>0&&o>0&&(t.beginPath(),t.moveTo(a+i,u),t.bezierCurveTo(a+i,u+r*o,a+r*i,u+o,a,u+o),t.bezierCurveTo(a-r*i,u+o,a-i,u+r*o,a-i,u),t.bezierCurveTo(a-i,u-r*o,a-r*i,u-o,a,u-o),t.bezierCurveTo(a+r*i,u-o,a+i,u-r*o,a+i,u),t.closePath()),new Hu(a-i,u-o,a+i,u+o)}},{key:"getMarkers",value:function getMarkers(){return null}}]),EllipseElement}(Ju);function _isNativeReflectConstruct$d(){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 is=function(t){uu(LineElement,t);var r=function _createSuper$d(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$d()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(LineElement);function LineElement(){var t;return Ga(this,LineElement),(t=r.apply(this,arguments)).type="line",t}return za(LineElement,[{key:"getPoints",value:function getPoints(){return[new Au(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Au(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function path(t){var r=this.getPoints(),i=Va(r,2),o=i[0],a=o.x,u=o.y,l=i[1],h=l.x,p=l.y;return t&&(t.beginPath(),t.moveTo(a,u),t.lineTo(h,p)),new Hu(a,u,h,p)}},{key:"getMarkers",value:function getMarkers(){var t=this.getPoints(),r=Va(t,2),i=r[0],o=r[1],a=i.angleTo(o);return[[i,a],[o,a]]}}]),LineElement}(Ju);function _isNativeReflectConstruct$e(){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 os=function(t){uu(PolylineElement,t);var r=function _createSuper$e(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$e()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(PolylineElement);function PolylineElement(t,i,o){var a;return Ga(this,PolylineElement),(a=r.call(this,t,i,o)).type="polyline",a.points=[],a.points=Au.parsePath(a.getAttribute("points").getString()),a}return za(PolylineElement,[{key:"path",value:function path(t){var r=this.points,i=Va(r,1)[0],o=i.x,a=i.y,u=new Hu(o,a);return t&&(t.beginPath(),t.moveTo(o,a)),r.forEach((function(r){var i=r.x,o=r.y;u.addPoint(i,o),t&&t.lineTo(i,o)})),u}},{key:"getMarkers",value:function getMarkers(){var t=this.points,r=t.length-1,i=[];return t.forEach((function(o,a){a!==r&&i.push([o,o.angleTo(t[a+1])])})),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}}]),PolylineElement}(Ju);function _isNativeReflectConstruct$f(){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 as=function(t){uu(PolygonElement,t);var r=function _createSuper$f(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$f()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(PolygonElement);function PolygonElement(){var t;return Ga(this,PolygonElement),(t=r.apply(this,arguments)).type="polygon",t}return za(PolygonElement,[{key:"path",value:function path(t){var r=pu(ou(PolygonElement.prototype),"path",this).call(this,t),i=Va(this.points,1)[0],o=i.x,a=i.y;return t&&(t.lineTo(o,a),t.closePath()),r}}]),PolygonElement}(os);function _isNativeReflectConstruct$g(){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 us=function(t){uu(PatternElement,t);var r=function _createSuper$g(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$g()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(PatternElement);function PatternElement(){var t;return Ga(this,PatternElement),(t=r.apply(this,arguments)).type="pattern",t}return za(PatternElement,[{key:"createPattern",value:function createPattern(t,r,i){var o=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),u=new ts(this.document,null);u.attributes.viewBox=new Cu(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.width=new Cu(this.document,"width","".concat(o,"px")),u.attributes.height=new Cu(this.document,"height","".concat(a,"px")),u.attributes.transform=new Cu(this.document,"transform",this.getAttribute("patternTransform").getValue()),u.children=this.children;var l=this.document.createCanvas(o,a),h=l.getContext("2d"),p=this.getAttribute("x"),y=this.getAttribute("y");p.hasValue()&&y.hasValue()&&h.translate(p.getPixels("x",!0),y.getPixels("y",!0)),i.hasValue()?this.styles["fill-opacity"]=i:Reflect.deleteProperty(this.styles,"fill-opacity");for(var g=-1;g<=1;g++)for(var d=-1;d<=1;d++)h.save(),u.attributes.x=new Cu(this.document,"x",g*l.width),u.attributes.y=new Cu(this.document,"y",d*l.height),u.render(h),h.restore();return t.createPattern(l,"repeat")}}]),PatternElement}(Uu);function _isNativeReflectConstruct$h(){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 ss=function(t){uu(MarkerElement,t);var r=function _createSuper$h(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$h()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(MarkerElement);function MarkerElement(){var t;return Ga(this,MarkerElement),(t=r.apply(this,arguments)).type="marker",t}return za(MarkerElement,[{key:"render",value:function render(t,r,i){if(r){var o=r.x,a=r.y,u=this.getAttribute("orient").getValue("auto"),l=this.getAttribute("markerUnits").getValue("strokeWidth");t.translate(o,a),"auto"===u&&t.rotate(i),"strokeWidth"===l&&t.scale(t.lineWidth,t.lineWidth),t.save();var h=new ts(this.document,null);h.type=this.type,h.attributes.viewBox=new Cu(this.document,"viewBox",this.getAttribute("viewBox").getValue()),h.attributes.refX=new Cu(this.document,"refX",this.getAttribute("refX").getValue()),h.attributes.refY=new Cu(this.document,"refY",this.getAttribute("refY").getValue()),h.attributes.width=new Cu(this.document,"width",this.getAttribute("markerWidth").getValue()),h.attributes.height=new Cu(this.document,"height",this.getAttribute("markerHeight").getValue()),h.attributes.overflow=new Cu(this.document,"overflow",this.getAttribute("overflow").getValue()),h.attributes.fill=new Cu(this.document,"fill",this.getAttribute("fill").getColor("black")),h.attributes.stroke=new Cu(this.document,"stroke",this.getAttribute("stroke").getValue("none")),h.children=this.children,h.render(t),t.restore(),"strokeWidth"===l&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===u&&t.rotate(-i),t.translate(-o,-a)}}}]),MarkerElement}(Uu);function _isNativeReflectConstruct$i(){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 cs=function(t){uu(DefsElement,t);var r=function _createSuper$i(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$i()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(DefsElement);function DefsElement(){var t;return Ga(this,DefsElement),(t=r.apply(this,arguments)).type="defs",t}return za(DefsElement,[{key:"render",value:function render(){}}]),DefsElement}(Uu);function _isNativeReflectConstruct$j(){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 ls=function(t){uu(GElement,t);var r=function _createSuper$j(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$j()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(GElement);function GElement(){var t;return Ga(this,GElement),(t=r.apply(this,arguments)).type="g",t}return za(GElement,[{key:"getBoundingBox",value:function getBoundingBox(t){var r=new Hu;return this.children.forEach((function(i){r.addBoundingBox(i.getBoundingBox(t))})),r}}]),GElement}(Xu);function _isNativeReflectConstruct$k(){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 fs=function(t){uu(GradientElement,t);var r=function _createSuper$k(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$k()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(GradientElement);function GradientElement(t,i,o){var a;Ga(this,GradientElement),(a=r.call(this,t,i,o)).attributesToInherit=["gradientUnits"],a.stops=[];var u=nu(a),l=u.stops;return u.children.forEach((function(t){"stop"===t.type&&l.push(t)})),a}return za(GradientElement,[{key:"getGradientUnits",value:function getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function createGradient(t,r,i){var o=this,a=this;this.getHrefAttribute().hasValue()&&(a=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(a));var u=a.stops,l=this.getGradient(t,r);if(!l)return this.addParentOpacity(i,u[u.length-1].color);if(u.forEach((function(t){l.addColorStop(t.offset,o.addParentOpacity(i,t.color))})),this.getAttribute("gradientTransform").hasValue()){var h=this.document,p=h.screen,y=p.MAX_VIRTUAL_PIXELS,g=p.viewPort,d=Va(g.viewPorts,1)[0],v=new es(h,null);v.attributes.x=new Cu(h,"x",-y/3),v.attributes.y=new Cu(h,"y",-y/3),v.attributes.width=new Cu(h,"width",y),v.attributes.height=new Cu(h,"height",y);var x=new ls(h,null);x.attributes.transform=new Cu(h,"transform",this.getAttribute("gradientTransform").getValue()),x.children=[v];var b=new ts(h,null);b.attributes.x=new Cu(h,"x",0),b.attributes.y=new Cu(h,"y",0),b.attributes.width=new Cu(h,"width",d.width),b.attributes.height=new Cu(h,"height",d.height),b.children=[x];var S=h.createCanvas(d.width,d.height),w=S.getContext("2d");return w.fillStyle=l,b.render(w),w.createPattern(S,"no-repeat")}return l}},{key:"inheritStopContainer",value:function inheritStopContainer(t){var r=this;this.attributesToInherit.forEach((function(i){!r.getAttribute(i).hasValue()&&t.getAttribute(i).hasValue()&&r.getAttribute(i,!0).setValue(t.getAttribute(i).getValue())}))}},{key:"addParentOpacity",value:function addParentOpacity(t,r){return t.hasValue()?new Cu(this.document,"color",r).addOpacity(t).getColor():r}}]),GradientElement}(Uu);function _isNativeReflectConstruct$l(){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 hs=function(t){uu(LinearGradientElement,t);var r=function _createSuper$l(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$l()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(LinearGradientElement);function LinearGradientElement(t,i,o){var a;return Ga(this,LinearGradientElement),(a=r.call(this,t,i,o)).type="linearGradient",a.attributesToInherit.push("x1","y1","x2","y2"),a}return za(LinearGradientElement,[{key:"getGradient",value:function getGradient(t,r){var i="objectBoundingBox"===this.getGradientUnits(),o=i?r.getBoundingBox(t):null;if(i&&!o)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var a=i?o.x+o.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),u=i?o.y+o.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),l=i?o.x+o.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),h=i?o.y+o.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===l&&u===h?null:t.createLinearGradient(a,u,l,h)}}]),LinearGradientElement}(fs);function _isNativeReflectConstruct$m(){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 ps=function(t){uu(RadialGradientElement,t);var r=function _createSuper$m(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$m()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(RadialGradientElement);function RadialGradientElement(t,i,o){var a;return Ga(this,RadialGradientElement),(a=r.call(this,t,i,o)).type="radialGradient",a.attributesToInherit.push("cx","cy","r","fx","fy","fr"),a}return za(RadialGradientElement,[{key:"getGradient",value:function getGradient(t,r){var i="objectBoundingBox"===this.getGradientUnits(),o=r.getBoundingBox(t);if(i&&!o)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var a=i?o.x+o.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),u=i?o.y+o.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),l=a,h=u;this.getAttribute("fx").hasValue()&&(l=i?o.x+o.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(h=i?o.y+o.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var p=i?(o.width+o.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),y=this.getAttribute("fr").getPixels();return t.createRadialGradient(l,h,y,a,u,p)}}]),RadialGradientElement}(fs);function _isNativeReflectConstruct$n(){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 ys=function(t){uu(StopElement,t);var r=function _createSuper$n(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$n()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(StopElement);function StopElement(t,i,o){var a;Ga(this,StopElement),(a=r.call(this,t,i,o)).type="stop";var u=Math.max(0,Math.min(1,a.getAttribute("offset").getNumber())),l=a.getStyle("stop-opacity"),h=a.getStyle("stop-color",!0);return""===h.getString()&&h.setValue("#000"),l.hasValue()&&(h=h.addOpacity(l)),a.offset=u,a.color=h.getColor(),a}return StopElement}(Uu);function _isNativeReflectConstruct$o(){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 gs=function(t){uu(AnimateElement,t);var r=function _createSuper$o(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$o()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(AnimateElement);function AnimateElement(t,i,o){var a;return Ga(this,AnimateElement),(a=r.call(this,t,i,o)).type="animate",a.duration=0,a.initialValue=null,a.initialUnits="",a.removed=!1,a.frozen=!1,t.screen.animations.push(nu(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 za(AnimateElement,[{key:"getProperty",value:function getProperty(){var t=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}},{key:"calcValue",value:function calcValue(){var t=this.initialUnits,r=this.getProgress(),i=r.progress,o=r.from,a=r.to,u=o.getNumber()+(a.getNumber()-o.getNumber())*i;return"%"===t&&(u*=100),"".concat(u).concat(t)}},{key:"update",value:function update(t){var r=this.parent,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){var o=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==o||this.frozen){if("remove"===o&&!this.removed)return this.removed=!0,i.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=i.getString();return!1}this.duration+=t;var a=!1;if(this.begin<this.duration){var u=this.calcValue(),l=this.getAttribute("type");if(l.hasValue()){var h=l.getString();u="".concat(h,"(").concat(u,")")}i.setValue(u),a=!0}return a}},{key:"getProgress",value:function getProgress(){var t=this.document,r=this.values,i={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var o=i.progress*(r.getValue().length-1),a=Math.floor(o),u=Math.ceil(o);i.from=new Cu(t,"from",parseFloat(r.getValue()[a])),i.to=new Cu(t,"to",parseFloat(r.getValue()[u])),i.progress=(o-a)/(u-a)}else i.from=this.from,i.to=this.to;return i}}]),AnimateElement}(Uu);function _isNativeReflectConstruct$p(){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 ds=function(t){uu(AnimateColorElement,t);var r=function _createSuper$p(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$p()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(AnimateColorElement);function AnimateColorElement(){var t;return Ga(this,AnimateColorElement),(t=r.apply(this,arguments)).type="animateColor",t}return za(AnimateColorElement,[{key:"calcValue",value:function calcValue(){var t=this.getProgress(),r=t.progress,i=t.from,o=t.to,a=new eu(i.getColor()),u=new eu(o.getColor());if(a.ok&&u.ok){var l=a.r+(u.r-a.r)*r,h=a.g+(u.g-a.g)*r,p=a.b+(u.b-a.b)*r;return"rgb(".concat(parseInt(l,10),", ").concat(parseInt(h,10),", ").concat(parseInt(p,10),")")}return this.getAttribute("from").getColor()}}]),AnimateColorElement}(gs);function _isNativeReflectConstruct$q(){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 vs=function(t){uu(AnimateTransformElement,t);var r=function _createSuper$q(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$q()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(AnimateTransformElement);function AnimateTransformElement(){var t;return Ga(this,AnimateTransformElement),(t=r.apply(this,arguments)).type="animateTransform",t}return za(AnimateTransformElement,[{key:"calcValue",value:function calcValue(){var t=this.getProgress(),r=t.progress,i=t.from,o=t.to,a=toNumbers(i.getString()),u=toNumbers(o.getString());return a.map((function(t,i){return t+(u[i]-t)*r})).join(" ")}}]),AnimateTransformElement}(gs);function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function _unsupportedIterableToArray$1(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray$1(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray$1(t,r)}(t))){var r=0,i=function F(){};return{s:i,n:function n(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,u=!0,l=!1;return{s:function s(){o=t[Symbol.iterator]()},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){l=!0,a=t},f:function f(){try{u||null==o.return||o.return()}finally{if(l)throw a}}}}function _arrayLikeToArray$1(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _isNativeReflectConstruct$r(){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 ms=function(t){uu(FontElement,t);var r=function _createSuper$r(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$r()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FontElement);function FontElement(t,i,o){var a;Ga(this,FontElement),(a=r.call(this,t,i,o)).type="font",a.glyphs={},a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber();var u,l=t.definitions,h=_createForOfIteratorHelper(nu(a).children);try{for(h.s();!(u=h.n()).done;){var p=u.value;switch(p.type){case"font-face":a.fontFace=p;var y=p.getStyle("font-family");y.hasValue()&&(l[y.getString()]=nu(a));break;case"missing-glyph":a.missingGlyph=p;break;case"glyph":var g=p;g.arabicForm?(a.isRTL=!0,a.isArabic=!0,void 0===a.glyphs[g.unicode]&&(a.glyphs[g.unicode]={}),a.glyphs[g.unicode][g.arabicForm]=g):a.glyphs[g.unicode]=g}}}catch(t){h.e(t)}finally{h.f()}return a}return za(FontElement,[{key:"render",value:function render(){}}]),FontElement}(Uu);function _isNativeReflectConstruct$s(){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 xs=function(t){uu(FontFaceElement,t);var r=function _createSuper$s(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$s()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FontFaceElement);function FontFaceElement(t,i,o){var a;return Ga(this,FontFaceElement),(a=r.call(this,t,i,o)).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 FontFaceElement}(Uu);function _isNativeReflectConstruct$t(){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 bs=function(t){uu(MissingGlyphElement,t);var r=function _createSuper$t(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$t()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(MissingGlyphElement);function MissingGlyphElement(){var t;return Ga(this,MissingGlyphElement),(t=r.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return MissingGlyphElement}(Ju);function _isNativeReflectConstruct$u(){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 Ss=function(t){uu(GlyphElement,t);var r=function _createSuper$u(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$u()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(GlyphElement);function GlyphElement(t,i,o){var a;return Ga(this,GlyphElement),(a=r.call(this,t,i,o)).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 GlyphElement}(Ju);function _isNativeReflectConstruct$v(){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 ws=function(t){uu(TRefElement,t);var r=function _createSuper$v(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$v()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(TRefElement);function TRefElement(){var t;return Ga(this,TRefElement),(t=r.apply(this,arguments)).type="tref",t}return za(TRefElement,[{key:"getText",value:function getText(){var t=this.getHrefAttribute().getDefinition();if(t){var r=t.children[0];if(r)return r.getText()}return""}}]),TRefElement}(Yu);function _isNativeReflectConstruct$w(){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 ks=function(t){uu(AElement,t);var r=function _createSuper$w(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$w()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(AElement);function AElement(t,i,o){var a;Ga(this,AElement),(a=r.call(this,t,i,o)).type="a";var u=i.childNodes,l=u[0],h=u.length>0&&Array.from(u).every((function(t){return 3===t.nodeType}));return a.hasText=h,a.text=h?a.getTextFromNode(l):"",a}return za(AElement,[{key:"getText",value:function getText(){return this.text}},{key:"renderChildren",value:function renderChildren(t){if(this.hasText){pu(ou(AElement.prototype),"renderChildren",this).call(this,t);var r=this.document,i=this.x,o=this.y,a=r.screen.mouse,u=new Cu(r,"fontSize",Wu.parse(r.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new Hu(i,o-u.getPixels("y"),i+this.measureText(t),o))}else if(this.children.length>0){var l=new ls(this.document,null);l.children=this.children,l.parent=this,l.render(t)}}},{key:"onClick",value:function onClick(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}}]),AElement}(Yu);function _createForOfIteratorHelper$1(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function _unsupportedIterableToArray$1$1(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray$1$1(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray$1$1(t,r)}(t))){var r=0,i=function F(){};return{s:i,n:function n(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,u=!0,l=!1;return{s:function s(){o=t[Symbol.iterator]()},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){l=!0,a=t},f:function f(){try{u||null==o.return||o.return()}finally{if(l)throw a}}}}function _arrayLikeToArray$1$1(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _isNativeReflectConstruct$x(){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 Es=function(t){uu(TextPathElement,t);var r=function _createSuper$x(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$x()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(TextPathElement);function TextPathElement(t,i,o){var a;Ga(this,TextPathElement),(a=r.call(this,t,i,o)).type="textPath",a.textWidth=0,a.textHeight=0,a.pathLength=-1,a.glyphInfo=null,a.letterSpacingCache=[],a.measuresCache=new Map([["",0]]);var u=a.getHrefAttribute().getDefinition();return a.text=a.getTextFromNode(),a.dataArray=a.parsePathData(u),a}return za(TextPathElement,[{key:"getText",value:function getText(){return this.text}},{key:"path",value:function path(t){var r=this.dataArray;t&&t.beginPath(),r.forEach((function(r){var i=r.command,o=r.points;switch(i){case"L":t&&t.lineTo(o[0],o[1]);break;case"M":t&&t.moveTo(o[0],o[1]);break;case"C":t&&t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t&&t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var a=o[0],u=o[1],l=o[2],h=o[3],p=o[4],y=o[5],g=o[6],d=o[7],v=l>h?l:h,x=l>h?1:l/h,b=l>h?h/l:1;t&&(t.translate(a,u),t.rotate(g),t.scale(x,b),t.arc(0,0,v,p,p+y,Boolean(1-d)),t.scale(1/x,1/b),t.rotate(-g),t.translate(-a,-u));break;case"z":t&&t.closePath()}}))}},{key:"renderChildren",value:function renderChildren(t){this.setTextData(t),t.save();var r=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),o=this.glyphInfo,a=t.fillStyle;"underline"===r&&t.beginPath(),o.forEach((function(a,u){var l=a.p0,h=a.p1,p=a.text;t.save(),t.translate(l.x,l.y),t.rotate(o[u].rotation),t.fillStyle&&t.fillText(p,0,0),t.strokeStyle&&t.strokeText(p,0,0),t.restore(),"underline"===r&&(0===u&&t.moveTo(l.x,l.y+i/8),t.lineTo(h.x,h.y+i/5))})),"underline"===r&&(t.lineWidth=i/20,t.strokeStyle=a,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function getLetterSpacingAt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}},{key:"findSegmentToFitChar",value:function findSegmentToFitChar(t,r,i,o,a,u,l,h){var p=u,y=this.measureText(t,l);" "===l&&"justify"===r&&i<o&&(y+=(o-i)/a),h>-1&&(p+=this.getLetterSpacingAt(h));var g=this.textHeight/20,d={p0:this.getEquidistantPointOnPath(p,g),p1:this.getEquidistantPointOnPath(p+y,g)};return{offset:p+=y,segment:d}}},{key:"measureText",value:function measureText(t,r){var i=this.measuresCache,o=r||this.getText();if(i.has(o))return i.get(o);var a=this.measureTargetText(t,o);return i.set(o,a),a}},{key:"setTextData",value:function setTextData(t){var r=this;if(!this.glyphInfo){var i=this.getText(),o=i.split(""),a=i.split(" ").length-1,u=toNumbers(this.parent.getAttribute("dx").getString("0")),l=this.parent.getStyle("text-anchor").getString("start"),h=this.getStyle("letter-spacing"),p=this.parent.getStyle("letter-spacing"),y=0;h.hasValue()&&"inherit"!==h.getValue()?h.hasValue()&&"initial"!==h.getValue()&&"unset"!==h.getValue()&&(y=h.getPixels()):y=p.getPixels();var g=[],d=i.length;this.letterSpacingCache=g;for(var v=0;v<d;v++)g.push(void 0!==u[v]?u[v]:y);var x=g.reduce((function(t,r){return t+r||0}),0);this.textWidth=this.measureText(t),this.textHeight=this.getFontSize();var b=Math.max(this.textWidth+x,0);this.glyphInfo=[];var S=this.getPathLength(),w=this.getStyle("startOffset").getNumber(0)*S,k=0;"middle"!==l&&"center"!==l||(k=-b/2),"end"!==l&&"right"!==l||(k=-b),k+=w,o.forEach((function(i,u){var h=r.findSegmentToFitChar(t,l,b,S,a,k,i,u),p=h.offset,y=h.segment;if(k=p,y.p0&&y.p1){var g=r.getLineLength(y.p0.x,y.p0.y,y.p1.x,y.p1.y),d=r.getPointOnLine(0+g/2,y.p0.x,y.p0.y,y.p1.x,y.p1.y),v=Math.atan2(y.p1.y-y.p0.y,y.p1.x-y.p0.x);r.glyphInfo.push({transposeX:d.x,transposeY:d.y,text:o[u],p0:y.p0,p1:y.p1,rotation:v})}}))}}},{key:"parsePathData",value:function parsePathData(t){if(this.pathLength=-1,!t)return[];var r=[],i=t.pathParser;for(i.reset();!i.isEnd();){var o=i.current,a=o?o.x:0,u=o?o.y:0,l="",h=[];i.nextCommand();var p=i.command.toUpperCase();switch(i.command){case"M":case"m":l=this.pathM(i,h);break;case"L":case"l":l=this.pathL(i,h);break;case"H":case"h":l=this.pathH(i,h);break;case"V":case"v":l=this.pathV(i,h);break;case"C":case"c":this.pathC(i,h);break;case"S":case"s":l=this.pathS(i,h);break;case"Q":case"q":this.pathQ(i,h);break;case"T":case"t":l=this.pathT(i,h);break;case"A":case"a":h=this.pathA(i);break;case"Z":case"z":i.current=i.start}"Z"!==p?r.push({command:l||p,points:h,start:{x:a,y:u},pathLength:this.calcLength(a,u,l||p,h)}):r.push({command:"z",points:[],pathLength:0})}return r}},{key:"pathM",value:function pathM(t,r){var i=t.getAsCurrentPoint();for(r.push(i.x,i.y),t.start=t.current;!t.isCommandOrEnd();){var o=t.getAsCurrentPoint();return r.push(o.x,o.y),"L"}}},{key:"pathL",value:function pathL(t,r){for(;!t.isCommandOrEnd();){var i=t.getAsCurrentPoint();r.push(i.x,i.y)}return"L"}},{key:"pathH",value:function pathH(t,r){for(;!t.isCommandOrEnd();){var i=t.current,o=new Au((t.isRelativeCommand()?i.x:0)+t.getScalar(),i.y);r.push(o.x,o.y),t.current=o}return"L"}},{key:"pathV",value:function pathV(t,r){for(;!t.isCommandOrEnd();){var i=t.current,o=new Au(i.x,(t.isRelativeCommand()?i.y:0)+t.getScalar());r.push(o.x,o.y),t.current=o}return"L"}},{key:"pathC",value:function pathC(t,r){for(;!t.isCommandOrEnd();){var i=t.getPoint(),o=t.getAsControlPoint(),a=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y,a.x,a.y)}}},{key:"pathS",value:function pathS(t,r){for(;!t.isCommandOrEnd();){var i=t.getReflectedControlPoint(),o=t.getAsControlPoint(),a=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y,a.x,a.y)}return"C"}},{key:"pathQ",value:function pathQ(t,r){for(;!t.isCommandOrEnd();){var i=t.getAsControlPoint(),o=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y)}}},{key:"pathT",value:function pathT(t,r){for(;!t.isCommandOrEnd();){var i=t.getReflectedControlPoint();t.control=i;var o=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y)}return"Q"}},{key:"pathA",value:function pathA(t){for(;!t.isCommandOrEnd();){var r=t.current,i=t.getScalar(),o=t.getScalar(),a=t.getScalar()*(Math.PI/180),u=t.getScalar(),l=t.getScalar(),h=t.getAsCurrentPoint(),p=new Au(Math.cos(a)*(r.x-h.x)/2+Math.sin(a)*(r.y-h.y)/2,-Math.sin(a)*(r.x-h.x)/2+Math.cos(a)*(r.y-h.y)/2),y=Math.pow(p.x,2)/Math.pow(i,2)+Math.pow(p.y,2)/Math.pow(o,2);y>1&&(i*=Math.sqrt(y),o*=Math.sqrt(y));var g=(u===l?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(o,2)-Math.pow(i,2)*Math.pow(p.y,2)-Math.pow(o,2)*Math.pow(p.x,2))/(Math.pow(i,2)*Math.pow(p.y,2)+Math.pow(o,2)*Math.pow(p.x,2)));isNaN(g)&&(g=0);var d=new Au(g*i*p.y/o,g*-o*p.x/i),v=new Au((r.x+h.x)/2+Math.cos(a)*d.x-Math.sin(a)*d.y,(r.y+h.y)/2+Math.sin(a)*d.x+Math.cos(a)*d.y),x=vectorsAngle([1,0],[(p.x-d.x)/i,(p.y-d.y)/o]),b=[(p.x-d.x)/i,(p.y-d.y)/o],S=[(-p.x-d.x)/i,(-p.y-d.y)/o],w=vectorsAngle(b,S);return vectorsRatio(b,S)<=-1&&(w=Math.PI),vectorsRatio(b,S)>=1&&(w=0),0===l&&w>0&&(w-=2*Math.PI),1===l&&w<0&&(w+=2*Math.PI),[v.x,v.y,i,o,x,w,a,l]}}},{key:"calcLength",value:function calcLength(t,r,i,o){var a=0,u=null,l=null,h=0;switch(i){case"L":return this.getLineLength(t,r,o[0],o[1]);case"C":for(a=0,u=this.getPointOnCubicBezier(0,t,r,o[0],o[1],o[2],o[3],o[4],o[5]),h=.01;h<=1;h+=.01)l=this.getPointOnCubicBezier(h,t,r,o[0],o[1],o[2],o[3],o[4],o[5]),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;return a;case"Q":for(a=0,u=this.getPointOnQuadraticBezier(0,t,r,o[0],o[1],o[2],o[3]),h=.01;h<=1;h+=.01)l=this.getPointOnQuadraticBezier(h,t,r,o[0],o[1],o[2],o[3]),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;return a;case"A":a=0;var p=o[4],y=o[5],g=o[4]+y,d=Math.PI/180;if(Math.abs(p-g)<d&&(d=Math.abs(p-g)),u=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],p,0),y<0)for(h=p-d;h>g;h-=d)l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],h,0),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;else for(h=p+d;h<g;h+=d)l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],h,0),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;return l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],g,0),a+=this.getLineLength(u.x,u.y,l.x,l.y)}return 0}},{key:"getPointOnLine",value:function getPointOnLine(t,r,i,o,a){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:i,h=(a-i)/(o-r+Pu),p=Math.sqrt(t*t/(1+h*h));o<r&&(p*=-1);var y=h*p,g=null;if(o===r)g={x:u,y:l+y};else if((l-i)/(u-r+Pu)===h)g={x:u+p,y:l+y};else{var d=0,v=0,x=this.getLineLength(r,i,o,a);if(x<Pu)return null;var b=(u-r)*(o-r)+(l-i)*(a-i);d=r+(b/=x*x)*(o-r),v=i+b*(a-i);var S=this.getLineLength(u,l,d,v),w=Math.sqrt(t*t-S*S);p=Math.sqrt(w*w/(1+h*h)),o<r&&(p*=-1),g={x:d+p,y:v+(y=h*p)}}return g}},{key:"getPointOnPath",value:function getPointOnPath(t){var r=this.getPathLength(),i=0,o=null;if(t<-5e-5||t-5e-5>r)return null;var a,u=_createForOfIteratorHelper$1(this.dataArray);try{for(u.s();!(a=u.n()).done;){var l=a.value;if(!l||!(l.pathLength<5e-5||i+l.pathLength+5e-5<t)){var h=t-i,p=0;switch(l.command){case"L":o=this.getPointOnLine(h,l.start.x,l.start.y,l.points[0],l.points[1],l.start.x,l.start.y);break;case"A":var y=l.points[4],g=l.points[5],d=l.points[4]+g;if(p=y+h/l.pathLength*g,g<0&&p<d||g>=0&&p>d)break;o=this.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],p,l.points[6]);break;case"C":(p=h/l.pathLength)>1&&(p=1),o=this.getPointOnCubicBezier(p,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);break;case"Q":(p=h/l.pathLength)>1&&(p=1),o=this.getPointOnQuadraticBezier(p,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3])}if(o)return o;break}i+=l.pathLength}}catch(t){u.e(t)}finally{u.f()}return null}},{key:"getLineLength",value:function getLineLength(t,r,i,o){return Math.sqrt((i-t)*(i-t)+(o-r)*(o-r))}},{key:"getPathLength",value:function getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((function(t,r){return r.pathLength>0?t+r.pathLength:t}),0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function getPointOnCubicBezier(t,r,i,o,a,u,l,h,p){return{x:h*CB1(t)+u*CB2(t)+o*CB3(t)+r*CB4(t),y:p*CB1(t)+l*CB2(t)+a*CB3(t)+i*CB4(t)}}},{key:"getPointOnQuadraticBezier",value:function getPointOnQuadraticBezier(t,r,i,o,a,u,l){return{x:u*QB1(t)+o*QB2(t)+r*QB3(t),y:l*QB1(t)+a*QB2(t)+i*QB3(t)}}},{key:"getPointOnEllipticalArc",value:function getPointOnEllipticalArc(t,r,i,o,a,u){var l=Math.cos(u),h=Math.sin(u),p=i*Math.cos(a),y=o*Math.sin(a);return{x:t+(p*l-y*h),y:r+(p*h+y*l)}}},{key:"buildEquidistantCache",value:function buildEquidistantCache(t,r){var i=this.getPathLength(),o=r||.25,a=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==o){this.equidistantCache={step:a,precision:o,points:[]};for(var u=0,l=0;l<=i;l+=o){var h=this.getPointOnPath(l),p=this.getPointOnPath(l+o);h&&p&&((u+=this.getLineLength(h.x,h.y,p.x,p.y))>=a&&(this.equidistantCache.points.push({x:h.x,y:h.y,distance:l}),u-=a))}}}},{key:"getEquidistantPointOnPath",value:function getEquidistantPointOnPath(t,r,i){if(this.buildEquidistantCache(r,i),t<0||t-this.getPathLength()>5e-5)return null;var o=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[o]||null}}]),TextPathElement}(Yu);function _isNativeReflectConstruct$y(){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 Ps=function(t){uu(ImageElement,t);var r,i,o=function _createSuper$y(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$y()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(ImageElement);function ImageElement(t,r,i){var a;Ga(this,ImageElement),(a=o.call(this,t,r,i)).type="image",a.loaded=!1;var u=a.getHrefAttribute().getString();if(!u)return iu(a);var l=/\.svg$/.test(u);return t.images.push(nu(a)),l?a.loadSvg(u):a.loadImage(u),a.isSvg=l,a}return za(ImageElement,[{key:"loadImage",value:(i=ja(La.mark((function _callee(t){var r;return La.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,this.document.createImage(t);case 3:r=i.sent,this.image=r,i.next=10;break;case 7:i.prev=7,i.t0=i.catch(0),console.error('Error while loading image "'.concat(t,'":'),i.t0);case 10:this.loaded=!0;case 11:case"end":return i.stop()}}),_callee,this,[[0,7]])}))),function loadImage(t){return i.apply(this,arguments)})},{key:"loadSvg",value:(r=ja(La.mark((function _callee2(t){var r,i;return La.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,this.document.fetch(t);case 3:return r=o.sent,o.next=6,r.text();case 6:i=o.sent,this.image=i,o.next=13;break;case 10:o.prev=10,o.t0=o.catch(0),console.error('Error while loading image "'.concat(t,'":'),o.t0);case 13:this.loaded=!0;case 14:case"end":return o.stop()}}),_callee2,this,[[0,10]])}))),function loadSvg(t){return r.apply(this,arguments)})},{key:"renderChildren",value:function renderChildren(t){var r=this.document,i=this.image,o=this.loaded,a=this.getAttribute("x").getPixels("x"),u=this.getAttribute("y").getPixels("y"),l=this.getStyle("width").getPixels("x"),h=this.getStyle("height").getPixels("y");if(o&&i&&l&&h){if(t.save(),this.isSvg)r.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:a,offsetY:u,scaleWidth:l,scaleHeight:h}).render();else{var p=this.image;t.translate(a,u),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:l,desiredWidth:p.width,height:h,desiredHeight:p.height}),this.loaded&&(void 0===p.complete||p.complete)&&t.drawImage(p,0,0)}t.restore()}}},{key:"getBoundingBox",value:function getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");return new Hu(t,r,t+i,r+o)}}]),ImageElement}(Xu);function _isNativeReflectConstruct$z(){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 Cs=function(t){uu(SymbolElement,t);var r=function _createSuper$z(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$z()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(SymbolElement);function SymbolElement(){var t;return Ga(this,SymbolElement),(t=r.apply(this,arguments)).type="symbol",t}return za(SymbolElement,[{key:"render",value:function render(t){}}]),SymbolElement}(Xu),Rs=function(){function SVGFontLoader(t){Ga(this,SVGFontLoader),this.document=t,this.loaded=!1,t.fonts.push(this)}var t;return za(SVGFontLoader,[{key:"load",value:(t=ja(La.mark((function _callee(t,r){var i,o,a;return La.wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,i=this.document,u.next=4,i.canvg.parser.load(r);case 4:o=u.sent,a=o.getElementsByTagName("font"),Array.from(a).forEach((function(r){var o=i.createElement(r);i.definitions[t]=o})),u.next=12;break;case 9:u.prev=9,u.t0=u.catch(0),console.error('Error while loading font "'.concat(r,'":'),u.t0);case 12:this.loaded=!0;case 13:case"end":return u.stop()}}),_callee,this,[[0,9]])}))),function load(r,i){return t.apply(this,arguments)})}]),SVGFontLoader}();function _isNativeReflectConstruct$A(){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 As=function(t){uu(StyleElement,t);var r=function _createSuper$A(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$A()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(StyleElement);function StyleElement(t,i,o){var a;return Ga(this,StyleElement),(a=r.call(this,t,i,o)).type="style",compressSpaces(Array.from(i.childNodes).map((function(t){return t.data})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach((function(r){var i=r.trim();if(i){var o=i.split("{"),a=o[0].split(","),u=o[1].split(";");a.forEach((function(r){var i=r.trim();if(i){var o=t.styles[i]||{};if(u.forEach((function(r){var i=r.indexOf(":"),a=r.substr(0,i).trim(),u=r.substr(i+1,r.length-i).trim();a&&u&&(o[a]=new Cu(t,a,u))})),t.styles[i]=o,t.stylesSpecificity[i]=function getSelectorSpecificity(t){var r=[0,0,0],i=t.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),o=0,a=findSelectorMatch(i,mu),u=Va(a,2);i=u[0],o=u[1],r[1]+=o;var l=findSelectorMatch(i,xu),h=Va(l,2);i=h[0],o=h[1],r[0]+=o;var p=findSelectorMatch(i,bu),y=Va(p,2);i=y[0],o=y[1],r[1]+=o;var g=findSelectorMatch(i,Su),d=Va(g,2);i=d[0],o=d[1],r[2]+=o;var v=findSelectorMatch(i,wu),x=Va(v,2);i=x[0],o=x[1],r[1]+=o;var b=findSelectorMatch(i,ku),S=Va(b,2);i=S[0],o=S[1],r[1]+=o;var w=findSelectorMatch(i=i.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),Eu),k=Va(w,2);return i=k[0],o=k[1],r[2]+=o,r.join("")}(i),"@font-face"===i){var a=o["font-family"].getString().replace(/"|'/g,"");o.src.getString().split(",").forEach((function(r){if(r.indexOf('format("svg")')>0){var i=parseExternalUrl(r);i&&new Rs(t).load(a,i)}}))}}}))}})),a}return StyleElement}(Uu);function _isNativeReflectConstruct$B(){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}}As.parseExternalUrl=parseExternalUrl;var Ts=function(t){uu(UseElement,t);var r=function _createSuper$B(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$B()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(UseElement);function UseElement(){var t;return Ga(this,UseElement),(t=r.apply(this,arguments)).type="use",t}return za(UseElement,[{key:"setContext",value:function setContext(t){pu(ou(UseElement.prototype),"setContext",this).call(this,t);var r=this.getAttribute("x"),i=this.getAttribute("y");r.hasValue()&&t.translate(r.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}},{key:"path",value:function path(t){var r=this.element;r&&r.path(t)}},{key:"renderChildren",value:function renderChildren(t){var r=this.document,i=this.element;if(i){var o=i;if("symbol"===i.type&&((o=new ts(r,null)).attributes.viewBox=new Cu(r,"viewBox",i.getAttribute("viewBox").getString()),o.attributes.preserveAspectRatio=new Cu(r,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),o.attributes.overflow=new Cu(r,"overflow",i.getAttribute("overflow").getString()),o.children=i.children),"svg"===o.type){var a=this.getStyle("width",!1,!0),u=this.getStyle("height",!1,!0);a.hasValue()&&(o.attributes.width=new Cu(r,"width",a.getString())),u.hasValue()&&(o.attributes.height=new Cu(r,"height",u.getString()))}var l=o.parent;o.parent=this,o.render(t),o.parent=l}}},{key:"getBoundingBox",value:function getBoundingBox(t){var r=this.element;return r?r.getBoundingBox(t):null}},{key:"elementTransform",value:function elementTransform(){var t=this.document,r=this.element;return zu.fromElement(t,r)}},{key:"element",get:function get(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),UseElement}(Xu);function _isNativeReflectConstruct$C(){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}}function imGet(t,r,i,o,a,u){return t[i*o*4+4*r+u]}function imSet(t,r,i,o,a,u,l){t[i*o*4+4*r+u]=l}function m(t,r,i){var o=t[r];return o*(o<0?i-255:i)}function c(t,r,i,o){return r+Math.cos(t)*i+Math.sin(t)*o}var _s=function(t){uu(FeColorMatrixElement,t);var r=function _createSuper$C(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$C()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FeColorMatrixElement);function FeColorMatrixElement(t,i,o){var a;Ga(this,FeColorMatrixElement),(a=r.call(this,t,i,o)).type="feColorMatrix";var u=toNumbers(a.getAttribute("values").getString());switch(a.getAttribute("type").getString("matrix")){case"saturate":var l=u[0];u=[.213+.787*l,.715-.715*l,.072-.072*l,0,0,.213-.213*l,.715+.285*l,.072-.072*l,0,0,.213-.213*l,.715-.715*l,.072+.928*l,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=u[0]*Math.PI/180;u=[c(h,.213,.787,-.213),c(h,.715,-.715,-.715),c(h,.072,-.072,.928),0,0,c(h,.213,-.213,.143),c(h,.715,.285,.14),c(h,.072,-.072,-.283),0,0,c(h,.213,-.213,-.787),c(h,.715,-.715,.715),c(h,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":u=[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=u,a.includeOpacity=a.getAttribute("includeOpacity").hasValue(),a}return za(FeColorMatrixElement,[{key:"apply",value:function apply(t,r,i,o,a){for(var u=this.includeOpacity,l=this.matrix,h=t.getImageData(0,0,o,a),p=0;p<a;p++)for(var y=0;y<o;y++){var g=imGet(h.data,y,p,o,0,0),d=imGet(h.data,y,p,o,0,1),v=imGet(h.data,y,p,o,0,2),x=imGet(h.data,y,p,o,0,3),b=m(l,0,g)+m(l,1,d)+m(l,2,v)+m(l,3,x)+m(l,4,1),S=m(l,5,g)+m(l,6,d)+m(l,7,v)+m(l,8,x)+m(l,9,1),w=m(l,10,g)+m(l,11,d)+m(l,12,v)+m(l,13,x)+m(l,14,1),k=m(l,15,g)+m(l,16,d)+m(l,17,v)+m(l,18,x)+m(l,19,1);u&&(b=S=w=0,k*=x/255),imSet(h.data,y,p,o,0,0,b),imSet(h.data,y,p,o,0,1,S),imSet(h.data,y,p,o,0,2,w),imSet(h.data,y,p,o,0,3,k)}t.clearRect(0,0,o,a),t.putImageData(h,0,0)}}]),FeColorMatrixElement}(Uu);function _isNativeReflectConstruct$D(){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 Ms=function(t){uu(MaskElement,t);var r=function _createSuper$D(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$D()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(MaskElement);function MaskElement(){var t;return Ga(this,MaskElement),(t=r.apply(this,arguments)).type="mask",t}return za(MaskElement,[{key:"apply",value:function apply(t,r){var i=this.document,o=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),u=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y");if(!u&&!l){var h=new Hu;this.children.forEach((function(r){h.addBoundingBox(r.getBoundingBox(t))})),o=Math.floor(h.x1),a=Math.floor(h.y1),u=Math.floor(h.width),l=Math.floor(h.height)}var p=this.removeStyles(r,MaskElement.ignoreStyles),y=i.createCanvas(o+u,a+l),g=y.getContext("2d");i.screen.setDefaults(g),this.renderChildren(g),new _s(i,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(g,0,0,o+u,a+l);var d=i.createCanvas(o+u,a+l),v=d.getContext("2d");i.screen.setDefaults(v),r.render(v),v.globalCompositeOperation="destination-in",v.fillStyle=g.createPattern(y,"no-repeat"),v.fillRect(0,0,o+u,a+l),t.fillStyle=v.createPattern(d,"no-repeat"),t.fillRect(0,0,o+u,a+l),this.restoreStyles(r,p)}},{key:"render",value:function render(t){}}]),MaskElement}(Uu);function _isNativeReflectConstruct$E(){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}}Ms.ignoreStyles=["mask","transform","clip-path"];var Ns=function noop(){},Os=function(t){uu(ClipPathElement,t);var r=function _createSuper$E(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$E()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(ClipPathElement);function ClipPathElement(){var t;return Ga(this,ClipPathElement),(t=r.apply(this,arguments)).type="clipPath",t}return za(ClipPathElement,[{key:"apply",value:function apply(t){var r=this.document,i=Reflect.getPrototypeOf(t),o=t.beginPath,a=t.closePath;i&&(i.beginPath=Ns,i.closePath=Ns),Reflect.apply(o,t,[]),this.children.forEach((function(o){if(void 0!==o.path){var u=void 0!==o.elementTransform?o.elementTransform():null;u||(u=zu.fromElement(r,o)),u&&u.apply(t),o.path(t),i&&(i.closePath=a),u&&u.unapply(t)}})),Reflect.apply(a,t,[]),t.clip(),i&&(i.beginPath=o,i.closePath=a)}},{key:"render",value:function render(t){}}]),ClipPathElement}(Uu);function _isNativeReflectConstruct$F(){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 Ds=function(t){uu(FilterElement,t);var r=function _createSuper$F(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$F()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FilterElement);function FilterElement(){var t;return Ga(this,FilterElement),(t=r.apply(this,arguments)).type="filter",t}return za(FilterElement,[{key:"apply",value:function apply(t,r){var i=this.document,o=this.children,a=r.getBoundingBox(t);if(a){var u=0,l=0;o.forEach((function(t){var r=t.extraFilterDistance||0;u=Math.max(u,r),l=Math.max(l,r)}));var h=Math.floor(a.width),p=Math.floor(a.height),y=h+2*u,g=p+2*l;if(!(y<1||g<1)){var d=Math.floor(a.x),v=Math.floor(a.y),x=this.removeStyles(r,FilterElement.ignoreStyles),b=i.createCanvas(y,g),S=b.getContext("2d");i.screen.setDefaults(S),S.translate(-d+u,-v+l),r.render(S),o.forEach((function(t){"function"==typeof t.apply&&t.apply(S,0,0,y,g)})),t.drawImage(b,0,0,y,g,d-u,v-l,y,g),this.restoreStyles(r,x)}}}},{key:"render",value:function render(t){}}]),FilterElement}(Uu);function _isNativeReflectConstruct$G(){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}}function _isNativeReflectConstruct$H(){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}}function _isNativeReflectConstruct$I(){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}}function _isNativeReflectConstruct$J(){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}}function _isNativeReflectConstruct$K(){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}}function _isNativeReflectConstruct$L(){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}}Ds.ignoreStyles=["filter","transform","clip-path"];var $s={svg:ts,rect:es,circle:rs,ellipse:ns,line:is,polyline:os,polygon:as,path:Ju,pattern:us,marker:ss,defs:cs,linearGradient:hs,radialGradient:ps,stop:ys,animate:gs,animateColor:ds,animateTransform:vs,font:ms,"font-face":xs,"missing-glyph":bs,glyph:Ss,text:Yu,tspan:Qu,tref:ws,a:ks,textPath:Es,image:Ps,g:ls,symbol:Cs,style:As,use:Ts,mask:Ms,clipPath:Os,filter:Ds,feDropShadow:function(t){uu(FeDropShadowElement,t);var r=function _createSuper$G(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$G()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FeDropShadowElement);function FeDropShadowElement(t,i,o){var a;return Ga(this,FeDropShadowElement),(a=r.call(this,t,i,o)).type="feDropShadow",a.addStylesFromStyleDefinition(),a}return za(FeDropShadowElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeDropShadowElement}(Uu),feMorphology:function(t){uu(FeMorphologyElement,t);var r=function _createSuper$H(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$H()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FeMorphologyElement);function FeMorphologyElement(){var t;return Ga(this,FeMorphologyElement),(t=r.apply(this,arguments)).type="feMorphology",t}return za(FeMorphologyElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeMorphologyElement}(Uu),feComposite:function(t){uu(FeCompositeElement,t);var r=function _createSuper$I(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$I()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FeCompositeElement);function FeCompositeElement(){var t;return Ga(this,FeCompositeElement),(t=r.apply(this,arguments)).type="feComposite",t}return za(FeCompositeElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeCompositeElement}(Uu),feColorMatrix:_s,feGaussianBlur:function(t){uu(FeGaussianBlurElement,t);var r=function _createSuper$J(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$J()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(FeGaussianBlurElement);function FeGaussianBlurElement(t,i,o){var a;return Ga(this,FeGaussianBlurElement),(a=r.call(this,t,i,o)).type="feGaussianBlur",a.blurRadius=Math.floor(a.getAttribute("stdDeviation").getNumber()),a.extraFilterDistance=a.blurRadius,a}return za(FeGaussianBlurElement,[{key:"apply",value:function apply(t,r,i,o,a){var u=this.document,l=this.blurRadius,h=u.window?u.window.document.body:null,p=t.canvas;p.id=u.getUniqueId(),h&&(p.style.display="none",h.appendChild(p)),processCanvasRGBA(p,r,i,o,a,l),h&&h.removeChild(p)}}]),FeGaussianBlurElement}(Uu),title:function(t){uu(TitleElement,t);var r=function _createSuper$K(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$K()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(TitleElement);function TitleElement(){var t;return Ga(this,TitleElement),(t=r.apply(this,arguments)).type="title",t}return TitleElement}(Uu),desc:function(t){uu(DescElement,t);var r=function _createSuper$L(t){return function(){var r,i=ou(t);if(_isNativeReflectConstruct$L()){var o=ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return iu(this,r)}}(DescElement);function DescElement(){var t;return Ga(this,DescElement),(t=r.apply(this,arguments)).type="desc",t}return DescElement}(Uu)};function ownKeys$1(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _createImage(){return(_createImage=ja(La.mark((function _callee(t){var r,i,o=arguments;return La.wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:return r=o.length>1&&void 0!==o[1]&&o[1],i=document.createElement("img"),r&&(i.crossOrigin="Anonymous"),a.abrupt("return",new Promise((function(r,o){i.onload=function(){r(i)},i.onerror=function(){o()},i.src=t})));case 4:case"end":return a.stop()}}),_callee)})))).apply(this,arguments)}var Is=function(){function Document(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.rootEmSize,o=void 0===i?12:i,a=r.emSize,u=void 0===a?12:a,l=r.createCanvas,h=void 0===l?Document.createCanvas:l,p=r.createImage,y=void 0===p?Document.createImage:p,g=r.anonymousCrossOrigin;Ga(this,Document),this.canvg=t,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=o,this.emSize=u,this.createCanvas=h,this.createImage=this.bindCreateImage(y,g),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return za(Document,[{key:"bindCreateImage",value:function bindCreateImage(t,r){return"boolean"==typeof r?function(i,o){return t(i,"boolean"==typeof o?o:r)}:t}},{key:"popEmSize",value:function popEmSize(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function getUniqueId(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function isImagesLoaded(){return this.images.every((function(t){return t.loaded}))}},{key:"isFontsLoaded",value:function isFontsLoaded(){return this.fonts.every((function(t){return t.loaded}))}},{key:"createDocumentElement",value:function createDocumentElement(t){var r=this.createElement(t.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}},{key:"createElement",value:function createElement(t){var r=t.nodeName.replace(/^[^:]+:/,""),i=Document.elementTypes[r];return void 0!==i?new i(this,t):new qu(this,t)}},{key:"createTextNode",value:function createTextNode(t){return new Ku(this,t)}},{key:"setViewBox",value:function setViewBox(t){this.screen.setViewBox(function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1(Object(i),!0).forEach((function(r){Ba(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys$1(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({document:this},t))}},{key:"window",get:function get(){return this.screen.window}},{key:"fetch",get:function get(){return this.screen.fetch}},{key:"ctx",get:function get(){return this.screen.ctx}},{key:"emSize",get:function get(){var t=this.emSizeStack;return t[t.length-1]},set:function set(t){this.emSizeStack.push(t)}}]),Document}();function ownKeys$1$1(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _objectSpread$1(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1$1(Object(i),!0).forEach((function(r){Ba(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys$1$1(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}Is.createCanvas=function createCanvas(t,r){var i=document.createElement("canvas");return i.width=t,i.height=r,i},Is.createImage=function createImage(t){return _createImage.apply(this,arguments)},Is.elementTypes=$s;var Fs=function(){function Canvg(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ga(this,Canvg),this.parser=new $u(i),this.screen=new Nu(t,i),this.options=i;var o=new Is(this,i),a=o.createDocumentElement(r);this.document=o,this.documentElement=a}var t,r;return za(Canvg,[{key:"fork",value:function fork(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.from(t,r,_objectSpread$1({},this.options,{},i))}},{key:"forkString",value:function forkString(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.fromString(t,r,_objectSpread$1({},this.options,{},i))}},{key:"ready",value:function ready(){return this.screen.ready()}},{key:"isReady",value:function isReady(){return this.screen.isReady()}},{key:"render",value:(r=ja(La.mark((function _callee(){var t,r=arguments;return La.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},this.start(_objectSpread$1({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},t)),i.next=4,this.ready();case 4:this.stop();case 5:case"end":return i.stop()}}),_callee,this)}))),function render(){return r.apply(this,arguments)})},{key:"start",value:function start(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.documentElement,i=this.screen,o=this.options;i.start(r,_objectSpread$1({enableRedraw:!0},o,{},t))}},{key:"stop",value:function stop(){this.screen.stop()}},{key:"resize",value:function resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,r,i)}}],[{key:"from",value:(t=ja(La.mark((function _callee2(t,r){var i,o,a,u=arguments;return La.wrap((function _callee2$(l){for(;;)switch(l.prev=l.next){case 0:return i=u.length>2&&void 0!==u[2]?u[2]:{},o=new $u(i),l.next=4,o.parse(r);case 4:return a=l.sent,l.abrupt("return",new Canvg(t,a,i));case 6:case"end":return l.stop()}}),_callee2)}))),function from(r,i){return t.apply(this,arguments)})},{key:"fromString",value:function fromString(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=new $u(i),a=o.parseFromString(r);return new Canvg(t,a,i)}}]),Canvg}();function __variableDynamicImportRuntime0__(t){switch(t){case"./locale/en.js":return Promise.resolve().then((function(){return Ls}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return js}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+t))}}var Vs=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){var r;return regeneratorRuntime.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,__variableDynamicImportRuntime0__("./locale/".concat(encodeURIComponent(t),".js"));case 3:r=i.sent,i.next=12;break;case 6:return i.prev=6,i.t0=i.catch(0),console.error("Missing translation (".concat(t,") - using 'en'")),i.next=11,Promise.resolve().then((function(){return Ls}));case 11:r=i.sent;case 12:return i.abrupt("return",r.default);case 13:case"end":return i.stop()}}),_callee,null,[[0,6]])})));return function loadExtensionTranslation(r){return t.apply(this,arguments)}}(),Ls=(t("default",{name:"server_opensave",init:function init(t){var r=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee6(){var i,o,a,u,l,h,p,y,g,d,v,x,b,S,w,k,E,P,C;return regeneratorRuntime.wrap((function _callee6$(R){for(;;)switch(R.prev=R.next){case 0:return C=function _rebuildInput(t){t.empty();var r=i('<input type="file" name="svg_file">').appendTo(t);function submit(){return _submit.apply(this,arguments)}function _submit(){return(_submit=_asyncToGenerator(regeneratorRuntime.mark((function _callee5(){return regeneratorRuntime.wrap((function _callee5$(r){for(;;)switch(r.prev=r.next){case 0:return t.submit(),C(t),r.next=4,i.process_cancel(l.uploading);case 4:w=!0,i("#dialog_box").hide();case 6:case"end":return r.stop()}}),_callee5)})))).apply(this,arguments)}t[0]===k[0]?r.change(_asyncToGenerator(regeneratorRuntime.mark((function _callee3(){return regeneratorRuntime.wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,u.openPrep();case 2:if(r.sent){r.next=6;break}return C(t),r.abrupt("return");case 6:return r.next=8,submit();case 8:case"end":return r.stop()}}),_callee3)})))):r.change(_asyncToGenerator(regeneratorRuntime.mark((function _callee4(){return regeneratorRuntime.wrap((function _callee4$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,submit();case 2:case"end":return t.stop()}}),_callee4)}))))},b=function _clientDownloadSuppor(t,r,o){return!p&&!y&&(!(""!==i("<a>")[0].download)&&(i("<a>hidden</a>").attr({download:(t||"image")+r,href:o}).css("display","none").appendTo("body")[0].click(),!0))},x=function _xhtmlEscape(t){return t.replace(/&(?!amp;)/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;")},v=function _getFileNameFromTitle(){return d.getDocumentTitle().trim().replace(/[/\\:*?"<>|]/g,"_")},i=t.$,o=t.decode64,a=t.encode64,u=r,R.next=8,Vs(u.curPrefs.lang);case 8:if(l=R.sent,h=u.curConfig,p=h.avoidClientSide,y=h.avoidClientSideDownload,g=h.avoidClientSideOpen,d=u.canvas,"./filesave.php",S="./filesave.php",w=!1,i('<iframe name="output_frame" title="'.concat(l.hiddenframe,'"\n style="width: 0; height: 0;" src="data:text/html;base64,PGh0bWw+"/>')).appendTo("body"),u.setCustomHandlers({save:function save(t,r){var o='<?xml version="1.0" encoding="UTF-8"?>\n'+r,u=v();b(u,".svg","data:image/svg+xml;charset=UTF-8;base64,"+a(o))||i("<form>").attr({method:"post",action:"./filesave.php",target:"output_frame"}).append('\n <input type="hidden" name="output_svg" value="'.concat(x(o),'">\n <input type="hidden" name="filename" value="').concat(x(u),'">\n ')).appendTo("body").submit().remove()},exportPDF:function exportPDF(t,r){var o=v(),a=r.output;b(o,".pdf",a)||i("<form>").attr({method:"post",action:S,target:"output_frame"}).append('\n <input type="hidden" name="output_img" value="'.concat(a,'">\n <input type="hidden" name="mime" value="application/pdf">\n <input type="hidden" name="filename" value="').concat(x(o),'">\n ')).appendTo("body").submit().remove()},exportImage:function exportImage(t,r){return _asyncToGenerator(regeneratorRuntime.mark((function _callee2(){var t,o,a,u,l,h,p,y,g;return regeneratorRuntime.wrap((function _callee2$(w){for(;;)switch(w.prev=w.next){case 0:return t=r.issues,o=r.mimeType,a=r.quality,i("#export_canvas").length||i("<canvas>",{id:"export_canvas"}).hide().appendTo("body"),(u=i("#export_canvas")[0]).width=d.contentW,u.height=d.contentH,w.next=7,Fs(u,r.svg);case 7:if(l=a?u.toDataURL(o,a):u.toDataURL(o),p="",t.length&&(h="\n • ",p+="\n\n\n • "+t.join(h)),!p.length){w.next=13;break}return w.next=13,i.alert(p);case 13:if(y=v(),g="."+r.type.toLowerCase(),!b(y,g,l)){w.next=17;break}return w.abrupt("return");case 17:i("<form>").attr({method:"post",action:S,target:"output_frame"}).append('\n <input type="hidden" name="output_img" value="'.concat(l,'">\n <input type="hidden" name="mime" value="').concat(o,'">\n <input type="hidden" name="filename" value="').concat(x(y),'">\n ')).appendTo("body").submit().remove();case 18:case"end":return w.stop()}}),_callee2)})))()}}),!window.FileReader||g){R.next=16;break}return R.abrupt("return");case 16:"./fileopen.php?type=load_svg","./fileopen.php?type=import_svg","./fileopen.php?type=import_img",u.processFile=function(t,r){var a;if(w)w=!1;else switch(i("#dialog_box").hide(),"import_img"!==r&&(a=o(t)),r){case"load_svg":d.clear(),d.setSvgString(a),u.updateCanvas();break;case"import_svg":d.importSvgString(a),u.updateCanvas();break;case"import_img":d.setGoodImage(t)}},(k=i("<form>")).attr({enctype:"multipart/form-data",method:"post",action:"./fileopen.php?type=load_svg",target:"output_frame"}),E=k.clone().attr("action","./fileopen.php?type=import_svg"),P=k.clone().attr("action","./fileopen.php?type=import_img"),C(k),C(E),C(P),i("#tool_open").show().prepend(k),i("#tool_import").show().prepend(E),i("#tool_image").prepend(P);case 30:case"end":return R.stop()}}),_callee6)})))()}}),Object.freeze({__proto__:null,default:{uploading:"Uploading...",hiddenframe:"Opensave frame to store hidden values"}})),js=Object.freeze({__proto__:null,default:{uploading:"正在上传...",hiddenframe:"Opensave frame to store hidden values"}})}}}));