!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(u){"use strict";var h="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function p(t,e,n,r,i){!function t(e,n,r,i,a){for(;r=t.minX&&e.maxY>=t.minY}function q(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function $(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(p(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(V(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;athis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=q(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,I(n,this.toBBox),I(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=q([t,e]),this.data.height=t.height+1,this.data.leaf=!1,I(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=B(t,0,c,this.toBBox),h=B(t,c,n,this.toBBox),f=(i=u,f=h,d=o=a=void 0,a=Math.max(i.minX,f.minX),o=Math.max(i.minY,f.minY),d=Math.min(i.maxX,f.maxX),i=Math.min(i.maxY,f.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=W(u)+W(h);f=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0=de[n]&&("m"===n&&2=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ve(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var we=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Me(t){var o,s,l,c;return ge(t)?oe(t):(t=function(t){if(pe(t))return oe(t);var e=new we(t);for(be(e);e.index>0)/Math.pow(10,9)),x=Math.asin(((l-y)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=tu&&(m=x,g=s,a=l,x=b+u*(o&&bg[2]&&(O=(p-s)/(p-g[2]),v={x:m[0]*(1-O)+g[0]*O,y:m[1]*(1-O)+g[1]*O}),g=[f,d,p];return{length:p,point:v=h&&p<=s?{x:a,y:o}:v,min:{x:Math.min.apply(null,y.map(function(t){return t.x})),y:Math.min.apply(null,y.map(function(t){return t.y}))},max:{x:Math.max.apply(null,y.map(function(t){return t.x})),y:Math.max.apply(null,y.map(function(t){return t.y}))}}}function Ne(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,h=void 0===u||u,u=c.length,f=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,m=e,v=0,y=[g,m,v],b=[g,m],x={x:0,y:0},w=[{x:g,y:m}];p&&l<=0&&(x={x:g,y:m});for(var M,k,E,O,S,_,A,T,P,L,C=0;C<=d;C+=1)M=t,k=e,E=n,O=r,S=i,_=a,A=o,T=s,L=void 0,L=1-(P=C/d),g=(M={x:Math.pow(L,3)*M+3*Math.pow(L,2)*P*E+3*L*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(L,3)*k+3*Math.pow(L,2)*P*O+3*L*Math.pow(P,2)*_+Math.pow(P,3)*T}).x,m=M.y,h&&w.push({x:g,y:m}),f&&(v+=_e(b,[g,m])),b=[g,m],p&&l<=v&&l>y[2]&&(E=(v-l)/(v-y[2]),x={x:b[0]*(1-E)+y[0]*E,y:b[1]*(1-E)+y[1]*E}),y=[g,m,v];return{length:v,point:x=p&&v<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function je(t,e,n,r,i,a,o,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,f="number"==typeof o,d=t,p=e,g=0,m=[d,p,g],v=[d,p],y={x:0,y:0},b=[{x:d,y:p}];f&&o<=0&&(y={x:d,y:p});for(var x,w,M,k,E,O,S,_,A=0;A<=h;A+=1)x=t,w=e,M=n,k=r,E=i,O=a,_=void 0,_=1-(S=A/h),d=(x={x:Math.pow(_,2)*x+2*_*S*M+Math.pow(S,2)*E,y:Math.pow(_,2)*w+2*_*S*k+Math.pow(S,2)*O}).x,p=x.y,c&&b.push({x:d,y:p}),u&&(g+=_e(v,[d,p])),v=[d,p],f&&o<=g&&o>m[2]&&(M=(g-o)/(g-m[2]),y={x:v[0]*(1-M)+m[0]*M,y:v[1]*(1-M)+m[1]*M}),m=[d,p,g];return{length:g,point:y=f&&g<=o?{x:i,y:a}:y,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Re(t,e,n){for(var r,i,a,o=ke(t),s="number"==typeof e,l=[],c=0,u=0,h=0,f=0,d=[],p=[],g=0,m={x:0,y:0},v=m,y=m,b=m,x=0,w=0,M=o.length;w>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Tn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Tn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yn.exec(t))?new Pn(e[1],e[2],e[3],1):(e=bn.exec(t))?new Pn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xn.exec(t))?Tn(e[1],e[2],e[3],e[4]):(e=wn.exec(t))?Tn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Mn.exec(t))?jn(e[1],e[2]/100,e[3]/100,1):(e=kn.exec(t))?jn(e[1],e[2]/100,e[3]/100,e[4]):En.hasOwnProperty(t)?An(En[t]):"transparent"===t?new Pn(NaN,NaN,NaN,0):null}function An(t){return new Pn(t>>16&255,t>>8&255,255&t,1)}function Tn(t,e,n,r){return new Pn(t=r<=0?e=n=NaN:t,e,n,r)}function Pn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ln(){return"#"+Nn(this.r)+Nn(this.g)+Nn(this.b)}function Cn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Nn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function jn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new In(t,e,n,r)}function Rn(t){var e,n,r,i,a,o,s,l;return t instanceof In?new In(t.h,t.s,t.l,t.opacity):(t=t instanceof mn?t:_n(t))?t instanceof In?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n=i=i||{}).COORDINATE="",n.COLOR="",n.PAINT="",n.NUMBER="",n.ANGLE="",n.OPACITY_VALUE="",n.SHADOW_BLUR="",n.LENGTH="",n.PERCENTAGE="",n.LENGTH_PERCENTAGE=" | ",n.LENGTH_PERCENTAGE_12="[ | ]{1,2}",n.LENGTH_PERCENTAGE_14="[ | ]{1,4}",n.LIST_OF_POINTS="",n.PATH="",n.FILTER="",n.Z_INDEX="",n.OFFSET_DISTANCE="",n.DEFINED_PATH="",n.MARKER="",n.TRANSFORM="",n.TRANSFORM_ORIGIN="",n.TEXT="",n.TEXT_TRANSFORM="",(r=g=g||{})[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",(e=yr=yr||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=br=br||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(r=xr=xr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo";function Nr(t){var e=1;switch(t){case g.kPixels:case g.kDegrees:case g.kSeconds:break;case g.kMilliseconds:e=.001;break;case g.kRadians:e=180/Math.PI;break;case g.kGradians:e=.9;break;case g.kTurns:e=360}return e}function jr(t){switch(t){case g.kNumber:case g.kInteger:return"";case g.kPercentage:return"%";case g.kEms:return"em";case g.kRems:return"rem";case g.kPixels:return"px";case g.kDegrees:return"deg";case g.kRadians:return"rad";case g.kGradians:return"grad";case g.kMilliseconds:return"ms";case g.kSeconds:return"s";case g.kTurns:return"turn"}return""}var Rr,Ir,Br=[{name:"em",unit_type:g.kEms},{name:"px",unit_type:g.kPixels},{name:"deg",unit_type:g.kDegrees},{name:"rad",unit_type:g.kRadians},{name:"grad",unit_type:g.kGradians},{name:"ms",unit_type:g.kMilliseconds},{name:"s",unit_type:g.kSeconds},{name:"rem",unit_type:g.kRems},{name:"turn",unit_type:g.kTurns}],Dr=((e=Rr=Rr||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return Br.find(function(t){return t.name===e}).unit_type}),n=function(){function t(){}t.isAngle=function(t){return t===g.kDegrees||t===g.kRadians||t===g.kGradians||t===g.kTurns},t.isLength=function(t){return t>=g.kEms&&t=Rr.kUnitType&&this.getType()<=Rr.kClampType},t}(),r=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}_r(t,n);var e=t.prototype;return e.getType=function(){return Rr.kColorType},e.to=function(t){return this},t}(n),Fr=((e=Ir=Ir||{})[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}_r(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Rr.kColorType},t}(n)),zr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}_r(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Rr.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);function Gr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;nd[1][2]&&(a[0]=-a[0]),d[0][2]>d[2][0]&&(a[1]=-a[1]),d[1][0]>d[0][1]&&(a[2]=-a[2])}}function Ni(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var ji=J();function Ri(t,l){var c,u;return t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new Ls({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[Zr,Zr],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[Zr],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[Zr],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[Zr],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[Zr,Zr,Zr],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Qr],l.rotateLocal(0,0,Ja(o[0]))):"rotatex"===s?(o=t||[Qr],l.rotateLocal(Ja(o[0]),0,0)):"rotatey"===s?(o=t||[Qr],l.rotateLocal(0,Ja(o[0]),0)):"rotatez"===s?(o=t||[Qr],l.rotateLocal(0,0,Ja(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(ki(o[0]),ki(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(ki(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],ki(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(ot(ji,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(ot.apply(Tt,[ji].concat(t.map(function(t){return t.value}))),ji[12]+=c,ji[13]+=u,l.setLocalTransform(ji)))})),l.getLocalTransform()}Ii={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},Bi="";var Ii,Bi,E,Di=function(t){return Bi=t,zi()};function Fi(t){throw new Error(Bi+": "+t)}function zi(){var t=Ki(Gi);return 0Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function la(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}(r=E=E||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh";function ca(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=ki(r=Qe(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=ua({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=ua(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0=u[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(f,d):t)[0])!==Ie(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):oe(t[0]);return[f,(i=t[1],a=f,c=i.length-1,u=[],h=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=_e(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function mo(t,e){var n,r,i=Ue(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=fr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Wn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}function vo(t,e){return[t.points,e.points,function(t){return t}]}var yo=null;function bo(t){return function(e){var n=0;return t.map(function(t){return t===yo?e[n++]:t})}}function xo(t){return t}var wo={matrix:["NNNNNN",[yo,yo,0,0,yo,yo,0,0,0,0,1,0,yo,yo,0,1],xo],matrix3d:["NNNNNNNNNNNNNNNN",xo],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",bo([yo,yo,new Kr(1)]),xo],scalex:["N",bo([yo,new Kr(1),new Kr(1)]),bo([yo,new Kr(1)])],scaley:["N",bo([new Kr(1),yo,new Kr(1)]),bo([new Kr(1),yo])],scalez:["N",bo([new Kr(1),new Kr(1),yo])],scale3d:["NNN",xo],skew:["Aa",null,xo],skewx:["A",null,bo([yo,Qr])],skewy:["A",null,bo([Qr,yo])],translate:["Tt",bo([yo,yo,Zr]),xo],translatex:["T",bo([yo,Zr,Zr]),bo([yo,Zr])],translatey:["T",bo([Zr,yo,Zr]),bo([Zr,yo])],translatez:["L",bo([Zr,Zr,yo])],translate3d:["TTL",xo]};function Mo(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=wo[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new m,i=[0,0,0],n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=[0,0,0],i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?vi([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?vi([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},m}(),Ko=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||M(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Dt(t,this.normal)-this.distance},e.normalize=function(){var t=1/Vt(this.normal);It(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&zt(n,t,e,r),i},t}(),Zo=((ts=Fo=Fo||{})[ts.OUTSIDE=4294967295]="OUTSIDE",ts[ts.INSIDE=0]="INSIDE",ts[ts.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Ko)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Nt(this.planes[0].normal,i-e,l-a,f-c),this.planes[0].distance=t-d,Nt(this.planes[1].normal,i+e,l+a,f+c),this.planes[1].distance=t+d,Nt(this.planes[2].normal,i+n,l+o,f+u),this.planes[2].distance=t+p,Nt(this.planes[3].normal,i-n,l-o,f-u),this.planes[3].distance=t-p,Nt(this.planes[4].normal,i-r,l-s,f-h),this.planes[4].distance=t-g,Nt(this.planes[5].normal,i+r,l+s,f+h),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Qo=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Jo=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),ts=function(){function t(){this.parser=po,this.parserWithCSSDisabled=po,this.mixer=go}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof zr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Jo(0,0,0,0)}:n},e.postProcessor=function(t,e){var n;t.nodeName===E.PATH&&-1===e.indexOf("transform")&&(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(void 0===n?0:n,void 0===e?0:e))},t}(),es=function(){function t(){this.parser=mo,this.mixer=vo}return t.prototype.postProcessor=function(t,e){var n;t.nodeName!==E.POLYGON&&t.nodeName!==E.POLYLINE||-1!==e.indexOf("transform")||(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(n,e))},t}(),ns=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),s=e)}),Wn.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=Gt(v(),M(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Qo(a[0],a[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}(Xs),Qs=["style"],Js=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,Qs);return n.call(this,f({type:E.RECT,style:A.enableCSSParsing?f({x:"",y:"",width:"",height:"",radius:""},e):f({},e)},t))||this}return _r(t,n),t}(Ls),tl=["style"],el=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Tr(t,tl);return n.call(this,f({type:E.TEXT,style:A.enableCSSParsing?f({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:"",isBillboard:!1,sizeAttenuation:!0},e):f({fill:"black"},e),initialParsedStyle:A.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0,isBillboard:!1,sizeAttenuation:!0}},t))||this}_r(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(Ls),nl=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:i.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:i.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:i.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:i.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:i.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:i.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:i.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:i.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:i.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:i.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:i.FILTER},{n:"clipPath",syntax:i.DEFINED_PATH},{n:"textPath",syntax:i.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:i.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"center":t===E.TEXT?"text-anchor":"left top"},l:!0,syntax:i.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:i.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:i.COORDINATE},{n:"cy",int:!0,d:"0",syntax:i.COORDINATE},{n:"cz",int:!0,d:"0",syntax:i.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:i.COORDINATE},{n:"y",int:!0,d:"0",syntax:i.COORDINATE},{n:"z",int:!0,d:"0",syntax:i.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:i.COORDINATE},{n:"y1",int:!0,l:!0,syntax:i.COORDINATE},{n:"z1",int:!0,l:!0,syntax:i.COORDINATE},{n:"x2",int:!0,l:!0,syntax:i.COORDINATE},{n:"y2",int:!0,l:!0,syntax:i.COORDINATE},{n:"z2",int:!0,l:!0,syntax:i.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:i.PATH,p:50},{n:"points",int:!0,l:!0,syntax:i.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:i.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:i.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:i.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:i.NUMBER,d:function(t){return t===E.PATH||t===E.POLYGON||t===E.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:i.MARKER},{n:"markerEnd",syntax:i.MARKER},{n:"markerMid",syntax:i.MARKER},{n:"markerStartOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"}],rl=nl.filter(function(t){return!!t.l}).map(function(t){return t.n}),il={},al=new WeakMap,bs=function(){function t(){var e=this;nl.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){il[t]=e})},e.unregisterMetadata=function(t){delete il[t]},e.getPropertySyntax=function(t){return A.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,e,t){var r=this;if(void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),A.enableCSSParsing){var i=t,a=i.skipUpdateAttribute,o=i.skipParse,s=i.forceUpdateGeometry,i=i.usedAttributes,l=s,c=Object.keys(e);c.forEach(function(t){a||(n.attributes[t]=e[t]),!l&&null!=(t=il[t])&&t.l&&(l=!0)}),o||c.forEach(function(t){n.computedStyle[t]=r.parseProperty(t,n.attributes[t],n)}),(c=null!=i&&i.length?Array.from(new Set(c.concat(i))):c).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=r.computeProperty(t,n.computedStyle[t],n))}),l&&this.updateGeometry(n),c.forEach(function(t){t in n.parsedStyle&&r.postProcessProperty(t,n,c)}),A.enableCSSParsing&&n.children.length&&c.forEach(function(e){e in n.parsedStyle&&r.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}else{Object.assign(n.attributes,e);var s=Object.keys(e),o=n.parsedStyle.clipPath,i=n.parsedStyle.offsetPath,u=(n.parsedStyle=Object.assign(n.parsedStyle,e),!!t.forceUpdateGeometry);if(!u)for(var h=0;h"].calculator(null,null,{value:e.textTransform},n,null),e.clipPath&&A.CSSPropertySyntaxFactory[""].calculator("clipPath",o,e.clipPath,n,this),e.offsetPath&&A.CSSPropertySyntaxFactory[""].calculator("offsetPath",i,e.offsetPath,n,this),e.anchor&&(n.parsedStyle.anchor=to(e.anchor,2)),e.transform&&(n.parsedStyle.transform=Mo(e.transform)),e.transformOrigin&&(n.parsedStyle.transformOrigin=jo(e.transformOrigin)),e.markerStart&&(n.parsedStyle.markerStart=A.CSSPropertySyntaxFactory[""].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(n.parsedStyle.markerEnd=A.CSSPropertySyntaxFactory[""].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(n.parsedStyle.markerMid=A.CSSPropertySyntaxFactory[""].calculator("",e.markerMid,e.markerMid,null,null)),(n.nodeName!==E.CIRCLE&&n.nodeName!==E.ELLIPSE||_(e.cx)&&_(e.cy))&&(n.nodeName!==E.RECT&&n.nodeName!==E.IMAGE&&n.nodeName!==E.GROUP&&n.nodeName!==E.HTML&&n.nodeName!==E.TEXT&&n.nodeName!==E.MESH||_(e.x)&&_(e.y)&&_(e.z))&&(n.nodeName!==E.LINE||_(e.x1)&&_(e.y1)&&_(e.z1)&&_(e.x2)&&_(e.y2)&&_(e.z2))||A.CSSPropertySyntaxFactory[""].postProcessor(n,s),_(e.zIndex)||A.CSSPropertySyntaxFactory[""].postProcessor(n,s),e.path&&A.CSSPropertySyntaxFactory[""].postProcessor(n,s),e.points&&A.CSSPropertySyntaxFactory[""].postProcessor(n,s),_(e.offsetDistance)||A.CSSPropertySyntaxFactory[""].postProcessor(n,s),e.transform&&A.CSSPropertySyntaxFactory[""].postProcessor(n,s),u&&this.updateGeometry(n)}},e.parseProperty=function(t,e,n){var r,t=il[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=$r(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1>>1;hi(t[i],e)<0?n=1+i:r=i}return n}(r.sorted,t),r.sorted.splice(e,0,t))}):r.sorted=n.childNodes.slice().sort(hi)},e.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(ol.DISPLAY_OBJECT_CHANGED)},t}()),bl=/\[\s*(.*)=(.*)\s*\]/,xl=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(bl),e="",n="";return t&&2pc&&++y=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),dc=4,pc=1e-7,gc=10,mc="function"==typeof Float32Array,vc=function(t,e){return 1-3*e+3*t},yc=function(t,e){return 3*e-6*t},bc=function(t){return 3*t},xc=function(t,e,n){return((vc(e,n)*t+yc(e,n))*t+bc(e))*t},wc=function(t,e,n){return 3*vc(e,n)*t*t+2*yc(e,n)*t+bc(e)},Wo=ql(.42,0,1,1),Mc={steps:ic,"step-start":function(t){return ic(t,[1,"start"])},"step-end":function(t){return ic(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":ac,ease:function(t){return ac(t,[.25,.1,.25,1])},in:Wo,out:oc(Wo),"in-out":sc(Wo),"out-in":lc(Wo),"in-quad":$l,"out-quad":oc($l),"in-out-quad":sc($l),"out-in-quad":lc($l),"in-cubic":Ul,"out-cubic":oc(Ul),"in-out-cubic":sc(Ul),"out-in-cubic":lc(Ul),"in-quart":Xl,"out-quart":oc(Xl),"in-out-quart":sc(Xl),"out-in-quart":lc(Xl),"in-quint":Kl,"out-quint":oc(Kl),"in-out-quint":sc(Kl),"out-in-quint":lc(Kl),"in-expo":Zl,"out-expo":oc(Zl),"in-out-expo":sc(Zl),"out-in-expo":lc(Zl),"in-sine":Ql,"out-sine":oc(Ql),"in-out-sine":sc(Ql),"out-in-sine":lc(Ql),"in-circ":Jl,"out-circ":oc(Jl),"in-out-circ":sc(Jl),"out-in-circ":lc(Jl),"in-back":tc,"out-back":oc(tc),"in-out-back":sc(tc),"out-in-back":lc(tc),"in-bounce":ec,"out-bounce":oc(ec),"in-out-bounce":sc(ec),"out-in-bounce":lc(ec),"in-elastic":nc,"out-elastic":oc(nc),"in-out-elastic":sc(nc),"out-in-elastic":lc(nc),spring:rc,"spring-in":rc,"spring-out":oc(rc),"spring-in-out":sc(rc),"spring-out-in":lc(rc)},kc=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function Ec(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var $o="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Oc=new RegExp("cubic-bezier\\("+$o+","+$o+","+$o+","+$o+"\\)"),Sc=/steps\(\s*(\d+)\s*\)/,_c=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Ac(t){var e=Oc.exec(t);return e?ql.apply(void 0,e.slice(1).map(Number)):(e=Sc.exec(t))?Ec(Number(e[1]),0):(e=_c.exec(t))?Ec(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):Mc[kc(t)]||Mc.linear}function Tc(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var Pc=0,Lc=1,Cc=2,Nc=3;function jc(t,e,n){c=t,i=n;var r,i,a,o,s,l=null===(l=e)?Pc:(r=i.endTime,l=Math.min(i.delay+c+i.endDelay,r)?Cc:Nc),c=function(t,e,n,r,i){switch(r){case Lc:return"backwards"===e||"both"===e?0:null;case Nc:return n-i;case Cc:return"forwards"===e||"both"===e?t:null;case Pc:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,o=c,s=n.iterationStart,0===r?t!==Lc&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=l,a=n.iterations,c=c,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==Cc||0===a||0===c&&0!==i?o:1,s=n.iterations,a=e,c=t,i=l===Cc&&s===1/0?1/0:1===a?Math.floor(c)-1:Math.floor(c),o=n.direction,t=i,l=e,a="normal"===(s="normal"!==(s=o)&&"reverse"!==o&&(t=t,"alternate-reverse"===o&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?l:1-l,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function Rc(t,e,n){var a=function(t,e){for(var n={},r=0;r=t.applyFrom&&it.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[n++]}};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 du=v(),pu=v(),gu=v(),mu=J(),vu=function(){function s(){var s=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r,i){var a=s.pointInPathPickerFactory[t.nodeName];if(a){var n=ct(mu,n),e=Gt(pu,Nt(gu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,o=t.parsedStyle.anchor;if(e[0]+=(o&&o[0]||0)*n[0]*2,e[1]+=(o&&o[1]||0)*n[1]*2,a(t,new Qo(e[0],e[1]),r,s.isPointInPath,i))return!0}return!1},this.isPointInPath=function(t,e,n){var t=t.offscreenCanvas.getOrCreateContext(s.canvasConfig.offscreenCanvas),r=s.pathGeneratorFactory[e.nodeName];return r&&(t.beginPath(),r(t,e.parsedStyle),t.closePath()),t.isPointInPath(n.x,n.y)}}var t=s.prototype;return t.apply=function(t,n){var r=this,e=t.config,i=t.renderingService,a=t.renderingContext,o=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,l=(this.canvasConfig=e,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=t,null==(e=a.root)?void 0:e.ownerDocument);i.hooks.pick.tapPromise(s.tag,function(){s=lu().mark(function t(e){return lu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(l,e,n));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){cu(r,e,n,i,a,"next",t)}function a(t){cu(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),i.hooks.pickSync.tap(s.tag,function(t){return r.pick(l,t,n)})},t.pick=function(t,e,n){for(var r=e.topmost,i=e.position,a=i.x,i=i.y,o=Nt(du,a,i,0),s=[],l=fu(t.elementsFromBBox(o[0],o[1],o[0],o[1]));!(c=l()).done;){var c=c.value,u=c.getWorldTransform();if(this.isHit(c,o,u,!1,n)){u=fi(c);if(u){u=u.parsedStyle.clipPath;if(this.isHit(u,o,u.getWorldTransform(),!0,n)){if(r)return e.picked=[c],e;s.push(c)}}else{if(r)return e.picked=[c],e;s.push(c)}}}return e.picked=s,e},s}();function yu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function bu(t,e){return Math.abs(t-e)<.001}function xu(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function wu(t){return(t+2*Math.PI)%(2*Math.PI)}vu.tag="CanvasPicker";var Mu={box:function(t,e,n,r){return xu([t,n],[e,r])},length:yu,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?yu(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)[["cartesian"]],Xh=(Uh.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),Kh=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Xh(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},Zh=(Kh.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),Qh=(Zh.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Jh=(Qh.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...Qh(),...Kh({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),tf=(Jh.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),ef=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=tf(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Kh({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},nf=(ef.props={},()=>[["parallel",0,1,0,1]]),rf=(nf.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]]),af=(rf.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...nf(),...Kh({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),of=(af.props={},({value:e})=>t=>t.map(()=>e)),sf=(of.props={},({value:e})=>t=>t.map(e)),lf=(sf.props={},({value:e})=>t=>t.map(t=>t[e])),cf=(lf.props={},({value:t})=>()=>t);function uf(t,e){return t.parent===e.parent?1:2}function hf(t,e){return t+e.x}function ff(t,e){return Math.max(t,e.y)}function df(){var s=uf,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(hf,0)/e.length,t.y=1+n.reduce(ff,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function pf(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function gf(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=vf)):void 0===e&&(e=mf);for(var n,r,i,a,o,t=new xf(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new xf(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(bf)}function mf(t){return t.children}function vf(t){return Array.isArray(t)?t[1]:null}function yf(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function bf(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function xf(t){this.data=t,this.depth=this.height=0,this.parent=null}function wf(t){return null==t?null:Mf(t)}function Mf(t){if("function"!=typeof t)throw new Error;return t}function kf(){return 0}function Ef(t){return function(){return t}}cf.props={},xf.prototype=gf.prototype={constructor:xf,count:function(){return this.eachAfter(pf)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r(t=(1664525*t+1013904223)%Of)/Of}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Ff(n)).eachAfter(zf(a,.5,e)).eachBefore(Gf(1)):t.eachBefore(Ff(Bf)).eachAfter(zf(kf,1,e)).eachAfter(zf(a,t.r/Math.min(r,i),e)).eachBefore(Gf(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=wf(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Ef(+t),e):a},e}function Ff(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function zf(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n{t=m(t,e,n),e=(t=""+t).length;return"/"===(t=Zf(t,e-1)&&!Zf(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Kf);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Kf(r)),c.push(qf));u=(t,e)=>p[e],h=(t,e)=>g[e]}for(r=0,e=c.length;rn.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:f(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function h(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,h=s.m;o=td(o),i=Jf(i),o&&i;)s=Jf(s),(a=td(a)).a=t,0<(r=o.z+u-i.z-l+f(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,h+=s.m,c+=a.m;o&&!td(a)&&(a.t=o,a.m+=u-c),i&&!Jf(s)&&(s.t=i,s.m+=l-h,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function rd(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s>>1;m[f]{const n=d?gd(l,a[e]):0;var r=p?gd(c,o[e]):0,e=g&&s?(gd(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function vd(t){return parseFloat(t)/100}function yd(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?vd(e)*o:+e,"string"==typeof t?vd(t)*s:+t]]})]}function bd(e){return"function"==typeof e?e:t=>t[e]}function xd(t,e){return Array.from(t,bd(e))}function wd(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=xd(t,e),o=xd(t,n),s=xd(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Md(t,e){return t.getBandWidth(t.invert(e))}const kd=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[h]=i.getSize(),f=r?r.map(t=>+t/h):null,d=r?(t,e,n)=>{t+=e/2,e=f[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Md(c,a[t]),n=e*(u?Md(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};kd.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...pd(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...fd()],interaction:{shareTooltip:!0}};const Ed=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function Od(t,e){return null==t||null==e?NaN:t>>1;o(t[i],e)<0?n=1+i:r=i}while(nOd(n(t),e),(t,e)=>n(t)-e):(a=n===Od||n===function(t,e){return null==t||null==e?NaN:e-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n>>1;o(t[i],e)<=0?n=1+i:r=i}while(n=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Nd(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1=t&&(r=i=t):(r>t&&(r=t),i=a&&(r=i=a):(r>a&&(r=a),i=f.length)return h(e);var r=new Id,i=f[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Yd(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1e),1e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Vd(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Vd(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Hd(n))}function Hd(r=Od){if(r===Od)return Vd;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Vd(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(tt}const Ud=Math.sqrt(50),Xd=Math.sqrt(10),Kd=Math.sqrt(2);function Zd(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=Ud?10:r>=Xd?5:r>=Kd?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/se&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*se&&--o),o=l)if(l<=o&&y===jd){const n=Qd(s,l,u);isFinite(n)&&(0l;)--d;(f||d=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r=i)&&(r=i)}return r}function np(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n=a)&&(n=a,r=i);return r}function rp(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function ip(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function ap(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?Vd:Hd(o);i=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?rp(t):1<=e?ep(t):(n=(n-1)*e,(r=ep(ap(t,e=Math.floor(n)).subarray(0,e+1)))+(rp(t.subarray(e+1))-r)*(n-e))}function lp(n,t,r=Ad){var i,e,a;if(!isNaN(t=+t))return i=Float64Array.from(n,(t,e)=>Ad(r(n[e],e,n))),t<=0?ip(i):1<=t?np(i):(e=Uint32Array.from(n,(t,e)=>e),a=i.length-1,ap(e,t=Math.floor(a*t),0,a,(t,e)=>Vd(i[t],i[e])),0<=(t=function(e,n){let r,i=!1;if(1===n.length){let t;for(const o of e){var a=n(o);(i?0i[t]))?t:-1)}function cp(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function up(t,e){return sp(t,.5,e)}function hp(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function fp(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++rt).filter(t=>"transpose"===t).length%2!=0}function gp(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function mp(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function vp(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function yp(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function bp(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function xp(t){return vp(t)||gp(t)}function wp(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function Mp(t,e=!0){var t=t.getOptions()["transformations"],[,t,n]=t.find(t=>"polar"===t[0]);return e?[180*+t/Math.PI,180*+n/Math.PI]:[t,n]}const kp=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Fd(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]).filter(t=>void 0!==t);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Ep=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t(t,e,n,r)=>{return(yp(r)?Ep:kp)(t,e,n,r)};Op.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...pd(),{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...fd(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Sp=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[h,f]=o.getSize(),d=md(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/h,r=r/f,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Sp.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...pd(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[{type:"maybeSize"},...hd()]};const _p=s=>{var{cartesian:t=!1}=s;return t?yd:(t,e,n,r)=>{const{x:i,y:a}=n,o=md(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};_p.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...pd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hd()]};const Ap=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Ap.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...pd(),{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...hd()]};const Tp=()=>(t,e,n,a)=>{var r;const{x:o,y:s,y1:l,series:i}=n;var{x:n,y:e}=e,t=i?Array.from(Fd(t,t=>i[t]).values()):[t],c=t.map(t=>t[0]).filter(t=>void 0!==t);const u=((null==(r=null==n?void 0:n.getBandWidth)?void 0:r.call(n))||0)/2,h=((null==(r=null==e?void 0:e.getBandWidth)?void 0:r.call(e))||0)/2;return[c,Array.from(t,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=md(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Pp.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd(),{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...hd()]};const Lp=s=>{var t=s["cartesian"];return t?yd:(t,e,n,r)=>{const{x:i,y:a}=n,o=md(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Lp.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...pd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hd()]};const Cp=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:h,y3:f,y4:d,series:p}=n,g=e.x,m=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(m?m.getBandWidth(m.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+h[t],+f[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},jp=(Np.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...pd(),{type:"maybeZeroX"}],postInference:[...fd()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});jp.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...pd()],postInference:[...hd()]};const Rp=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Rp.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["line"]}),{name:"y",required:!0}],preInference:[...pd(),{type:"maybeTupleY"}],postInference:[]};const Ip=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Ip.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["line"]}),{name:"x",required:!0}],preInference:[...pd(),{type:"maybeTupleX"}],postInference:[]};const Bp=(...t)=>Pp(...t);function Dp(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Fp(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=Dp("x",r,n,e.x),o=Dp("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Bp.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd()],postInference:[]};const zp=()=>Fp();zp.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd()],postInference:[]};const Gp=()=>Fp({extendY:!0});Gp.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...dd({shapes:["range"]}),{name:"x",required:!0}],preInference:[...pd()],postInference:[]};const Wp=()=>Fp({extendX:!0});function Yp(t){return t.target.depth}function Hp(t,e){return t.sourceLinks.length?t.depth:e-1}function Vp(t){return function(){return t}}function qp(t,e){return Up(t.source,e.source)||t.index-e.index}function $p(t,e){return Up(t.target,e.target)||t.index-e.index}function Up(t,e){return t.y0-e.y0}function Xp(t){return t.value}function Kp(t){return t.index}function Zp(t){return t.nodes}function Qp(t){return t.links}function Jp(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function t0({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function e0(){let x=0,w=0,M=1,k=1,E=24,O=8,S,_=Kp,A=Hp,T,P,L,C=Zp,N=Qp,j=6;function e(e){e={nodes:C(e),links:N(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=Jp(g,n)),"object"!=typeof r&&(r=t.target=Jp(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const m of t)m.value=void 0===m.fixedValue?Math.max(dp(m.sourceLinks,Xp),dp(m.targetLinks,Xp)):m.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max(ep(a,t=>t.depth)+1,0);for(let t=0;t{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(ep(t,t=>t.depth)+1,0),n=(M-x-E)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+E,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(O,(k-w)/(ep(u,t=>t.length)-1)),u),h=rp(t,t=>(k-w-(t.length-1)*S)/dp(t,Xp));for(const v of t){let e=w;for(const y of v){y.y0=e,y.y1=e+y.value*h,e=y.y1+S;for(const b of y.sourceLinks)b.width=b.value*h}e=(k-e+S)/(v.length+1);for(let t=0;t>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,k,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;nt.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},r0={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?rp(t.sourceLinks,Yp)-1:0},justify:Hp};const i0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},n0,h),l=e0().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?r0[n]||Hp:"function"==c?n:Hp).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function a0(t){return t}function o0(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function s0(t=""){throw new Error(t)}function l0(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function c0(t){return null!=t&&!Number.isNaN(t)}function it(t,e){return u0(t,e)||{}}function u0(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Je(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function h0(t,...n){return Object.fromEntries(Object.entries(t).filter(([e])=>n.every(t=>!e.startsWith(t))))}function f0(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function d0(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function p0(t){return null===t||!1===t}function g0(t,e,n={},r=!1){return p0(t)||Array.isArray(t)&&r?t:(r=it(t,e),rt(n,r))}function m0(t,e={}){return!p0(t)&&!Array.isArray(t)&&v0(t)?rt(e,t):t}function v0(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function y0(t,e){return"object"==typeof t?it(t,e):t}i0.props={};const b0=y=>{const b={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},x={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},w={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},M={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=y,{links:t,nodes:c}=wd(t,e),u=it(e,"node"),e=it(e,"link"),{key:h=t=>t.key,color:f=h}=u,{links:i,nodes:t}=i0(Object.assign(Object.assign(Object.assign({},b),{nodeId:bd(h)}),i))({links:t,nodes:c});const d=it(r,"label"),{text:p=h,spacing:g=5}=d,m=nt(d,["text","spacing"]),v=bd(h);c=g0(l,"node",{title:v,items:[{field:"value"}]},!0),h=g0(l,"link",{title:"",items:[t=>({name:"source",value:v(t.source)}),t=>({name:"target",value:v(t.target)})]});return[rt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:f}),scale:n,style:it(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},M),{text:p,dx:t=>t.x[0]<.5?g:-g}),m),...a],tooltip:c,animate:y0(s,"node"),axis:!1}),rt({},w,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa",strokeWidth:0},it(r,"link")),tooltip:h,animate:y0(s,"link")})]}},x0=(b0.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);x0.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[...pd()],postInference:[]};const w0=t=>t?parseInt(t):0;function M0(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t,p=t=>"auto"===t?30:t;return{width:e-p(r)-p(i)-s-l-h-f,height:t-p(a)-p(n)-c-o-d-u}}function k0(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,h,f,d,n=function(t,e){var n={treemapBinary:od,treemapDice:Yf,treemapSlice:rd,treemapSliceDice:sd,treemapSquarify:ad,treemapResquarify:ld};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?Xf().path(p):Xf():gf)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(m),l=[0],i&&t.eachBefore(Wf),t}function m(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;ie.ignoreParentValue&&t.children?0:bd(r)(t)).sort(e.sort):p.count(),o=ad,i=!1,s=a=1,l=[0],d=f=h=u=c=kf,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=Mf(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Ef(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Ef(+t),g):u},g.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:Ef(+t),g):h},g.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:Ef(+t),g):f},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Ef(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const E0=h=>t=>{var{width:t,height:e}=M0(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=nt(h,["data","encode","scale","style","layout","labels","tooltip"]),u={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=k0(n,rt({},u,o),r),n=it(a,"label");return[rt({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0}),n),...s]},c),{tooltip:m0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},O0=(E0.props={},h=>t=>{var{width:t,height:e}=M0(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=nt(h,["data","encode","scale","style","layout","labels","tooltip"]),u={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(We(t)?Xf().path(e.path):gf)(t);return r?n.sum(t=>bd(r)(t)).sort(e.sort):n.count(),Df().size(e.size).padding(e.padding)(n),n.descendants()})(n,rt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),rt({},u.encode,r)),t=it(a,"label");return[rt({},u,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r}),t),...s]},c),{tooltip:m0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function S0(t,e){return rp(t,t=>e[t])}function _0(t,e){return ep(t,t=>e[t])}function A0(t,e){const n=2.5*T0(t,e)-1.5*L0(t,e);return rp(t,t=>e[t]>=n?e[t]:NaN)}function T0(t,e){return sp(t,.25,t=>e[t])}function P0(t,e){return sp(t,.5,t=>e[t])}function L0(t,e){return sp(t,.75,t=>e[t])}function C0(t,e){const n=2.5*L0(t,e)-1.5*T0(t,e);return ep(t,t=>e[t]<=n?e[t]:NaN)}function N0(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Fd(t,t=>a[+t]).values()).flatMap(t=>{const e=A0(t,i),n=C0(t,i);return t.filter(t=>i[t]n)}),e]}}O0.props={};const j0=h=>()=>{var t,{data:e,encode:n,style:r={},tooltip:i={},animate:a}=h,o=nt(h,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,r=nt(r,["point"]),l=n["y"],l={y:l,y1:l,y2:l,y3:l,y4:l},c={y1:T0,y2:P0,y3:L0},u=g0(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),i=g0(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return s?(s=it(r,"box"),t=it(r,"point"),[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:A0},c),{y4:C0})],encode:Object.assign(Object.assign({},n),l),style:s,tooltip:u,animate:y0(a,"box")},o),{type:"point",data:e,transform:[{type:N0}],encode:n,style:Object.assign({},t),tooltip:i,animate:y0(a,"point")}]):[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:S0},c),{y4:_0})],encode:Object.assign(Object.assign({},n),l),style:r,tooltip:u},o)]},R0=(j0.props={},s=>{var t=s["cartesian"];return t?yd:(t,e,n,r)=>{const{x:i,y:a}=n,o=md(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function I0(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,h,f,d=t._root,p={data:r},g=t._x0,m=t._y0,v=t._x1,y=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=n>=(o=(m+y)/2))?m=o:y=o,!(d=(i=d)[h=u<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+v)/2))?g=a:v=a,(u=n>=(o=(m+y)/2))?m=o:y=o,(h=u<<1|c)==(f=(o<=l)<<1|a<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function B0(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function D0(t){return t[0]}function F0(t){return t[1]}function z0(t,e,n){e=new G0(null==e?D0:e,null==n?F0:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function G0(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function W0(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}R0.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...pd(),{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};Io=z0.prototype=G0.prototype;function Y0(t){return function(){return t}}function H0(t){return 1e-6*(t()-.5)}function V0(t){return t.index}function q0(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function $0(c){var u,h,a,o,f,d,s=V0,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Y0(30),p=1;function e(t){for(var e=0,n=c.length;e[s(t,e,a),t])),i=0;for(o=new Array(e);id||(l=r.y0)>p||(o=r.x1)=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+m)/2))?p=s:m=s,!(f=(e=f)[u=c<<1|l]))return this;if(!f.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,h=u)}for(;f.data!==t;)if(!(f=(r=f).next))return this;(i=f.next)&&delete f.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f)):this._root=i}}return this},Io.removeAll=function(t){for(var e=0,n=t.length;e{}};function X0(){for(var t,e=0,n=arguments.length,r={};ei._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Q0=r);J0=n,gg(a),ag=0}}function pg(){var t=sg.now(),e=t-ig;rg(t=(1664525*t+1013904223)%mg)/mg}();function i(){f(),n.call("tick",a),ot.id}=n,I=(r=Y0(-30),d=(f=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,B()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Y0(+t),B(),g):r},g.distanceMin=function(t){return arguments.length?(f=t*t,g):Math.sqrt(f)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=z0(i,vg,yg).visitAfter(D);for(u=t,e=0;e()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=g;const{nodeKey:c=t=>t.id,linkKey:u=t=>t.id}=e,h=nt(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},h),f=it(e,"node"),d=it(e,"link"),{links:t,nodes:p}=wd(t,e),{nodesData:t,linksData:p}=Mg({links:t,nodes:p},rt({},{joint:!0},i),e),i=g0(l,"link",{items:[t=>({name:"source",value:bd(u)(t.source)}),t=>({name:"target",value:bd(u)(t.target)})]}),e=g0(l,"node",{items:[t=>({name:"key",value:bd(c)(t)})]},!0);return[rt({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:p,encode:d,labels:o,style:it(r,"link"),tooltip:i,animate:y0(s,"link")}),rt({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},f),scale:n,style:it(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),it(r,"label")),...a],animate:y0(s,"link")})]},Eg=(kg.props={},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=gf(t,t=>t.children).sum(t=>t[e]).sort(i),l=h();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),Og=t=>Eg(df)(t),Sg=(Og.props={},t=>Eg(nd)(t)),_g=(Sg.props={},u=>{const h={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},d={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},p={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=u,c=null==e?void 0:e.value,{nodes:i,edges:c}=Sg(Object.assign(Object.assign(Object.assign({},h),i),{field:c}))(t),t=g0(l,"node",{title:"name",items:["value"]},!0),l=g0(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[rt({},d,{data:c,encode:it(e,"link"),scale:it(n,"link"),labels:o,style:Object.assign({stroke:"#999"},it(r,"link")),tooltip:l,animate:y0(s,"link")}),rt({},f,{data:i,scale:it(n,"node"),encode:it(e,"node"),labels:[Object.assign(Object.assign({},p),it(r,"label")),...a],style:Object.assign({},it(r,"node")),tooltip:t,animate:y0(s,"node")})]}});_g.props={};var Ag={},Tg={},Pg=34,Lg=10,Cg=13;function Ng(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function jg(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Rg(t,e){var t=t+"",n=t.length;return n=i?s=!0:(e=r.charCodeAt(a++))===Lg?l=!0:e===Cg&&(l=!0,r.charCodeAt(a)===Lg)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ce(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Bg(i).parse(t,a?Dg:a0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};zg.props={};const Gg=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};Gg.props={};const Wg=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Yg=(Wg.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Yg.props={};const Hg=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};Hg.props={};const Vg=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Vg.props={};const qg=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]i[e]?-1:+(r[e]!==i[e]),0))}},$g=(qg.props={},t=>{const e=t["value"];return()=>e}),Ug=($g.props={},t=>{const{callback:e=a0}=t;return t=>e(t)}),Xg=(Ug.props={},t=>{const{callback:e=a0}=t;return t=>Array.isArray(t)?t.map(e):t});Xg.props={};var Kg=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Zg={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Qg(t){const{y:c,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:g,sourceWeight:m,targetWeight:v,sortBy:y}=Object.assign(Object.assign({},Zg),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=m(t),t.targetWeight=v(t)});const i=Fd(r,t=>t.source),a=Fd(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=dp(e,t=>t.sourceWeight)+dp(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof y?y:Kg[y])&&r.sort(n),!(n=(r=e).length))throw s0("Invalid nodes: it's empty!");if(h){const o=f/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-f),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Fd(e,t=>t.source),l=Fd(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Jg=e=>t=>Qg(e)(t),tm=(Jg.props={},Math.PI/180),em=64,nm=2048;function rm(t){return t.text}function im(){return"serif"}function am(){return"normal"}function om(t){return t.value}function sm(){return 90*~~(2*Math.random())}function lm(){return 1}function cm(){}function um(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(em<<5)/c,nm/c);let i=0,a=0,n=0;var u,h,f,d,e=r.length;for(--s;++s>5<<5,e=~~Math.max(Math.abs(h+f),Math.abs(h-f))):t=t+31>>5<<5,e>n&&(n=e),i+t>=em<<5&&(i=0,a+=n,n=0),a+e>=nm)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*tm),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(em<<5)/c,nm/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var m=o.width,v=m>>5;let n=o.y1-o.y0;for(let t=0;t>5),b=p[(a+e)*(em<<5)+(i+t)<<2]?1<<31-t%32:0;g[y]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*v)}}}function hm(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function fm(t){var e=[];let n=-1;for(;++n>2),t.width=(em<<5)/e,t.height=nm/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||fm((b[0]>>5)*b[1]),c=M.length,u=[],h=M.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=O.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=m.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=v.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let f=-1,d=_.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r>1,i.y=o*(w()+.5)>>1,um(s,i,h,f),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,h;for(;(l=o(c+=s))&&(u=~~l[0],h=~~l[1],!(Math.min(Math.abs(u),Math.abs(h))>=a));)if(t.x=n+u,t.y=r+h,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0e[0].y&&t.y+t.y0>5,p=b[0]>>5,g=t.x-(d<<4),m=127&g,v=32-m,y=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e>>m:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(y.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}_._tags=u,_._bounds=d,f>=c&&(_.stop(),y.call(null,"end",{cloud:_,words:u,bounds:d}))}return k&&clearInterval(k),k=setInterval(n,0),n(),_},_.stop=function(){return k&&(clearInterval(k),k=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=fm((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}_.board=a,_.hasImage=!0}},_.timeInterval=function(t){E=null==t?1/0:t},_.words=function(t){M=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=pm(t)},_.font=function(t){i=pm(t)},_.fontWeight=function(t){g=pm(t)},_.rotate=function(t){m=pm(t)},_.spiral=function(t){x=gm[t]||t},_.fontSize=function(t){p=pm(t)},_.padding=function(t){v=pm(t)},_.random=function(t){w=pm(t)},_.on=function(t){y=pm(t)},_}const vm={size:[500,500],fontSize:[14,28]};function ym(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const bm=f=>h=>ce(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},vm,f),e=mm(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ce(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=h.map(t=>t.value),n=t,t=[rp(e),ep(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",ym,e.createMask),e.words([...h]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=nt(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function xm(e){return"string"==typeof e?t=>t[e]:e}bm.props={};const wm=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=xm(r),l=xm(t),c=zd(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},Mm=(wm.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});Mm.props={};var km,Em,Om,Sm,pl={exports:{}},Yo={exports:{}};function _m(t){return 1-Math.abs(t)}km=(Ho=Yo).exports,Ho.exports.isNumber=function(t){return"number"==typeof t},Ho.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n{const{field:r,groupBy:n,as:e=["y","size"],min:i,max:a,size:o=10,width:s}=t,[l,c]=e;return t=>{return Array.from(Fd(t,e=>n.map(t=>e[t]).join("-")).values()).map(t=>{var e=Am.create(t.map(t=>t[r]),{min:i,max:a,size:o,width:s}),n=e.map(t=>t.x),e=e.map(t=>t.y);return Object.assign(Object.assign({},t[0]),{[l]:n,[c]:e})})}};Tm.props={};var Pm={exports:{}};function Lm(t){for(var e=new Array(t),n=0;n=p[d-1].fx){var S=!1;if(x.fx>O.fx?(Rm(w,1+h,b,-h,O),w.fx=t(w),w.fxn[t].radius+Bm)return!1;return!0});let o=0,s=0,l;var c=[];if(12*d.radius&&(e=2*d.radius),(null===r||r.width>e)&&(r={circle:d,width:e,p1:h,p2:i})}null!==r&&(c.push(r),o+=Fm(r.circle.radius,r.width),i=h)}}else{let t=a[0];for(l=1;lMath.abs(t.radius-a[l].radius)){e=!0;break}e?o=s=0:(o=t.radius*t.radius*Math.PI,c.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-Bm,y:t.y+t.radius},width:2*t.radius}))}return s/=2,t&&(t.area=o+s,t.arcArea=o,t.polygonArea=s,t.arcs=c,t.innerPoints=n,t.intersectionPoints=e),o+s}function Fm(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function zm(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function Gm(t,e,n){var r;return t+e<=n?0:n<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):(r=e-(n*n-t*t+e*e)/(2*n),Fm(t,t-(n*n-e*e+t*t)/(2*n))+Fm(e,r))}function Wm(t,e){var n,r,i=zm(t,e),a=t.radius,o=e.radius;return a+o<=i||i<=Math.abs(a-o)?[]:(o=(a*a-o*o+i*i)/(2*i),a=Math.sqrt(a*a-o*o),n=t.x+o*(e.x-t.x)/i,o=t.y+o*(e.y-t.y)/i,[{x:n+(r=-(e.y-t.y)*(a/i)),y:o-(e=-(e.x-t.x)*(a/i))},{x:n-r,y:o+e}])}function Ym(t,e){(e=e||{}).maxIterations=e.maxIterations||500;var n=e.initialLayout||qm;const i=e.lossFunction||$m,a=n(t=function(t){t=t.slice();var e=[],n={};let r,i,a,o;for(r=0;re=Math.min(a[l].size,a[c].size)&&(t=0),o[l].push({set:c,size:n.size,weight:t}),o[c].push({set:l,size:n.size,weight:t})}var u=[];for(s in o)if(o.hasOwnProperty(s)){let e=0;for(let t=0;t=Math.min(a[e].size,a[n].size)?i=1:t.size<=1e-10&&(i=-1),l[e][n]=l[n][e]=i}),{distances:s,constraints:l}}(t,r,i);let m=s.distances;function l(t,r){{var i=t,a=r,o=m,s=v;let e=0,n;for(n=0;n{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:o=0}=t,[s,l]=r;return t=>{t=t.map(t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[s]:t.sets.join("&")}));t.sort((t,e)=>t.sets.length-e.sets.length);const i=Ym(t);let a;return t.map(t=>{const r=t[e];return Object.assign(Object.assign({},t),{[l]:({width:t,height:e})=>{a=a||function(t,e,n,r){var i=[],a=[];for(const g in t)t.hasOwnProperty(g)&&(a.push(g),i.push(t[g]));e-=2*r,n-=2*r;var o=(l=Um(i)).xRange,s=l.yRange;if(o.max==o.min||s.max==s.min)return console.log("not scaling solution: zero size detected"),t;var l=e/(o.max-o.min),c=n/(s.max-s.min),u=Math.min(c,l),h=(e-(o.max-o.min)*u)/2,f=(n-(s.max-s.min)*u)/2,d={};for(let t=0;ts;a.push("\nA",s,s,0,l?1:0,1,o.p1.x,o.p1.y)}return a.join(" ")}(r.map(t=>a[t]));return/[zZ]$/.test(n)||(n+=" Z"),n}})})}};Xm.props={};const Km=u=>c=>ce(void 0,void 0,void 0,function*(){var{width:t,height:e}=M0(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=nt(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield bm(Object.assign(Object.assign({},l),o))(e);return[rt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function Zm(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Qm(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Jm(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);ae?o=l:a=l+1}return a}Km.props={};const tv=Math.sqrt(50),ev=Math.sqrt(10),nv=Math.sqrt(2);function rv(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=tv?10:n>=ev?5:n>=nv?2:1)*10**t:-(10**-t)/(n>=tv?10:n>=ev?5:n>=nv?2:1)}function iv(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=tv?r*=10:n>=ev?r*=5:n>=nv&&(r*=2),e{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}a=cv(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ts=cv(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),es=cv(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),ns=cv(ov,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+ov*e)},t=>t.getHours()),rs=cv(sv,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+sv*e)},t=>t.getDate()-1);const uv=cv(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());is=cv(lv,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lv*e)},t=>{var e=uv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/lv)}),as=cv(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const hv={millisecond:a,second:ts,minute:es,hour:ns,day:rs,week:is,month:uv,year:as};os=cv(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),qo=cv(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),hl=cv(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),vl=cv(ov,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+ov*e)},t=>t.getUTCHours()),xl=cv(sv,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+sv*e)},t=>t.getUTCDate()-1);const fv=cv(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());El=cv(lv,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lv*e)},t=>{var e=fv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/lv)}),Tl=cv(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const dv={millisecond:os,second:qo,minute:hl,hour:vl,day:xl,week:El,month:fv,year:Tl};function pv(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?dv:hv;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Jm(i,l,0,c,s);let h;return h=u===c?[a,iv(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1]){var a=et=>-e(-t),Nv=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?Cv(t):t},jv=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Cv(n):n},Rv=(t,e,n,r)=>{var i=t<0,a=Nv(r,i),r=jv(r,i),i=e{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return kv(t)?Math.round(t):t}):i;this.output=Zm(a,r,e,t)},t.prototype.invert=void 0}}var Bv,cl={exports:{}},gl={exports:{}},Dv=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Fv=Array.prototype.concat,zv=Array.prototype.slice,Gv=gl.exports=function(t){for(var e=[],n=0,r=t.length;nt=>e*(1-t)+n*t,Jv=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Qv(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Zv(n),c=Zv(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},t1=(t,e)=>{const n=Qv(t,e);return t=>Math.round(n(t))};function e1({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function n1(t){return"object"==typeof t?t.valueOf():t}class r1 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=n1,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(e1({map:this.map,initKey:this.initKey},t))}has(t){return super.has(e1({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class i1{constructor(t){this.options=Sv({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Sv({},this.options,t),this.rescale(t)}rescale(t){}}const a1=Symbol("defaultUnknown");function o1(e,n,r){for(let t=0;t""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class c1 extends i1{getDefaultOptions(){return{domain:[],range:[],unknown:a1}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&o1(this.domainIndexMap,this.getDomain(),this.domainKey),s1({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&o1(this.rangeIndexMap,this.getRange(),this.rangeKey),s1({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=l1(e),this.rangeKey=l1(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new c1(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function u1(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/l*r+1-1/l*i);const f=h*i/l;h-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=h/d.reduce((t,e)=>t+e);var c=new r1(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new r1(e.map((t,e)=>{e=d[e]*p+f;return[t,o?Math.floor(e):e]})),h=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(h-h/l*i))*s;let m=o?Math.round(t):t;var v=new Array(l);for(let t=0;tl+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const f1=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,h,f,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let m=1;for(;m<1/0;){for(let t=0;t{var[t,r]=t,[e,i]=e;let a,o;return Zm(o=t{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t{var e=Jm(r,t,1,i)-1,n=a[e];return Zm(o[e],n)(t)}},w1=(t,e,n,r)=>{return(2Math.min(Math.max(r,t),i)}return _v}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=w1(n.map(t),r,a,i);this.output=Zm(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=w1(i,r.map(t),Qv);this.input=Zm(e,n,i)}}class k1 extends M1{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Jv,tickMethod:f1,tickCount:5}}chooseTransforms(){return[_v,_v]}clone(){return new k1(this.options)}}class E1 extends h1{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:a1,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new E1(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const O1=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class S1 extends M1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Jv,tickMethod:f1,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[_v,_v]:(t=.5===r?O1:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new S1(this.options)}}class _1 extends S1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Jv,tickMethod:f1,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new _1(this.options)}}class A1 extends i1{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){return Lv(t)?(t=Jm(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new A1(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const T1=(t,e,n,r=10)=>{var i=t<0,a=jv(r,i),o=Nv(r,i),s=et-e),[]);for(let t=1;t{var a=e+t,t=>new Date(t)]}chooseNice(){return gv}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?dv:hv,s=t?V1:_v;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t){var[t,e]=t;return Zm(Qv(0,1),Qm(t,e))})],U1);let X1=$1=class extends k1{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:_v,tickMethod:f1,tickCount:5}}constructor(t){super(t)}clone(){return new $1(this.options)}};function K1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Z1(t){return t.map((t,e)=>e)}function Q1(t){return t[t.length-1]}function J1(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function ty(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e{r.push([n[e],...t])});return r}function ey([t,e],[n,r]){return[t-n,e-r]}function ny([t,e],[n,r]){return[t+n,e+r]}function ry([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function iy([t,e]){return Math.atan2(e,t)}function ay([t,e]){return iy([t,e])+Math.PI/2}function oy(t,e){t=iy(t),e=iy(e);return ta[t]);const s=new k1({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function hy(t){var[t,e,n,r]=t;return[r,t,e,n]}function fy(t,e,n){var[e,r,,i]=pp(t)?hy(e):e,[n,a]=n,t=t.getCenter(),o=ay(ey(e,t)),r=ay(ey(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:ry(i,t),outerRadius:ry(e,t)}}function dy(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function py(t){var{colorAttribute:t,opacityAttribute:t=t}=t;return t+"Opacity"}function gy(t,e){return gp(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function my(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function at(t){return new vy([t],null,t,t.ownerDocument)}X1=$1=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3{const[e,n,r]=t,i=Zm(Qv(0,.5),Qm(e,n)),a=Zm(Qv(.5,1),Qm(n,r));return t=>(e>r?tthis.createElement(t),n=[];if(null!==this._data){for(let t=0;tt,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),h=Fd(this._elements,t=>r(t.__data__));for(let t=0;tt,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;tt.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new vy([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;tr:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}vy.registry={g:Fs,rect:Js,circle:Ns,path:z,text:el,ellipse:Bs,image:Ys,line:Vs,polygon:Xs,polyline:Zs,html:Gs};const yy=t=>{const u=t["radius"],h=nt(t,["shape","radius"]);var t=it(h,"pointer"),e=it(h,"pin");const f=t["shape"],d=nt(t,["shape"]),p=e["shape"],g=nt(e,["shape"]);return(t,e,n,r)=>{var t=t.map(t=>n.invert(t)),[i,a,o]=function(t,e){var[,...t]=(t=t.getOptions()["transformations"]).find(t=>t[0]===e);return t}(n,"polar");const s=n.clone();var l=e["color"],i=ef({startAngle:i,endAngle:a,innerRadius:o,outerRadius:u});i.push(["cartesian"]),s.update({transformations:i});const c=t.map(t=>s.map(t));var[a,o]=my(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),h),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),h),i=at(new Fs);return p0(f)||("function"==typeof f?i.append(()=>f(c,e,s,r)):i.append("line").call(L,a).node()),p0(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(L,o).node()),i.node()}},by=h=>{const f={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},d={style:{shape:yy,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},p={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};return()=>{var t,{data:e={},scale:n={},style:r={},animate:i={}}=h,a=nt(h,["data","scale","style","animate","transform"]),{targetData:e,totalData:n,target:o,total:s,scale:l}=function(t,e){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=t;var t=a||r,s=a?1:i,e=Object.assign({y:{domain:[0,s]}},e);return o.length?{targetData:[{x:n,y:t,color:"target"}],totalData:o.map((t,e)=>({x:n,y:1<=e?t-o[e-1]:t,color:e})),target:t,total:s,scale:e}:{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:s-t,color:"total"}],target:t,total:s,scale:e}}(e,n),c=it(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[rt({},f,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:it(r,"arc"),animate:"object"==typeof i?it(i,"arc"):i},a)),rt({},f,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?it(i,"indicator"):i},a)),rt({},p,{style:Object.assign({text:([n,{target:r,total:e}]=[c,{target:o,total:s}],(n=n.content)?n(r,e):r.toString())},c),animate:"object"==typeof i?it(i,"text"):i})]}},xy=(by.props={},()=>(i,t,e,a)=>{const{x:o,series:s}=e,l=Object.entries(e).filter(([t])=>t.startsWith("y")).map(([,t])=>t),c=Object.entries(e).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===o||void 0===l||void 0===c)throw new Error("Missing encode for x or y or size channel.");const u=t.x,h=t.series;e=Array.from(i,n=>{var t=u.getBandWidth(u.invert(+o[n])),e=t*(h?h.getBandWidth(h.invert(+(null===s||void 0===s?void 0:s[n]))):1),t=(+(null===s||void 0===s?void 0:s[n])||0)*t;const r=+o[n]+t+e/2;return[...l.map((t,e)=>[r+ +c[e][n]/i.length,+l[e][n]]),...l.map((t,e)=>[r-+c[e][n]/i.length,+l[e][n]]).reverse()].map(t=>a.map(t))});return[i,e]});xy.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["density"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...pd(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...fd()],interaction:{shareTooltip:!0}};const wy=t=>(t,e,n,r)=>{const{x:i,y:a,size:o,color:s}=n;return[[0],[Array.from(t,t=>{var e=o?+o[t]:40;return[...r.map([+i[t],+a[t]]),s[t],e]})]]};wy.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,channels:[...ud({shapes:["heatmap"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...pd(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...hd()]};const My=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],ky=(My.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Ey=(ky.props={},t=>new h1(t)),Oy=(Ey.props={},t=>new k1(t)),Sy=(Oy.props={},t=>new c1(t)),_y=(Sy.props={},t=>new y1(t)),Ay=(_y.props={},t=>new E1(t)),Ty=(Ay.props={},t=>new q1(t)),Py=(Ty.props={},t=>new P1(t)),Ly=(Py.props={},t=>new S1(t)),Cy=(Ly.props={},t=>new A1(t)),Ny=(Cy.props={},t=>new N1(t)),jy=(Ny.props={},t=>new L1(t)),Ry=(jy.props={},t=>new _1(t)),Iy=(Ry.props={},t=>new U1(t)),By=(Iy.props={},t=>new d1(t));function Dy(t){return function(){return t}}By.props={};const Fy=Math.abs,zy=Math.atan2,Gy=Math.cos,Wy=Math.max,Yy=Math.min,Hy=Math.sin,Vy=Math.sqrt,qy=1e-12,$y=Math.PI,Uy=$y/2,Xy=2*$y;function Ky(t){return 1<=t?Uy:t<=-1?-Uy:Math.asin(t)}const Zy=Math.PI,Qy=2*Zy,Jy=1e-6,tb=Qy-Jy;function eb(n){this._+=n[0];for(let t=1,e=n.length;tJy&&(Math.abs(f*c-u*h)>Jy&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((Zy-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>Jy&&this._append`L${t+d*h},${e+d*f}`,this._append`A${i},${i},0,0,${+(h*sJy||Math.abs(this._y1-c)>Jy)&&this._append`L${l},${c}`,n&&((h=h<0?h%Qy+Qy:h)>tb?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Jy&&this._append`A${n},${n},0,${+(h>=Zy)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function rb(){return new nb}function ib(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new nb(r)}function ab(t){return t.innerRadius}function ob(t){return t.outerRadius}function sb(t){return t.startAngle}function lb(t){return t.endAngle}function cb(t){return t&&t.padAngle}function ub(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/Vy(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,a=i-a,s=s*n-e*t,n=(h<0?-1:1)*Vy(Wy(0,a*a*f-s*s)),e=(s*h-u*n)/f,t=(-s*u-h*n)/f,d=(s*h+u*n)/f,s=(-s*u+h*n)/f,u=e-r,h=t-c,n=d-r,f=s-c;return n*n+f*fqy?S>Xy-qy?(R.moveTo(k*Gy(E),k*Hy(E)),R.arc(0,0,k,E,O,!_),M>qy&&(R.moveTo(M*Gy(O),M*Hy(O)),R.arc(0,0,M,O,E,_))):(r=e=E,i=n=O,o=a=S,f=(u=j.apply(this,arguments)/2)>qy&&(L?+L.apply(this,arguments):Vy(M*M+k*k)),w=x=s=Yy(Fy(k-M)/2,+P.apply(this,arguments)),f>qy&&(h=Ky(f/M*Hy(u)),f=Ky(f/k*Hy(u)),(a-=2*h)>qy?(r+=h*=_?1:-1,i-=h):(a=0,r=i=(E+O)/2),(o-=2*f)>qy?(e+=f*=_?1:-1,n-=f):(o=0,e=n=(E+O)/2)),u=k*Gy(e),h=k*Hy(e),f=M*Gy(i),E=M*Hy(i),s>qy&&(d=k*Gy(n),p=k*Hy(n),g=M*Gy(r),m=M*Hy(r),S<$y)&&((O=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*lqy?w>qy?(l=ub(g,m,u,h,k,w,_),c=ub(d,p,f,E,k,w,_),R.moveTo(l.cx+l.x01,l.cy+l.y01),wqy&&a>qy?x>qy?(l=ub(f,E,d,p,M,-x,_),c=ub(u,h,g,m,M,-x,_),R.lineTo(l.cx+l.x01,l.cy+l.y01),xqy&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>qy&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function Ab(t,e){this._context=t,this._alpha=e}xb.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Ob.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Eb(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Eb(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new Ob(t,n)}return t.tension=function(t){return e(+t)},t}(0),Sb.prototype={areaStart:kb,areaEnd:kb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Eb(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new Sb(t,n)}return t.tension=function(t){return e(+t)},t}(0),Ab.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:_b(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Tb=function e(n){function t(t){return n?new Ab(t,n):new Ob(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Pb(t,e){this._context=t,this._alpha=e}Pb.prototype={areaStart:kb,areaEnd:kb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_b(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Lb=function e(n){function t(t){return n?new Pb(t,n):new Sb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Cb(t){this._context=t}function Nb(t){return new Cb(t)}function jb(t,e){this._context=t,this._t=e}function Rb(t){return new jb(t,.5)}function Ib(t){return new jb(t,0)}function Bb(t){return new jb(t,1)}function Db(t,e,n){return Math.max(e,Math.min(t,n))}function Fb(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:h=a,radiusTopLeft:f=a,radiusTopRight:d=a,minWidth:p=-1/0,maxWidth:g=1/0}=r,r=nt(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth"]);if(!gp(n)&&!vp(n)){var m=!!pp(n),[v,,y]=m?hy(t):t;const[k,w]=v;var[y,v]=ey(y,v),b=(0{const{colorAttribute:_,first:A=!0,last:T=!0}=S,P=nt(S,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=nt(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:h=a,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:g=f,innerRadiusBottomLeft:f=f,lineWidth:r="stroke"===_||s?r:0,inset:m=0,insetLeft:v=m,insetRight:y=m,insetBottom:b=m,insetTop:x=m,minWidth:w,maxWidth:M}=P,k=nt(P,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth"]),{color:i=i,opacity:E}=e;const O=[A?l:d,A?c:p,T?u:g,T?h:f];l=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"],pp(n)&&l.push(l.shift()),d=Object.assign(Object.assign({radius:a},Object.fromEntries(l.map((t,e)=>[t,O[e]]))),{inset:m,insetLeft:v,insetRight:y,insetBottom:b,insetTop:x,minWidth:w,maxWidth:M});return at(Fb(t,e,n,d)).call(L,o).style("fill","transparent").style(_,i).style(py(S),E).style("lineWidth",r).style("stroke",void 0===s?i:s).call(L,k).node()}},Gb=(zb.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>zb(Object.assign({colorAttribute:"fill"},t))),Wb=(Gb.props=Object.assign(Object.assign({},zb.props),{defaultMarker:"square"}),t=>zb(Object.assign({colorAttribute:"stroke"},t)));Wb.props=Object.assign(Object.assign({},zb.props),{defaultMarker:"hollowSquare"});const Yb=t=>{const{adjustPoints:c=function(t,e,n){var[t,r,i,a]=t;if(pp(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,u=nt(t,["adjustPoints"]);return(t,e,n,r,i)=>{var{index:a,mark:o,shape:s,defaultShape:l}=e,r=dy(r,o,s,l),o=r["defaultColor"],s=nt(r,["defaultColor"]),l=i[a+1],r=c(t,l,n),[i,a,t,l]=!!pp(n)?hy(r):r,{color:n=o,opacity:r}=e,e=vb().curve(Nb)([i,a,t,l]);return at(new z({})).call(L,s).style("path",e).style("fill",n).style("fillOpacity",r).call(L,u).node()}};function Hb(t,e,n){var[t,r,i,a]=t;if(pp(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}Yb.props={defaultMarker:"square"};const Vb=t=>Yb(Object.assign({adjustPoints:Hb},t));function qb(t){const e="function"==typeof t?t:t.render;return class extends Rs{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Vb.props={defaultMarker:"square"};const $b=qb(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;at(t).maybeAppend("line",()=>new z({})).style("d",e).call(L,r),at(t).maybeAppend("line1",()=>new z({})).style("d",n).call(L,i)});const Ub=t=>{const{curve:h,gradient:f=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connect:g=!1}=t,m=nt(t,["curve","gradient","gradientColor","defined","connect"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=nt(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?uy(a,s,l,f,d):r,s=gy(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),m);let c;if(gp(n)){const u=n.getCenter();c=n=>Mb(vb().curve(bb)).angle((t,e)=>ay(ey(n[e],u))).radius((t,e)=>ry(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(h)(n)}else c=vb().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(h);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=it(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?at(new z({})).style("d",c(r)||[]).call(L,l):a&&!g?at(new z({})).style("d",c(t)).call(L,l):at(new $b).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Xb=(Ub.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=gp(n)?Nb:pb;return Ub(Object.assign({curve:i},a))(t,e,n,r)}),Kb=(Xb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"line"}),t=>{const{alpha:a=.5}=t,o=nt(t,["alpha"]);return(t,e,n,r)=>{var i=gp(n)?Lb:Tb;return Ub(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Zb=(Kb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"smooth"}),t=>Ub(Object.assign({curve:Bb},t))),Qb=(Zb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"hv"}),t=>Ub(Object.assign({curve:Ib},t))),Jb=(Qb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"vh"}),t=>Ub(Object.assign({curve:Rb},t)));Jb.props=Object.assign(Object.assign({},Ub.props),{defaultMarker:"hvh"});const tx=M=>(e,t,n,r)=>{var i,a,o,s,l,c,u,h,f,{mark:t,shape:d,defaultShape:p,seriesSize:g,color:m}=t,r=dy(r,t,d,p),t=r["defaultColor"],d=nt(r,["defaultColor"]),v=rb();for(let t=0;t[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]],ll.style=["fill"],n=ll.bind(void 0),n.style=["stroke","lineWidth"],ls=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]],ls.style=["fill"],Wo=ls.bind(void 0),Wo.style=["fill"],$o=ls.bind(void 0),$o.style=["stroke","lineWidth"],r=(t,e,n)=>{var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},r.style=["fill"],fl=r.bind(void 0),fl.style=["stroke","lineWidth"],dl=(t,e,n)=>{var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},dl.style=["fill"],e=dl.bind(void 0),e.style=["stroke","lineWidth"],ul=(t,e,n)=>{var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},ul.style=["fill"],Io=ul.bind(void 0),Io.style=["stroke","lineWidth"],Ho=(t,e,n)=>{var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},Ho.style=["fill"],Yo=Ho.bind(void 0),Yo.style=["stroke","lineWidth"],Vo=(t,e,n)=>{var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},Vo.style=["fill"],pl=Vo.bind(void 0),pl.style=["stroke","lineWidth"],Uo=(t,e,n)=>[["M",t,e+n],["L",t,e-n]],Uo.style=["stroke","lineWidth"],a=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]],a.style=["stroke","lineWidth"],ts=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]],ts.style=["stroke","lineWidth"],es=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]],es.style=["stroke","lineWidth"],ns=(t,e,n)=>[["M",t-n,e],["L",t+n,e]],ns.style=["stroke","lineWidth"],rs=(t,e,n)=>[["M",t-n,e],["L",t+n,e]],rs.style=["stroke","lineWidth"],is=rs.bind(void 0),is.style=["stroke","lineWidth"],as=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]],as.style=["stroke","lineWidth"],os=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]],os.style=["stroke","lineWidth"],qo=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]],qo.style=["stroke","lineWidth"],hl=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]],hl.style=["stroke","lineWidth"],vl=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];vl.style=["stroke","lineWidth"];const ex=new Map([["bowtie",Vo],["cross",a],["dash",is],["diamond",r],["dot",rs],["hexagon",Ho],["hollowBowtie",pl],["hollowDiamond",fl],["hollowHexagon",Yo],["hollowPoint",n],["hollowSquare",$o],["hollowTriangle",e],["hollowTriangleDown",Io],["hv",os],["hvh",hl],["hyphen",ns],["line",Uo],["plus",es],["point",ll],["rect",Wo],["smooth",as],["square",ls],["tick",ts],["triangleDown",ul],["triangle",dl],["vh",qo],["vhv",vl]]);const o=u=>{const{colorAttribute:h,symbol:t,mode:f="auto"}=u,d=nt(u,["colorAttribute","symbol","mode"]),p=ex.get(t)||ex.get("point");return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=nt(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=my(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||bp(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(f,t,e,n)||d.r||o.r;return at(new z).call(L,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(py(u),s).style(h,a).call(L,d).node()}},nx=(o.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>o(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),rx=(nx.props=Object.assign({defaultMarker:"bowtie"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),ix=(rx.props=Object.assign({defaultMarker:"cross"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),ax=(ix.props=Object.assign({defaultMarker:"diamond"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),ox=(ax.props=Object.assign({defaultMarker:"hexagon"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),sx=(ox.props=Object.assign({defaultMarker:"hollowBowtie"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),lx=(sx.props=Object.assign({defaultMarker:"hollowDiamond"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),cx=(lx.props=Object.assign({defaultMarker:"hollowHexagon"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),ux=(cx.props=Object.assign({defaultMarker:"hollowPoint"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),hx=(ux.props=Object.assign({defaultMarker:"hollowSquare"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),fx=(hx.props=Object.assign({defaultMarker:"hollowTriangle"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),dx=(fx.props=Object.assign({defaultMarker:"hollowTriangleDown"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),px=(dx.props=Object.assign({defaultMarker:"hyphen"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),gx=(px.props=Object.assign({defaultMarker:"line"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),mx=(gx.props=Object.assign({defaultMarker:"plus"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"point"},t))),vx=(mx.props=Object.assign({defaultMarker:"point"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"square"},t))),yx=(vx.props=Object.assign({defaultMarker:"square"},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),bx=(yx.props=Object.assign({defaultMarker:"tick"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),xx=(bx.props=Object.assign({defaultMarker:"triangle"},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),wx=(xx.props=Object.assign({defaultMarker:"triangleDown"},o.props),t=>{const{arrow:f=!0,arrowSize:d="40%"}=t,p=nt(t,["arrow","arrowSize"]);return(t,e,n,r)=>{var i,a,o,s,{mark:l,shape:c,defaultShape:u,transform:h}=e,r=dy(r,l,c,u),l=r["defaultColor"],c=nt(r,["defaultColor"]),{color:u=l}=e,[r,e]=t,t=rb();return t.moveTo(...r),t.lineTo(...e),f&&([o,s]=(r=r,i=e,a="string"==typeof(a=(a={arrowSize:d})["arrowSize"])?+parseFloat(a)/100*ry(r,i):a,o=Math.PI/6,r=Math.atan2(i[1]-r[1],i[0]-r[0]),s=Math.PI/2-r-o,r-=o,[[i[0]-a*Math.sin(s),i[1]-a*Math.cos(s)],[i[0]-a*Math.cos(r),i[1]-a*Math.sin(r)]]),t.moveTo(...e),t.lineTo(...o),t.moveTo(...e),t.lineTo(...s)),at(new z).call(L,c).style("d",t.toString()).style("stroke",u||l).style("transform",h).call(L,p).node()}});function Mx(t){Ex(t,!0)}function kx(t){Ex(t,!1)}function Ex(t,e){var n=e?"visible":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t&&e(t,n)})}(t,function(t){t.attr("visibility",n)})}wx.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};le(_x,Ox=Fs);var Ox,Sx=_x;function _x(){for(var t=[],e=0;eu[0]&&t=o.length)return null;o[r].setLocalPosition(0,0),this.prepareFollowingPage(t);i=k(this.getFollowingPageDiff(t),2),o=i[0],r=i[1],this.playState="running",i=Q2(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-o,", ").concat(-r,")")}],n);return K2(i,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),i},RM.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?null:(t=t?(n-1+e)%e:Xe(n-1,0,e),this.goTo(t))},RM.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?null:(t=t?(n+1)%e:Xe(n+1,0,e),this.goTo(t))},RM.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;n&&e?(this.clipPath=t.maybeAppendByClassName(NM.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},RM.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){(n.includes(e)?Mx:kx)(t)})},RM.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,k("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=k(i.offset,3),o=k(a[0],2),s=o[0],c=o[1],l=k(a[1],2),r=l[0],o=l[1],l=k(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},RM.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(NM.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},RM.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orientation,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t]*>/,xk={tr:document.createElement("tbody"),tbody:yk,thead:yk,tfoot:yk,td:xk,th:xk,"*":document.createElement("div")});var e=bk.test(t)&&RegExp.$1,e=(e&&e in xk||(e="*"),xk[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}function Ek(t){return{CONTAINER:"".concat(t=void 0===t?"":t,"tooltip"),TITLE:"".concat(t,"tooltip-title"),LIST:"".concat(t,"tooltip-list"),LIST_ITEM:"".concat(t,"tooltip-list-item"),NAME:"".concat(t,"tooltip-list-item-name"),MARKER:"".concat(t,"tooltip-list-item-marker"),NAME_LABEL:"".concat(t,"tooltip-list-item-name-label"),VALUE:"".concat(t,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(t,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(t,"tooltip-crosshair-y")}}var Ok={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};le(Pk,Sk=xl),Object.defineProperty(Pk.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Pk.prototype.getContainer=function(){return this.element},Object.defineProperty(Pk.prototype,"position",{set:function(t){var t=k(t,2),e=t[0],t=t[1];this.attributes.x=e,this.attributes.y=t,this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,o=t.template;return e.map(function(t,e){var n,r=t.name,r=void 0===r?"":r,i=t.color,i=void 0===i?"black":i,a=t.index,t=nt(t,["name","color","index"]),r=y({name:r,color:i,index:null!=a?a:e},t);return kk((i=o.item,n=r,i&&n?i.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):i))})},enumerable:!1,configurable:!0}),Pk.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},Pk.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),Sk.prototype.destroy.call(this)},Pk.prototype.show=function(t,e){var n,r=this;void 0!==t&&void 0!==e&&(n=this.element.style.transition,this.element.style.transition="none",this.position=[null!=t?t:+this.attributes.x,null!=e?e:+this.attributes.y],setTimeout(function(){r.element.style.transition=n},10)),this.element.style.visibility="visible"},Pk.prototype.hide=function(){this.element.style.visibility="hidden"},Pk.prototype.initShape=function(){var t=this.attributes.template;this.element=kk(t.container),this.id&&this.element.setAttribute("id",this.id)},Pk.prototype.renderCustomContent=function(){var t;(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey)&&(this.prevCustomContentKey=this.attributes.contentKey,t=this.attributes.content)&&("string"==typeof t?this.element.innerHTML=t:this.element.replaceChildren(t))},Pk.prototype.renderHTMLTooltipElement=function(){var r,t=this.attributes,e=t.template,n=t.title,i=t.enterable,a=t.style,t=t.content,o=Ek(e.prefixCls),s=this.element;this.element.style.pointerEvents=i?"auto":"none",t?this.renderCustomContent():(n?(s.innerHTML=e.title,s.getElementsByClassName(o.TITLE)[0].innerHTML=n):null!=(t=null==(i=s.getElementsByClassName(o.TITLE))?void 0:i[0])&&t.remove(),e=this.HTMLTooltipItemsElements,(n=document.createElement("ul")).className=o.LIST,n.replaceChildren.apply(n,b([],k(e),!1)),(i=this.element.querySelector(".".concat(o.LIST)))?i.replaceWith(n):s.appendChild(n)),r=s,Object.entries(a).forEach(function(t){var t=k(t,2),e=t[0],n=t[1];b([r],k(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})},Pk.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,o=t.width,s=t.height,l=[-o/2,-s/2];return e.forEach(function(t){var e=k(l,2),n=e[0],e=e[1],t=k(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},Pk.prototype.setOffsetPosition=function(t){var t=k(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(+(void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(+i+n+t,"px")},Pk.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},Pk.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=k(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,h=c.y,f=c.bounding,c=c.position;return f?(e=(n=this.element).offsetWidth,n=n.offsetHeight,h=(u=k([+u+l,+h+t],2))[0],u=u[1],r={left:"right",right:"left",top:"bottom",bottom:"top"},s=f.x,i=f.y,a={left:h'),title:'
'),item:'
  • \n \n \n {name}\n \n {value}\n
  • ')},style:(t=Ek(t=void 0===(t=n)?"":t),(r={})[".".concat(t.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},r[".".concat(t.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(t.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(t.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(t.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(t.NAME)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(t.NAME_LABEL)]=y({flex:1},Ok),r[".".concat(t.VALUE)]=y({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Ok),r[".".concat(t.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(t.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r)})||this).prevCustomContentKey=e.attributes.contentKey,e.initShape(),e.render(e.attributes,e),e}le(Ck,Lk=Fs),Object.defineProperty(Ck.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=b2(t)},enumerable:!1,configurable:!0}),Object.defineProperty(Ck.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=b2(t)},enumerable:!1,configurable:!0}),Ck.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=k(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new jx(e-i,n-a,r+i+o,t+a+s)},Ck.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,Lk.prototype.appendChild.call(this,t,e),t},Ck.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=k(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=k(this.$margin,4),s=o[0],o=o[3];return new jx(n+o,r+s,e-n-i,t-r-a)},Ck.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:t2,grid:e2})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},Ck.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},Ck.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()};var Lk,cl=Ck;function Ck(t){var e=Lk.call(this,t)||this,t=(e.layoutEvents=[x.BOUNDS_CHANGED,x.INSERTED,x.REMOVED],e.$margin=b2(0),e.$padding=b2(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}function Nk(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]{var e=t.attributes,{labelTransform:n,labelTransformOrigin:r,x:i,y:a,x0:o=i,y0:s=a,background:l,connector:c,startMarker:u,endMarker:h,coordCenter:f}=e,e=nt(e,["class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),d=it(e,"background"),p=d["padding"],d=nt(d,["padding"]),g=it(e,"connector"),{points:m=[]}=g,g=nt(g,["points"]),o=[[+o,+s],[+i,+a]],s=at(t).maybeAppend("text","text").style("zIndex",0).call(L,Object.assign({textBaseline:"middle",transform:n,transformOrigin:r},e)).node(),i=Nk(at(t).maybeAppend("background","rect").style("zIndex",-1).call(L,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(s,p)).call(L,l?d:{}).node(),o,m,f),a=u&&new N2({id:"startMarker",style:Object.assign({x:0,y:0},it(e,"startMarker"))}),n=h&&new N2({id:"endMarker",style:Object.assign({x:0,y:0},it(e,"endMarker"))});at(t).maybeAppend("connector","path").style("zIndex",0).style("path",i).style("markerStart",a).style("markerEnd",n).call(L,c?g:{})}),Rk=t=>{const l=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=nt(dy(r,i,a,o),[]),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return at(new jk).style("x",i).style("y",o).call(L,r).style("transform",s+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(L,a).call(L,l).node()}};Rk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Ik=qb(t=>{var e=nt(t.attributes,["class","x","y"]);const n=it(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(at(t).maybeAppend("marker",()=>new N2({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());at(t).maybeAppend("text","text").style("x",i).style("y",a).call(L,e)}),Bk=t=>{const s=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return at(new Ik).call(L,a).style("x",r).style("y",o).call(L,e).call(L,s).node()}},Dk=(Bk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},qb(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;at(t).maybeAppend("connect-path",()=>new z({})).style("d",n).call(L,i),at(t).maybeAppend("area-path",()=>new z({})).style("d",e).call(L,r)}));const Fk=t=>{const{curve:u,gradient:l=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connect:f=!1}=t,d=nt(t,["curve","gradient","defined","connect"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=dy(n,r,i,a),r=n["defaultColor"],i=nt(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=gy(c,e),n=l&&n?uy(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t!n(t))?o=!0:(r.push(h),i.push(f),o&&s&&(o=!1,[c,u]=s,a.push([c,h,u,f])),s=[h,f])}return[r.concat(i),a]}(t,h),a=it(s,"connect"),i=!!o.length,n=t=>at(new z({})).style("d",t).call(L,s).node();return gp(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=yb().curve(bb),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Mb(a())},delete t.lineX0,t.lineEndAngle=function(){return Mb(o())},delete t.lineX1,t.lineInnerRadius=function(){return Mb(s())},delete t.lineY0,t.lineOuterRadius=function(){return Mb(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(wb(t)):e()._curve},t.angle((t,e)=>ay(ey(r[e],n))).outerRadius((t,e)=>ry(r[e],n)).innerRadius((t,e)=>ry(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):at(new Dk).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return(pp(c)?yb().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(h)):yb().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(h))).curve(u)(n)},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):at(new Dk).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},zk=(Fk.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=gp(n)?Nb:pb;return Fk(Object.assign({curve:i},a))(t,e,n,r)}),Gk=(zk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"square"}),t=>{const{alpha:a=.5}=t,o=nt(t,["alpha"]);return(t,e,n,r)=>{var i=gp(n)?Lb:Tb;return Fk(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Wk=(Gk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"smooth"}),i=>(t,e,n,r)=>Fk(Object.assign({curve:Rb},i))(t,e,n,r)),Yk=(Wk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"hvh"}),i=>(t,e,n,r)=>Fk(Object.assign({curve:Ib},i))(t,e,n,r)),Hk=(Yk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"vh"}),i=>(t,e,n,r)=>Fk(Object.assign({curve:Bb},i))(t,e,n,r)),Vk=(Hk.props=Object.assign(Object.assign({},Fk.props),{defaultMarker:"hv"}),i=>{const{arrow:a=!1}=i;return(t,e,n,r)=>wx(Object.assign(Object.assign({},i),{arrow:a}))(t,e,n,r)}),qk=(Vk.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=rb();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),at(new z).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}});qk.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $k=t=>{const{cornerRatio:u=1/3}=t,h=nt(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=dy(r,o,s,l),o=r["defaultColor"],s=nt(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=rb(),gp(o)?(i=ry(t,c=o.getCenter()),i=(ry(e,c)-i)*n+i,a.moveTo(t[0],t[1]),cy(a,t,e,c,i)):pp(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return at(new z).call(L,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(L,h).node()}},Uk=($k.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=rb();return t.moveTo(e[0],e[1]),gp(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):cy(t,e,i,ly(e,i),ry(e,i)/2),at(new z).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}}),Xk=(Uk.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:e=e}=u,[[t,l]]=t,[n,c]=n.getSize(),s="string"==typeof s?vd(s)*n:s,e="string"==typeof e?vd(e)*c:e,n=t-Number(s)/2,c=l-Number(e)/2;return at(new Ys).call(L,a).style("x",n).style("y",c).style("img",r).style("stroke",o).style("transform",i).call(L,u).style("width",s).style("height",e).node()}});Xk.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Kk=t=>{const l=nt(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=dy(r,e,i,a),e=r["defaultColor"],i=nt(r,["defaultColor"]),a=function(i,t){const a=rb();if(gp(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>ry(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?cy(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return at(new z).call(L,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(L,l).node()}};Kk.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Zk=t=>{const l=nt(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=dy(r,e,i,a),e=r["defaultColor"],i=nt(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=rb();return gp(e)?(n=ry(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),cy(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),cy(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return at(new z).call(L,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(L,l).node()}};Zk.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Qk=t=>{const m=nt(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=dy(r,e,h,f),{defaultColor:e,fill:h=e,stroke:f=e}=r,e=nt(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=rb(),gp(t)?([i,a]=t=t.getCenter(),o=iy(ey(r[0],t)),s=iy(ey(r[1],t)),g=ry(t,r[2]),l=ry(t,r[3]),c=ry(t,r[8]),u=ry(t,r[10]),t=ry(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return at(new z).call(L,e).style("d",g.toString()).style("stroke",f).style("fill",d||h).style("transform",p).call(L,m).node()}};Qk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Jk=t=>{const m=nt(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=dy(r,e,h,f),{defaultColor:e,fill:h=e,stroke:f=e}=r,e=nt(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=4,u=rb(),gp(t)?([i,a]=t=t.getCenter(),o=ry(t,r[3]),s=ry(t,r[8]),g=ry(t,r[10]),l=(t=iy(ey(r[2],t)))-(c=Math.asin(n/s)),t+=c,u.moveTo(...r[2]),u.lineTo(...r[3]),u.moveTo(Math.cos(l)*o+i,Math.sin(l)*o+a),u.arc(i,a,o,l,t),u.lineTo(Math.cos(t)*g+i,Math.sin(t)*g+a),u.arc(i,a,g,t,l,!0),u.lineTo(Math.cos(l)*o+i,Math.sin(l)*o+a),u.closePath(),u.moveTo(...r[10]),u.lineTo(...r[11]),c=(l+t)/2,u.moveTo(Math.cos(c)*(s+n/2)+i,Math.sin(c)*(s+n/2)+a),u.arc(Math.cos(c)*s+i,Math.sin(c)*s+a,n/2,c,2*Math.PI+c)):(u.moveTo(...r[2]),u.lineTo(...r[3]),u.lineTo(r[3][0]-n,r[3][1]),u.lineTo(r[10][0]-n,r[10][1]),u.lineTo(r[10][0]+n,r[10][1]),u.lineTo(r[3][0]+n,r[3][1]),u.lineTo(...r[3]),u.closePath(),u.moveTo(...r[10]),u.lineTo(...r[11]),u.moveTo(r[3][0]+n/2,r[8][1]),u.arc(r[3][0],r[8][1],n/2,0,2*Math.PI)),u.closePath(),u);return at(new z).call(L,e).style("d",g.toString()).style("stroke",f).style("fill",d||h).style("transform",p).call(L,m).node()}};Jk.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tE=t=>{const{arrow:c,arrowSize:u=4}=t,h=nt(t,["arrow","arrowSize"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=dy(r,o,s,l),{defaultColor:o,lineWidth:s}=r,l=nt(r,["defaultColor","lineWidth"]),{color:r=o,size:o=s}=e,s=c?(s=u,i=Object.assign({fill:h.stroke||r,stroke:h.stroke||r},it(h,"arrow")),new z({style:Object.assign({path:`M ${s},${s} L -${s},0 L ${s},-${s} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},i)})):null,t=(i=t,gp(t=n)?(t=t.getCenter(),hb()({startAngle:0,endAngle:2*Math.PI,outerRadius:ry(i[0],t),innerRadius:ry(i[1],t)})):vb().x(t=>t[0]).y(t=>t[1])(i)),n=(n=n,e=e.transform,gp(n)?([n,a]=n.getCenter(),`translate(${n}, ${a}) `+(e||"")):e);return at(new z({})).call(L,l).style("d",t).style("stroke",r).style("lineWidth",o).style("transform",n).style("markerEnd",s).call(L,h).node()}};function eE(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}tE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nE=qb(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=nt(e,["points","class","endMarker","direction"]),i=it(e,"endMarker"),n=(n=n,vb().x(t=>t[0]).y(t=>t[1])(n));at(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new N2({className:"marker",style:Object.assign(Object.assign({},i),{symbol:eE})}):null).call(L,e)});const rE=t=>{const{offset:s=0,connectLength1:l}=t,c=nt(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=dy(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=nt(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(pp(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return at(new nE).call(L,o).style("points",n).style("stroke",r||i).style("transform",e).call(L,c).node()}};function iE(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}function aE(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=f0(a.x,c),i=f0(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function oE(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:h}=fy(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=lE(f,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?sE(s,f,n):ly(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function sE(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function lE(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function cE(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=fy(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:lE(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=sE(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function uE(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function hE(t,e,n,r){var i=n["bounds"];return 1===i.length?uE(0,0,n):(mp(r)?oE:xp(r)?cE:aE)(t,e,n,r)}function fE(t,e,n){var{innerRadius:n,outerRadius:t}=fy(n,t,[e.y,e.y1]);return n+(t-n)}function dE(t,e,n){var{startAngle:n,endAngle:t}=fy(n,t,[e.y,e.y1]);return(n+t)/2}function pE(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,h=r.getCenter(),f=dE(e,n,r),d=0Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=iy(ey(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l})`,textAlign:"center",textBaseline:"middle"}},bottom:hE,bottomLeft:hE,bottomRight:hE,inside:hE,left:hE,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?uE(0,0,n):(mp(r)?oE:xp(r)?pE:aE)(t,e,n,r)},right:hE,spider:function(t,e,n,r){var i,a,o,s,l,c;return xp(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=nt(pE(0,e,n,r),[]),s=r.getCenter(),l=fE(e,n,r),e=dE(e,n,r),n=l+c+i,r=0"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=ay([n-l[0],s-l[1]]),n=0(t,e,n,r)=>{var{text:i,transform:a="",transformOrigin:o}=e,s=nt(e,["text","x","y","transform","transformOrigin"]),t=mE(t,e,n,r,l),{rotate:e=0,transform:r=""}=t,t=nt(t,["rotate","transform"]);return at(new jk).call(L,t).style("text",""+i).style("labelTransform",(r+` rotate(${+e}) `+a).trim()).style("labelTransformOrigin",o).style("coordCenter",n.getCenter()).call(L,s).node()},yE=(vE.props={defaultMarker:"point"},t=>{const s=t["colorAttribute"],l=nt(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=nt(dy(r,i,a,o),["stroke"]),{d:i,color:a}=e,[o,e]=n.getSize();return at(new z).call(L,r).style("d","function"==typeof i?i({width:o,height:e}):i).style(s,a).call(L,l).node()}}),bE=(yE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>yE(Object.assign({colorAttribute:"fill"},t))),xE=(bE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>yE(Object.assign({fill:"none",colorAttribute:"stroke"},t))),wE=(xE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const c=nt(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o,transform:s}=e,r=dy(r,i,a,o),i=r["defaultColor"],a=nt(r,["defaultColor"]),{color:o=i}=e,[r,...e]=t;const l=rb();return l.moveTo(...r),e.forEach(([t,e])=>{l.lineTo(t,e)}),l.closePath(),at(new z).call(L,a).style("d",l.toString()).style("stroke",o||i).style("fill",o||i).style("fillOpacity",.4).style("transform",s).call(L,c).node()}});function ME(t){var n,r,i,a=t||1;function o(t,e){++n>a&&(i=r,s(1),++n),r[t]=e}function s(t){n=0,r=Object.create(null),t||(i=Object.create(null))}return s(),{clear:s,has:function(t){return void 0!==r[t]||void 0!==i[t]},get:function(t){var e=r[t];return void 0!==e?e:void 0!==(e=i[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==r[t]?r[t]=e:o(t,e)}}}function kE(t,e,n){t=t?t():document.createElement("canvas");return t.width=e,t.height=n,t}wE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},ME(3);const EE=function(n,r,t=16){const i=ME(t);return(...t)=>{var e=r(...t);i.get(e);return i.has(e)?i.get(e):(t=n(...t),i.set(e,t),t)}}((t,e,n)=>{var n=kE(n,2*t,2*t),r=n.getContext("2d"),i=t,a=t;return 1===e?(r.beginPath(),r.arc(i,a,t,0,2*Math.PI,!1),r.fillStyle="rgba(0,0,0,1)",r.fill()):((e=r.createRadialGradient(i,a,t*e,i,a,t)).addColorStop(0,"rgba(0,0,0,1)"),e.addColorStop(1,"rgba(0,0,0,0)"),r.fillStyle=e,r.fillRect(0,0,2*t,2*t)),n},t=>""+t);function OE(t,e,n,r,i,a,o){a=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},a);a.minOpacity*=255,a.opacity*=255,a.maxOpacity*=255;var s=kE(o,t,e).getContext("2d"),l=function(t,e){const n=(e=kE(e,256,1).getContext("2d")).createLinearGradient(0,0,256,1);return("string"==typeof(t=t)?t.split(" ").map(t=>{var[t,e]=t.split(":");return[+t,e]}):t).forEach(([t,e])=>{n.addColorStop(t,e)}),e.fillStyle=n,e.fillRect(0,0,256,1),e.getImageData(0,0,256,1).data}(a.gradient,o);s.clearRect(0,0,t,e);{var c=s,u=n,h=r,f=i,d=o,p=(n=a)["blur"];let t=f.length;for(;t--;){var{x:g,y:m,value:v,radius:y}=f[t],v=Math.min(v,h),g=g-y,m=m-y,y=EE(y,1-p,d);c.globalAlpha=Math.max((v-u)/(h-u),.001),c.drawImage(y,g,m)}}r=function(t,e,n,r,i){var{minOpacity:a,opacity:o,maxOpacity:s,useGradientOpacity:l}=i,c=(i=t.getImageData(0,0,e,n)).data,u=c.length;for(let t=3;t{const{gradient:f,opacity:d,maxOpacity:p,minOpacity:g,blur:m,useGradientOpacity:v}=t,y=nt(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]);return(t,e,n,r,i,a)=>{var o,s,{mark:e,shape:l,defaultShape:c,transform:u}=e,r=nt(dy(r,e,l,c),[]),e=a["createCanvas"],[l,c]=n.getSize(),a=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),n=rp(t,t=>t[2]),t=ep(t,t=>t[2]),h={gradient:f,opacity:d,minOpacity:g,maxOpacity:p,blur:m,useGradientOpacity:v},n=l&&c?OE(l,c,n,t,a,(o=h,s=t=>void 0===t,Object.assign({},o),Object.keys(o).reduce((t,e)=>{var n=o[e];return s(n,e)||(t[e]=n),t},{})),e):{canvas:null};return at(new Ys).call(L,r).style("x",0).style("y",0).style("width",l).style("height",c).style("src",n.canvas).style("transform",u).call(L,y).node()}},_E=(SE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=nt(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),AE=(_E.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),TE=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:AE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:AE.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:AE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:AE.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:AE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:AE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:AE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:AE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:AE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:AE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:AE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:AE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:AE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:AE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,line:!1,lineLineWidth:.5,lineStroke:AE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:AE.BLACK,tickStrokeOpacity:.25,titleFill:AE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,labelAutoRotate:!0,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,labelAutoRotate:!1,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:AE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:AE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:AE.BLACK,navButtonFillOpacity:.65,navPageNumFill:AE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:AE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:AE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:AE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:AE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:AE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",labelSpacing:8,tick:!0},label:{fill:AE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:AE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:AE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:AE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:AE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:AE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{titleFill:AE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:AE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},PE=(TE.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),LE=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:PE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:PE.BLACK,lineWidth:1}},text:{text:{fill:PE.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:PE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:PE.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:PE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:PE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:PE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:PE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:PE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:PE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:PE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:PE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:PE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:PE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,lineLineWidth:.5,lineStroke:PE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:PE.BLACK,tickStrokeOpacity:.25,titleFill:PE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:PE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:PE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:PE.BLACK,navButtonFillOpacity:.45,navPageNumFill:PE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:PE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:PE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:PE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:PE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:PE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal"},label:{fill:PE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:PE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:PE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:PE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:PE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:PE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:PE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:PE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},CE=(LE.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),NE=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:CE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:CE.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:CE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:CE.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:CE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:CE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:CE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:CE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:CE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:CE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:CE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:CE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelAlign:"horizontal",labelAutoRotate:!1,labelFill:CE.BLACK,labelFillOpacity:1,labelFontSize:10,labelFontWeight:"normal",labelSpacing:4,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickLineWidth:1,tickStroke:CE.STROKE,tickStrokeOpacity:1,titleFill:CE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:4},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"bottom",titleSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:4,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:CE.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemValueFill:CE.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",navButtonFill:CE.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:CE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,padding:8,title:!1,titleFill:CE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:CE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal",handleMarkerFill:CE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:CE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:CE.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",title:!1},label:{fill:CE.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:CE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:CE.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:CE.STROKE,trackFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:CE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:CE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:CE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:CE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function jE(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}NE.props={};var RE,IE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function BE(t){var e;if(e=IE.exec(t))return new DE({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function DE(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function FE(t,e){var n,e=jE(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}BE.prototype=DE.prototype,DE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var zE={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>FE(100*t,e),r:FE,s:function(t,e){var n,r,i=jE(t,e);return i?(n=i[0],(i=(i=i[1])-(RE=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:rMath.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function GE(t){return t}var WE,YE=Array.prototype.map,HE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function VE(t){var e,s,l,M=void 0===t.grouping||void 0===t.thousands?GE:(s=YE.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",k=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?GE:(e=YE.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",O=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=BE(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,m=t.trim,v=t.type,y=("n"===v?(p=!0,v="g"):zE[v]||(void 0===g&&(g=12),m=!0,v="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),b="$"===e?i:/[%p]/.test(v)?a:"",x=zE[v],w=/[defgprs%]/.test(v);function n(t){var e,n,r,i=y,a=b;if("c"===v)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return E(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=BE(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=jE(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=HE[8+e/3];return function(t){return n(r*t)+i}}}}function qE(t,e,n){return t.querySelector(e)?at(t).select(e):at(t).append(n)}function $E(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function UE(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}bs=VE({thousands:",",grouping:[3],currency:["$",""]}),WE=bs.format,bs.formatPrefix;class XE extends cl{get child(){var t;return null==(t=this.children)?void 0:t[0]}update(t){var e,t=(this.attr(t),t)["subOptions"];null!=(e=this.child)&&e.update(t)}}class KE extends XE{update(t){var e,t=t["subOptions"];null!=(e=this.child)&&e.update(t)}}function ZE(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function QE(t,e,n){var t=t["bbox"],{position:e="top",size:r,length:i}=e,e=["top","bottom","center"].includes(e),[t,a]=e?[t.height,t.width]:[t.width,t.height],{defaultSize:n,defaultLength:o}=n.props,r=r||n||t,n=i||o||a,[t,i]=e?[n,r]:[r,n];return{orientation:e?"horizontal":"vertical",width:t,height:i,size:r,length:n}}function JE(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"];var e=t["style"],t=nt(t,["style"]);const r={};return Object.entries(t).forEach(([t,e])=>{n.includes(t)?r["show"+en(t)]=e:r[t]=e}),Object.assign(Object.assign({},r),e)}function tO(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function eO(t){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}function nO(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=jd(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=t=>!(t instanceof Date)&&"object"==typeof t&&t?t:String(t),h=n||(null==(l=a.getFormatter)?void 0:l.call(a))||u,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new k1({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),d=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return bp(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new k1({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new k1({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return gp(s)||pp(s)?c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:mp(s)&&"center"===o||pp(s)&&(null==(r=a.getTicks)?void 0:r.call(a))&&["top","bottom","center","outer"].includes(o)?1-i:i,label:u(h(eO(t),e,n)),id:String(e)}}):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:d(f(a.map(t)+r)),label:u(h(eO(t),e,n)),id:String(e)}})}function rO(t,e,n){var r;return!(gp(r=e)&&pp(r)||yp(e))&&(void 0===t?!!n.getTicks:t)}function iO(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+o0(e)]),Object.assign({},n,r)}(n,i);return"center"===i?Object.assign(Object.assign(Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(i=a)||i===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var aO,us=s=>i=>{const{labelFormatter:a,labelFilter:o=()=>!0}=i;return t=>{var[e]=t["scales"];const r=(null==(n=e.getTicks)?void 0:n.call(e))||e.getOptions().domain;var n="string"==typeof a?WE(a):a,n=Object.assign(Object.assign({},i),{labelFormatter:n,labelFilter:(t,e,n)=>o(r[e],e,r),scale:e});return s(n)(t)}};const oO=us(t=>{const{direction:o="left",important:s={},labelFormatter:l,orientation:c,position:u,size:h,style:f={},title:d,tickCount:p,tickFilter:g,tickMethod:m,transform:v,indexBBox:y}=t,b=nt(t,["direction","important","labelFormatter","order","orientation","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],r=iO(0,0,r,o,u,c),r=Object.assign(Object.assign(Object.assign({},r),f),b),a=function(t,e){var[e,n]=tO(e);return t.includes("bottom")||t.includes("top")?n:e}(u,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("number"==typeof e){var[t,s]=r.getCenter(),[l,c]=wp(r);const[u,h]=Mp(r);var r=Math.min(a,o)/2,a=l*r,o=c*r,[l,c]=[t+n,s+i],[r,e]=[Math.cos(e),Math.sin(e)];return{startPos:[l+o*r,c+o*e],endPos:[l+a*r,c+a*e],gridClosed:h-u==360,gridCenter:[t+n,i+s],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(h-u)/(n.length-1)*e)}}}return{}}(u,c,e,n),i=nO(t,i,p,l,g,m,u,n),i=y?i.map((t,e)=>{e=y.get(e);return!e||e[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:e[1]})}):i,i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:i,crossSize:h,titleText:$E(d),labelOverlap:function(t=[],e){if(0{e&&i.push(t)};return a({type:"rotate",optionalAngles:[0,15,30,45,60,90]},t),a({type:"ellipsis",minLength:20},n),a({type:"hide"},e),a({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},r),i}(v,r),grid:rO(r.grid,n,t),gridLength:a,line:!0,indexBBox:y}),r.line?null:{lineOpacity:0}),e),s);return i.labelOverlap.find(t=>"hide"===t.type)&&(i.crossSize=!1),new PM({className:"axis",style:JE(i)})}}),sO=us(t=>{const{position:o,labelFormatter:s,tickFilter:l,tickCount:c,tickMethod:u,important:h={},style:e={}}=t,f=nt(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style"]),{title:d,grid:p=!1}=e;return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],t=nO(t,i,c,s,l,u,o,n),[i,a]=wp(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=Mp(i),[l,c]=tO(i),e={center:e,radius:a,startAngle:o,endAngle:s,titleFillOpacity:0,titlePosition:"inner",line:!1,tick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(tO(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new PM({style:JE(rt({},i,e,Object.assign(Object.assign({type:"arc",data:t,titleText:$E(d),grid:p},f),h)))})}}),lO=(oO.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},sO.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},e=>(...t)=>oO(Object.assign({},{crossPadding:50},e))(...t)),cO=(lO.props=Object.assign(Object.assign({},oO.props),{defaultPosition:"bottom"}),e=>(...t)=>oO(Object.assign({},{crossPadding:10},e))(...t));cO.props=Object.assign(Object.assign({},oO.props),{defaultPosition:"left"});const uO=a=>{const{important:o={}}=a,s=nt(a,["important"]);return t=>{var e,{theme:n,coordinate:r,value:i}=t;return oO(Object.assign(Object.assign(Object.assign({},s),(e=a.orientation,(e%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&eMath.PI/2&&e<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=Mp(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{grid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,n,r,i)),o)}))(t)}};function hO(t,e,n,r,i={}){const a=(null==(e=null==(e=e["shape."+t])?void 0:e.props)?void 0:e.defaultMarker)||function(t){if(De(t))return t[t.length-1]}(t.split("."));return()=>function(t,e){var{fill:n,stroke:r,lineWidth:i,color:a}=e,o=nt(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const s=ex.get(t)||ex.get("point");return(...t)=>{return new z({style:Object.assign(Object.assign({},o),{path:s(...t),stroke:s.style.includes("stroke")?a||r:"",fill:s.style.includes("fill")?a||n:"",lineWidth:s.style.includes("lineWidth")?i||2:0})})}}(a,i)(0,0,6)}function fO(t,{scales:e,library:n,markState:r}){var i=ZE(e,"shape");const[a,o]=function(t,e){const n=ZE(t,"shape");var r=ZE(t,"color");const i=[];for(const[l,c]of e){var a=l.type,o=(0<(null==r?void 0:r.getOptions().domain.length)?null==r?void 0:r.getOptions().domain:c.data).map((t,e)=>{return n?n.map(t||"point"):(null==(t=null===l||void 0===l?void 0:l.style)?void 0:t.shape)||c.defaultShape||"point"});"string"==typeof a&&i.push([a,o])}if(0===i.length)return["point",["point"]];if(1===i.length)return i[0];if(!n)return i[0];const s=n.getOptions()["range"];return i.map(([t,e])=>{let n=0;for(let t=0;te[0]-t[0])[0][1]}(e,r),s=t["itemMarker"];return i&&!s?(t,e)=>hO(a+"."+o[e],n,0,0,{color:t.color}):"function"==typeof s?s:(t,e)=>hO(s||a+"."+o[e],n,0,0,{color:t.color})}function dO(t,e){var{labelFormatter:n=t=>""+t}=t,r=e["scales"],e={itemMarker:fO(t,e),itemMarkerSize:(t=ZE(t=r,"size"))?2*t.map(NaN):8,itemMarkerOpacity:function(t){if(t=ZE(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(r)};const i="string"==typeof n?WE(n):n,a=ZE(r,"color");t=r.find(t=>0({id:t,label:i(t),color:a.map(t)}))})}uO.props=Object.assign(Object.assign({},oO.props),{defaultPosition:"center"});const pO=l=>{const{position:c,title:u}=l,h=nt(l,["labelFormatter","layout","order","orientation","position","size","title"]),{gridCol:f,gridRow:d}=h;return t=>{var{value:e,theme:n}=t,r=e["bbox"],{width:i,height:a}=function(t,e,n){var r;if("center"===(r=e["position"])){r=t["bbox"];const{width:i,height:a}=r;return{width:i,height:a}}const{width:i,height:a}=QE(t,e,n);return{width:i,height:a}}(e,l,pO),e=UE(c,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[o,s]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(c,d,f),i=Object.assign({orientation:["right","left","center"].includes(c)?"vertical":"horizontal",width:i,height:a,gridCol:null!==f&&void 0!==f?f:s,gridRow:null!==d&&void 0!==d?d:o,rowPadding:0,colPadding:8,titleText:$E(u)},dO(l,t)),{legend:a={}}=n,s=JE(Object.assign({},a,i,h)),o=new KE({style:Object.assign(Object.assign({x:r.x,y:r.y,width:r.width,height:r.height},e),{subOptions:s})});return o.appendChild(new ek({className:"legend-category",style:s})),o}};function gO(t,e,n){var r=e["size"],t=QE(t,e,n),r=(e=r,n=xO.props.defaultLegendSize,Math.min(e,n));return e=r,r=(n=t).orientation,n.size=e,"horizontal"===(r=r)||0===r?n.height=e:n.width=e,n}function mO(t,e,n,r,i){var a,e=e.thresholds,o=(a=r,t=>({value:t/a,label:String(t)}));return Object.assign(Object.assign({},t),{color:i,data:[n,...e,r].map(o)})}function vO(t){var t=t.getOptions()["domain"],[t,e]=[t[0],Q1(t)];return[t,e]}function yO(t,e,n,r,i){const a=t["length"],o=e||(e=n||r,n=(n=i).defaultColor,i=e.getOptions(),(e=e.clone()).update(Object.assign(Object.assign({},i),{range:[$a(n).toString()]})),e);const[s,l]=vO(o);return Object.assign(Object.assign({},t),{data:o.getTicks().map(t=>({value:t})),color:new Array(a).fill(0).map((t,e)=>{var e=(l-s)/(a-1)*e+s,n=o.map(e);const i=r?r.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}function bO(t,e,n,r,i){var a=ZE(t,"color"),e=gO(e,n,r);if(a instanceof A1){var n=a.getOptions()["range"],[r,o]=vO(a);if(a instanceof L1||a instanceof N1)return mO(e,a,r,o,n);{r=e;o=a;const s=[-1/0,...o.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},r),{data:s,color:n,labelFilter:(t,e)=>0{const{labelFormatter:u,layout:h,position:f,title:d,style:p}=c,g=nt(c,["labelFormatter","layout","order","orientation","position","size","title","style"]);return({scales:t,value:e,theme:n})=>{var r=e["bbox"],{x:r,y:i,width:a,height:o}=r,s=UE(f,h),{continuousLegend:l={}}=n,l=JE(Object.assign({},l,Object.assign(Object.assign({titleText:$E(d),titleFontSize:12,handle:!1,indicator:!1,labelAlign:"value",labelFormatter:"string"==typeof u?t=>WE(u)(t.label):u},bO(t,e,c,xO,n)),p),g)),t=new XE({style:Object.assign(Object.assign({x:r,y:i,width:a,height:o},s),{subOptions:l})});return t.appendChild(new Mk({style:l})),t}},wO=(xO.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300,defaultLegendSize:60},e=>(...t)=>xO(Object.assign({},{block:!0},e))(...t)),MO=(wO.props=Object.assign(Object.assign({},xO.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),n=>t=>{var e=t["scales"],e=ZE(e,"size");return xO(Object.assign({},{type:"size",tick:!1,data:e.getOptions().domain.map((t,e)=>({value:t,label:String(t)})),labelFilter:(t,e,n)=>0===e||e===n.length-1},n))(t)}),kO=(MO.props=Object.assign(Object.assign({},xO.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>MO(Object.assign({},{block:!0},t)));function EO(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}kO.props=Object.assign(Object.assign({},xO.props),{defaultPosition:"top",defaultOrientation:"horizontal"});aO={render(t,e){const{y:n,width:r,title:i,subtitle:a}=t,o=t.style,{spacing:s=2,align:l="left"}=o,c=nt(o,["spacing","align"]);t=it(c,"title");const u=it(c,"subtitle"),h=qE(e,".title","text").attr("className","title").call(L,Object.assign(Object.assign(Object.assign({},EO(0,n,r,l)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();qE(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},EO(0,h.max[1]+s,r,l)),{fontSize:12,textBaseline:"top",text:a}),u))})}};const OO=class extends Rs{constructor(t){super(t),this.descriptor=aO}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(rt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},SO=a=>({value:t,theme:e})=>{var{x:t,y:n,width:r,height:i}=t.bbox;return new OO({style:rt({},{style:e.title},Object.assign({x:t,y:n,width:r,height:i},a))})};function _O(t){return t.getBandWidth}function AO(t,e,n){if(!_O(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Pd(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function TO(t,e,n){if(!e)return t.getOptions().domain;if(!_O(t))return o=Yd(e),n?([i]=o,r=t.getOptions()["range"],[r,a]=r,a=a{var[t,n]=a.invert(t);return[AO(o,t,e),AO(s,n,e)]},t=i([t,e],!0),e=i([n,r],!1);return[TO(o,[t[0],e[0]]),TO(s,[t[1],e[1]])]}function LO(t,e){var[t,n]=t;return[e.map(t),e.map(n)+((t=e).getStep?t.getStep():0)]}SO.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const CO=t=>{const{orientation:h,labelFormatter:f,style:d}=t,p=nt(t,["orientation","labelFormatter","size","style","position"]);return({scales:[n],value:t,theme:e,coordinate:r})=>{var t=t["bbox"],{x:t,y:i,width:a,height:o}=t,{slider:e={}}=e;const s=(null==(c=n.getFormatter)?void 0:c.call(n))||(t=>t.toString()),l="string"==typeof f?WE(f):f;var c="horizontal"===h;const u=pp(r)&&c;return new dw({className:"slider",style:Object.assign({},e,Object.assign(Object.assign({x:t,y:i,trackLength:c?a:o,orientation:h,formatter:t=>{var e=l||s,t=u?1-t:t;return e(AO(n,t,!0))}},d),p))})}},NO=(CO.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>CO(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),jO=(NO.props=Object.assign(Object.assign({},CO.props),{defaultPosition:"bottom"}),t=>CO(Object.assign(Object.assign({},t),{orientation:"vertical"}))),RO=(jO.props=Object.assign(Object.assign({},CO.props),{defaultPosition:"left"}),t=>{const{orientation:s,style:l}=t,c=nt(t,["orientation","labelFormatter","style"]);return({scales:[t],value:e,theme:n})=>{var e=e["bbox"],{x:e,y:r,width:i,height:a}=e,{scrollbar:n={}}=n,{ratio:t,range:o}=t.getOptions(),i="horizontal"===s?i:a,a=i/t,[t,o]=o,t=tRO(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),BO=(IO.props=Object.assign(Object.assign({},RO.props),{defaultPosition:"bottom"}),t=>RO(Object.assign(Object.assign({},t),{orientation:"vertical"})));BO.props=Object.assign(Object.assign({},RO.props),{defaultPosition:"left"});class DO{constructor(t){this.$value=t}static of(t){return new DO(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function FO(t,e,n){return DO.of({}).call(zO,t).call(zO,e).call(zO,n).value()}function zO(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function GO(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const WO=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],YO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,FO(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},HO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,FO(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},VO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,FO(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},qO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=pp(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,FO(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},$O=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],FO(i,n,l))},UO=($O.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],FO(i,n,l))});function XO(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function KO(t,e){var[n,r,i,t]=XO(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0{l0(b,n)},b.style.transform="scale(1, 1)",b.style.transform="none",y}}UO.props={};const e5=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:KO,i=FO(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1{return t5(t,new z({style:Object.assign({path:d[e]},GO(l,WO))}),t,u)})}}if(1{return t5(t,t,new z({style:{path:p[e],fill:h.style.fill}}),f)}),e]}}return null},n5=(e5.props={},b=>{return ti({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:i.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!gp(r))return YO(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:e=0,inset:s=0,fillOpacity:l=1,strokeOpacity:c=1,opacity:u=1}=e,{points:t,y:h,y1:f}=t;const d=hb().cornerRadius(e).padAngle(s*Math.PI/180),p=fy(r,t,[h,f]),{startAngle:g,endAngle:m}=p,v=new z({}),y=t=>{v.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=va(v);return v.style.transform="",t};e=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:c,opacity:u,offset:.01},{waveInArcAngle:m,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,FO(i,n,b));return s.onframe=function(){a.style.path=y(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=y(Object.assign(Object.assign({},p),{endAngle:m}))},s}}),r5=(n5.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,FO(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),i5=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,FO(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},a5=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],FO(i,n,o))},o5=(a5.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new z({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=YO(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),s5=(o5.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new z({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=VO(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),l5=(s5.props={},{visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1});function c5(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>c5(t,e,n,r))}function u5(t){c5(t,"visibility","hidden",!0)}function h5(t){c5(t,"visibility","visible",!0)}function f5(t){return at(t).selectAll("."+$c).nodes().filter(t=>!t.__removed__)}function d5(t,e){return p5(t,e).flatMap(({container:t})=>f5(t))}function p5(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function g5(t){return at(t).select("."+Xc).node()}function m5(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getRenderBounds();return et.__data__.color}function b5(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function x5(t){t=Array.isArray(t)?t:[t];const r=new Map(t.flatMap(e=>{return Array.from(e.markState.keys()).map(t=>[e.key+","+t.key,t.data])}));return t=>{var{index:t,markKey:e,viewKey:n}=t.__data__;return r.get(n+","+e)[t]}}function w5(s,l=(t,e)=>t,c=(t,e,n)=>t.setAttribute(e,n)){const u="__states__",h="__ordinal__",i=t=>{var{[u]:e=[],[h]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),s[e]),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){a=t,o=r;var a=null!=(a=t.style[o])?a:l5[o],o=l(i,t);c(t,r,o),r in n||(n[r]=a)}t[h]=n}},a=t=>{t[u]||(t[u]=[])};return{setState:(t,...e)=>{a(t),t[u]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[u].indexOf(r);-1!==n&&t[u].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[u].indexOf(e))}}function M5(t,e){var n=(Array.isArray(t)?t:[t]).flatMap(e=>e.marks.map(t=>[e.key+","+t.key,t.state])),r={};for(const i of e){const[l,c]=Array.isArray(i)?i:[i,{}];r[l]=n.reduce((t,e)=>{const[a,n={}]=e;e=void 0===(e=n[l])||"object"==typeof e&&0===Object.keys(e).length?c:n[l];for(const[r,o]of Object.entries(e)){const s=t[r];t[r]=(t,e,n,r)=>{var i=r.__data__.viewKey+","+r.__data__.markKey;return a!==i?null===s||void 0===s?void 0:s(t,e,n,r):"function"!=typeof o?o:o(t,e,n,r)}}return t},{})}return r}function k5(t,r){const i=new Map(t.map((t,e)=>[t,e])),a=r?t.map(r):t;return(t,e)=>{var n;return"function"!=typeof t?t:(n=i.get(e),t(r?r(e):e,n,a,e))}}function E5(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=nt(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=Yd(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t{var[,t,n]=t,[e,,,r]=e;return[t,e,r,n]})(u(s),u(r)),r=(n.moveTo(...r),n.lineTo(...i),n.lineTo(...a),n.lineTo(...o),n.closePath(),K1(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=nt(r,["fill"]),o=new z({className:"element-link",style:Object.assign({d:n.toString(),fill:i,zIndex:-2},a)});null!=(r=s.link)&&r.remove(),s.parentNode.appendChild(o),s.link=o}}},t=>{var e;null!=(e=t.link)&&e.remove(),t.link=null}]}function O5(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return gp(e)?(a=n.__data__["points"],[a,i]=pp(e)?hy(a):a,r=ey(a,a=e.getCenter()),i=ey(i,a),a=iy(r)+oy(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):pp(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function S5(t){var{background:e,scale:s,coordinate:l,valueof:c}=t,u=nt(t,["background","scale","coordinate","valueof"]);const h="element-background";if(!e)return[()=>{},()=>{}];const r=(t,e,n)=>{var r=t.invert(e),e=e+t.getBandWidth(r)/2,t=t.getStep(r)/2,r=t*n;return[e-t+r,e+t-r]},f=(t,e)=>{var n=s["x"];return _O(n)?(t=t["__data__"],t=t["x"],[n,t]=r(n,t,e),[n,t]):[0,1]},d=(t,e)=>{var n=s["y"];return _O(n)?(t=t["__data__"],t=t["y"],[n,t]=r(n,t,e),[n,t]):[0,1]},p=(t,e)=>{var n=e["padding"],[r,i]=f(t,n),[n,a]=d(t,n),t=t["__data__"],{y:t,y1:o}=t;return Fb([[r,n],[i,n],[i,a],[r,a]].map(t=>l.map(t)),{y:t,y1:o},l,e)},g=(t,e)=>{var n,r,{transform:i="scale(1.2, 1.2)",transformOrigin:a="center center",stroke:o=""}=e,e=nt(e,["transform","transformOrigin","stroke"]),i=Object.assign({transform:i,transformOrigin:a,stroke:o},e),s=t.cloneNode(!0);for([n,r]of Object.entries(i))s.style[n]=r;return s};return[e=>{e.background&&e.background.remove();var t=K1(u,t=>c(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001,strokeWidth:o=0}=t,t=nt(t,["fill","fillOpacity","zIndex","padding","strokeWidth"]),t=Object.assign(Object.assign({},t),{fill:n,fillOpacity:r,zIndex:i,padding:a,strokeWidth:o}),n=((()=>{var{x:t,y:e}=s;return[t,e].some(_O)})()?p:g)(e,t);n.className=h,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===h]}function _5(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function A5(t,e,r){return t.find(n=>Object.entries(e).every(([t,e])=>r(n)[t]===e))}function T5(e,{elements:t,datum:a,groupKey:o=t=>t,link:n=!1,background:r=!1,delay:i=60,scale:s,coordinate:l,emitter:c,state:u={}}){const h=t(e),f=new Set(h),d=Fd(h,o);t=k5(h,a);const[p,g]=E5(Object.assign({elements:h,valueof:t,link:n,coordinate:l},it(u.active,"link"))),[m,v,y]=S5(Object.assign({scale:s,coordinate:l,background:r,valueof:t},it(u.active,"background"))),{setState:b,removeState:x,hasState:w}=w5(rt(u,{active:Object.assign({},(null==(n=u.active)?void 0:n.offset)&&{transform:(...t)=>{var e=u.active.offset(...t),[,t]=t;return O5(h[t],e,l)}})}),t);let M;const k=t=>{var{target:e,nativeEvent:t=!0}=t;if(f.has(e)){M&&clearTimeout(M);var n=o(e),n=d.get(n),r=new Set(n);for(const i of h)r.has(i)?w(i,"active")||b(i,"active"):(b(i,"inactive"),g(i)),i!==e&&v(i);m(e),p(n),t&&c.emit("element:highlight",{nativeEvent:t,data:{data:a(e),group:n.map(a)}})}},E=(t=!0)=>{for(const e of h)x(e,"active","inactive"),v(e),g(e);t&&c.emit("element:unhighlight",{nativeEvent:t})},O=t=>{t=t.target;r&&!y(t)||(r||f.has(t))&&(0{E(),M=null},i)):E())},S=()=>{E()},_=(e.addEventListener("pointerover",k),e.addEventListener("pointerout",O),e.addEventListener("pointerleave",S),t=>{t=t.nativeEvent;t||E(!1)}),A=t=>{var e=t["nativeEvent"];!e&&(e=t.data["data"],t=A5(h,e,a))&&k({target:t,nativeEvent:!1})};return c.on("element:highlight",A),c.on("element:unhighlight",_),()=>{e.removeEventListener("pointerover",k),e.removeEventListener("pointerout",O),e.removeEventListener("pointerleave",S),c.off("element:highlight",A),c.off("element:unhighlight",_);for(const t of h)v(t),g(t)}}function P5(t){var{delay:s,createGroup:l,background:c=!1,link:u=!1}=t,h=nt(t,["delay","createGroup","background","link"]);return(t,e,n)=>{var{container:t,view:r,options:i}=t,{scale:a,coordinate:o}=r;return T5(g5(t),Object.assign({elements:f5,datum:x5(r),groupKey:l?l(r):void 0,coordinate:o,scale:a,state:M5(i,[["active",c?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:c,link:u,delay:s,emitter:n},h))}}function L5(t){return P5(Object.assign(Object.assign({},t),{createGroup:b5}))}function C5(t){return P5(Object.assign(Object.assign({},t),{createGroup:y5}))}function N5(e,{elements:t,datum:f,groupKey:d=t=>t,link:p=!1,single:g=!1,coordinate:n,background:r=!1,scale:i,emitter:m,state:a={}}){const v=t(e),y=new Set(v),b=Fd(v,d);t=k5(v,f);const[x,w]=E5(Object.assign({link:p,elements:v,valueof:t,coordinate:n},it(a.selected,"link"))),[M,k]=S5(Object.assign({background:r,coordinate:n,scale:i,valueof:t},it(a.selected,"background"))),{setState:E,removeState:o,hasState:O}=w5(rt(a,{selected:Object.assign({},(null==(r=a.selected)?void 0:r.offset)&&{transform:(...t)=>{var e=a.selected.offset(...t),[,t]=t;return O5(v[t],e,n)}})}),t),S=(t=!0)=>{for(const e of v)o(e,"selected","unselected"),w(e),k(e);t&&m.emit("element:unselect",{nativeEvent:!0})},s=t=>{var{target:e,nativeEvent:n=!0}=t;if(!y.has(e))return S();if(g){var[r,i,a=!0]=[t,e,n];if(O(i,"selected"))S();else{var o=d(i),o=b.get(o),s=new Set(o);for(const l of v)s.has(l)?E(l,"selected"):(E(l,"unselected"),w(l)),l!==i&&k(l);x(o),M(i),a&&m.emit("element:select",Object.assign(Object.assign({},r),{nativeEvent:a,data:{data:[f(i),...o.map(f)]}}))}}else{var[r,a,o=!0]=[t,e,n];t=d(a),t=b.get(t);const c=new Set(t);if(O(a,"selected")){if(!v.some(t=>!c.has(t)&&O(t,"selected")))return S();for(const u of t)E(u,"unselected"),w(u),k(u)}else{e=t.some(t=>O(t,"selected"));for(const h of v)c.has(h)?E(h,"selected"):O(h,"selected")||E(h,"unselected");!e&&p&&x(t),M(a)}o&&m.emit("element:select",Object.assign(Object.assign({},r),{nativeEvent:o,data:{data:v.filter(t=>O(t,"selected")).map(f)}}))}},l=(e.addEventListener("click",s),t=>{var{nativeEvent:t,data:e}=t;if(!t)for(const r of g?e.data.slice(0,1):e.data){var n=A5(v,r,f);s({target:n,nativeEvent:!1})}}),c=()=>{S(!1)};return m.on("element:select",l),m.on("element:unselect",c),()=>{for(const t of v)w(t);e.removeEventListener("click",s),m.off("element:select",l),m.off("element:unselect",c)}}function j5(t){var{createGroup:s,background:l=!1,link:c=!1}=t,u=nt(t,["createGroup","background","link"]);return(t,e,n)=>{var{container:t,view:r,options:i}=t,{coordinate:a,scale:o}=r;return N5(g5(t),Object.assign({elements:f5,datum:x5(r),groupKey:s?s(r):void 0,coordinate:a,scale:o,state:M5(i,[["selected",l?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:l,link:c,emitter:n},u))}}function R5(t){return j5(Object.assign(Object.assign({},t),{createGroup:b5}))}function I5(t){return j5(Object.assign(Object.assign({},t),{createGroup:y5}))}function B5(t){var{wait:E=20,leading:O,trailing:S=!1,labelFormatter:_=t=>""+t}=t,A=nt(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:f,x:d,series:l=[]}=t;t=f.map((t,e)=>e);const c=Yd(t.map(t=>d[t])),u=rt({},e),h=u.marks.find(t=>"line"===t.type);t=ep(zd(t,t=>ep(t,t=>+f[t])/rp(t,t=>+f[t]),t=>l[t]).values());rt(h,{scale:{y:{domain:[1/t,t]}}});const p=g5(r),g=r.getElementsByClassName($c);const m=Fd(r.getElementsByClassName(Zc),t=>t.__data__.key.split("-")[0]),v=new Vs({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},it(A,"rule"))}),y=new el({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},it(A,"label"))}),b=(v.append(y),p.appendChild(v),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Ld(c,n)]}),x=(t,e)=>{v.setAttribute("x1",t[0]),v.setAttribute("x2",t[0]),y.setAttribute("text",_(e))};let w;var M;const k=dn(t=>{t=m5(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[Sd(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(f[s]/f[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),m.get(o)||[]);for(const h of s)h.setAttribute("dy",c)}}},E,{leading:O,trailing:S});return M=[0,0],ce(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,M);x(M,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(h);t.groupBy="color",t.basis=(t,e)=>{return e[t[Sd(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",k),p.addEventListener("pointermove",k),p.addEventListener("pointerleave",k),()=>{v.remove(),p.removeEventListener("pointerenter",k),p.removeEventListener("pointermove",k),p.removeEventListener("pointerleave",k)}}}function D5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:r,update:i,container:e}=t,a=g5(e),o=rt({},r);for(const s of o.marks)s.animate=!1;const n=dn(t=>{var e,n,t=m5(a,t);t?([t,e]=t,(n=function(t){var{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);return r||(n.push(r={type:"fisheye"}),e.transform=n,t.coordinate=e,r)}(o)).focusX=t,n.focusY=e,n.visual=!0,i(o)):i(r)},l,{leading:c,trailing:u});return a.addEventListener("pointerenter",n),a.addEventListener("pointermove",n),a.addEventListener("pointerleave",n),()=>{a.removeEventListener("pointerenter",n),a.removeEventListener("pointermove",n),a.removeEventListener("pointerleave",n)}}}const F5=new Proxy({BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CHANGE_DATA:"beforechangedata",AFTER_CHANGE_DATA:"afterchangedata",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"},{get(t,e){if(e in t)return t[e]},set(){return!0}});function z5(t,e){t=t.__data__;const{markKey:n,index:r,seriesIndex:i}=t;t=e.markState;const a=Array.from(t.keys()).find(t=>t.key===n);if(a)return i?i.map(t=>a.data[t]):a.data[r]}function G5(i,a,o,s=t=>!0){return t=>{var e,n,r;s(t)&&(o.emit("plot:"+i,t),r=t["target"],r)&&({className:e,markType:n}=r,"plot"!==e)&&("element"===e?(r=Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:z5(r,a)}}),o.emit("element:"+i,r),o.emit(n+":"+i,r)):o.emit(e+":"+i,t))}}function W5(){return(t,e,n)=>{const{container:r,view:i}=t,a=G5(F5.CLICK,i,n,t=>1===t.detail),o=G5(F5.DBLCLICK,i,n,t=>2===t.detail),s=G5(F5.POINTER_TAP,i,n),l=G5(F5.POINTER_DOWN,i,n),c=G5(F5.POINTER_UP,i,n),u=G5(F5.POINTER_OVER,i,n),h=G5(F5.POINTER_OUT,i,n),f=G5(F5.POINTER_MOVE,i,n),d=G5(F5.POINTER_ENTER,i,n),p=G5(F5.POINTER_LEAVE,i,n),g=G5(F5.POINTER_UPOUTSIDE,i,n),m=G5(F5.DRAG_START,i,n),v=G5(F5.DRAG,i,n),y=G5(F5.DRAG_END,i,n),b=G5(F5.DRAG_ENTER,i,n),x=G5(F5.DRAG_LEAVE,i,n),w=G5(F5.DRAG_OVER,i,n),M=G5(F5.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",h),r.addEventListener("pointermove",f),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",m),r.addEventListener("drag",v),r.addEventListener("dragend",y),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",M),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",h),r.removeEventListener("pointermove",f),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",m),r.removeEventListener("drag",v),r.removeEventListener("dragend",y),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",M)}}}function Y5(t,e){return e?"string"==typeof e?document.querySelector(e):e:t.getRootNode().defaultView.getConfig().container}function H5({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1,mount:c,bounding:u}){var h,f,d=t.getRootNode().defaultView.getConfig().container,o=o?Y5(t,c):t,c=u||function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return{x:t,y:e,width:n-t,height:r-e}}(t),d=(u=o,t=(t=d).getBoundingClientRect(),u=u.getBoundingClientRect(),{x:t.x-u.x,y:t.y-u.y}),{tooltipElement:p=(t=o,u=n,p=r,h=s,f=l,c=c,d=d,u=new Tk({className:"tooltip",style:{x:u,y:p,container:d,data:[],bounding:c,position:h,enterable:f,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:{".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}}),t.appendChild(u.HTMLTooltipElement),u)}=o,{items:d,title:c=""}=e;p.update(Object.assign({x:n,y:r,data:d,title:c,position:s,enterable:l},void 0!==i&&{content:i(a,{items:d,title:c})})),o.tooltipElement=p}function V5({root:t,single:e,emitter:n,nativeEvent:r=!0,mount:i}){e=(e?Y5(t,i):t).tooltipElement;e&&(e.hide(),r)&&n.emit("tooltip:hide",{nativeEvent:r})}function q5(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function $5(t){var e=t["value"];return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function U5(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof y1)&&!(t instanceof d1);return i(n)?n.invert(r):r&&r!==e?r:!i(t)||(n=t.invert(e),Array.isArray(n))?null:n}function X5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e&&"transparent"!==e?e:n}=t;return t}function K5(t,e=t=>t){t=new Map(t.map(t=>[e(t),t]));return Array.from(t.values())}function Z5(n,s,l,t=n.map(t=>t.__data__)){const e=t=>t instanceof Date?+t:t;var r=K5(t.map(t=>t.title),e).filter(c0),t=t.flatMap((r,t)=>{const i=n[t],{items:e=[],title:a}=r;t=e.filter(c0);const o=void 0!==l?l:e.length<=1;return t.map(t=>{var{color:e=X5(i),name:n}=t,t=nt(t,["color","name"]),n=o?U5(s,r)||n:n||U5(s,r);return Object.assign(Object.assign({},t),{color:e,name:n||a})})}).map($5);return Object.assign(Object.assign({},0`(${e(t.name)}, ${e(t.value)}, ${e(t.color)})`)})}function Q5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function J5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function tS(t,e){return void 0===t?e:t}function eS(t){var{title:t,items:e}=t;return 0===e.length&&void 0===t}function nS(_,t){var{elements:e,sort:A,filter:T,scale:P,coordinate:L,crosshairs:C,render:N,groupName:j,emitter:R,wait:n=50,leading:r=!0,trailing:i=!1,startX:I=0,startY:B=0,body:D=!0,single:F=!0,position:z,enterable:G,mount:W,bounding:Y,style:a={}}=t,t=nt(t,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","style"]),e=e(_);const H=pp(L),V=gp(L);a=rt(a,t);const{innerWidth:q,innerHeight:Q}=L.getOptions(),$=[],U=[];for(const u of e){var o=u["__data__"],o=o["seriesX"];(o?$:U).push(u)}$.sort((t,e)=>{const n=H?0:1;var r=t=>t.getBounds().min[n];return H?r(e)-r(t):r(t)-r(e)});const J=new Map($.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Yd(n.map((t,e)=>e),t=>n[+t]),n]]})),tt=it(a,"crosshairs");t=P.x;const X=null!=t&&t.getBandWidth?t.getBandWidth()/2:0,K=t=>{var[t]=L.invert(t);return t-X},et=(t,e)=>{const n=H?1:0,r=t[n];return e.filter(t=>{var[t,e]=(t=>{var{min:t,max:e}=t.getLocalBounds();return Yd([t[n],e[n]])})(t);return r>=t&&r<=e})},s=dn(t=>{var e=m5(_,t);if(e){var n=_.getRenderBounds();const g=n.min[0],m=n.min[1],v=[e[0]-I,e[1]-B];v;var n=et(v,U),r=[],i=[];for(const b of $){var[a,o]=J.get(b),a=((t,e,n)=>{var t=K(t),[r,i]=Yd([n[0],n[n.length-1]]);return tn[+t]).center)(e,t)]})(v,a,o);if(null!==a){r.push(b);o=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,e])=>{e=e[n];return[Je(t.replace("series","")),e]}))})(b,a);const{x:g,y:m}=o;a=L.map([(g||0)+X,m||0]);i.push([o,a])}}var s=Array.from(new Set(i.map(t=>t[0].x)));const y=s[ip(s,t=>Math.abs(t-K(v)))];var s=i.filter(t=>t[0].x===y),l=[...s.map(t=>t[0]),...n.map(t=>t.__data__)],n=[...r,...n],l=Z5(n,P,j,l);if(A&&l.items.sort((t,e)=>A(t)-A(e)),T&&(l.items=l.items.filter(T)),0===n.length||eS(l))Z();else{if(D&&H5({root:_,data:l,x:e[0]+g,y:e[1]+m,render:N,event:t,single:F,position:z,enterable:G,mount:W,bounding:Y}),C){n=s.map(t=>t[1]);{l=_;e=n;s=Object.assign(Object.assign({},tt),{width:q,height:Q,startX:I,startY:B,transposed:H,polar:V});var c,{height:n,width:u,startX:h,startY:f,transposed:d,polar:p}=s,s=nt(s,["height","width","startX","startY","transposed","polar"]);const x=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},s),w=(s=e.map(t=>t[1]),e=e.map(t=>t[0]),cp(s)),M=cp(e),[k,E,O,S]=p?(s=h+u/2,e=f+n/2,p=Math.min(u,n)/2,c=iy(ey([M,w],[s,e])),[s,s+p*Math.cos(c),e,e+p*Math.sin(c)]):d?[h,h+u,w+f,w+f]:[M+h,M+h,f,f+n];(e=l.ruleY||(s=new Vs({style:Object.assign({x1:k,x2:E,y1:O,y2:S},x)}),l.appendChild(s),s)).style.x1=k,e.style.x2=E,e.style.y1=O,e.style.y2=S,l.ruleY=e}}R.emit("tooltip:show",Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:{x:AO(P.x,K(v),!0)}}}))}}},n,{leading:r,trailing:i}),Z=()=>{V5({root:_,single:F,emitter:R,mount:W}),C&&Q5(_)},l=({nativeEvent:t,data:e})=>{var n,r;t||(t=e.data["x"],e=P["x"],e=e.map(t),[t,e]=L.map([e,.5]),[n,r]=_.getRenderBounds()["min"],s({offsetX:t+n,offsetY:e+r}))},c=()=>{V5({root:_,single:F,emitter:R,nativeEvent:!1,mount:W})};return R.on("tooltip:show",l),R.on("tooltip:hide",c),_.addEventListener("pointerenter",s),_.addEventListener("pointermove",s),_.addEventListener("pointerleave",Z),()=>{_.removeEventListener("pointerenter",s),_.removeEventListener("pointermove",s),_.removeEventListener("pointerleave",Z),R.off("tooltip:show",l),R.off("tooltip:hide",c),q5(_),C&&Q5(_)}}function rS(a,{elements:t,scale:o,render:s,groupName:l,sort:c,filter:u,emitter:h,wait:e=50,leading:n=!0,trailing:r=!1,groupKey:f=t=>t,single:d=!0,position:p,enterable:g,datum:m,view:v,mount:y,bounding:b}){const x=t(a),w=new Set(x),M=Fd(x,f),k=dn(t=>{var e,n,r,i=t["target"];!w.has(i)||(e=f(i),e=1===(e=M.get(e)).length?function(n){var{title:t,items:e=[]}=t=n["__data__"],e=e.filter(c0).map(t=>{var{color:e=X5(n)}=t,t=nt(t,["color"]);return Object.assign(Object.assign({},t),{color:e})}).map($5);return Object.assign(Object.assign({},t&&{title:t}),{items:e})}(e[0]):Z5(e,o,l),c&&e.items.sort((t,e)=>c(t)-c(e)),u&&(e.items=e.items.filter(u)),eS(e))?V5({root:a,single:d,emitter:h,mount:y}):({offsetX:n,offsetY:r}=t,H5({root:a,data:e,x:n,y:r,render:s,event:t,single:d,position:p,enterable:g,mount:y,bounding:b}),h.emit("tooltip:show",Object.assign(Object.assign({},t),{nativeEvent:!0,data:{data:z5(i,v)}})))},e,{leading:n,trailing:r}),i=t=>{t=t.target;w.has(t)&&V5({root:a,single:d,emitter:h,mount:y})},E=({nativeEvent:t,data:e})=>{var n,r,i;t||(t=A5(x,e.data,m))&&({x:e,y:n,width:r,height:i}=t.getBBox(),k({target:t,offsetX:e+r/2,offsetY:n+i/2}))},O=({nativeEvent:t}={})=>{t||V5({root:a,single:d,emitter:h,nativeEvent:!1,mount:y})};return h.on("tooltip:show",E),h.on("tooltip:hide",O),a.addEventListener("pointerover",k),a.addEventListener("pointermove",k),a.addEventListener("pointerout",i),()=>{a.removeEventListener("pointerover",k),a.removeEventListener("pointermove",k),a.removeEventListener("pointerout",i),h.off("tooltip:show",E),h.off("tooltip:hide",O),q5(a)}}function iS(t){const{shared:h,crosshairs:f,series:d,item:p=()=>({}),facet:g=!1}=t,m=nt(t,["shared","crosshairs","series","name","item","facet"]);return(e,t,n)=>{var{container:r,view:i}=e;const{scale:a,markState:o,coordinate:s}=i;var l=J5(o,"seriesTooltip"),c=J5(o,"crosshairs"),r=g5(r),l=tS(d,l);if(l&&Array.from(o.values()).some(t=>{var e;return(null==(e=t.interaction)?void 0:e.seriesTooltip)&&t.tooltip})&&!g)return nS(r,Object.assign(Object.assign({},m),{elements:f5,scale:a,coordinate:s,crosshairs:tS(f,c),item:p,emitter:n}));if(l&&g){l=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const u=d5(e,t),a=l[0].view.scale;t=r.getBounds(),l=t.min[0],t=t.min[1];return nS(r.parentNode.parentNode,Object.assign(Object.assign({},m),{elements:()=>u,scale:a,coordinate:s,crosshairs:tS(f,c),item:p,startX:l,startY:t,emitter:n}))}return rS(r,Object.assign(Object.assign({},m),{datum:x5(i),elements:f5,scale:a,coordinate:s,groupKey:h?b5(i):void 0,item:p,emitter:n,view:i}))}}const aS="legend-category",oS="items-item",sS="legend-category-item-marker",lS="legend-category-item-label";function cS(t){return t.getElementsByClassName(sS)[0]}function uS(t){return t.getElementsByClassName(lS)[0]}function hS(t){return t.getElementsByClassName(oS)}function fS(t){return t.getElementsByClassName(aS)}function dS(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function pS(t,{legends:e,marker:i,label:a,datum:o,filter:r,emitter:s,channel:l,state:n={}}){const c=new Map,u=new Map,h=new Map;var{unselected:n={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=n,f={unselected:it(n,"marker")},n={unselected:it(n,"label")};const{setState:d,removeState:p}=w5(f,void 0),{setState:g,removeState:m}=w5(n,void 0),v=Array.from(e(t));let y=v.map(o);const b=()=>{for(const r of v){var t=o(r),e=i(r),n=a(r);(y.includes(t)?(p(e,"unselected"),m):(d(e,"unselected"),g))(n,"unselected")}};for(const O of v){var x=()=>{_5(t,"pointer")},w=()=>{_5(t,"default")},M=n=>ce(this,void 0,void 0,function*(){var t=o(O),e=y.indexOf(t),{nativeEvent:t=!0}=(-1===e?y.push(t):y.splice(e,1),0===y.length&&y.push(...v.map(o)),yield r(y),b(),n);t&&(y.length===v.length?s.emit("legend:reset",{nativeEvent:t}):s.emit("legend:filter",Object.assign(Object.assign({},n),{nativeEvent:t,data:{channel:l,values:y}})))});O.addEventListener("click",M),O.addEventListener("pointerenter",x),O.addEventListener("pointerout",w),c.set(O,M),u.set(O,x),h.set(O,w)}const k=n=>ce(this,void 0,void 0,function*(){var t,e=n["nativeEvent"];e||(e=n["data"],{channel:e,values:t}=e,e===l&&(y=t,yield r(y),b()))}),E=e=>ce(this,void 0,void 0,function*(){var t=e["nativeEvent"];t||(y=v.map(o),yield r(y),b())});return s.on("legend:filter",k),s.on("legend:reset",E),()=>{for(const t of v)t.removeEventListener("click",c.get(t)),t.removeEventListener("pointerenter",u.get(t)),t.removeEventListener("pointerout",h.get(t)),s.off("legend:filter",k),s.off("legend:reset",E)}}function gS(){return(t,e,r)=>{const{container:i,view:a,options:o,update:s}=t;t=fS(i);const l=(r,i)=>ce(this,void 0,void 0,function*(){var t=a["scale"];const{[r]:n}=t;t=o.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[r]:i},...e];return rt({},t,{transform:e,scale:{[r]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},o),{marks:t});return s(t)}),n=t.map(t=>{const{name:e,domain:n}=dS(t).scales[0];return pS(i,{legends:hS,marker:cS,label:uS,datum:t=>{t=t.__data__,t=t.index;return n[t]},filter:t=>l(e,t),state:t.attributes.state,channel:e,emitter:r})});return()=>{n.forEach(t=>t())}}}function mS(){return(t,e,a)=>{const{container:n,view:r,options:i}=t;t=fS(n);const o=f5(n);var s=M5(i,["active","inactive"]),l=k5(o,x5(r));const c=[];for(const d of t){const p=t=>{var e=d.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},g=dS(d).scales[0].name,m=hS(d),v=(t=>{var{scale:{[t]:t}}=r;return t})(g),y=Fd(o,t=>v.invert(t.__data__[g]));var{state:u={}}=d.attributes,{inactive:u={}}=u;const{setState:b,removeState:x}=w5(s,l);var h={inactive:it(u,"marker")},u={inactive:it(u,"label")};const{setState:w,removeState:M}=w5(h),{setState:k,removeState:E}=w5(u),O=t=>{for(const r of m){var e=cS(r),n=uS(r);(r===t||null===t?(M(e,"inactive"),E):(w(e,"inactive"),k))(n,"inactive")}},S=(t,e)=>{var n=p(e),r=new Set(y.get(n));for(const i of o)r.has(i)?b(i,"active"):b(i,"inactive");O(e);var{nativeEvent:e=!0}=t;e&&a.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:e,data:{channel:g,value:n}}))},_=new Map;for(const L of m){var f=t=>{S(t,L)};L.addEventListener("pointerover",f),_.set(L,f)}const A=t=>{for(const e of o)x(e,"inactive","active");O(null);var{nativeEvent:t=!0}=t;t&&a.emit("legend:unhighlight",{nativeEvent:t})},T=t=>{var{nativeEvent:t,data:e}=t;if(!t){const{channel:n,value:r}=e;n===g&&(t=m.find(t=>p(t)===r))&&S({nativeEvent:!1},t)}},P=t=>{t=t.nativeEvent;t||A({nativeEvent:!1})};d.addEventListener("pointerleave",A),a.on("legend:highlight",T),a.on("legend:unhighlight",P);c.push(()=>{d.removeEventListener(A),a.off("legend:highlight",T),a.off("legend:unhighlight",P);for(var[t,e]of _)t.removeEventListener(e)})}return()=>c.forEach(t=>t())}}function vS(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}const yS=qb(t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,handleSize:s=10,document:l}=e,c=nt(e,["x","y","width","height","class","renders","handleSize","document"]);if(l&&void 0!==i&&void 0!==a&&void 0!==n&&void 0!==r){var u=s/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));n=t.handle;return n.attr(e),n},f=it(h0(c,"handleNW","handleNE"),"handleN"),{render:d=h}=f,f=nt(f,["render"]),p=it(c,"handleE"),{render:g=h}=p,p=nt(p,["render"]),m=it(h0(c,"handleSE","handleSW"),"handleS"),{render:v=h}=m,m=nt(m,["render"]),y=it(c,"handleW"),{render:b=h}=y,y=nt(y,["render"]),x=it(c,"handleNW"),{render:w=h}=x,x=nt(x,["render"]),M=it(c,"handleNE"),{render:k=h}=M,M=nt(M,["render"]),E=it(c,"handleSE"),{render:O=h}=E,E=nt(E,["render"]),S=it(c,"handleSW"),{render:h=h}=S,S=nt(S,["render"]);var _=i=>()=>{return new(qb(t=>{return e=i,n=(t=t).id,r=nt(t.attributes,["x","y"]),(e=e(t,Object.assign({x:0,y:0},r),l)).id=n,void(e.style.draggable=!0);var e,n,r}))({})},t=at(t).attr("className",o).style("x",n).style("y",r).style("draggable",!0);t.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(vS,Object.assign({width:i,height:a},h0(c,"handle"))),t.maybeAppend("handle-n",_(d)).style("x",u).style("y",-u).style("width",i-s).style("height",s).style("fill","transparent").call(vS,f),t.maybeAppend("handle-e",_(g)).style("x",i-u).style("y",u).style("width",s).style("height",a-s).style("fill","transparent").call(vS,p),t.maybeAppend("handle-s",_(v)).style("x",u).style("y",a-u).style("width",i-s).style("height",s).style("fill","transparent").call(vS,m),t.maybeAppend("handle-w",_(b)).style("x",-u).style("y",u).style("width",s).style("height",a-s).style("fill","transparent").call(vS,y),t.maybeAppend("handle-nw",_(w)).style("x",-u).style("y",-u).style("width",s).style("height",s).style("fill","transparent").call(vS,x),t.maybeAppend("handle-ne",_(k)).style("x",i-u).style("y",-u).style("width",s).style("height",s).style("fill","transparent").call(vS,M),t.maybeAppend("handle-se",_(O)).style("x",i-u).style("y",a-u).style("width",s).style("height",s).style("fill","transparent").call(vS,E),t.maybeAppend("handle-sw",_(h)).style("x",-u).style("y",a-u).style("width",s).style("height",s).style("fill","transparent").call(vS,S)}});function bS(l,t){var{brushed:a=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(l),brushRegion:c=(t,e,n,r,i)=>[t,e,n,r],reverse:u=!1,fill:n="#777",fillOpacity:r="0.3",stroke:i="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=t,f=nt(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let d=null,p=null,g=null,m=null,v=null,y=!1;const[b,x,w,M]=s,k=(_5(l,"crosshair"),l.style.draggable=!0,(t,e)=>{if(m&&m.remove(),v&&v.remove(),d=[t,e],u)return I();B()}),I=()=>{v=new z({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:i,pointerEvents:"none"})}),m=new yS({style:{x:0,y:0,width:0,height:0,draggable:!0,document:l.ownerDocument},className:"mask"}),l.appendChild(v),l.appendChild(m)},B=()=>{m=new yS({style:Object.assign(Object.assign({document:l.ownerDocument,x:0,y:0},f),{fill:n,fillOpacity:r,stroke:i,draggable:!0}),className:"mask"}),l.appendChild(m)},E=(t=!0)=>{m&&m.remove(),v&&v.remove(),d=null,p=null,g=null,y=!1,m=null,v=null,e(t)},O=(t,e,n=!0)=>{var[t,e,r,i]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,r,i]=c(t,e,r,i,s);return(u?F:D)(t,e,r,i),a(t,e,r,i,n),[t,e,r,i]},D=(t,e,n,r)=>{m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},F=(t,e,n,r)=>{v.style.d=` M${b},${x}L${w},${x}L${w},${M}L${b},${M}Z M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z `,m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},S={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},_=t=>T(t)||A(t),A=t=>{t=t.id;return-1!==h.indexOf(t)&&new Set(Object.keys(S)).has(t)},T=t=>t===m.getElementById("selection"),P=t=>{var e=t["target"],[t,n]=v5(l,t);m&&_(e)?_(e)&&(g=[t,n]):(k(t,n),y=!0)},L=t=>{var e,n,r,i,a,o,s=t["target"],t=v5(l,t);if(d)return g?T(s)?(e=(t,e,n,r,i)=>t+e{var e,n,r,i;g?(g=null,{x:e,y:r,width:n,height:i}=m.style,d=[e,r],p=[e+n,r+i]):(p=v5(l,t),[e,n,r,i]=O(d,p),y=!1,o(e,n,r,i,t))},N=t=>{t=t.target;m&&!_(t)&&E()},j=t=>{t=t.target;m&&_(t)&&!y?T(t)?_5(l,"move"):A(t)&&_5(l,S[t.id].cursor):_5(l,"crosshair")},R=()=>{_5(l,"default")};return l.addEventListener("dragstart",P),l.addEventListener("drag",L),l.addEventListener("dragend",C),l.addEventListener("click",N),l.addEventListener("pointermove",j),l.addEventListener("pointerleave",R),{mask:m,move(t,e,n,r,i=!0){m||k(t,e),d=[t,e],p=[n,r],O([t,e],[n,r],i)},remove(){m&&E(!1)},destroy(){m&&E(!1),_5(l,"default"),l.removeEventListener("dragstart",P),l.removeEventListener("drag",L),l.removeEventListener("dragend",C),l.removeEventListener("click",N),l.removeEventListener("pointermove",j),l.removeEventListener("pointerleave",R)}}}function xS(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function wS(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:a,brushRegion:o,extent:s,reverse:l,scale:c,coordinate:u,series:h=!1,key:d=t=>t,bboxOf:f=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:p={},emitter:g}=e,e=nt(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const m=n(t),v=i(t),y=v.flatMap(n);i=k5(m,a),n=it(e,"mask");const{setState:b,removeState:x}=w5(p,i),w=new Map,{width:M,height:k,x:E=0,y:O=0}=f(t);a=s||[0,0,M,k];const S=()=>{for(const t of[...m,...y])x(t,"active","inactive")},_=(t,e,n,r)=>{var i;for(const u of v)null!=(i=u.brush)&&i.remove();var a=new Set;for(const h of m){var{min:o,max:s}=h.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r{for(const t of m)x(t,"inactive");for(const e of w.values())e.remove();w.clear()},T=(t,e,n,r)=>{var i;for(const o of m){var a=w.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),w.set(a,i),i);a.style.clipPath=new Js({style:{x:t+E,y:e+O,width:n-t,height:r-e}}),b(o,"inactive"),b(a,"active")}},P=bS(t,Object.assign(Object.assign({},n),{extent:a,brushRegion:o,reverse:l,selectedHandles:r,brushended:t=>{var e=h?A:S;t&&g.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{var a=PO(t,e,n,r,c,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:a}}),(h?T:_)(t,e,n,r)}})),L=({nativeEvent:t,data:e})=>{var n,r;t||(t=e["selection"],[e,t,n,r]=function(t,e,n){var{x:e,y:r}=e,[t,i]=t,t=LO(t,e),e=LO(i,r),i=[t[0],e[0]],r=[t[1],e[1]],[t,e]=n.map(i),[i,n]=n.map(r);return[t,e,i,n]}(t,c,u),P.move(e,t,n,r,!1))},C=(g.on("brush:highlight",L),()=>P.remove()),N=(g.on("brush:remove",C),P.destroy.bind(P));return P.destroy=()=>{g.off("brush:highlight",L),g.off("brush:remove",C),N()},P}function MS(t){var{facet:g,brushKey:m}=t,v=nt(t,["facet","brushKey"]);return(t,e,n)=>{var r,i,a,o,{container:s,view:l,options:c}=t,s=g5(s),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},h=["active",["inactive",{opacity:.5}]],{scale:f,coordinate:d}=l;if(g)return r=(o=s.getBounds()).min[0],i=o.min[1],a=o.max[0],o=o.max[1],wS(s.parentNode.parentNode,Object.assign(Object.assign({elements:()=>d5(t,e),datum:x5(p5(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[r,i,a,o],state:M5(p5(t,e).map(t=>t.options),h),emitter:n,scale:f,coordinate:d,selectedHandles:void 0},u),v));const p=wS(s,Object.assign(Object.assign({elements:f5,key:t=>t.__data__.key,siblings:()=>{return xS(t,e,m).map(t=>g5(t.container))},datum:x5([l,...xS(t,e,m).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:M5([c,...xS(t,e,m).map(t=>t.options)],h),emitter:n,scale:f,coordinate:d,selectedHandles:void 0},u),v));return s.brush=p,()=>p.destroy()}}function kS(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function ES(t){return MS(Object.assign(Object.assign({},t),{brushRegion:kS,selectedHandles:["handle-e","handle-w"]}))}function OS(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function SS(t){return MS(Object.assign(Object.assign({},t),{brushRegion:OS,selectedHandles:["handle-n","handle-s"]}))}const _S="axis",AS="axis-hot-area";function TS(t){return t.getElementsByClassName(_S)}function PS(t){return t.getElementsByClassName("axis-line")[0]}function LS(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function CS(t,e){var{cross:n,offsetX:i}=e,e=nt(e,["cross","offsetX","offsetY"]),r=LS(t),[t]=PS(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:OS,hotZone:new Js({className:AS,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function NS(t,e){var{offsetY:i,cross:n=!1}=e,e=nt(e,["offsetY","offsetX","cross"]),r=LS(t),[,t]=PS(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:kS,hotZone:new Js({className:AS,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function jS(t,e){var{axes:n,elements:r,points:i,horizontal:s,datum:a,offsetY:o,offsetX:l,reverse:c=!1,state:u={},emitter:h,coordinate:f}=e,e=nt(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const d=r(t),p=n(t),{setState:g,removeState:m}=w5(u,k5(d,a)),v=new Map;var y=it(e,"mask");const b=p.map(t=>t.attributes.scale),x=t=>2{w.clear();for(let t=0;t{var n=[];for(const r of d)(t=>Array.from(v.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(r))?(g(r,"active"),n.push(r)):g(r,"inactive");w.set(t,((t,e)=>{const n=b[e],{name:r}=n.getOptions(),i=t.map(t=>{const e=t.__data__;return n.invert(e[r])});return x(TO(n,i))})(n,t)),e&&h.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!E)return Array.from(w.values());var t,e,n=[];for([t,e]of w){var r=b[t].getOptions()["name"];"x"===r?n[0]=e:n[1]=e}return n})()}})}),E=p.some(s)&&p.some(t=>!s(t)),O=[];for(let a=0;a{t=t.nativeEvent;t||O.forEach(t=>t.remove())},A=(t,e,n)=>{var{height:r,width:i}=f.getOptions(),e=e.clone();return s(n)?e.update({range:[0,i]}):e.update({range:[r,0]}),e.map(t)},T=t=>{var e=t["nativeEvent"];if(!e){var n=t.data["selection"];for(let t=0;t{var[t,r]=t,t=A(t,e,n),e=A(r,e,n)+((r=e).getStep?r.getStep():0);return s(n)?[t,-1/0,e,1/0]:[-1/0,t,1/0,e]})(i,r,o),!1)):a.remove()}}};return h.on("brushAxis:remove",_),h.on("brushAxis:highlight",T),()=>{O.forEach(t=>t.destroy()),h.off("brushAxis:remove",_),h.off("brushAxis:highlight",T)}}function RS(l){return(t,e,n)=>{var{container:t,view:r,options:i}=t,{x:a,y:o}=g5(t).getBBox(),s=r["coordinate"];return jS(t,Object.assign({elements:f5,axes:TS,offsetY:o,offsetX:a,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:x5(r),state:M5(i,["active",["inactive",{opacity:.5}]]),coordinate:s,emitter:n},l))}}function IS(t,e){var{filter:a,reset:n,brushRegion:r,extent:i,reverse:o,emitter:s,selection:l}=e,e=it(nt(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:c,height:u}=t.getBBox(),i=i||[0,0,c,u];const h=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n{t||(t=e["selection"],a(t,{nativeEvent:!1}))};return s.on("brush:filter",p),()=>{f.destroy(),s.off("brush:filter",p),t.removeEventListener("click",d)}}function BS(t){var{hideX:f=!0,hideY:d=!0}=t,p=nt(t,["hideX","hideY"]);return(t,e,a)=>{const{container:n,view:r,options:o,update:s}=t;t=g5(n);let l=!1,c=!1,u=r;var{scale:i,coordinate:h}=r;return IS(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{var{scale:i,coordinate:a}=u;return PO(t,e,n,r,i,a)},filter:(r,i)=>ce(this,void 0,void 0,function*(){if(!c){c=!0;const[e,n]=r;var t=o["marks"],t=t.map(t=>rt({axis:Object.assign(Object.assign({},f&&{x:{transform:[{type:"hide"}]}}),d&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:e},y:{domain:n}}})),t=(a.emit("brush:filter",Object.assign(Object.assign({},i),{data:{selection:[e,n]}})),Object.assign(Object.assign({},o),{marks:t,clip:!0})),t=yield s(t);u=t.view,c=!1,l=!0}}),reset:t=>{var e,n;!c&&l&&(e=r["scale"],{x:e,y:n}=e,e=e.getOptions().domain,n=n.getOptions().domain,a.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[e,n]}})),l=!1,u=r,s(o))},extent:void 0,emitter:a,scale:i,coordinate:h},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),p))}}function DS(t){return BS(Object.assign(Object.assign({hideX:!0},t),{brushRegion:kS}))}function FS(t){return BS(Object.assign(Object.assign({hideY:!0},t),{brushRegion:OS}))}const zS="slider";function GS(t){return[t[0],t[t.length-1]]}function WS({channelDomain:S,className:_=zS,prefix:A="slider",setValue:T=(t,e)=>t.setValues(e),hasState:P=!1,wait:L=50,leading:C=!0,trailing:N=!1}){return(t,e,c)=>{const{container:n,view:r,options:u,update:h}=t;t=n.getElementsByClassName(_);if(!t.length)return()=>{};let f=!1;const{scale:i,coordinate:a}=r,{x:o,y:s}=i,l=pp(a);const d=new Map,p=new Set;S=S||{x:o.getOptions().domain,y:s.getOptions().domain};for(const v of t){const y=v.attributes["orientation"],[b,x]=(m=y,g=void 0,g="vertical"===m?"y":"x",m="vertical"===m?"x":"y",l?[m,g]:[g,m]),w=""+A+en(b)+":filter",M="x"===b,k=o.getOptions()["ratio"],E=s.getOptions()["ratio"],O=t=>{var e,n;return t.data?(e=t.data["selection"],[e=GS(S.x),n=GS(S.y)]=e,M?[TO(o,e,k),TO(s,n,E)]:[TO(s,n,E),TO(o,e,k)]):(n=t.detail["value"],[function(t,e,n){var[t,r]=t;return TO(e,[AO(e,(n=n?t=>1-t:t=>t)(t),!0),AO(e,n(r),!1)])}(n,i[b],l&&"horizontal"===y),S[x]])};var g=dn(l=>ce(this,void 0,void 0,function*(){var t,e,n,r,i,a,o,s;f||(f=!0,{nativeEvent:t=!0}=l,[e,s]=O(l),S[b]=e,S[x]=s,[n,r,i,a=!1]=[u,{[b]:{domain:e},[x]:{domain:s}},A,P],o=(o=n["marks"]).map(t=>rt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:r,[i]:Object.assign(Object.assign({},t[i].x&&{x:Object.assign({preserve:!0},a&&{ratio:null})}),t[i].y&&{y:Object.assign({preserve:!0},a&&{ratio:null})}),animate:!1})),n=Object.assign(Object.assign({},n),{marks:o,clip:!0,animate:!1}),t&&(o=M?e:s,s=M?s:e,c.emit(w,Object.assign(Object.assign({},l),{nativeEvent:t,data:{selection:[GS(o),GS(s)]}}))),yield h(n),f=!1)}),L,{leading:C,trailing:N}),m=t=>{var e,n=t["nativeEvent"];n||(n=t["data"],t=n["selection"],[t,e]=t,v.dispatchEvent(new cs("valuechange",{data:n,nativeEvent:!1})),n=M?LO(t,o):LO(e,s),T(v,n))};c.on(w,m),v.addEventListener("valuechange",g),d.set(v,g),p.add([w,m])}return()=>{for(var[t,e]of d)t.removeEventListener("valuechange",e);for(var[n,r]of p)c.off(n,r)}}}const YS="g2-scrollbar";function HS(o={}){return(t,e,n)=>{var r,{view:i,container:a}=t;return a.getElementsByClassName(YS).length?(a=i["scale"],{x:i,y:a}=a,r={x:i.getOptions().domain,y:a.getOptions().domain},i.update({domain:i.getOptions().expectedDomain}),a.update({domain:a.getOptions().expectedDomain}),WS(Object.assign(Object.assign({},o),{channelDomain:r,className:YS,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0])}))(t,e,n)):()=>{}}}const VS={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function qS(t){return"text"===t.nodeName&&!!t.isOverflowing()}function $S(t){var{offsetX:f=8,offsetY:d=8}=t,r=nt(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=it(r,"tip"),h=new Set,e=t=>{var e,n,r,i,a,o=t["target"];qS(o)?({offsetX:e,offsetY:n}=t,e=e+f-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new Gs({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},VS),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}`),x:e,y:n}}),s.appendChild(a),o.tip=a,h.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];qS(e)?e.tip&&(e.tip.remove(),e.tip=null,h.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),h.forEach(t=>t.remove())}}}function US(n){return(t,...e)=>rt({},n(t,...e),t)}function XS(n){return(t,...e)=>rt({},t,n(t,...e))}function KS(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=nt(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const ZS=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:o=0,y:s=0,width:l,height:c,data:u}=t;return e.map(t=>{var{data:e,x:n,y:r,width:i,height:a}=t,t=nt(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:KS(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},QS=(ZS.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var f=r.map(t=>h*(t/u)),d=[];let p=e[o]||0;for(let t=0;tt=>{var e=t["children"],t=nt(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:h={},transform:f=[]}=t,n=nt(t,["data","scale","axis","legend","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=nt(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:KS(e,s),scale:rt({},l,n),encode:rt({},h,a),transform:[...f,...o],axis:!(!r||!c)&&rt({},c,r),legend:!(!i||!u)&&rt({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),t3=(JS.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,margin:d,marginLeft:p,marginBottom:g,marginTop:m,marginRight:v,data:y,coordinate:b,theme:x,component:w,interaction:M,x:k,y:E,key:O,frame:S,title:_,labelTransform:A,parentKey:T,clip:P,viewStyle:L}=t,t=nt(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip","viewStyle"]);return[{type:"standardView",x:k,y:E,key:O,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:M,frame:S,title:_,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:m,marginRight:v,parentKey:T,clip:P,style:L,marks:[Object.assign(Object.assign({},t),{key:O+"-0",data:y})]}]}),e3=(t3.props={},US(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Fd(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),n3=US(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:f,encode:d={},scale:n={},legend:p={}}=r.shift();var s=d["color"],l=n["color"],c=p["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(f)&&r.push(...f)}var t="string"==typeof i?i:"",[u,h]=void 0!==(u=null==(u=null===n||void 0===n?void 0:n.color)?void 0:u.domain)?[u]:void 0===i?[void 0]:(u="function"==typeof i?i:t=>t[i],(u=e.map(u)).some(t=>"number"==typeof t)?[jd(u)]:[Array.from(new Set(u)),"ordinal"]);return{encode:{color:i},scale:{color:rt({},a,{domain:u,type:h})},legend:{color:rt({title:t},o)}}}),r3=US(()=>({animate:{enterType:"fadeIn"}})),i3=XS(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),a3=XS(()=>({type:"cell"})),o3=XS(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),s3=XS((t,c=function(t){t=t.points;return sy(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?l3(a,e):(t=e.length?void 0:null,rt({title:r===i-1&&void 0,grid:t},a))}},M=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?l3(r,e):(n=e.length?void 0:null,rt({title:0===t&&void 0,grid:n},r))}},k={})=>{const{data:e,encode:n,children:u,scale:r,x:E=0,y:O=0,shareData:h=!1,key:S}=t,_=e["value"],{x:A,y:T}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Z1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[T]:e}=t,t=void 0===A||t===n,e=void 0===T||e===r;return t&&e}).map(t=>_.filter(t)),y=h?ep(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:T,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=nt(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:T?5:void 0}},r=r?g:0===g.length?[]:_,l={color:{domain:P}},o={x:c3(o,w)(p,r),y:c3(a,M)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+m+E,y:h+v+O,parentKey:S,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:y,scale:rt(s,e,l),axis:rt({},i,o),legend:!1},t),k)})})}}});function l3(t,e){return e.length?rt({title:!1,tick:null,label:null},t):rt({title:!1,tick:null,label:null,grid:null},t)}function c3(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const u3=()=>t=>{return[DO.of(t).call(a3).call(n3).call(r3).call(e3).call(i3).call(o3).call(s3).value()]},h3=(u3.props={},US(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),f3=XS(t=>{const{data:w,children:c,x:M=0,y:k=0,key:E}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:v,paddingTop:y}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Z1(t);const s=t.map(({points:t})=>sy(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],[p,g]=l[c],m=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=nt(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return l3(r,e)})(m,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return l3(n,e)})(m,w)};return Object.assign({data:w,parentKey:E,key:i+"-"+c,x:u+v+M,y:h+y+k,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:rt({x:{facet:!1},y:{facet:!1}},e),axis:rt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:rt({},a,{x:p,y:g})},t)})})}}}),d3=XS(t=>{var e=t["encode"],t=nt(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=nt(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const p3=()=>t=>{return[DO.of(t).call(a3).call(n3).call(f3).call(d3).call(r3).call(i3).call(h3).value()]},g3=US(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),m3=US(t=>({coordinate:{type:"polar"}})),v3=t=>{var e=t["encode"],t=nt(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function y3(t){return t=>null}function b3(t){var t=t["points"],[t,e,n,r]=t,i=ry(t,r),t=ey(t,r),r=oy(t,ey(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=ay(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const x3=()=>t=>{return[DO.of(t).call(a3).call(v3).call(n3).call(m3).call(o3).call(s3,b3,y3,y3,{frame:!1}).call(r3).call(i3).call(g3).value()]};const w3=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],h=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=rt({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{y1:k3(O3(t,0))}})]};function T3(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=R(r,t))?void 0:t[0]]}).filter(([,t])=>c0(t));return Array.from(Fd(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function P3(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Od(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>B3(t=>r(e[t]))):"series"===t?N3:"value"===t?j3:"sum"===t?R3:"maxIndex"===t?I3:()=>null}function L3(t,e){for(const n of t)n.sort(e)}function C3(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function N3(t,e,n){return B3(t=>n[t])}function j3(t,e,n){return B3(t=>e[t])}function R3(t,n,e){t=Z1(t),t=Array.from(Fd(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return B3(t=>r.get(e[t]))}function I3(t,n,e){t=Z1(t),t=Array.from(Fd(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,np(e,t=>n[t])]));return B3(t=>r.get(e[t]))}function B3(n){return(t,e)=>Od(n(t),n(e))}A3.props={};const D3=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:L=!1,y:C="y",y1:N="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=j?S3(r,"series","color"):R(r,"color"),c=T3(T,t,e),n=P3(P)(n,a,r),u=(n&&L3(c,n),new Array(t.length)),h=new Array(t.length),f=new Array(t.length),d=[],p=[];for(const O of c){L&&O.reverse();var g=s?+s[O[0]]:0,m=[],v=[];for(const S of O){var y=f[S]=+a[S]-g;y<0?v.push(S):0<=y&&m.push(S)}var b=0k.has(e),last:(t,e)=>E.has(e)},i)})]}};function F3(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}D3.props={};const z3=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(F3)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",D3({groupBy:r})(t,e,n))},G3=(z3.props={},(t={})=>{const{channel:s="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if(p0(r))return[t,e];r=r.title;if(void 0!==r)return[t,e];var i=Object.keys(n).filter(t=>t.startsWith(s)).filter(t=>!n[t].inferred).map(t=>R(n,t)).filter(([t])=>t).map(t=>t[0]);if(0===i.length)return[t,e];var a=[];for(const o of t)a[o]={value:i.map(t=>t[o]).join(", ")};return[t,rt({},e,{tooltip:{title:a}})]}}),W3=(G3.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{x:k3(O3(t,0))},scale:{x:{guide:null}}})]}),Y3=(W3.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{y:k3(O3(t,0))},scale:{y:{guide:null}}})]}),H3=(Y3.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,rt({},e,{encode:{size:E3(O3(t,3))}})]}),V3=(H3.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=nt(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,rt({},e,{encode:{key:M3(r)}})]}),q3=(V3.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=R(n,"color"),[t,rt({},e,{encode:{series:M3(r,i)}})])}),$3=(q3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(_3)?[t,e]:[t,rt({},e,{encode:{y:M3(n)}})]}),U3=($3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(_3)?[t,e]:[t,rt({},e,{encode:{x:M3(n)}})]}),X3=(U3.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,rt({},e,{encode:{y1:M3([...r])}})])}),K3=(X3.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,rt({},e,{encode:{x1:M3([...r])}})])}),Z3=(K3.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return p0(n)||({items:r=[]}=n,!r)||0Object.keys(a).filter(t=>t.startsWith(e)).map(t=>{var{field:e,value:n,inferred:r=!1,aggregate:i}=a[t];return r?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t)),[t,rt({},e,{tooltip:{items:r}})])}}),Q3=(Z3.props={},()=>(t,e)=>[t,rt({scale:{x:{padding:0},y:{padding:0}}},e)]),J3=(Q3.props={},()=>(t,e)=>{var{style:n={}}=e,r=nt(e,["data","style"]),{x:i,y:a}=n,n=nt(n,["x","y"]);return null==i||null==a?[t,e]:[[0],rt({},r,{data:[0],cartesian:!0,encode:{x:M3([i||0]),y:M3([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),t_=(J3.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,rt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),e_=(t_.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(_3)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,rt({},e,{encode:{x:M3(n),y:M3(r)}})])}),n_=(e_.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,rt({},e,{encode:{series:E3(O3(t,void 0))}})]:[t,e]}),r_=(n_.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:h,padding:f}=t;return nt(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=S3(r,"series","color"),o=C3(r,i),i=T3(c,t,e),n=P3(h)(n,a,r),s=(n&&L3(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:m=null,reverse:v=!1,duration:y}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,R(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,h]of r){var a=[];for(const n of i){var o=Array.from(Fd(n,t=>h[t]).values());a.push(...o)}i=a}if(m){const[f]=R(e,m);f&&i.sort((t,e)=>g(t,f)-g(e,f)),v&&i.reverse()}r=(y||3e3)/i.length;const[s]=y?[O3(n,r)]:S3(e,"enterDuration",O3(n,r));var[l]=S3(e,"enterDelay",O3(n,0)),c=new Array(n.length);for(let t=0,e=0;t+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,rt({},t,{encode:{enterDuration:E3(s),enterDelay:E3(c)}})]}});i_.props={};const a_=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=nt(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=T3(p,e,t),l="function"==typeof(f=g)?f:{min:(t,e)=>rp(t,t=>e[+t]),max:(t,e)=>ep(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>cp(t,t=>e[+t]),median:(t,e)=>up(t,t=>e[+t]),sum:(t,e)=>dp(t,t=>e[+t]),deviation:(t,e)=>Nd(t,t=>e[+t])}[f]||ep;for(const e of i){var c=l(e,o);for(const d of e)for(let t=0;t[t,M3(e,R(n,t)[1])]))},!f&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function o_(t,e,n){return null===t?[-.5,.5]:(t=C3(t,e),[-(e=new h1({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function s_(t,e,n){return e*(1-t)+n*t}a_.props={};const l_=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=R(n,"x"),[n]=R(n,"y");const o=o_(a,r,l),s=o_(n,i,c);a=t.map(()=>s_(u(),...s)),r=t.map(()=>s_(u(),...o));return[t,rt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:M3(a),dx:M3(r)}})]}},c_=(l_.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=R(n,"x");const i=o_(n,r,a);n=t.map(()=>s_(o(),...i));return[t,rt({scale:{x:{padding:.5}}},e,{encode:{dx:M3(n)}})]}}),u_=(c_.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=nt(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=T3(g,e,t),s=new Array(o.length);for(let t=0;ti.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t[t,M3(e,R(n,t)[1])]))})]}}),h_=(u_.props={},(t={})=>{const{groupBy:u="x",series:h=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(h?S3(n,"series","color"):R(n,"color"),T3(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;ne!==n));a[s]=r[s]>l?l:r[s]}}return[t,rt({},e,{encode:{y1:M3(a,i)}})]}});function f_(t,e){return[t[0]]}function d_(t,e){return[t[t.length-1]]}function p_(t,e){return[t[np(t,t=>e[t])]]}function g_(t,e){return[t[ip(t,t=>e[t])]]}h_.props={};const m_=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=T3(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:f_,last:d_,max:p_,min:g_}[n]||f_;return[t.flatMap(t=>i(t,r)),e]}},v_=(m_.props={},(t={})=>{var e=t["selector"],t=nt(t,["selector"]);return m_(Object.assign({channel:"x",selector:e},t))}),y_=(v_.props={},(t={})=>{var e=t["selector"],t=nt(t,["selector"]);return m_(Object.assign({channel:"y",selector:e},t))});function b_(e){return t=>null===t?e:e+" of "+t}function x_(){return[(t,e)=>cp(t,t=>+e[t]),b_("mean")]}function w_(){return[(t,e)=>up(t,t=>+e[t]),b_("median")]}function M_(){return[(t,e)=>ep(t,t=>+e[t]),b_("max")]}function k_(){return[(t,e)=>rp(t,t=>+e[t]),b_("min")]}function E_(){return[(t,e)=>t.length,b_("count")]}function O_(){return[(t,e)=>dp(t,t=>+e[t]),b_("sum")]}function S_(){return[(t,e)=>e[t[0]],b_("first")]}function __(){return[(t,e)=>e[t[t.length-1]],b_("last")]}y_.props={};const A_=(t={})=>{const i=t["groupBy"],a=nt(t,["groupBy"]);return(t,e)=>{const{data:s,encode:l}=e,c=i(t,e);if(!c)return[t,e];var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:x_,max:M_,count:E_,first:S_,last:__,sum:O_,min:k_,median:w_}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=R(l,t);e=e;var e=(o=a)||((e=e["from"])?([,e]=R(l,e),e):o),o=c.map(t=>n(t,null!==i&&void 0!==i?i:s));return[t,Object.assign(Object.assign({},(t=o,o=(null==r?void 0:r(e))||e,t=M3(t,o),Object.assign(Object.assign({},t),{constant:!1}))),{aggregate:!0})]}),n=Object.keys(l).map(t=>{const[e,n]=R(l,t);return[t,M3(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[Z1(c),rt({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},T_=(A_.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=nt(t,["channels"]);return A_(Object.assign(Object.assign({},e),{groupBy:(t,e)=>T3(n,t,e)}))}),P_=(T_.props={},(t={})=>T_(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),L_=(P_.props={},(t={})=>T_(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),C_=(L_.props={},(t={})=>T_(Object.assign(Object.assign({},t),{channels:["color"]})));function N_(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=nt(n,["reverse","slice","channel"]),{encode:o,scale:s={}}=e,s=null==(s=s[a])?void 0:s.domain;const[l]=R(o,a);var c,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=R(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>ep(t,t=>+a[t]);if("min"===i)return t=>rp(t,t=>+a[t]);if("sum"===i)return t=>dp(t,t=>+a[t]);if("median"===i)return t=>up(t,t=>+a[t]);if("mean"===i)return t=>cp(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),o=function(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(t=>r.has(e[t]))}(t,l,s),n=(s=o,o=t=>l[t],(2!==(c=n).length?Yd(zd(s,c,o),([t,e],[n,r])=>Od(e,r)||Od(t,n)):Yd(Fd(s,o),([t,e],[n,r])=>c(e,r)||Od(t,n))).map(([t])=>t)),s=(r&&n.reverse(),"number"==typeof i?[0,i]:i),o=i?n.slice(...s):n;return[t,rt(e,{scale:{[a]:{domain:o}}})]}C_.props={};const j_=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=nt(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return N_(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=R(i,r);return i=Yd(t,t=>a[t]),n&&i.reverse(),[i,e]}}},R_=(j_.props={},(t={})=>j_(Object.assign(Object.assign({},t),{channel:"x"}))),I_=(R_.props={},(t={})=>j_(Object.assign(Object.assign({},t),{channel:"color"}))),B_=(I_.props={},(t={})=>j_(Object.assign(Object.assign({},t),{channel:"y"})));B_.props={};const D_=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=R(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):R(r,s)[0],r=Gd(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>dp(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,rt({},e,{scale:{x:{flex:r}}})]}};function F_(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const h=a-u*c,f=u<=1?0:h/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=sy(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+h,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-f*e-p}) scale(${r}, ${i})`})}D_.props={};const z_=()=>(t,e)=>[t,rt({},e,{modifier:F_,axis:!1})],G_=(z_.props={},"thresholds");function W_(t){var e,[n,r]=jd(t);return Math.min(200,(n=n,r=r,e=Cd(t=t),t=Nd(t),e&&t?Math.ceil((r-n)*Math.cbrt(e)/(3.49*t)):1))}const Y_=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=nt(t,["groupChannels","binChannels"]),u={};return A_(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(G_)))),Object.fromEntries(l.flatMap(e=>{var t=([t])=>+u[e].get(t).split(",")[1];return[[t.from=e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",t]]}))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=R(n,t);return t}),a=it(c,G_),o=t.filter(e=>i.every(t=>c0(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(c0).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||W_(n),e=tp().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Fd(o,e=>r.map(t=>t(e)).join("-")).values())}}))},H_=(Y_.props={},(t={})=>{var e=t["thresholds"];return Y_(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function V_(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let h=0,f,d;c.push(h);for(let i=0;if&&(f=o,d=r);c.push(d),h=d}return c.push(a-1),c.map(t=>e[t])}function q_(t){if("function"==typeof t)return t;if("lttb"===t)return V_;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[ip(t,t=>n[t])]],max:(t,e,n)=>[t[np(t,t=>n[t])]],median:(t,e,n)=>{return[t[lp(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;ii(t,e,n))}}H_.props={};const $_=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=q_(e);return(t,e)=>{var n=e["encode"],t=T3(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},U_=($_.props={},(s={})=>(t,e)=>{const{encode:i,data:n}=e,r=Object.entries(s).map(([t,e])=>{const[n]=R(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(c0);if(0===r.length)return[t,e];const a=t.filter(e=>r.every(t=>t(e))),o=a.map((t,e)=>e);t=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:o.map(t=>e.value[a[t]])})]);return[o,rt({},e,{encode:Object.fromEntries(t),data:a.map(t=>n[t])})]});function X_(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function K_(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}U_.props={};const Z_=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{h5(t);const i=t.getLocalBounds();n.some(t=>{var e=X_(i),t=X_(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]t[0]&&e[1]t[1]})?u5(t):n.push(t)}),t}};function Q_(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const J_=t=>{const{maxIterations:M=10,maxError:k=.1,padding:E=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,m]=Q_(),[v,y]=Q_();var a,o,s,l,[c,t]=Q_(),[u,n]=Q_();for(const b of i){var{min:r,max:h}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,h]=h;m(b,g),y(b,g),t(b,h-g),n(b,[x,r])}for(let t=0;tOd(v(t),v(e)));let r=0;for(let n=0;n{return nA(e,"object"==typeof(t=t)?t:$a(t))})]}const iA=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;nA(t.parsedStyle.fill,e)(t,e)=>(t.forEach(t=>{h5(t);var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(K_(t,e)&&K_(n,e))}(X_(t.getLocalBounds()),e)||u5(t)}),t);var P=1e-6,oA=1e-12,T=Math.PI,sA=T/2,lA=T/4,cA=2*T,uA=180/T,hA=T/180,fA=Math.abs,dA=Math.atan,pA=Math.atan2,C=Math.cos,gA=Math.ceil,mA=Math.exp,vA=Math.log,yA=Math.pow,N=Math.sin,bA=Math.sign||function(t){return 0T&&(t-=Math.round(t/cA)*cA),[t,e]}function zA(t,e,n){return(t%=cA)?e||n?DA(WA(t),YA(e,n)):WA(t):e||n?YA(e,n):FA}function GA(n){return function(t,e){return fA(t+=n)>T&&(t-=Math.round(t/cA)*cA),[t,e]}}function WA(t){var e=GA(t);return e.invert=GA(-t),e}function YA(t,e){var i=C(t),a=N(t),o=C(e),s=N(e);function n(t,e){var n=C(e),r=C(t)*n,t=N(t)*n,n=N(e),e=n*i+r*a;return[pA(t*o-e*s,r*i-n*a),kA(e*o+t*s)]}return n.invert=function(t,e){var n=C(e),r=C(t)*n,t=N(t)*n,n=N(e),e=n*o-t*s;return[pA(t*o+n*s,r*i+e*a),kA(e*i-r*a)]},n}function HA(t,e){(e=CA(e))[0]-=t,BA(e);t=MA(-e[1]);return((-e[2]<0?-t:t)+cA-P)%cA}function VA(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:EA,rejoin:function(){1P?dA((N(l)*(a=C(i))*N(r)-N(i)*(r=C(l))*N(n))/(r*a*o)):(l+i)/2,c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),u=0),c.point(h=t,f=e),d=s},lineEnd:function(){c.lineEnd(),h=f=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*sA,r.point(-T,i),r.point(0,i),r.point(T,i),r.point(T,0),r.point(T,-i),r.point(0,-i),r.point(-T,-i),r.point(-T,0),r.point(-T,i)):fA(t[0]-e[0])>P?(t=t[0]P;function m(t,e){return C(t)*C(e)>g}function v(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],h=jA(CA(t),CA(e)),f=NA(h,h),d=h[0],p=f-d*d;return p?(r=jA(u,h),RA(u=IA(u,g*f/p),IA(h,-g*d/p)),(p=(h=NA(u,f=r))*h-(d=NA(f,f))*(NA(u,u)-1))<0?void 0:(RA(p=IA(f,(-h-(r=xA(p)))/d),u),p=LA(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],aP}).map(u)).concat(fp(gA(s/g)*g,o,g).filter(function(t){return fA(t%v)>P}).map(h))}var n,r,i,a,o,s,l,c,u,h,f,d,p,g,m,v,y}var l4,c4,u4,h4,f4=t=>t,d4=new Rd,p4=new Rd,g4={point:EA,lineStart:EA,lineEnd:EA,polygonStart:function(){g4.lineStart=m4,g4.lineEnd=b4},polygonEnd:function(){g4.lineStart=g4.lineEnd=g4.point=EA,d4.add(fA(p4)),p4=new Rd},result:function(){var t=d4/2;return d4=new Rd,t}};function m4(){g4.point=v4}function v4(t,e){g4.point=y4,l4=u4=t,c4=h4=e}function y4(t,e){p4.add(h4*t-u4*e),u4=t,h4=e}function b4(){y4(l4,c4)}var x4=g4,w4=1/0,M4=w4,k4=-w4,E4=k4;var O4,S4,_4,A4,T4={point:function(t,e){tP&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},KT.invert=NT(kA),ZT.invert=NT(function(t){return 2*dA(t)}),QT.invert=function(t,e){return[-e,2*dA(mA(t))-sA]};var JT=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=LT(),l=PT().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=PT().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function h(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function f(){return e=n=null,h}return h.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},h.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++nfunction(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function eP(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(rP),e.find(t=>t.sphere)?{type:"Sphere"}:tP(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=dT(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function nP(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[s4()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function rP(t){return"geoPath"===t.type}z1=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,f=nt(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+en(t);if(e=JT[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(nP);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(eP(i,p,l,f),i),l=f;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=dT(i);const u=new k1({domain:[t,t+n]}),h=new k1({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),h.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),h.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return rP(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:m0(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)||[]})})):t})})]},z1.props={},Vo=()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o,state:s}=t,t=nt(t,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a,state:s}]})]};Vo.props={};const iP={"composition.geoView":z1,"composition.geoPath":Vo};function aP(){return Object.assign({"data.fetch":zg,"data.inline":$g,"data.sortBy":qg,"data.sort":Yg,"data.filter":Wg,"data.pick":Hg,"data.rename":Vg,"data.fold":Gg,"data.slice":Mm,"data.custom":Ug,"data.map":Xg,"data.cluster":Og,"data.tree":Sg,"data.sankey":i0,"data.arc":Jg,"data.wordCloud":bm,"data.join":wm,"data.kde":Tm,"data.venn":Xm,"transform.maybeZeroY1":A3,"transform.maybeZeroX":W3,"transform.maybeStackY":z3,"transform.maybeTitle":G3,"transform.maybeSeries":q3,"transform.maybeZeroPadding":Q3,"transform.stackY":D3,"transform.binX":H_,"transform.bin":Y_,"transform.dodgeX":r_,"transform.jitter":l_,"transform.jitterX":c_,"transform.symmetryY":u_,"transform.diffY":h_,"transform.stackEnter":i_,"transform.normalizeY":a_,"transform.select":m_,"transform.selectX":v_,"transform.selectY":y_,"transform.groupX":P_,"transform.groupY":L_,"transform.groupColor":C_,"transform.group":T_,"transform.maybeSize":H3,"transform.maybeZeroY":Y3,"transform.maybeKey":V3,"transform.sortX":R_,"transform.sortY":B_,"transform.sortColor":I_,"transform.flexX":D_,"transform.maybeTupleY":$3,"transform.maybeTupleX":U3,"transform.maybeIdentityY":X3,"transform.maybeIdentityX":K3,"transform.maybeTuple":e_,"transform.maybeVisualPosition":J3,"transform.maybeFunctionAttribute":t_,"transform.maybeGradient":n_,"transform.maybeTooltip":Z3,"transform.pack":z_,"transform.sample":$_,"transform.filter":U_,"coordinate.cartesian":Uh,"coordinate.polar":Kh,"coordinate.helix":Zh,"coordinate.transpose":Qh,"coordinate.theta":Jh,"coordinate.parallel":nf,"coordinate.fisheye":rf,"coordinate.radial":ef,"coordinate.radar":af,"encode.constant":of,"encode.field":lf,"encode.transform":sf,"encode.column":cf,"mark.interval":kd,"mark.rect":Ed,"mark.line":Op,"mark.point":Sp,"mark.text":_p,"mark.cell":Ap,"mark.area":Tp,"mark.link":Pp,"mark.image":Lp,"mark.polygon":Cp,"mark.box":Np,"mark.vector":jp,"mark.lineX":Ip,"mark.lineY":Rp,"mark.connector":Bp,"mark.range":zp,"mark.rangeX":Gp,"mark.rangeY":Wp,"mark.sankey":b0,"mark.path":x0,"mark.treemap":E0,"mark.pack":O0,"mark.boxplot":j0,"mark.shape":R0,"mark.forceGraph":kg,"mark.gauge":by,"mark.tree":_g,"mark.wordCloud":Km,"mark.density":xy,"mark.heatmap":wy,"palette.category10":My,"palette.category20":ky,"scale.linear":Oy,"scale.ordinal":Sy,"scale.band":Ey,"scale.identity":_y,"scale.point":Ay,"scale.time":Ty,"scale.log":Py,"scale.pow":Ly,"scale.sqrt":Ry,"scale.threshold":Cy,"scale.quantile":Ny,"scale.quantize":jy,"scale.sequential":Iy,"scale.constant":By,"shape.interval.rect":Gb,"shape.interval.hollow":Wb,"shape.interval.funnel":Yb,"shape.interval.pyramid":Vb,"shape.rect.rect":Gb,"shape.rect.hollow":Wb,"shape.cell.cell":Gb,"shape.cell.hollow":Wb,"shape.line.line":Xb,"shape.line.hv":Zb,"shape.line.vh":Qb,"shape.line.hvh":Jb,"shape.line.trail":tx,"shape.line.smooth":Kb,"shape.point.bowtie":nx,"shape.point.cross":rx,"shape.point.diamond":ix,"shape.point.hexagon":ax,"shape.point.hollowBowtie":ox,"shape.point.hollowDiamond":sx,"shape.point.hollowHexagon":lx,"shape.point.hollow":cx,"shape.point.hollowSquare":ux,"shape.point.hollowTriangle":hx,"shape.point.hollowTriangleDown":fx,"shape.point.hyphen":dx,"shape.point.line":px,"shape.point.plus":gx,"shape.point.point":mx,"shape.point.square":vx,"shape.point.tick":yx,"shape.point.triangle":bx,"shape.point.triangleDown":xx,"shape.text.text":Rk,"shape.area.area":zk,"shape.area.smooth":Gk,"shape.area.hvh":Wk,"shape.area.vh":Yk,"shape.area.hv":Hk,"shape.link.smooth":qk,"shape.link.vhv":$k,"shape.link.arc":Uk,"shape.link.link":Vk,"shape.image.image":Xk,"shape.polygon.polygon":Kk,"shape.polygon.ribbon":Zk,"shape.box.box":Qk,"shape.box.violin":Jk,"shape.vector.vector":wx,"shape.label.label":vE,"shape.text.badge":Bk,"shape.lineX.line":tE,"shape.lineY.line":tE,"shape.shape.shape":_E,"shape.connector.connector":rE,"shape.range.range":Gb,"shape.rangeX.range":Gb,"shape.rangeY.range":Gb,"shape.path.path":bE,"shape.path.hollow":xE,"shape.density.density":wE,"shape.heatmap.heatmap":SE,"theme.classic":TE,"theme.classicDark":LE,"theme.academy":NE,"component.axisX":lO,"component.axisY":cO,"component.axisRadar":uO,"component.axisLinear":oO,"component.axisArc":sO,"component.legendCategory":pO,"component.legendContinuous":xO,"component.legendContinuousBlock":wO,"component.legendContinuousBlockSize":kO,"component.legendContinuousSize":MO,"component.title":SO,"component.sliderX":NO,"component.sliderY":jO,"component.scrollbarX":IO,"component.scrollbarY":BO,"animation.scaleInX":YO,"animation.scaleOutX":HO,"animation.scaleInY":VO,"animation.scaleOutY":qO,"animation.waveIn":n5,"animation.fadeIn":$O,"animation.fadeOut":UO,"animation.zoomIn":r5,"animation.zoomOut":i5,"animation.pathIn":a5,"animation.morphing":e5,"animation.growInX":o5,"animation.growInY":s5,"interaction.elementHighlight":P5,"interaction.elementHighlightByX":L5,"interaction.elementHighlightByColor":C5,"interaction.elementSelect":j5,"interaction.elementSelectByX":R5,"interaction.elementSelectByColor":I5,"interaction.fisheye":D5,"interaction.chartIndex":B5,"interaction.tooltip":iS,"interaction.legendFilter":gS,"interaction.legendHighlight":mS,"interaction.brushHighlight":MS,"interaction.brushXHighlight":ES,"interaction.brushYHighlight":SS,"interaction.brushAxisHighlight":RS,"interaction.brushFilter":BS,"interaction.brushXFilter":DS,"interaction.brushYFilter":FS,"interaction.sliderFilter":WS,"interaction.scrollbarFilter":HS,"interaction.poptip":$S,"interaction.event":W5,"composition.spaceLayer":ZS,"composition.spaceFlex":QS,"composition.mark":t3,"composition.view":JS,"composition.facetRect":u3,"composition.repeatMatrix":p3,"composition.facetCircle":x3,"composition.timingKeyframe":w3,"labelTransform.overlapHide":Z_,"labelTransform.overlapDodgeY":J_,"labelTransform.overflowHide":aA,"labelTransform.contrastReverse":iA},iP)}const oP=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]];function sP(t,e,n){for(;t{return"string"!=typeof t?t:n[t=e+"."+t]||s0("Unknown Component: "+t)};return[t=>{var e=t["type"],t=nt(t,["type"]);return r(e)(Object.assign({},t))},r]}function IP(t,e){var{coordinate:n={}}=t,t=nt(t,["coordinate"]),{type:r,transform:i=[]}=n,n=nt(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=RP("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function BP(t,e){return t.filter(t=>t.type===e)}function DP(t){return 0>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?i6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?i6(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=$P.exec(t))?new s6(e[1],e[2],e[3],1):(e=UP.exec(t))?new s6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=XP.exec(t))?i6(e[1],e[2],e[3],e[4]):(e=KP.exec(t))?i6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ZP.exec(t))?d6(e[1],e[2]/100,e[3]/100,1):(e=QP.exec(t))?d6(e[1],e[2]/100,e[3]/100,e[4]):JP.hasOwnProperty(t)?r6(JP[t]):"transparent"===t?new s6(NaN,NaN,NaN,0):null}function r6(t){return new s6(t>>16&255,t>>8&255,255&t,1)}function i6(t,e,n,r){return new s6(t=r<=0?e=n=NaN:t,e,n,r)}function a6(t){return(t=t instanceof HP?t:n6(t))?new s6((t=t.rgb()).r,t.g,t.b,t.opacity):new s6}function o6(t,e,n,r){return 1===arguments.length?a6(t):new s6(t,e,n,null==r?1:r)}function s6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function l6(){return"#"+f6(this.r)+f6(this.g)+f6(this.b)}function c6(){var t=u6(this.opacity);return(1===t?"rgb(":"rgba(")+h6(this.r)+`, ${h6(this.g)}, `+h6(this.b)+(1===t?")":`, ${t})`)}function u6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function h6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function f6(t){return((t=h6(t))<16?"0":"")+t.toString(16)}function d6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new g6(t,e,n,r)}function p6(t){var e,n,r,i,a,o,s,l;return t instanceof g6?new g6(t.h,t.s,t.l,t.opacity):(t=t instanceof HP?t:n6(t))?t instanceof g6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n()=>t;function L6(e,n){return function(t){return e+t*n}}function C6(a){return 1==(a=+a)?N6:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):P6(isNaN(t)?e:t);var n,r,i}}function N6(t,e){var n=e-t;return n?L6(t,n):P6(isNaN(t)?e:t)}!function t(e){var o=C6(e);function n(e,t){var n=o((e=o6(e)).r,(t=o6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=N6(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);j6=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0R6(t[t.length-1]),Uo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(l),es=ns(Uo),ll=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(l),Wo=ns(ll),as=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(l),ls=ns(as),ts=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(l),ul=ns(ts),dl=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(l),qo=ns(dl),vl=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(l),El=ns(vl),Tl=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(l),gl=ns(Tl),xl=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(l),bs=ns(xl),cl=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(l),us=ns(cl),z1=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(l),Vo=ns(z1),e=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(l),os=ns(e),Io=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(l),B6=ns(Io),D6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(l),F6=ns(D6),z6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(l),G6=ns(z6),W6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(l),Y6=ns(W6),H6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(l),V6=ns(H6),q6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(l),$6=ns(q6),U6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(l),X6=ns(U6),K6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(l),Z6=ns(K6),Q6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(l),J6=ns(Q6),tL=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(l),eL=ns(tL),nL=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(l),rL=ns(nL),iL=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(l),aL=ns(iL),oL=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(l),sL=ns(oL),lL=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(l),cL=ns(lL),uL=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(l),hL=ns(uL),fL=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(l),ns=ns(fL);var dL=hl(A6(300,.5,0),A6(-240,.5,1)),pL=hl(A6(-100,.75,.35),A6(80,1.5,.8)),hl=hl(A6(260,.75,.35),A6(80,1.5,.8)),gL=A6();var mL=o6(),vL=Math.PI/3,yL=2*Math.PI/3;function bL(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var xL=bL(l("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),wL=bL(l("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ML=bL(l("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),kL=bL(l("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),EL=Object.freeze({__proto__:null,schemeCategory10:a,schemeAccent:is,schemeDark2:r,schemePaired:rs,schemePastel1:Ho,schemePastel2:pl,schemeSet1:fl,schemeSet2:Yo,schemeSet3:n,schemeTableau10:$o,interpolateBrBG:es,schemeBrBG:Uo,interpolatePRGn:Wo,schemePRGn:ll,interpolatePiYG:ls,schemePiYG:as,interpolatePuOr:ul,schemePuOr:ts,interpolateRdBu:qo,schemeRdBu:dl,interpolateRdGy:El,schemeRdGy:vl,interpolateRdYlBu:gl,schemeRdYlBu:Tl,interpolateRdYlGn:bs,schemeRdYlGn:xl,interpolateSpectral:us,schemeSpectral:cl,interpolateBuGn:Vo,schemeBuGn:z1,interpolateBuPu:os,schemeBuPu:e,interpolateGnBu:B6,schemeGnBu:Io,interpolateOrRd:F6,schemeOrRd:D6,interpolatePuBuGn:G6,schemePuBuGn:z6,interpolatePuBu:Y6,schemePuBu:W6,interpolatePuRd:V6,schemePuRd:H6,interpolateRdPu:$6,schemeRdPu:q6,interpolateYlGnBu:X6,schemeYlGnBu:U6,interpolateYlGn:Z6,schemeYlGn:K6,interpolateYlOrBr:J6,schemeYlOrBr:Q6,interpolateYlOrRd:eL,schemeYlOrRd:tL,interpolateBlues:rL,schemeBlues:nL,interpolateGreens:aL,schemeGreens:iL,interpolateGreys:sL,schemeGreys:oL,interpolatePurples:cL,schemePurples:lL,interpolateReds:hL,schemeReds:uL,interpolateOranges:ns,schemeOranges:fL,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:dL,interpolateRainbow:function(t){(t<0||1new Date(i.map(t))):t.map(t=>i.map(t))}(e,r,t);return TL({type:t})?(n=e,t=r,t=Math.round(n.length*r),n.slice(0,t)):e}(c,o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return NL(function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)c0(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n),n);case"band":case"ordinal":case"point":return jL(e);case"quantile":return function(t){return jL(t).sort()}(e);case"sequential":return NL(function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)c0(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e),n);default:return[]}}(c,e,n),n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Jv,nice:n=!1,tickCount:r=5}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:zP(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=en(e),i=EL["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(c,t,n,r)),{domain:s,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=PL(n,r,i,a,o),[u,h]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],Q1(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||h];case"band":case"point":return[l||0,c||1];case"ordinal":return PL(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(c,t,e,n,s,i,a),expectedDomain:o,guide:l,name:t,type:c}))}function SL(t,e){var[e]=RP("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[a0,a0];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function _L(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(AL)?jd(e):t.every(TL)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function AL(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function TL(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function PL(t,e,n,r,i){var[i]=RP("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=en(t),i=EL["scheme"+e],a=EL["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function LL(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function CL(t,e){return"color"!==t||e?"linear":"sequential"}function NL(t,e){var n,r;return 0===t.length?t:({domainMin:e,domainMax:n}=e,[t,r]=t,[null!=e?e:t,null!=n?n:r])}function jL(t){return Array.from(new Set(t.flat()))}function RL(t){return BL(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function IL(t){return BL(t,t=>t instanceof Date)}function BL(t,e){for(const n of t)if(n.some(e))return!0;return!1}const DL={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},FL={threshold:"threshold",quantize:"quantize",quantile:"quantile"},zL={ordinal:"ordinal",band:"band",point:"point"},GL={constant:"constant"};function WL(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=RP("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=RP("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?FP(i)?t+"Y":t+"X":"y"===e?FP(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const m=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,m.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0"string"!=typeof t.type||["shape","size","color","opacity"].includes(t.name)).filter(t=>!("constant"===t.type&&"size"===t.name)),n=e.filter(t=>!t.field),r=e.filter(t=>!!t.field),i=new Map(Array.from(Fd(r,t=>t.field)).map(([t,e])=>[t,[...e,...n.filter(t=>"constant"===t.type)]]).concat([[void 0,n]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===i.size)return[];t=Array.from(i).map(([,t])=>{var e,n,r=function(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...ty(e,t));return n}(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in DL?"continuous":t in zL?"discrete":t in FL?"distribution":t in GL?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of oP)for(const{option:a,combination:o}of r)if(n.some(t=>hn(i(t),i(a))))return[e,o];return null}).filter(c0);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const f of Array.isArray(n)?n:[n]){var l,c,[u,h]=function(t,e,n,r,i,a,o){var[s]=HL(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=VL(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=HL(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0SL(t,r)),s={bbox:s,scales:o,library:r};return a(t)({coordinate:e,library:r,markState:i,scales:l,theme:n,value:s})}function HL(t){var e,n=BP(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=Xh(n),[n,e]):(n=BP(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=tf(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function VL(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function qL(t,e,n,r,i,a){var[a]=RP("scale",a),o=t["type"];if("string"==typeof o&&o.startsWith("axis")&&["left","right","bottom","top"].includes(r)){t.transform=t.transform||[{type:"hide"}];var{labelFormatter:o,scales:s,title:l,tickCount:c,tickMethod:u,tickFilter:h}=t;const p="left"===r||"right"===r;var r=function(t,e,n){var{axis:n,["axis"+o0(e)]:e}=n;return rt({},n,e,t.style)}(t,r,i),{tickLength:i=0,labelSpacing:f=0,titleSpacing:d=0}=r,r=nt(r,["tickLength","labelSpacing","titleSpacing"]),[s]=s,c=(void 0!==c&&(s.tickCount=c),void 0!==u&&(s.tickMethod=u),a(s));const g=function(t,e,n){n=$L(t,n),n=n.map(t=>{return"number"==typeof t?(e=t,Math.abs(e)<1e-15?e:parseFloat(e.toFixed(15))):t;var e}),e=e?"string"==typeof e?WE(e):e:t.getFormatter?t.getFormatter():t=>""+t;return n.map(e)}(c,o,h),m=it(r,"label"),v=g.map((n,r)=>{var t=Object.fromEntries(Object.entries(m).map(([t,e])=>[t,"function"==typeof e?e(n,r):e]));return p||(t.transform="none"),UL(n,t)});u=ep(v,t=>t.width),a=i+f,o=(p?t.size=u+a:!function(t,e,n,r,i){var a=dp(e,t=>t.width);if(no.map(t)+function(t,e){if(!t.getBandWidth)return 0;t=t.getBandWidth(e)/2;return t}(o,t)),c=s.map((t,e)=>e),u=-r[0],h=n+r[1],f=(t,e)=>{e=e.width;return[t-e/2,t+e/2]};for(let t=0;tt.height),t.size=s+a):(t.size=u+a,t.style=Object.assign(Object.assign({},t.style),{labelTransform:"rotate(90)"})),g.map((t,e)=>e));t.indexBBox=new Map(o.map(t=>[t,[g[t],v[t]]])),!1!==l&&null!=l&&(i=it(r,"title"),f=UL(Array.isArray(l)?l.join(","):l,i),p?t.size+=d+f.width:t.size+=d+f.height)}}function $L(t,e){t=t.getTicks?t.getTicks():t.getOptions().domain;return e?t.filter(e):t}function UL(t,e){t=(t=t)instanceof Ls?t:new el({style:{text:""+t}}),t.attr(Object.assign(Object.assign({},e),{visibility:"none"})),e=t.getBBox();return e}function XL(t,e,n,r,i,a,o){var s=Fd(t,t=>t.position),{padding:t,paddingLeft:i=t,paddingRight:l=t,paddingBottom:c=t,paddingTop:t=t}=i,u={paddingBottom:c,paddingLeft:i,paddingTop:t,paddingRight:l};for(const d of r){var h="padding"+o0(iE(d)),f=u[h];if(void 0===f||"auto"===f)if(s.has(d)){const t=s.get(d);"auto"===f&&t.forEach(t=>qL(t,e,n,d,a,o));f=t.reduce((t,{size:e})=>t+e,0);u[h]=f}else u[h]=30}return u}function KL(t,I,e){var B=Fd(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:D,marginLeft:r,marginTop:i,marginBottom:F,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:G}=e,t=t+r,r=n+i,n=e+z,i=D+F,W={top:[t,0,o,r,"vertical",!0,Od],right:[G-n,r,n,a,"horizontal",!1,Od],bottom:[t,s-i,o,i,"vertical",!1,Od],left:[0,r,t,a,"horizontal",!0,Od],"top-left":[t,0,o,r,"vertical",!0,Od],"top-right":[t,0,o,r,"vertical",!0,Od],"bottom-left":[t,s-i,o,i,"vertical",!1,Od],"bottom-right":[t,s-i,o,i,"vertical",!1,Od],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[j,t]of B.entries()){var l=W[j],[c,Y]=J1(t,t=>"string"==typeof t.type&&("center"===j||!(!t.type.startsWith("axis")||!["inner","outer"].includes(j))));if(c.length){p=d=f=h=u=void 0;var u=c,h=I,f=l,d=j,[u,p]=J1(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(v=m=g=c=void 0,u),g=h,m=f,v=d;if("center"===v)if(!function(t){return yp(t)&&gp(t)}(g)){if(gp(g)){u=void 0;d=void 0;y=void 0;b=void 0;x=void 0;w=void 0;u=c;d=m;var[y,b,x,w]=d;for(const tt of u)tt.bbox={x:y,y:b,width:x,height:w}}else if(yp(g)){d=void 0;u=void 0;M=void 0;k=void 0;d=c;u=g;var M=m;var k=c[0].orientation;"horizontal"===k?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;te%2==0).map(t=>t+r);for(let t=0;tnull===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=v;te=>ce(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),a0)}([nt(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Z1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function JL(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return c0(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function e8(t,e,n){var r=e["encode"];return r?(r=K1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function n8(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=RP("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=K1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function r8(t,e,n){var{tooltip:r={}}=e;return p0(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:d0(r)&&v0(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function i8(g,t,e){const{data:m,encode:v,tooltip:n={}}=t;var r,i,a,o;return p0(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:m[t][e]}));if(d0(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?WE(a):a,s=n&&v[n],a=s&&v[n].field,l=i||a||n,c=[];for(const d of g){var u=t?m[d][t]:s?v[n].value[d]:null;c[d]={name:l,color:r,value:o(u)}}return c}if("function"!=typeof e)return e;var h=[];for(const p of g){var f=e(m[p],p,m,v);d0(f)?h[p]=f:h[p]={value:f}}return h},{title:o,items:i=[]}=n,a=nt(n,["title","items"]),o=Object.assign({title:r(o),items:Array.isArray(i)?i.map(r):[]},a),[g,Object.assign(Object.assign({},t),{tooltip:o})])}function a8(l,t,e){var n,r=t["encode"],i=nt(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=nt(t,["value"]);for(let e=0;e[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function o8(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return rt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>{var e=s(o,t);return[t,Object.assign({guide:s(r,t),slider:s(a,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]}))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function s8(t,e,n){var r=e["animate"];return r||void 0===r||rt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function l8(l,c,u){return ce(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ce(this,void 0,void 0,function*(){var t=c["library"],[t]=RP("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[ZL,QL,JL,t8,e8,n8,a8,s8,o8,r8,...e.map(t),...r.map(t),...n.map(t),i8];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(l,c,{library:u});const{encode:n,scale:f,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=Gd(Object.entries(n).filter(([,t])=>c0(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=a.find(t=>t.name===e);return null!=n&&n.independent?t:e});var s=a.filter(t=>{const{name:e,required:n}=t;if(o.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:c,scaleKey:u,range:h}=t;return o.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=e.some(t=>t.constant),a=f[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=nt(a,["independent","key","type"]),a="constant"===i,l=a?void 0:h;return{name:t,values:e,scaleKey:o||a?Symbol("independent"):s,scale:Object.assign({type:i,range:l},r)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:s,tooltip:i})]})}function c8(G,W,Y,H){var V,q;return ce(this,void 0,void 0,function*(){const[n]=RP("composition",Y);var[t]=RP("interaction",Y);const r=new Set(Object.keys(Y).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(c0)),i=t=>{t=t.type;if("function"==typeof t){var{props:e={}}=t,{composite:e=!0}=e;if(e)return"mark"}return"string"==typeof t&&r.has(t)?"mark":t};const a=t=>"standardView"===i(t);var e=t=>{var e;return a(t)?[t]:(e=i(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[G],u=[];c.length;){var h=c.shift();if(a(h)){var f=l.get(h),[f,d]=f?d8(f,h,Y):yield h8(h,Y),p=(s.set(f,h),o.push(f),d.flatMap(e).map(t=>IP(t,Y)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>f8(t,Y)));_L(f=(f=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),_L(f,"y");for(let t=0;tt.key).join(t=>t.append("g").attr("className",Uc).attr("id",t=>t.key).call(u8).each(function(t){p8(t,at(this),y,Y,H),m.set(t,this)}),t=>t.call(u8).each(function(t){p8(t,at(this),y,Y,H),v.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var b=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(f,d,p){return h=>ce(this,void 0,void 0,function*(){var t,[e,n]=yield h8(h,d),r=(p8(e,f,[],d,p),f),i=h,a=e,o=p,[s]=RP("interaction",s=d),l=(l=r.node()).nameInteraction,c=x8(i).find(([t])=>"tooltip"===t);(l=l.get("tooltip"))&&(null!=(t=l.destroy)&&t.call(l),c[1])&&(t=s(Object.assign({type:"tooltip"},c[1])),l={options:i,view:a,container:r.node(),update:t=>Promise.resolve(t)},t(l,[],o.emitter));for(const u of n)c8(u,f,d,p);return{options:h,view:e}})}(at(e),Y,H)})),x=b(m);for(const P of x){const G=P["options"];var w=new Map;P.container.nameInteraction=w;for(const L of x8(G)){var[M,k]=L;k&&(k=t(Object.assign({type:M},k))(P,x,H.emitter),w.set(M,{destroy:k}))}}var E=b(v);for(const C of E){const{options:G,container:N}=C;var O=N.nameInteraction;for(const j of x8(G)){var[S,_]=j,A=O.get(S);A&&null!=(V=A.destroy)&&V.call(A),_&&(A=t(Object.assign({type:S},_))(C,E,H.emitter),O.set(S,{destroy:A}))}}const{width:D,height:F}=G;var T=[];for(const R of u){var z=new Promise(e=>ce(this,void 0,void 0,function*(){for(const t of R)yield c8(Object.assign({width:D,height:F},t),W,Y,H);e()}));T.push(z)}H.views=o,null!=(q=H.animations)&&q.forEach(t=>null==t?void 0:t.cancel()),H.animations=y,H.emitter.emit(F5.AFTER_PAINT);b=y.filter(c0).map(y8).map(t=>t.finished);return Promise.all([...b,...T])})}function u8(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function h8(e,n){return ce(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},style:r={},marks:i}=t,t=nt(t,["coordinate","interaction","style","marks"]),a=i.map(t=>t.coordinate||{}),o=i.map(t=>t.interaction||{}),s=i.map(t=>t.viewStyle||{}),a=[...a,e].reduceRight((t,e)=>rt(t,e),{}),e=[n,...o].reduce((t,e)=>rt(t,e),{}),n=[...s,r].reduce((t,e)=>rt(t,e),{});return Object.assign(Object.assign({},t),{marks:i,coordinate:a,interaction:e,style:n})}(yield function(c,u){return ce(this,void 0,void 0,function*(){var[t,e]=RP("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield w8(a,u);const{type:s=s0("G2Mark type is required."),key:l}=a;var{props:o={}}=e(s),{composite:o=!0}=o;if(o){const n=yield t(a)(c);o=Array.isArray(n)?n:[n];i.unshift(...o.map((t,e)=>Object.assign(Object.assign({},t),{key:l+"-"+e})))}else r.push(a)}return Object.assign(Object.assign({},c),{marks:r})})}(e,n)),t=(e.interaction=t.interaction,e.coordinate=t.coordinate,IP(t,n));return d8(yield f8(t,n),t,n)})}function f8(p,g){return ce(this,void 0,void 0,function*(){var[t]=RP("theme",g),[,e]=RP("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(b8(n)),o=new Map;for(const h of r){var s,l=h["type"],{props:l={}}=e(l),l=yield l8(h,l,g);l&&([l,s]=l,o.set(l,s))}for(const f of Fd(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=f.reduce((t,{scale:e})=>rt(t,e),{}),u=f[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(c0)));const p=rt({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=f[0]["name"];const d=OL(u,f.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);f.forEach(t=>t.scale=d)}return o})}function d8(t,e,n){var[r]=RP("mark",n),[i]=RP("theme",n),[a]=RP("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:h=[]}=e;var f,d,i=i(b8(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=WL(function(t,e,n){for(var[r]of n.entries())if("cell"===r.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;n=e[0].defaultShape;if(!["point","line","rect","hollow"].includes(n))return t;e=(null==(e=t.find(t=>"color"===t.name))?void 0:e.field)||null,e={field:e,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[n]]};return[...t,e]}(Array.from(g),p,t),e,n),m=function(t,e,n,r){var{width:i,height:a,x:o=0,y:s=0,inset:l=0,insetLeft:c=l,insetTop:u=l,insetBottom:h=l,insetRight:l=l,margin:f=0,marginLeft:d=f,marginBottom:p=f,marginTop:g=f,marginRight:f=f,padding:m,paddingBottom:v=m,paddingLeft:y=m,paddingRight:b=m,paddingTop:m=m}=e,x=(t,e,n)=>"auto"===t?Math.min(n,e):e,{paddingLeft:w,paddingRight:M}=XL(t,a,[0,0],["left","right"],e,n,r),y=x(y,w,1/3*(k=i-d-f)),w=x(b,M,1/3*k),{paddingTop:M,paddingBottom:k}=XL(t,b=k-y-w,[y,w],["bottom","top"],e,n,r),e=x(v,k,1/3*(t=a-p-g)),n=x(m,M,1/3*t);return{width:i,height:a,insetLeft:c,insetTop:u,insetBottom:h,insetRight:l,innerWidth:b,innerHeight:t-e-n,paddingLeft:y,paddingRight:w,paddingTop:n,paddingBottom:e,marginLeft:d,marginBottom:p,marginTop:g,marginRight:f,x:o,y:s}}(g,e,i,n),v=function(t,e,n){var[n]=RP("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new NP(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(m,e,n),p=s?rt({mainLineWidth:1,mainStroke:"#000"},u):u,y=(KL(g,v,m),{}),b=[];for([f,d]of t.entries()){const{children:M,dataDomain:k,modifier:E,key:O}=f,{index:S,channels:_,tooltip:A}=d;var x=K1(Object.fromEntries(_.map(({name:t,scale:e})=>[t,e])),t=>SL(t,n));Object.assign(y,x);const T=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(_,x),[P,L,C]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;tc0(t)&&c0(e))&&(r.push(a),i.push(o))}return[r,i]}(r(f)(S,x,T,v));var w=k||P.length;const N=E?E(L,w,m):[],j=t=>{var e;return null==(e=null==(e=A.title)?void 0:e[t])?void 0:e.value},R=e=>A.items.map(t=>t[e]);w=P.map((t,e)=>{var n=Object.assign({points:L[e],transform:N[e],index:t,markKey:O,viewKey:o},A&&{title:j(t),items:R(t)});for(const[r,i]of Object.entries(T))n[r]=i[t],C&&(n["series"+en(r)]=C[e].map(t=>i[t]));return C&&(n.seriesIndex=C[e]),C&&A&&(n.seriesItems=C[e].map(t=>R(t)),n.seriesTitle=C[e].map(t=>j(t))),n}),w=(d.data=w,d.index=P,null==M?void 0:M(w,x,m));b.push(...w||[])}return[{layout:m,theme:i,coordinate:v,components:g,markState:t,key:o,clip:c,scale:y,style:p,labelTransform:g8(h.map(a))},b]}function p8(Z,Q,J,tt,et){ce(this,void 0,void 0,function*(){const{components:I,theme:n,layout:t,markState:r,coordinate:i,key:e,style:B,clip:a}=Z,{width:D,height:F}=t,z=nt(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>u0(Object.assign({},n,B),t)),G=["a","margin","padding","inset"].map(t=>it(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=at(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,h=0,f=D,d=F;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=G[t];return u+=t,h+=e,f-=t+r,d-=e+n,{x:u,y:h,width:f,height:d}}),g=(Q.selectAll(O8(Qc)).data(s.filter(t=>c0(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",Qc).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{enter:r={},update:a={},exit:o={}}=r,{type:s,duration:l=300,delay:c=0}=a,{type:u,duration:h=300,delay:f=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const O of i){var{updateType:m=s,updateDuration:v=l,updateDelay:y=c,enterType:b=u,enterDuration:x=h,enterDelay:w=f,exitDuration:M=p,exitDelay:k=g,exitType:E=d}=O;void 0!==m&&!m||(e=Math.max(e,v+y),n=Math.min(n,y)),void 0!==E&&!E||(e=Math.max(e,M+k),n=Math.min(n,k)),void 0!==b&&!b||(e=Math.max(e,x+w),n=Math.min(n,w))}}return e===-1/0?null:[n,e-n]}(r)),m=!!g&&{duration:g[1]};var v,y,b,s=Q.selectAll(O8(Kc)).data(I,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",Kc).append(t=>YL(rt({animate:m},t),i,n,tt,r)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=YL(rt({animate:m},t),i,n,tt,r)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(c0));const x=Q.selectAll(O8(Xc)).data([t],()=>e).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Xc).call(M8).call(E8,Array.from(r.keys())).call(S8,a),t=>t.call(E8,Array.from(r.keys())).call(t=>{if(!g)return M8(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(S8,a)).transitions();J.push(...x.flat());for([v,y]of r.entries()){var W=y["data"];const{key:e,class:Y,type:A}=v;var w=Q.select("#"+e);const T=function(s,t,e,n,l){const[c]=RP("shape",n),u=s["data"],{defaultShape:h,data:r}=t,f=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:m={}}=s;return t=>{var{shape:e=h}=m,{shape:e=e,points:n,seriesIndex:r,index:i}=t,t=nt(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:e,mark:g,defaultShape:h,index:i});const a=r?r.map(t=>u[t]):u[i],o=r||i;r=K1(m,t=>m8(t,a,o,u));return c(Object.assign(Object.assign({},r),{type:k8(s,e)}))(n,t,p,d,f,l)}}(v,y,Z,tt,et),H=(M=v,b=y,v8("enter",M,b,Z,tt)),P=(M=v,b=y,v8("update",M,b,Z,tt)),V=(M=v,b=y,v8("exit",M,b,Z,tt));var M=function(t,e,n,r){t=t.node().parentElement;return t.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r))}(Q,w,Y,"element");const x=w.selectAll(O8($c)).selectFacetAll(M).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(T).attr("className",$c).attr("markType",A).transition(function(t){return H(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,s=c,n.__facet__&&(i=n.parentNode.parentNode,o=r.parentNode,[i,a]=s(i),[s,o]=s(o),i=`translate(${i-s}, ${a-o})`,s=n.style.transform,a="none"===(a=s)||void 0===a?"":s,n.style.transform=(a+" "+i).trimStart(),r.append(n));var n,r,i,a,o=T(t,e),s=P(t,[this],[o]);return null===s&&(this.nodeName===o.nodeName?l0(this,o):this.parentNode.replaceChild(o,this)),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return V(t,[this])}).remove(),t=>t.append(T).attr("className",$c).attr("markType",A).transition(function(t){var e=this["__fromElements__"],t=P(t,e,[this]);return new vy(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new vy([],this.__toData__,this.parentNode).append(T).attr("className",$c).attr("markType",A).nodes();return P(t,[this],e)}).remove()).transitions();J.push(...x.flat())}{var k=Z,E=Q,O=tt,S,_;const[q]=RP("labelTransform",O),{markState:$,labelTransform:L}=k,U=E.select(O8(qc)).node(),C=new Map,N=new Map,X=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=RP("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:h,coordinate:f}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=nt(t,["formatter","transform","style"]),t=K1(Object.assign(Object.assign({},t),a),t=>m8(t,r,e,l)),{shape:a=c,text:o}=t,t=nt(t,["shape","text"]),i="string"==typeof i?WE(i):i,i=Object.assign(Object.assign({},t),{text:i(o,r,e,l)});return s(Object.assign({type:"label."+a},t))(n,i,f,h,u)}}(t,e,k,O),a=E.select("#"+r).selectAll(O8($c)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=nt(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.filter((t,e)=>o[e].every(c0)).map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{C.set(t,i),N.set(t,e)}),t})})}),j=at(U).selectAll(O8(Zc)).data(X,t=>t.key).join(t=>t.append(t=>C.get(t)(t)).attr("className",Zc),t=>t.each(function(t){l0(this,C.get(t)(t))}),t=>t.remove()).nodes(),K=Fd(j,t=>N.get(t.__data__)),R=k["coordinate"];for([S,_]of K){var{transform:S=[]}=S;g8(S.map(q))(_,R)}L&&L(j,R)}})}function g8(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function m8(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function v8(o,t,e,n,r){var[,i]=RP("shape",r);const[s]=RP("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${en(o)}Animation`;const{[e]:c}=i(k8(t,r)).props,{[o]:u={}}=a,h=(null==(n=t.animate)?void 0:n[o])||{};return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},h);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function y8(t){return t.finished.then(()=>{t.cancel()}),t}function b8(t={}){var e;return"string"==typeof t?{type:t}:({type:e="classic"}=t,t=nt(t,["type"]),Object.assign(Object.assign({},t),{type:e}))}function x8(t){var{interaction:t={}}=t;return Object.entries(rt({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},t))}function w8(r,i){return ce(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=nt(r,["data"]);return null==e?r:([,{data:e}]=yield QL(0,{data:e},t),Object.assign({data:e},n))})}function M8(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function k8(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function E8(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(O8(Vc)).data(e,t=>t.key).join(t=>t.append("g").attr("className",Vc).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select(O8(qc)).node())||t.append("g").attr("className",qc).style("zIndex",0)}function O8(...t){return t.map(t=>"."+t).join("")}function S8(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new Js({style:{x:e,y:t,width:n,height:r}})):null})}function _8(t){for(var t=rt({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t{},r=t=>{throw t}){const{width:i=640,height:a=480,theme:o}=t,s=(o||s0('ChartOptions.theme is required, such as `const chart = new Chart({ theme: "classic"})`.'),_8(t)),{canvas:l=(t=i,h=a,f=new Dh,f.registerPlugin(new Vh),new Gl({width:t,height:h,container:document.createElement("div"),renderer:f})),library:c=aP(),emitter:u=new qh}=e;var h,f;e.canvas=l,e.library=c,e.emitter=u,l.resize(i,a),u.emit(F5.BEFORE_RENDER);const d=at(l.document.documentElement);return l.ready.then(()=>c8(Object.assign(Object.assign({},s),{width:i,height:a}),d,c,e)).then(()=>{l.requestAnimationFrame(()=>{u.emit(F5.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),"string"==typeof(t=l.getConfig().container)?document.getElementById(t):t}function T8(t,e={},n=!1){var r,{canvas:e,emitter:i}=e;e&&(null!=(r=(r=e).getRoot().querySelectorAll("."+Uc))&&r.forEach(t=>{var{nameInteraction:t=new Map}=t;0<(null==t?void 0:t.size)&&Array.from(null==t?void 0:t.values()).forEach(t=>{null!=t&&t.destroy()})}),n?e.destroy():e.destroyChildren()),i.off()}function P8(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function L8(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function C8(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function c(r){return t=>{for(const n of r){var e=n["type"];"value"===e?P8(t,n):"array"===e?L8(t,n):"object"===e?C8(t,n):"node"===e?function(t,{name:n,ctor:r}){t.prototype[n]=function(t){var e=this.append(r);return"mark"===n&&(e.type=t),e}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"mix"===e&&function(t,{name:r}){t.prototype[r]=function(t){var e,n;return 0===arguments.length?this.attr(r):Array.isArray(t)?this.attr(r,{items:t}):d0(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t?this.attr(r,t):({items:n=[]}=e=this.attr(r)||{},n.push(t),e.items=n,this.attr(r,e))}}(t,n)}return t}}function N8(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function j8(t,e){for(var n=[t];n.length;){var r=n.shift(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class R8{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],this.push(t),t}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return j8(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return j8(this,t=>{e===t.type&&n.push(t)}),n}getNodeByType(e){let n=null;return j8(this,t=>{n||e===t.type&&(n=t)}),n}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class I8 extends R8{changeData(t){var e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.getRoot())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.getRoot())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.getRoot())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}}a=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"},{name:"tooltip",type:"mix"}];let B8=class extends I8{constructor(){super({})}},D8=(B8=t([c(a)],B8),class extends I8{constructor(){super({},"interval")}}),F8=(D8=t([c(a)],D8),class extends I8{constructor(){super({},"rect")}}),z8=(F8=t([c(a)],F8),class extends I8{constructor(){super({},"point")}}),G8=(z8=t([c(a)],z8),class extends I8{constructor(){super({},"area")}}),W8=(G8=t([c(a)],G8),class extends I8{constructor(){super({},"line")}}),Y8=(W8=t([c(a)],W8),class extends I8{constructor(){super({},"cell")}}),H8=(Y8=t([c(a)],Y8),class extends I8{constructor(){super({},"vector")}}),V8=(H8=t([c(a)],H8),class extends I8{constructor(){super({},"link")}}),q8=(V8=t([c(a)],V8),class extends I8{constructor(){super({},"polygon")}});q8=t([c(a)],q8);is=t([c(a)],class extends I8{constructor(){super({},"image")}});let $8=class extends I8{constructor(){super({},"text")}},U8=($8=t([c(a)],$8),class extends I8{constructor(){super({},"box")}}),X8=(U8=t([c(a)],U8),class extends I8{constructor(){super({},"lineX")}}),K8=(X8=t([c(a)],X8),class extends I8{constructor(){super({},"lineY")}}),Z8=(K8=t([c(a)],K8),class extends I8{constructor(){super({},"range")}}),Q8=(Z8=t([c(a)],Z8),class extends I8{constructor(){super({},"rangeX")}}),J8=(Q8=t([c(a)],Q8),class extends I8{constructor(){super({},"rangeY")}}),tC=(J8=t([c(a)],J8),class extends I8{constructor(){super({},"connector")}}),eC=(tC=t([c(a)],tC),class extends I8{constructor(){super({},"shape")}}),nC=(eC=t([c(a)],eC),class extends I8{constructor(){super({},"sankey")}}),rC=(nC=t([c([...a,{name:"layout",type:"value"}])],nC),class extends I8{constructor(){super({},"treemap")}}),iC=(rC=t([c([...a,{name:"layout",type:"value"}])],rC),class extends I8{constructor(){super({},"boxplot")}}),aC=(iC=t([c(a)],iC),class extends I8{constructor(){super({},"density")}}),oC=(aC=t([c(a)],aC),class extends I8{constructor(){super({},"heatmap")}}),sC=(oC=t([c(a)],oC),class extends I8{constructor(){super({},"path")}}),lC=(sC=t([c(a)],sC),class extends I8{constructor(){super({},"pack")}}),cC=(lC=t([c([...a,{name:"layout",type:"value"}])],lC),class extends I8{constructor(){super({},"forceGraph")}}),uC=(cC=t([c([...a,{name:"layout",type:"value"}])],cC),class extends I8{constructor(){super({},"tree")}}),hC=(uC=t([c([...a,{name:"layout",type:"value"}])],uC),class extends I8{constructor(){super({},"wordCloud")}}),fC=(hC=t([c([...a,{name:"layout",type:"object"}])],hC),class extends I8{constructor(){super({},"gauge")}});fC=t([c(a)],fC);const dC={mark:B8,interval:D8,rect:F8,point:z8,area:G8,line:W8,cell:Y8,vector:H8,link:V8,polygon:q8,image:is,text:$8,box:U8,lineX:X8,lineY:K8,range:Z8,rangeX:Q8,rangeY:J8,connector:tC,sankey:nC,treemap:rC,boxplot:iC,density:aC,heatmap:oC,path:sC,shape:eC,pack:lC,forceGraph:cC,tree:uC,wordCloud:hC,gauge:fC};class pC extends R8{changeData(e){var t,n=this.getRoot();if(n)return this.attr("data",e),null!=(t=this.children)&&t.length&&this.children.forEach(t=>{t.attr("data",e)}),null==n?void 0:n.render()}getView(){var t=this.getRoot().getContext()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this._key)}getScale(){var t;return null==(t=this.getView())?void 0:t.scale}getScaleByChannel(t){var e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this._key;if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&h5(t)}hide(){var t=this.getGroup();t&&t.isVisible()&&u5(t)}}let gC=class extends pC{constructor(t={},e="view"){super(t,e)}},mC=(gC=t([c([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...N8(dC)])],gC),class extends pC{constructor(){super({},"spaceLayer")}}),vC=(mC=t([c([{type:"value",name:"data"},...N8(dC)])],mC),class extends pC{constructor(){super({},"spaceFlex")}}),yC=(vC=t([c([{type:"value",name:"data"},...N8(dC)])],vC),class extends pC{constructor(){super({},"facetRect")}}),bC=(yC=t([c([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...N8(dC)])],yC),class extends pC{constructor(){super({},"facetCircle")}}),xC=(bC=t([c([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...N8(dC)])],bC),class extends pC{constructor(){super({},"repeatMatrix")}}),wC=(xC=t([c([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...N8(dC)])],xC),class extends pC{constructor(){super({},"timingKeyframe")}}),MC=(wC=t([c([...N8(dC)])],wC),class extends pC{constructor(){super({},"geoView")}}),kC=(MC=t([c([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...N8(dC)])],MC),class extends pC{constructor(){super({},"geoPath")}});kC=t([c([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"state"},...N8(dC)])],kC);const EC={view:gC,spaceLayer:mC,spaceFlex:vC,facetRect:yC,facetCircle:bC,repeatMatrix:xC,timingKeyframe:wC,geoView:MC,geoPath:kC};for(const NC of Object.values(EC))c(N8(EC))(NC);const OC=aP();const SC=["width","height","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"];function _C(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function AC(t,e){var n,r=t["autoFit"];return r?(r=e,e=getComputedStyle(r),n=r.clientWidth||w0(e.width),r=r.clientHeight||w0(e.height),{width:n-(w0(e.paddingLeft)+w0(e.paddingRight)),height:r-(w0(e.paddingTop)+w0(e.paddingBottom))}):({width:n=640,height:r=480}=t,{width:n,height:r})}function TC(t){var t=function(t){if(null!==t.type)return t;var e=t.children[t.children.length-1];for(const n of SC)e.attr(n,t.attr(n));return e}(t),e=[t],n=new Map;for(n.set(t,_C(t));e.length;){const t=e.pop();var r=n.get(t),{children:i=[]}=t;for(const s of i){var a=_C(s),{children:o=[]}=r;o.push(a),e.push(s),n.set(s,a),r.children=o}}return n.get(t)}function PC(t,e,n){var t=t["type"],{type:n=n||t}=e;if("view"===n)return e;if("string"!=typeof n)return e;if(t=n,!new Set(Object.keys(dC)).has(t))return e;var r={type:"view"},i=Object.assign({},e);for(const a of SC)void 0!==i[a]&&(r[a]=i[a],delete i[a]);return Object.assign(Object.assign({},r),{children:[i]})}function LC(t){var e=t["type"],t=nt(t,["type","children"]);if("string"==typeof e)return(e=new(function(t){var e=Object.assign(Object.assign({},dC),EC)[t];if(e)return e;throw new Error(`Unknown mark: ${t}.`)}(e))).value=t,e}function CC(t,e,n){for(var r,i,a=[[null,t,PC(t,e,n)]];a.length;){var[o,s,l]=a.shift();if(s)if(l){r=s,g=void 0,g=(i=l).type,i=nt(i,["type","children"]),r.type===g||void 0===g?r.value=rt(r.value,i):"string"==typeof g&&(r.type=g,r.value=i);var c=l["children"],u=s["children"];if(Array.isArray(c)&&Array.isArray(u)){var h=Math.max(c.length,u.length);for(let t=0;t({type:"container",name:t,ctor:e})))];u.Chart=class extends gC{constructor(t){var t=t||{},{container:e,canvas:n,renderer:r,plugins:i}=t;super(nt(t,["container","canvas","renderer","plugins"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=on(()=>{this.forceFit()},300),this._renderer=r||new Dh,this._plugins=i||[],this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new qh,this._context={library:OC,emitter:this._emitter,canvas:n}}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;var t=new Promise((t,e)=>A8(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[e,n,r]=function(){let n,r;return[new Promise((t,e)=>{r=t,n=e}),r,n]}();return t.then(n).catch(r).then(()=>this._renderTrailing()),e}options(t){var e;return 0===arguments.length?TC(this):(e=t["type"],e&&(this._previousDefinedType=e),CC(this,t,this._previousDefinedType),this)}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){this.options();this.emit(F5.BEFORE_CLEAR),this._reset(),T8(0,this._context,!1),this.emit(F5.AFTER_CLEAR)}destroy(){var t,e;this.options();this.emit(F5.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),T8(0,this._context,!0),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(F5.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;var{width:t,height:e}=AC(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(F5.BEFORE_CHANGE_SIZE);t=this.render();return t.then(()=>{this.emit(F5.AFTER_CHANGE_SIZE)}),t}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(F5.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);t=this.render();return t.then(()=>{this.emit(F5.AFTER_CHANGE_SIZE)}),t}_reset(){this.type="view",this.value={},this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{var t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{var e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(e){return t=>{this._rendering=!1,e(t)}}_computedOptions(){var t=this.options(),{key:e="G2_CHART_KEY"}=t,{width:n,height:r}=AC(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r})}_createCanvas(){var{width:t,height:e}=AC(this.options(),this._container);this._plugins.push(new Vh),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new Gl({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){null!=(t=this._trailingResolve)&&t.call(this,this),this._trailing=!0;var t=new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e});return t}_bindAutoFit(){var t=this.options()["autoFit"];this._hasBindAutoFit?t||this._unbindAutoFit():t&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},u.Chart=t([c(rs)],u.Chart),A.enableCSSParsing=!1,u.AREA_CLASS_NAME=Qc,u.COMPONENT_CLASS_NAME=Kc,u.ChartEvent=F5,u.CompositionNode=pC,u.ELEMENT_CLASS_NAME=$c,u.LABEL_CLASS_NAME=Zc,u.LABEL_LAYER_CLASS_NAME=qc,u.MAIN_LAYER_CLASS_NAME=Vc,u.MarkNode=I8,u.PLOT_CLASS_NAME=Xc,u.VIEW_CLASS_NAME=Uc,u.createLibrary=aP,u.register=function(t,e){Object.assign(OC,{[t]:e})},u.render=A8,u.renderToMountedElement=function(t,e={},n=()=>{},r=t=>{throw t}){var{width:i=640,height:a=480}=t,t=_8(t);const{library:o=aP(),group:s=new Fs,emitter:l=new qh}=e;null!==s&&void 0!==s&&s.parentElement||s0("renderToMountedElement can't render chart to unmounted group.");var c=at(s);return e.group=s,e.library=o,(e.emitter=l).emit(F5.BEFORE_RENDER),c8(Object.assign(Object.assign({},t),{width:i,height:a}),c,o,e).then(()=>{s.ownerDocument.defaultView.requestAnimationFrame(()=>{l.emit(F5.AFTER_RENDER),null!=n&&n()})}).catch(t=>{null!=r&&r(t)}),s},Object.defineProperty(u,"__esModule",{value:!0})});