ns-mapbox-gl-export
Version: 
This module adds control which can export PDF and images.
1 lines • 155 kB
JavaScript
(self.webpackChunkns_mapbox_gl_export=self.webpackChunkns_mapbox_gl_export||[]).push([[661],{34:(t,e,r)=>{"use strict";var i=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},81:(t,e,r)=>{"use strict";var i=r(9565),n=r(9306),s=r(8551),a=r(6823),o=r(851),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?o(t):e;if(n(r))return s(i(r,t));throw new u(a(t)+" is not iterable")}},280:(t,e,r)=>{"use strict";var i=r(6518),n=r(7751),s=r(6395),a=r(550),o=r(916).CONSTRUCTOR,u=r(3438),h=n("Promise"),c=s&&!o;i({target:"Promise",stat:!0,forced:s||o},{resolve:function(t){return u(c&&this===h?a:this,t)}})},283:(t,e,r)=>{"use strict";var i=r(9504),n=r(9039),s=r(4901),a=r(9297),o=r(3724),u=r(350).CONFIGURABLE,h=r(3706),c=r(1181),l=c.enforce,f=c.get,g=String,p=Object.defineProperty,d=i("".slice),v=i("".replace),y=i([].join),m=o&&!n((function(){return 8!==p((function(){}),"length",{value:8}).length})),x=String(String).split("String"),b=t.exports=function(t,e,r){"Symbol("===d(g(e),0,7)&&(e="["+v(g(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(o?p(t,"name",{value:e,configurable:!0}):t.name=e),m&&r&&a(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?o&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=l(t);return a(i,"source")||(i.source=y(x,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return s(this)&&f(this).source||h(this)}),"toString")},350:(t,e,r)=>{"use strict";var i=r(3724),n=r(9297),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,o=n(s,"name"),u=o&&"something"===function(){}.name,h=o&&(!i||i&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:u,CONFIGURABLE:h}},397:(t,e,r)=>{"use strict";var i=r(7751);t.exports=i("document","documentElement")},421:t=>{"use strict";t.exports={}},436:(t,e,r)=>{"use strict";var i,n,s,a=r(6518),o=r(6395),u=r(6193),h=r(4576),c=r(9565),l=r(6840),f=r(2967),g=r(687),p=r(7633),d=r(9306),v=r(4901),y=r(34),m=r(679),x=r(2293),b=r(9225).set,w=r(1955),S=r(3138),T=r(1103),O=r(8265),A=r(1181),C=r(550),E=r(916),P=r(6043),N="Promise",M=E.CONSTRUCTOR,R=E.REJECTION_EVENT,_=E.SUBCLASSING,V=A.getterFor(N),k=A.set,I=C&&C.prototype,L=C,D=I,B=h.TypeError,j=h.document,F=h.process,z=P.f,U=z,H=!!(j&&j.createEvent&&h.dispatchEvent),X="unhandledrejection",Y=function(t){var e;return!(!y(t)||!v(e=t.then))&&e},W=function(t,e){var r,i,n,s=e.value,a=1===e.state,o=a?t.ok:t.fail,u=t.resolve,h=t.reject,l=t.domain;try{o?(a||(2===e.rejection&&Z(e),e.rejection=1),!0===o?r=s:(l&&l.enter(),r=o(s),l&&(l.exit(),n=!0)),r===t.promise?h(new B("Promise-chain cycle")):(i=Y(r))?c(i,r,u,h):u(r)):h(s)}catch(t){l&&!n&&l.exit(),h(t)}},q=function(t,e){t.notified||(t.notified=!0,w((function(){for(var r,i=t.reactions;r=i.get();)W(r,t);t.notified=!1,e&&!t.rejection&&Q(t)})))},G=function(t,e,r){var i,n;H?((i=j.createEvent("Event")).promise=e,i.reason=r,i.initEvent(t,!1,!0),h.dispatchEvent(i)):i={promise:e,reason:r},!R&&(n=h["on"+t])?n(i):t===X&&S("Unhandled promise rejection",r)},Q=function(t){c(b,h,(function(){var e,r=t.facade,i=t.value;if($(t)&&(e=T((function(){u?F.emit("unhandledRejection",i,r):G(X,r,i)})),t.rejection=u||$(t)?2:1,e.error))throw e.value}))},$=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){c(b,h,(function(){var e=t.facade;u?F.emit("rejectionHandled",e):G("rejectionhandled",e,t.value)}))},K=function(t,e,r){return function(i){t(e,i,r)}},J=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,q(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new B("Promise can't be resolved itself");var i=Y(e);i?w((function(){var r={done:!1};try{c(i,e,K(tt,r,t),K(J,r,t))}catch(e){J(r,e,t)}})):(t.value=e,t.state=1,q(t,!1))}catch(e){J({done:!1},e,t)}}};if(M&&(D=(L=function(t){m(this,D),d(t),c(i,this);var e=V(this);try{t(K(tt,e),K(J,e))}catch(t){J(e,t)}}).prototype,(i=function(t){k(this,{type:N,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:null})}).prototype=l(D,"then",(function(t,e){var r=V(this),i=z(x(this,L));return r.parent=!0,i.ok=!v(t)||t,i.fail=v(e)&&e,i.domain=u?F.domain:void 0,0===r.state?r.reactions.add(i):w((function(){W(i,r)})),i.promise})),n=function(){var t=new i,e=V(t);this.promise=t,this.resolve=K(tt,e),this.reject=K(J,e)},P.f=z=function(t){return t===L||void 0===t?new n(t):U(t)},!o&&v(C)&&I!==Object.prototype)){s=I.then,_||l(I,"then",(function(t,e){var r=this;return new L((function(t,e){c(s,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete I.constructor}catch(t){}f&&f(I,D)}a({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:L}),g(L,N,!1,!0),p(N)},511:(t,e,r)=>{"use strict";var i=r(788),n=TypeError;t.exports=function(t){if(i(t))throw new n("The method doesn't accept regular expressions");return t}},537:(t,e,r)=>{"use strict";var i=r(550),n=r(4428),s=r(916).CONSTRUCTOR;t.exports=s||!n((function(t){i.all(t).then(void 0,(function(){}))}))},550:(t,e,r)=>{"use strict";var i=r(4576);t.exports=i.Promise},616:(t,e,r)=>{"use strict";var i=r(9039);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},655:(t,e,r)=>{"use strict";var i=r(6955),n=String;t.exports=function(t){if("Symbol"===i(t))throw new TypeError("Cannot convert a Symbol value to a string");return n(t)}},661:(t,e,r)=>{"use strict";r.r(e),r.d(e,{AElement:()=>le,AnimateColorElement:()=>se,AnimateElement:()=>ne,AnimateTransformElement:()=>ae,BoundingBox:()=>It,CB1:()=>nt,CB2:()=>st,CB3:()=>at,CB4:()=>ot,Canvg:()=>Ue,CircleElement:()=>Yt,ClipPathElement:()=>Pe,DefsElement:()=>Kt,DescElement:()=>Ie,Document:()=>je,Element:()=>Nt,EllipseElement:()=>Wt,FeColorMatrixElement:()=>Ae,FeCompositeElement:()=>_e,FeDropShadowElement:()=>Me,FeGaussianBlurElement:()=>Ve,FeMorphologyElement:()=>Re,FilterElement:()=>Ne,Font:()=>kt,FontElement:()=>oe,FontFaceElement:()=>ue,GElement:()=>Jt,GlyphElement:()=>jt,GradientElement:()=>te,ImageElement:()=>ve,LineElement:()=>qt,LinearGradientElement:()=>ee,MarkerElement:()=>Zt,MaskElement:()=>Ce,Matrix:()=>Ot,MissingGlyphElement:()=>he,Mouse:()=>pt,PSEUDO_ZERO:()=>tt,Parser:()=>bt,PathElement:()=>Bt,PathParser:()=>Lt,PatternElement:()=>$t,Point:()=>gt,PolygonElement:()=>Qt,PolylineElement:()=>Gt,Property:()=>lt,QB1:()=>ut,QB2:()=>ht,QB3:()=>ct,RadialGradientElement:()=>re,RectElement:()=>Xt,RenderedElement:()=>Dt,Rotate:()=>St,SVGElement:()=>Ht,SVGFontLoader:()=>me,Scale:()=>Tt,Screen:()=>yt,Skew:()=>At,SkewX:()=>Ct,SkewY:()=>Et,StopElement:()=>ie,StyleElement:()=>xe,SymbolElement:()=>ye,TRefElement:()=>ce,TSpanElement:()=>zt,TextElement:()=>Ft,TextPathElement:()=>pe,TitleElement:()=>ke,Transform:()=>Pt,Translate:()=>wt,UnknownElement:()=>Mt,UseElement:()=>be,ViewPort:()=>ft,compressSpaces:()=>D,default:()=>Ue,getSelectorSpecificity:()=>J,normalizeAttributeName:()=>U,normalizeColor:()=>X,parseExternalUrl:()=>H,presets:()=>L,toNumbers:()=>F,trimLeft:()=>B,trimRight:()=>j,vectorMagnitude:()=>et,vectorsAngle:()=>it,vectorsRatio:()=>rt}),r(3362);var i=r(6964);function n(t,e,r,n,s,a,o){try{var u=t[a](o),h=u.value}catch(t){return void r(t)}u.done?e(h):i.resolve(h).then(n,s)}function s(t){return function(){var e=this,r=arguments;return new i((function(i,s){var a=t.apply(e,r);function o(t){n(a,i,s,o,u,"next",t)}function u(t){n(a,i,s,o,u,"throw",t)}o(void 0)}))}}r(1761),r(5440),r(1392),r(3792),r(2953);var a=r(2284);function o(t,e,r){return(e=function(t){var e=function(t){if("object"!=(0,a.A)(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=(0,a.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,a.A)(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r(2712),r(9449),r(744);var u=r(3146),h=(r(2762),r(2855)),c=(r(5276),r(1699),r(4490),function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)});function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function f(t,e){var r=t[0],i=t[1];return[r*Math.cos(e)-i*Math.sin(e),r*Math.sin(e)+i*Math.cos(e)]}function g(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var p=Math.PI;function d(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var i=t.rX,n=t.rY,s=t.x,a=t.y;i=Math.abs(t.rX),n=Math.abs(t.rY);var o=f([(e-s)/2,(r-a)/2],-t.xRot/180*p),u=o[0],h=o[1],c=Math.pow(u,2)/Math.pow(i,2)+Math.pow(h,2)/Math.pow(n,2);1<c&&(i*=Math.sqrt(c),n*=Math.sqrt(c)),t.rX=i,t.rY=n;var l=Math.pow(i,2)*Math.pow(h,2)+Math.pow(n,2)*Math.pow(u,2),g=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(n,2)-l)/l)),d=i*h/n*g,v=-n*u/i*g,y=f([d,v],t.xRot/180*p);t.cX=y[0]+(e+s)/2,t.cY=y[1]+(r+a)/2,t.phi1=Math.atan2((h-v)/n,(u-d)/i),t.phi2=Math.atan2((-h-v)/n,(-u-d)/i),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*p),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*p),t.phi1*=180/p,t.phi2*=180/p}function v(t,e,r){g(t,e,r);var i=t*t+e*e-r*r;if(0>i)return[];if(0===i)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var n=Math.sqrt(i);return[[(t*r+e*n)/(t*t+e*e),(e*r-t*n)/(t*t+e*e)],[(t*r-e*n)/(t*t+e*e),(e*r+t*n)/(t*t+e*e)]]}var y,m=Math.PI/180;function x(t,e,r){return(1-r)*t+r*e}function b(t,e,r,i){return t+Math.cos(i/180*p)*e+Math.sin(i/180*p)*r}function w(t,e,r,i){var n=1e-6,s=e-t,a=r-e,o=3*s+3*(i-r)-6*a,u=6*(a-s),h=3*s;return Math.abs(o)<n?[-h/u]:function(t,e,r){void 0===r&&(r=1e-6);var i=t*t/4-e;if(i<-r)return[];if(i<=r)return[-t/2];var n=Math.sqrt(i);return[-t/2-n,-t/2+n]}(u/o,h/o,n)}function S(t,e,r,i,n){var s=1-n;return t*(s*s*s)+e*(3*s*s*n)+r*(3*s*n*n)+i*(n*n*n)}!function(t){function e(){return n((function(t,e,r){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=r),t.relative=!1),t}))}function r(){var t=NaN,e=NaN,r=NaN,i=NaN;return n((function(n,s,a){return n.type&P.SMOOTH_CURVE_TO&&(n.type=P.CURVE_TO,t=isNaN(t)?s:t,e=isNaN(e)?a:e,n.x1=n.relative?s-t:2*s-t,n.y1=n.relative?a-e:2*a-e),n.type&P.CURVE_TO?(t=n.relative?s+n.x2:n.x2,e=n.relative?a+n.y2:n.y2):(t=NaN,e=NaN),n.type&P.SMOOTH_QUAD_TO&&(n.type=P.QUAD_TO,r=isNaN(r)?s:r,i=isNaN(i)?a:i,n.x1=n.relative?s-r:2*s-r,n.y1=n.relative?a-i:2*a-i),n.type&P.QUAD_TO?(r=n.relative?s+n.x1:n.x1,i=n.relative?a+n.y1:n.y1):(r=NaN,i=NaN),n}))}function i(){var t=NaN,e=NaN;return n((function(r,i,n){if(r.type&P.SMOOTH_QUAD_TO&&(r.type=P.QUAD_TO,t=isNaN(t)?i:t,e=isNaN(e)?n:e,r.x1=r.relative?i-t:2*i-t,r.y1=r.relative?n-e:2*n-e),r.type&P.QUAD_TO){t=r.relative?i+r.x1:r.x1,e=r.relative?n+r.y1:r.y1;var s=r.x1,a=r.y1;r.type=P.CURVE_TO,r.x1=((r.relative?0:i)+2*s)/3,r.y1=((r.relative?0:n)+2*a)/3,r.x2=(r.x+2*s)/3,r.y2=(r.y+2*a)/3}else t=NaN,e=NaN;return r}))}function n(t){var e=0,r=0,i=NaN,n=NaN;return function(s){if(isNaN(i)&&!(s.type&P.MOVE_TO))throw new Error("path must start with moveto");var a=t(s,e,r,i,n);return s.type&P.CLOSE_PATH&&(e=i,r=n),void 0!==s.x&&(e=s.relative?e+s.x:s.x),void 0!==s.y&&(r=s.relative?r+s.y:s.y),s.type&P.MOVE_TO&&(i=e,n=r),a}}function s(t,e,r,i,s,a){return g(t,e,r,i,s,a),n((function(n,o,u,h){var c=n.x1,l=n.x2,f=n.relative&&!isNaN(h),g=void 0!==n.x?n.x:f?0:o,p=void 0!==n.y?n.y:f?0:u;function d(t){return t*t}n.type&P.HORIZ_LINE_TO&&0!==e&&(n.type=P.LINE_TO,n.y=n.relative?0:u),n.type&P.VERT_LINE_TO&&0!==r&&(n.type=P.LINE_TO,n.x=n.relative?0:o),void 0!==n.x&&(n.x=n.x*t+p*r+(f?0:s)),void 0!==n.y&&(n.y=g*e+n.y*i+(f?0:a)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*r+(f?0:s)),void 0!==n.y1&&(n.y1=c*e+n.y1*i+(f?0:a)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*r+(f?0:s)),void 0!==n.y2&&(n.y2=l*e+n.y2*i+(f?0:a));var v=t*i-e*r;if(void 0!==n.xRot&&(1!==t||0!==e||0!==r||1!==i))if(0===v)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=P.LINE_TO;else{var y=n.xRot*Math.PI/180,m=Math.sin(y),x=Math.cos(y),b=1/d(n.rX),w=1/d(n.rY),S=d(x)*b+d(m)*w,T=2*m*x*(b-w),O=d(m)*b+d(x)*w,A=S*i*i-T*e*i+O*e*e,C=T*(t*i+e*r)-2*(S*r*i+O*t*e),E=S*r*r-T*t*r+O*t*t,N=(Math.atan2(C,A-E)+Math.PI)%Math.PI/2,M=Math.sin(N),R=Math.cos(N);n.rX=Math.abs(v)/Math.sqrt(A*d(R)+C*M*R+E*d(M)),n.rY=Math.abs(v)/Math.sqrt(A*d(M)-C*M*R+E*d(R)),n.xRot=180*N/Math.PI}return void 0!==n.sweepFlag&&0>v&&(n.sweepFlag=+!n.sweepFlag),n}))}t.ROUND=function(t){function e(e){return Math.round(e*t)/t}return void 0===t&&(t=1e13),g(t),function(t){return void 0!==t.x1&&(t.x1=e(t.x1)),void 0!==t.y1&&(t.y1=e(t.y1)),void 0!==t.x2&&(t.x2=e(t.x2)),void 0!==t.y2&&(t.y2=e(t.y2)),void 0!==t.x&&(t.x=e(t.x)),void 0!==t.y&&(t.y=e(t.y)),void 0!==t.rX&&(t.rX=e(t.rX)),void 0!==t.rY&&(t.rY=e(t.rY)),t}},t.TO_ABS=e,t.TO_REL=function(){return n((function(t,e,r){return t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=r),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=r),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=r),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,e,r){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),n((function(i,n,s,a,o){if(isNaN(a)&&!(i.type&P.MOVE_TO))throw new Error("path must start with moveto");return e&&i.type&P.HORIZ_LINE_TO&&(i.type=P.LINE_TO,i.y=i.relative?0:s),r&&i.type&P.VERT_LINE_TO&&(i.type=P.LINE_TO,i.x=i.relative?0:n),t&&i.type&P.CLOSE_PATH&&(i.type=P.LINE_TO,i.x=i.relative?a-n:a,i.y=i.relative?o-s:o),i.type&P.ARC&&(0===i.rX||0===i.rY)&&(i.type=P.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i}))},t.NORMALIZE_ST=r,t.QT_TO_C=i,t.INFO=n,t.SANITIZE=function(t){void 0===t&&(t=0),g(t);var e=NaN,r=NaN,i=NaN,s=NaN;return n((function(n,a,o,u,h){var c=Math.abs,l=!1,f=0,g=0;if(n.type&P.SMOOTH_CURVE_TO&&(f=isNaN(e)?0:a-e,g=isNaN(r)?0:o-r),n.type&(P.CURVE_TO|P.SMOOTH_CURVE_TO)?(e=n.relative?a+n.x2:n.x2,r=n.relative?o+n.y2:n.y2):(e=NaN,r=NaN),n.type&P.SMOOTH_QUAD_TO?(i=isNaN(i)?a:2*a-i,s=isNaN(s)?o:2*o-s):n.type&P.QUAD_TO?(i=n.relative?a+n.x1:n.x1,s=n.relative?o+n.y1:n.y2):(i=NaN,s=NaN),n.type&P.LINE_COMMANDS||n.type&P.ARC&&(0===n.rX||0===n.rY||!n.lArcFlag)||n.type&P.CURVE_TO||n.type&P.SMOOTH_CURVE_TO||n.type&P.QUAD_TO||n.type&P.SMOOTH_QUAD_TO){var p=void 0===n.x?0:n.relative?n.x:n.x-a,d=void 0===n.y?0:n.relative?n.y:n.y-o;f=isNaN(i)?void 0===n.x1?f:n.relative?n.x:n.x1-a:i-a,g=isNaN(s)?void 0===n.y1?g:n.relative?n.y:n.y1-o:s-o;var v=void 0===n.x2?0:n.relative?n.x:n.x2-a,y=void 0===n.y2?0:n.relative?n.y:n.y2-o;c(p)<=t&&c(d)<=t&&c(f)<=t&&c(g)<=t&&c(v)<=t&&c(y)<=t&&(l=!0)}return n.type&P.CLOSE_PATH&&c(a-u)<=t&&c(o-h)<=t&&(l=!0),l?[]:n}))},t.MATRIX=s,t.ROTATE=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),g(t,e,r);var i=Math.sin(t),n=Math.cos(t);return s(n,i,-i,n,e-e*n+r*i,r-e*i-r*n)},t.TRANSLATE=function(t,e){return void 0===e&&(e=0),g(t,e),s(1,0,0,1,t,e)},t.SCALE=function(t,e){return void 0===e&&(e=t),g(t,e),s(t,0,0,e,0,0)},t.SKEW_X=function(t){return g(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return g(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),g(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),g(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return n((function(t,e,r){return P.ARC===t.type?function(t,e,r){var i,n,s,a;t.cX||d(t,e,r);for(var o=Math.min(t.phi1,t.phi2),u=Math.max(t.phi1,t.phi2)-o,h=Math.ceil(u/90),c=new Array(h),l=e,g=r,p=0;p<h;p++){var v=x(t.phi1,t.phi2,p/h),y=x(t.phi1,t.phi2,(p+1)/h),b=y-v,w=4/3*Math.tan(b*m/4),S=[Math.cos(v*m)-w*Math.sin(v*m),Math.sin(v*m)+w*Math.cos(v*m)],T=S[0],O=S[1],A=[Math.cos(y*m),Math.sin(y*m)],C=A[0],E=A[1],N=[C+w*Math.sin(y*m),E-w*Math.cos(y*m)],M=N[0],R=N[1];c[p]={relative:t.relative,type:P.CURVE_TO};var _=function(e,r){var i=f([e*t.rX,r*t.rY],t.xRot),n=i[0],s=i[1];return[t.cX+n,t.cY+s]};i=_(T,O),c[p].x1=i[0],c[p].y1=i[1],n=_(M,R),c[p].x2=n[0],c[p].y2=n[1],s=_(C,E),c[p].x=s[0],c[p].y=s[1],t.relative&&(c[p].x1-=l,c[p].y1-=g,c[p].x2-=l,c[p].y2-=g,c[p].x-=l,c[p].y-=g),l=(a=[c[p].x,c[p].y])[0],g=a[1]}return c}(t,t.relative?0:e,t.relative?0:r):t}))},t.ANNOTATE_ARCS=function(){return n((function(t,e,r){return t.relative&&(e=0,r=0),P.ARC===t.type&&d(t,e,r),t}))},t.CLONE=function(){return function(t){var e={};for(var r in t)e[r]=t[r];return e}},t.CALCULATE_BOUNDS=function(){var t=e(),s=i(),a=r(),o=n((function(e,r,i){var n=a(s(t(function(t){var e={};for(var r in t)e[r]=t[r];return e}(e))));function u(t){t>o.maxX&&(o.maxX=t),t<o.minX&&(o.minX=t)}function h(t){t>o.maxY&&(o.maxY=t),t<o.minY&&(o.minY=t)}if(n.type&P.DRAWING_COMMANDS&&(u(r),h(i)),n.type&P.HORIZ_LINE_TO&&u(n.x),n.type&P.VERT_LINE_TO&&h(n.y),n.type&P.LINE_TO&&(u(n.x),h(n.y)),n.type&P.CURVE_TO){u(n.x),h(n.y);for(var c=0,l=w(r,n.x1,n.x2,n.x);c<l.length;c++)0<(V=l[c])&&1>V&&u(S(r,n.x1,n.x2,n.x,V));for(var f=0,g=w(i,n.y1,n.y2,n.y);f<g.length;f++)0<(V=g[f])&&1>V&&h(S(i,n.y1,n.y2,n.y,V))}if(n.type&P.ARC){u(n.x),h(n.y),d(n,r,i);for(var p=n.xRot/180*Math.PI,y=Math.cos(p)*n.rX,m=Math.sin(p)*n.rX,x=-Math.sin(p)*n.rY,T=Math.cos(p)*n.rY,O=n.phi1<n.phi2?[n.phi1,n.phi2]:-180>n.phi2?[n.phi2+360,n.phi1+360]:[n.phi2,n.phi1],A=O[0],C=O[1],E=function(t){var e=t[0],r=t[1],i=180*Math.atan2(r,e)/Math.PI;return i<A?i+360:i},N=0,M=v(x,-y,0).map(E);N<M.length;N++)(V=M[N])>A&&V<C&&u(b(n.cX,y,x,V));for(var R=0,_=v(T,-m,0).map(E);R<_.length;R++){var V;(V=_[R])>A&&V<C&&h(b(n.cY,m,T,V))}}return e}));return o.minX=1/0,o.maxX=-1/0,o.minY=1/0,o.maxY=-1/0,o}}(y||(y={}));var T,O=function(){function t(){}return t.prototype.round=function(t){return this.transform(y.ROUND(t))},t.prototype.toAbs=function(){return this.transform(y.TO_ABS())},t.prototype.toRel=function(){return this.transform(y.TO_REL())},t.prototype.normalizeHVZ=function(t,e,r){return this.transform(y.NORMALIZE_HVZ(t,e,r))},t.prototype.normalizeST=function(){return this.transform(y.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(y.QT_TO_C())},t.prototype.aToC=function(){return this.transform(y.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(y.SANITIZE(t))},t.prototype.translate=function(t,e){return this.transform(y.TRANSLATE(t,e))},t.prototype.scale=function(t,e){return this.transform(y.SCALE(t,e))},t.prototype.rotate=function(t,e,r){return this.transform(y.ROTATE(t,e,r))},t.prototype.matrix=function(t,e,r,i,n,s){return this.transform(y.MATRIX(t,e,r,i,n,s))},t.prototype.skewX=function(t){return this.transform(y.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(y.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(y.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(y.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(y.ANNOTATE_ARCS())},t}(),A=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},C=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},E=function(t){function e(){var e=t.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return l(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,e){var r=this;void 0===e&&(e=[]);for(var i=function(t){e.push(t),r.curArgs.length=0,r.canParseCommandOrComma=!0},n=0;n<t.length;n++){var s=t[n],a=!(this.curCommandType!==P.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),o=C(s)&&("0"===this.curNumber&&"0"===s||a);if(!C(s)||o)if("e"!==s&&"E"!==s)if("-"!==s&&"+"!==s||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==s||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+n);if(this.curCommandType===P.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+n+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+n+'"');this.curArgs.push(u),this.curArgs.length===N[this.curCommandType]&&(P.HORIZ_LINE_TO===this.curCommandType?i({type:P.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):P.VERT_LINE_TO===this.curCommandType?i({type:P.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===P.MOVE_TO||this.curCommandType===P.LINE_TO||this.curCommandType===P.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),P.MOVE_TO===this.curCommandType&&(this.curCommandType=P.LINE_TO)):this.curCommandType===P.CURVE_TO?i({type:P.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===P.SMOOTH_CURVE_TO?i({type:P.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===P.QUAD_TO?i({type:P.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===P.ARC&&i({type:P.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!A(s))if(","===s&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==s&&"-"!==s&&"."!==s)if(o)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+n+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==s&&"Z"!==s)if("h"===s||"H"===s)this.curCommandType=P.HORIZ_LINE_TO,this.curCommandRelative="h"===s;else if("v"===s||"V"===s)this.curCommandType=P.VERT_LINE_TO,this.curCommandRelative="v"===s;else if("m"===s||"M"===s)this.curCommandType=P.MOVE_TO,this.curCommandRelative="m"===s;else if("l"===s||"L"===s)this.curCommandType=P.LINE_TO,this.curCommandRelative="l"===s;else if("c"===s||"C"===s)this.curCommandType=P.CURVE_TO,this.curCommandRelative="c"===s;else if("s"===s||"S"===s)this.curCommandType=P.SMOOTH_CURVE_TO,this.curCommandRelative="s"===s;else if("q"===s||"Q"===s)this.curCommandType=P.QUAD_TO,this.curCommandRelative="q"===s;else if("t"===s||"T"===s)this.curCommandType=P.SMOOTH_QUAD_TO,this.curCommandRelative="t"===s;else{if("a"!==s&&"A"!==s)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+".");this.curCommandType=P.ARC,this.curCommandRelative="a"===s}else e.push({type:P.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal="."===s}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return e},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(e,r){void 0===r&&(r=[]);for(var i=0,n=Object.getPrototypeOf(this).parse.call(this,e);i<n.length;i++){var s=n[i],a=t(s);Array.isArray(a)?r.push.apply(r,a):r.push(a)}return r}}})},e}(O),P=function(t){function e(r){var i=t.call(this)||this;return i.commands="string"==typeof r?e.parse(r):r,i}return l(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=y.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var e=[],r=0,i=this.commands;r<i.length;r++){var n=t(i[r]);Array.isArray(n)?e.push.apply(e,n):e.push(n)}return this.commands=e,this},e.encode=function(t){return function(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var i=t[r];if(i.type===P.CLOSE_PATH)e+="z";else if(i.type===P.HORIZ_LINE_TO)e+=(i.relative?"h":"H")+i.x;else if(i.type===P.VERT_LINE_TO)e+=(i.relative?"v":"V")+i.y;else if(i.type===P.MOVE_TO)e+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===P.LINE_TO)e+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===P.CURVE_TO)e+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===P.SMOOTH_CURVE_TO)e+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===P.QUAD_TO)e+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===P.SMOOTH_QUAD_TO)e+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==P.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+r+".");e+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return e}(t)},e.parse=function(t){var e=new E,r=[];return e.parse(t,r),e.finish(r),r},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(O),N=((T={})[P.MOVE_TO]=2,T[P.LINE_TO]=2,T[P.HORIZ_LINE_TO]=1,T[P.VERT_LINE_TO]=1,T[P.CLOSE_PATH]=0,T[P.QUAD_TO]=4,T[P.SMOOTH_QUAD_TO]=2,T[P.CURVE_TO]=6,T[P.SMOOTH_CURVE_TO]=4,T[P.ARC]=7,T);function M(t){return M="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},M(t)}r(8781);var R=[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],_=[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 V(t,e,r,i,n,s){if(!(isNaN(s)||s<1)){s|=0;var a=function(t,e,r,i,n){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==M(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=t.getContext("2d");try{return s.getImageData(e,r,i,n)}catch(t){throw new Error("unable to access image data: "+t)}}(t,e,r,i,n);a=function(t,e,r,i,n,s){for(var a,o=t.data,u=2*s+1,h=i-1,c=n-1,l=s+1,f=l*(l+1)/2,g=new k,p=g,d=1;d<u;d++)p=p.next=new k,d===l&&(a=p);p.next=g;for(var v=null,y=null,m=0,x=0,b=R[s],w=_[s],S=0;S<n;S++){p=g;for(var T=o[x],O=o[x+1],A=o[x+2],C=o[x+3],E=0;E<l;E++)p.r=T,p.g=O,p.b=A,p.a=C,p=p.next;for(var P=0,N=0,M=0,V=0,I=l*T,L=l*O,D=l*A,B=l*C,j=f*T,F=f*O,z=f*A,U=f*C,H=1;H<l;H++){var X=x+((h<H?h:H)<<2),Y=o[X],W=o[X+1],q=o[X+2],G=o[X+3],Q=l-H;j+=(p.r=Y)*Q,F+=(p.g=W)*Q,z+=(p.b=q)*Q,U+=(p.a=G)*Q,P+=Y,N+=W,M+=q,V+=G,p=p.next}v=g,y=a;for(var $=0;$<i;$++){var Z=U*b>>>w;if(o[x+3]=Z,0!==Z){var K=255/Z;o[x]=(j*b>>>w)*K,o[x+1]=(F*b>>>w)*K,o[x+2]=(z*b>>>w)*K}else o[x]=o[x+1]=o[x+2]=0;j-=I,F-=L,z-=D,U-=B,I-=v.r,L-=v.g,D-=v.b,B-=v.a;var J=$+s+1;J=m+(J<h?J:h)<<2,j+=P+=v.r=o[J],F+=N+=v.g=o[J+1],z+=M+=v.b=o[J+2],U+=V+=v.a=o[J+3],v=v.next;var tt=y,et=tt.r,rt=tt.g,it=tt.b,nt=tt.a;I+=et,L+=rt,D+=it,B+=nt,P-=et,N-=rt,M-=it,V-=nt,y=y.next,x+=4}m+=i}for(var st=0;st<i;st++){var at=o[x=st<<2],ot=o[x+1],ut=o[x+2],ht=o[x+3],ct=l*at,lt=l*ot,ft=l*ut,gt=l*ht,pt=f*at,dt=f*ot,vt=f*ut,yt=f*ht;p=g;for(var mt=0;mt<l;mt++)p.r=at,p.g=ot,p.b=ut,p.a=ht,p=p.next;for(var xt=i,bt=0,wt=0,St=0,Tt=0,Ot=1;Ot<=s;Ot++){x=xt+st<<2;var At=l-Ot;pt+=(p.r=at=o[x])*At,dt+=(p.g=ot=o[x+1])*At,vt+=(p.b=ut=o[x+2])*At,yt+=(p.a=ht=o[x+3])*At,Tt+=at,bt+=ot,wt+=ut,St+=ht,p=p.next,Ot<c&&(xt+=i)}x=st,v=g,y=a;for(var Ct=0;Ct<n;Ct++){var Et=x<<2;o[Et+3]=ht=yt*b>>>w,ht>0?(ht=255/ht,o[Et]=(pt*b>>>w)*ht,o[Et+1]=(dt*b>>>w)*ht,o[Et+2]=(vt*b>>>w)*ht):o[Et]=o[Et+1]=o[Et+2]=0,pt-=ct,dt-=lt,vt-=ft,yt-=gt,ct-=v.r,lt-=v.g,ft-=v.b,gt-=v.a,Et=st+((Et=Ct+l)<c?Et:c)*i<<2,pt+=Tt+=v.r=o[Et],dt+=bt+=v.g=o[Et+1],vt+=wt+=v.b=o[Et+2],yt+=St+=v.a=o[Et+3],v=v.next,ct+=at=y.r,lt+=ot=y.g,ft+=ut=y.b,gt+=ht=y.a,Tt-=at,bt-=ot,wt-=ut,St-=ht,y=y.next,x+=i}}return t}(a,0,0,i,n,s),t.getContext("2d").putImageData(a,e,r)}}var k=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},I=r(6964),L=Object.freeze({__proto__:null,offscreen:function(){var{DOMParser:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:(t,e)=>new OffscreenCanvas(t,e),createImage:t=>s((function*(){var e=yield fetch(t),r=yield e.blob();return yield createImageBitmap(r)}))()};return"undefined"==typeof DOMParser&&void 0!==t||Reflect.deleteProperty(e,"DOMParser"),e},node:function(t){var{DOMParser:e,canvas:r,fetch:i}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:i,createCanvas:r.createCanvas,createImage:r.loadImage}}});function D(t){return t.replace(/(?!\u3000)\s+/gm," ")}function B(t){return t.replace(/^[\n \t]+/,"")}function j(t){return t.replace(/[\n \t]+$/,"")}function F(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var z=/^[A-Z-]+$/;function U(t){return z.test(t)?t.toLowerCase():t}function H(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function X(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,((t,r)=>e--&&r?String(Math.round(parseFloat(t))):t))}var Y=/(\[[^\]]+\])/g,W=/(#[^\s+>~.[:]+)/g,q=/(\.[^\s+>~.[:]+)/g,G=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,Q=/(:[\w-]+\([^)]*\))/gi,$=/(:[^\s+>~.[:]+)/g,Z=/([^\s+>~.[:]+)/g;function K(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function J(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g,"     $1 ").replace(/{[\s\S]*/gm," "),i=0;return[r,i]=K(r,Y),e[1]+=i,[r,i]=K(r,W),e[0]+=i,[r,i]=K(r,q),e[1]+=i,[r,i]=K(r,G),e[2]+=i,[r,i]=K(r,Q),e[1]+=i,[r,i]=K(r,$),e[1]+=i,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,i]=K(r,Z),e[2]+=i,e.join("")}var tt=1e-8;function et(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function rt(t,e){return(t[0]*e[0]+t[1]*e[1])/(et(t)*et(e))}function it(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(rt(t,e))}function nt(t){return t*t*t}function st(t){return 3*t*t*(1-t)}function at(t){return 3*t*(1-t)*(1-t)}function ot(t){return(1-t)*(1-t)*(1-t)}function ut(t){return t*t}function ht(t){return 2*t*(1-t)}function ct(t){return(1-t)*(1-t)}class lt{constructor(t,e,r){this.document=t,this.name=e,this.value=r,this.isNormalizedColor=!1}static empty(t){return new lt(t,"EMPTY","")}split(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",{document:e,name:r}=this;return D(this.getString()).trim().split(t).map((t=>new lt(e,r,t)))}hasValue(t){var{value:e}=this;return null!==e&&""!==e&&(t||0!==e)&&void 0!==e}isString(t){var{value:e}=this,r="string"==typeof e;return r&&t?t.test(e):r}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return void 0===t||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var{value:e}=this,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}getString(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=X(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var[r,i]="boolean"==typeof t?[void 0,t]:[t],{viewPort:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&i:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*n.computeSize(r);default:var s=this.getNumber();return e&&s<1?s*n.computeSize(r):s}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var r=this.getDefinition();if(!r)return null;if("function"==typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"==typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var i=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&r.getAttribute("patternTransform",!0).setValue(i.value)}return r.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?lt.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),r=e.length,i=0,n=0;n<r&&(","===e[n]&&i++,3!==i);n++);if(t.hasValue()&&this.isString()&&3!==i){var s=new h(e);s.ok&&(s.alpha=t.getNumber(),e=s.toRGBA())}return new lt(this.document,this.name,e)}}lt.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class ft{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class gt{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[r=e,i=e]=F(t);return new gt(r,i)}static parseScale(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,[r=e,i=r]=F(t);return new gt(r,i)}static parsePath(t){for(var e=F(t),r=e.length,i=[],n=0;n<r;n+=2)i.push(new gt(e[n],e[n+1]));return i}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:r}=this,i=e*t[0]+r*t[2]+t[4],n=e*t[1]+r*t[3]+t[5];this.x=i,this.y=n}}class pt{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:r}=this,i=t.ctx.canvas;i.onclick=e,i.onmousemove=r,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:r}=this,{style:i}=t.ctx.canvas;i&&(i.cursor=""),e.forEach(((t,e)=>{for(var{run:i}=t,n=r[e];n;)i(n),n=n.parent})),this.events=[],this.eventElements=[]}}checkPath(t,e){if(this.working&&e){var{events:r,eventElements:i}=this;r.forEach(((r,n)=>{var{x:s,y:a}=r;!i[n]&&e.isPointInPath&&e.isPointInPath(s,a)&&(i[n]=t)}))}}checkBoundingBox(t,e){if(this.working&&e){var{events:r,eventElements:i}=this;r.forEach(((r,n)=>{var{x:s,y:a}=r;!i[n]&&e.isPointInBox(s,a)&&(i[n]=t)}))}}mapXY(t,e){for(var{window:r,ctx:i}=this.screen,n=new gt(t,e),s=i.canvas;s;)n.x-=s.offsetLeft,n.y-=s.offsetTop,s=s.offsetParent;return r.scrollX&&(n.x+=r.scrollX),r.scrollY&&(n.y+=r.scrollY),n}onClick(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:r,run(t){t.onClick&&t.onClick()}})}onMouseMove(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:r,run(t){t.onMouseMove&&t.onMouseMove()}})}}var dt="undefined"!=typeof window?window:null,vt="undefined"!=typeof fetch?fetch.bind(void 0):null;class yt{constructor(t){var{fetch:e=vt,window:r=dt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new ft,this.mouse=new pt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:I.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every((t=>t()));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:r,aspectRatio:i,width:n,desiredWidth:s,height:a,desiredHeight:o,minX:u=0,minY:h=0,refX:c,refY:l,clip:f=!1,clipX:g=0,clipY:p=0}=t,d=D(i).replace(/^defer\s/,""),[v,y]=d.split(" "),m=v||"xMidYMid",x=y||"meet",b=n/s,w=a/o,S=Math.min(b,w),T=Math.max(b,w),O=s,A=o;"meet"===x&&(O*=S,A*=S),"slice"===x&&(O*=T,A*=T);var C=new lt(e,"refX",c),E=new lt(e,"refY",l),P=C.hasValue()&&E.hasValue();if(P&&r.translate(-S*C.getPixels("x"),-S*E.getPixels("y")),f){var N=S*g,M=S*p;r.beginPath(),r.moveTo(N,M),r.lineTo(n,M),r.lineTo(n,a),r.lineTo(N,a),r.closePath(),r.clip()}if(!P){var R="meet"===x&&S===w,_="slice"===x&&T===w,V="meet"===x&&S===b,k="slice"===x&&T===b;m.startsWith("xMid")&&(R||_)&&r.translate(n/2-O/2,0),m.endsWith("YMid")&&(V||k)&&r.translate(0,a/2-A/2),m.startsWith("xMax")&&(R||_)&&r.translate(n-O,0),m.endsWith("YMax")&&(V||k)&&r.translate(0,a-A)}switch(!0){case"none"===m:r.scale(b,w);break;case"meet"===x:r.scale(S,S);break;case"slice"===x:r.scale(T,T)}r.translate(-u,-h)}start(t){var{enableRedraw:e=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:n=!1,ignoreClear:s=!1,forceRedraw:a,scaleWidth:o,scaleHeight:h,offsetX:c,offsetY:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{FRAMERATE:f,mouse:g}=this,p=1e3/f;if(this.frameDuration=p,this.readyPromise=new I((t=>{this.resolveReady=t})),this.isReady()&&this.render(t,n,s,o,h,c,l),e){var d=Date.now(),v=d,y=0,m=()=>{d=Date.now(),(y=d-v)>=p&&(v=d-y%p,this.shouldUpdate(i,a)&&(this.render(t,n,s,o,h,c,l),g.runEvents())),this.intervalId=u(m)};r||g.start(),this.intervalId=u(m)}}stop(){this.intervalId&&(u.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:r}=this;if(this.animations.reduce(((t,e)=>e.update(r)||t),!1))return!0}return!("function"!=typeof e||!e())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents()}render(t,e,r,i,n,s,a){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:u,viewPort:h,ctx:c,isFirstRender:l}=this,f=c.canvas;h.clear(),f.width&&f.height?h.setCurrent(f.width,f.height):h.setCurrent(o,u);var g=t.getStyle("width"),p=t.getStyle("height");!e&&(l||"number"!=typeof i&&"number"!=typeof n)&&(g.hasValue()&&(f.width=g.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),p.hasValue()&&(f.height=p.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var d=f.clientWidth||f.width,v=f.clientHeight||f.height;if(e&&g.hasValue()&&p.hasValue()&&(d=g.getPixels("x"),v=p.getPixels("y")),h.setCurrent(d,v),"number"==typeof s&&t.getAttribute("x",!0).setValue(s),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof i||"number"==typeof n){var y=F(t.getAttribute("viewBox").getString()),m=0,x=0;if("number"==typeof i){var b=t.getStyle("width");b.hasValue()?m=b.getPixels("x")/i:isNaN(y[2])||(m=y[2]/i)}if("number"==typeof n){var w=t.getStyle("height");w.hasValue()?x=w.getPixels("y")/n:isNaN(y[3])||(x=y[3]/n)}m||(m=x),x||(x=m),t.getAttribute("width",!0).setValue(i),t.getAttribute("height",!0).setValue(n);var S=t.getStyle("transform",!0,!0);S.setValue("".concat(S.getString()," scale(").concat(1/m,", ").concat(1/x,")"))}r||c.clearRect(0,0,d,v),t.render(c),l&&(this.isFirstRender=!1)}}yt.defaultWindow=dt,yt.defaultFetch=vt;var{defaultFetch:mt}=yt,xt="undefined"!=typeof DOMParser?DOMParser:null;class bt{constructor(){var{fetch:t=mt,DOMParser:e=xt}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return s((function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)}))()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(r){return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return s((function*(){var r=yield e.fetch(t),i=yield r.text();return e.parseFromString(i)}))()}}class wt{constructor(t,e){this.type="translate",this.point=null,this.point=gt.parse(e)}apply(t){var{x:e,y:r}=this.point;t.translate(e||0,r||0)}unapply(t){var{x:e,y:r}=this.point;t.translate(-1*e||0,-1*r||0)}applyToPoint(t){var{x:e,y:r}=this.point;t.applyTransform([1,0,0,1,e||0,r||0])}}class St{constructor(t,e,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=F(e);this.angle=new lt(t,"angle",i[0]),this.originX=r[0],this.originY=r[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(t){var{cx:e,cy:r,originX:i,originY:n,angle:s}=this,a=e+i.getPixels("x"),o=r+n.getPixels("y");t.translate(a,o),t.rotate(s.getRadians()),t.translate(-a,-o)}unapply(t){var{cx:e,cy:r,originX:i,originY:n,angle:s}=this,a=e+i.getPixels("x"),o=r+n.getPixels("y");t.translate(a,o),t.rotate(-1*s.getRadians()),t.translate(-a,-o)}applyToPoint(t){var{cx:e,cy:r,angle:i}=this,n=i.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}class Tt{constructor(t,e,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=gt.parseScale(e);0!==i.x&&0!==i.y||(i.x=tt,i.y=tt),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(t){var{scale:{x:e,y:r},originX:i,originY:n}=this,s=i.getPixels("x"),a=n.getPixels("y");t.translate(s,a),t.scale(e,r||e),t.translate(-s,-a)}unapply(t){var{scale:{x:e,y:r},originX:i,originY:n}=this,s=i.getPixels("x"),a=n.getPixels("y");t.translate(s,a),t.scale(1/e,1/r||e),t.translate(-s,-a)}applyToPoint(t){var{x:e,y:r}=this.scale;t.applyTransform([e||0,0,0,r||0,0,0])}}class Ot{constructor(t,e,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=F(e),this.originX=r[0],this.originY=r[1]}apply(t){var{originX:e,originY:r,matrix:i}=this,n=e.getPixels("x"),s=r.getPixels("y");t.translate(n,s),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),t.translate(-n,-s)}unapply(t){var{originX:e,originY:r,matrix:i}=this,n=i[0],s=i[2],a=i[4],o=i[1],u=i[3],h=i[5],c=1/(n*(1*u-0*h)-s*(1*o-0*h)+a*(0*o-0*u)),l=e.getPixels("x"),f=r.getPixels("y");t.translate(l,f),t.transform(c*(1*u-0*h),c*(0*h-1*o),c*(0*a-1*s),c*(1*n-0*a),c*(s*h-a*u),c*(a*o-n*h)),t.translate(-l,-f)}applyToPoint(t){t.applyTransform(this.matrix)}}class At extends Ot{constructor(t,e,r){super(t,e,r),this.type="skew",this.angle=null,this.angle=new lt(t,"angle",e)}}class Ct extends At{constructor(t,e,r){super(t,e,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Et extends At{constructor(t,e,r){super(t,e,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class Pt{constructor(t,e,r){this.document=t,this.transforms=[];var i=function(t){return D(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(e);i.forEach((t=>{if("none"!==t){var[e,i]=function(t){var[e,r]=t.split("(");return[e.trim(),r.trim().replace(")","")]}(t),n=Pt.transformTypes[e];void 0!==n&&this.transforms.push(new n(this.document,i,r))}}))}static fromElement(t,e){var r=e.getStyle("transform",!1,!0),[i,n=i]=e.getStyle("transform-origin",!1,!0).split(),s=[i,n];return r.hasValue()?new Pt(t,r.getString(),s):null}apply(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].apply(t)}unapply(t){for(var{transforms:e}=this,r=e.length-1;r>=0;r--)e[r].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].applyToPoint(t)}}Pt.transformTypes={translate:wt,rotate:St,scale:Tt,matrix:Ot,skewX:Ct,skewY:Et};class Nt{constructor(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=t,this.node=e,this.captureTextNodes=r,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],e&&1===e.nodeType){if(Array.from(e.attributes).forEach((e=>{var r=U(e.nodeName);this.attributes[r]=new lt(t,r,e.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map((t=>t.trim()));i.forEach((e=>{if(e){var[r,i]=e.split(":").map((t=>t.trim()));this.styles[r]=new lt(t,r,i)}}))}var{definitions:n}=t,s=this.getAttribute("id");s.hasValue()&&(n[s.getString()]||(n[s.getString()]=this)),Array.from(e.childNodes).forEach((e=>{if(1===e.nodeType)this.addChild(e);else if(r&&(3===e.nodeType||4===e.nodeType)){var i=t.createTextNode(e);i.getText().length>0&&this.addChild(i)}}))}}getAttribute(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var i=new lt(this.document,t,"");return this.attributes[t]=i,i}return r||lt.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return lt.empty(this.document)}getStyle(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.styles[t];if(i)return i;var n=this.getAttribute(t);if(null!=n&&n.hasValue())return this.styles[t]=n,n;if(!r){var{parent:s}=this;if(s){var a=s.getStyle(t);if(null!=a&&a.hasValue())return a}}if(e){var o=new lt(this.document,t,"");return this.styles[t]=o,o}return i||lt.empty(this.document)}render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=Pt.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var i=r.getDefinition();