import{n as Tr}from"./@babel.80d29b7b.js";var z={exports:{}},hr;function vr(){return hr||(hr=1,function(Or,cr){(function(v,W){W(cr)})(Tr,function(v){/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var W=function(e,t){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,n){c.__proto__=n}||function(c,n){for(var y in n)Object.prototype.hasOwnProperty.call(n,y)&&(c[y]=n[y])})(e,t)};function k(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function c(){this.constructor=e}W(e,t),e.prototype=t===null?Object.create(t):(c.prototype=t.prototype,new c)}var d=" ";function J(e){var t="";Array.isArray(e)||(e=[e]);for(var c=0;ce.phi1&&(e.phi2-=2*G),e.sweepFlag===1&&e.phi2n)return[];if(n===0)return[[e*c/(e*e+t*t),t*c/(e*e+t*t)]];var y=Math.sqrt(n);return[[(e*c+t*y)/(e*e+t*t),(t*c-e*y)/(e*e+t*t)],[(e*c-t*y)/(e*e+t*t),(t*c+e*y)/(e*e+t*t)]]}var H=Math.PI/180;function rr(e,t,c){return(1-c)*e+c*t}function er(e,t,c,n){return e+Math.cos(n/180*G)*t+Math.sin(n/180*G)*c}function tr(e,t,c,n){var y=1e-6,T=t-e,_=c-t,r=3*T+3*(n-c)-6*_,s=6*(_-T),a=3*T;return Math.abs(r)f&&(i.sweepFlag=+!i.sweepFlag),i})}function _(){return function(r){var s={};for(var a in r)s[a]=r[a];return s}}e.ROUND=function(r){function s(a){return Math.round(a*r)/r}return r===void 0&&(r=1e13),g(r),function(a){return a.x1!==void 0&&(a.x1=s(a.x1)),a.y1!==void 0&&(a.y1=s(a.y1)),a.x2!==void 0&&(a.x2=s(a.x2)),a.y2!==void 0&&(a.y2=s(a.y2)),a.x!==void 0&&(a.x=s(a.x)),a.y!==void 0&&(a.y=s(a.y)),a.rX!==void 0&&(a.rX=s(a.rX)),a.rY!==void 0&&(a.rY=s(a.rY)),a}},e.TO_ABS=t,e.TO_REL=function(){return y(function(r,s,a){return r.relative||(r.x1!==void 0&&(r.x1-=s),r.y1!==void 0&&(r.y1-=a),r.x2!==void 0&&(r.x2-=s),r.y2!==void 0&&(r.y2-=a),r.x!==void 0&&(r.x-=s),r.y!==void 0&&(r.y-=a),r.relative=!0),r})},e.NORMALIZE_HVZ=function(r,s,a){return r===void 0&&(r=!0),s===void 0&&(s=!0),a===void 0&&(a=!0),y(function(o,m,u,i,O){if(isNaN(i)&&!(o.type&h.MOVE_TO))throw new Error("path must start with moveto");return s&&o.type&h.HORIZ_LINE_TO&&(o.type=h.LINE_TO,o.y=o.relative?0:u),a&&o.type&h.VERT_LINE_TO&&(o.type=h.LINE_TO,o.x=o.relative?0:m),r&&o.type&h.CLOSE_PATH&&(o.type=h.LINE_TO,o.x=o.relative?i-m:i,o.y=o.relative?O-u:O),o.type&h.ARC&&(o.rX===0||o.rY===0)&&(o.type=h.LINE_TO,delete o.rX,delete o.rY,delete o.xRot,delete o.lArcFlag,delete o.sweepFlag),o})},e.NORMALIZE_ST=c,e.QT_TO_C=n,e.INFO=y,e.SANITIZE=function(r){r===void 0&&(r=0),g(r);var s=NaN,a=NaN,o=NaN,m=NaN;return y(function(u,i,O,p,M){var A=Math.abs,I=!1,x=0,l=0;if(u.type&h.SMOOTH_CURVE_TO&&(x=isNaN(s)?0:i-s,l=isNaN(a)?0:O-a),u.type&(h.CURVE_TO|h.SMOOTH_CURVE_TO)?(s=u.relative?i+u.x2:u.x2,a=u.relative?O+u.y2:u.y2):(s=NaN,a=NaN),u.type&h.SMOOTH_QUAD_TO?(o=isNaN(o)?i:2*i-o,m=isNaN(m)?O:2*O-m):u.type&h.QUAD_TO?(o=u.relative?i+u.x1:u.x1,m=u.relative?O+u.y1:u.y2):(o=NaN,m=NaN),u.type&h.LINE_COMMANDS||u.type&h.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&h.CURVE_TO||u.type&h.SMOOTH_CURVE_TO||u.type&h.QUAD_TO||u.type&h.SMOOTH_QUAD_TO){var D=u.x===void 0?0:u.relative?u.x:u.x-i,N=u.y===void 0?0:u.relative?u.y:u.y-O;x=isNaN(o)?u.x1===void 0?x:u.relative?u.x:u.x1-i:o-i,l=isNaN(m)?u.y1===void 0?l:u.relative?u.y:u.y1-O:m-O;var f=u.x2===void 0?0:u.relative?u.x:u.x2-i,R=u.y2===void 0?0:u.relative?u.y:u.y2-O;A(D)<=r&&A(N)<=r&&A(x)<=r&&A(l)<=r&&A(f)<=r&&A(R)<=r&&(I=!0)}return u.type&h.CLOSE_PATH&&A(i-p)<=r&&A(O-M)<=r&&(I=!0),I?[]:u})},e.MATRIX=T,e.ROTATE=function(r,s,a){s===void 0&&(s=0),a===void 0&&(a=0),g(r,s,a);var o=Math.sin(r),m=Math.cos(r);return T(m,o,-o,m,s-s*m+a*o,a-s*o-a*m)},e.TRANSLATE=function(r,s){return s===void 0&&(s=0),g(r,s),T(1,0,0,1,r,s)},e.SCALE=function(r,s){return s===void 0&&(s=r),g(r,s),T(r,0,0,s,0,0)},e.SKEW_X=function(r){return g(r),T(1,0,Math.atan(r),1,0,0)},e.SKEW_Y=function(r){return g(r),T(1,Math.atan(r),0,1,0,0)},e.X_AXIS_SYMMETRY=function(r){return r===void 0&&(r=0),g(r),T(-1,0,0,1,r,0)},e.Y_AXIS_SYMMETRY=function(r){return r===void 0&&(r=0),g(r),T(1,0,0,-1,0,r)},e.A_TO_C=function(){return y(function(r,s,a){return h.ARC===r.type?function(o,m,u){var i,O,p,M;o.cX||K(o,m,u);for(var A=Math.min(o.phi1,o.phi2),I=Math.max(o.phi1,o.phi2)-A,x=Math.ceil(I/90),l=new Array(x),D=m,N=u,f=0;fm.maxX&&(m.maxX=E),Em.maxY&&(m.maxY=E),EC&&M(ar(i,p.x1,p.x2,p.x,C));for(var l=0,D=tr(O,p.y1,p.y2,p.y);lC&&A(ar(O,p.y1,p.y2,p.y,C))}if(p.type&h.ARC){M(p.x),A(p.y),K(p,i,O);for(var N=p.xRot/180*Math.PI,f=Math.cos(N)*p.rX,R=Math.sin(N)*p.rX,S=-Math.sin(N)*p.rY,Q=Math.cos(N)*p.rY,L=p.phi1p.phi2?[p.phi2+360,p.phi1+360]:[p.phi2,p.phi1],U=L[0],F=L[1],Z=function(E){var b=E[0],q=E[1],j=180*Math.atan2(q,b)/Math.PI;return jU&&CU&&Co)throw new SyntaxError('Expected positive number, got "'+o+'" at index "'+_+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+_+'"')}this.curArgs.push(o),this.curArgs.length===ur[this.curCommandType]&&(h.HORIZ_LINE_TO===this.curCommandType?T({type:h.HORIZ_LINE_TO,relative:this.curCommandRelative,x:o}):h.VERT_LINE_TO===this.curCommandType?T({type:h.VERT_LINE_TO,relative:this.curCommandRelative,y:o}):this.curCommandType===h.MOVE_TO||this.curCommandType===h.LINE_TO||this.curCommandType===h.SMOOTH_QUAD_TO?(T({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),h.MOVE_TO===this.curCommandType&&(this.curCommandType=h.LINE_TO)):this.curCommandType===h.CURVE_TO?T({type:h.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===h.SMOOTH_CURVE_TO?T({type:h.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===h.QUAD_TO?T({type:h.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===h.ARC&&T({type:h.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(!mr(r))if(r===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(r!=="+"&&r!=="-"&&r!==".")if(a)this.curNumber=r,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+_+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+r+'" at index '+_+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,r!=="z"&&r!=="Z")if(r==="h"||r==="H")this.curCommandType=h.HORIZ_LINE_TO,this.curCommandRelative=r==="h";else if(r==="v"||r==="V")this.curCommandType=h.VERT_LINE_TO,this.curCommandRelative=r==="v";else if(r==="m"||r==="M")this.curCommandType=h.MOVE_TO,this.curCommandRelative=r==="m";else if(r==="l"||r==="L")this.curCommandType=h.LINE_TO,this.curCommandRelative=r==="l";else if(r==="c"||r==="C")this.curCommandType=h.CURVE_TO,this.curCommandRelative=r==="c";else if(r==="s"||r==="S")this.curCommandType=h.SMOOTH_CURVE_TO,this.curCommandRelative=r==="s";else if(r==="q"||r==="Q")this.curCommandType=h.QUAD_TO,this.curCommandRelative=r==="q";else if(r==="t"||r==="T")this.curCommandType=h.SMOOTH_QUAD_TO,this.curCommandRelative=r==="t";else{if(r!=="a"&&r!=="A")throw new SyntaxError('Unexpected character "'+r+'" at index '+_+".");this.curCommandType=h.ARC,this.curCommandRelative=r==="a"}else n.push({type:h.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=r,this.curNumberHasDecimal=r==="."}else this.curNumber+=r,this.curNumberHasDecimal=!0;else this.curNumber+=r;else this.curNumber+=r,this.curNumberHasExp=!0;else this.curNumber+=r,this.curNumberHasExpDigits=this.curNumberHasExp}return n},t.prototype.transform=function(c){return Object.create(this,{parse:{value:function(n,y){y===void 0&&(y=[]);for(var T=0,_=Object.getPrototypeOf(this).parse.call(this,n);T<_.length;T++){var r=_[T],s=c(r);Array.isArray(s)?y.push.apply(y,s):y.push(s)}return y}}})},t}(nr),h=function(e){function t(c){var n=e.call(this)||this;return n.commands=typeof c=="string"?t.parse(c):c,n}return k(t,e),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var c=v.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(c),c},t.prototype.transform=function(c){for(var n=[],y=0,T=this.commands;y