mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-15 11:47:54 +00:00
1 line
1.2 MiB
1 line
1.2 MiB
(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[7949],{57949:function(t,e,n){"use strict";var r=(0,n(35182).i)("Line");e.Z=r},35182:function(t,e,n){"use strict";n.d(e,{i:function(){return MJ}});var r={};n.r(r),n.d(r,{add:function(){return fe},adjoint:function(){return jt},clone:function(){return Ot},copy:function(){return kt},create:function(){return wt},decompose:function(){return Ut},determinant:function(){return Tt},equals:function(){return ye},exactEquals:function(){return ge},frob:function(){return ue},fromQuat:function(){return Qt},fromQuat2:function(){return qt},fromRotation:function(){return zt},fromRotationTranslation:function(){return Gt},fromRotationTranslationScale:function(){return Xt},fromRotationTranslationScaleOrigin:function(){return Kt},fromScaling:function(){return Ft},fromTranslation:function(){return Bt},fromValues:function(){return Mt},fromXRotation:function(){return Zt},fromYRotation:function(){return Wt},fromZRotation:function(){return $t},frustum:function(){return Jt},getRotation:function(){return Vt},getScaling:function(){return Ht},getTranslation:function(){return Yt},identity:function(){return Et},invert:function(){return At},lookAt:function(){return se},mul:function(){return ve},multiply:function(){return Pt},multiplyScalar:function(){return de},multiplyScalarAndAdd:function(){return pe},ortho:function(){return oe},orthoNO:function(){return ie},orthoZO:function(){return ae},perspective:function(){return ee},perspectiveFromFieldOfView:function(){return re},perspectiveNO:function(){return te},perspectiveZO:function(){return ne},rotate:function(){return Lt},rotateX:function(){return Nt},rotateY:function(){return It},rotateZ:function(){return Dt},scale:function(){return Rt},set:function(){return _t},str:function(){return le},sub:function(){return me},subtract:function(){return he},targetTo:function(){return ce},translate:function(){return Ct},transpose:function(){return St}});var i={};n.r(i),n.d(i,{area:function(){return cw},bottom:function(){return yw},bottomLeft:function(){return yw},bottomRight:function(){return yw},inside:function(){return yw},left:function(){return yw},outside:function(){return xw},right:function(){return yw},spider:function(){return jw},surround:function(){return Pw},top:function(){return yw},topLeft:function(){return yw},topRight:function(){return yw}});var o={};n.r(o),n.d(o,{interpolateBlues:function(){return m_},interpolateBrBG:function(){return TM},interpolateBuGn:function(){return VM},interpolateBuPu:function(){return XM},interpolateCividis:function(){return j_},interpolateCool:function(){return H_},interpolateCubehelixDefault:function(){return q_},interpolateGnBu:function(){return QM},interpolateGreens:function(){return x_},interpolateGreys:function(){return O_},interpolateInferno:function(){return iE},interpolateMagma:function(){return rE},interpolateOrRd:function(){return t_},interpolateOranges:function(){return A_},interpolatePRGn:function(){return CM},interpolatePiYG:function(){return LM},interpolatePlasma:function(){return oE},interpolatePuBu:function(){return i_},interpolatePuBuGn:function(){return n_},interpolatePuOr:function(){return IM},interpolatePuRd:function(){return a_},interpolatePurples:function(){return M_},interpolateRainbow:function(){return U_},interpolateRdBu:function(){return BM},interpolateRdGy:function(){return zM},interpolateRdPu:function(){return c_},interpolateRdYlBu:function(){return WM},interpolateRdYlGn:function(){return GM},interpolateReds:function(){return E_},interpolateSinebow:function(){return J_},interpolateSpectral:function(){return YM},interpolateTurbo:function(){return tE},interpolateViridis:function(){return nE},interpolateWarm:function(){return Y_},interpolateYlGn:function(){return h_},interpolateYlGnBu:function(){return u_},interpolateYlOrBr:function(){return p_},interpolateYlOrRd:function(){return y_},schemeAccent:function(){return Tk},schemeBlues:function(){return v_},schemeBrBG:function(){return jM},schemeBuGn:function(){return HM},schemeBuPu:function(){return UM},schemeCategory10:function(){return jk},schemeDark2:function(){return Pk},schemeGnBu:function(){return KM},schemeGreens:function(){return b_},schemeGreys:function(){return w_},schemeObservable10:function(){return Ck},schemeOrRd:function(){return JM},schemeOranges:function(){return S_},schemePRGn:function(){return PM},schemePaired:function(){return Rk},schemePastel1:function(){return Lk},schemePastel2:function(){return Nk},schemePiYG:function(){return RM},schemePuBu:function(){return r_},schemePuBuGn:function(){return e_},schemePuOr:function(){return NM},schemePuRd:function(){return o_},schemePurples:function(){return k_},schemeRdBu:function(){return DM},schemeRdGy:function(){return FM},schemeRdPu:function(){return s_},schemeRdYlBu:function(){return ZM},schemeRdYlGn:function(){return $M},schemeReds:function(){return __},schemeSet1:function(){return Ik},schemeSet2:function(){return Dk},schemeSet3:function(){return Bk},schemeSpectral:function(){return qM},schemeTableau10:function(){return Fk},schemeYlGn:function(){return f_},schemeYlGnBu:function(){return l_},schemeYlOrBr:function(){return d_},schemeYlOrRd:function(){return g_}});var a={};n.r(a),n.d(a,{geoAlbers:function(){return WY},geoAlbersUsa:function(){return $Y},geoAzimuthalEqualArea:function(){return HY},geoAzimuthalEqualAreaRaw:function(){return YY},geoAzimuthalEquidistant:function(){return UY},geoAzimuthalEquidistantRaw:function(){return VY},geoConicConformal:function(){return eH},geoConicConformalRaw:function(){return tH},geoConicEqualArea:function(){return ZY},geoConicEqualAreaRaw:function(){return zY},geoConicEquidistant:function(){return oH},geoConicEquidistantRaw:function(){return iH},geoEqualEarth:function(){return hH},geoEqualEarthRaw:function(){return fH},geoEquirectangular:function(){return rH},geoEquirectangularRaw:function(){return nH},geoGnomonic:function(){return pH},geoGnomonicRaw:function(){return dH},geoIdentity:function(){return gH},geoMercator:function(){return KY},geoMercatorRaw:function(){return XY},geoNaturalEarth1:function(){return vH},geoNaturalEarth1Raw:function(){return yH},geoOrthographic:function(){return bH},geoOrthographicRaw:function(){return mH},geoProjection:function(){return DY},geoProjectionMutator:function(){return BY},geoStereographic:function(){return wH},geoStereographicRaw:function(){return xH},geoTransverseMercator:function(){return kH},geoTransverseMercatorRaw:function(){return OH}});var s={};n.r(s),n.d(s,{frequency:function(){return QV},id:function(){return JV},name:function(){return tU},weight:function(){return KV}});var c,l,u=n(44194),f=u.version||"",h="__rc_react_root__";try{if(parseInt(f.split(".")[0],10)>=18){var d=n(8082);c=d.createRoot}else{var p=n(56321);l=p.render,p.unmountComponentAtNode}}catch(yp){}function g(t,e){c?function(t,e){e[h]||(e[h]=c(e)),e[h].render(t)}(t,e):function(t,e){if(!l)throw new Error("ReactDOM.render is not available in this React version");l(t,e)}(t,e)}var y=new Map;"undefined"!=typeof document&&y.set("tooltip",document.createElement("div"));var v,m,b=function(t,e){void 0===e&&(e=!1);var n=null;if(e)n=y.get("tooltip");else if(n=document.createElement("div"),null==t?void 0:t.key){var r=y.get(t.key);r?n=r:y.set(t.key,n)}return g(t,n),n},x=function(){return x=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},x.apply(this,arguments)},w=function(t){var e=t.loadingTemplate,n=t.theme,r=void 0===n?"light":n,i=t.loading,o=u.useRef(null),a="object"==typeof i?i:{},s=a.container,c=void 0===s?{}:s,l=a.icon,f=void 0===l?{}:l;u.useEffect((function(){!e&&o.current&&function(t,e){if(void 0===e&&(e={}),"undefined"==typeof document)return"loading";var n="";e&&Object.keys(e).forEach((function(t){n+="".concat(t,": ").concat(e[t],";\n")}));var r=t.attachShadow({mode:"open"}),i=document.createElement("div"),o=document.createElement("style");o.innerHTML=".loading {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n .loading div {\n position: absolute;\n top: 33px;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: #ccc;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n ".concat(n,"\n }\n .loading div:nth-child(1) {\n left: 8px;\n animation: loading1 0.6s infinite;\n }\n .loading div:nth-child(2) {\n left: 8px;\n animation: loading2 0.6s infinite;\n }\n .loading div:nth-child(3) {\n left: 32px;\n animation: loading2 0.6s infinite;\n }\n .loading div:nth-child(4) {\n left: 56px;\n animation: loading3 0.6s infinite;\n }\n @keyframes loading1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes loading3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes loading2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n }\n "),i.classList.add("loading"),i.innerHTML="<div></div><div></div><div></div><div></div>",r.appendChild(o),r.appendChild(i)}(o.current,f)}),[]);return u.createElement("div",{className:"charts-loading-container",style:x({position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,background:"dark"===r?"rgb(20, 20, 20)":"rgb(255, 255, 255)"},c)},e||u.createElement("div",{ref:o}))},O=(v=function(t,e){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},v(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={hasError:!1},e.renderError=function(t){var n=e.props.errorTemplate;return"function"==typeof n?n(t):n||u.createElement("h5",null,"组件出错了,请核查后重试: ",t.message)},e}return O(e,t),e.getDerivedStateFromError=function(t){return{hasError:!0,error:t}},e.getDerivedStateFromProps=function(t,e){return e.children!==t.children?{children:t.children,hasError:!1,error:void 0}:null},e.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):u.createElement(u.Fragment,null,this.props.children)},e}(u.Component),M=n(39378),_=function(){return m||(m=document.createElement("canvas").getContext("2d")),m},E=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},S=((0,M.memoize)((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=void 0===r?"sans-serif":r,o=e.fontWeight,a=e.fontStyle,s=e.fontVariant,c=_();return c.font=[a,o,s,"".concat(n,"px"),i].join(" "),c.measureText((0,M.isString)(t)?t:"")}),(function(t,e){return void 0===e&&(e={}),E([t],(0,M.values)(e),!0).join("")})),function(){return S=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},S.apply(this,arguments)});function A(t,e){var n=(0,u.useRef)(null),r=(0,u.useRef)(null),i=(0,u.useRef)(null),o=e.onReady,a=e.onEvent,s=function(t,e){var n;void 0===t&&(t="image/png");var r=null===(n=i.current)||void 0===n?void 0:n.getElementsByTagName("canvas")[0];return null==r?void 0:r.toDataURL(t,e)},c=function(t,e,n){void 0===t&&(t="download"),void 0===e&&(e="image/png");var r=t;-1===t.indexOf(".")&&(r="".concat(t,".").concat(e.split("/")[1]));var i=s(e,n),o=document.createElement("a");return o.href=i,o.download=r,document.body.appendChild(o),o.click(),document.body.removeChild(o),o=null,r},l=function(t,e){void 0===e&&(e=!1);var n=Object.keys(t),r=e;n.forEach((function(n){var i=t[n];"tooltip"===n&&(r=!0),(0,M.isFunction)(i)&&function(t){var e=new Set(["g","circle","ellipse","image","rect","line","polyline","polygon","text","path","html","mesh"]);if([/\breact\b/i,/\.jsx/,/children:\s*\[/,/\*#__PURE__\*/].some((function(e){return e.test(t)})))return!0;var n=t.match(/(\w+)?\.createElement\(\s*(['"`])([^'"`]+)\2/g);return!!n&&n.some((function(t){var n=t.match(/\.createElement\(\s*(['"`])([^'"`]+)\1/);return n&&!e.has(n[2].toLowerCase())}))}("".concat(i))?t[n]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return b(i.apply(void 0,t),r)}:(0,M.isArray)(i)?i.forEach((function(t){l(t,r)})):(0,M.isObject)(i)?l(i,r):r=e}))};return(0,u.useEffect)((function(){n.current&&!(0,M.isEqual)(r.current,e)&&(r.current=(0,M.cloneDeep)(e),l(e),n.current.update(e),n.current.render())}),[e]),(0,u.useEffect)((function(){if(!i.current)return function(){return null};r.current||(r.current=(0,M.cloneDeep)(e)),l(e);var u=new t(i.current,S({},e));u.toDataURL=s,u.downloadImage=c,u.render(),n.current=u,o&&o(u);var f=function(t){a&&a(u,t)};return u.on("*",f),function(){n.current&&(n.current.destroy(),n.current.off("*",f),n.current=void 0)}}),[]),{chart:n,container:i}}var j=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],o=this._events["*"]||[],a=function(r){for(var i=r.length,o=0;o<i;o++)if(r[o]){var a=r[o],s=a.callback;a.once&&(r.splice(o,1),0===r.length&&delete e._events[t],i--,o--),s.apply(e,n)}};a(i),a(o)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),T=j;const P="main-layer",C="label-layer",R="element",L="view",N="plot",I="component",D="label",B="area",F="axis-breaks",z="axis-breaks-group";var Z=n(94433),W=n(17989),$=n(71235),G=n(28548),q=n(78513),Y=n(28944),H=n(32906),V=n(60413),U=1e-6,X="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI,Math.PI;function K(){var t=new X(3);return X!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Q(t){var e=new X(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function J(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function tt(t,e,n){var r=new X(3);return r[0]=t,r[1]=e,r[2]=n,r}function et(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function nt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function rt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function it(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function ot(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function at(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function st(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function ct(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function lt(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=i*c-o*s,t[1]=o*a-r*c,t[2]=r*s-i*a,t}function ut(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function ft(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ht(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],c=e[1],l=e[2],u=i*l-o*c,f=o*s-r*l,h=r*c-i*s;return u+=u,f+=f,h+=h,t[0]=s+a*u+i*h-o*f,t[1]=c+a*f+o*u-r*h,t[2]=l+a*h+r*f-i*u,t}function dt(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=U*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=U*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=U*Math.max(1,Math.abs(i),Math.abs(s))}var pt,gt=it,yt=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)},vt=J;pt=K();function mt(){var t=new X(4);return X!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function bt(t,e,n,r){var i=new X(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function xt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}!function(){var t=mt()}();function wt(){var t=new X(16);return X!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Ot(t){var e=new X(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function kt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Mt(t,e,n,r,i,o,a,s,c,l,u,f,h,d,p,g){var y=new X(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=s,y[8]=c,y[9]=l,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y}function _t(t,e,n,r,i,o,a,s,c,l,u,f,h,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function Et(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function St(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function At(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],v=e[15],m=n*s-r*a,b=n*c-i*a,x=n*l-o*a,w=r*c-i*s,O=r*l-o*s,k=i*l-o*c,M=u*g-f*p,_=u*y-h*p,E=u*v-d*p,S=f*y-h*g,A=f*v-d*g,j=h*v-d*y,T=m*j-b*A+x*S+w*E-O*_+k*M;return T?(T=1/T,t[0]=(s*j-c*A+l*S)*T,t[1]=(i*A-r*j-o*S)*T,t[2]=(g*k-y*O+v*w)*T,t[3]=(h*O-f*k-d*w)*T,t[4]=(c*E-a*j-l*_)*T,t[5]=(n*j-i*E+o*_)*T,t[6]=(y*x-p*k-v*b)*T,t[7]=(u*k-h*x+d*b)*T,t[8]=(a*A-s*E+l*M)*T,t[9]=(r*E-n*A-o*M)*T,t[10]=(p*O-g*x+v*m)*T,t[11]=(f*x-u*O-d*m)*T,t[12]=(s*_-a*S-c*M)*T,t[13]=(n*S-r*_+i*M)*T,t[14]=(g*b-p*w-y*m)*T,t[15]=(u*w-f*b+h*m)*T,t):null}function jt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],v=e[15],m=n*s-r*a,b=n*c-i*a,x=n*l-o*a,w=r*c-i*s,O=r*l-o*s,k=i*l-o*c,M=u*g-f*p,_=u*y-h*p,E=u*v-d*p,S=f*y-h*g,A=f*v-d*g,j=h*v-d*y;return t[0]=s*j-c*A+l*S,t[1]=i*A-r*j-o*S,t[2]=g*k-y*O+v*w,t[3]=h*O-f*k-d*w,t[4]=c*E-a*j-l*_,t[5]=n*j-i*E+o*_,t[6]=y*x-p*k-v*b,t[7]=u*k-h*x+d*b,t[8]=a*A-s*E+l*M,t[9]=r*E-n*A-o*M,t[10]=p*O-g*x+v*m,t[11]=f*x-u*O-d*m,t[12]=s*_-a*S-c*M,t[13]=n*S-r*_+i*M,t[14]=g*b-p*w-y*m,t[15]=u*w-f*b+h*m,t}function Tt(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],l=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],y=e*a-n*o,v=e*s-r*o,m=n*s-r*a,b=l*p-u*d,x=l*g-f*d,w=u*g-f*p;return c*(e*w-n*x+r*b)-i*(o*w-a*x+s*b)+t[15]*(l*m-u*v+f*y)-h*(d*m-p*v+g*y)}function Pt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],v=e[14],m=e[15],b=n[0],x=n[1],w=n[2],O=n[3];return t[0]=b*r+x*s+w*f+O*g,t[1]=b*i+x*c+w*h+O*y,t[2]=b*o+x*l+w*d+O*v,t[3]=b*a+x*u+w*p+O*m,b=n[4],x=n[5],w=n[6],O=n[7],t[4]=b*r+x*s+w*f+O*g,t[5]=b*i+x*c+w*h+O*y,t[6]=b*o+x*l+w*d+O*v,t[7]=b*a+x*u+w*p+O*m,b=n[8],x=n[9],w=n[10],O=n[11],t[8]=b*r+x*s+w*f+O*g,t[9]=b*i+x*c+w*h+O*y,t[10]=b*o+x*l+w*d+O*v,t[11]=b*a+x*u+w*p+O*m,b=n[12],x=n[13],w=n[14],O=n[15],t[12]=b*r+x*s+w*f+O*g,t[13]=b*i+x*c+w*h+O*y,t[14]=b*o+x*l+w*d+O*v,t[15]=b*a+x*u+w*p+O*m,t}function Ct(t,e,n){var r,i,o,a,s,c,l,u,f,h,d,p,g=n[0],y=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*v+e[12],t[13]=e[1]*g+e[5]*y+e[9]*v+e[13],t[14]=e[2]*g+e[6]*y+e[10]*v+e[14],t[15]=e[3]*g+e[7]*y+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*v+e[12],t[13]=i*g+c*y+h*v+e[13],t[14]=o*g+l*y+d*v+e[14],t[15]=a*g+u*y+p*v+e[15]),t}function Rt(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Lt(t,e,n,r){var i,o,a,s,c,l,u,f,h,d,p,g,y,v,m,b,x,w,O,k,M,_,E,S,A=r[0],j=r[1],T=r[2],P=Math.sqrt(A*A+j*j+T*T);return P<U?null:(A*=P=1/P,j*=P,T*=P,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],c=e[1],l=e[2],u=e[3],f=e[4],h=e[5],d=e[6],p=e[7],g=e[8],y=e[9],v=e[10],m=e[11],b=A*A*a+o,x=j*A*a+T*i,w=T*A*a-j*i,O=A*j*a-T*i,k=j*j*a+o,M=T*j*a+A*i,_=A*T*a+j*i,E=j*T*a-A*i,S=T*T*a+o,t[0]=s*b+f*x+g*w,t[1]=c*b+h*x+y*w,t[2]=l*b+d*x+v*w,t[3]=u*b+p*x+m*w,t[4]=s*O+f*k+g*M,t[5]=c*O+h*k+y*M,t[6]=l*O+d*k+v*M,t[7]=u*O+p*k+m*M,t[8]=s*_+f*E+g*S,t[9]=c*_+h*E+y*S,t[10]=l*_+d*E+v*S,t[11]=u*_+p*E+m*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function Nt(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],c=e[7],l=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=a*i+u*r,t[6]=s*i+f*r,t[7]=c*i+h*r,t[8]=l*i-o*r,t[9]=u*i-a*r,t[10]=f*i-s*r,t[11]=h*i-c*r,t}function It(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],l=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-l*r,t[1]=a*i-u*r,t[2]=s*i-f*r,t[3]=c*i-h*r,t[8]=o*r+l*i,t[9]=a*r+u*i,t[10]=s*r+f*i,t[11]=c*r+h*i,t}function Dt(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],l=e[4],u=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+l*r,t[1]=a*i+u*r,t[2]=s*i+f*r,t[3]=c*i+h*r,t[4]=l*i-o*r,t[5]=u*i-a*r,t[6]=f*i-s*r,t[7]=h*i-c*r,t}function Bt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Ft(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function zt(t,e,n){var r,i,o,a=n[0],s=n[1],c=n[2],l=Math.sqrt(a*a+s*s+c*c);return l<U?null:(a*=l=1/l,s*=l,c*=l,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+c*r,t[2]=c*a*o-s*r,t[3]=0,t[4]=a*s*o-c*r,t[5]=s*s*o+i,t[6]=c*s*o+a*r,t[7]=0,t[8]=a*c*o+s*r,t[9]=s*c*o-a*r,t[10]=c*c*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function Zt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Wt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function $t(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Gt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,c=i+i,l=o+o,u=r*s,f=r*c,h=r*l,d=i*c,p=i*l,g=o*l,y=a*s,v=a*c,m=a*l;return t[0]=1-(d+g),t[1]=f+m,t[2]=h-v,t[3]=0,t[4]=f-m,t[5]=1-(u+g),t[6]=p+y,t[7]=0,t[8]=h+v,t[9]=p-y,t[10]=1-(u+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function qt(t,e){var n=new X(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=2*(s*a+u*r+c*o-l*i)/f,n[1]=2*(c*a+u*i+l*r-s*o)/f,n[2]=2*(l*a+u*o+s*i-c*r)/f):(n[0]=2*(s*a+u*r+c*o-l*i),n[1]=2*(c*a+u*i+l*r-s*o),n[2]=2*(l*a+u*o+s*i-c*r)),Gt(t,e,n),t}function Yt(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Ht(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],c=e[8],l=e[9],u=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(c*c+l*l+u*u),t}function Vt(t,e){var n=new X(3);Ht(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,c=e[2]*o,l=e[4]*r,u=e[5]*i,f=e[6]*o,h=e[8]*r,d=e[9]*i,p=e[10]*o,g=a+u+p,y=0;return g>0?(y=2*Math.sqrt(g+1),t[3]=.25*y,t[0]=(f-d)/y,t[1]=(h-c)/y,t[2]=(s-l)/y):a>u&&a>p?(y=2*Math.sqrt(1+a-u-p),t[3]=(f-d)/y,t[0]=.25*y,t[1]=(s+l)/y,t[2]=(h+c)/y):u>p?(y=2*Math.sqrt(1+u-a-p),t[3]=(h-c)/y,t[0]=(s+l)/y,t[1]=.25*y,t[2]=(f+d)/y):(y=2*Math.sqrt(1+p-a-u),t[3]=(s-l)/y,t[0]=(h+c)/y,t[1]=(f+d)/y,t[2]=.25*y),t}function Ut(t,e,n,r){e[0]=r[12],e[1]=r[13],e[2]=r[14];var i=r[0],o=r[1],a=r[2],s=r[4],c=r[5],l=r[6],u=r[8],f=r[9],h=r[10];n[0]=Math.sqrt(i*i+o*o+a*a),n[1]=Math.sqrt(s*s+c*c+l*l),n[2]=Math.sqrt(u*u+f*f+h*h);var d=1/n[0],p=1/n[1],g=1/n[2],y=i*d,v=o*p,m=a*g,b=s*d,x=c*p,w=l*g,O=u*d,k=f*p,M=h*g,_=y+x+M,E=0;return _>0?(E=2*Math.sqrt(_+1),t[3]=.25*E,t[0]=(w-k)/E,t[1]=(O-m)/E,t[2]=(v-b)/E):y>x&&y>M?(E=2*Math.sqrt(1+y-x-M),t[3]=(w-k)/E,t[0]=.25*E,t[1]=(v+b)/E,t[2]=(O+m)/E):x>M?(E=2*Math.sqrt(1+x-y-M),t[3]=(O-m)/E,t[0]=(v+b)/E,t[1]=.25*E,t[2]=(w+k)/E):(E=2*Math.sqrt(1+M-y-x),t[3]=(v-b)/E,t[0]=(O+m)/E,t[1]=(w+k)/E,t[2]=.25*E),t}function Xt(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],c=i+i,l=o+o,u=a+a,f=i*c,h=i*l,d=i*u,p=o*l,g=o*u,y=a*u,v=s*c,m=s*l,b=s*u,x=r[0],w=r[1],O=r[2];return t[0]=(1-(p+y))*x,t[1]=(h+b)*x,t[2]=(d-m)*x,t[3]=0,t[4]=(h-b)*w,t[5]=(1-(f+y))*w,t[6]=(g+v)*w,t[7]=0,t[8]=(d+m)*O,t[9]=(g-v)*O,t[10]=(1-(f+p))*O,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Kt(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],c=e[3],l=o+o,u=a+a,f=s+s,h=o*l,d=o*u,p=o*f,g=a*u,y=a*f,v=s*f,m=c*l,b=c*u,x=c*f,w=r[0],O=r[1],k=r[2],M=i[0],_=i[1],E=i[2],S=(1-(g+v))*w,A=(d+x)*w,j=(p-b)*w,T=(d-x)*O,P=(1-(h+v))*O,C=(y+m)*O,R=(p+b)*k,L=(y-m)*k,N=(1-(h+g))*k;return t[0]=S,t[1]=A,t[2]=j,t[3]=0,t[4]=T,t[5]=P,t[6]=C,t[7]=0,t[8]=R,t[9]=L,t[10]=N,t[11]=0,t[12]=n[0]+M-(S*M+T*_+R*E),t[13]=n[1]+_-(A*M+P*_+L*E),t[14]=n[2]+E-(j*M+C*_+N*E),t[15]=1,t}function Qt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,c=i+i,l=n*a,u=r*a,f=r*s,h=i*a,d=i*s,p=i*c,g=o*a,y=o*s,v=o*c;return t[0]=1-f-p,t[1]=u+v,t[2]=h-y,t[3]=0,t[4]=u-v,t[5]=1-l-p,t[6]=d+g,t[7]=0,t[8]=h+y,t[9]=d-g,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Jt(t,e,n,r,i,o,a){var s=1/(n-e),c=1/(i-r),l=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*c,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*c,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t}function te(t,e,n,r,i){var o=1/Math.tan(e/2);if(t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0){var a=1/(r-i);t[10]=(i+r)*a,t[14]=2*i*r*a}else t[10]=-1,t[14]=-2*r;return t}var ee=te;function ne(t,e,n,r,i){var o=1/Math.tan(e/2);if(t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0){var a=1/(r-i);t[10]=i*a,t[14]=i*r*a}else t[10]=-1,t[14]=-r;return t}function re(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),c=2/(a+s),l=2/(i+o);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-s)*c*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function ie(t,e,n,r,i,o,a){var s=1/(e-n),c=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=(a+o)*l,t[15]=1,t}var oe=ie;function ae(t,e,n,r,i,o,a){var s=1/(e-n),c=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=o*l,t[15]=1,t}function se(t,e,n,r){var i,o,a,s,c,l,u,f,h,d,p=e[0],g=e[1],y=e[2],v=r[0],m=r[1],b=r[2],x=n[0],w=n[1],O=n[2];return Math.abs(p-x)<U&&Math.abs(g-w)<U&&Math.abs(y-O)<U?Et(t):(u=p-x,f=g-w,h=y-O,i=m*(h*=d=1/Math.sqrt(u*u+f*f+h*h))-b*(f*=d),o=b*(u*=d)-v*h,a=v*f-m*u,(d=Math.sqrt(i*i+o*o+a*a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),s=f*a-h*o,c=h*i-u*a,l=u*o-f*i,(d=Math.sqrt(s*s+c*c+l*l))?(s*=d=1/d,c*=d,l*=d):(s=0,c=0,l=0),t[0]=i,t[1]=s,t[2]=u,t[3]=0,t[4]=o,t[5]=c,t[6]=f,t[7]=0,t[8]=a,t[9]=l,t[10]=h,t[11]=0,t[12]=-(i*p+o*g+a*y),t[13]=-(s*p+c*g+l*y),t[14]=-(u*p+f*g+h*y),t[15]=1,t)}function ce(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],c=r[1],l=r[2],u=i-n[0],f=o-n[1],h=a-n[2],d=u*u+f*f+h*h;d>0&&(u*=d=1/Math.sqrt(d),f*=d,h*=d);var p=c*h-l*f,g=l*u-s*h,y=s*f-c*u;return(d=p*p+g*g+y*y)>0&&(p*=d=1/Math.sqrt(d),g*=d,y*=d),t[0]=p,t[1]=g,t[2]=y,t[3]=0,t[4]=f*y-h*g,t[5]=h*p-u*y,t[6]=u*g-f*p,t[7]=0,t[8]=u,t[9]=f,t[10]=h,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function le(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function ue(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8]+t[9]*t[9]+t[10]*t[10]+t[11]*t[11]+t[12]*t[12]+t[13]*t[13]+t[14]*t[14]+t[15]*t[15])}function fe(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function he(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function de(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function pe(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function ge(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function ye(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],l=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],v=t[15],m=e[0],b=e[1],x=e[2],w=e[3],O=e[4],k=e[5],M=e[6],_=e[7],E=e[8],S=e[9],A=e[10],j=e[11],T=e[12],P=e[13],C=e[14],R=e[15];return Math.abs(n-m)<=U*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=U*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=U*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-w)<=U*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-O)<=U*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(s-k)<=U*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(c-M)<=U*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(l-_)<=U*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(u-E)<=U*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(f-S)<=U*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-A)<=U*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(d-j)<=U*Math.max(1,Math.abs(d),Math.abs(j))&&Math.abs(p-T)<=U*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=U*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-C)<=U*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(v-R)<=U*Math.max(1,Math.abs(v),Math.abs(R))}var ve=Pt,me=he;function be(){var t=new X(9);return X!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function xe(){var t=new X(4);return X!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function we(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Oe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],c=n[1],l=n[2],u=n[3];return t[0]=r*u+a*s+i*l-o*c,t[1]=i*u+a*c+o*s-r*l,t[2]=o*u+a*l+r*c-i*s,t[3]=a*u-r*s-i*c-o*l,t}function ke(t,e,n,r){var i,o,a,s,c,l=e[0],u=e[1],f=e[2],h=e[3],d=n[0],p=n[1],g=n[2],y=n[3];return(o=l*d+u*p+f*g+h*y)<0&&(o=-o,d=-d,p=-p,g=-g,y=-y),1-o>U?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,c=Math.sin(r*i)/a):(s=1-r,c=r),t[0]=s*l+c*d,t[1]=s*u+c*p,t[2]=s*f+c*g,t[3]=s*h+c*y,t}function Me(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function _e(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",o=Math.PI/360;e*=o,r*=o,n*=o;var a=Math.sin(e),s=Math.cos(e),c=Math.sin(n),l=Math.cos(n),u=Math.sin(r),f=Math.cos(r);switch(i){case"xyz":t[0]=a*l*f+s*c*u,t[1]=s*c*f-a*l*u,t[2]=s*l*u+a*c*f,t[3]=s*l*f-a*c*u;break;case"xzy":t[0]=a*l*f-s*c*u,t[1]=s*c*f-a*l*u,t[2]=s*l*u+a*c*f,t[3]=s*l*f+a*c*u;break;case"yxz":t[0]=a*l*f+s*c*u,t[1]=s*c*f-a*l*u,t[2]=s*l*u-a*c*f,t[3]=s*l*f+a*c*u;break;case"yzx":t[0]=a*l*f+s*c*u,t[1]=s*c*f+a*l*u,t[2]=s*l*u-a*c*f,t[3]=s*l*f-a*c*u;break;case"zxy":t[0]=a*l*f-s*c*u,t[1]=s*c*f+a*l*u,t[2]=s*l*u+a*c*f,t[3]=s*l*f-a*c*u;break;case"zyx":t[0]=a*l*f-s*c*u,t[1]=s*c*f+a*l*u,t[2]=s*l*u-a*c*f,t[3]=s*l*f+a*c*u;break;default:throw new Error("Unknown angle order "+i)}return t}var Ee=bt,Se=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Ae=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},je=Oe,Te=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};var Pe,Ce,Re,Le,Ne,Ie;Pe=K(),Ce=tt(1,0,0),Re=tt(0,1,0),Le=xe(),Ne=xe(),Ie=be();function De(){var t=new X(2);return X!=Float32Array&&(t[0]=0,t[1]=0),t}function Be(t,e){return t[0]=e[0],t[1]=e[1],t}function Fe(t,e,n){return t[0]=e,t[1]=n,t}!function(){var t=De()}();function ze(t){return"number"==typeof t}function Ze(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function We(t){return null==t}function $e(t){return"string"==typeof t}var Ge=function(t,e,n){return t<e?e:t>n?n:t},qe=n(92336),Ye={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function He(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return Ye[e]===t.length-1&&"achlmqstvz".includes(e)}))}function Ve(t){return He(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function Ue(t){return Ve(t)&&t.every((function(t){var e=t[0];return"ACLMQZ".includes(e)}))}var Xe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Ke(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Ye[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,Ye[n]))),Ye[n]););}function Qe(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);return 48===r?(t.param=0,void(t.index+=1)):49===r?(t.param=1,void(t.index+=1)):void(t.err='[path-util]: invalid Arc flag "'.concat(n[e],'", expecting 0 or 1 at index ').concat(e))}function Je(t){return t>=48&&t<=57||43===t||45===t||46===t}function tn(t){return t>=48&&t<=57}function en(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,s=!1,c=!1,l=!1;if(o>=n)t.err="[path-util]: Invalid path value at index ".concat(o,', "pathValue" is missing param');else if(43!==(e=r.charCodeAt(o))&&45!==e||(o+=1,e=r.charCodeAt(o)),tn(e)||46===e){if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&tn(e))return void(t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(r[i],'" illegal number'));for(;o<n&&tn(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(l=!0,o+=1;tn(r.charCodeAt(o));)o+=1,c=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(l&&!s&&!c)return void(t.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(r[o],'" invalid float exponent'));if(o+=1,43!==(e=r.charCodeAt(o))&&45!==e||(o+=1),!(o<n&&tn(r.charCodeAt(o))))return void(t.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(r[o],'" invalid integer exponent'));for(;o<n&&tn(r.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(i,o)}else t.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(r[o],'" is not a number')}function nn(t){return 10===t||13===t||8232===t||8233===t||32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(t)}function rn(t){for(var e=t.pathValue,n=t.max;t.index<n&&nn(e.charCodeAt(t.index));)t.index+=1}function on(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=Ye[n[r].toLowerCase()];if(t.segmentStart=r,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(t.index+=1,rn(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?en(t):Qe(t),t.err.length)return;t.data.push(t.param),rn(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,rn(t))}if(t.index>=t.max)break;if(!Je(n.charCodeAt(t.index)))break}Ke(t)}else Ke(t);else t.err='[path-util]: Invalid path value "'.concat(n[r],'" is not a path command')}var an=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 sn(t){if(Ve(t))return[].concat(t);var e=function(t){if(He(t))return[].concat(t);var e=new an(t);for(rn(e);e.index<e.max&&!e.err.length;)on(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map((function(t){var e,a=t.slice(1).map(Number),s=t[0],c=s.toUpperCase();if("M"===s)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(s!==c)switch(c){case"A":e=[c,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[c,a[0]+r];break;case"H":e=[c,a[0]+n];break;default:var l=a.map((function(t,e){return t+(e%2?r:n)}));e=[c].concat(l)}else e=[c].concat(a);var u=e.length;switch(c){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===c&&(i=n,o=r)}return e}))}function cn(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,s=t.slice(1).map(Number),c=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)c=["L",t[1],i];else if("V"===n)c=["L",r,t[1]];else if("S"===n){var l=2*r-o,u=2*i-a;e.x1=l,e.y1=u,c=["C",l,u].concat(s)}else if("T"===n){var f=2*r-e.qx,h=2*i-e.qy;e.qx=f,e.qy=h,c=["Q",f,h].concat(s)}else if("Q"===n){var d=s[0],p=s[1];e.qx=d,e.qy=p}return c}function ln(t){if(Ue(t))return[].concat(t);for(var e=sn(t),n=(0,qe.pi)({},Xe),r=0;r<e.length;r+=1){e[r]=cn(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function un(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function fn(t,e,n,r,i){var o=Ze([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var s=un([t,e],[n,r],i/o);a={x:s[0],y:s[1]}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function hn(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=n*i+r*o,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos(a/s)}function dn(t,e,n,r,i,o,a,s,c,l){var u=Math.abs,f=Math.sin,h=Math.cos,d=Math.sqrt,p=Math.PI,g=u(n),y=u(r),v=(i%360+360)%360*(p/180);if(t===s&&e===c)return{x:t,y:e};if(0===g||0===y)return fn(t,e,s,c,l).point;var m=(t-s)/2,b=(e-c)/2,x={x:h(v)*m+f(v)*b,y:-f(v)*m+h(v)*b},w=Math.pow(x.x,2)/Math.pow(g,2)+Math.pow(x.y,2)/Math.pow(y,2);w>1&&(g*=d(w),y*=d(w));var O=(Math.pow(g,2)*Math.pow(y,2)-Math.pow(g,2)*Math.pow(x.y,2)-Math.pow(y,2)*Math.pow(x.x,2))/(Math.pow(g,2)*Math.pow(x.y,2)+Math.pow(y,2)*Math.pow(x.x,2)),k=(o!==a?1:-1)*d(O=O<0?0:O),M=k*(g*x.y/y),_=k*(-y*x.x/g),E=h(v)*M-f(v)*_+(t+s)/2,S=f(v)*M+h(v)*_+(e+c)/2,A={x:(x.x-M)/g,y:(x.y-_)/y},j=hn({x:1,y:0},A),T=hn(A,{x:(-x.x-M)/g,y:(-x.y-_)/y});!a&&T>0?T-=2*p:a&&T<0&&(T+=2*p);var P=j+(T%=2*p)*l,C=g*h(P),R=y*f(P);return{x:h(v)*C-f(v)*R+E,y:f(v)*C+h(v)*R+S}}function pn(t,e,n,r,i,o,a,s,c,l,u){var f,h=u.bbox,d=void 0===h||h,p=u.length,g=void 0===p||p,y=u.sampleSize,v=void 0===y?30:y,m="number"==typeof l,b=t,x=e,w=0,O=[b,x,w],k=[b,x],M={x:0,y:0},_=[{x:b,y:x}];m&&l<=0&&(M={x:b,y:x});for(var E=0;E<=v;E+=1){if(b=(f=dn(t,e,n,r,i,o,a,s,c,E/v)).x,x=f.y,d&&_.push({x:b,y:x}),g&&(w+=Ze(k,[b,x])),k=[b,x],m&&w>=l&&l>O[2]){var S=(w-l)/(w-O[2]);M={x:k[0]*(1-S)+O[0]*S,y:k[1]*(1-S)+O[1]*S}}O=[b,x,w]}return m&&l>=w&&(M={x:s,y:c}),{length:w,point:M,min:{x:Math.min.apply(null,_.map((function(t){return t.x}))),y:Math.min.apply(null,_.map((function(t){return t.y})))},max:{x:Math.max.apply(null,_.map((function(t){return t.x}))),y:Math.max.apply(null,_.map((function(t){return t.y})))}}}function gn(t,e,n,r,i,o,a,s,c){var l=1-c;return{x:Math.pow(l,3)*t+3*Math.pow(l,2)*c*n+3*l*Math.pow(c,2)*i+Math.pow(c,3)*a,y:Math.pow(l,3)*e+3*Math.pow(l,2)*c*r+3*l*Math.pow(c,2)*o+Math.pow(c,3)*s}}function yn(t,e,n,r,i,o,a,s,c,l){var u,f=l.bbox,h=void 0===f||f,d=l.length,p=void 0===d||d,g=l.sampleSize,y=void 0===g?10:g,v="number"==typeof c,m=t,b=e,x=0,w=[m,b,x],O=[m,b],k={x:0,y:0},M=[{x:m,y:b}];v&&c<=0&&(k={x:m,y:b});for(var _=0;_<=y;_+=1){if(m=(u=gn(t,e,n,r,i,o,a,s,_/y)).x,b=u.y,h&&M.push({x:m,y:b}),p&&(x+=Ze(O,[m,b])),O=[m,b],v&&x>=c&&c>w[2]){var E=(x-c)/(x-w[2]);k={x:O[0]*(1-E)+w[0]*E,y:O[1]*(1-E)+w[1]*E}}w=[m,b,x]}return v&&c>=x&&(k={x:a,y:s}),{length:x,point:k,min:{x:Math.min.apply(null,M.map((function(t){return t.x}))),y:Math.min.apply(null,M.map((function(t){return t.y})))},max:{x:Math.max.apply(null,M.map((function(t){return t.x}))),y:Math.max.apply(null,M.map((function(t){return t.y})))}}}function vn(t,e,n,r,i,o,a){var s=1-a;return{x:Math.pow(s,2)*t+2*s*a*n+Math.pow(a,2)*i,y:Math.pow(s,2)*e+2*s*a*r+Math.pow(a,2)*o}}function mn(t,e,n,r,i,o,a,s){var c,l=s.bbox,u=void 0===l||l,f=s.length,h=void 0===f||f,d=s.sampleSize,p=void 0===d?10:d,g="number"==typeof a,y=t,v=e,m=0,b=[y,v,m],x=[y,v],w={x:0,y:0},O=[{x:y,y:v}];g&&a<=0&&(w={x:y,y:v});for(var k=0;k<=p;k+=1){if(y=(c=vn(t,e,n,r,i,o,k/p)).x,v=c.y,u&&O.push({x:y,y:v}),h&&(m+=Ze(x,[y,v])),x=[y,v],g&&m>=a&&a>b[2]){var M=(m-a)/(m-b[2]);w={x:x[0]*(1-M)+b[0]*M,y:x[1]*(1-M)+b[1]*M}}b=[y,v,m]}return g&&a>=m&&(w={x:i,y:o}),{length:m,point:w,min:{x:Math.min.apply(null,O.map((function(t){return t.x}))),y:Math.min.apply(null,O.map((function(t){return t.y})))},max:{x:Math.max.apply(null,O.map((function(t){return t.x}))),y:Math.max.apply(null,O.map((function(t){return t.y})))}}}function bn(t,e,n){for(var r,i,o,a,s,c,l,u,f,h=ln(t),d="number"==typeof e,p=[],g=0,y=0,v=0,m=0,b=[],x=[],w=0,O={x:0,y:0},k=O,M=O,_=O,E=0,S=0,A=h.length;S<A;S+=1)p=(l="M"===(u=(f=h[S])[0]))?p:[g,y].concat(f.slice(1)),l?(k=O={x:v=f[1],y:m=f[2]},w=0,d&&e<.001&&(_=O)):"L"===u?(w=(r=fn(p[0],p[1],p[2],p[3],(e||0)-E)).length,O=r.min,k=r.max,M=r.point):"A"===u?(w=(i=pn(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],(e||0)-E,n||{})).length,O=i.min,k=i.max,M=i.point):"C"===u?(w=(o=yn(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],(e||0)-E,n||{})).length,O=o.min,k=o.max,M=o.point):"Q"===u?(w=(a=mn(p[0],p[1],p[2],p[3],p[4],p[5],(e||0)-E,n||{})).length,O=a.min,k=a.max,M=a.point):"Z"===u&&(w=(s=fn((p=[g,y,v,m])[0],p[1],p[2],p[3],(e||0)-E)).length,O=s.min,k=s.max,M=s.point),d&&E<e&&E+w>=e&&(_=M),x.push(k),b.push(O),E+=w,g=(c="Z"!==u?f.slice(-2):[v,m])[0],y=c[1];return d&&e>=E&&(_={x:g,y:y}),{length:E,point:_,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,x.map((function(t){return t.x}))),y:Math.max.apply(null,x.map((function(t){return t.y})))}}}function xn(t){return Array.isArray(t)}var wn=function(t){if(xn(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])};function On(t){if(!Array.isArray(t))return-1/0;var e=t.length;if(!e)return-1/0;for(var n=t[0],r=1;r<e;r++)n=Math.max(n,t[r]);return n}function kn(t,e,n){return void 0===n&&(n=1e-5),t===e||Math.abs(t-e)<n}var Mn=function(t,e){return(t%e+e)%e};function _n(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}function En(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Sn(t,e,n,r,i,o,a,s,c,l){var u,f,h,d,p,g=t,y=e,v=n,m=r,b=s,x=c,w=120*Math.PI/180,O=Math.PI/180*(+i||0),k=[];if(l)f=l[0],h=l[1],d=l[2],p=l[3];else{g=(u=En(g,y,-O)).x,y=u.y;var M=(g-(b=(u=En(b,x,-O)).x))/2,_=(y-(x=u.y))/2,E=M*M/(v*v)+_*_/(m*m);E>1&&(v*=E=Math.sqrt(E),m*=E);var S=v*v,A=m*m,j=(o===a?-1:1)*Math.sqrt(Math.abs((S*A-S*_*_-A*M*M)/(S*_*_+A*M*M)));d=j*v*_/m+(g+b)/2,p=j*-m*M/v+(y+x)/2,f=Math.asin(((y-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),h=Math.asin(((x-p)/m*Math.pow(10,9)>>0)/Math.pow(10,9)),f=g<d?Math.PI-f:f,h=b<d?Math.PI-h:h,f<0&&(f=2*Math.PI+f),h<0&&(h=2*Math.PI+h),a&&f>h&&(f-=2*Math.PI),!a&&h>f&&(h-=2*Math.PI)}var T=h-f;if(Math.abs(T)>w){var P=h,C=b,R=x;h=f+w*(a&&h>f?1:-1),k=Sn(b=d+v*Math.cos(h),x=p+m*Math.sin(h),v,m,i,0,a,C,R,[h,P,d,p])}T=h-f;var L=Math.cos(f),N=Math.sin(f),I=Math.cos(h),D=Math.sin(h),B=Math.tan(T/4),F=4/3*v*B,z=4/3*m*B,Z=[g,y],W=[g+F*N,y-z*L],$=[b+F*D,x-z*I],G=[b,x];if(W[0]=2*Z[0]-W[0],W[1]=2*Z[1]-W[1],l)return W.concat($,G,k);for(var q=[],Y=0,H=(k=W.concat($,G,k)).length;Y<H;Y+=1)q[Y]=Y%2?En(k[Y-1],k[Y],O).y:En(k[Y],k[Y+1],O).x;return q}var An=function(t,e,n,r){var i=un([t,e],[n,r],.5);return(0,qe.ev)((0,qe.ev)([],i,!0),[n,r,n,r],!1)};function jn(t,e){var n,r=t[0],i=t.slice(1).map(Number),o=i[0],a=i[1],s=e.x1,c=e.y1,l=e.x,u=e.y;switch("TQ".includes(r)||(e.qx=null,e.qy=null),r){case"M":return e.x=o,e.y=a,t;case"A":return n=[s,c].concat(i),["C"].concat(Sn(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return e.qx=o,e.qy=a,n=[s,c].concat(i),["C"].concat(function(t,e,n,r,i,o){var a=1/3,s=2/3;return[a*t+s*n,a*e+s*r,a*i+s*n,a*o+s*r,i,o]}(n[0],n[1],n[2],n[3],n[4],n[5]));case"L":return["C"].concat(An(s,c,o,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(An(s,c,l,u))}return t}function Tn(t,e){if(void 0===e&&(e=!1),function(t){return Ue(t)&&t.every((function(t){var e=t[0];return"MC".includes(e)}))}(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r,i,o=ln(t),a=(0,qe.pi)({},Xe),s=[],c="",l=o.length,u=[],f=0;f<l;f+=1){o[f]&&(c=o[f][0]),s[f]=c;var h=jn(o[f],a);o[f]=h,_n(o,s,f),l=o.length,"Z"===c&&u.push(f),i=(r=o[f]).length,a.x1=+r[i-2],a.y1=+r[i-1],a.x2=+r[i-4]||a.x1,a.y2=+r[i-3]||a.y1}return e?[o,u]:o}function Pn(t){return t.map((function(t,e,n){var r,i=e&&n[e-1].slice(-2).concat(t.slice(1)),o=e?yn(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0;return r=e?o?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=un(n,r,e),s=un(r,i,e),c=un(i,o,e),l=un(a,s,e),u=un(s,c,e),f=un(l,u,e);return[["C"].concat(a,l,f),["C"].concat(u,c,o)]}(i):[t,t]:[t],{s:t,ss:r,l:o}}))}function Cn(t,e,n,r){if(void 0===r&&(r=0),r>50)return console.warn("Maximum recursion depth reached in equalizeSegments"),[t,e];var i=Pn(t),o=Pn(e),a=i.length,s=o.length,c=i.filter((function(t){return t.l})).length,l=o.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/c||0,f=o.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/l||0,h=n||Math.max(a,s),d=[u,f],p=[h-a,h-s],g=0,y=[i,o].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return g=n&&p[e]&&t.l>=d[e],p[e]-=g?1:0,g?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:Cn(y[0],y[1],h,r+1)}function Rn(t){return function(t){var e=0,n=0,r=0;return Tn(t).map((function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var o=t.slice(1),a=o[0],s=o[1],c=o[2],l=o[3],u=o[4],f=o[5];return r=function(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}(e,n,a,s,c,l,u,f),i=t.slice(-2),e=i[0],n=i[1],r})).reduce((function(t,e){return t+e}),0)}(t)>=0}function Ln(t,e){var n=t.length-1,r=[],i=0,o=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a,s=i+o;return 0===o||t[s]&&"M"===t[s][0]?(a=t[s],["M"].concat(a.slice(-2))):(s>=e&&(s-=n),t[s])}))}))}(t);return o.forEach((function(o,a){t.slice(1).forEach((function(r,o){i+=Ze(t[(a+o)%n].slice(-2),e[o%n].slice(-2))})),r[a]=i,i=0})),o[r.indexOf(Math.min.apply(null,r))]}var Nn=function(t){return void 0===t},In={}.toString,Dn=function(t,e){return In.call(t)==="[object "+e+"]"},Bn=function(t){return Dn(t,"Boolean")};function Fn(t){return"function"==typeof t}var zn=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};function Zn(t,e,n){return bn(t,e,(0,qe.pi)((0,qe.pi)({},n),{bbox:!1,length:!0})).point}var Wn=n(1206),$n=n(15992);function Gn(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=(0,$n.Z)(t)););return t}function qn(){return qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Gn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},qn.apply(null,arguments)}function Yn(t,e,n,r){var i=qn((0,$n.Z)(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function Hn(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Vn(t,e){var n=Math.min.apply(Math,(0,G.Z)(t)),r=Math.min.apply(Math,(0,G.Z)(e));return{x:n,y:r,width:Math.max.apply(Math,(0,G.Z)(t))-n,height:Math.max.apply(Math,(0,G.Z)(e))-r}}function Un(t,e,n,r,i,o){return n*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function Xn(t,e,n,r,i,o){return n*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+e}function Kn(t,e,n,r,i,o,a){for(var s=function(t,e,n){return Math.atan(-e/t*Math.tan(n))}(n,r,i),c=1/0,l=-1/0,u=[o,a],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;o<a?o<h&&h<a&&u.push(h):a<h&&h<o&&u.push(h)}for(var d=0;d<u.length;d++){var p=Un(t,0,n,r,i,u[d]);p<c&&(c=p),p>l&&(l=p)}for(var g=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),y=1/0,v=-1/0,m=[o,a],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;o<a?o<x&&x<a&&m.push(x):a<x&&x<o&&m.push(x)}for(var w=0;w<m.length;w++){var O=Xn(0,e,n,r,i,m[w]);O<y&&(y=O),O>v&&(v=O)}return{x:c,y:y,width:l-c,height:v-y}}function Qn(t,e,n,r,i,o){var a=-1,s=1/0,c=[n,r],l=20;o&&o>200&&(l=o/10);for(var u=1/l,f=u/10,h=0;h<=l;h++){var d=h*u,p=[i.apply(void 0,(0,G.Z)(t.concat([d]))),i.apply(void 0,(0,G.Z)(e.concat([d])))],g=Hn(c[0],c[1],p[0],p[1]);g<s&&(a=d,s=g)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}s=1/0;for(var v=0;v<32&&!(f<1e-4);v++){var m=a-f,b=a+f,x=[i.apply(void 0,(0,G.Z)(t.concat([m]))),i.apply(void 0,(0,G.Z)(e.concat([m])))],w=Hn(c[0],c[1],x[0],x[1]);if(m>=0&&w<s)a=m,s=w;else{var O=[i.apply(void 0,(0,G.Z)(t.concat([b]))),i.apply(void 0,(0,G.Z)(e.concat([b])))],k=Hn(c[0],c[1],O[0],O[1]);b<=1&&k<s?(a=b,s=k):f*=.5}}return{x:i.apply(void 0,(0,G.Z)(t.concat([a]))),y:i.apply(void 0,(0,G.Z)(e.concat([a])))}}function Jn(t,e,n,r){return Hn(t,e,n,r)}function tr(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function er(t,e,n,r,i,o){var a=[n-t,r-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];!function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i}(s,s);var c=[i-t,o-e];return Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}(c,s))}function nr(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function rr(t,e,n,r){var i,o,a,s=-3*t+9*e-9*n+3*r,c=6*t-12*e+6*n,l=3*e-3*t,u=[];if(kn(s,0))kn(c,0)||(i=-l/c)>=0&&i<=1&&u.push(i);else{var f=c*c-4*s*l;kn(f,0)?u.push(-c/(2*s)):f>0&&(o=(-c-(a=Math.sqrt(f)))/(2*s),(i=(-c+a)/(2*s))>=0&&i<=1&&u.push(i),o>=0&&o<=1&&u.push(o))}return u}function ir(t,e,n,r,i,o,a,s){for(var c=[t,a],l=[e,s],u=rr(t,n,i,a),f=rr(e,r,o,s),h=0;h<u.length;h++)c.push(nr(t,n,i,a,u[h]));for(var d=0;d<f.length;d++)l.push(nr(e,r,o,s,f[d]));return Vn(c,l)}function or(t,e,n,r,i,o,a,s,c,l,u){var f=function(t,e,n,r,i,o,a,s,c,l,u){return Qn([t,n,i,a],[e,r,o,s],c,l,nr,u)}(t,e,n,r,i,o,a,s,c,l,u);return Hn(f.x,f.y,c,l)}function ar(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=Hn(r[0],r[1],i[0],i[1])}return e}function sr(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function cr(t,e,n){var r=t+n-2*e;if(kn(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function lr(t,e,n,r,i,o){var a=cr(t,n,i)[0],s=cr(e,r,o)[0],c=[t,i],l=[e,o];return void 0!==a&&c.push(sr(t,n,i,a)),void 0!==s&&l.push(sr(e,r,o,s)),Vn(c,l)}function ur(t,e,n,r,i,o,a,s){var c=function(t,e,n,r,i,o,a,s){return Qn([t,n,i],[e,r,o],a,s,sr)}(t,e,n,r,i,o,a,s);return Hn(c.x,c.y,a,s)}var fr=n(6321),hr=n(7304),dr=n(50301),pr=n(38956),gr=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self,{exports:{}});gr.exports=function(){function t(t,n,i,o,a){e(t,n,i||0,o||t.length-1,a||r)}function e(t,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,c=r-i+1,l=Math.log(s),u=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*u*(s-u)/s)*(c-s/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-c*u/s+f)),Math.min(o,Math.floor(r+(s-c)*u/s+f)),a)}var h=t[r],d=i,p=o;for(n(t,i,r),a(t[o],h)>0&&n(t,i,o);d<p;){for(n(t,d,p),d++,p--;a(t[d],h)<0;)d++;for(;a(t[p],h)>0;)p--}0===a(t[i],h)?n(t,i,p):n(t,++p,o),p<=r&&(i=p+1),r<=p&&(o=p-1)}}function n(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function r(t,e){return t<e?-1:t>e?1:0}var i=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()};function o(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var a=t.children[o];c(i,t.leaf?r(a):a)}return i}function c(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!y(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?r(a):a;y(t,s)&&(e.leaf?n.push(a):g(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!y(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(y(t,o)){if(e.leaf||g(t,o))return!0;n.push(i)}}e=n.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=v([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,a=this.data,s=this.toBBox(t),c=[],l=[];a||c.length;){if(a||(a=c.pop(),r=c[c.length-1],n=l.pop(),i=!0),a.leaf){var u=o(t,a.children,e);if(-1!==u)return a.children.splice(u,1),c.push(a),this._condense(c),this}i||a.leaf||!g(a,s)?r?(n++,a=r.children[n],i=!1):a=null:(c.push(a),l.push(n),n=0,r=a,a=a.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,r){var i,o=n-e+1,s=this._maxEntries;if(o<=s)return a(i=v(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),(i=v([])).leaf=!1,i.height=r;var c=Math.ceil(o/s),l=c*Math.ceil(Math.sqrt(s));m(t,e,n,l,this.compareMinX);for(var u=e;u<=n;u+=l){var f=Math.min(u+l-1,n);m(t,u,f,c,this.compareMinY);for(var h=u;h<=f;h+=c){var d=Math.min(h+c-1,f);i.children.push(this._build(t,h,d,r-1))}}return a(i,this.toBBox),i},i.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<e.children.length;s++){var c=e.children[s],l=f(c),u=d(t,c)-l;u<o?(o=u,i=l<i?l:i,a=c):u===o&&l<i&&(i=l,a=c)}e=a||e.children[0]}return e},i.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),c(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},i.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=v(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},i.prototype._splitRoot=function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var r,i=1/0,o=1/0,a=e;a<=n-e;a++){var c=s(t,0,a,this.toBBox),l=s(t,a,n,this.toBBox),u=p(c,l),h=f(c)+f(l);u<i?(i=u,r=a,o=h<o?h:o):u===i&&h<o&&(o=h,r=a)}return r||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},i.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),a=s(t,n-e,n,i),l=h(o)+h(a),u=e;u<n-e;u++){var f=t.children[u];c(o,t.leaf?i(f):f),l+=h(o)}for(var d=n-e-1;d>=e;d--){var p=t.children[d];c(a,t.leaf?i(p):p),l+=h(a)}return l},i.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)c(e[r],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():a(t[e],this.toBBox)},i}();var yr=gr.exports,vr=function(t){return t.GROUP="g",t.FRAGMENT="fragment",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html",t.MESH="mesh",t}({}),mr=function(t){return t[t.ZERO=0]="ZERO",t[t.NEGATIVE_ONE=1]="NEGATIVE_ONE",t}({}),br=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.plugins=[]}),[{key:"addRenderingPlugin",value:function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)}},{key:"removeAllRenderingPlugins",value:function(){var t=this;this.plugins.forEach((function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)}))}}])}(),xr=function(){return(0,$.Z)((function t(e){(0,W.Z)(this,t),this.clipSpaceNearZ=mr.NEGATIVE_ONE,this.plugins=[],this.config=(0,Z.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},e)}),[{key:"registerPlugin",value:function(t){var e=this.plugins.findIndex((function(e){return e===t}));-1===e&&this.plugins.push(t)}},{key:"unregisterPlugin",value:function(t){var e=this.plugins.findIndex((function(e){return e===t}));e>-1&&this.plugins.splice(e,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(t){return this.plugins.find((function(e){return e.name===t}))}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(t){Object.assign(this.config,t)}}])}(),wr=rt,Or=et,kr=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},Mr=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},_r=at,Er=gt,Sr=function(){function t(){(0,W.Z)(this,t),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,$.Z)(t,[{key:"update",value:function(t,e){Or(this.center,t),Or(this.halfExtents,e),Er(this.min,this.center,this.halfExtents),wr(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(t,e){wr(this.center,e,t),_r(this.center,this.center,.5),Er(this.halfExtents,e,t),_r(this.halfExtents,this.halfExtents,.5),Or(this.min,t),Or(this.max,e)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],c=a[1],l=a[2],u=r-s,f=r+s,h=i-c,d=i+c,p=o-l,g=o+l,y=e.center,v=y[0],m=y[1],b=y[2],x=e.halfExtents,w=x[0],O=x[1],k=x[2],M=v-w,_=v+w,E=m-O,S=m+O,A=b-k,j=b+k;M<u&&(u=M),_>f&&(f=_),E<h&&(h=E),S>d&&(d=S),A<p&&(p=A),j>g&&(g=j),n[0]=.5*(u+f),n[1]=.5*(h+d),n[2]=.5*(p+g),a[0]=.5*(f-u),a[1]=.5*(d-h),a[2]=.5*(g-p),this.min[0]=u,this.min[1]=h,this.min[2]=p,this.max[0]=f,this.max[1]=d,this.max[2]=g}}},{key:"setFromTransformedAABB",value:function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],s=e[4],c=e[8],l=e[1],u=e[5],f=e[9],h=e[2],d=e[6],p=e[10],g=Math.abs(a),y=Math.abs(s),v=Math.abs(c),m=Math.abs(l),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),O=Math.abs(d),k=Math.abs(p);n[0]=e[12]+a*i[0]+s*i[1]+c*i[2],n[1]=e[13]+l*i[0]+u*i[1]+f*i[2],n[2]=e[14]+h*i[0]+d*i[1]+p*i[2],r[0]=g*o[0]+y*o[1]+v*o[2],r[1]=m*o[0]+b*o[1]+x*o[2],r[2]=w*o[0]+O*o[1]+k*o[2],Er(this.min,n,r),wr(this.max,n,r)}},{key:"intersects",value:function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var n=new t,r=kr([0,0,0],this.getMin(),e.getMin()),i=Mr([0,0,0],this.getMax(),e.getMax());return n.setMinMax(r,i),n}},{key:"getNegativeFarPoint",value:function(t){return 273===t.pnVertexFlag?Or([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]]}},{key:"getPositiveFarPoint",value:function(t){return 273===t.pnVertexFlag?Or([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]]}}],[{key:"isEmpty",value:function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]}}])}(),Ar=function(){return(0,$.Z)((function t(e,n){(0,W.Z)(this,t),this.distance=e||0,this.normal=n||tt(0,1,0),this.updatePNVertexFlag()}),[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(t){return ct(t,this.normal)-this.distance}},{key:"normalize",value:function(){var t=1/vt(this.normal);at(this.normal,this.normal,t),this.distance*=t}},{key:"intersectsLine",value:function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&ut(n,t,e,i),o}}])}(),jr=function(t){return t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE",t}({}),Tr=function(){return(0,$.Z)((function t(e){if((0,W.Z)(this,t),this.planes=[],e)this.planes=e;else for(var n=0;n<6;n++)this.planes.push(new Ar)}),[{key:"extractFromVPMatrix",value:function(t){var e=(0,H.Z)(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],v=e[15];nt(this.planes[0].normal,o-n,l-a,d-u),this.planes[0].distance=v-p,nt(this.planes[1].normal,o+n,l+a,d+u),this.planes[1].distance=v+p,nt(this.planes[2].normal,o+r,l+s,d+f),this.planes[2].distance=v+g,nt(this.planes[3].normal,o-r,l-s,d-f),this.planes[3].distance=v-g,nt(this.planes[4].normal,o-i,l-c,d-h),this.planes[4].distance=v-y,nt(this.planes[5].normal,o+i,l+c,d+h),this.planes[5].distance=v+y,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))}}])}(),Pr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,W.Z)(this,t),this.x=0,this.y=0,this.x=e,this.y=n}return(0,$.Z)(t,[{key:"clone",value:function(){return new t(this.x,this.y)}},{key:"copyFrom",value:function(t){this.x=t.x,this.y=t.y}}])}(),Cr=function(){function t(e,n,r,i){(0,W.Z)(this,t),this.x=e,this.y=n,this.width=r,this.height=i,this.left=e,this.right=e+r,this.top=n,this.bottom=n+i}return(0,$.Z)(t,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new t(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,n){var r=bt(e.x,e.y,0,1),i=bt(e.x+e.width,e.y,0,1),o=bt(e.x,e.y+e.height,0,1),a=bt(e.x+e.width,e.y+e.height,0,1),s=mt(),c=mt(),l=mt(),u=mt();xt(s,r,n),xt(c,i,n),xt(l,o,n),xt(u,a,n);var f=Math.min(s[0],c[0],l[0],u[0]),h=Math.min(s[1],c[1],l[1],u[1]),d=Math.max(s[0],c[0],l[0],u[0]),p=Math.max(s[1],c[1],l[1],u[1]);return t.fromRect({x:f,y:h,width:d-f,height:p-h})}}])}(),Rr="Method not implemented.",Lr="Use document.documentElement instead.";function Nr(t){return void 0===t?0:t>360||t<-360?t%360:t}var Ir=K();function Dr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Array.isArray(t)&&3===t.length?r?Q(t):et(Ir,t):ze(t)?r?tt(t,e,n):nt(Ir,t,e,n):r?tt(t[0],t[1]||e,t[2]||n):nt(Ir,t[0],t[1]||e,t[2]||n)}var Br=Math.PI/180;function Fr(t){return t*Br}var zr=180/Math.PI;function Zr(t){return t*zr}var Wr=Math.PI/2;function $r(t,e){return 16===e.length?function(t,e){var n,r,i=Ht(K(),e),o=(0,H.Z)(i,3),a=o[0],s=o[1],c=o[2],l=Math.asin(-e[2]/a);return l<Wr?l>-Wr?(n=Math.atan2(e[6]/s,e[10]/c),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/s,e[5]/s)):(r=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=l,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,c=o*o,l=n*n+a+s+c,u=n*o-r*i;return u>.499995*l?(t[0]=Wr,t[1]=2*Math.atan2(r,n),t[2]=0):u<-.499995*l?(t[0]=-Wr,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+c)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function Gr(t,e,n,r,i){var o,a,s,c,l,u,f,h,d,p,g=Math.cos(t),y=Math.sin(t);return o=r*g,a=i*y,s=0,c=-r*y,l=i*g,u=0,f=e,h=n,d=1,(p=new X(9))[0]=o,p[1]=a,p[2]=s,p[3]=c,p[4]=l,p[5]=u,p[6]=f,p[7]=h,p[8]=d,p}function qr(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);if(e*i-n*r<0&&(e<i?o=-o:a=-a),o){var s=1/o;e*=s,n*=s}if(a){var c=1/a;r*=c,i*=c}var l=Zr(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var Yr=wt(),Hr=wt(),Vr=mt(),Ur=[K(),K(),K()],Xr=K();function Kr(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 Qr=function(t){return t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING",t}({}),Jr=function(t){return t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC",t}({}),ti=function(t){return t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE",t}({}),ei="updated",ni=2e-4,ri=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.clipSpaceNearZ=mr.NEGATIVE_ONE,this.eventEmitter=new V,this.matrix=wt(),this.right=tt(1,0,0),this.up=tt(0,1,0),this.forward=tt(0,0,1),this.position=tt(0,0,1),this.focalPoint=tt(0,0,0),this.distanceVector=tt(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=wt(),this.projectionMatrixInverse=wt(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Qr.EXPLORING,this.trackingMode=Jr.DEFAULT,this.projectionMode=ti.PERSPECTIVE,this.frustum=new Tr,this.orthoMatrix=wt()}),[{key:"isOrtho",value:function(){return this.projectionMode===ti.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(t){this.enableUpdate=t}},{key:"setType",value:function(t,e){return this.type=t,this.type===Qr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Qr.TRACKING&&void 0!==e&&this.setTrackingMode(e),this}},{key:"setProjectionMode",value:function(t){return this.projectionMode=t,this}},{key:"setTrackingMode",value:function(t){if(this.type!==Qr.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this}},{key:"setWorldRotation",value:function(t){return this.rotateWorld=t,this._getAngles(),this}},{key:"getViewTransform",value:function(){return At(wt(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(t,e){var n=Bt(wt(),[t,e,0]);this.jitteredProjectionMatrix=Pt(wt(),n,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(t){return this.matrix=t,this._update(),this}},{key:"setProjectionMatrix",value:function(t){this.projectionMatrix=t}},{key:"setFov",value:function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this}},{key:"setAspect",value:function(t){return this.setPerspective(this.near,this.far,this.fov,t),this}},{key:"setNear",value:function(t){return this.projectionMode===ti.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this}},{key:"setFar",value:function(t){return this.projectionMode===ti.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this}},{key:"setViewOffset",value:function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===ti.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===ti.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(t){return this.zoom=t,this.projectionMode===ti.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===ti.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),s=tt(a.x-r,a.y-i,0),c=ct(s,this.right)/J(this.right),l=ct(s,this.up)/J(this.up),u=this.getPosition(),f=(0,H.Z)(u,2),h=f[0],d=f[1],p=this.getFocalPoint(),g=(0,H.Z)(p,2),y=g[0],v=g[1];return this.setPosition(h-c,d-l),this.setFocalPoint(y-c,v-l),this}},{key:"setPerspective",value:function(t,e,n,r){var i;this.projectionMode=ti.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var o=this.near*Math.tan(Fr(.5*this.fov))/this.zoom,a=2*o,s=this.aspect*a,c=-.5*s;if(null!==(i=this.view)&&void 0!==i&&i.enabled){var l=this.view.fullWidth,u=this.view.fullHeight;c+=this.view.offsetX*s/l,o-=this.view.offsetY*a/u,s*=this.view.width/l,a*=this.view.height/u}return function(t,e,n,r,i,o,a){var s,c,l=arguments.length>7&&void 0!==arguments[7]&&arguments[7],u=2*o,f=n-e,h=r-i,d=u/f,p=u/h,g=(n+e)/f,y=(r+i)/h,v=a-o,m=a*o;l?(s=-a/v,c=-m/v):(s=-(a+o)/v,c=-2*m/v),t[0]=d,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=p,t[6]=0,t[7]=0,t[8]=g,t[9]=y,t[10]=s,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0}(this.projectionMatrix,c,c+s,o-a,o,t,this.far,this.clipSpaceNearZ===mr.ZERO),At(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(t,e,n,r,i,o){var a;this.projectionMode=ti.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var s=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,u=(this.top+this.bottom)/2,f=l-s,h=l+s,d=u+c,p=u-c;if(null!==(a=this.view)&&void 0!==a&&a.enabled){var g=(this.rright-this.left)/this.view.fullWidth/this.zoom,y=(this.top-this.bottom)/this.view.fullHeight/this.zoom;h=(f+=g*this.view.offsetX)+g*this.view.width,p=(d-=y*this.view.offsetY)-y*this.view.height}return this.clipSpaceNearZ===mr.NEGATIVE_ONE?oe(this.projectionMatrix,f,h,d,p,i,o):ae(this.projectionMatrix,f,h,d,p,i,o),At(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.position[2],r=Dr(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focalPoint[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.focalPoint[2],r=tt(0,1,0);if(this.focalPoint=Dr(t,e,n),this.trackingMode===Jr.CINEMATIC){var i=it(K(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=J(i),a=Zr(Math.asin(e/o)),s=90+Zr(Math.atan2(n,t)),c=wt();It(c,c,Fr(s)),Nt(c,c,Fr(a)),r=ft(K(),[0,1,0],c)}return At(this.matrix,se(wt(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<ni&&(this.distance=ni),this.dollyingStep=this.distance/100;var e=K();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(t){return this.maxDistance=t,this}},{key:"setMinDistance",value:function(t){return this.minDistance=t,this}},{key:"setAzimuth",value:function(t){return this.azimuth=Nr(t),this.computeMatrix(),this._getAxes(),this.type===Qr.ORBITING||this.type===Qr.EXPLORING?this._getPosition():this.type===Qr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(t){return this.elevation=Nr(t),this.computeMatrix(),this._getAxes(),this.type===Qr.ORBITING||this.type===Qr.EXPLORING?this._getPosition():this.type===Qr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(t){return this.roll=Nr(t),this.computeMatrix(),this._getAxes(),this.type===Qr.ORBITING||this.type===Qr.EXPLORING?this._getPosition():this.type===Qr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var t=we(xe(),[0,0,1],Fr(this.roll));Et(this.matrix);var e=we(xe(),[1,0,0],Fr((this.rotateWorld&&this.type!==Qr.TRACKING||this.type===Qr.TRACKING?1:-1)*this.elevation)),n=we(xe(),[0,1,0],Fr((this.rotateWorld&&this.type!==Qr.TRACKING||this.type===Qr.TRACKING?1:-1)*this.azimuth)),r=Oe(xe(),n,e);r=Oe(xe(),r,t);var i=Qt(wt(),r);this.type===Qr.ORBITING||this.type===Qr.EXPLORING?(Ct(this.matrix,this.matrix,this.focalPoint),Pt(this.matrix,this.matrix,i),Ct(this.matrix,this.matrix,[0,0,this.distance])):this.type===Qr.TRACKING&&(Ct(this.matrix,this.matrix,this.position),Pt(this.matrix,this.matrix,i))}},{key:"_setPosition",value:function(t,e,n){this.position=Dr(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){et(this.right,Dr(xt(mt(),[1,0,0,0],this.matrix))),et(this.up,Dr(xt(mt(),[0,1,0,0],this.matrix))),et(this.forward,Dr(xt(mt(),[0,0,1,0],this.matrix))),st(this.right,this.right),st(this.up,this.up),st(this.forward,this.forward)}},{key:"_getAngles",value:function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=J(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===Qr.TRACKING||this.rotateWorld?(this.elevation=Zr(Math.asin(e/r)),this.azimuth=Zr(Math.atan2(-t,-n))):(this.elevation=-Zr(Math.asin(e/r)),this.azimuth=-Zr(Math.atan2(-t,-n)))}},{key:"_getPosition",value:function(){et(this.position,Dr(xt(mt(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){!function(t,e,n){var r=e[0],i=e[1],o=e[2];t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8]}(this.distanceVector,[0,0,-this.distance],function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}(be(),this.matrix)),rt(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=it(K(),this.focalPoint,this.position),this.distance=J(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===ti.ORTHOGRAPHIC){var t=this.position,e=we(xe(),[0,0,1],-this.roll*Math.PI/180);Kt(this.orthoMatrix,e,tt((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),tt(this.zoom,this.zoom,1),t)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var t=this.getViewTransform(),e=Pt(wt(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(ei)}}},{key:"rotate",value:function(t,e,n){throw new Error(Rr)}},{key:"pan",value:function(t,e){throw new Error(Rr)}},{key:"dolly",value:function(t){throw new Error(Rr)}},{key:"createLandmark",value:function(t,e){throw new Error(Rr)}},{key:"gotoLandmark",value:function(t,e){throw new Error(Rr)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Rr)}}])}(),ii=function(t){return t[t.Standard=0]="Standard",t}({}),oi=function(t){return t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED",t[t.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",t}({}),ai=K(),si=wt(),ci=xe();function li(t){if(t.localDirtyFlag){if(0!==t.localSkew[0]||0!==t.localSkew[1]){Kt(t.localTransform,t.localRotation,t.localPosition,tt(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||(Et(si),si[4]=Math.tan(t.localSkew[0]),si[1]=Math.tan(t.localSkew[1]),Pt(t.localTransform,t.localTransform,si));var e=Kt(si,Ae(ci,0,0,0,1),nt(ai,1,1,1),t.localScale,t.origin);Pt(t.localTransform,t.localTransform,e)}else{var n=t.localTransform,r=t.localPosition,i=t.localRotation,o=t.localScale,a=t.origin,s=0!==r[0]||0!==r[1]||0!==r[2],c=1!==i[3]||0!==i[0]||0!==i[1]||0!==i[2],l=1!==o[0]||1!==o[1]||1!==o[2],u=0!==a[0]||0!==a[1]||0!==a[2];c||l||u?Kt(n,i,r,o,a):s?Bt(n,r):Et(n)}t.localDirtyFlag=!1}}var ui={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Cr(0,0,0,0)},fi=function(t){return t.COORDINATE="<coordinate>",t.COLOR="<color>",t.PAINT="<paint>",t.NUMBER="<number>",t.ANGLE="<angle>",t.OPACITY_VALUE="<opacity-value>",t.SHADOW_BLUR="<shadow-blur>",t.LENGTH="<length>",t.PERCENTAGE="<percentage>",t.LENGTH_PERCENTAGE="<length> | <percentage>",t.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",t.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",t.LIST_OF_POINTS="<list-of-points>",t.PATH="<path>",t.FILTER="<filter>",t.Z_INDEX="<z-index>",t.OFFSET_DISTANCE="<offset-distance>",t.DEFINED_PATH="<defined-path>",t.MARKER="<marker>",t.TRANSFORM="<transform>",t.TRANSFORM_ORIGIN="<transform-origin>",t.TEXT="<text>",t.TEXT_TRANSFORM="<text-transform>",t}({});function hi(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function di(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pi(){}var gi=.7,yi=1/gi,vi="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xi=/^#([0-9a-f]{3,8})$/,wi=new RegExp(`^rgb\\(${vi},${vi},${vi}\\)$`),Oi=new RegExp(`^rgb\\(${bi},${bi},${bi}\\)$`),ki=new RegExp(`^rgba\\(${vi},${vi},${vi},${mi}\\)$`),Mi=new RegExp(`^rgba\\(${bi},${bi},${bi},${mi}\\)$`),_i=new RegExp(`^hsl\\(${mi},${bi},${bi}\\)$`),Ei=new RegExp(`^hsla\\(${mi},${bi},${bi},${mi}\\)$`),Si={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ai(){return this.rgb().formatHex()}function ji(){return this.rgb().formatRgb()}function Ti(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=xi.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Pi(e):3===n?new Li(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ci(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ci(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=wi.exec(t))?new Li(e[1],e[2],e[3],1):(e=Oi.exec(t))?new Li(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ki.exec(t))?Ci(e[1],e[2],e[3],e[4]):(e=Mi.exec(t))?Ci(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=_i.exec(t))?zi(e[1],e[2]/100,e[3]/100,1):(e=Ei.exec(t))?zi(e[1],e[2]/100,e[3]/100,e[4]):Si.hasOwnProperty(t)?Pi(Si[t]):"transparent"===t?new Li(NaN,NaN,NaN,0):null}function Pi(t){return new Li(t>>16&255,t>>8&255,255&t,1)}function Ci(t,e,n,r){return r<=0&&(t=e=n=NaN),new Li(t,e,n,r)}function Ri(t){return t instanceof pi||(t=Ti(t)),t?new Li((t=t.rgb()).r,t.g,t.b,t.opacity):new Li}function Li(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ni(){return`#${Fi(this.r)}${Fi(this.g)}${Fi(this.b)}`}function Ii(){const t=Di(this.opacity);return`${1===t?"rgb(":"rgba("}${Bi(this.r)}, ${Bi(this.g)}, ${Bi(this.b)}${1===t?")":`, ${t})`}`}function Di(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Bi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fi(t){return((t=Bi(t))<16?"0":"")+t.toString(16)}function zi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Wi(t,e,n,r)}function Zi(t){if(t instanceof Wi)return new Wi(t.h,t.s,t.l,t.opacity);if(t instanceof pi||(t=Ti(t)),!t)return new Wi;if(t instanceof Wi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new Wi(a,s,c,t.opacity)}function Wi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $i(t){return(t=(t||0)%360)<0?t+360:t}function Gi(t){return Math.max(0,Math.min(1,t||0))}function qi(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Yi(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=e?e.apply(this,i):i[0],s=n.cache;if(s.has(a))return s.get(a);var c=t.apply(this,i);return n.cache=s.set(a,c)||s,c};return n.cache=new(Yi.Cache||Map),Yi.cacheList.push(n.cache),n}hi(pi,Ti,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ai,formatHex:Ai,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Zi(this).formatHsl()},formatRgb:ji,toString:ji}),hi(Li,(function(t,e,n,r){return 1===arguments.length?Ri(t):new Li(t,e,n,null==r?1:r)}),di(pi,{brighter(t){return t=null==t?yi:Math.pow(yi,t),new Li(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?gi:Math.pow(gi,t),new Li(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Li(Bi(this.r),Bi(this.g),Bi(this.b),Di(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ni,formatHex:Ni,formatHex8:function(){return`#${Fi(this.r)}${Fi(this.g)}${Fi(this.b)}${Fi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ii,toString:Ii})),hi(Wi,(function(t,e,n,r){return 1===arguments.length?Zi(t):new Wi(t,e,n,null==r?1:r)}),di(pi,{brighter(t){return t=null==t?yi:Math.pow(yi,t),new Wi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?gi:Math.pow(gi,t),new Wi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Li(qi(t>=240?t-240:t+120,i,r),qi(t,i,r),qi(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Wi($i(this.h),Gi(this.s),Gi(this.l),Di(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Di(this.opacity);return`${1===t?"hsl(":"hsla("}${$i(this.h)}, ${100*Gi(this.s)}%, ${100*Gi(this.l)}%${1===t?")":`, ${t})`}`}})),Yi.Cache=Map,Yi.cacheList=[],Yi.clearCache=function(){Yi.cacheList.forEach((function(t){return t.clear()}))};var Hi=function(t){return t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kPixels=4]="kPixels",t[t.kRems=5]="kRems",t[t.kDegrees=6]="kDegrees",t[t.kRadians=7]="kRadians",t[t.kGradians=8]="kGradians",t[t.kTurns=9]="kTurns",t[t.kMilliseconds=10]="kMilliseconds",t[t.kSeconds=11]="kSeconds",t[t.kInteger=12]="kInteger",t}({}),Vi=function(t){return t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUOther=5]="kUOther",t}({}),Ui=function(t){return t[t.kYes=0]="kYes",t[t.kNo=1]="kNo",t}({}),Xi=function(t){return t[t.kYes=0]="kYes",t[t.kNo=1]="kNo",t}({}),Ki=[{name:"em",unit_type:Hi.kEms},{name:"px",unit_type:Hi.kPixels},{name:"deg",unit_type:Hi.kDegrees},{name:"rad",unit_type:Hi.kRadians},{name:"grad",unit_type:Hi.kGradians},{name:"ms",unit_type:Hi.kMilliseconds},{name:"s",unit_type:Hi.kSeconds},{name:"rem",unit_type:Hi.kRems},{name:"turn",unit_type:Hi.kTurns}],Qi=function(t){return t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType",t}({}),Ji=function(t){return t?"number"===t?Hi.kNumber:"percent"===t||"%"===t?Hi.kPercentage:function(t){return Ki.find((function(e){return e.name===t})).unit_type}(t):Hi.kUnknown},to=function(t){var e=1;switch(t){case Hi.kPixels:case Hi.kDegrees:case Hi.kSeconds:break;case Hi.kMilliseconds:e=.001;break;case Hi.kRadians:e=180/Math.PI;break;case Hi.kGradians:e=.9;break;case Hi.kTurns:e=360}return e},eo=function(t){switch(t){case Hi.kNumber:case Hi.kInteger:return"";case Hi.kPercentage:return"%";case Hi.kEms:return"em";case Hi.kRems:return"rem";case Hi.kPixels:return"px";case Hi.kDegrees:return"deg";case Hi.kRadians:return"rad";case Hi.kGradians:return"grad";case Hi.kMilliseconds:return"ms";case Hi.kSeconds:return"s";case Hi.kTurns:return"turn"}return""},no=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"toString",value:function(){return this.buildCSSText(Ui.kNo,Xi.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Qi.kUnitType&&this.getType()<=Qi.kClampType}}],[{key:"isAngle",value:function(t){return t===Hi.kDegrees||t===Hi.kRadians||t===Hi.kGradians||t===Hi.kTurns}},{key:"isLength",value:function(t){return t>=Hi.kEms&&t<Hi.kDegrees}},{key:"isRelativeUnit",value:function(t){return t===Hi.kPercentage||t===Hi.kEms||t===Hi.kRems}},{key:"isTime",value:function(t){return t===Hi.kSeconds||t===Hi.kMilliseconds}}])}(),ro=function(t){function e(t){var n;return(0,W.Z)(this,e),(n=(0,q.Z)(this,e)).colorSpace=t,n}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"getType",value:function(){return Qi.kColorType}},{key:"to",value:function(t){return this}}])}(no),io=function(t){return t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t}({}),oo=function(t){function e(t,n){var r;return(0,W.Z)(this,e),(r=(0,q.Z)(this,e)).type=t,r.value=n,r}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"clone",value:function(){return new e(this.type,this.value)}},{key:"buildCSSText",value:function(t,e,n){return n}},{key:"getType",value:function(){return Qi.kColorType}}])}(no),ao=function(t){function e(t){var n;return(0,W.Z)(this,e),(n=(0,q.Z)(this,e)).value=t,n}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"clone",value:function(){return new e(this.value)}},{key:"getType",value:function(){return Qi.kKeywordType}},{key:"buildCSSText",value:function(t,e,n){return n+this.value}}])}(no),so=function(t){return function(t){switch(t){case Vi.kUNumber:return Hi.kNumber;case Vi.kULength:return Hi.kPixels;case Vi.kUPercent:return Hi.kPercentage;case Vi.kUTime:return Hi.kSeconds;case Vi.kUAngle:return Hi.kDegrees;default:return Hi.kUnknown}}(function(t){switch(t){case Hi.kNumber:case Hi.kInteger:return Vi.kUNumber;case Hi.kPercentage:return Vi.kUPercent;case Hi.kPixels:return Vi.kULength;case Hi.kMilliseconds:case Hi.kSeconds:return Vi.kUTime;case Hi.kDegrees:case Hi.kRadians:case Hi.kGradians:case Hi.kTurns:return Vi.kUAngle;default:return Vi.kUOther}}(t))},co=function(t){function e(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hi.kNumber;return(0,W.Z)(this,e),n=(0,q.Z)(this,e),r="string"==typeof i?Ji(i):i,n.unit=r,n.value=t,n}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"clone",value:function(){return new e(this.value,this.unit)}},{key:"equals",value:function(t){var e=t;return this.value===e.value&&this.unit===e.unit}},{key:"getType",value:function(){return Qi.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new e(this.value,this.unit);var n=so(this.unit);if(n!==so(t)||n===Hi.kUnknown)return null;var r=to(this.unit)/to(t);return new e(this.value*r,t)}},{key:"buildCSSText",value:function(t,e,n){var r;switch(this.unit){case Hi.kUnknown:break;case Hi.kInteger:r=Number(this.value).toFixed(0);break;case Hi.kNumber:case Hi.kPercentage:case Hi.kEms:case Hi.kRems:case Hi.kPixels:case Hi.kDegrees:case Hi.kRadians:case Hi.kGradians:case Hi.kMilliseconds:case Hi.kSeconds:case Hi.kTurns:var i=this.value,o=eo(this.unit);if(i<-999999||i>999999){var a=eo(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(Number.isFinite(t)?"NaN":t>0?"infinity":"-infinity")+e}(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+=r}}])}(no),lo=new co(0,"px");new co(1,"px");var uo=new co(0,"deg"),fo=function(t){function e(t,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return(0,W.Z)(this,e),(i=(0,q.Z)(this,e,["rgb"])).r=t,i.g=n,i.b=r,i.alpha=o,i.isNone=a,i}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"clone",value:function(){return new e(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,e,n){return"".concat(n,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(ro),ho=new ao("unset"),po={"":ho,unset:ho,initial:new ao("initial"),inherit:new ao("inherit")},go=new fo(0,0,0,0,!0),yo=new fo(0,0,0,0),vo=Yi((function(t,e,n,r){return new fo(t,e,n,r)}),(function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")})),mo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hi.kNumber;return new co(t,e)};function bo(t){var e=t.type,n=t.value;return"hex"===e?"#".concat(n):"literal"===e?n:"rgb"===e?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")")}new co(50,"%");var xo=function(){var t=/^(linear\-gradient)/i,e=/^(repeating\-linear\-gradient)/i,n=/^(radial\-gradient)/i,r=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,a=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,s=/^(left|center|right|top|bottom)/i,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,f=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,h=/^\(/,d=/^\)/,p=/^,/,g=/^\#([0-9a-fA-F]+)/,y=/^([a-zA-Z]+)/,v=/^rgb/i,m=/^rgba/i,b=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,x="";function w(t){throw new Error("".concat(x,": ").concat(t))}function O(){var t=C(k);return x.length>0&&w("Invalid input not EOF"),t}function k(){return M("linear-gradient",t,E)||M("repeating-linear-gradient",e,E)||M("radial-gradient",n,S)||M("repeating-radial-gradient",r,S)||M("conic-gradient",i,S)}function M(t,e,n){return _(e,(function(e){var r=n();return r&&(B(p)||w("Missing comma before color stops")),{type:t,orientation:r,colorStops:C(R)}}))}function _(t,e){var n=B(t);if(n){B(h)||w("Missing (");var r=e(n);return B(d)||w("Missing )"),r}}function E(){return D("directional",o,1)||D("angular",f,1)}function S(){var t,e,n=A();return n&&((t=[]).push(n),e=x,B(p)&&((n=A())?t.push(n):x=e)),t}function A(){var t=function(){var t=D("shape",/^(circle)/i,0);t&&(t.style=I()||j());return t}()||function(){var t=D("shape",/^(ellipse)/i,0);t&&(t.style=N()||j());return t}();if(t)t.at=T();else{var e=j();if(e){t=e;var n=T();n&&(t.at=n)}else{var r=P();r&&(t={type:"default-radial",at:r})}}return t}function j(){return D("extent-keyword",a,1)}function T(){if(D("position",/^at/,0)){var t=P();return t||w("Missing positioning value"),t}}function P(){var t={x:N(),y:N()};if(t.x||t.y)return{type:"position",value:t}}function C(t){var e=t(),n=[];if(e)for(n.push(e);B(p);)(e=t())?n.push(e):w("One extra comma");return n}function R(){var t=D("hex",g,1)||_(m,(function(){return{type:"rgba",value:C(L)}}))||_(v,(function(){return{type:"rgb",value:C(L)}}))||D("literal",y,0);return t||w("Expected color definition"),t.length=N(),t}function L(){return B(b)[1]}function N(){return D("%",l,1)||D("position-keyword",s,1)||I()}function I(){return D("px",c,1)||D("em",u,1)}function D(t,e,n){var r=B(e);if(r)return{type:t,value:r[n]}}function B(t){var e=/^[\n\r\t\s]+/.exec(x);e&&F(e[0].length);var n=t.exec(x);return n&&F(n[0].length),n}function F(t){x=x.substring(t)}return function(t){return x=t,O()}}();var wo=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Oo=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ko=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Mo=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var _o={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Eo=Yi((function(t){var e;return e="angular"===t.type?Number(t.value):_o[t.value]||0,mo(e,"deg")})),So=Yi((function(t){var e=50,n=50,r="%",i="%";if("position"===(null==t?void 0:t.type)){var o=t.value,a=o.x,s=o.y;"position-keyword"===(null==a?void 0:a.type)&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),"position-keyword"===(null==s?void 0:s.type)&&("left"===s.value?e=0:"center"===s.value?n=50:"right"===s.value?e=100:"top"===s.value?n=0:"bottom"===s.value&&(n=100)),"px"!==(null==a?void 0:a.type)&&"%"!==(null==a?void 0:a.type)&&"em"!==(null==a?void 0:a.type)||(r=null==a?void 0:a.type,e=Number(a.value)),"px"!==(null==s?void 0:s.type)&&"%"!==(null==s?void 0:s.type)&&"em"!==(null==s?void 0:s.type)||(i=null==s?void 0:s.type,n=Number(s.value))}return{cx:mo(e,r),cy:mo(n,i)}})),Ao=Yi((function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1)return xo(t).map((function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r=t.length;t[r-1].length=null!==(e=t[r-1].length)&&void 0!==e?e:{type:"%",value:"100"},r>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var i=0,o=Number(t[0].length.value),a=1;a<r;a++){var s,c=null===(s=t[a].length)||void 0===s?void 0:s.value;if(!We(c)&&!We(o)){for(var l=1;l<a-i;l++)t[i+l].length={type:"%",value:"".concat(o+(Number(c)-o)*l/(a-i))};i=a,o=Number(c)}}}(r);var i,o=r.map((function(t){return{offset:mo(Number(t.length.value),"%"),color:bo(t)}}));if("linear-gradient"===e)return new oo(io.LinearGradient,{angle:n?Eo(n):uo,steps:o});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var a,s=So(n[0].at),c=s.cx,l=s.cy;if(n[0].style){var u=n[0].style,f=u.type,h=u.value;"extent-keyword"===f?(po[i=h]||(po[i]=new ao(i)),a=po[i]):a=mo(h,f)}return new oo(io.RadialGradient,{cx:c,cy:l,size:a,steps:o})}}));var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=wo.exec(t);if(n){var r,i=(null===(r=n[2].match(Mo))||void 0===r?void 0:r.map((function(t){return t.split(":")})))||[];return[new oo(io.LinearGradient,{angle:mo(parseFloat(n[1]),"deg"),steps:i.map((function(t){var e=(0,H.Z)(t,2),n=e[0],r=e[1];return{offset:mo(100*Number(n),"%"),color:r}}))})]}}else if("r"===e){var o=function(t){var e=Oo.exec(t);if(e){var n,r=(null===(n=e[4].match(Mo))||void 0===n?void 0:n.map((function(t){return t.split(":")})))||[];return{cx:mo(50,"%"),cy:mo(50,"%"),steps:r.map((function(t){var e=(0,H.Z)(t,2),n=e[0],r=e[1];return{offset:mo(100*Number(n),"%"),color:r}}))}}return null}(t);if(o){if(!$e(o))return[new oo(io.RadialGradient,o)];t=o}}else if("p"===e)return function(t){var e=ko.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(t)}));function jo(t){return t&&!!t.image}function To(t){return t&&!We(t.r)&&!We(t.g)&&!We(t.b)}var Po=Yi((function(t){if(jo(t))return(0,Z.Z)({repetition:"repeat"},t);if(We(t)&&(t=""),"transparent"===t)return yo;if("currentColor"===t)t="black";else if("none"===t)return go;var e=Ao(t);if(e)return e;var n=Ti(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),vo.apply(void 0,r)}));function Co(t,e){if(To(t)&&To(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(Ge(e[n],0,255));return e[3]=Ge(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function Ro(t,e){if(We(e))return mo(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return mo(Number(e),"px");if("deg".search(t)>=0)return mo(Number(e),"deg")}var n=[];e=e.replace(t,(function(t){return n.push(t),"U".concat(t)}));var r="U(".concat(t.source,")");return n.map((function(t){return mo(Number(e.replace(new RegExp("U".concat(t),"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var Lo=function(t){return Ro(new RegExp("px","g"),t)},No=Yi(Lo);Yi((function(t){return Ro(new RegExp("%","g"),t)}));var Io=function(t){return ze(t)||isFinite(Number(t))?mo(Number(t)||0,"px"):Ro(new RegExp("px|%|em|rem","g"),t)},Do=Yi(Io),Bo=function(t){return Ro(new RegExp("deg|rad|grad|turn","g"),t)},Fo=Yi(Bo);function zo(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o="",a=t.value||0,s=e.value||0,c=so(t.unit),l=t.convertTo(c),u=e.convertTo(c);return l&&u?(a=l.value,s=u.value,o=eo(t.unit)):(co.isLength(t.unit)||co.isLength(e.unit))&&(a=$o(t,i,n),s=$o(e,i,n),o="px"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Zo(t){var e=0;return t.unit===Hi.kDegrees?e=t.value:t.unit===Hi.kRadians?e=Zr(Number(t.value)):t.unit===Hi.kTurns?e=360*Number(t.value):t.value&&(e=t.value),e}function Wo(t,e){var n;return Array.isArray(t)?n=t.map((function(t){return Number(t)})):$e(t)?n=t.split(" ").map((function(t){return Number(t)})):ze(t)&&(n=[t]),2===e?1===n.length?[n[0],n[0]]:[n[0],n[1]]:4===e?1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]:"even"===e&&n.length%2==1?[].concat((0,G.Z)(n),(0,G.Z)(n)):n}function $o(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.unit===Hi.kPixels)return Number(t.value);if(t.unit===Hi.kPercentage&&n){var i=n.nodeName===vr.GROUP?n.getLocalBounds():n.getGeometryBounds();return(r?i.min[e]:0)+t.value/100*i.halfExtents[e]*2}return 0}var Go=function(t){return Ro(/deg|rad|grad|turn|px|%/g,t)},qo=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Yo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,qo.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return Go(t)||Po(t)}))}),n.lastIndex===t.length)return r}return[]}function Ho(t){return t.toString()}var Vo=function(t){return"number"==typeof t?mo(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?mo(Number(t)):mo(0)},Uo=Yi(Vo);function Xo(t,e){return[t,e,Ho]}function Ko(t,e){return function(n,r){return[n,r,function(n){return Ho(Ge(n,t,e))}]}}function Qo(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function Jo(t){var e;return 0===t.parsedStyle.d.totalLength&&(t.parsedStyle.d.totalLength=bn(t.parsedStyle.d.absolutePath,void 0,(0,qe.pi)((0,qe.pi)({},e),{bbox:!1,length:!0})).length),t.parsedStyle.d.totalLength}function ta(t){return 0===t.parsedStyle.points.totalLength&&(t.parsedStyle.points.totalLength=ar(t.parsedStyle.points.points)),t.parsedStyle.points.totalLength}function ea(t,e){return t[0]===e[0]&&t[1]===e[1]}function na(t,e){var n=t.prePoint,r=t.currentPoint,i=t.nextPoint,o=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),a=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),c=Math.acos((o+a-s)/(2*Math.sqrt(o)*Math.sqrt(a)));if(!c||0===Math.sin(c)||kn(c,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),u=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));return l=l>Math.PI/2?Math.PI-l:l,u=u>Math.PI/2?Math.PI-u:u,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(u-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}function ra(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}Yi((function(t){return $e(t)?t.split(" ").map(Uo):t.map(Uo)}));var ia=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},oa=function(t,e,n,r,i,o,a,s){e=Math.abs(e),n=Math.abs(n);var c=Fr(r=Mn(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var l=(t.x-a.x)/2,u=(t.y-a.y)/2,f={x:Math.cos(c)*l+Math.sin(c)*u,y:-Math.sin(c)*l+Math.cos(c)*u},h=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);h>1&&(e*=Math.sqrt(h),n*=Math.sqrt(h));var d=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2));d=d<0?0:d;var p=(i!==o?1:-1)*Math.sqrt(d),g=p*(e*f.y/n),y=p*(-n*f.x/e),v={x:Math.cos(c)*g-Math.sin(c)*y+(t.x+a.x)/2,y:Math.sin(c)*g+Math.cos(c)*y+(t.y+a.y)/2},m={x:(f.x-g)/e,y:(f.y-y)/n},b=ia({x:1,y:0},m),x=ia(m,{x:(-f.x-g)/e,y:(-f.y-y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var w=b+(x%=2*Math.PI)*s,O=e*Math.cos(w),k=n*Math.sin(w);return{x:Math.cos(c)*O-Math.sin(c)*k+v.x,y:Math.sin(c)*O+Math.cos(c)*k+v.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:w,ellipticalArcCenter:v,resultantRx:e,resultantRy:n}};function aa(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,s=void 0===a?0:a,c=r.xRotation,l=r.arcFlag,u=r.sweepFlag,f=oa({x:t.prePoint[0],y:t.prePoint[1]},o,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},e),h=oa({x:t.prePoint[0],y:t.prePoint[1]},o,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),d=h.x-f.x,p=h.y-f.y,g=Math.sqrt(d*d+p*p);return{x:-d/g,y:-p/g}}function sa(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ca(t,e){return sa(t)*sa(e)?(t[0]*e[0]+t[1]*e[1])/(sa(t)*sa(e)):1}function la(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ca(t,e))}function ua(t,e){var n=e[1],r=e[2],i=Mn(Fr(e[3]),2*Math.PI),o=e[4],a=e[5],s=t[0],c=t[1],l=e[6],u=e[7],f=Math.cos(i)*(s-l)/2+Math.sin(i)*(c-u)/2,h=-1*Math.sin(i)*(s-l)/2+Math.cos(i)*(c-u)/2,d=f*f/(n*n)+h*h/(r*r);d>1&&(n*=Math.sqrt(d),r*=Math.sqrt(d));var p=n*n*(h*h)+r*r*(f*f),g=p?Math.sqrt((n*n*(r*r)-p)/p):1;o===a&&(g*=-1),isNaN(g)&&(g=0);var y=r?g*n*h/r:0,v=n?g*-r*f/n:0,m=(s+l)/2+Math.cos(i)*y-Math.sin(i)*v,b=(c+u)/2+Math.sin(i)*y+Math.cos(i)*v,x=[(f-y)/n,(h-v)/r],w=[(-1*f-y)/n,(-1*h-v)/r],O=la([1,0],x),k=la(x,w);return ca(x,w)<=-1&&(k=Math.PI),ca(x,w)>=1&&(k=0),0===a&&k>0&&(k-=2*Math.PI),1===a&&k<0&&(k+=2*Math.PI),{cx:m,cy:b,rx:ea(t,[l,u])?0:n,ry:ea(t,[l,u])?0:r,startAngle:O,endAngle:O+k,xRotation:i,arcFlag:o,sweepFlag:a}}function fa(t,e,n){return t.reduce((function(t,e){var r="";if("M"===e[0]||"L"===e[0]){var i=tt(e[1],e[2],0);n&&ft(i,i,n),r="".concat(e[0]).concat(i[0],",").concat(i[1])}else if("Z"===e[0])r=e[0];else if("C"===e[0]){var o=tt(e[1],e[2],0),a=tt(e[3],e[4],0),s=tt(e[5],e[6],0);n&&(ft(o,o,n),ft(a,a,n),ft(s,s,n)),r="".concat(e[0]).concat(o[0],",").concat(o[1],",").concat(a[0],",").concat(a[1],",").concat(s[0],",").concat(s[1])}else if("A"===e[0]){var c=tt(e[6],e[7],0);n&&ft(c,c,n),r="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(c[0],",").concat(c[1])}else if("Q"===e[0]){var l=tt(e[1],e[2],0),u=tt(e[3],e[4],0);n&&(ft(l,l,n),ft(u,u,n)),r="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+r}),"")}function ha(t,e,n,r){return[["M",t,e],["L",n,r]]}function da(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,c=n+t,l=r-e,u=r+e;return[["M",s,r],["C",s,r-a,n-o,l,n,l],["C",n+o,l,c,r-a,c,r],["C",c,r+a,n+o,u,n,u],["C",n-o,u,s,r+a,s,r],["Z"]]}function pa(t,e){var n=t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}));return e&&n.push(["Z"]),n}function ga(t,e,n,r,i){if(i){var o=(0,H.Z)(i,4),a=o[0],s=o[1],c=o[2],l=o[3],u=t>0?1:-1,f=e>0?1:-1,h=u+f!==0?1:0;return[["M",u*a+n,r],["L",t-u*s+n,r],s?["A",s,s,0,0,h,t+n,f*s+r]:null,["L",t+n,e-f*c+r],c?["A",c,c,0,0,h,t+n-u*c,e+r]:null,["L",n+u*l,e+r],l?["A",l,l,0,0,h,n,e+r-f*l]:null,["L",n,f*a+r],a?["A",a,a,0,0,h,u*a+n,r]:null,["Z"]].filter((function(t){return t}))}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}var ya=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=ln(t)}catch(n){e=ln(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:"C"!==i&&"A"!==i&&"Q"!==i||(a=[n[n.length-2],n[n.length-1]]),a&&ea(o,a)&&(t.splice(e,1),e--)}}}(e);var n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,s=0;s<a;s++){var c=t[s];r=t[s+1];var l=c[0],u={command:l,prePoint:n,params:c,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":i=[c[1],c[2]],o=s;break;case"A":var f=ua(n,c);u.arcParams=f}if("Z"===l)n=i,r=t[o+1];else{var h=c.length;n=[c[h-2],c[h-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),u.currentPoint=n,e[o]&&ea(n,e[o].currentPoint)&&(e[o].prePoint=u.prePoint);var d=r?[r[r.length-2],r[r.length-1]]:null;u.nextPoint=d;var p=u.prePoint;if(["L","H","V"].includes(l))u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]];else if("Q"===l){var g=[c[1],c[2]];u.startTangent=[p[0]-g[0],p[1]-g[1]],u.endTangent=[n[0]-g[0],n[1]-g[1]]}else if("T"===l){var y=e[s-1],v=ra(y.currentPoint,p);"Q"===y.command?(u.command="Q",u.startTangent=[p[0]-v[0],p[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]):(u.command="TL",u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]])}else if("C"===l){var m=[c[1],c[2]],b=[c[3],c[4]];u.startTangent=[p[0]-m[0],p[1]-m[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[m[0]-b[0],m[1]-b[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[b[0]-m[0],b[1]-m[1]])}else if("S"===l){var x=e[s-1],w=ra(x.currentPoint,p),O=[c[1],c[2]];"C"===x.command?(u.command="C",u.startTangent=[p[0]-w[0],p[1]-w[1]],u.endTangent=[n[0]-O[0],n[1]-O[1]]):(u.command="SQ",u.startTangent=[p[0]-O[0],p[1]-O[1]],u.endTangent=[n[0]-O[0],n[1]-O[1]])}else if("A"===l){var k=aa(u,0),M=k.x,_=k.y,E=aa(u,1,!1),S=E.x,A=E.y;u.startTangent=[M,_],u.endTangent=[S,A]}e.push(u)}return e}(e),s=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],s=a.currentPoint,c=a.params,l=a.prePoint,u=void 0;switch(a.command){case"Q":u=lr(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=ir(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var f=a.arcParams;u=Kn(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(a.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===a.command||"M"===a.command)&&a.prePoint&&a.nextPoint&&i.push(a)}n=n.filter((function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0})),r=r.filter((function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}));var h=wn(n),d=wn(r),p=On(n),g=On(r);if(0===i.length)return{x:h,y:d,width:p-h,height:g-d};for(var y=0;y<i.length;y++){var v=i[y],m=v.currentPoint;m[0]===h?h-=na(v,e).xExtra:m[0]===p&&(p+=na(v,e).xExtra),m[1]===d?d-=na(v,e).yExtra:m[1]===g&&(g+=na(v,e).yExtra)}return{x:h,y:d,width:p-h,height:g-d}}(a,0),c=s.x,l=s.y,u=s.width,f=s.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(c)?c:0,y:Number.isFinite(l)?l:0,width:Number.isFinite(u)?u:0,height:Number.isFinite(f)?f:0}}},va=Yi(ya);function ma(t){return $e(t)?va(t):ya(t)}function ba(t,e,n){var r=t.curve,i=e.curve;r&&0!==r.length||(r=Tn(t.absolutePath,!1),t.curve=r),i&&0!==i.length||(i=Tn(e.absolutePath,!1),e.curve=i);var o=[r,i];r.length!==i.length&&(o=Cn(r,i));var a,s,c=Rn(o[0])!==Rn(o[1])?(a=o[0],s=a.slice(1).map((function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):a[0].slice(1).concat(t.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse(),[["M"].concat(s[0].slice(0,2))].concat(s.map((function(t){return["C"].concat(t.slice(2))})))):function(t){return t.map((function(t){return Array.isArray(t)?[].concat(t):t}))}(o[0]);return[c,Ln(o[1],c),function(t){return t}]}function xa(t,e){var n;return n=$e(t)?t.split(" ").map((function(t){var e=t.split(","),n=(0,H.Z)(e,2),r=n[0],i=n[1];return[Number(r),Number(i)]})):t,{points:n,totalLength:0,segments:[]}}function wa(t,e){return[t.points,e.points,function(t){return t}]}var Oa=null,ka=/\s*(\w+)\(([^)]*)\)/g;function Ma(t){return function(e){var n=0;return t.map((function(t){return t===Oa?e[n++]:t}))}}function _a(t){return t}var Ea={matrix:["NNNNNN",[Oa,Oa,0,0,Oa,Oa,0,0,0,0,1,0,Oa,Oa,0,1],_a],matrix3d:["NNNNNNNNNNNNNNNN",_a],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Ma([Oa,Oa,new co(1)]),_a],scaleX:["N",Ma([Oa,new co(1),new co(1)]),Ma([Oa,new co(1)])],scaleY:["N",Ma([new co(1),Oa,new co(1)]),Ma([new co(1),Oa])],scaleZ:["N",Ma([new co(1),new co(1),Oa])],scale3d:["NNN",_a],skew:["Aa",null,_a],skewX:["A",null,Ma([Oa,uo])],skewY:["A",null,Ma([uo,Oa])],translate:["Tt",Ma([Oa,Oa,lo]),_a],translateX:["T",Ma([Oa,lo,lo]),Ma([Oa,lo])],translateY:["T",Ma([lo,Oa,lo]),Ma([lo,Oa])],translateZ:["L",Ma([lo,lo,Oa])],translate3d:["TTL",_a]};function Sa(t){for(var e=[],n=t.length,r=0;r<n;r++){var i=t[r],o=i[0],a=i.slice(1);if("translate"===o||"skew"===o?1===a.length&&a.push(0):"scale"===o&&1===a.length&&a.push(a[0]),!Ea[o])return[];var s=a.map((function(t){return mo(t)}));e.push({t:o,d:s})}return e}function Aa(t){if(Array.isArray(t))return Sa(t);if("none"===(t=(t||"none").trim()))return[];var e,n=[],r=0;for(ka.lastIndex=0;e=ka.exec(t);){if(e.index!==r)return[];r=e.index+e[0].length;var i=e[1],o=Ea[i];if(!o)return[];var a=e[2].split(","),s=o[0];if(s.length<a.length)return[];for(var c=[],l=0;l<s.length;l++){var u=a[l],f=s[l],h=void 0;if(h=u?{A:function(t){return"0"===t.trim()?uo:Fo(t)},N:Uo,T:Do,L:No}[f.toUpperCase()](u):{a:uo,n:c[0],t:lo}[f],void 0===h)return[];c.push(h)}if(n.push({t:i,d:c}),ka.lastIndex===t.length)return n}return[]}function ja(t){if(Array.isArray(t))return Sa(t);if("none"===(t=(t||"none").trim()))return[];var e,n=[],r=0;for(ka.lastIndex=0;e=ka.exec(t);){if(e.index!==r)return[];r=e.index+e[0].length;var i=e[1],o=Ea[i];if(!o)return[];var a=e[2].split(","),s=o[0];if(s.length<a.length)return[];for(var c=[],l=0;l<s.length;l++){var u=a[l],f=s[l],h=void 0;if(h=u?{A:function(t){return"0"===t.trim()?uo:Bo(t)},N:Vo,T:Io,L:Lo}[f.toUpperCase()](u):{a:uo,n:c[0],t:lo}[f],void 0===h)return[];c.push(h)}if(n.push({t:i,d:c}),ka.lastIndex===t.length)return n}return[]}function Ta(t){var e,n,r,i;switch(t.t){case"rotateX":return i=Fr(Zo(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Fr(Zo(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Fr(Zo(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Fr(Zo(t.d[3]));var o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var s=Math.sin(i/2),c=s*Math.cos(i/2),l=s*s;return[1-2*(n*n+r*r)*l,2*(e*n*l+r*c),2*(e*r*l-n*c),0,2*(e*n*l-r*c),1-2*(e*e+r*r)*l,2*(n*r*l+e*c),0,2*(e*r*l+n*c),2*(n*r*l-e*c),1-2*(e*e+n*n)*l,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var u=Fr(Zo(t.d[0])),f=Fr(Zo(t.d[1]));return[1,Math.tan(f),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Fr(Zo(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Fr(Zo(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=$o(t.d[0],0,null)||0,n=$o(t.d[1],0,null)||0,0,1];case"translateX":return[1,0,0,0,0,1,0,0,0,0,1,0,e=$o(t.d[0],0,null)||0,0,0,1];case"translateY":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=$o(t.d[0],0,null)||0,0,1];case"translateZ":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=$o(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=$o(t.d[0],0,null)||0,n=$o(t.d[1],0,null)||0,r=$o(t.d[2],0,null)||0,1];case"perspective":var h=$o(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,h?-1/h:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map((function(t){return t.value}))}}function Pa(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Ca(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(Yr,t))return!1;if(kt(Hr,Yr),Hr[3]=0,Hr[7]=0,Hr[11]=0,Hr[15]=1,Math.abs(Tt(Hr))<1e-8)return!1;var a,s,c=Yr[3],l=Yr[7],u=Yr[11],f=Yr[12],h=Yr[13],d=Yr[14],p=Yr[15];if(0!==c||0!==l||0!==u){if(Vr[0]=c,Vr[1]=l,Vr[2]=u,Vr[3]=p,!At(Hr,Hr))return!1;St(Hr,Hr),xt(i,Vr,Hr)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=f,e[1]=h,e[2]=d,s=Yr,(a=Ur)[0][0]=s[0],a[0][1]=s[1],a[0][2]=s[2],a[1][0]=s[4],a[1][1]=s[5],a[1][2]=s[6],a[2][0]=s[8],a[2][1]=s[9],a[2][2]=s[10],n[0]=J(Ur[0]),st(Ur[0],Ur[0]),r[0]=ct(Ur[0],Ur[1]),Kr(Ur[1],Ur[1],Ur[0],1,-r[0]),n[1]=J(Ur[1]),st(Ur[1],Ur[1]),r[0]/=n[1],r[1]=ct(Ur[0],Ur[2]),Kr(Ur[2],Ur[2],Ur[0],1,-r[1]),r[2]=ct(Ur[1],Ur[2]),Kr(Ur[2],Ur[2],Ur[1],1,-r[2]),n[2]=J(Ur[2]),st(Ur[2],Ur[2]),r[1]/=n[2],r[2]/=n[2],lt(Xr,Ur[1],Ur[2]),ct(Ur[0],Xr)<0)for(var g=0;g<3;g++)n[g]*=-1,Ur[g][0]*=-1,Ur[g][1]*=-1,Ur[g][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+Ur[0][0]-Ur[1][1]-Ur[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-Ur[0][0]+Ur[1][1]-Ur[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-Ur[0][0]-Ur[1][1]+Ur[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+Ur[0][0]+Ur[1][1]+Ur[2][2],0)),Ur[2][1]>Ur[1][2]&&(o[0]=-o[0]),Ur[0][2]>Ur[2][0]&&(o[1]=-o[1]),Ur[1][0]>Ur[0][1]&&(o[2]=-o[2])}(function(t){return 0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Ta).reduce(Pa)}(t),e,n,r,i,o),[[e,n,r,o,i]]}var Ra=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)a[s][3]=o[s];for(var c=0;c<3;c++)for(var l=0;l<3;l++)a[3][c]+=e[l]*a[l][c];var u=i[0],f=i[1],h=i[2],d=i[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(f*f+h*h),p[0][1]=2*(u*f-h*d),p[0][2]=2*(u*h+f*d),p[1][0]=2*(u*f+h*d),p[1][1]=1-2*(u*u+h*h),p[1][2]=2*(f*h-u*d),p[2][0]=2*(u*h-f*d),p[2][1]=2*(f*h+u*d),p[2][2]=1-2*(u*u+f*f),a=t(a,p);var g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(g[2][1]=r[2],a=t(a,g)),r[1]&&(g[2][1]=0,g[2][0]=r[0],a=t(a,g)),r[0]&&(g[2][0]=0,g[1][0]=r[0],a=t(a,g));for(var y=0;y<3;y++)for(var v=0;v<3;v++)a[y][v]*=n[y];return function(t){return 0===t[0][2]&&0===t[0][3]&&0===t[1][2]&&0===t[1][3]&&0===t[2][0]&&0===t[2][1]&&1===t[2][2]&&0===t[2][3]&&0===t[3][2]&&1===t[3][3]}(a)?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])}}();function La(t){return t.toFixed(6).replace(".000000","")}function Na(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=Ca(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=Ca(e)),null===n[0]||null===r[0]?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=Ge(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(n[0][3],r[0][3],t[5]);return Ra(t[0],t[1],t[2],e,t[4]).map(La).join(",")}])}function Ia(t){return t.replace(/[XY]/,"")}function Da(t){return t.replace(/(X|Y|Z|3d)?$/,"3d")}function Ba(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(){var n=t[o],r=n.t,i=n.d,a="scale"===r.substring(0,5)?1:0;e.push({t:r,d:i.map((function(t){return"number"==typeof t?mo(a):mo(a,t.unit)}))})},o=0;o<t.length;o++)i()}var a,s,c=[],l=[],u=[];if(t.length!==e.length){var f=Na(t,e);c=[f[0]],l=[f[1]],u=[["matrix",[f[2]]]]}else for(var h=0;h<t.length;h++){var d=t[h].t,p=e[h].t,g=t[h].d,y=e[h].d,v=Ea[d],m=Ea[p],b=void 0;if(s=p,"perspective"===(a=d)&&"perspective"===s||!("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){var x=Na([t[h]],[e[h]]);c.push(x[0]),l.push(x[1]),u.push(["matrix",[x[2]]])}else{if(d===p)b=d;else if(v[2]&&m[2]&&Ia(d)===Ia(p))b=Ia(d),g=v[2](g),y=m[2](y);else{if(!v[1]||!m[1]||Da(d)!==Da(p)){var w=Na(t,e);c=[w[0]],l=[w[1]],u=[["matrix",[w[2]]]];break}b=Da(d),g=v[1](g),y=m[1](y)}for(var O=[],k=[],M=[],_=0;_<g.length;_++){var E=zo(g[_],y[_],n,!1,_);O[_]=E[0],k[_]=E[1],M.push(E[2])}c.push(O),l.push(k),u.push([b,M])}}if(r){var S=c;c=l,l=S}return[c,l,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return u[e][1][n](t)})).join(",");return"matrix"===u[e][0]&&16===n.split(",").length&&(u[e][0]="matrix3d"),"matrix3d"===u[e][0]&&6===n.split(",").length&&(u[e][0]="matrix"),"".concat(u[e][0],"(").concat(n,")")})).join(" ")}]}var Fa=Yi((function(t){if($e(t)){if("text-anchor"===t)return[mo(0,"px"),mo(0,"px")];var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Do(za(e[0])),Do(za(e[1]))]}return[mo(t[0]||0,"px"),mo(t[1]||0,"px")]}));function za(t){return"center"===t?"50%":"left"===t||"top"===t?"0%":"right"===t||"bottom"===t?"100%":t}var Za=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:fi.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:fi.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:fi.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:fi.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:fi.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:fi.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:fi.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:fi.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:fi.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:fi.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:fi.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:fi.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:fi.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:fi.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:fi.FILTER},{n:"clipPath",syntax:fi.DEFINED_PATH},{n:"textPath",syntax:fi.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:fi.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:fi.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:fi.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:fi.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:fi.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:fi.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:fi.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:fi.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:fi.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:fi.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:fi.COORDINATE},{n:"y1",int:!0,l:!0,syntax:fi.COORDINATE},{n:"z1",int:!0,l:!0,syntax:fi.COORDINATE},{n:"x2",int:!0,l:!0,syntax:fi.COORDINATE},{n:"y2",int:!0,l:!0,syntax:fi.COORDINATE},{n:"z2",int:!0,l:!0,syntax:fi.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:fi.PATH,p:50},{n:"points",int:!0,l:!0,syntax:fi.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:fi.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:fi.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:fi.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:fi.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:fi.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:fi.NUMBER,d:function(t){return t===vr.PATH||t===vr.POLYGON||t===vr.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:fi.MARKER},{n:"markerEnd",syntax:fi.MARKER},{n:"markerMid",syntax:fi.MARKER},{n:"markerStartOffset",syntax:fi.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:fi.LENGTH,l:!0,int:!0,d:"0"}],Wa=new Set(Za.filter((function(t){return!!t.l})).map((function(t){return t.n}))),$a={},Ga=function(){return(0,$.Z)((function t(e){var n=this;(0,W.Z)(this,t),this.runtime=e,Za.forEach((function(t){n.registerMetadata(t)}))}),[{key:"registerMetadata",value:function(t){[t.n].concat((0,G.Z)(t.a||[])).forEach((function(e){$a[e]=t}))}},{key:"getPropertySyntax",value:function(t){return this.runtime.CSSPropertySyntaxFactory[t]}},{key:"processProperties",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(t.attributes,e);var r=t.parsedStyle.clipPath,i=t.parsedStyle.offsetPath;qa(t,e);var o=!!n.forceUpdateGeometry;if(!o)for(var a in e)if(Wa.has(a)){o=!0;break}var s=Ya(t);s.has("fill")&&e.fill&&(t.parsedStyle.fill=Po(e.fill)),s.has("stroke")&&e.stroke&&(t.parsedStyle.stroke=Po(e.stroke)),s.has("shadowColor")&&e.shadowColor&&(t.parsedStyle.shadowColor=Po(e.shadowColor)),s.has("filter")&&e.filter&&(t.parsedStyle.filter=Yo(e.filter)),s.has("radius")&&!We(e.radius)&&(t.parsedStyle.radius=Wo(e.radius,4)),s.has("lineDash")&&!We(e.lineDash)&&(t.parsedStyle.lineDash=Wo(e.lineDash,"even")),s.has("points")&&e.points&&(t.parsedStyle.points=xa(e.points)),s.has("d")&&""===e.d&&(t.parsedStyle.d=(0,Z.Z)({},ui)),s.has("d")&&e.d&&(t.parsedStyle.d=ma(e.d)),s.has("textTransform")&&e.textTransform&&this.runtime.CSSPropertySyntaxFactory[fi.TEXT_TRANSFORM].calculator(null,null,{value:e.textTransform},t,null),s.has("clipPath")&&!Nn(e.clipPath)&&this.runtime.CSSPropertySyntaxFactory[fi.DEFINED_PATH].calculator("clipPath",r,e.clipPath,t,this.runtime),s.has("offsetPath")&&e.offsetPath&&this.runtime.CSSPropertySyntaxFactory[fi.DEFINED_PATH].calculator("offsetPath",i,e.offsetPath,t,this.runtime),s.has("transform")&&e.transform&&(t.parsedStyle.transform=Aa(e.transform)),s.has("transformOrigin")&&e.transformOrigin&&(t.parsedStyle.transformOrigin=Fa(e.transformOrigin)),s.has("markerStart")&&e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[fi.MARKER].calculator(null,e.markerStart,e.markerStart,null,null)),s.has("markerEnd")&&e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[fi.MARKER].calculator(null,e.markerEnd,e.markerEnd,null,null)),s.has("markerMid")&&e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[fi.MARKER].calculator("",e.markerMid,e.markerMid,null,null)),s.has("zIndex")&&!We(e.zIndex)&&this.runtime.CSSPropertySyntaxFactory[fi.Z_INDEX].postProcessor(t),s.has("offsetDistance")&&!We(e.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[fi.OFFSET_DISTANCE].postProcessor(t),s.has("transform")&&e.transform&&this.runtime.CSSPropertySyntaxFactory[fi.TRANSFORM].postProcessor(t),s.has("transformOrigin")&&e.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[fi.TRANSFORM_ORIGIN].postProcessor(t),o&&(t.geometry.dirty=!0,t.dirty(!0,!0),n.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(t))}},{key:"updateGeometry",value:function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new Sr),r.renderBounds||(r.renderBounds=new Sr);var i=t.parsedStyle,o=n.update(i,t),a=o.cx,s=void 0===a?0:a,c=o.cy,l=void 0===c?0:c,u=o.cz,f=void 0===u?0:u,h=o.hwidth,d=void 0===h?0:h,p=o.hheight,g=void 0===p?0:p,y=o.hdepth,v=void 0===y?0:y,m=[Math.abs(d),Math.abs(g),v],b=i.stroke,x=i.lineWidth,w=void 0===x?1:x,O=i.increasedLineWidthForHitTesting,k=void 0===O?0:O,M=i.shadowType,_=void 0===M?"outer":M,E=i.shadowColor,S=i.filter,A=void 0===S?[]:S,j=i.transformOrigin,T=[s,l,f];r.contentBounds.update(T,m);var P=e===vr.POLYLINE||e===vr.POLYGON||e===vr.PATH?Math.SQRT2:.5;if(b&&!b.isNone){var C=((w||0)+(k||0))*P;m[0]+=C,m[1]+=C}if(r.renderBounds.update(T,m),E&&_&&"inner"!==_){var R=r.renderBounds,L=R.min,N=R.max,I=i.shadowBlur||0,D=i.shadowOffsetX||0,B=i.shadowOffsetY||0,F=L[0]-I+D,z=N[0]+I+D,Z=L[1]-I+B,W=N[1]+I+B;L[0]=Math.min(L[0],F),N[0]=Math.max(N[0],z),L[1]=Math.min(L[1],Z),N[1]=Math.max(N[1],W),r.renderBounds.setMinMax(L,N)}A.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,rt(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,s=n[2].value,c=r.renderBounds,l=c.min,u=c.max,f=l[0]-s+o,h=u[0]+s+o,d=l[1]-s+a,p=u[1]+s+a;l[0]=Math.min(l[0],f),u[0]=Math.max(u[0],h),l[1]=Math.min(l[1],d),u[1]=Math.max(u[1],p),r.renderBounds.setMinMax(l,u)}})),t.geometry.dirty=!1;var $=g<0,G=(d<0?-1:1)*(j?$o(j[0],0,t,!0):0),q=($?-1:1)*(j?$o(j[1],1,t,!0):0);(G||q)&&t.setOrigin(G,q)}}},{key:"updateSizeAttenuation",value:function(t,e){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=(t.style.rawLineWidth||1)/e,t.nodeName===vr.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=(t.style.rawR||1)/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===vr.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))}}])}();function qa(t,e){var n=Ya(t);for(var r in e)n.has(r)&&(t.parsedStyle[r]=e[r])}function Ya(t){return t.constructor.PARSED_STYLE_LIST}var Ha=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=Xo}),[{key:"calculator",value:function(t,e,n,r){return Zo(n)}}])}(),Va=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"calculator",value:function(t,e,n,r,i){return n instanceof ao&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach((function(t){0===t.childNodes.length&&i.sceneGraphService.dirtyToRoot(t)})),n}}])}(),Ua=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.parser=Po,this.mixer=Co}),[{key:"calculator",value:function(t,e,n,r){return n instanceof ao?"none"===n.value?go:yo:n}}])}(),Xa=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"calculator",value:function(t,e,n){return n instanceof ao?[]:n}}])}();function Ka(t){var e=t.parsedStyle.fontSize;return We(e)?null:e}var Qa=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=Xo}),[{key:"calculator",value:function(t,e,n,r,i){if(ze(n))return n;if(!co.isRelativeUnit(n.unit))return n.value;if(n.unit===Hi.kPercentage)return 0;if(n.unit===Hi.kEms){if(r.parentNode){var o=Ka(r.parentNode);if(o)return o*=n.value}return 0}if(n.unit===Hi.kRems){var a;if(null!=r&&null!==(a=r.ownerDocument)&&void 0!==a&&a.documentElement){var s=Ka(r.ownerDocument.documentElement);if(s)return s*=n.value}return 0}}}])}(),Ja=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=Qo}),[{key:"calculator",value:function(t,e,n){return n.map((function(t){return t.value}))}}])}(),ts=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=Qo}),[{key:"calculator",value:function(t,e,n){return n.map((function(t){return t.value}))}}])}(),es=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"calculator",value:function(t,e,n,r){var i;n instanceof ao&&(n=null);var o=null===(i=n)||void 0===i?void 0:i.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),ns=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=Xo}),[{key:"calculator",value:function(t,e,n){return n.value}}])}(),rs=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=Ko(0,1)}),[{key:"calculator",value:function(t,e,n){return n.value}},{key:"postProcessor",value:function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(n){var i=n.nodeName;if(i===vr.LINE||i===vr.PATH||i===vr.POLYLINE){var o=n.getPoint(r);o&&t.setLocalPosition(o.x,o.y)}}}}])}(),is=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=Ko(0,1)}),[{key:"calculator",value:function(t,e,n){return n.value}}])}(),os=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.parser=ma,this.mixer=ba}),[{key:"calculator",value:function(t,e,n){return n instanceof ao&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Cr(0,0,0,0)}:n}}])}(),as=(0,$.Z)((function t(){(0,W.Z)(this,t),this.mixer=wa})),ss=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).mixer=Ko(0,1/0),t}return(0,Y.Z)(e,t),(0,$.Z)(e)}(Qa),cs=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"calculator",value:function(t,e,n,r){return n instanceof ao?"unset"===n.value?"":n.value:"".concat(n)}},{key:"postProcessor",value:function(t){t.nodeValue="".concat(t.parsedStyle.text)||""}}])}(),ls=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"calculator",value:function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value}}])}(),us=new WeakMap;var fs="undefined"!=typeof window&&void 0!==window.document;function hs(t){return!!t.getAttribute}function ds(t,e){var n=Number(t.parsedStyle.zIndex||0),r=Number(e.parsedStyle.zIndex||0);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function ps(t){var e=t;do{var n;if(null===(n=e.parsedStyle)||void 0===n?void 0:n.clipPath)return e;e=e.parentElement}while(null!==e);return null}function gs(t,e){if(fs)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var ys={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},vs="object"==typeof performance&&performance.now?performance:Date;function ms(t){return t.nodeName===vr.FRAGMENT||t.getRootNode().nodeName===vr.FRAGMENT}function bs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(r=!0,i=!0),[r,i]}var xs=1,ws="object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:{},Os=Date.now(),ks={},Ms=Date.now(),_s=function(t){if("function"!=typeof t)throw new TypeError("".concat(t," is not a function"));var e=Date.now(),n=e-Ms,r=n>16?0:16-n,i=xs++;return ks[i]=t,Object.keys(ks).length>1||setTimeout((function(){Ms=e;var t=ks;ks={},Object.keys(t).forEach((function(e){return t[e](ws.performance&&"function"==typeof ws.performance.now?ws.performance.now():Date.now()-Os)}))}),r),i},Es=function(t){delete ks[t]},Ss=function(t){return"string"!=typeof t?_s:""===t?ws.requestAnimationFrame:ws["".concat(t,"RequestAnimationFrame")]},As=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],(function(t){return!!Ss(t)})),js=Ss(As),Ts=function(t){return"string"!=typeof t?Es:""===t?ws.cancelAnimationFrame:ws["".concat(t,"CancelAnimationFrame")]||ws["".concat(t,"CancelRequestAnimationFrame")]}(As);ws.requestAnimationFrame=js,ws.cancelAnimationFrame=Ts;var Ps=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.callbacks=[]}),[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(t,e){this.callbacks.push(e)}},{key:"promise",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Promise.all(this.callbacks.map((function(t){return t.apply(void 0,e)})))}}])}(),Cs=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.callbacks=[]}),[{key:"tapPromise",value:function(t,e){this.callbacks.push(e)}},{key:"promise",value:(t=(0,hr.Z)((0,fr.Z)().mark((function t(){var e,n,r,i,o=arguments;return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.callbacks.length){t.next=6;break}return t.next=1,(e=this.callbacks)[0].apply(e,o);case 1:n=t.sent,r=0;case 2:if(!(r<this.callbacks.length-1)){t.next=5;break}return i=this.callbacks[r],t.next=3,i(n);case 3:n=t.sent;case 4:r++,t.next=2;break;case 5:return t.abrupt("return",n);case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}]);var t}(),Rs=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.callbacks=[]}),[{key:"tap",value:function(t,e){this.callbacks.push(e)}},{key:"call",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=arguments;this.callbacks.forEach((function(t){t.apply(void 0,r)}))}}])}(),Ls=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.callbacks=[]}),[{key:"tap",value:function(t,e){this.callbacks.push(e)}},{key:"call",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(this.callbacks.length){for(var r=arguments,i=this.callbacks[0].apply(void 0,r),o=0;o<this.callbacks.length-1;o++){var a=this.callbacks[o];i=a(i)}return i}return null}}])}(),Ns=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Is=/([\"\'])[^\'\"]+\1/;function Ds(t){var e=t.fontSize,n=void 0===e?16:e,r=t.fontFamily,i=void 0===r?"sans-serif":r,o=t.fontStyle,a=void 0===o?"normal":o,s=t.fontVariant,c=void 0===s?"normal":s,l=t.fontWeight;return{fontSize:n,fontFamily:i,fontStyle:a,fontVariant:c,fontWeight:void 0===l?"normal":l}}var Bs=Yi((function(t){for(var e=Ds(t),n=e.fontSize,r=e.fontFamily,i=e.fontStyle,o=e.fontVariant,a=e.fontWeight,s=ze(n)&&"".concat(n,"px")||"16px",c=r.split(","),l=c.length-1;l>=0;l--){var u=c[l].trim();!Is.test(u)&&Ns.indexOf(u)<0&&(u='"'.concat(u,'"')),c[l]=u}return"".concat(i," ").concat(o," ").concat(a," ").concat(s," ").concat(c.join(","))}),(function(t){var e=Ds(t),n=e.fontSize,r=e.fontFamily,i=e.fontStyle,o=e.fontVariant,a=e.fontWeight;return"".concat(i,"_").concat(o,"_").concat(a,"_").concat(n,"_").concat(r)})),Fs=function(t){return Math.max(t,1e-6)};function zs(t,e,n){return Et(t),t[4]=Math.tan(e),t[1]=Math.tan(n),t}var Zs=wt(),Ws=wt(),$s={scale:function(t){Ft(Zs,[t[0].value,t[1].value,1].map((function(t){return Fs(t)})))},scaleX:function(t){Ft(Zs,[t[0].value,1,1].map((function(t){return Fs(t)})))},scaleY:function(t){Ft(Zs,[1,t[0].value,1].map((function(t){return Fs(t)})))},scaleZ:function(t){Ft(Zs,[1,1,t[0].value].map((function(t){return Fs(t)})))},scale3d:function(t){Ft(Zs,[t[0].value,t[1].value,t[2].value].map((function(t){return Fs(t)})))},translate:function(t){Bt(Zs,[t[0].value,t[1].value,0])},translateX:function(t){Bt(Zs,[t[0].value,0,0])},translateY:function(t){Bt(Zs,[0,t[0].value,0])},translateZ:function(t){Bt(Zs,[0,0,t[0].value])},translate3d:function(t){Bt(Zs,[t[0].value,t[1].value,t[2].value])},rotate:function(t){$t(Zs,Fr(Zo(t[0])))},rotateX:function(t){Zt(Zs,Fr(Zo(t[0])))},rotateY:function(t){Wt(Zs,Fr(Zo(t[0])))},rotateZ:function(t){$t(Zs,Fr(Zo(t[0])))},rotate3d:function(t){zt(Zs,Fr(Zo(t[3])),[t[0].value,t[1].value,t[2].value])},skew:function(t){zs(Zs,Fr(t[0].value),Fr(t[1].value))},skewX:function(t){zs(Zs,Fr(t[0].value),0)},skewY:function(t){zs(Zs,0,Fr(t[0].value))},matrix:function(t){_t(Zs,t[0].value,t[1].value,0,0,t[2].value,t[3].value,0,0,0,0,1,0,t[4].value,t[5].value,0,1)},matrix3d:function(t){_t.apply(r,[Zs].concat((0,G.Z)(t.map((function(t){return t.value})))))}},Gs=tt(1,1,1),qs=K(),Ys={translate:function(t,e){Xc.sceneGraphService.setLocalScale(t,Gs,!1),Xc.sceneGraphService.setLocalEulerAngles(t,qs,void 0,void 0,!1),Xc.sceneGraphService.setLocalPosition(t,[e[0].value,e[1].value,0],!1),Xc.sceneGraphService.dirtyLocalTransform(t,t.transformable)}};function Hs(t,e){if(t.length){if(1===t.length&&Ys[t[0].t])return void Ys[t[0].t](e,t[0].d);for(var n=Et(Ws),r=0;r<t.length;r++){var i=t[r],o=i.t,a=i.d,s=$s[o];s&&(s(a),ve(n,n,Zs))}e.setLocalTransform(n)}else e.resetLocalTransform();return e.getLocalTransform()}var Vs=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.parser=ja,this.mixer=Ba}),[{key:"calculator",value:function(t,e,n,r){return n instanceof ao?[]:n}},{key:"postProcessor",value:function(t){Hs(t.parsedStyle.transform,t)}}])}(),Us=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"postProcessor",value:function(t){var e=t.parsedStyle.transformOrigin;e[0].unit===Hi.kPixels&&e[1].unit===Hi.kPixels?t.setOrigin(e[0].value,e[1].value):t.getGeometryBounds()}}])}(),Xs=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"calculator",value:function(t,e,n,r){return n.value}},{key:"postProcessor",value:function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&e.dirty(),r&&(r.dirty=!0,r.dirtyReason=oi.Z_INDEX_CHANGED)}}}])}(),Ks=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t,e){var n=t.cx,r=void 0===n?0:n,i=t.cy,o=void 0===i?0:i,a=t.r,s=void 0===a?0:a;return{cx:r,cy:o,hwidth:s,hheight:s}}}])}(),Qs=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t,e){var n=t.cx,r=void 0===n?0:n,i=t.cy,o=void 0===i?0:i,a=t.rx,s=void 0===a?0:a,c=t.ry;return{cx:r,cy:o,hwidth:s,hheight:void 0===c?0:c}}}])}(),Js=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),s=Math.min(n,i),c=(a-o)/2,l=(Math.max(n,i)-s)/2;return{cx:o+c,cy:s+l,hwidth:c,hheight:l}}}])}(),tc=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t){var e=t.d.rect,n=e.x,r=e.y,i=e.width/2,o=e.height/2;return{cx:n+i,cy:r+o,hwidth:i,hheight:o}}}])}(),ec=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t){if(t.points&&xn(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,(0,G.Z)(e.map((function(t){return t[0]})))),r=Math.max.apply(Math,(0,G.Z)(e.map((function(t){return t[0]})))),i=Math.min.apply(Math,(0,G.Z)(e.map((function(t){return t[1]})))),o=Math.max.apply(Math,(0,G.Z)(e.map((function(t){return t[1]})))),a=(r-n)/2,s=(o-i)/2;return{cx:n+a,cy:i+s,hwidth:a,hheight:s}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),nc=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t,e){var n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.src,s=t.width,c=void 0===s?0:s,l=t.height,u=c,f=void 0===l?0:l;return a&&!$e(a)&&(u||(u=a.width,t.width=u),f||(f=a.height,t.height=f)),{cx:r+u/2,cy:o+f/2,hwidth:u/2,hheight:f/2}}}])}(),rc=function(){return(0,$.Z)((function t(e){(0,W.Z)(this,t),this.globalRuntime=e}),[{key:"isReadyToMeasure",value:function(t,e){return t.text}},{key:"update",value:function(t,e){var n,r=t.text,i=t.textAlign,o=void 0===i?"start":i,a=t.lineWidth,s=void 0===a?1:a,c=t.textBaseline,l=void 0===c?"alphabetic":c,u=t.dx,f=void 0===u?0:u,h=t.dy,d=void 0===h?0:h,p=t.x,g=void 0===p?0:p,y=t.y,v=void 0===y?0:y;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var m=((null==e||null===(n=e.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n?void 0:n.getConfig())||{}).offscreenCanvas,b=this.globalRuntime.textService.measureText(r,t,m);t.metrics=b;var x=b.width/2,w=b.height/2,O=g+x;"center"===o||"middle"===o?O+=s/2-x:"right"!==o&&"end"!==o||(O+=s-2*x);var k=v-w;return"middle"===l?k+=w:"top"===l||"hanging"===l?k+=2*w:"alphabetic"===l||"bottom"!==l&&"ideographic"!==l||(k+=0),f&&(O+=f),d&&(k+=d),{cx:O,cy:k,hwidth:x,hheight:w}}}])}(),ic=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t,e){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),oc=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"update",value:function(t,e){var n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.width,s=void 0===a?0:a,c=t.height,l=void 0===c?0:c;return{cx:r+s/2,cy:o+l/2,hwidth:s/2,hheight:l/2}}}])}();var ac=function(){return(0,$.Z)((function t(e){(0,W.Z)(this,t),this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Pr,this.page=new Pr,this.canvas=new Pr,this.viewport=new Pr,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}),[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Rr)}}])}(),sc=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).client=new Pr,t.movement=new Pr,t.offset=new Pr,t.global=new Pr,t.screen=new Pr,t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Rr)}}])}(ac),cc=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).width=0,t.height=0,t.isPrimary=!1,t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"getCoalescedEvents",value:function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(sc),lc=function(t){function e(){return(0,W.Z)(this,e),(0,q.Z)(this,e,arguments)}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(sc),uc=function(t){function e(t,n){var r;return(0,W.Z)(this,e),(r=(0,q.Z)(this,e,[null])).type=t,r.detail=n,Object.assign(r,n),r}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ac),fc=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.emitter=new V}),[{key:"on",value:function(t,e,n){return this.addEventListener(t,e,n),this}},{key:"addEventListener",value:function(t,e,n){var r=!1,i=!1;if(Bn(n))r=n;else if(n){var o=n.capture;r=void 0!==o&&o;var a=n.once;i=void 0!==a&&a}r&&(t+="capture"),e=Fn(e)?e:e.handleEvent;var s=Fn(e)?void 0:e;return i?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this}},{key:"off",value:function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var t;null===(t=this.emitter)||void 0===t||t.removeAllListeners()}},{key:"removeEventListener",value:function(t,e,n){var r;if(!this.emitter)return this;(Bn(n)?n:null==n?void 0:n.capture)&&(t+="capture"),e=Fn(e)?e:null===(r=e)||void 0===r?void 0:r.handleEvent;var i=Fn(e)?void 0:e;return this.emitter.off(t,e,i),this}},{key:"emit",value:function(t,e){this.dispatchEvent(new uc(t,e))}},{key:"dispatchEventToSelf",value:function(t){t.target||(t.target=this),t.currentTarget=this,this.emitter.emit(t.type,t)}},{key:"dispatchEvent",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if(r)return this.dispatchEventToSelf(t),!0;if(this.document)e=this;else if(this.defaultView)e=this.defaultView;else{var i;e=null===(i=this.ownerDocument)||void 0===i?void 0:i.defaultView}if(e){if(t.manager=e.getEventService(),!t.manager)return!1;t.defaultPrevented=!1,t.path?t.path.length=0:t.page=[],n||(t.target=this),t.manager.dispatchEvent(t,t.type,n)}else this.dispatchEventToSelf(t);return!t.defaultPrevented}}])}(),hc=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t.destroyed=!1,t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"textContent",get:function(){var t="";this.nodeName===vr.TEXT&&(t+=this.style.text);var e,n=(0,dr.Z)(this.childNodes);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.nodeName===vr.TEXT?t+=r.nodeValue:t+=r.textContent}}catch(t){n.e(t)}finally{n.f()}return t},set:function(t){var e=this;this.childNodes.slice().forEach((function(t){e.removeChild(t)})),this.nodeName===vr.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Rr)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Rr)}},{key:"lookupPrefix",value:function(t){throw new Error(Rr)}},{key:"normalize",value:function(){throw new Error(Rr)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(t){if(t===this)return 0;for(var n=t,r=this,i=[n],o=[r];null!==(a=n.parentNode)&&void 0!==a?a:r.parentNode;){var a;n=n.parentNode?(i.push(n.parentNode),n.parentNode):n,r=r.parentNode?(o.push(r.parentNode),r.parentNode):r}if(n!==r)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var s=i.length>o.length?i:o,c=s===i?o:i;if(s[s.length-c.length]===c[0])return s===i?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var l=s.length-c.length,u=c.length-1;u>=0;u--){var f=c[u],h=s[l+u];if(h!==f){var d=f.parentNode.childNodes;return d.indexOf(f)<d.indexOf(h)?c===i?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:s===i?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e}},{key:"getAncestor",value:function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e}},{key:"forEach",value:function(t){for(var e=[this];e.length>0;){var n=e.pop();if(!1===t(n))break;for(var r=n.childNodes.length-1;r>=0;r--)e.push(n.childNodes[r])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(fc);hc.DOCUMENT_POSITION_DISCONNECTED=1,hc.DOCUMENT_POSITION_PRECEDING=2,hc.DOCUMENT_POSITION_FOLLOWING=4,hc.DOCUMENT_POSITION_CONTAINS=8,hc.DOCUMENT_POSITION_CONTAINED_BY=16,hc.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var dc=function(){return(0,$.Z)((function t(e,n){var r=this;(0,W.Z)(this,t),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=wt(),this.tmpVec3=K(),this.onPointerDown=function(t){var e=r.createPointerEvent(t);if(r.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)r.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var n=2===e.button;r.dispatchEvent(e,n?"rightdown":"mousedown")}r.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),r.freeEvent(e)},this.onPointerUp=function(t){var e=vs.now(),n=r.createPointerEvent(t,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(n,"pointerup"),"touch"===n.pointerType)r.dispatchEvent(n,"touchend");else if("mouse"===n.pointerType||"pen"===n.pointerType){var i=2===n.button;r.dispatchEvent(n,i?"rightup":"mouseup")}var o=r.trackingData(t.pointerId),a=r.findMountedTarget(o.pressTargetsByButton[t.button]),s=a;if(a&&!n.composedPath().includes(a)){for(var c=a;c&&!n.composedPath().includes(c);){if(n.currentTarget=c,r.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType)r.notifyTarget(n,"touchendoutside");else if("mouse"===n.pointerType||"pen"===n.pointerType){var l=2===n.button;r.notifyTarget(n,l?"rightupoutside":"mouseupoutside")}hc.isNode(c)&&(c=c.parentNode)}delete o.pressTargetsByButton[t.button],s=c}if(s){var u,f=r.clonePointerEvent(n,"click");f.target=s,f.path=[],o.clicksByButton[t.button]||(o.clicksByButton[t.button]={clickCount:0,target:f.target,timeStamp:e});var h=r.context.renderingContext.root.ownerDocument.defaultView,d=o.clicksByButton[t.button];d.target===f.target&&e-d.timeStamp<h.getConfig().dblClickSpeed?++d.clickCount:d.clickCount=1,d.target=f.target,d.timeStamp=e,f.detail=d.clickCount,null!==(u=n.detail)&&void 0!==u&&u.preventClick||(r.context.config.useNativeClickEvent||"mouse"!==f.pointerType&&"touch"!==f.pointerType||r.dispatchEvent(f,"click"),r.dispatchEvent(f,"pointertap")),r.freeEvent(f)}r.freeEvent(n)},this.onPointerMove=function(t){var e=r.createPointerEvent(t,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),n="mouse"===e.pointerType||"pen"===e.pointerType,i=r.trackingData(t.pointerId),o=r.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",s=r.createPointerEvent(t,a,o||void 0);if(r.dispatchEvent(s,"pointerout"),n&&r.dispatchEvent(s,"mouseout"),!e.composedPath().includes(o)){var c=r.createPointerEvent(t,"pointerleave",o||void 0);for(c.eventPhase=c.AT_TARGET;c.target&&!e.composedPath().includes(c.target);)c.currentTarget=c.target,r.notifyTarget(c),n&&r.notifyTarget(c,"mouseleave"),hc.isNode(c.target)&&(c.target=c.target.parentNode);r.freeEvent(c)}r.freeEvent(s)}if(o!==e.target){var l="mousemove"===t.type?"mouseover":"pointerover",u=r.clonePointerEvent(e,l);r.dispatchEvent(u,"pointerover"),n&&r.dispatchEvent(u,"mouseover");for(var f=o&&hc.isNode(o)&&o.parentNode;f&&f!==(hc.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(hc.isNode(r.rootTarget)&&r.rootTarget.parentNode)){var h=r.clonePointerEvent(e,"pointerenter");for(h.eventPhase=h.AT_TARGET;h.target&&h.target!==o&&h.target!==(hc.isNode(r.rootTarget)&&r.rootTarget.parentNode);)h.currentTarget=h.target,r.notifyTarget(h),n&&r.notifyTarget(h,"mouseenter"),hc.isNode(h.target)&&(h.target=h.target.parentNode);r.freeEvent(h)}r.freeEvent(u)}r.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&r.dispatchEvent(e,"touchmove"),n&&(r.dispatchEvent(e,"mousemove"),r.cursor=r.getCursor(e.target)),i.overTargets=e.composedPath(),r.freeEvent(e)},this.onPointerOut=function(t){var e=r.trackingData(t.pointerId);if(e.overTargets){var n="mouse"===t.pointerType||"pen"===t.pointerType,i=r.findMountedTarget(e.overTargets),o=r.createPointerEvent(t,"pointerout",i||void 0);r.dispatchEvent(o),n&&r.dispatchEvent(o,"mouseout");var a=r.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(hc.isNode(r.rootTarget)&&r.rootTarget.parentNode);)a.currentTarget=a.target,r.notifyTarget(a),n&&r.notifyTarget(a,"mouseleave"),hc.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,r.freeEvent(o),r.freeEvent(a)}r.cursor=null},this.onPointerOver=function(t){var e=r.trackingData(t.pointerId),n=r.createPointerEvent(t),i="mouse"===n.pointerType||"pen"===n.pointerType;r.dispatchEvent(n,"pointerover"),i&&r.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(r.cursor=r.getCursor(n.target));var o=r.clonePointerEvent(n,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(hc.isNode(r.rootTarget)&&r.rootTarget.parentNode);)o.currentTarget=o.target,r.notifyTarget(o),i&&r.notifyTarget(o,"mouseenter"),hc.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=n.composedPath(),r.freeEvent(n),r.freeEvent(o)},this.onPointerUpOutside=function(t){var e=r.trackingData(t.pointerId),n=r.findMountedTarget(e.pressTargetsByButton[t.button]),i=r.createPointerEvent(t);if(n){for(var o=n;o;)i.currentTarget=o,r.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||r.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),hc.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}r.freeEvent(i)},this.onWheel=function(t){var e=r.createWheelEvent(t);r.dispatchEvent(e),r.freeEvent(e)},this.onClick=function(t){if(r.context.config.useNativeClickEvent){var e=r.createPointerEvent(t);r.dispatchEvent(e),r.freeEvent(e)}},this.onPointerCancel=function(t){var e=r.createPointerEvent(t,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(e),r.freeEvent(e)},this.globalRuntime=e,this.context=n}),[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var t=this.context.contextService.getBoundingClientRect(),e=1,n=1,r=this.context.contextService.getDomElement();if(r&&t){var i=r.offsetWidth,o=r.offsetHeight;i&&o&&(e=t.width/i,n=t.height/o)}return{scaleX:e,scaleY:n,bbox:t}}},{key:"client2Viewport",value:function(t){var e=this.getScale(),n=e.scaleX,r=e.scaleY,i=e.bbox;return new Pr((t.x-((null==i?void 0:i.left)||0))/n,(t.y-((null==i?void 0:i.top)||0))/r)}},{key:"viewport2Client",value:function(t){var e=this.getScale(),n=e.scaleX,r=e.scaleY,i=e.bbox;return new Pr((t.x+((null==i?void 0:i.left)||0))*n,(t.y+((null==i?void 0:i.top)||0))*r)}},{key:"viewport2Canvas",value:function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,s=r.getPerspectiveInverse(),c=r.getWorldTransform(),l=Pt(this.tmpMatrix,c,s),u=nt(this.tmpVec3,e/o*2-1,2*(1-n/a)-1,0);return ft(u,u,l),new Pr(u[0],u[1])}},{key:"canvas2Viewport",value:function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=Pt(this.tmpMatrix,n,r),o=nt(this.tmpVec3,t.x,t.y,0);ft(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,s=a.width,c=a.height;return new Pr((o[0]+1)/2*s,(1-(o[1]+1)/2)*c)}},{key:"setPickHandler",value:function(t){this.pickHandler=t}},{key:"addEventMapping",value:function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))}},{key:"mapEvent",value:function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}}},{key:"dispatchEvent",value:function(t,e,n){if(n){t.eventPhase=t.AT_TARGET;var r=this.rootTarget.defaultView||null;t.currentTarget=r,this.notifyListeners(t,e)}else t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)}},{key:"propagate",value:function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;o<n.length;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)hc.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e}},{key:"hitTest",value:function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(t,e){var n,r=null==e?void 0:e.target;if(null!==(n=r)&&void 0!==n&&n.shadowRoot&&(r=e.composedPath()[0]),r){if(r===t)return!0;if(t&&t.contains)return t.contains(r)}return!(null==e||!e.composedPath)&&e.composedPath().indexOf(t)>-1}},{key:"getExistedHTML",value:function(t){if(t.nativeEvent.composedPath)for(var e=0,n=t.nativeEvent.composedPath();e<n.length;e++){var r=n[e],i=this.nativeHTMLMap.get(r);if(i)return i}return null}},{key:"pickTarget",value:function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})}},{key:"createPointerEvent",value:function(t,e,n,r){var i=this.allocateEvent(cc);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i),a=this.context.contextService.getDomElement();return i.target=null!=n?n:o||this.isNativeEventFromCanvas(a,i.nativeEvent)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i}},{key:"createWheelEvent",value:function(t){var e=this.allocateEvent(lc);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e),r=this.context.contextService.getDomElement();return e.target=n||this.isNativeEventFromCanvas(r,e.nativeEvent)&&this.pickTarget(e),e}},{key:"trackingData",value:function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}},{key:"cloneWheelEvent",value:function(t){var e=this.allocateEvent(lc);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e}},{key:"clonePointerEvent",value:function(t,e){var n=this.allocateEvent(cc);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n}},{key:"copyPointerData",value:function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist}},{key:"copyMouseData",value:function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)}},{key:"copyWheelData",value:function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ}},{key:"copyData",value:function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=vs.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)}},{key:"allocateEvent",value:function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e}},{key:"freeEvent",value:function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)}},{key:"notifyTarget",value:function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)}},{key:"notifyListeners",value:function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)}},{key:"findMountedTarget",value:function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||hc.isNode(r)&&r.parentNode===e))break;e=t[n]}return e}},{key:"getCursor",value:function(t){for(var e=t;e;){var n=hs(e)&&e.getAttribute("cursor");if(n)return n;e=hc.isNode(e)&&e.parentNode}}}])}(),pc=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"getOrCreateCanvas",value:function(t,e){if(this.canvas)return this.canvas;if(t||Xc.offscreenCanvas)this.canvas=t||Xc.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,Z.Z)({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,Z.Z)({willReadFrequently:!0},e)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,Z.Z)({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(t){}try{return document.createElement("canvas")}catch(t){}return null}}])}(),gc=function(t){return t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE",t}({}),yc=function(){return(0,$.Z)((function t(e,n){(0,W.Z)(this,t),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new Rs,initAsync:new Ps,dirtycheck:new Ls,cull:new Ls,beginFrame:new Rs,beforeRender:new Rs,render:new Rs,afterRender:new Rs,endFrame:new Rs,destroy:new Rs,pick:new Cs,pickSync:new Ls,pointerDown:new Rs,pointerUp:new Rs,pointerMove:new Rs,pointerOut:new Rs,pointerOver:new Rs,pointerWheel:new Rs,pointerCancel:new Rs,click:new Rs},this.globalRuntime=e,this.context=n}),[{key:"init",value:function(t){var e=this,n=(0,Z.Z)((0,Z.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach((function(t){t.apply(n,e.globalRuntime)})),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then((function(){e.inited=!0,t()})).catch((function(t){}))}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(gc.CAMERA_CHANGED)}},{key:"render",value:function(t,e,n){var r=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var i=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(i.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),i.renderReasons.size&&this.inited){i.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=1===i.renderReasons.size&&i.renderReasons.has(gc.CAMERA_CHANGED),a=!t.disableRenderHooks||!o;a&&this.renderDisplayObject(i.root,t,i),this.hooks.beginFrame.call(e),a&&i.renderListCurrentFrame.forEach((function(t){r.hooks.beforeRender.call(t),r.hooks.render.call(t),r.hooks.afterRender.call(t)})),this.hooks.endFrame.call(e),i.renderListCurrentFrame=[],i.renderReasons.clear(),n()}}},{key:"renderDisplayObject",value:function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;for(var s,c,l,u,f,h=[t];h.length>0;){var d,p=h.pop();c=void 0,l=void 0,u=void 0,f=void 0,c=(s=p).renderable,l=s.sortable,u=o?c.dirty||n.dirtyRectangleRenderingDisabled?s:null:s,f=null,u&&(f=a?r.hooks.cull.call(u,r.context.camera):u)&&(r.stats.rendered+=1,n.renderListCurrentFrame.push(f)),s.dirty(!1),l.renderOrder=r.zIndexCounter,r.zIndexCounter+=1,r.stats.total+=1,l.dirty&&(r.sort(s,l),l.dirty=!1,l.dirtyChildren=[],l.dirtyReason=void 0);for(var g=(null===(d=p.sortable)||void 0===d||null===(d=d.sorted)||void 0===d?void 0:d.length)>0?p.sortable.sorted:p.childNodes,y=g.length-1;y>=0;y--)h.push(g[y])}}},{key:"sort",value:function(t,e){var n,r;(null==e||null===(n=e.sorted)||void 0===n?void 0:n.length)>0&&e.dirtyReason!==oi.Z_INDEX_CHANGED?e.dirtyChildren.forEach((function(n){var r=e.sorted.indexOf(n);if(r>-1&&e.sorted.splice(r,1),t.childNodes.indexOf(n)>-1)if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;ds(t[i],e)<0?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}})):e.sorted=t.childNodes.slice().sort(ds),(null===(r=e.sorted)||void 0===r?void 0:r.length)>0&&0===t.childNodes.filter((function(t){return t.parsedStyle.zIndex})).length&&(e.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(gc.DISPLAY_OBJECT_CHANGED)}}])}(),vc=/\[\s*(.*)=(.*)\s*\]/,mc=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"selectOne",value:function(t,e){var n=this;if(t.startsWith("."))return e.find((function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.find((function(e){return e.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):null}return e.find((function(n){return e!==n&&n.nodeName===t}))}},{key:"selectAll",value:function(t,e){var n=this;if(t.startsWith("."))return e.findAll((function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1}));if(t.startsWith("#"))return e.findAll((function(r){return e!==r&&r.id===n.getIdOrClassname(t)}));if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll((function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)})):[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))}},{key:"is",value:function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(t.startsWith("[")){var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}return e.nodeName===t}},{key:"getIdOrClassname",value:function(t){return t.substring(1)}},{key:"getAttribute",value:function(t){var e=t.match(vc),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}}},{key:"attributeToString",value:function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return We(n)?"":n.toString?n.toString():""}}])}(),bc=function(t){return t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.MOUNTED="DOMNodeInsertedIntoDocument",t.REMOVED="removed",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.REPARENT="reparent",t.DESTROY="destroy",t.BOUNDS_CHANGED="bounds-changed",t.CULLED="culled",t}({}),xc=function(t){function e(t,n,r,i,o,a,s,c){var l;return(0,W.Z)(this,e),(l=(0,q.Z)(this,e,[null])).relatedNode=n,l.prevValue=r,l.newValue=i,l.attrName=o,l.attrChange=a,l.prevParsedValue=s,l.newParsedValue=c,l.type=t,l}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ac);xc.ADDITION=2,xc.MODIFICATION=1,xc.REMOVAL=3;var wc,Oc,kc,Mc=new xc(bc.REPARENT,null,"","","",0,"",""),_c=De(),Ec=K(),Sc=tt(1,1,1),Ac=wt(),jc=De(),Tc=K(),Pc=wt(),Cc=xe(),Rc=K(),Lc=xe(),Nc=K(),Ic=K(),Dc=K(),Bc=wt(),Fc=xe(),zc=xe(),Zc=xe(),Wc={affectChildren:!0},$c=function(){return(0,$.Z)((function t(e){(0,W.Z)(this,t),this.pendingEvents=new Map,this.boundsChangedEvent=new uc(bc.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=e}),[{key:"matches",value:function(t,e){return this.runtime.sceneGraphSelector.is(t,e)}},{key:"querySelector",value:function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)}},{key:"querySelectorAll",value:function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)}},{key:"attach",value:function(t,e,n){var r,i=!1;t.parentNode&&(i=t.parentNode!==e,this.detach(t));var o=t.nodeName===vr.FRAGMENT,a=ms(e);t.parentNode=e;var s=o?t.childNodes:[t];ze(n)?s.forEach((function(t){e.childNodes.splice(n,0,t),t.parentNode=e})):s.forEach((function(t){e.childNodes.push(t),t.parentNode=e}));var c=e.sortable;if((null!=c&&null!==(r=c.sorted)&&void 0!==r&&r.length||c.dirty||t.parsedStyle.zIndex)&&(-1===c.dirtyChildren.indexOf(t)&&c.dirtyChildren.push(t),c.dirty=!0,c.dirtyReason=oi.ADDED),!a){if(o)this.dirtifyFragment(t);else{var l=t.transformable;l&&this.dirtyWorldTransform(t,l)}if(i){var u,f=!0===(null===(u=e.ownerDocument)||void 0===u||null===(u=u.defaultView)||void 0===u||null===(u=u.getConfig())||void 0===u||null===(u=u.future)||void 0===u?void 0:u.experimentalCancelEventPropagation);t.dispatchEvent(Mc,f,f)}}}},{key:"detach",value:function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;(null!=i&&null!==(e=i.sorted)&&void 0!==e&&e.length||null!==(n=t.style)&&void 0!==n&&n.zIndex)&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=oi.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtyWorldTransform(t,r),t.parentNode=null}}},{key:"getLocalPosition",value:function(t){return t.transformable.localPosition}},{key:"getLocalRotation",value:function(t){return t.transformable.localRotation}},{key:"getLocalScale",value:function(t){return t.transformable.localScale}},{key:"getLocalSkew",value:function(t){return t.transformable.localSkew}},{key:"getLocalTransform",value:function(t){var e=t.transformable;return li(e),e.localTransform}},{key:"setLocalPosition",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.transformable;Ic[0]=e[0],Ic[1]=e[1],Ic[2]=null!==(n=e[2])&&void 0!==n?n:0,dt(i.localPosition,Ic)||(et(i.localPosition,Ic),r&&this.dirtyLocalTransform(t,i))}},{key:"translateLocal",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tt(e,n,r));var i=t.transformable;dt(e,Ec)||(ht(e,e,i.localRotation),rt(i.localPosition,i.localPosition,e),this.dirtyLocalTransform(t,i))}},{key:"setLocalRotation",value:function(t,e,n,r,i){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];"number"==typeof e&&(e=Ae(Cc,e,n,r,i));var a=t.transformable;Se(a.localRotation,e),o&&this.dirtyLocalTransform(t,a)}},{key:"rotateLocal",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tt(e,n,r));var i=t.transformable;_e(zc,e[0],e[1],e[2]),je(i.localRotation,i.localRotation,zc),this.dirtyLocalTransform(t,i)}},{key:"setLocalScale",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.transformable;nt(Tc,e[0],e[1],null!==(n=e[2])&&void 0!==n?n:i.localScale[2]),dt(Tc,i.localScale)||(et(i.localScale,Tc),r&&this.dirtyLocalTransform(t,i))}},{key:"scaleLocal",value:function(t,e){var n,r=t.transformable;ot(r.localScale,r.localScale,nt(Tc,e[0],e[1],null!==(n=e[2])&&void 0!==n?n:1)),this.dirtyLocalTransform(t,r)}},{key:"setLocalSkew",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];"number"==typeof e&&(e=Fe(jc,e,n));var i=t.transformable;Be(i.localSkew,e),r&&this.dirtyLocalTransform(t,i)}},{key:"setLocalEulerAngles",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];"number"==typeof e&&(e=tt(e,n,r));var o=t.transformable;_e(o.localRotation,e[0],e[1],e[2]),i&&this.dirtyLocalTransform(t,o)}},{key:"setLocalTransform",value:function(t,e){var n=Yt(Rc,e),r=Vt(Lc,e),i=Ht(Nc,e);this.setLocalScale(t,i,!1),this.setLocalPosition(t,n,!1),this.setLocalRotation(t,r,void 0,void 0,void 0,!1),this.dirtyLocalTransform(t,t.transformable)}},{key:"resetLocalTransform",value:function(t){this.setLocalScale(t,Sc,!1),this.setLocalPosition(t,Ec,!1),this.setLocalEulerAngles(t,Ec,void 0,void 0,!1),this.setLocalSkew(t,_c,void 0,!1),this.dirtyLocalTransform(t,t.transformable)}},{key:"getPosition",value:function(t){var e=t.transformable;return Yt(e.position,this.getWorldTransform(t,e))}},{key:"getRotation",value:function(t){var e=t.transformable;return Vt(e.rotation,this.getWorldTransform(t,e))}},{key:"getScale",value:function(t){var e=t.transformable;return Ht(e.scaling,this.getWorldTransform(t,e))}},{key:"getOrigin",value:function(t){return t.getGeometryBounds(),t.transformable.origin}},{key:"getWorldTransform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.transformable;return e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.internalUpdateTransform(t),e.worldTransform):e.worldTransform}},{key:"setPosition",value:function(t,e){var n,r=t.transformable;if(Dc[0]=e[0],Dc[1]=e[1],Dc[2]=null!==(n=e[2])&&void 0!==n?n:0,!dt(this.getPosition(t),Dc)){if(et(r.position,Dc),null!==t.parentNode&&t.parentNode.transformable){var i=t.parentNode.transformable;kt(Bc,i.worldTransform),At(Bc,Bc),ft(r.localPosition,Dc,Bc)}else et(r.localPosition,Dc);this.dirtyLocalTransform(t,r)}}},{key:"translate",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=nt(Tc,e,n,r)),dt(e,Ec)||(rt(Tc,this.getPosition(t),e),this.setPosition(t,Tc))}},{key:"setRotation",value:function(t,e,n,r,i){var o=t.transformable;if("number"==typeof e&&(e=Ee(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable){var a=this.getRotation(t.parentNode);Se(Cc,a),Me(Cc,Cc),Oe(o.localRotation,Cc,e),Te(o.localRotation,o.localRotation),this.dirtyLocalTransform(t,o)}else this.setLocalRotation(t,e)}},{key:"rotate",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tt(e,n,r));var i=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var o=Cc;_e(o,e[0],e[1],e[2]);var a=this.getRotation(t),s=this.getRotation(t.parentNode);Se(Zc,s),Me(Zc,Zc),Oe(o,Zc,o),Oe(i.localRotation,o,a),Te(i.localRotation,i.localRotation),this.dirtyLocalTransform(t,i)}else this.rotateLocal(t,e)}},{key:"setOrigin",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtyLocalTransform(t,i)}}},{key:"setEulerAngles",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof e&&(e=tt(e,n,r));var i=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){_e(i.localRotation,e[0],e[1],e[2]);var o=this.getRotation(t.parentNode);Se(Fc,Me(Cc,o)),je(i.localRotation,i.localRotation,Fc),this.dirtyLocalTransform(t,i)}else this.setLocalEulerAngles(t,e)}},{key:"getTransformedGeometryBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this.getGeometryBounds(t,e);if(!Sr.isEmpty(r)){var i=n||new Sr;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i}return null}},{key:"getGeometryBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t,r=n.geometry;r.dirty&&Xc.styleValueRegistry.updateGeometry(t);var i=e?r.renderBounds:r.contentBounds||null;return i||new Sr}},{key:"getBounds",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t,i=r.renderable;if(!i.boundsDirty&&!n&&i.bounds)return i.bounds;if(!i.renderBoundsDirty&&n&&i.renderBounds)return i.renderBounds;var o=n?i.renderBounds:i.bounds,a=this.getTransformedGeometryBounds(t,n,o),s=t.childNodes;if(s.forEach((function(t){var r=e.getBounds(t,n);r&&(a?a.add(r):(a=o||new Sr).update(r.center,r.halfExtents))})),a||(a=new Sr),n){var c=ps(t);if(c){var l=c.parsedStyle.clipPath.getBounds(n);a?l&&(a=l.intersection(a)):a.update(l.center,l.halfExtents)}}return n?(i.renderBounds=a,i.renderBoundsDirty=!1):(i.bounds=a,i.boundsDirty=!1),a}},{key:"getLocalBounds",value:function(t){if(t.parentNode){var e=Ac;t.parentNode.transformable&&(e=At(Pc,this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Sr.isEmpty(n)){var r=new Sr;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)}},{key:"getBoundingClientRect",value:function(t){var e,n,r=this.getGeometryBounds(t);Sr.isEmpty(r)||(n=new Sr).setFromTransformedAABB(r,this.getWorldTransform(t));var i=null===(e=t.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(n){var o=n.getMin(),a=(0,H.Z)(o,2),s=a[0],c=a[1],l=n.getMax(),u=(0,H.Z)(l,2),f=u[0],h=u[1];return new Cr(s+((null==i?void 0:i.left)||0),c+((null==i?void 0:i.top)||0),f-s,h-c)}return new Cr((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(t){var e,n=null===(e=t.parentNode)||void 0===e?void 0:e.transformable;li(t.transformable),function(t,e){t.dirtyFlag&&(e?Pt(t.worldTransform,e.worldTransform,t.localTransform):kt(t.worldTransform,t.localTransform),t.dirtyFlag=!1)}(t.transformable,n)}},{key:"internalUpdateElement",value:function(t,e){var n,r,i,o,a,s,c=!0===(null===(n=t.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n||null===(n=n.getConfig())||void 0===n||null===(n=n.future)||void 0===n?void 0:n.experimentalAttributeUpdateOptimization),l=e[e.length-1],u=(null==l?void 0:l.transformDirty)||(null===(r=t.transformable)||void 0===r?void 0:r.localDirtyFlag);t.transformable&&((a=t.transformable).dirtyFlag||(a.dirtyFlag=u));(this.internalUpdateTransform(t),u)&&(null===(s=t.dirty)||void 0===s||s.call(t,!0,!0));var f=(null===(i=t.renderable)||void 0===i?void 0:i.boundsDirty)||(null===(o=t.renderable)||void 0===o?void 0:o.renderBoundsDirty);if((u||f)&&!1===(null==l?void 0:l.shapeUpdated)&&c)for(var h=e.length-1;h>=0;){var d,p,g=e[h];if(g.shapeUpdated)break;null===(d=(p=g.node).dirty)||void 0===d||d.call(p,!0,!0),g.shapeUpdated=!0,h-=1}return u}},{key:"syncHierarchy",value:function(t){for(var e,n,r=[t],i=t.parentNode?[{node:t.parentNode,transformDirty:(null===(e=t.parentNode.transformable)||void 0===e?void 0:e.localDirtyFlag)||(null===(n=t.parentNode.transformable)||void 0===n?void 0:n.dirtyFlag),shapeUpdated:!1}]:[];r.length>0;){for(var o=r.pop(),a=i[i.length-1];i.length>0&&o.parentNode!==a.node;)a=i.pop();var s=this.internalUpdateElement(o,i);if(o.childNodes.length>0){for(var c=o.childNodes.length-1;c>=0;c--)r.push(o.childNodes[c]);i.push({node:o,transformDirty:s,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(t,e){ms(t)||e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtyWorldTransform(t,e))}},{key:"dirtyWorldTransform",value:function(t,e){this.dirtifyWorldInternal(t,e),this.dirtyToRoot(t,!0)}},{key:"dirtifyWorldInternal",value:function(t,e){var n,r=this,i=!0===(null===(n=t.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n||null===(n=n.getConfig())||void 0===n||null===(n=n.future)||void 0===n?void 0:n.experimentalAttributeUpdateOptimization);e.dirtyFlag||(e.dirtyFlag=!0,t.dirty(!0,!0),i||t.childNodes.forEach((function(t){var e=t.transformable;r.dirtifyWorldInternal(t,e)})))}},{key:"dirtyToRoot",value:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t,i=!0===(null===(e=t.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e||null===(e=e.getConfig())||void 0===e||null===(e=e.future)||void 0===e?void 0:e.experimentalAttributeUpdateOptimization);r;){var o,a;if(null===(o=(a=r).dirty)||void 0===o||o.call(a,!0,!0),i)break;r=r.parentNode}n&&t.forEach((function(t){var e;null===(e=t.dirty)||void 0===e||e.call(t,!0,!0)})),this.informDependentDisplayObjects(t),this.pendingEvents.set(t,n)}},{key:"dirtifyFragment",value:function(t){var e,n,r=t.transformable;r&&(r.dirtyFlag=!0,r.localDirtyFlag=!0),null===(e=(n=t).dirty)||void 0===e||e.call(n,!0,!0);for(var i=t.childNodes.length,o=0;o<i;o++)this.dirtifyFragment(t.childNodes[o]);t.nodeName===vr.FRAGMENT&&this.pendingEvents.set(t,!1)}},{key:"triggerPendingEvents",value:function(){var t,e,n=this,r=new Set,i=function(e,i){if(e.isConnected&&!r.has(e)&&e.nodeName!==vr.FRAGMENT){if(n.boundsChangedEvent.detail=i,n.boundsChangedEvent.target=e,e.isMutationObserved)e.dispatchEvent(n.boundsChangedEvent);else{var o;if(void 0===t)t=!0===(null===(o=e.ownerDocument.defaultView)||void 0===o||null===(o=o.getConfig())||void 0===o||null===(o=o.future)||void 0===o?void 0:o.experimentalCancelEventPropagation);e.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0,t)}r.add(e)}};this.pendingEvents.forEach((function(t,n){if(n.nodeName!==vr.FRAGMENT){var r;if(void 0===e)e=!0===(null===(r=n.ownerDocument)||void 0===r||null===(r=r.defaultView)||void 0===r||null===(r=r.getConfig())||void 0===r||null===(r=r.future)||void 0===r?void 0:r.experimentalAttributeUpdateOptimization);Wc.affectChildren=t,e?i(n,Wc):t?n.forEach((function(t){i(t,Wc)})):i(n,Wc)}})),r.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"updateDisplayObjectDependency",value:function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);a||(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),a[t]||(a[t]=[]),a[t].push(r)}}},{key:"informDependentDisplayObjects",value:function(t){var e,n=this,r=this.displayObjectDependencyMap.get(t);if(r){var i=null===(e=t.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e||null===(e=e.getConfig())||void 0===e||null===(e=e.future)||void 0===e?void 0:e.experimentalCancelEventPropagation;Object.keys(r).forEach((function(t){r[t].forEach((function(e){n.dirtyToRoot(e,!0),e.dispatchEvent(new xc(bc.ATTR_MODIFIED,e,n,n,t,xc.MODIFICATION,n,n),i,i),e.isCustomElement&&e.isConnected&&e.attributeChangedCallback&&e.attributeChangedCallback(t,n,n)}))}))}}}])}(),Gc=function(){return(0,$.Z)((function t(e){if((0,W.Z)(this,t),e<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=e,this.cache=new Map}),[{key:"get",value:function(t){if(this.cache.has(t)){var e=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,e),e}}},{key:"put",value:function(t,e){if(this.cache.has(t)&&this.cache.delete(t),this.cache.set(t,e),this.cache.size>this.capacity){var n=this.cache.keys().next().value;this.cache.delete(n)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])}(),qc={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Yc=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Hc=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),Vc=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),Uc=function(){return(0,$.Z)((function t(e){var n=this;(0,W.Z)(this,t),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Vc.exec(e)&&!Hc.exec(t))},this.trimByKinsokuShorui=function(t){var e=(0,G.Z)(t),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e},this.runtime=e,this.charWidthCache=new Gc(100)}),[{key:"measureFont",value:function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=qc.MetricsString+qc.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(qc.BaselineSymbol).width),c=qc.HeightMultiplier*s;s=s*qc.BaselineMultiplier|0,r.width=a,r.height=c,i.fillStyle="#f00",i.fillRect(0,0,a,c),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var l=i.getImageData(0,0,a||1,c||1).data,u=l.length,f=4*a,h=0,d=0,p=!1;for(h=0;h<s;++h){for(var g=0;g<f;g+=4)if(255!==l[d+g]){p=!0;break}if(p)break;d+=f}for(n.ascent=s-h,d=u-f,p=!1,h=c;h>s;--h){for(var y=0;y<f;y+=4)if(255!==l[d+y]){p=!0;break}if(p)break;d-=f}return n.descent=h-s,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n}},{key:"measureText",value:function(t,e,n){var r=e.fontSize,i=void 0===r?16:r,o=e.wordWrap,a=void 0!==o&&o,s=e.lineHeight,c=e.lineWidth,l=void 0===c?1:c,u=e.textBaseline,f=void 0===u?"alphabetic":u,h=e.textAlign,d=void 0===h?"start":h,p=e.letterSpacing,g=void 0===p?0:p,y=e.textPath;e.textPathSide,e.textPathStartOffset;var v=e.leading,m=void 0===v?0:v,b=Bs(e),x=this.measureFont(b,n);0===x.fontSize&&(x.fontSize=i,x.ascent=i);var w=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);w.font=b,e.isOverflowing=!1;var O=(a?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),k=new Array(O.length),M=0;if(!y){for(var _=0;_<O.length;_++){var E=w.measureText(O[_]).width+(O[_].length-1)*g;k[_]=E,M=Math.max(M,E)}var S=M+l,A=s||x.fontSize+l,j=Math.max(A,x.fontSize+l)+(O.length-1)*(A+m),T=0;return"middle"===f?T=-j/2:"bottom"===f||"alphabetic"===f||"ideographic"===f?T=-j:"top"!==f&&"hanging"!==f||(T=0),{font:b,width:S,height:j,lines:O,lineWidths:k,lineHeight:A+=m,maxLineWidth:M,fontProperties:x,lineMetrics:k.map((function(t,e){var n=0;return"center"===d||"middle"===d?n-=t/2:"right"!==d&&"end"!==d||(n-=t),new Cr(n-l/2,T+e*A,t+l,A)}))}}y.getTotalLength();for(var P=0;P<O.length;P++)w.measureText(O[P]).width,O[P].length}},{key:"wordWrap",value:function(t,e,n){var r=this,i=Array.from(t);if(0===i.length)return"";var o=this,a=e.wordWrapWidth,s=void 0===a?0:a,c=e.letterSpacing,l=void 0===c?0:c,u=e.maxLines,f=void 0===u?1/0:u,h=e.textOverflow,d=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),p=s+l,g="";"ellipsis"===h?g="...":h&&"clip"!==h&&(g=h);var y=[""],v=0,m=0,b=-1,x=Bs(e),w=this.charWidthCache.get(x);w||(w=new Gc(500),this.charWidthCache.put(x,w));var O=function(t){return r.getFromCache(t,l,w,d)},k=O(g);function M(t,e,n,r){for(;O(t)<r&&e<i.length-1&&!o.isNewline(i[e+1]);)t+=i[e+=1];for(;O(t)>r&&e>=n;)e-=1,t=t.slice(0,-1);return{lineTxt:t,txtLastCharIndex:e}}function _(t,e){if(!(k<=0||k>p))if(y[t]){var n=M(y[t],e,b+1,p-k);y[t]=n.lineTxt+g}else y[t]=g}for(var E=0;E<i.length;E++){var S=i[E],A=i[E-1],j=i[E+1],T=O(S);if(this.isNewline(S)){if(v+1>=f){E<i.length-1&&_(v,E-1),e.isOverflowing=!0;break}b=E-1,m=0,y[v+=1]=""}else{if(T>p){_(v,E-1),e.isOverflowing=!0;break}if(m>0&&m+T>p){var P=M(y[v],E-1,b+1,p);if(P.txtLastCharIndex!==E-1){if(y[v]=P.lineTxt,P.txtLastCharIndex===i.length-1)break;E=P.txtLastCharIndex+1,S=i[E],A=i[E-1],j=i[E+1],T=O(S)}if(v+1>=f){_(v,E-1),e.isOverflowing=!0;break}if(b=E-1,m=0,y[v+=1]="",this.isBreakingSpace(S))continue;this.canBreakInLastChar(S)||(y=this.trimToBreakable(y),m=this.sumTextWidthByCache(y[v]||"",O)),this.shouldBreakByKinsokuShorui(S,j)&&(y=this.trimByKinsokuShorui(y),m+=O(A||""))}m+=T,y[v]+=S}}return y.join("\n")}},{key:"isBreakingSpace",value:function(t){return"string"==typeof t&&qc.BreakingSpaces.indexOf(t.charCodeAt(0))>=0}},{key:"isNewline",value:function(t){return"string"==typeof t&&qc.Newlines.indexOf(t.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(t){var e=(0,G.Z)(t),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+1,a=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(o,n.length),e[e.length-2]=n.slice(0,a),e}},{key:"canBreakInLastChar",value:function(t){return!t||!Yc.test(t)}},{key:"sumTextWidthByCache",value:function(t,e){return t.split("").reduce((function(t,n){return t+e(n)}),0)}},{key:"findBreakableIndex",value:function(t){for(var e=t.length-1;e>=0;e--)if(!Yc.test(t[e]))return e;return-1}},{key:"getFromCache",value:function(t,e,n,r){var i=n.get(t);if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n.put(t,i)}return i}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])}(),Xc={},Kc=(Oc=new nc,kc=new ec,wc={},(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(wc,vr.FRAGMENT,null),vr.CIRCLE,new Ks),vr.ELLIPSE,new Qs),vr.RECT,Oc),vr.IMAGE,Oc),vr.GROUP,new ic),vr.LINE,new Js),vr.TEXT,new rc(Xc)),vr.POLYLINE,kc),vr.POLYGON,kc),(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(wc,vr.PATH,new tc),vr.HTML,new oc),vr.MESH,null)),Qc=function(t){var e=new Ua,n=new Qa;return t={},(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,fi.PERCENTAGE,null),fi.NUMBER,new ns),fi.ANGLE,new Ha),fi.DEFINED_PATH,new Va),fi.PAINT,e),fi.COLOR,e),fi.FILTER,new Xa),fi.LENGTH,n),fi.LENGTH_PERCENTAGE,n),fi.LENGTH_PERCENTAGE_12,new Ja),(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,fi.LENGTH_PERCENTAGE_14,new ts),fi.COORDINATE,new Qa),fi.OFFSET_DISTANCE,new rs),fi.OPACITY_VALUE,new is),fi.PATH,new os),fi.LIST_OF_POINTS,new as),fi.SHADOW_BLUR,new ss),fi.TEXT,new cs),fi.TEXT_TRANSFORM,new ls),fi.TRANSFORM,new Vs),(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,fi.TRANSFORM_ORIGIN,new Us),fi.Z_INDEX,new Xs),fi.MARKER,new es)}();Xc.CameraContribution=ri,Xc.AnimationTimeline=null,Xc.EasingFunction=null,Xc.offscreenCanvasCreator=new pc,Xc.sceneGraphSelector=new mc,Xc.sceneGraphService=new $c(Xc),Xc.textService=new Uc(Xc),Xc.geometryUpdaterFactory=Kc,Xc.CSSPropertySyntaxFactory=Qc,Xc.styleValueRegistry=new Ga(Xc),Xc.layoutRegistry=null,Xc.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},Xc.enableStyleSyntax=!0,Xc.enableSizeAttenuation=!1;var Jc=0;var tl=new xc(bc.INSERTED,null,"","","",0,"",""),el=new xc(bc.REMOVED,null,"","","",0,"",""),nl=new uc(bc.DESTROY),rl=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).entity=Jc++,t.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},t.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},t.cullable={strategy:ii.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},t.rBushNode={aabb:void 0},t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.style={},t.computedStyle={},t.parsedStyle={},t.attributes={},t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"dirty",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.renderable.dirty=t,e&&(this.renderable.boundsDirty=t,this.renderable.renderBoundsDirty=t)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter((function(t){return""!==t}))}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw new Error(Rr)}},{key:"appendChild",value:function(t,e){var n;if(t.destroyed)throw new Error("Cannot append a destroyed element.");return Xc.sceneGraphService.attach(t,this,e),null!==(n=this.ownerDocument)&&void 0!==n&&n.defaultView&&(ms(this)||t.nodeName!==vr.FRAGMENT?this.ownerDocument.defaultView.mountChildren(t):this.ownerDocument.defaultView.mountFragment(t)),this.isMutationObserved&&(tl.relatedNode=this,t.dispatchEvent(tl)),t}},{key:"insertBefore",value:function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t}},{key:"replaceChild",value:function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e}},{key:"removeChild",value:function(t){var e,n,r=!0===(null===(e=this.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e||null===(e=e.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation);return el.relatedNode=this,t.dispatchEvent(el,r,r),null!==(n=t.ownerDocument)&&void 0!==n&&n.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),Xc.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length>0&&e.destroyChildren(),e.destroy()}}},{key:"matches",value:function(t){return Xc.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return Xc.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return Xc.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return Xc.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return Xc.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return Xc.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return Xc.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var e=this;do{if(Xc.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null}},{key:"find",value:function(t){var e=this,n=null;return this.forEach((function(r){return r===e||!t(r)||(n=r,!1)})),n}},{key:"findAll",value:function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];r.forEach((function(n,r){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(n,e+r+1)}))}}},{key:"before",value:function(){if(this.parentNode){for(var t,e=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r[0],a=r.slice(1);this.parentNode.appendChild(o,e),(t=o).after.apply(t,(0,G.Z)(a))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach((function(e){return t.appendChild(e)}))}},{key:"prepend",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach((function(e,n){return t.appendChild(e,n)}))}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var t,e=!0===(null===(t=this.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation);this.destroyChildren(),this.dispatchEvent(nl,e,e),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return Xc.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return Xc.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return Xc.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return Xc.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return Xc.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(t){if("symbol"!=typeof t){var e=this.attributes[t];return e}}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,e,n,r){this.attributes[t]=e}},{key:"getAttributeNS",value:function(t,e){throw new Error(Rr)}},{key:"getAttributeNode",value:function(t){throw new Error(Rr)}},{key:"getAttributeNodeNS",value:function(t,e){throw new Error(Rr)}},{key:"hasAttributeNS",value:function(t,e){throw new Error(Rr)}},{key:"removeAttributeNS",value:function(t,e){throw new Error(Rr)}},{key:"removeAttributeNode",value:function(t){throw new Error(Rr)}},{key:"setAttributeNS",value:function(t,e,n){throw new Error(Rr)}},{key:"setAttributeNode",value:function(t){throw new Error(Rr)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(Rr)}},{key:"toggleAttribute",value:function(t,e){throw new Error(Rr)}}])}(hc);function il(t){return!(null==t||!t.nodeName)}var ol=Xc.globalThis.Proxy?Xc.globalThis.Proxy:function(){},al=new xc(bc.ATTR_MODIFIED,null,null,null,null,xc.MODIFICATION,null,null),sl=K(),cl=xe(),ll=function(t){function e(t){var n;return(0,W.Z)(this,e),(n=(0,q.Z)(this,e)).isCustomElement=!1,n.isMutationObserved=!1,n.activeAnimations=[],n.config=t,n.id=t.id||"",n.name=t.name||"",(t.className||t.class)&&(n.className=t.className||t.class),n.nodeName=t.type||vr.GROUP,t.initialParsedStyle&&Object.assign(n.parsedStyle,t.initialParsedStyle),n.initAttributes(t.style),Xc.enableStyleSyntax&&(n.style=new ol({setProperty:function(t,e){n.setAttribute(t,e)},getPropertyValue:function(t){return n.getAttribute(t)},removeProperty:function(t){n.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:n.getAttribute(e)},set:function(t,e,r){return n.setAttribute(e,r),!0}})),n}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"destroy",value:function(){Yn(e,"destroy",this,3)([]),this.getAnimations().forEach((function(t){t.cancel()}))}},{key:"cloneNode",value:function(t,e){var n=(0,Z.Z)({},this.attributes);for(var r in n){var i=n[r];il(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor((0,Z.Z)((0,Z.Z)({},this.config),{},{style:n}));return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach((function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}})),o}},{key:"initAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={forceUpdateGeometry:!0};Xc.styleValueRegistry.processProperties(this,t,e),this.dirty()}},{key:"setAttribute",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Nn(n)||(r||n!==this.attributes[t])&&(this.internalSetAttribute(t,n,{memoize:i}),Yn(e,"setAttribute",this,3)([t,n]))}},{key:"internalSetAttribute",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.attributes[t],i=this.parsedStyle[t];Xc.styleValueRegistry.processProperties(this,(0,Wn.Z)({},t,e),n),this.dirty();var o,a,s=this.parsedStyle[t];if(this.isConnected)if(al.relatedNode=this,al.prevValue=r,al.newValue=e,al.attrName=t,al.prevParsedValue=i,al.newParsedValue=s,this.isMutationObserved)this.dispatchEvent(al);else{var c,l=!0===(null===(c=this.ownerDocument.defaultView.getConfig().future)||void 0===c?void 0:c.experimentalCancelEventPropagation);al.target=this,this.ownerDocument.defaultView.dispatchEvent(al,!0,l)}(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&(null===(o=(a=this).attributeChangedCallback)||void 0===o||o.call(a,t,r,e,i,s))}},{key:"getBBox",value:function(){var t=this.getBounds(),e=t.getMin(),n=(0,H.Z)(e,2),r=n[0],i=n[1],o=t.getMax(),a=(0,H.Z)(o,2),s=a[0],c=a[1];return new Cr(r,i,s-r,c-i)}},{key:"setOrigin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Xc.sceneGraphService.setOrigin(this,Dr(t,e,n,!1)),this}},{key:"getOrigin",value:function(){return Xc.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Xc.sceneGraphService.setPosition(this,Dr(t,e,n,!1)),this}},{key:"setLocalPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Xc.sceneGraphService.setLocalPosition(this,Dr(t,e,n,!1)),this}},{key:"translate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Xc.sceneGraphService.translate(this,Dr(t,e,n,!1)),this}},{key:"translateLocal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Xc.sceneGraphService.translateLocal(this,Dr(t,e,n,!1)),this}},{key:"getPosition",value:function(){return Xc.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return Xc.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,e,n){return this.scaleLocal(t,e,n)}},{key:"scaleLocal",value:function(t,e,n){return"number"==typeof t&&(t=Dr(t,e=e||t,n=n||t,!1)),Xc.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,e,n){return"number"==typeof t&&(t=Dr(t,e=e||t,n=n||t,!1)),Xc.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return Xc.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return Xc.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=$r(sl,Xc.sceneGraphService.getWorldTransform(this));return Zr((0,H.Z)(t,3)[2])}},{key:"getLocalEulerAngles",value:function(){var t=$r(sl,Xc.sceneGraphService.getLocalRotation(this));return Zr((0,H.Z)(t,3)[2])}},{key:"setEulerAngles",value:function(t){return Xc.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return Xc.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,e,n){return We(e)&&We(n)?Xc.sceneGraphService.rotateLocal(this,0,0,t):Xc.sceneGraphService.rotateLocal(this,t,e,n),this}},{key:"rotate",value:function(t,e,n){return We(e)&&We(n)?Xc.sceneGraphService.rotate(this,0,0,t):Xc.sceneGraphService.rotate(this,t,e,n),this}},{key:"setRotation",value:function(t,e,n,r){return Xc.sceneGraphService.setRotation(this,t,e,n,r),this}},{key:"setLocalRotation",value:function(t,e,n,r){return Xc.sceneGraphService.setLocalRotation(this,t,e,n,r),this}},{key:"setLocalSkew",value:function(t,e){return Xc.sceneGraphService.setLocalSkew(this,t,e),this}},{key:"getRotation",value:function(){return Xc.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return Xc.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return Xc.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return Xc.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return Xc.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return Xc.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){Xc.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,e){var n,r=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;return r?r.play(this,t,e):null}},{key:"isVisible",value:function(){var t;return"hidden"!==(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return"none"!==(null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)}},{key:"isCulled",value:function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,G.Z)(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,G.Z)(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=n[1];return i?zn(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes}},{key:"getMatrix",value:function(t){var e=t||this.getWorldTransform(),n=Yt(sl,e),r=(0,H.Z)(n,2),i=r[0],o=r[1],a=Ht(sl,e),s=(0,H.Z)(a,2),c=s[0],l=s[1],u=Vt(cl,e),f=$r(sl,u),h=(0,H.Z)(f,3),d=h[0],p=h[2];return Gr(d||p,i,o,c,l)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var e=qr(t),n=(0,H.Z)(e,5),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4];this.setEulerAngles(s).setPosition(r,i).setLocalScale(o,a)}},{key:"setLocalMatrix",value:function(t){var e=qr(t),n=(0,H.Z)(e,5),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4];this.setLocalEulerAngles(s).setLocalPosition(r,i).setLocalScale(o,a)}},{key:"show",value:function(){this.forEach((function(t){t.style.visibility="visible"}))}},{key:"hide",value:function(){this.forEach((function(t){t.style.visibility="hidden"}))}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(t){return this.children[t]||null}},{key:"add",value:function(t,e){return this.appendChild(t,e)}},{key:"set",value:function(t,e){this.config[t]=e}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(t,e,n),this}},{key:"move",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(t,e,n),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(rl);ll.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var ul=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,W.Z)(this,e),(0,q.Z)(this,e,[(0,Z.Z)({type:vr.CIRCLE},t)])}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ll);ul.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var fl=["style"],hl=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,pr.Z)(n,fl);return(0,W.Z)(this,e),(t=(0,q.Z)(this,e,[(0,Z.Z)({style:r},i)])).isCustomElement=!0,t}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ll);hl.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var dl=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,W.Z)(this,e),(0,q.Z)(this,e,[(0,Z.Z)({type:vr.ELLIPSE},t)])}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ll);dl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"])),(function(t){function e(){return(0,W.Z)(this,e),(0,q.Z)(this,e,[{type:vr.FRAGMENT}])}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ll)).PARSED_STYLE_LIST=new Set(["class","className"]);var pl=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,W.Z)(this,e),(0,q.Z)(this,e,[(0,Z.Z)({type:vr.GROUP},t)])}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ll);pl.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var gl=["style"],yl=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,pr.Z)(n,gl);return(0,W.Z)(this,e),(t=(0,q.Z)(this,e,[(0,Z.Z)({type:vr.HTML,style:r},i)])).cullable.enable=!1,t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=At(wt(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Sr.isEmpty(e)){var n=new Sr;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()}}])}(ll);yl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var vl=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,W.Z)(this,e),(0,q.Z)(this,e,[(0,Z.Z)({type:vr.IMAGE},t)])}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ll);vl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var ml=["style"],bl=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,pr.Z)(n,ml);(0,W.Z)(this,e),(t=(0,q.Z)(this,e,[(0,Z.Z)({type:vr.LINE,style:(0,Z.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i)])).markerStartAngle=0,t.markerEndAngle=0;var o=t.parsedStyle,a=o.markerStart,s=o.markerEnd;return a&&il(a)&&(t.markerStartAngle=a.getLocalEulerAngles(),t.appendChild(a)),s&&il(s)&&(t.markerEndAngle=s.getLocalEulerAngles(),t.appendChild(s)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"attributeChangedCallback",value:function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&il(r)&&(this.markerStartAngle=0,r.remove()),i&&il(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&il(r)&&(this.markerEndAngle=0,r.remove()),i&&il(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var e=this.parsedStyle,n=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,o=e.markerEndOffset,a=e.x1,s=e.x2,c=e.y1,l=e.y2,u=t?n:r;if(u&&il(u)){var f,h,d,p,g,y,v;t?(p=a,g=c,h=s-a,d=l-c,y=i||0,v=this.markerStartAngle):(p=s,g=l,h=a-s,d=c-l,y=o||0,v=this.markerEndAngle),f=Math.atan2(d,h),u.setLocalEulerAngles(180*f/Math.PI+v),u.setLocalPosition(p+Math.cos(f)*y,g+Math.sin(f)*y)}}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,s=tr(r,i,o,a,t),c=s.x,l=s.y,u=ft(K(),tt(c,l,0),e?this.getWorldTransform():this.getLocalTransform());return new Pr(u[0],u[1])}},{key:"getPointAtLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(t/this.getTotalLength(),e)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle;return Jn(t.x1,t.y1,t.x2,t.y2)}}])}(ll);bl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var xl=["style"],wl=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,pr.Z)(n,xl);(0,W.Z)(this,e),(t=(0,q.Z)(this,e,[(0,Z.Z)({type:vr.PATH,style:r,initialParsedStyle:{miterLimit:4,d:(0,Z.Z)({},ui)}},i)])).markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var o=t.parsedStyle,a=o.markerStart,s=o.markerEnd,c=o.markerMid;return a&&il(a)&&(t.markerStartAngle=a.getLocalEulerAngles(),t.appendChild(a)),c&&il(c)&&t.placeMarkerMid(c),s&&il(s)&&(t.markerEndAngle=s.getLocalEulerAngles(),t.appendChild(s)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"attributeChangedCallback",value:function(t,e,n,r,i){"d"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&il(r)&&(this.markerStartAngle=0,r.remove()),i&&il(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&il(r)&&(this.markerEndAngle=0,r.remove()),i&&il(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(t){var e=this.parsedStyle,n=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,o=e.markerEndOffset,a=t?n:r;if(a&&il(a)){var s,c,l,u,f,h,d;if(t){var p=this.getStartTangent(),g=(0,H.Z)(p,2),y=g[0],v=g[1];u=v[0],f=v[1],c=y[0]-v[0],l=y[1]-v[1],h=i||0,d=this.markerStartAngle}else{var m=this.getEndTangent(),b=(0,H.Z)(m,2),x=b[0],w=b[1];u=w[0],f=w[1],c=x[0]-w[0],l=x[1]-w[1],h=o||0,d=this.markerEndAngle}s=Math.atan2(l,c),a.setLocalEulerAngles(180*s/Math.PI+d),a.setLocalPosition(u+Math.cos(s)*h,f+Math.sin(s)*h)}}},{key:"placeMarkerMid",value:function(t){var e=this.parsedStyle.d.segments;if(this.markerMidList.forEach((function(t){t.remove()})),t&&il(t))for(var n=1;n<e.length-1;n++){var r=(0,H.Z)(e[n].currentPoint,2),i=r[0],o=r[1],a=1===n?t:t.cloneNode(!0);this.markerMidList.push(a),this.appendChild(a),a.setLocalPosition(i,o)}}},{key:"getTotalLength",value:function(){return Jo(this)}},{key:"getPointAtLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle.d.absolutePath,r=Zn(n,t),i=r.x,o=r.y,a=ft(K(),tt(i,o,0),e?this.getWorldTransform():this.getLocalTransform());return new Pr(a[0],a[1])}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPointAtLength(t*Jo(this),e)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n}}])}(ll);wl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Ol=["style"],kl=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,i=(0,pr.Z)(n,Ol);(0,W.Z)(this,e),(t=(0,q.Z)(this,e,[(0,Z.Z)({type:vr.POLYGON,style:r,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i)])).markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var o=t.parsedStyle,a=o.markerStart,s=o.markerEnd,c=o.markerMid;return a&&il(a)&&(t.markerStartAngle=a.getLocalEulerAngles(),t.appendChild(a)),c&&il(c)&&t.placeMarkerMid(c),s&&il(s)&&(t.markerEndAngle=s.getLocalEulerAngles(),t.appendChild(s)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"attributeChangedCallback",value:function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&il(r)&&(this.markerStartAngle=0,r.remove()),i&&il(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&il(r)&&(this.markerEndAngle=0,r.remove()),i&&il(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(t){var e=this.parsedStyle,n=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,o=e.markerEndOffset,a=(e.points||{}).points,s=t?n:r;if(s&&il(s)&&a){var c,l,u,f,h,d,p;if(f=a[0][0],h=a[0][1],t)l=a[1][0]-a[0][0],u=a[1][1]-a[0][1],d=i||0,p=this.markerStartAngle;else{var g=a.length;this.parsedStyle.isClosed?(l=a[g-1][0]-a[0][0],u=a[g-1][1]-a[0][1]):(f=a[g-1][0],h=a[g-1][1],l=a[g-2][0]-a[g-1][0],u=a[g-2][1]-a[g-1][1]),d=o||0,p=this.markerEndAngle}c=Math.atan2(u,l),s.setLocalEulerAngles(180*c/Math.PI+p),s.setLocalPosition(f+Math.cos(c)*d,h+Math.sin(c)*d)}}},{key:"placeMarkerMid",value:function(t){var e=(this.parsedStyle.points||{}).points;if(this.markerMidList.forEach((function(t){t.remove()})),this.markerMidList=[],t&&il(t)&&e)for(var n=1;n<(this.parsedStyle.isClosed?e.length:e.length-1);n++){var r=e[n][0],i=e[n][1],o=1===n?t:t.cloneNode(!0);this.markerMidList.push(o),this.appendChild(o),o.setLocalPosition(r,i)}}}])}(ll);kl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Ml=["style"],_l=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.style,r=(0,pr.Z)(t,Ml);return(0,W.Z)(this,e),(0,q.Z)(this,e,[(0,Z.Z)({type:vr.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r)])}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"getTotalLength",value:function(){return ta(this)}},{key:"getPointAtLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(t/this.getTotalLength(),e)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle.points.points;if(0===this.parsedStyle.points.segments.length){var r,i,o=[],a=0,s=this.getTotalLength();n.forEach((function(t,e){n[e+1]&&((r=[0,0])[0]=a/s,i=Jn(t[0],t[1],n[e+1][0],n[e+1][1]),a+=i,r[1]=a/s,o.push(r))})),this.parsedStyle.points.segments=o}var c=0,l=0;this.parsedStyle.points.segments.forEach((function(e,n){t>=e[0]&&t<=e[1]&&(c=(t-e[0])/(e[1]-e[0]),l=n)}));var u=tr(n[l][0],n[l][1],n[l+1][0],n[l+1][1],c),f=u.x,h=u.y,d=ft(K(),tt(f,h,0),e?this.getWorldTransform():this.getLocalTransform());return new Pr(d[0],d[1])}},{key:"getStartTangent",value: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}},{key:"getEndTangent",value: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}}])}(kl);_l.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(kl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var El=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,W.Z)(this,e),(0,q.Z)(this,e,[(0,Z.Z)({type:vr.RECT},t)])}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ll);El.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var Sl=["style"],Al=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.style,r=(0,pr.Z)(t,Sl);return(0,W.Z)(this,e),(0,q.Z)(this,e,[(0,Z.Z)({type:vr.TEXT,style:(0,Z.Z)({fill:"black"},n)},r)])}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(ll);Al.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ll.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var jl=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.registry={},this.define(vr.CIRCLE,ul),this.define(vr.ELLIPSE,dl),this.define(vr.RECT,El),this.define(vr.IMAGE,vl),this.define(vr.LINE,bl),this.define(vr.GROUP,pl),this.define(vr.PATH,wl),this.define(vr.POLYGON,kl),this.define(vr.POLYLINE,_l),this.define(vr.TEXT,Al),this.define(vr.HTML,yl)}),[{key:"define",value:function(t,e){this.registry[t]=e}},{key:"get",value:function(t){return this.registry[t]}}])}(),Tl=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;Xc.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},Pl=function(t){function e(){var t;(0,W.Z)(this,e),(t=(0,q.Z)(this,e)).defaultView=null,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new Xc.AnimationTimeline(t)}catch(t){}var n={};return Za.forEach((function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=Fn(i)?i(vr.GROUP):i)})),t.documentElement=new pl({id:"g-root",style:n}),t.documentElement.ownerDocument=t,t.documentElement.parentNode=t,t.childNodes=[t.documentElement],t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?Al:pl);var r=new n(e);return r.ownerDocument=this,r}},{key:"createElementNS",value:function(t,e,n){return this.createElement(e,n)}},{key:"cloneNode",value:function(t){throw new Error(Rr)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}}},{key:"elementsFromBBox",value:function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach((function(t){var e=t.displayObject,n=e.parsedStyle.pointerEvents,r=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(void 0===n?"auto":n);(!r||r&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)})),o.sort((function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder})),o}},{key:"elementFromPointSync",value:function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,s=o.height;if(r<0||i<0||r>a||i>s)return null;var c=this.defaultView.viewport2Client({x:r,y:i}),l=c.x,u=c.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:l,clientY:u},picked:[]}).picked;return f&&f[0]||this.documentElement}},{key:"elementFromPoint",value:(r=(0,hr.Z)((0,fr.Z)().mark((function t(e,n){var r,i,o,a,s,c,l,u,f,h,d;return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,c=a.height,!(i<0||o<0||i>s||o>c)){t.next=1;break}return t.abrupt("return",null);case 1:return l=this.defaultView.viewport2Client({x:i,y:o}),u=l.x,f=l.y,t.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:u,clientY:f},picked:[]});case 2:return h=t.sent,d=h.picked,t.abrupt("return",d&&d[0]||this.documentElement);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"elementsFromPointSync",value:function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,s=o.height;if(r<0||i<0||r>a||i>s)return[];var c=this.defaultView.viewport2Client({x:r,y:i}),l=c.x,u=c.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:l,clientY:u},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f}},{key:"elementsFromPoint",value:(n=(0,hr.Z)((0,fr.Z)().mark((function t(e,n){var r,i,o,a,s,c,l,u,f,h,d;return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.defaultView.canvas2Viewport({x:e,y:n}),i=r.x,o=r.y,a=this.defaultView.getConfig(),s=a.width,c=a.height,!(i<0||o<0||i>s||o>c)){t.next=1;break}return t.abrupt("return",[]);case 1:return l=this.defaultView.viewport2Client({x:i,y:o}),u=l.x,f=l.y,t.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:i,viewportY:o,clientX:u,clientY:f},picked:[]});case 2:return h=t.sent,(d=h.picked)[d.length-1]!==this.documentElement&&d.push(this.documentElement),t.abrupt("return",d);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"appendChild",value:function(t,e){throw new Error(Lr)}},{key:"insertBefore",value:function(t,e){throw new Error(Lr)}},{key:"removeChild",value:function(t,e){throw new Error(Lr)}},{key:"replaceChild",value:function(t,e,n){throw new Error(Lr)}},{key:"append",value:function(){throw new Error(Lr)}},{key:"prepend",value:function(){throw new Error(Lr)}},{key:"getElementById",value:function(t){return this.documentElement.getElementById(t)}},{key:"getElementsByName",value:function(t){return this.documentElement.getElementsByName(t)}},{key:"getElementsByTagName",value:function(t){return this.documentElement.getElementsByTagName(t)}},{key:"getElementsByClassName",value:function(t){return this.documentElement.getElementsByClassName(t)}},{key:"querySelector",value:function(t){return this.documentElement.querySelector(t)}},{key:"querySelectorAll",value:function(t){return this.documentElement.querySelectorAll(t)}},{key:"find",value:function(t){return this.documentElement.find(t)}},{key:"findAll",value:function(t){return this.documentElement.findAll(t)}}]);var n,r}(hc),Cl=function(){function t(e){(0,W.Z)(this,t),this.strategies=e}return(0,$.Z)(t,[{key:"apply",value:function(e){var n=e.config,r=e.camera,i=e.renderingService,o=e.renderingContext,a=this.strategies;i.hooks.cull.tap(t.tag,(function(t){if(t){var e,i=t.cullable;if(0===a.length?i.visible=o.unculledEntities.indexOf(t.entity)>-1:i.visible=a.every((function(e){return e.isVisible(r,t)})),!t.isCulled()&&t.isVisible())return t;var s=!0===(null===(e=n.future)||void 0===e?void 0:e.experimentalCancelEventPropagation);return t.dispatchEvent(new uc(bc.CULLED),s,s),null}return t})),i.hooks.afterRender.tap(t.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))}}])}();Cl.tag="Culling";var Rl=function(){function t(){var e=this;(0,W.Z)(this,t),this.autoPreventDefault=!1,this.rootPointerEvent=new cc(null),this.rootWheelEvent=new lc(null),this.onPointerMove=function(t){var n,r=null===(n=e.context.renderingContext.root)||void 0===n||null===(n=n.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r.supportsTouchEvents||"touch"!==t.pointerType){var i,o=e.normalizeToPointerEvent(t,r),a=(0,dr.Z)(o);try{for(a.s();!(i=a.n()).done;){var s=i.value,c=e.bootstrapEvent(e.rootPointerEvent,s,r,t);e.context.eventService.mapEvent(c)}}catch(t){a.e(t)}finally{a.f()}e.setCursor(e.context.eventService.cursor)}},this.onClick=function(t){var n,r,i=null===(n=e.context.renderingContext.root)||void 0===n||null===(n=n.ownerDocument)||void 0===n?void 0:n.defaultView,o=e.normalizeToPointerEvent(t,i),a=(0,dr.Z)(o);try{for(a.s();!(r=a.n()).done;){var s=r.value,c=e.bootstrapEvent(e.rootPointerEvent,s,i,t);e.context.eventService.mapEvent(c)}}catch(t){a.e(t)}finally{a.f()}e.setCursor(e.context.eventService.cursor)}}return(0,$.Z)(t,[{key:"apply",value:function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler((function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null})),r.hooks.pointerWheel.tap(t.tag,(function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)})),r.hooks.pointerDown.tap(t.tag,(function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e=n.normalizeToPointerEvent(t,i);if(n.autoPreventDefault&&e[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();var r,o=(0,dr.Z)(e);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=n.bootstrapEvent(n.rootPointerEvent,a,i,t);n.context.eventService.mapEvent(s)}}catch(t){o.e(t)}finally{o.f()}n.setCursor(n.context.eventService.cursor)}})),r.hooks.pointerUp.tap(t.tag,(function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r=n.context.contextService.getDomElement(),o=n.context.eventService.isNativeEventFromCanvas(r,t)?"":"outside",a=n.normalizeToPointerEvent(t,i),s=(0,dr.Z)(a);try{for(s.s();!(e=s.n()).done;){var c=e.value,l=n.bootstrapEvent(n.rootPointerEvent,c,i,t);l.type+=o,n.context.eventService.mapEvent(l)}}catch(t){s.e(t)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}})),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,(function(t){var e,r=n.normalizeToPointerEvent(t,i),o=(0,dr.Z)(r);try{for(o.s();!(e=o.n()).done;){var a=e.value,s=n.bootstrapEvent(n.rootPointerEvent,a,i,t);n.context.eventService.mapEvent(s)}}catch(t){o.e(t)}finally{o.f()}n.setCursor(n.context.eventService.cursor)}))}},{key:"bootstrapEvent",value:function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var s=this.context.eventService.viewport2Canvas(t.viewport),c=s.x,l=s.y;return t.canvas.x=c,t.canvas.y=l,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=ys[t.type]||t.type),t}},{key:"normalizeWheelEvent",value:function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,s=o.y;return e.canvas.x=a,e.canvas.y=s,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e}},{key:"transferMouseData",value:function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=vs.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null}},{key:"setCursor",value:function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];Nn(i.button)&&(i.button=0),Nn(i.buttons)&&(i.buttons=1),Nn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),Nn(i.width)&&(i.width=i.radiusX||1),Nn(i.height)&&(i.height=i.radiusY||1),Nn(i.tiltX)&&(i.tiltX=0),Nn(i.tiltY)&&(i.tiltY=0),Nn(i.pointerType)&&(i.pointerType="touch"),Nn(i.pointerId)&&(i.pointerId=i.identifier||0),Nn(i.pressure)&&(i.pressure=i.force||.5),Nn(i.twist)&&(i.twist=0),Nn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;Nn(o.isPrimary)&&(o.isPrimary=!0),Nn(o.width)&&(o.width=1),Nn(o.height)&&(o.height=1),Nn(o.tiltX)&&(o.tiltX=0),Nn(o.tiltY)&&(o.tiltY=0),Nn(o.pointerType)&&(o.pointerType="mouse"),Nn(o.pointerId)&&(o.pointerId=1),Nn(o.pressure)&&(o.pressure=.5),Nn(o.twist)&&(o.twist=0),Nn(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n}}])}();Rl.tag="Event";var Ll=[vr.CIRCLE,vr.ELLIPSE,vr.IMAGE,vr.RECT,vr.LINE,vr.POLYLINE,vr.POLYGON,vr.TEXT,vr.PATH,vr.HTML],Nl=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t)}),[{key:"isVisible",value:function(t,e){var n,r=e.cullable;if(!r.enable)return!0;var i=e.getRenderBounds();if(Sr.isEmpty(i))return!1;var o=t.getFrustum(),a=null===(n=e.parentNode)||void 0===n||null===(n=n.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,i,a||jr.INDETERMINATE,o.planes),r.visible=r.visibilityPlaneMask!==jr.OUTSIDE,r.visible}},{key:"computeVisibilityWithPlaneMask",value:function(t,e,n,r){if(n===jr.OUTSIDE||n===jr.INSIDE)return n;for(var i=jr.INSIDE,o=Ll.indexOf(t.nodeName)>-1,a=0,s=r.length;a<s;++a){var c=1<<a;if(0!=(n&c)&&(!o||4!==a&&5!==a)){var l=r[a],u=l.normal,f=l.distance;if(ct(u,e.getPositiveFarPoint(r[a]))+f<0)return jr.OUTSIDE;ct(u,e.getNegativeFarPoint(r[a]))+f<0&&(i|=c)}}return i}}])}(),Il=function(){function t(){(0,W.Z)(this,t),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return(0,$.Z)(t,[{key:"apply",value:function(e){var n,r,i=this,o=e.config,a=e.renderingService,s=e.renderingContext,c=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=c;var u=function(t){a.dirtify()},f=function(t){i.syncTasks.set(t.target,t.detail.affectChildren),a.dirtify()},h=function(t){var e=t.target;Xc.enableSizeAttenuation&&Xc.styleValueRegistry.updateSizeAttenuation(e,l.getCamera().getZoom())},d=function(t){var e=t.target,n=e.rBushNode;null!=n&&n.aabb&&i.rBush.remove(n.aabb),i.syncTasks.delete(e),Xc.sceneGraphService.dirtyToRoot(e),a.dirtify()};a.hooks.init.tap(t.tag,(function(){l.addEventListener(bc.MOUNTED,h),l.addEventListener(bc.UNMOUNTED,d),l.addEventListener(bc.ATTR_MODIFIED,u),l.addEventListener(bc.BOUNDS_CHANGED,f)})),a.hooks.destroy.tap(t.tag,(function(){l.removeEventListener(bc.MOUNTED,h),l.removeEventListener(bc.UNMOUNTED,d),l.removeEventListener(bc.ATTR_MODIFIED,u),l.removeEventListener(bc.BOUNDS_CHANGED,f),i.syncTasks.clear()}));var p=null!==(n=Xc.globalThis.requestIdleCallback)&&void 0!==n?n:js.bind(Xc.globalThis),g=!0===(null===(r=o.future)||void 0===r?void 0:r.experimentalRICSyncRTree);a.hooks.endFrame.tap(t.tag,(function(){i.isFirstTimeRendering?(i.isFirstTimeRendering=!1,i.syncing=!0,p((function(){i.syncRTree(!0),i.isFirstTimeRenderingFinished=!0}))):g&&Xc.globalThis.requestIdleCallback&&Xc.globalThis.cancelIdleCallback?(Xc.globalThis.cancelIdleCallback(i.ricSyncRTreeId),i.ricSyncRTreeId=Xc.globalThis.requestIdleCallback((function(){return i.syncRTree()}))):i.syncRTree()}))}},{key:"syncNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.isConnected){var n=t.rBushNode;n.aabb&&this.rBush.remove(n.aabb);var r=t.getRenderBounds();if(r){var i=t.renderable;e&&(i.dirtyRenderBounds||(i.dirtyRenderBounds=new Sr),i.dirtyRenderBounds.update(r.center,r.halfExtents));var o=r.getMin(),a=(0,H.Z)(o,2),s=a[0],c=a[1],l=r.getMax(),u=(0,H.Z)(l,2),f=u[0],h=u[1];n.aabb||(n.aabb={}),n.aabb.displayObject=t,n.aabb.minX=s,n.aabb.minY=c,n.aabb.maxX=f,n.aabb.maxY=h}return n.aabb&&!(isNaN(n.aabb.maxX)||isNaN(n.aabb.maxX)||isNaN(n.aabb.minX)||isNaN(n.aabb.minY))?n.aabb:void 0}}},{key:"syncRTree",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||!this.syncing&&0!==this.syncTasks.size){this.syncing=!0;var n=[],r=new Set,i=function(i){if(!r.has(i)&&i.renderable){var o=t.syncNode(i,e);o&&(n.push(o),r.add(i))}};this.syncTasks.forEach((function(t,e){t&&e.forEach(i);for(var n=e;n;)i(n),n=n.parentElement})),this.rBush.load(n),n.length=0,this.syncing=!1}}}])}();Il.tag="Prepare";var Dl=function(t){return t.READY="ready",t.BEFORE_RENDER="beforerender",t.RERENDER="rerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize",t.DIRTY_RECTANGLE="dirtyrectangle",t.RENDERER_CHANGED="rendererchanged",t}({}),Bl=new uc(bc.MOUNTED),Fl=new uc(bc.UNMOUNTED),zl=new uc(Dl.BEFORE_RENDER),Zl=new uc(Dl.RERENDER),Wl=new uc(Dl.AFTER_RENDER),$l=function(t){function e(t){var n;(0,W.Z)(this,e),(n=(0,q.Z)(this,e)).Element=ll,n.inited=!1,n.context={};var r=t.container,i=t.canvas,o=t.renderer,a=t.width,s=t.height,c=t.background,l=t.cursor,u=t.supportsMutipleCanvasesInOneContainer,f=t.cleanUpOnDestroy,h=void 0===f||f,d=t.offscreenCanvas,p=t.devicePixelRatio,g=t.requestAnimationFrame,y=t.cancelAnimationFrame,v=t.createImage,m=t.supportsTouchEvents,b=t.supportsPointerEvents,x=t.isTouchEvent,w=t.isMouseEvent,O=t.dblClickSpeed,k=a,M=s,_=p||fs&&window.devicePixelRatio||1;return _=_>=1?Math.ceil(_):1,i&&(k=a||function(t){var e=gs(t,"width");return"auto"===e?t.offsetWidth:parseFloat(e)}(i)||i.width/_,M=s||function(t){var e=gs(t,"height");return"auto"===e?t.offsetHeight:parseFloat(e)}(i)||i.height/_),n.customElements=new jl,n.devicePixelRatio=_,n.requestAnimationFrame=null!=g?g:js.bind(Xc.globalThis),n.cancelAnimationFrame=null!=y?y:Ts.bind(Xc.globalThis),n.createImage=null!=v?v:function(){return new window.Image},n.supportsTouchEvents=null!=m?m:"ontouchstart"in Xc.globalThis,n.supportsPointerEvents=null!=b?b:!!Xc.globalThis.PointerEvent,n.isTouchEvent=null!=x?x:function(t){return n.supportsTouchEvents&&t instanceof Xc.globalThis.TouchEvent},n.isMouseEvent=null!=w?w:function(t){return!Xc.globalThis.MouseEvent||t instanceof Xc.globalThis.MouseEvent&&(!n.supportsPointerEvents||!(t instanceof Xc.globalThis.PointerEvent))},d&&(Xc.offscreenCanvas=d),n.document=new Pl,n.document.defaultView=n,u||function(t,e,n){if(t){var r="string"==typeof t?document.getElementById(t):t;us.has(r)&&us.get(r).destroy(n),us.set(r,e)}}(r,n,h),n.initRenderingContext((0,Z.Z)((0,Z.Z)({},t),{},{width:k,height:M,background:null!=c?c:"transparent",cursor:null!=l?l:"default",cleanUpOnDestroy:h,devicePixelRatio:_,requestAnimationFrame:n.requestAnimationFrame,cancelAnimationFrame:n.cancelAnimationFrame,createImage:n.createImage,supportsTouchEvents:n.supportsTouchEvents,supportsPointerEvents:n.supportsPointerEvents,isTouchEvent:n.isTouchEvent,isMouseEvent:n.isMouseEvent,dblClickSpeed:null!=O?O:200})),n.initDefaultCamera(k,M,o.clipSpaceNearZ),n.initRenderer(o,!0),n}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"initRenderingContext",value:function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(t,e,n){var r=this,i=new Xc.CameraContribution;i.clipSpaceNearZ=n,i.setType(Qr.EXPLORING,Jr.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),i.canvas=this,i.eventEmitter.on(ei,(function(){r.context.renderingContext.renderReasons.add(gc.CAMERA_CHANGED),Xc.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()})),this.context.camera=i}},{key:"updateSizeAttenuation",value:function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach((function(e){Xc.styleValueRegistry.updateSizeAttenuation(e,t)}))}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1?arguments[1]:void 0;Yi.clearCache();var r=!0===(null===(t=this.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation);n||this.dispatchEvent(new uc(Dl.BEFORE_DESTROY),r,r),this.frameId&&this.cancelAnimationFrame(this.frameId);var i=this.getRoot();e&&(this.unmountChildren(i),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),this.context.rBushRoot&&this.context.rBushRoot.clear(),n||this.dispatchEvent(new uc(Dl.AFTER_DESTROY),r,r);var o=function(t){t.currentTarget=null,t.manager=null,t.target=null,t.relatedNode=null};o(Bl),o(Fl),o(zl),o(Zl),o(Wl),o(al),o(tl),o(el),o(nl),Xc.textService.clearCache()}},{key:"changeSize",value:function(t,e){this.resize(t,e)}},{key:"resize",value:function(t,e){var n,r=this.context.config;r.width=t,r.height=e,this.getContextService().resize(t,e);var i=this.context.camera,o=i.getProjectionMode();i.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),o===ti.ORTHOGRAPHIC?i.setOrthographic(t/-2,t/2,e/2,e/-2,i.getNear(),i.getFar()):i.setAspect(t/e);var a=!0===(null===(n=r.future)||void 0===n?void 0:n.experimentalCancelEventPropagation);this.dispatchEvent(new uc(Dl.RESIZE,{width:t,height:e}),a,a)}},{key:"appendChild",value:function(t,e){return this.document.documentElement.appendChild(t,e)}},{key:"insertBefore",value:function(t,e){return this.document.documentElement.insertBefore(t,e)}},{key:"removeChild",value:function(t){return this.document.documentElement.removeChild(t)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(t){var e,n=this;t&&(zl.detail=t,Wl.detail=t);var r=!0===(null===(e=this.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation);this.dispatchEvent(zl,r,r),this.getRenderingService().render(this.getConfig(),t,(function(){n.dispatchEvent(Zl,r,r)})),this.dispatchEvent(Wl,r,r)}},{key:"run",value:function(){var t=this,e=function(n,r){t.render(r),t.frameId=t.requestAnimationFrame(e)};e()}},{key:"initRenderer",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new yr,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Rl,new Il,new Cl([new Nl])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService((0,Z.Z)((0,Z.Z)({},Xc),this.context)),this.context.renderingService=new yc(Xc,this.context),this.context.eventService=new dc(Xc,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,n,!0)):this.context.contextService.initAsync().then((function(){e.initRenderingService(t,n)})).catch((function(t){console.error(t)}))}},{key:"initRenderingService",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.context.renderingService.init((function(){var i;e.inited=!0;var o=!0===(null===(i=e.getConfig().future)||void 0===i?void 0:i.experimentalCancelEventPropagation);n?r?e.requestAnimationFrame((function(){e.dispatchEvent(new uc(Dl.READY),o,o)})):e.dispatchEvent(new uc(Dl.READY),o,o):e.dispatchEvent(new uc(Dl.RENDERER_CHANGED),o,o),e.readyPromise&&e.resolveReadyPromise(),n||e.getRoot().forEach((function(t){var e,n;null===(e=(n=t).dirty)||void 0===e||e.call(n,!0,!0)})),e.mountChildren(e.getRoot()),t.getConfig().enableAutoRendering&&e.run()}))}},{key:"loadRendererContainerModule",value:function(t){var e=this;t.getPlugins().forEach((function(t){t.context=e.context,t.init(Xc)}))}},{key:"setRenderer",value:function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),(0,G.Z)((null==n?void 0:n.getPlugins())||[]).reverse().forEach((function(t){t.destroy(Xc)})),this.initRenderer(t)}}},{key:"setCursor",value:function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)}},{key:"unmountChildren",value:function(t){var e=this;if(t.childNodes.forEach((function(t){e.unmountChildren(t)})),this.inited){if(t.isMutationObserved)t.dispatchEvent(Fl);else{var n,r=!0===(null===(n=this.getConfig().future)||void 0===n?void 0:n.experimentalCancelEventPropagation);Fl.target=t,this.dispatchEvent(Fl,!0,r)}t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()}},{key:"mountChildren",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ms(t);if(this.inited){if(!t.isConnected&&(t.ownerDocument=this.document,t.isConnected=!0,!n))if(t.isMutationObserved)t.dispatchEvent(Bl);else{var r,i=!0===(null===(r=this.getConfig().future)||void 0===r?void 0:r.experimentalCancelEventPropagation);Bl.target=t,this.dispatchEvent(Bl,!0,i)}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName);t.childNodes.forEach((function(t){e.mountChildren(t,n)})),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()}},{key:"mountFragment",value:function(t){this.mountChildren(t,!1)}},{key:"client2Viewport",value:function(t){return this.getEventService().client2Viewport(t)}},{key:"viewport2Client",value:function(t){return this.getEventService().viewport2Client(t)}},{key:"viewport2Canvas",value:function(t){return this.getEventService().viewport2Canvas(t)}},{key:"canvas2Viewport",value:function(t){return this.getEventService().canvas2Viewport(t)}},{key:"getPointByClient",value:function(t,e){return this.client2Viewport({x:t,y:e})}},{key:"getClientByPoint",value:function(t,e){return this.viewport2Client({x:t,y:e})}}])}(fc),Gl=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).landmarks=[],t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"rotate",value:function(t,e,n){if(this.relElevation=Nr(e),this.relAzimuth=Nr(t),this.relRoll=Nr(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Qr.EXPLORING){var r=we(xe(),[1,0,0],Fr((this.rotateWorld?1:-1)*this.relElevation)),i=we(xe(),[0,1,0],Fr((this.rotateWorld?1:-1)*this.relAzimuth)),o=we(xe(),[0,0,1],Fr(this.relRoll)),a=Oe(xe(),i,r);a=Oe(xe(),a,o);var s=Qt(wt(),a);Ct(this.matrix,this.matrix,[0,0,-this.distance]),Pt(this.matrix,this.matrix,s),Ct(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===Qr.ORBITING||this.type===Qr.EXPLORING?this._getPosition():this.type===Qr.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(t,e){var n=Dr(t,e,0),r=Q(this.position);return rt(r,r,at(K(),this.right,n[0])),rt(r,r,at(K(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this}},{key:"dolly",value:function(t){var e=this.forward,n=Q(this.position),r=this.dollyingStep,i=this.distance+t*this.dollyingStep;return r=Math.max(Math.min(i,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===Qr.ORBITING||this.type===Qr.EXPLORING?this._getDistance():this.type===Qr.TRACKING&&rt(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=o.position,s=void 0===a?this.position:a,c=o.focalPoint,l=void 0===c?this.focalPoint:c,u=o.roll,f=o.zoom,h=new Xc.CameraContribution;h.setType(this.type,void 0),h.setPosition(s[0],null!==(e=s[1])&&void 0!==e?e:this.position[1],null!==(n=s[2])&&void 0!==n?n:this.position[2]),h.setFocalPoint(l[0],null!==(r=l[1])&&void 0!==r?r:this.focalPoint[1],null!==(i=l[2])&&void 0!==i?i:this.focalPoint[2]),h.setRoll(null!=u?u:this.roll),h.setZoom(null!=f?f:this.zoom);var d={name:t,matrix:Ot(h.getWorldTransform()),right:Q(h.right),up:Q(h.up),forward:Q(h.forward),position:Q(h.getPosition()),focalPoint:Q(h.getFocalPoint()),distanceVector:Q(h.getDistanceVector()),distance:h.getDistance(),dollyingStep:h.getDollyingStep(),azimuth:h.getAzimuth(),elevation:h.getElevation(),roll:h.getRoll(),relAzimuth:h.relAzimuth,relElevation:h.relElevation,relRoll:h.relRoll,zoom:h.getZoom()};return this.landmarks.push(d),d}},{key:"gotoLandmark",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=$e(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=ze(n)?{duration:n}:n,o=i.easing,a=void 0===o?"linear":o,s=i.duration,c=void 0===s?100:s,l=i.easingFunction,u=void 0===l?void 0:l,f=i.onfinish,h=void 0===f?void 0:f,d=i.onframe,p=void 0===d?void 0:d,g=.01;this.cancelLandmarkAnimation();var y,v=r.position,m=r.focalPoint,b=r.zoom,x=r.roll,w=u||Xc.EasingFunction(a),O=function(){e.setFocalPoint(m),e.setPosition(v),e.setRoll(x),e.setZoom(b),e.computeMatrix(),e.triggerUpdate(),null==h||h()};if(0===c)return O();var k=function(t){void 0===y&&(y=t);var n=t-y;if(n>=c)O();else{var r,i,o=w(n/c),a=K(),s=K();if(ut(a,e.focalPoint,m,o),ut(s,e.position,v,o),i=e.roll*(1-o)+x*o,r=e.zoom*(1-o)+b*o,e.setFocalPoint(a),e.setPosition(s),e.setRoll(i),e.setZoom(r),yt(a,m)+yt(s,v)<=g&&void 0===b&&void 0===x)return O();e.computeMatrix(),e.triggerUpdate(),n<c&&(null==p||p(o),e.landmarkAnimationID=e.canvas.requestAnimationFrame(k))}};this.canvas.requestAnimationFrame(k)}}}])}(ri);Xc.CameraContribution=Gl;new WeakMap;var ql=function(t){function e(t,n,r,i){var o;return(0,W.Z)(this,e),(o=(0,q.Z)(this,e,[t])).currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return(0,Y.Z)(e,t),(0,$.Z)(e)}(ac),Yl=0,Hl=function(){return(0,$.Z)((function t(e,n){var r;(0,W.Z)(this,t),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=e,e.animation=this,this.timeline=n,this.id="".concat(Yl++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(r=this.effect)||void 0===r?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}),[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(t=Number(t),!isNaN(t)){var e;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate;this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=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}},{key:"updatePromises",value:function(){var t;if(null!==(t=this.effect.target)&&void 0!==t&&t.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var e=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==e&&("idle"===n?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===e?this.resolveReadyPromise():"pending"===n&&(this.readyPromise=void 0)),this.finishedPromise&&n!==e&&("idle"===n?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===n?this.resolveFinishedPromise():"finished"===e&&(this.finishedPromise=void 0)),this.oldPlayState=n,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var t=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var e=new ql(null,this,this.currentTime,null);setTimeout((function(){t.oncancel(e)}))}}},{key:"reverse",value:function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()}},{key:"updatePlaybackRate",value:function(t){this.playbackRate=t}},{key:"targetAnimations",value:function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()}},{key:"markTarget",value:function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)}},{key:"unmarkTarget",value:function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)}},{key:"tick",value:function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}}},{key:"persist",value:function(){throw new Error(Rr)}},{key:"addEventListener",value:function(t,e,n){throw new Error(Rr)}},{key:"removeEventListener",value:function(t,e,n){throw new Error(Rr)}},{key:"dispatchEvent",value:function(t){throw new Error(Rr)}},{key:"commitStyles",value:function(){throw new Error(Rr)}},{key:"ensureAlive",value:function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null===(t=this.effect)||void 0===t||!t.update(-1)):this._inEffect=!(null===(e=this.effect)||void 0===e||!e.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new ql(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new ql(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}}}])}(),Vl=.1,Ul="function"==typeof Float32Array,Xl=function(t,e){return 1-3*e+3*t},Kl=function(t,e){return 3*e-6*t},Ql=function(t){return 3*t},Jl=function(t,e,n){return((Xl(e,n)*t+Kl(e,n))*t+Ql(e))*t},tu=function(t,e,n){return 3*Xl(e,n)*t*t+2*Kl(e,n)*t+Ql(e)},eu=function(t,e,n,r){if(!(t>=0&&t<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=Ul?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=Jl(o*Vl,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=Vl;--o;var a=r+(e-i[o])/(i[o+1]-i[o])*Vl,s=tu(a,t,n);return s>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=tu(e,n,r);if(0===o)return e;e-=(Jl(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=Jl(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+Vl,t,n)};return function(t){return 0===t||1===t?t:Jl(a(t),e,r)}},nu=function(t){return Math.pow(t,2)},ru=function(t){return Math.pow(t,3)},iu=function(t){return Math.pow(t,4)},ou=function(t){return Math.pow(t,5)},au=function(t){return Math.pow(t,6)},su=function(t){return 1-Math.cos(t*Math.PI/2)},cu=function(t){return 1-Math.sqrt(1-t*t)},lu=function(t){return t*t*(3*t-2)},uu=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},fu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,H.Z)(e,2),r=n[0],i=void 0===r?1:r,o=n[1],a=void 0===o?.5:o,s=Ge(Number(i),1,10),c=Ge(Number(a),.1,2);return 0===t||1===t?t:-s*Math.pow(2,10*(t-1))*Math.sin((t-1-c/(2*Math.PI)*Math.asin(1/s))*(2*Math.PI)/c)},hu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=(0,H.Z)(e,4),i=r[0],o=void 0===i?1:i,a=r[1],s=void 0===a?100:a,c=r[2],l=void 0===c?10:c,u=r[3],f=void 0===u?0:u;o=Ge(o,.1,1e3),s=Ge(s,.1,1e3),l=Ge(l,.1,1e3),f=Ge(f,.1,1e3);var h=Math.sqrt(s/o),d=l/(2*Math.sqrt(s*o)),p=d<1?h*Math.sqrt(1-d*d):0,g=1,y=d<1?(d*h-f)/p:-f+h,v=n?n*t/1e3:t;return v=d<1?Math.exp(-v*d*h)*(g*Math.cos(p*v)+y*Math.sin(p*v)):(g+y*v)*Math.exp(-v*h),0===t||1===t?t:1-v},du=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e,r=(0,H.Z)(n,2),i=r[0],o=void 0===i?10:i,a=r[1],s="start"===a?Math.ceil:Math.floor;return s(Ge(t,0,1)*o)/o},pu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,H.Z)(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return eu(r,i,o,a)(t)},gu=eu(.42,0,1,1),yu=function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return 1-t(1-e,n,r)}},vu=function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},mu=function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},bu={steps:du,"step-start":function(t){return du(t,[1,"start"])},"step-end":function(t){return du(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":pu,ease:function(t){return pu(t,[.25,.1,.25,1])},in:gu,out:yu(gu),"in-out":vu(gu),"out-in":mu(gu),"in-quad":nu,"out-quad":yu(nu),"in-out-quad":vu(nu),"out-in-quad":mu(nu),"in-cubic":ru,"out-cubic":yu(ru),"in-out-cubic":vu(ru),"out-in-cubic":mu(ru),"in-quart":iu,"out-quart":yu(iu),"in-out-quart":vu(iu),"out-in-quart":mu(iu),"in-quint":ou,"out-quint":yu(ou),"in-out-quint":vu(ou),"out-in-quint":mu(ou),"in-expo":au,"out-expo":yu(au),"in-out-expo":vu(au),"out-in-expo":mu(au),"in-sine":su,"out-sine":yu(su),"in-out-sine":vu(su),"out-in-sine":mu(su),"in-circ":cu,"out-circ":yu(cu),"in-out-circ":vu(cu),"out-in-circ":mu(cu),"in-back":lu,"out-back":yu(lu),"in-out-back":vu(lu),"out-in-back":mu(lu),"in-bounce":uu,"out-bounce":yu(uu),"in-out-bounce":vu(uu),"out-in-bounce":mu(uu),"in-elastic":fu,"out-elastic":yu(fu),"in-out-elastic":vu(fu),"out-in-elastic":mu(fu),spring:hu,"spring-in":hu,"spring-out":yu(hu),"spring-in-out":vu(hu),"spring-out-in":mu(hu)},xu=function(t){return t};function wu(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var Ou="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",ku=new RegExp("cubic-bezier\\(".concat(Ou,",").concat(Ou,",").concat(Ou,",").concat(Ou,"\\)")),Mu=/steps\(\s*(\d+)\s*\)/,_u=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Eu(t){var e=ku.exec(t);if(e)return eu.apply(void 0,(0,G.Z)(e.slice(1).map(Number)));var n=Mu.exec(t);if(n)return wu(Number(n[1]),0);var r=_u.exec(t);return r?wu(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):bu[function(t){return function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?t.substring(1):t}(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||bu.linear}function Su(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function Au(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),c=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),l=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,c,s);return n.currentIteration=c,n.progress=l,n.easingFunction(l)}function ju(t,e,n){var r=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(Tu(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Eu(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,s=o+1,c=i[a].computedOffset,l=i[s].computedOffset,u=c,f=l;0===o&&(u=-1/0,0===l&&(s=a)),o===i.length-2&&(f=1/0,1===c&&(a=s)),n.push({applyFrom:u,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:Cu(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&e<t.applyTo})).forEach((function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:r/i;t.setAttribute(n.property,n.interpolation(o),!1,!1)}));else for(var n in r)Tu(n)&&t.setAttribute(n,null)}}function Tu(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var Pu=function(t,e,n){return function(r){var i=Ru(t,e,r);return ze(i)?i:n(i)}};function Cu(t,e,n,r){var i=$a[t];if(i&&i.syntax&&i.int){var o=Xc.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=o.parser,s=a?a(e,r):e,c=a?a(n,r):n,l=o.mixer(s,c,r);if(l){var u=Pu.apply(void 0,(0,G.Z)(l));return function(t){return 0===t?e:1===t?n:u(t)}}}}return Pu(!1,!0,(function(t){return t?n:e}))}function Ru(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e||"string"==typeof t&&"string"==typeof e)return n<.5?t:e;if(Array.isArray(t)&&Array.isArray(e)){for(var r=t.length,i=e.length,o=Math.max(r,i),a=[],s=0;s<o;s++)a.push(Ru(t[s<r?s:r-1],e[s<i?s:i-1],n));return a}throw new Error("Mismatched interpolation arguments ".concat(t,":").concat(e))}var Lu=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=xu,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}),[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=Eu(t),this._easing=t}}])}();function Nu(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in null!=e&&e.composite&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(We(a))r=!1;else{if(a<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter((function(t){return Number(t.offset)>=0&&Number(t.offset)<=1})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var s=n[a].computedOffset;if(!We(s)&&!We(o)){for(var c=1;c<a-i;c++)n[i+c].computedOffset=o+(Number(s)-o)*c/(a-i);i=a,o=Number(s)}}}(),n}var Iu="backwards|forwards|both|none".split("|"),Du="reverse|alternate|alternate-reverse".split("|");function Bu(t,e){return function(t,e){var n=new Lu;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(void 0!==t[e]&&null!==t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===Iu.indexOf(t[e]))return;if("direction"===e&&-1===Du.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}(t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=t?t:{duration:"auto"}),e)}var Fu=function(){return(0,$.Z)((function t(e,n,r){var i=this;(0,W.Z)(this,t),this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=Bu(r,!1),this.timing.effect=this,this.timing.activeDuration=Su(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Nu(n,this.timing),this.interpolations=ju(this.normalizedKeyframes,this.timing,this.target);var o=Xc.globalThis.Proxy;this.computedTiming=o?new o(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?i.animation&&i.animation.currentTime||null:"currentIteration"===e?i.animation&&"running"===i.animation.playState?t.currentIteration||0:null:"progress"===e?i.animation&&"running"===i.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}}):this.timing}),[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(t){return null!==t&&(this.timeFraction=Au(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(t){this.normalizedKeyframes=Nu(t)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing[n]=t[n]}))}}])}();function zu(t,e){return Number(t.id)-Number(e.id)}var Zu=function(){return(0,$.Z)((function t(e){var n=this;(0,W.Z)(this,t),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(t){var e=n.rafCallbacks;n.rafCallbacks=[],t<Number(n.currentTime)&&(t=Number(n.currentTime)),n.animations.sort(zu),n.animations=n.tick(t,!0,n.animations)[0],e.forEach((function(e){e[1](t)})),n.applyPendingEffects()},this.document=e}),[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(t,e,n){var r=new Fu(t,e,n),i=new Hl(r,this);return this.animations.push(i),this.restartWebAnimationsNextTick(),i.updatePromises(),i.play(),i.updatePromises(),i}},{key:"applyDirtiedAnimation",value:function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(zu),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e}},{key:"requestAnimationFrame",value:function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))}},{key:"tick",value:function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],c=[],l=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?c.push(n):l.push(n)})),(r=this.pendingEffects).push.apply(r,a),(i=this.pendingEffects).push.apply(i,s),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[c,l]}}])}();Xc.EasingFunction=Eu,Xc.AnimationTimeline=Zu;var Wu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const $u=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];$u.style=["fill"];const Gu=$u.bind(void 0);Gu.style=["stroke","lineWidth"];const qu=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];qu.style=["fill"];const Yu=qu.bind(void 0);Yu.style=["fill"];const Hu=qu.bind(void 0);Hu.style=["stroke","lineWidth"];const Vu=(t,e,n)=>{const r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};Vu.style=["fill"];const Uu=Vu.bind(void 0);Uu.style=["stroke","lineWidth"];const Xu=(t,e,n)=>{const r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};Xu.style=["fill"];const Ku=Xu.bind(void 0);Ku.style=["stroke","lineWidth"];const Qu=(t,e,n)=>{const r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};Qu.style=["fill"];const Ju=Qu.bind(void 0);Ju.style=["stroke","lineWidth"];const tf=(t,e,n)=>{const 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"]]};tf.style=["fill"];const ef=tf.bind(void 0);ef.style=["stroke","lineWidth"];const nf=(t,e,n)=>{const 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"]]};nf.style=["fill"];const rf=nf.bind(void 0);rf.style=["stroke","lineWidth"];const of=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];of.style=["stroke","lineWidth"];const af=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];af.style=["stroke","lineWidth"];const sf=(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]];sf.style=["stroke","lineWidth"];const cf=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];cf.style=["stroke","lineWidth"];const lf=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];lf.style=["stroke","lineWidth"];const uf=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];uf.style=["stroke","lineWidth"];const ff=uf.bind(void 0);ff.style=["stroke","lineWidth"];const hf=(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]];hf.style=["stroke","lineWidth"];const df=(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]];df.style=["stroke","lineWidth"];const pf=(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]];pf.style=["stroke","lineWidth"];const gf=(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]];gf.style=["stroke","lineWidth"];const yf=(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]];yf.style=["stroke","lineWidth"];const vf=new Map([["bowtie",nf],["cross",af],["dash",ff],["diamond",Vu],["dot",uf],["hexagon",tf],["hollowBowtie",rf],["hollowDiamond",Uu],["hollowHexagon",ef],["hollowPoint",Gu],["hollowSquare",Hu],["hollowTriangle",Ku],["hollowTriangleDown",Ju],["hv",df],["hvh",gf],["hyphen",lf],["line",of],["plus",cf],["point",$u],["rect",Yu],["smooth",hf],["square",qu],["tick",sf],["triangleDown",Qu],["triangle",Xu],["vh",pf],["vhv",yf]]);const mf={};function bf(t,e){var n,r;t.startsWith("symbol.")?(n=t.split(".").pop(),r=e,vf.set(n,r)):Object.assign(mf,{[t]:e})}function xf(t,e){var n=e.cx,r=void 0===n?0:n,i=e.cy,o=void 0===i?0:i,a=e.r;t.arc(r,o,a,0,2*Math.PI,!1)}function wf(t,e){var n=e.cx,r=void 0===n?0:n,i=e.cy,o=void 0===i?0:i,a=e.rx,s=e.ry;if(t.ellipse)t.ellipse(r,o,a,s,0,0,2*Math.PI,!1);else{var c=a>s?a:s,l=a>s?1:a/s,u=a>s?s/a:1;t.save(),t.scale(l,u),t.arc(r,o,c,0,2*Math.PI)}}function Of(t,e){var n,r,i=e.x1,o=e.y1,a=e.x2,s=e.y2,c=e.markerStart,l=e.markerEnd,u=e.markerStartOffset,f=e.markerEndOffset,h=0,d=0,p=0,g=0,y=0;c&&il(c)&&u&&(n=a-i,r=s-o,y=Math.atan2(r,n),h=Math.cos(y)*(u||0),d=Math.sin(y)*(u||0)),l&&il(l)&&f&&(n=i-a,r=o-s,y=Math.atan2(r,n),p=Math.cos(y)*(f||0),g=Math.sin(y)*(f||0)),t.moveTo(i+h,o+d),t.lineTo(a+p,s+g)}function kf(t,e){var n,r,i=e.markerStart,o=e.markerEnd,a=e.markerStartOffset,s=e.markerEndOffset,c=e.d,l=c.absolutePath,u=c.segments,f=0,h=0,d=0,p=0,g=0;if(i&&il(i)&&a){var y=i.parentNode.getStartTangent(),v=(0,H.Z)(y,2),m=v[0],b=v[1];n=m[0]-b[0],r=m[1]-b[1],g=Math.atan2(r,n),f=Math.cos(g)*(a||0),h=Math.sin(g)*(a||0)}if(o&&il(o)&&s){var x=o.parentNode.getEndTangent(),w=(0,H.Z)(x,2),O=w[0],k=w[1];n=O[0]-k[0],r=O[1]-k[1],g=Math.atan2(r,n),d=Math.cos(g)*(s||0),p=Math.sin(g)*(s||0)}for(var M=0;M<l.length;M++){var _=l[M],E=_[0],S=l[M+1],A=0===M&&(0!==f||0!==h),j=(M===l.length-1||S&&("M"===S[0]||"Z"===S[0]))&&0!==d&&0!==p,T=A?[f,h]:[0,0],P=(0,H.Z)(T,2),C=P[0],R=P[1],L=j?[d,p]:[0,0],N=(0,H.Z)(L,2),I=N[0],D=N[1];switch(E){case"M":t.moveTo(_[1]+C,_[2]+R);break;case"L":t.lineTo(_[1]+I,_[2]+D);break;case"Q":t.quadraticCurveTo(_[1],_[2],_[3]+I,_[4]+D);break;case"C":t.bezierCurveTo(_[1],_[2],_[3],_[4],_[5]+I,_[6]+D);break;case"A":var B=u[M].arcParams,F=B.cx,z=B.cy,Z=B.rx,W=B.ry,$=B.startAngle,G=B.endAngle,q=B.xRotation,Y=B.sweepFlag;if(t.ellipse)t.ellipse(F,z,Z,W,q,$,G,!!(1-Y));else{var V=Z>W?Z:W,U=Z>W?1:Z/W,X=Z>W?W/Z:1;t.translate(F,z),t.rotate(q),t.scale(U,X),t.arc(0,0,V,$,G,!!(1-Y)),t.scale(1/U,1/X),t.rotate(-q),t.translate(-F,-z)}j&&t.lineTo(_[6]+d,_[7]+p);break;case"Z":t.closePath()}}}function Mf(t,e){var n,r,i=e.markerStart,o=e.markerEnd,a=e.markerStartOffset,s=e.markerEndOffset,c=e.points.points,l=c.length,u=c[0][0],f=c[0][1],h=c[l-1][0],d=c[l-1][1],p=0,g=0,y=0,v=0,m=0;i&&il(i)&&a&&(n=c[1][0]-c[0][0],r=c[1][1]-c[0][1],m=Math.atan2(r,n),p=Math.cos(m)*(a||0),g=Math.sin(m)*(a||0)),o&&il(o)&&s&&(n=c[l-1][0]-c[0][0],r=c[l-1][1]-c[0][1],m=Math.atan2(r,n),y=Math.cos(m)*(s||0),v=Math.sin(m)*(s||0)),t.moveTo(u+(p||y),f+(g||v));for(var b=1;b<l-1;b++){var x=c[b];t.lineTo(x[0],x[1])}t.lineTo(h,d)}function _f(t,e){var n,r,i=e.markerStart,o=e.markerEnd,a=e.markerStartOffset,s=e.markerEndOffset,c=e.points.points,l=c.length,u=c[0][0],f=c[0][1],h=c[l-1][0],d=c[l-1][1],p=0,g=0,y=0,v=0,m=0;i&&il(i)&&a&&(n=c[1][0]-c[0][0],r=c[1][1]-c[0][1],m=Math.atan2(r,n),p=Math.cos(m)*(a||0),g=Math.sin(m)*(a||0)),o&&il(o)&&s&&(n=c[l-2][0]-c[l-1][0],r=c[l-2][1]-c[l-1][1],m=Math.atan2(r,n),y=Math.cos(m)*(s||0),v=Math.sin(m)*(s||0)),t.moveTo(u+p,f+g);for(var b=1;b<l-1;b++){var x=c[b];t.lineTo(x[0],x[1])}t.lineTo(h+y,d+v)}function Ef(t,e){var n=e.x,r=void 0===n?0:n,i=e.y,o=void 0===i?0:i,a=e.radius,s=e.width,c=e.height,l=s,u=c,f=a&&a.some((function(t){return 0!==t}));if(f){var h=s>0?1:-1,d=c>0?1:-1,p=h+d===0,g=a.map((function(t){return Ge(t,0,Math.min(Math.abs(l)/2,Math.abs(u)/2))})),y=(0,H.Z)(g,4),v=y[0],m=y[1],b=y[2],x=y[3];t.moveTo(h*v+r,o),t.lineTo(l-h*m+r,o),0!==m&&t.arc(l-h*m+r,d*m+o,m,-d*Math.PI/2,h>0?0:Math.PI,p),t.lineTo(l+r,u-d*b+o),0!==b&&t.arc(l-h*b+r,u-d*b+o,b,h>0?0:Math.PI,d>0?Math.PI/2:1.5*Math.PI,p),t.lineTo(h*x+r,u+o),0!==x&&t.arc(h*x+r,u-d*x+o,x,d>0?Math.PI/2:-Math.PI/2,h>0?Math.PI:0,p),t.lineTo(r,d*v+o),0!==v&&t.arc(h*v+r,d*v+o,v,h>0?Math.PI:0,d>0?1.5*Math.PI:Math.PI/2,p)}else t.rect(r,o,l,u)}var Sf=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).name="canvas-path-generator",t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(){var t,e=(t={},(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,vr.CIRCLE,xf),vr.ELLIPSE,wf),vr.RECT,Ef),vr.LINE,Of),vr.POLYLINE,_f),vr.POLYGON,Mf),vr.PATH,kf),vr.TEXT,void 0),vr.GROUP,void 0),vr.IMAGE,void 0),(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,vr.HTML,void 0),vr.MESH,void 0),vr.FRAGMENT,void 0));this.context.pathGeneratorFactory=e}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(br),Af=K(),jf=K(),Tf=K(),Pf=wt(),Cf=function(){function t(){var e=this;(0,W.Z)(this,t),this.isHit=function(t,n,r,i){var o=e.context.pointInPathPickerFactory[t.nodeName];if(o){var a=At(Pf,r),s=ft(jf,nt(Tf,n[0],n[1],0),a);if(o(t,new Pr(s[0],s[1]),i,e.isPointInPath,e.context,e.runtime))return!0}return!1},this.isPointInPath=function(t,n){var r=e.runtime.offscreenCanvasCreator.getOrCreateContext(e.context.config.offscreenCanvas),i=e.context.pathGeneratorFactory[t.nodeName];return i&&(r.beginPath(),i(r,t.parsedStyle),r.closePath()),r.isPointInPath(n.x,n.y)}}return(0,$.Z)(t,[{key:"apply",value:function(e,n){var r,i=this,o=e.renderingService,a=e.renderingContext;this.context=e,this.runtime=n;var s=null===(r=a.root)||void 0===r?void 0:r.ownerDocument;o.hooks.pick.tapPromise(t.tag,function(){var t=(0,hr.Z)((0,fr.Z)().mark((function t(e){return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.pick(s,e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o.hooks.pickSync.tap(t.tag,(function(t){return i.pick(s,t)}))}},{key:"pick",value:function(t,e){var n,r=e.topmost,i=e.position,o=i.x,a=i.y,s=nt(Af,o,a,0),c=t.elementsFromBBox(s[0],s[1],s[0],s[1]),l=[],u=(0,dr.Z)(c);try{for(u.s();!(n=u.n()).done;){var f=n.value,h=f.getWorldTransform();if(this.isHit(f,s,h,!1)){var d=ps(f);if(d){var p=d.parsedStyle.clipPath;if(this.isHit(p,s,p.getWorldTransform(),!0)){if(r)return e.picked=[f],e;l.push(f)}}else{if(r)return e.picked=[f],e;l.push(f)}}}}catch(t){u.e(t)}finally{u.f()}return e.picked=l,e}}])}();function Rf(t,e,n){var r=t.parsedStyle,i=r.cx,o=void 0===i?0:i,a=r.cy,s=void 0===a?0:a,c=r.r,l=r.fill,u=r.stroke,f=r.lineWidth,h=void 0===f?1:f,d=r.increasedLineWidthForHitTesting,p=void 0===d?0:d,g=r.pointerEvents,y=void 0===g?"auto":g,v=(h+p)/2,m=Hn(o,s,e.x,e.y),b=bs(y,l,u),x=(0,H.Z)(b,2),w=x[0],O=x[1];return w&&O||n?m<=c+v:w?m<=c:!!O&&(m>=c-v&&m<=c+v)}function Lf(t,e,n,r){return t/(n*n)+e/(r*r)}function Nf(t,e,n){var r=t.parsedStyle,i=r.cx,o=void 0===i?0:i,a=r.cy,s=void 0===a?0:a,c=r.rx,l=r.ry,u=r.fill,f=r.stroke,h=r.lineWidth,d=void 0===h?1:h,p=r.increasedLineWidthForHitTesting,g=void 0===p?0:p,y=r.pointerEvents,v=void 0===y?"auto":y,m=e.x,b=e.y,x=bs(v,u,f),w=(0,H.Z)(x,2),O=w[0],k=w[1],M=(d+g)/2,_=(m-o)*(m-o),E=(b-s)*(b-s);return O&&k||n?Lf(_,E,c+M,l+M)<=1:O?Lf(_,E,c,l)<=1:!!k&&(Lf(_,E,c-M,l-M)>=1&&Lf(_,E,c+M,l+M)<=1)}function If(t,e,n,r,i,o){return i>=t&&i<=t+n&&o>=e&&o<=e+r}function Df(t,e,n,r,i,o,a,s){var c=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI),l={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return Hn(l.x,l.y,a,s)<=o/2}function Bf(t,e,n,r,i,o,a){var s=Math.min(t,n),c=Math.max(t,n),l=Math.min(e,r),u=Math.max(e,r),f=i/2;return o>=s-f&&o<=c+f&&a>=l-f&&a<=u+f&&er(t,e,n,r,o,a)<=i/2}function Ff(t,e,n,r,i){var o=t.length;if(o<2)return!1;for(var a=0;a<o-1;a++){if(Bf(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,n,r))return!0}if(i){var s=t[0],c=t[o-1];if(Bf(s[0],s[1],c[0],c[1],e,n,r))return!0}return!1}Cf.tag="CanvasPicker";function zf(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Zf(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function Wf(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o=0;o<i;o++){var a=t[o],s=t[(o+1)%i];if(Zf(a,s,[e,n]))return!0;zf(a[1]-n)>0!=zf(s[1]-n)>0&&zf(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(r=!r)}return r}function $f(t,e,n){for(var r=!1,i=0;i<t.length;i++){if(r=Wf(t[i],e,n))break}return r}function Gf(t,e,n){var r=t.parsedStyle,i=r.x1,o=r.y1,a=r.x2,s=r.y2,c=r.lineWidth,l=void 0===c?1:c,u=r.increasedLineWidthForHitTesting,f=void 0===u?0:u,h=r.pointerEvents,d=bs(void 0===h?"auto":h,r.fill,r.stroke);return!(!(0,H.Z)(d,2)[1]&&!n||!l)&&Bf(i,o,a,s,l+f,e.x,e.y)}function qf(t,e,n,r,i,o){var a=t.parsedStyle,s=a.lineWidth,c=void 0===s?1:s,l=a.increasedLineWidthForHitTesting,u=void 0===l?0:l,f=a.stroke,h=a.fill,d=a.d,p=a.pointerEvents,g=void 0===p?"auto":p,y=d.segments,v=d.hasArc,m=d.polylines,b=d.polygons,x=bs(g,(null==b?void 0:b.length)&&h,f),w=(0,H.Z)(x,2),O=w[0],k=w[1],M=Jo(t),_=!1;return O||n?_=v?r(t,e):$f(b,e.x,e.y)||$f(m,e.x,e.y):((k||n)&&(_=function(t,e,n,r,i){for(var o=!1,a=e/2,s=0;s<t.length;s++){var c=t[s],l=c.currentPoint,u=c.params,f=c.prePoint,h=c.box;if(!h||If(h.x-a,h.y-a,h.width+e,h.height+e,n,r))switch(c.command){case"L":case"Z":if(o=Bf(f[0],f[1],l[0],l[1],e,n,r))return!0;break;case"Q":if(o=ur(f[0],f[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(o=or(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2)return!0;break;case"A":c.cubicParams||(c.cubicParams=Sn(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=c.cubicParams,p=f,g=0;g<d.length;g+=6){var y=or(p[0],p[1],d[g],d[g+1],d[g+2],d[g+3],d[g+4],d[g+5],n,r,i);if(p=[d[g+4],d[g+5]],o=y<=e/2)return!0}}}return o}(y,c+u,e.x,e.y,M)),_)}function Yf(t,e,n){var r=t.parsedStyle,i=r.stroke,o=r.fill,a=r.lineWidth,s=void 0===a?1:a,c=r.increasedLineWidthForHitTesting,l=void 0===c?0:c,u=r.points,f=r.pointerEvents,h=bs(void 0===f?"auto":f,o,i),d=(0,H.Z)(h,2),p=d[0],g=!1;return(d[1]||n)&&(g=Ff(u.points,s+l,e.x,e.y,!0)),g||!p&&!n||(g=Wf(u.points,e.x,e.y)),g}function Hf(t,e,n){var r=t.parsedStyle,i=r.lineWidth,o=void 0===i?1:i,a=r.increasedLineWidthForHitTesting,s=void 0===a?0:a,c=r.points,l=r.pointerEvents,u=bs(void 0===l?"auto":l,r.fill,r.stroke);return!(!(0,H.Z)(u,2)[1]&&!n||!o)&&Ff(c.points,o+s,e.x,e.y,!1)}function Vf(t,e,n,r,i){var o=t.parsedStyle,a=o.radius,s=o.fill,c=o.stroke,l=o.lineWidth,u=void 0===l?1:l,f=o.increasedLineWidthForHitTesting,h=void 0===f?0:f,d=o.x,p=void 0===d?0:d,g=o.y,y=void 0===g?0:g,v=o.width,m=o.height,b=o.pointerEvents,x=bs(void 0===b?"auto":b,s,c),w=(0,H.Z)(x,2),O=w[0],k=w[1],M=a&&a.some((function(t){return 0!==t})),_=u+h;if(M){var E=!1;return(k||n)&&(E=function(t,e,n,r,i,o,a,s){var c=(0,H.Z)(i,4),l=c[0],u=c[1],f=c[2],h=c[3];return Bf(t+l,e,t+n-u,e,o,a,s)||Bf(t+n,e+u,t+n,e+r-f,o,a,s)||Bf(t+n-f,e+r,t+h,e+r,o,a,s)||Bf(t,e+r-h,t,e+l,o,a,s)||Df(t+n-u,e+u,u,Math.PI,Math.PI,o,a,s)||Df(t+n-f,e+r-f,f,0,Math.PI,o,a,s)||Df(t+h,e+r-h,h,Math.PI,Math.PI,o,a,s)||Df(t+l,e+l,l,Math.PI,Math.PI,o,a,s)}(p,y,v,m,a.map((function(t){return Ge(t,0,Math.min(Math.abs(v)/2,Math.abs(m)/2))})),_,e.x,e.y)),E||!O&&!n||(E=r(t,e)),E}var S=_/2;return O&&k||n?If(p-S,y-S,v+S,m+S,e.x,e.y):O?If(p,y,v,m,e.x,e.y):!!k&&function(t,e,n,r,i,o,a){var s=i/2;return If(t-s,e-s,n,i,o,a)||If(t+n-s,e-s,i,r,o,a)||If(t+s,e+r-s,n,i,o,a)||If(t-s,e+s,i,r,o,a)}(p,y,v,m,_,e.x,e.y)}function Uf(t,e,n,r,i,o){var a=t.parsedStyle,s=a.pointerEvents,c=void 0===s?"auto":s,l=a.x,u=void 0===l?0:l,f=a.y,h=void 0===f?0:f,d=a.width,p=a.height;if("non-transparent-pixel"===c){var g=i.config.offscreenCanvas,y=o.offscreenCanvasCreator.getOrCreateCanvas(g),v=o.offscreenCanvasCreator.getOrCreateContext(g,{willReadFrequently:!0});return y.width=d,y.height=p,i.defaultStyleRendererFactory[vr.IMAGE].render(v,(0,Z.Z)((0,Z.Z)({},t.parsedStyle),{},{x:0,y:0}),t,void 0,void 0,void 0),v.getImageData(e.x-u,e.y-h,1,1).data.every((function(t){return 0!==t}))}return!0}function Xf(t,e,n,r){var i=t.getGeometryBounds();return e.x>=i.min[0]&&e.y>=i.min[1]&&e.x<=i.max[0]&&e.y<=i.max[1]}var Kf=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).name="canvas-picker",t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(){var t,e=(t={},(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,vr.CIRCLE,Rf),vr.ELLIPSE,Nf),vr.RECT,Vf),vr.LINE,Gf),vr.POLYLINE,Hf),vr.POLYGON,Yf),vr.PATH,qf),vr.TEXT,Xf),vr.GROUP,null),vr.IMAGE,Uf),(0,Wn.Z)((0,Wn.Z)(t,vr.HTML,null),vr.MESH,null));this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Cf)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(br);function Qf(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var Jf=0;function th(t){return"__private_"+Jf+++"_"+t}var eh=function(){return(0,$.Z)((function t(){(0,W.Z)(this,t),this.cacheStore=new Map}),[{key:"onRefAdded",value:function(t){}},{key:"has",value:function(t){return this.cacheStore.has(t)}},{key:"put",value:function(t,e,n){return!this.cacheStore.has(t)&&(this.cacheStore.set(t,{value:e,counter:new Set([n.entity])}),this.onRefAdded(n),!0)}},{key:"get",value:function(t,e){var n=this.cacheStore.get(t);return n?(n.counter.has(e.entity)||(n.counter.add(e.entity),this.onRefAdded(e)),n.value):null}},{key:"update",value:function(t,e,n){var r=this.cacheStore.get(t);return!!r&&(r.value=(0,Z.Z)((0,Z.Z)({},r.value),e),r.counter.has(n.entity)||(r.counter.add(n.entity),this.onRefAdded(n)),!0)}},{key:"release",value:function(t,e){var n=this.cacheStore.get(t);return!!n&&(n.counter.delete(e.entity),n.counter.size<=0&&this.cacheStore.delete(t),!0)}},{key:"releaseRef",value:function(t){var e=this;Array.from(this.cacheStore.keys()).forEach((function(n){e.release(n,t)}))}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),nh=[],rh=[],ih=function(){function t(){(0,W.Z)(this,t)}return(0,$.Z)(t,null,[{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.api;t.rafId&&(e.cancelAnimationFrame(t.rafId),t.rafId=null)}},{key:"executeTask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.api;nh.length<=0&&rh.length<=0||(rh.forEach((function(t){return t()})),rh=nh.splice(0,t.TASK_NUM_PER_FRAME),t.rafId=e.requestAnimationFrame((function(){t.executeTask(e)})))}},{key:"sliceImage",value:function(e,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t.api,s=e.naturalWidth||e.width,c=e.naturalHeight||e.height,l=n-o,u=r-o,f=Math.ceil(s/l),h=Math.ceil(c/u),d={tileSize:[n,r],gridSize:[h,f],tiles:Array(h).fill(null).map((function(){return Array(f).fill(null)}))},p=function(t){for(var o=function(o){nh.push((function(){var f=o*l,h=t*u,p=[Math.min(n,s-f),Math.min(r,c-h)],g=p[0],y=p[1],v=a.createCanvas();v.width=n,v.height=r,v.getContext("2d").drawImage(e,f,h,g,y,0,0,g,y),d.tiles[t][o]={x:f,y:h,tileX:o,tileY:t,data:v},i()}))},h=0;h<f;h++)o(h)},g=0;g<h;g++)p(g);return t.stop(),t.executeTask(),d}}])}();ih.TASK_NUM_PER_FRAME=10;var oh=new eh;oh.onRefAdded=function(t){var e=this;t.addEventListener(bc.DESTROY,(function(){e.releaseRef(t)}),{once:!0})};var ah=function(){return(0,$.Z)((function t(e,n){(0,W.Z)(this,t),this.gradientCache={},this.patternCache={},this.context=e,this.runtime=n}),[{key:"getImageSync",value:function(t,e,n){var r=$e(t)?t:t.src;if(oh.has(r)){var i=oh.get(r,e);if(i.img.complete)return null==n||n(i),i}return this.getOrCreateImage(t,e).then((function(t){null==n||n(t)})).catch((function(t){console.error(t)})),null}},{key:"getOrCreateImage",value:function(t,e){var n=this,r=$e(t)?t:t.src;if(!$e(t)&&!oh.has(r)){var i={img:t,size:[t.naturalWidth||t.width,t.naturalHeight||t.height],tileSize:sh(t)};oh.put(r,i,e)}if(oh.has(r)){var o=oh.get(r,e);return o.img.complete?Promise.resolve(o):new Promise((function(t,e){o.img.addEventListener("load",(function(){o.size=[o.img.naturalWidth||o.img.width,o.img.naturalHeight||o.img.height],o.tileSize=sh(o.img),t(o)})),o.img.addEventListener("error",(function(t){e(t)}))}))}return new Promise((function(t,i){var o=n.context.config.createImage();if(o){var a={img:o,size:[0,0],tileSize:sh(o)};oh.put(r,a,e),o.onload=function(){a.size=[o.naturalWidth||o.width,o.naturalHeight||o.height],a.tileSize=sh(a.img),t(a)},o.onerror=function(t){i(t)},o.crossOrigin="Anonymous",o.src=r}}))}},{key:"createDownSampledImage",value:(e=(0,hr.Z)((0,fr.Z)().mark((function t(e,n){var r,i,o,a,s,c,l,u,f,h,d,p,g,y;return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.getOrCreateImage(e,n);case 1:if(void 0===(r=t.sent).downSamplingRate){t.next=2;break}return t.abrupt("return",r);case 2:if(i=this.context.config.enableLargeImageOptimization,a=(o="boolean"==typeof i?{}:i).maxDownSampledImageSize,s=void 0===a?2048:a,c=o.downSamplingRateThreshold,l=void 0===c?.5:c,u=this.runtime.globalThis.createImageBitmap,f=(0,H.Z)(r.size,2),h=f[0],d=f[1],p=r.img,g=Math.min((s+s)/(h+d),Math.max(.01,Math.min(l,.5))),y=(0,Z.Z)((0,Z.Z)({},r),{},{downSamplingRate:g}),oh.update(r.img.src,y,n),!u){t.next=7;break}return t.prev=3,t.next=4,u(r.img,{resizeWidth:h*g,resizeHeight:d*g});case 4:p=t.sent,t.next=6;break;case 5:t.prev=5,t.catch(3),g=1;case 6:t.next=8;break;case 7:g=1;case 8:return y=(0,Z.Z)((0,Z.Z)({},this.getImageSync(e,n)),{},{downSampled:p,downSamplingRate:g}),oh.update(r.img.src,y,n),t.abrupt("return",y);case 9:case"end":return t.stop()}}),t,this,[[3,5]])}))),function(t,n){return e.apply(this,arguments)})},{key:"createImageTiles",value:(t=(0,hr.Z)((0,fr.Z)().mark((function t(e,n,r,i){var o,a,s,c,l;return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.getOrCreateImage(e,i);case 1:return o=t.sent,a=i.ownerDocument.defaultView,s=a.requestAnimationFrame,c=a.cancelAnimationFrame,ih.api={requestAnimationFrame:s,cancelAnimationFrame:c,createCanvas:function(){return pc.createCanvas()}},l=(0,Z.Z)((0,Z.Z)({},o),ih.sliceImage(o.img,o.tileSize[0],o.tileSize[0],r)),oh.update(o.img.src,l,i),t.abrupt("return",l);case 2:case"end":return t.stop()}}),t,this)}))),function(e,n,r,i){return t.apply(this,arguments)})},{key:"releaseImage",value:function(t,e){oh.release($e(t)?t:t.src,e)}},{key:"releaseImageRef",value:function(t){oh.releaseRef(t)}},{key:"getOrCreatePatternSync",value:function(t,e,n,r,i,o,a){var s=this.generatePatternKey(e);if(s&&this.patternCache[s])return this.patternCache[s];var c,l=e.image,u=e.repetition,f=e.transform,h=!1;if($e(l)){var d=this.getImageSync(l,t,a);c=null==d?void 0:d.img}else r?(c=r,h=!0):c=l;var p,g=c&&n.createPattern(c,u);g&&(p=f?Hs(Aa(f),new ll({})):Et(wt()),h&&Rt(p,p,[1/i,1/i,1]),g.setTransform({a:p[0],b:p[1],c:p[4],d:p[5],e:p[12]+o[0],f:p[13]+o[1]}));return s&&g&&(this.patternCache[s]=g),g}},{key:"getOrCreateGradient",value:function(t,e){var n=this.generateGradientKey(t),r=t.type,i=t.steps,o=t.min,a=t.width,s=t.height,c=t.angle,l=t.cx,u=t.cy,f=t.size;if(this.gradientCache[n])return this.gradientCache[n];var h=null;if(r===io.LinearGradient){var d=function(t,e,n,r){var i=Fr(r.value),o=0+e/2,a=0+n/2,s=Math.abs(e*Math.cos(i))+Math.abs(n*Math.sin(i));return{x1:t[0]+o-Math.cos(i)*s/2,y1:t[1]+a-Math.sin(i)*s/2,x2:t[0]+o+Math.cos(i)*s/2,y2:t[1]+a+Math.sin(i)*s/2}}(o,a,s,c),p=d.x1,g=d.y1,y=d.x2,v=d.y2;h=e.createLinearGradient(p,g,y,v)}else if(r===io.RadialGradient){var m=function(t,e,n,r,i,o){var a=r.value,s=i.value;r.unit===Hi.kPercentage&&(a=r.value/100*e),i.unit===Hi.kPercentage&&(s=i.value/100*n);var c=Math.max(Ze([0,0],[a,s]),Ze([0,n],[a,s]),Ze([e,n],[a,s]),Ze([e,0],[a,s]));return o&&(o instanceof co?c=o.value:o instanceof ao&&("closest-side"===o.value?c=Math.min(a,e-a,s,n-s):"farthest-side"===o.value?c=Math.max(a,e-a,s,n-s):"closest-corner"===o.value&&(c=Math.min(Ze([0,0],[a,s]),Ze([0,n],[a,s]),Ze([e,n],[a,s]),Ze([e,0],[a,s]))))),{x:a+t[0],y:s+t[1],r:c}}(o,a,s,l,u,f),b=m.x,x=m.y,w=m.r;h=e.createRadialGradient(b,x,0,b,x,w)}return h&&(i.forEach((function(t){var e,n=t.offset,r=t.color;n.unit===Hi.kPercentage&&(null===(e=h)||void 0===e||e.addColorStop(n.value/100,r.toString()))})),this.gradientCache[n]=h),this.gradientCache[n]}},{key:"generateGradientKey",value:function(t){var e=t.type,n=t.min,r=t.width,i=t.height,o=t.steps,a=t.angle,s=t.cx,c=t.cy,l=t.size;return"gradient-".concat(e,"-").concat((null==a?void 0:a.toString())||0,"-").concat((null==s?void 0:s.toString())||0,"-").concat((null==c?void 0:c.toString())||0,"-").concat((null==l?void 0:l.toString())||0,"-").concat(n[0],"-").concat(n[1],"-").concat(r,"-").concat(i,"-").concat(o.map((function(t){var e=t.offset,n=t.color;return"".concat(e).concat(n)})).join("-"))}},{key:"generatePatternKey",value:function(t){var e=t.image,n=t.repetition;return $e(e)?"pattern-".concat(e,"-").concat(n):"rect"===e.nodeName?"pattern-".concat(e.entity,"-").concat(n):void 0}}]);var t,e}();function sh(t){if(!t.complete)return[0,0];var e=t.naturalWidth||t.width,n=t.naturalHeight||t.height,r=256;return[256,512].forEach((function(t){Math.ceil(n/t)*Math.ceil(e/t)<1e3&&(r=t)})),[r,r]}ah.isSupportTile=!!pc.createCanvas();var ch=function(){function t(){(0,W.Z)(this,t)}return(0,$.Z)(t,[{key:"apply",value:function(e){var n=e.renderingService,r=e.renderingContext,i=e.imagePool,o=r.root.ownerDocument.defaultView,a=function(t,e,n){var r=t.parsedStyle,i=r.width,o=r.height;i&&!o?t.setAttribute("height",n/e*i):!i&&o&&t.setAttribute("width",e/n*o)},s=function(t){var e=t.target,r=e.nodeName,o=e.attributes;if(r===vr.IMAGE){var s=o.src,c=o.keepAspectRatio;i.getImageSync(s,e,(function(t){var r=t.img,i=r.width,o=r.height;c&&a(e,i,o),e.renderable.dirty=!0,n.dirtify()}))}},c=function(t){var e=t.target,r=t.attrName,o=t.prevValue,s=t.newValue;e.nodeName===vr.IMAGE&&"src"===r&&(o!==s&&i.releaseImage(o,e),$e(s)&&i.getOrCreateImage(s,e).then((function(t){var r=t.img,i=r.width,o=r.height;e.attributes.keepAspectRatio&&a(e,i,o),e.renderable.dirty=!0,n.dirtify()})).catch((function(){})))};n.hooks.init.tap(t.tag,(function(){o.addEventListener(bc.MOUNTED,s),o.addEventListener(bc.ATTR_MODIFIED,c)})),n.hooks.destroy.tap(t.tag,(function(){o.removeEventListener(bc.MOUNTED,s),o.removeEventListener(bc.ATTR_MODIFIED,c)}))}}])}();ch.tag="LoadImage";var lh=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).name="image-loader",t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(t){this.context.imagePool=new ah(this.context,t),this.addRenderingPlugin(new ch)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(br),uh=th("renderState"),fh=function(){function t(e){(0,W.Z)(this,t),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,uh,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=wt(),this.dprMatrix=wt(),this.tmpMat4=wt(),this.vec3a=K(),this.vec3b=K(),this.vec3c=K(),this.vec3d=K(),this.canvasRendererPluginOptions=e}return(0,$.Z)(t,[{key:"apply",value:function(e,n){var r=this;this.context=e;var i=this.context,o=i.config,a=i.camera,s=i.renderingService,c=i.renderingContext,l=i.rBushRoot,u=i.pathGeneratorFactory,f=o.renderer.getConfig().enableRenderingOptimization;o.renderer.getConfig().enableDirtyCheck=!1,o.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=l,this.pathGeneratorFactory=u;var h=e.contextService,d=c.root.ownerDocument.defaultView,p=function(t){var e=t.target.rBushNode;null!=e&&e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)},g=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)};s.hooks.init.tap(t.tag,(function(){d.addEventListener(bc.UNMOUNTED,p),d.addEventListener(bc.CULLED,g);var t=h.getDPR(),e=o.width,n=o.height,i=h.getContext();r.clearRect(i,0,0,e*t,n*t,o.background)})),s.hooks.destroy.tap(t.tag,(function(){d.removeEventListener(bc.UNMOUNTED,p),d.removeEventListener(bc.CULLED,g),r.renderQueue=[],r.removedRBushNodeAABBs=[],Qf(r,uh)[uh]={restoreStack:[],prevObject:null,currentContext:null}}));var y=function(t,e){for(var i=[t];i.length>0;){var o,a=i.pop();a.isVisible()&&!a.isCulled()&&(f?r.renderDisplayObjectOptimized(a,e,r.context,Qf(r,uh)[uh],n):r.renderDisplayObject(a,e,r.context,Qf(r,uh)[uh],n));for(var s=(null===(o=a.sortable)||void 0===o||null===(o=o.sorted)||void 0===o?void 0:o.length)>0?a.sortable.sorted:a.childNodes,c=s.length-1;c>=0;c--)i.push(s[c])}};s.hooks.endFrame.tap(t.tag,(function(){if(function(){var t,e=h.getContext(),n=h.getDPR(),i=o.width,a=o.height,c=r.canvasRendererPluginOptions,l=c.dirtyObjectNumThreshold,u=c.dirtyObjectRatioThreshold,f=s.getStats(),p=f.total,g=f.rendered,y=g/p;r.clearFullScreen=r.clearFullScreenLastFrame||!(null!==(t=d.context.renderingPlugins[1])&&void 0!==t&&t.isFirstTimeRenderingFinished)||s.disableDirtyRectangleRendering()||g>l&&y>u,e&&("function"==typeof e.resetTransform?e.resetTransform():e.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(e,0,0,i*n,a*n,o.background))}(),0!==c.root.childNodes.length){f=o.renderer.getConfig().enableRenderingOptimization,Qf(r,uh)[uh]={restoreStack:[],prevObject:null,currentContext:Qf(r,uh)[uh].currentContext},Qf(r,uh)[uh].currentContext.clear(),r.clearFullScreenLastFrame=!1;var t=h.getContext(),e=h.getDPR();if(Ft(r.dprMatrix,[e,e,1]),Pt(r.vpMatrix,r.dprMatrix,a.getOrthoMatrix()),r.clearFullScreen)f?(t.save(),y(c.root,t),t.restore()):y(c.root,t),r.removedRBushNodeAABBs=[];else{var i=r.safeMergeAABB.apply(r,[r.mergeDirtyAABBs(r.renderQueue)].concat((0,G.Z)(r.removedRBushNodeAABBs.map((function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY,o=new Sr;return o.setMinMax([e,n,0],[r,i,0]),o})))));if(r.removedRBushNodeAABBs=[],Sr.isEmpty(i))return void(r.renderQueue=[]);var l=r.convertAABB2Rect(i),u=l.x,p=l.y,g=l.width,v=l.height,m=ft(r.vec3a,[u,p,0],r.vpMatrix),b=ft(r.vec3b,[u+g,p,0],r.vpMatrix),x=ft(r.vec3c,[u,p+v,0],r.vpMatrix),w=ft(r.vec3d,[u+g,p+v,0],r.vpMatrix),O=Math.min(m[0],b[0],w[0],x[0]),k=Math.min(m[1],b[1],w[1],x[1]),M=Math.max(m[0],b[0],w[0],x[0]),_=Math.max(m[1],b[1],w[1],x[1]),E=Math.floor(O),S=Math.floor(k),A=Math.ceil(M-O),j=Math.ceil(_-k);t.save(),r.clearRect(t,E,S,A,j,o.background),t.beginPath(),t.rect(E,S,A,j),t.clip(),t.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]),o.renderer.getConfig().enableDirtyRectangleRenderingDebug&&d.dispatchEvent(new uc(Dl.DIRTY_RECTANGLE,{dirtyRect:{x:E,y:S,width:A,height:j}})),r.searchDirtyObjects(i).sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})).forEach((function(e){e&&e.isVisible()&&!e.isCulled()&&r.renderDisplayObject(e,t,r.context,Qf(r,uh)[uh],n)})),t.restore(),r.renderQueue.forEach((function(t){r.saveDirtyAABB(t)})),r.renderQueue=[]}Qf(r,uh)[uh].restoreStack.forEach((function(){t.restore()})),Qf(r,uh)[uh].restoreStack=[]}else r.clearFullScreenLastFrame=!0})),s.hooks.render.tap(t.tag,(function(t){r.clearFullScreen||r.renderQueue.push(t)}))}},{key:"clearRect",value:function(t,e,n,r,i,o){t.clearRect(e,n,r,i),o&&(t.fillStyle=o,t.fillRect(e,n,r,i))}},{key:"renderDisplayObjectOptimized",value:function(t,e,n,r,i){var o=t.nodeName,a=!1,s=this.context.styleRendererFactory[o],c=this.pathGeneratorFactory[o],l=t.parsedStyle.clipPath;if(l){(!r.prevObject||!ge(l.getWorldTransform(),r.prevObject.getWorldTransform()))&&(this.applyWorldTransform(e,l),r.prevObject=null);var u=this.pathGeneratorFactory[l.nodeName];u&&(e.save(),a=!0,e.beginPath(),u(e,l.parsedStyle),e.closePath(),e.clip())}if(s){(!r.prevObject||!ge(t.getWorldTransform(),r.prevObject.getWorldTransform()))&&this.applyWorldTransform(e,t);var f=!r.prevObject;if(!f){var h=r.prevObject.nodeName;f=o===vr.TEXT?h!==vr.TEXT:o===vr.IMAGE?h!==vr.IMAGE:h===vr.TEXT||h===vr.IMAGE}s.applyStyleToContext(e,t,f,r),r.prevObject=t}c&&(e.beginPath(),c(e,t.parsedStyle),o!==vr.LINE&&o!==vr.PATH&&o!==vr.POLYLINE&&e.closePath()),s&&s.drawToContext(e,t,Qf(this,uh)[uh],this,i),a&&e.restore(),t.dirty(!1)}},{key:"renderDisplayObject",value:function(t,e,n,r,i){var o=t.nodeName,a=r.restoreStack[r.restoreStack.length-1];!a||t.compareDocumentPosition(a)&hc.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.restoreStack.pop());var s=this.context.styleRendererFactory[o],c=this.pathGeneratorFactory[o],l=t.parsedStyle.clipPath;if(l){this.applyWorldTransform(e,l);var u=this.pathGeneratorFactory[l.nodeName];u&&(e.save(),r.restoreStack.push(t),e.beginPath(),u(e,l.parsedStyle),e.closePath(),e.clip())}s&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),c&&(e.beginPath(),c(e,t.parsedStyle),o!==vr.LINE&&o!==vr.PATH&&o!==vr.POLYLINE&&e.closePath()),s&&(s.render(e,t.parsedStyle,t,n,this,i),e.restore()),t.dirty(!1)}},{key:"applyAttributesToContext",value:function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,o=n.opacity,a=n.lineDash,s=n.lineDashOffset;a&&t.setLineDash(a),We(s)||(t.lineDashOffset=s),We(o)||(t.globalAlpha*=o),We(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),We(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)}},{key:"convertAABB2Rect",value:function(t){var e=t.getMin(),n=t.getMax(),r=Math.floor(e[0]),i=Math.floor(e[1]);return{x:r,y:i,width:Math.ceil(n[0])-r,height:Math.ceil(n[1])-i}}},{key:"mergeDirtyAABBs",value:function(t){var e=new Sr;return t.forEach((function(t){var n=t.getRenderBounds();e.add(n);var r=t.renderable.dirtyRenderBounds;r&&e.add(r)})),e}},{key:"searchDirtyObjects",value:function(t){var e=t.getMin(),n=(0,H.Z)(e,2),r=n[0],i=n[1],o=t.getMax(),a=(0,H.Z)(o,2),s=a[0],c=a[1];return this.rBush.search({minX:r,minY:i,maxX:s,maxY:c}).map((function(t){return t.displayObject}))}},{key:"saveDirtyAABB",value:function(t){var e=t.renderable;e.dirtyRenderBounds||(e.dirtyRenderBounds=new Sr);var n=t.getRenderBounds();n&&e.dirtyRenderBounds.update(n.center,n.halfExtents)}},{key:"applyWorldTransform",value:function(t,e,n){n?(kt(this.tmpMat4,e.getLocalTransform()),Pt(this.tmpMat4,n,this.tmpMat4),Pt(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(kt(this.tmpMat4,e.getWorldTransform()),Pt(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var t=new Sr,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){t.add(e)})),t}}])}();function hh(t,e,n,r,i,o,a){var s,c;if("rect"===t.image.nodeName){var l=t.image.parsedStyle,u=l.width,f=l.height;c=r.contextService.getDPR();var h=r.config.offscreenCanvas;(s=o.offscreenCanvasCreator.getOrCreateCanvas(h)).width=u*c,s.height=f*c;var d=o.offscreenCanvasCreator.getOrCreateContext(h),p={restoreStack:[],prevObject:null,currentContext:new Map};t.image.forEach((function(t){i.renderDisplayObject(t,d,r,p,o)})),p.restoreStack.forEach((function(){d.restore()}))}return a.getOrCreatePatternSync(e,t,n,s,c,e.getGeometryBounds().min,(function(){e.dirty(),r.renderingService.dirtify()}))}function dh(t,e,n,r){var i;if(t.type===io.LinearGradient||t.type===io.RadialGradient){var o=e.getGeometryBounds(),a=o&&2*o.halfExtents[0]||1,s=o&&2*o.halfExtents[1]||1,c=o&&o.min||[0,0];i=r.getOrCreateGradient((0,Z.Z)((0,Z.Z)({type:t.type},t.value),{},{min:c,width:a,height:s}),n)}return i}fh.tag="CanvasRenderer";var ph=["shadowBlur","shadowOffsetX","shadowOffsetY"],gh=["lineCap","lineJoin","miterLimit"],yh={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},vh={};function mh(t,e,n,r){var i=r.has(e)?r.get(e):yh[e];return i!==n&&("lineDash"===e?t.setLineDash(n):t[e]=n,r.set(e,n)),i}var bh=function(){return(0,$.Z)((function t(e){(0,W.Z)(this,t),this.imagePool=e}),[{key:"applyAttributesToContext",value:function(t,e){}},{key:"render",value:function(t,e,n,r,i,o){}},{key:"applyCommonStyleToContext",value:function(t,e,n,r){var i=n?vh:r.prevObject.parsedStyle,o=e.parsedStyle;(n||o.opacity!==i.opacity)&&mh(t,"globalAlpha",We(o.opacity)?yh.globalAlpha:o.opacity,r.currentContext),(n||o.blend!==i.blend)&&mh(t,"globalCompositeOperation",We(o.blend)?yh.globalCompositeOperation:o.blend,r.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(t,e,n,r){var i=n?vh:r.prevObject.parsedStyle,o=e.parsedStyle,a=o.lineWidth,s=void 0===a?yh.lineWidth:a,c=o.fill&&!o.fill.isNone;if(o.stroke&&!o.stroke.isNone&&s>0){if(n||e.attributes.stroke!==r.prevObject.attributes.stroke)mh(t,"strokeStyle",We(o.stroke)||Array.isArray(o.stroke)||o.stroke.isNone?yh.strokeStyle:e.attributes.stroke,r.currentContext);(n||o.lineWidth!==i.lineWidth)&&mh(t,"lineWidth",We(o.lineWidth)?yh.lineWidth:o.lineWidth,r.currentContext),(n||o.lineDash!==i.lineDash)&&mh(t,"lineDash",o.lineDash||yh.lineDash,r.currentContext),(n||o.lineDashOffset!==i.lineDashOffset)&&mh(t,"lineDashOffset",We(o.lineDashOffset)?yh.lineDashOffset:o.lineDashOffset,r.currentContext);for(var l=0;l<gh.length;l++){var u=gh[l];(n||o[u]!==i[u])&&mh(t,u,We(o[u])?yh[u]:o[u],r.currentContext)}}c&&(n||e.attributes.fill!==r.prevObject.attributes.fill)&&mh(t,"fillStyle",We(o.fill)||Array.isArray(o.fill)||o.fill.isNone?yh.fillStyle:e.attributes.fill,r.currentContext)}},{key:"applyStyleToContext",value:function(t,e,n,r){var i=e.nodeName;this.applyCommonStyleToContext(t,e,n,r),i===vr.IMAGE||this.applyStrokeFillStyleToContext(t,e,n,r)}},{key:"applyShadowAndFilterStyleToContext",value:function(t,e,n,r){var i=e.parsedStyle;if(n){mh(t,"shadowColor",i.shadowColor.toString(),r.currentContext);for(var o=0;o<ph.length;o++){var a=ph[o];mh(t,a,i[a]||yh[a],r.currentContext)}}i.filter&&i.filter.length&&mh(t,"filter",e.attributes.filter,r.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e){mh(t,"shadowColor",yh.shadowColor,r.currentContext);for(var o=0;o<ph.length;o++){var a=ph[o];mh(t,a,yh[a],r.currentContext)}}if(n)if(e&&i){var s=t.filter;!We(s)&&s.indexOf("drop-shadow")>-1&&mh(t,"filter",s.replace(/drop-shadow\([^)]*\)/,"").trim()||yh.filter,r.currentContext)}else mh(t,"filter",yh.filter,r.currentContext)}},{key:"fillToContext",value:function(t,e,n,r,i){var o=this,a=e.parsedStyle,s=a.fill,c=a.fillRule,l=null;if(Array.isArray(s)&&s.length>0)s.forEach((function(r){var i=mh(t,"fillStyle",dh(r,e,t,o.imagePool),n.currentContext);l=null!=l?l:i,c?t.fill(c):t.fill()}));else{if(jo(s)){var u=hh(s,e,t,e.ownerDocument.defaultView.context,r,i,this.imagePool);u&&(t.fillStyle=u,l=!0)}c?t.fill(c):t.fill()}null!==l&&mh(t,"fillStyle",l,n.currentContext)}},{key:"strokeToContext",value:function(t,e,n,r,i){var o=this,a=e.parsedStyle.stroke,s=null;if(Array.isArray(a)&&a.length>0)a.forEach((function(r){var i=mh(t,"strokeStyle",dh(r,e,t,o.imagePool),n.currentContext);s=null!=s?s:i,t.stroke()}));else{if(jo(a)){var c=hh(a,e,t,e.ownerDocument.defaultView.context,r,i,this.imagePool);if(c){var l=mh(t,"strokeStyle",c,n.currentContext);s=null!=s?s:l}}t.stroke()}null!==s&&mh(t,"strokeStyle",s,n.currentContext)}},{key:"drawToContext",value:function(t,e,n,r,i){var o,a=e.nodeName,s=e.parsedStyle,c=s.opacity,l=void 0===c?yh.globalAlpha:c,u=s.fillOpacity,f=void 0===u?yh.fillOpacity:u,h=s.strokeOpacity,d=void 0===h?yh.strokeOpacity:h,p=s.lineWidth,g=void 0===p?yh.lineWidth:p,y=s.fill&&!s.fill.isNone,v=s.stroke&&!s.stroke.isNone&&g>0;if(y||v){var m=!We(s.shadowColor)&&s.shadowBlur>0,b="inner"===s.shadowType,x=0===(null===(o=s.fill)||void 0===o?void 0:o.alpha),w=!(!s.filter||!s.filter.length),O=m&&v&&(a===vr.PATH||a===vr.LINE||a===vr.POLYLINE||x||b),k=null;if(y)O||this.applyShadowAndFilterStyleToContext(t,e,m,n),k=mh(t,"globalAlpha",l*f,n.currentContext),this.fillToContext(t,e,n,r,i),O||this.clearShadowAndFilterStyleForContext(t,m,w,n);if(v){var M=!1,_=mh(t,"globalAlpha",l*d,n.currentContext);if(k=y?k:_,O&&(this.applyShadowAndFilterStyleToContext(t,e,m,n),M=!0,b)){var E=t.globalCompositeOperation;t.globalCompositeOperation="source-atop",this.strokeToContext(t,e,n,r,i),t.globalCompositeOperation=E,this.clearShadowAndFilterStyleForContext(t,m,w,n,!0)}this.strokeToContext(t,e,n,r,i),M&&this.clearShadowAndFilterStyleForContext(t,m,w,n)}null!==k&&mh(t,"globalAlpha",k,n.currentContext)}}}])}(),xh=function(t){function e(){return(0,W.Z)(this,e),(0,q.Z)(this,e,arguments)}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"render",value:function(t,e,n,r,i,o){var a=e.fill,s=e.fillRule,c=e.opacity,l=void 0===c?1:c,u=e.fillOpacity,f=void 0===u?1:u,h=e.stroke,d=e.strokeOpacity,p=void 0===d?1:d,g=e.lineWidth,y=void 0===g?1:g,v=e.lineCap,m=e.lineJoin,b=e.shadowType,x=e.shadowColor,w=e.shadowBlur,O=e.filter,k=e.miterLimit,M=a&&!a.isNone,_=h&&!h.isNone&&y>0,E=0===(null==a?void 0:a.alpha),S=!(!O||!O.length),A=!We(x)&&w>0,j=n.nodeName,T="inner"===b,P=_&&A&&(j===vr.PATH||j===vr.LINE||j===vr.POLYLINE||E||T);M&&(t.globalAlpha=l*f,P||wh(n,t,A),Oh(t,n,a,s,r,i,o,this.imagePool),P||this.clearShadowAndFilter(t,S,A)),_&&(t.globalAlpha=l*p,t.lineWidth=y,We(k)||(t.miterLimit=k),We(v)||(t.lineCap=v),We(m)||(t.lineJoin=m),P&&(T&&(t.globalCompositeOperation="source-atop"),wh(n,t,!0),T&&(kh(t,n,h,r,i,o,this.imagePool),t.globalCompositeOperation=yh.globalCompositeOperation,this.clearShadowAndFilter(t,S,!0))),kh(t,n,h,r,i,o,this.imagePool))}},{key:"clearShadowAndFilter",value:function(t,e,n){if(n&&(t.shadowColor="transparent",t.shadowBlur=0),e){var r=t.filter;!We(r)&&r.indexOf("drop-shadow")>-1&&(t.filter=r.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(bh);function wh(t,e,n){var r=t.parsedStyle,i=r.filter,o=r.shadowColor,a=r.shadowBlur,s=r.shadowOffsetX,c=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=o.toString(),e.shadowBlur=a||0,e.shadowOffsetX=s||0,e.shadowOffsetY=c||0)}function Oh(t,e,n,r,i,o,a,s){var c=arguments.length>8&&void 0!==arguments[8]&&arguments[8];Array.isArray(n)?n.forEach((function(n){t.fillStyle=dh(n,e,t,s),c||(r?t.fill(r):t.fill())})):(jo(n)&&(t.fillStyle=hh(n,e,t,i,o,a,s)),c||(r?t.fill(r):t.fill()))}function kh(t,e,n,r,i,o,a){var s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];Array.isArray(n)?n.forEach((function(n){t.strokeStyle=dh(n,e,t,a),s||t.stroke()})):(jo(n)&&(t.strokeStyle=hh(n,e,t,r,i,o,a)),s||t.stroke())}var Mh=function(t){function e(){return(0,W.Z)(this,e),(0,q.Z)(this,e,arguments)}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"renderDownSampled",value:function(t,e,n,r){var i=r.src,o=r.imageCache;o.downSampled?t.drawImage(o.downSampled,Math.floor(r.drawRect[0]),Math.floor(r.drawRect[1]),Math.ceil(r.drawRect[2]),Math.ceil(r.drawRect[3])):this.imagePool.createDownSampledImage(i,n).then((function(){n.ownerDocument&&(n.dirty(),n.ownerDocument.defaultView.context.renderingService.dirtify())})).catch((function(t){console.error(t)}))}},{key:"renderTile",value:function(t,e,n,r){var i=r.src,o=r.imageCache,a=r.imageRect,s=r.drawRect,c=o.size,l=t.getTransform(),u=l.a,f=l.b,h=l.c,d=l.d,p=l.e,g=l.f;if(t.resetTransform(),null!=o&&o.gridSize){for(var y=[c[0]/a[2],c[1]/a[3]],v=[o.tileSize[0]/y[0],o.tileSize[1]/y[1]],m=[Math.floor((s[0]-a[0])/v[0]),Math.ceil((s[0]+s[2]-a[0])/v[0])],b=m[0],x=m[1],w=[Math.floor((s[1]-a[1])/v[1]),Math.ceil((s[1]+s[3]-a[1])/v[1])],O=w[1],k=w[0];k<=O;k++)for(var M=b;M<=x;M++){var _=o.tiles[k][M];if(_){var E=[Math.floor(a[0]+_.tileX*v[0]),Math.floor(a[1]+_.tileY*v[1]),Math.ceil(v[0]),Math.ceil(v[1])];t.drawImage(_.data,E[0],E[1],E[2],E[3])}}t.setTransform(u,f,h,d,p,g)}else this.imagePool.createImageTiles(i,[],(function(){n.ownerDocument&&(n.dirty(),n.ownerDocument.defaultView.context.renderingService.dirtify())}),n).catch((function(t){console.error(t)}))}},{key:"render",value:function(t,n,r){var i=n.x,o=void 0===i?0:i,a=n.y,s=void 0===a?0:a,c=n.width,l=n.height,u=n.src,f=n.shadowColor,h=n.shadowBlur,d=this.imagePool.getImageSync(u,r),p=null==d?void 0:d.img,g=c,y=l;if(p){g||(g=p.width),y||(y=p.height),wh(r,t,!We(f)&&h>0);try{var v=r.ownerDocument.defaultView.getContextService().getDomElement(),m=v.width,b=v.height,x=t.getTransform(),w=x.a,O=x.b,k=function(t,e){var n=ft(K(),[t[0],t[1],0],e),r=ft(K(),[t[0]+t[2],t[1],0],e),i=ft(K(),[t[0],t[1]+t[3],0],e),o=ft(K(),[t[0]+t[2],t[1]+t[3],0],e);return[Math.min(n[0],r[0],i[0],o[0]),Math.min(n[1],r[1],i[1],o[1]),Math.max(n[0],r[0],i[0],o[0])-Math.min(n[0],r[0],i[0],o[0]),Math.max(n[1],r[1],i[1],o[1])-Math.min(n[1],r[1],i[1],o[1])]}([o,s,g,y],Mt(w,x.c,0,0,O,x.d,0,0,0,0,1,0,x.e,x.f,0,1)),M=function(t,e){var n=(0,H.Z)(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=(0,H.Z)(e,4),c=s[0],l=s[1],u=s[2],f=s[3],h=Math.max(r,c),d=Math.max(i,l),p=Math.min(r+o,c+u),g=Math.min(i+a,l+f);return p<=h||g<=d?null:[h,d,p-h,g-d]}([0,0,m,b],k);if(!M)return;if(!r.ownerDocument.defaultView.getConfig().enableLargeImageOptimization)return void e.renderFull(t,n,r,{image:p,drawRect:[o,s,g,y]});if(k[2]/d.size[0]<(d.downSamplingRate||.5))return void this.renderDownSampled(t,n,r,{src:u,imageCache:d,drawRect:[o,s,g,y]});if(!ah.isSupportTile)return void e.renderFull(t,n,r,{image:p,drawRect:[o,s,g,y]});this.renderTile(t,n,r,{src:u,imageCache:d,imageRect:k,drawRect:M})}catch(t){}}}},{key:"drawToContext",value:function(t,e,n,r,i){this.render(t,e.parsedStyle,e)}}],[{key:"renderFull",value:function(t,e,n,r){t.drawImage(r.image,Math.floor(r.drawRect[0]),Math.floor(r.drawRect[1]),Math.ceil(r.drawRect[2]),Math.ceil(r.drawRect[3]))}}])}(xh),_h=function(t){function e(){return(0,W.Z)(this,e),(0,q.Z)(this,e,arguments)}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"render",value:function(t,e,n,r,i,o){n.getBounds();var a=e.lineWidth,s=void 0===a?1:a,c=e.textAlign,l=void 0===c?"start":c,u=e.textBaseline,f=void 0===u?"alphabetic":u,h=e.lineJoin,d=void 0===h?"miter":h,p=e.miterLimit,g=void 0===p?10:p,y=e.letterSpacing,v=void 0===y?0:y,m=e.stroke,b=e.fill,x=e.fillRule,w=e.fillOpacity,O=void 0===w?1:w,k=e.strokeOpacity,M=void 0===k?1:k,_=e.opacity,E=void 0===_?1:_,S=e.metrics,A=e.x,j=void 0===A?0:A,T=e.y,P=void 0===T?0:T,C=e.dx,R=e.dy,L=e.shadowColor,N=e.shadowBlur,I=S.font,D=S.lines,B=S.height,F=S.lineHeight,z=S.lineMetrics;t.font=I,t.lineWidth=s,t.textAlign="middle"===l?"center":l;var Z=f;"alphabetic"===Z&&(Z="bottom"),t.lineJoin=d,We(g)||(t.miterLimit=g);var W=P;"middle"===f?W+=-B/2-F/2:"bottom"===f||"alphabetic"===f||"ideographic"===f?W+=-B:"top"!==f&&"hanging"!==f||(W+=-F);var $=j+(C||0);W+=R||0,1===D.length&&("bottom"===Z?(Z="middle",W-=.5*B):"top"===Z&&(Z="middle",W+=.5*B)),t.textBaseline=Z,wh(n,t,!We(L)&&N>0);for(var G=0;G<D.length;G++){var q=s/2+$;W+=F,We(m)||m.isNone||!s||this.drawLetterSpacing(t,n,D[G],z[G],l,q,W,v,b,x,O,m,M,E,!0,r,i,o),We(b)||this.drawLetterSpacing(t,n,D[G],z[G],l,q,W,v,b,x,O,m,M,E,!1,r,i,o)}}},{key:"drawLetterSpacing",value:function(t,e,n,r,i,o,a,s,c,l,u,f,h,d,p,g,y,v){if(0!==s){var m=t.textAlign;t.textAlign="left";var b=o;"center"===i||"middle"===i?b=o-r.width/2:"right"!==i&&"end"!==i||(b=o-r.width);for(var x=Array.from(n),w=t.measureText(n).width,O=0,k=0;k<x.length;++k){var M=x[k];p?this.strokeText(t,e,M,b,a,f,h,g,y,v):this.fillText(t,e,M,b,a,c,l,u,d,g,y,v),b+=w-(O=t.measureText(n.substring(k+1)).width)+s,w=O}t.textAlign=m}else p?this.strokeText(t,e,n,o,a,f,h,g,y,v):this.fillText(t,e,n,o,a,c,l,u,d,g,y,v)}},{key:"fillText",value:function(t,e,n,r,i,o,a,s,c,l,u,f){var h;Oh(t,e,o,a,l,u,f,this.imagePool,!0);var d=!We(s)&&1!==s;d&&(h=t.globalAlpha,t.globalAlpha=s*c),t.fillText(n,r,i),d&&(t.globalAlpha=h)}},{key:"strokeText",value:function(t,e,n,r,i,o,a,s,c,l){var u;kh(t,e,o,s,c,l,this.imagePool,!0);var f=!We(a)&&1!==a;f&&(u=t.globalAlpha,t.globalAlpha=a),t.strokeText(n,r,i),f&&(t.globalAlpha=u)}},{key:"drawToContext",value:function(t,e,n,r,i){this.render(t,e.parsedStyle,e,e.ownerDocument.defaultView.context,r,i)}}])}(xh),Eh=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,W.Z)(this,e),(t=(0,q.Z)(this,e)).name="canvas-renderer",t.options=n,t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(){var t,e=(0,Z.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new xh(n),i=(t={},(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,vr.CIRCLE,r),vr.ELLIPSE,r),vr.RECT,r),vr.IMAGE,new Mh(n)),vr.TEXT,new _h(n)),vr.LINE,r),vr.POLYLINE,r),vr.POLYGON,r),vr.PATH,r),vr.GROUP,void 0),(0,Wn.Z)((0,Wn.Z)((0,Wn.Z)(t,vr.HTML,void 0),vr.MESH,void 0),vr.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new fh(e))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(br),Sh=function(){function t(){(0,W.Z)(this,t)}return(0,$.Z)(t,[{key:"apply",value:function(e,n){var r=this,i=e.renderingService,o=e.renderingContext,a=e.config;this.context=e;var s=o.root.ownerDocument.defaultView,c=function(t){i.hooks.pointerMove.call(t)},l=function(t){i.hooks.pointerUp.call(t)},u=function(t){i.hooks.pointerDown.call(t)},f=function(t){i.hooks.pointerOver.call(t)},h=function(t){i.hooks.pointerOut.call(t)},d=function(t){i.hooks.pointerCancel.call(t)},p=function(t){i.hooks.pointerWheel.call(t)},g=function(t){i.hooks.click.call(t)};i.hooks.init.tap(t.tag,(function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):s.supportsPointerEvents&&(t.style.touchAction="none"),s.supportsPointerEvents?function(t){n.globalThis.document.addEventListener("pointermove",c,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("pointerleave",h,!0),t.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",l,!0),n.globalThis.addEventListener("pointercancel",d,!0)}(t):function(t){n.globalThis.document.addEventListener("mousemove",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("mouseout",h,!0),t.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",l,!0)}(t),s.supportsTouchEvents&&function(t){t.addEventListener("touchstart",u,!0),t.addEventListener("touchend",l,!0),t.addEventListener("touchmove",c,!0),t.addEventListener("touchcancel",d,!0)}(t),a.useNativeClickEvent&&t.addEventListener("click",g,!0),t.addEventListener("wheel",p,{passive:!0,capture:!0})})),i.hooks.destroy.tap(t.tag,(function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):s.supportsPointerEvents&&(t.style.touchAction=""),s.supportsPointerEvents?function(t){n.globalThis.document.removeEventListener("pointermove",c,!0),t.removeEventListener("pointerdown",u,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",l,!0),n.globalThis.removeEventListener("pointercancel",d,!0)}(t):function(t){n.globalThis.document.removeEventListener("mousemove",c,!0),t.removeEventListener("mousedown",u,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",l,!0)}(t),s.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",u,!0),t.removeEventListener("touchend",l,!0),t.removeEventListener("touchmove",c,!0),t.removeEventListener("touchcancel",d,!0)}(t),a.useNativeClickEvent&&t.removeEventListener("click",g,!0),t.removeEventListener("wheel",p,!0)}))}}])}();Sh.tag="DOMInteraction";var Ah=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).name="dom-interaction",t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(){this.addRenderingPlugin(new Sh)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(br),jh=function(){function t(){(0,W.Z)(this,t),this.displayObjectHTMLElementMap=new WeakMap}return(0,$.Z)(t,[{key:"joinTransformMatrix",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return"matrix(".concat([t[0],t[1],t[4],t[5],t[12]+e[0],t[13]+e[1]].join(","),")")}},{key:"apply",value:function(e,n){var r=this,i=e.camera,o=e.renderingContext,a=e.renderingService;this.context=e;var s=o.root.ownerDocument.defaultView,c=s.context.eventService.nativeHTMLMap,l=function(t,e){e.style.transform=r.joinTransformMatrix(t.getWorldTransform(),t.getOrigin())},u=function(t){var e=t.target;if(e.nodeName===vr.HTML){r.$camera||(r.$camera=r.createCamera(i));var n=r.getOrCreateEl(e);r.$camera.appendChild(n),Object.keys(e.attributes).forEach((function(t){r.updateAttribute(t,e)})),l(e,n),c.set(n,e)}},f=function(t){var e=t.target;if(e.nodeName===vr.HTML&&r.$camera){var n=r.getOrCreateEl(e);n&&(n.remove(),c.delete(n))}},h=function(t){var e=t.target;if(e.nodeName===vr.HTML){var n=t.attrName;r.updateAttribute(n,e)}},d=function(t){var e=t.target;(e.nodeName===vr.FRAGMENT?e.childNodes:[e]).forEach((function(t){if(t.nodeName===vr.HTML){var e=r.getOrCreateEl(t);l(t,e)}}))},p=function(){if(r.$camera){var t=r.context.config,e=t.width,n=t.height;r.$camera.parentElement.style.width="".concat(e||0,"px"),r.$camera.parentElement.style.height="".concat(n||0,"px")}};a.hooks.init.tap(t.tag,(function(){s.addEventListener(Dl.RESIZE,p),s.addEventListener(bc.MOUNTED,u),s.addEventListener(bc.UNMOUNTED,f),s.addEventListener(bc.ATTR_MODIFIED,h),s.addEventListener(bc.BOUNDS_CHANGED,d)})),a.hooks.endFrame.tap(t.tag,(function(){r.$camera&&o.renderReasons.has(gc.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))})),a.hooks.destroy.tap(t.tag,(function(){r.$camera&&r.$camera.remove(),s.removeEventListener(Dl.RESIZE,p),s.removeEventListener(bc.MOUNTED,u),s.removeEventListener(bc.UNMOUNTED,f),s.removeEventListener(bc.ATTR_MODIFIED,h),s.removeEventListener(bc.BOUNDS_CHANGED,d)}))}},{key:"createCamera",value:function(t){var e=this.context.config,n=e.document,r=e.width,i=e.height,o=this.context.contextService.getDomElement(),a=o.parentNode;if(a){var s="g-canvas-camera",c=a.querySelector("#".concat(s));if(!c){var l=(n||document).createElement("div");l.style.overflow="hidden",l.style.pointerEvents="none",l.style.position="absolute",l.style.left="0px",l.style.top="0px",l.style.width="".concat(r||0,"px"),l.style.height="".concat(i||0,"px");var u=(n||document).createElement("div");c=u,u.id=s,u.style.position="absolute",u.style.left="".concat(o.offsetLeft||0,"px"),u.style.top="".concat(o.offsetTop||0,"px"),u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),u.style.pointerEvents="none",u.style.width="100%",u.style.height="100%",l.appendChild(u),a.appendChild(l)}return c}return null}},{key:"getOrCreateEl",value:function(t){var e=this.context.config.document,n=this.displayObjectHTMLElementMap.get(t);return n||(n=(e||document).createElement("div"),t.parsedStyle.$el=n,this.displayObjectHTMLElementMap.set(t,n),t.id&&(n.id=t.id),t.name&&n.setAttribute("name",t.name),t.className&&(n.className=t.className),n.style.position="absolute",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(t.getWorldTransform(),t.getOrigin())),n}},{key:"updateAttribute",value:function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;$e(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"x":n.style.left="".concat(e.parsedStyle.x,"px");break;case"y":n.style.top="".concat(e.parsedStyle.y,"px");break;case"transformOrigin":var i=e.parsedStyle.transformOrigin;n.style["transform-origin"]="".concat(i[0].buildCSSText(null,null,"")," ").concat(i[1].buildCSSText(null,null,""));break;case"width":var o=e.parsedStyle.width;n.style.width=ze(o)?"".concat(o,"px"):o.toString();break;case"height":var a=e.parsedStyle.height;n.style.height=ze(a)?"".concat(a,"px"):a.toString();break;case"zIndex":var s=e.parsedStyle.zIndex;n.style["z-index"]="".concat(s);break;case"visibility":var c=e.parsedStyle.visibility;n.style.visibility=c;break;case"pointerEvents":var l=e.parsedStyle.pointerEvents,u=void 0===l?"auto":l;n.style.pointerEvents=u;break;case"opacity":var f=e.parsedStyle.opacity;n.style.opacity="".concat(f);break;case"fill":var h=e.parsedStyle.fill,d="";To(h)?d=h.isNone?"transparent":e.getAttribute("fill"):Array.isArray(h)?d=e.getAttribute("fill"):jo(h),n.style.background=d;break;case"stroke":var p=e.parsedStyle.stroke,g="";To(p)?g=p.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(p)?g=e.getAttribute("stroke"):jo(p),n.style["border-color"]=g,n.style["border-style"]="solid";break;case"lineWidth":var y=e.parsedStyle.lineWidth;n.style["border-width"]="".concat(y||0,"px");break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":var v=e.style.filter;n.style.filter=v;break;default:We(e.style[t])||""===e.style[t]||(n.style[t]=e.style[t])}}}])}();jh.tag="HTMLRendering";var Th=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).name="html-renderer",t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(){this.addRenderingPlugin(new jh)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(br),Ph=function(){return(0,$.Z)((function t(e){(0,W.Z)(this,t),this.renderingContext=e.renderingContext,this.canvasConfig=e.config}),[{key:"init",value:function(){var t=this.canvasConfig,e=t.container,n=t.canvas;if(n)this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container;else if(e&&(this.$container=$e(e)?document.getElementById(e):e,this.$container)){var r=document.createElement("canvas");this.$container.appendChild(r),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=r}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(t,e){var n=this.canvasConfig.devicePixelRatio;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,function(t,e,n){fs&&t.style&&(t.style.width=e+"px",t.style.height=n+"px")}(this.$canvas,t,e)),this.renderingContext.renderReasons.add(gc.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)}},{key:"toDataURL",value:(t=(0,hr.Z)((0,fr.Z)().mark((function t(){var e,n,r,i=arguments;return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},n=e.type,r=e.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 1:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}]);var t}(),Ch=function(t){function e(){var t;(0,W.Z)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=(0,q.Z)(this,e,[].concat(r))).name="canvas-context-register",t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(){this.context.ContextService=Ph}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(br),Rh=function(t){function e(t){var n;return(0,W.Z)(this,e),(n=(0,q.Z)(this,e,[t])).registerPlugin(new Ch),n.registerPlugin(new lh),n.registerPlugin(new Sf),n.registerPlugin(new Eh),n.registerPlugin(new Ah),n.registerPlugin(new Kf),n.registerPlugin(new Th),n}return(0,Y.Z)(e,t),(0,$.Z)(e)}(xr),Lh=function(){function t(e){(0,W.Z)(this,t),this.dragndropPluginOptions=e}return(0,$.Z)(t,[{key:"apply",value:function(e){var n=this,r=e.renderingService,i=e.renderingContext.root.ownerDocument,o=i.defaultView,a=function(t){var e=t.target,r=e===i,a=r&&n.dragndropPluginOptions.isDocumentDraggable?i:e.closest&&e.closest("[draggable=true]");if(a){var s=!1,c=t.timeStamp,l=[t.clientX,t.clientY],u=null,f=[t.clientX,t.clientY],h=function(){var t=(0,hr.Z)((0,fr.Z)().mark((function t(o){var h,d,p,g,y,v;return(0,fr.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s){t.next=2;break}if(h=o.timeStamp-c,d=Ze([o.clientX,o.clientY],l),!(h<=n.dragndropPluginOptions.dragstartTimeThreshold||d<=n.dragndropPluginOptions.dragstartDistanceThreshold)){t.next=1;break}return t.abrupt("return");case 1:o.type="dragstart",a.dispatchEvent(o),s=!0;case 2:if(o.type="drag",o.dx=o.clientX-f[0],o.dy=o.clientY-f[1],a.dispatchEvent(o),f=[o.clientX,o.clientY],r){t.next=4;break}return p="pointer"===n.dragndropPluginOptions.overlap?[o.canvasX,o.canvasY]:e.getBounds().center,t.next=3,i.elementsFromPoint(p[0],p[1]);case 3:g=t.sent,y=g[g.indexOf(e)+1],v=(null==y?void 0:y.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?i:null),u!==v&&(u&&(o.type="dragleave",o.target=u,u.dispatchEvent(o)),v&&(o.type="dragenter",o.target=v,v.dispatchEvent(o)),(u=v)&&(o.type="dragover",o.target=u,u.dispatchEvent(o)));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();o.addEventListener("pointermove",h);var d=function(t){if(s){t.detail={preventClick:!0};var e=t.clone();u&&(e.type="drop",e.target=u,u.dispatchEvent(e)),e.type="dragend",a.dispatchEvent(e),s=!1}o.removeEventListener("pointermove",h)};e.addEventListener("pointerup",d,{once:!0}),e.addEventListener("pointerupoutside",d,{once:!0})}};r.hooks.init.tap(t.tag,(function(){o.addEventListener("pointerdown",a)})),r.hooks.destroy.tap(t.tag,(function(){o.removeEventListener("pointerdown",a)}))}}])}();Lh.tag="Dragndrop";var Nh=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,W.Z)(this,e),(t=(0,q.Z)(this,e)).name="dragndrop",t.options=n,t}return(0,Y.Z)(e,t),(0,$.Z)(e,[{key:"init",value:function(){this.addRenderingPlugin(new Lh((0,Z.Z)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)}}])}(br);var Ih=function(t,e,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||t.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,e),s&&t.apply(i,o)}},Dh=function(t,e,n){for(var r=0,i=$e(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};class Bh extends Map{constructor(t,e=Wh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Fh(this,t))}has(t){return super.has(Fh(this,t))}set(t,e){return super.set(zh(this,t),e)}delete(t){return super.delete(Zh(this,t))}}function Fh({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function zh({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Zh({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Wh(t){return null!==t&&"object"==typeof t?t.valueOf():t}function $h(t){return t}function Gh(t,...e){return Vh(t,$h,$h,e)}function qh(t,...e){return Vh(t,Array.from,$h,e)}function Yh(t,e,...n){return Vh(t,$h,e,n)}function Hh(t,e,...n){return Vh(t,Array.from,e,n)}function Vh(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);const a=new Bh,s=r[o++];let c=-1;for(const t of i){const e=s(t,++c,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(const[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}var Uh=function(t){return"object"==typeof t&&null!==t},Xh=function(t){if(!Uh(t)||!Dn(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function Kh(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}function Qh(t,e,n,r){for(var i in n=n||0,r=r||5,e)if(Kh(e,i)){var o=e[i];null!==o&&Xh(o)?(Xh(t[i])||(t[i]={}),n<r?Qh(t[i],o,n+1,r):t[i]=e[i]):xn(o)?(t[i]=[],t[i]=t[i].concat(o)):void 0!==o&&(t[i]=o)}}var Jh=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)Qh(t,e[r]);return t},td=function(t){return We(t)?"":t.toString()},ed=function(t){var e=td(t);return e.charAt(0).toLowerCase()+e.substring(1)};function nd({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function rd(t){return"object"==typeof t?t.valueOf():t}class id extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=rd,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(nd({map:this.map,initKey:this.initKey},t))}has(t){return super.has(nd({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class od{transformBreaks(t){return t}constructor(t){var e;this.options=Jh({},this.getDefaultOptions()),this.update((null===(e=null==t?void 0:t.breaks)||void 0===e?void 0:e.length)?this.transformBreaks(t):t)}getOptions(){return this.options}update(t={}){const e=t.breaks?this.transformBreaks(t):t;this.options=Jh({},this.options,e),this.rescale(e)}rescale(t){}}const ad=Symbol("defaultUnknown");function sd(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function cd(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t;let a=i.get(e);if(void 0===a){if(o!==ad)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function ld(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class ud extends od{getDefaultOptions(){return{domain:[],range:[],unknown:ad}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&sd(this.domainIndexMap,this.getDomain(),this.domainKey),cd({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&sd(this.rangeIndexMap,this.getRange(),this.rangeKey),cd({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=ld(e),this.rangeKey=ld(n),!this.rangeIndexMap)return this.rangeIndexMap=new Map,void(this.domainIndexMap=new Map);t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new ud(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}function fd(t){return Math.round(1e12*t)/1e12}function hd(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:s}=t,c=e.length,l=function(t,e){const n=e-t.length;return n>0?[...t,...new Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,c),[u,f]=n,h=f-u,d=h/(2/c*r+1-1/c*i),p=d*i/c,g=d-c*p,y=function(t){const e=t.reduce(((t,e)=>Math.min(t,e)),1/0);return e===1/0?[]:t.map((t=>t/e))}(l),v=y.reduce(((t,e)=>t+e)),m=g/v,b=new id(e.map(((t,e)=>{const n=y[e]*m;return[t,a?Math.floor(n):n]}))),x=new id(e.map(((t,e)=>{const n=y[e]*m+p;return[t,a?Math.floor(n):n]}))),w=Array.from(x.values()).reduce(((t,e)=>t+e)),O=u+(h-(w-w/c*i))*s;let k=a?Math.round(O):O;const M=new Array(c);for(let t=0;t<c;t+=1){M[t]=fd(k);const n=e[t];k+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:M}}class dd extends ud{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:ad,flex:[]}}constructor(t){super(t)}clone(){return new dd(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){const{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();const{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:s}=function(t){var e;const{domain:n}=t,r=n.length;if(0===r)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return hd(t);const{range:i,paddingOuter:o,paddingInner:a,round:s,align:c}=t;let l,u,f=i[0];const h=i[1]-f,d=2*o,p=r-a;l=h/Math.max(1,d+p),s&&(l=Math.floor(l)),f+=(h-l*(r-a))*c,u=l*(1-a),s&&(f=Math.round(f),u=Math.round(u));const g=new Array(r).fill(0).map(((t,e)=>f+e*l));return{valueStep:l,valueBandWidth:u,adjustedRange:g}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=s,this.valueBandWidth=a,this.adjustedRange=o}}const pd=Math.sqrt(50),gd=Math.sqrt(10),yd=Math.sqrt(2);function vd(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=pd?10:o>=gd?5:o>=yd?2:1)*10**i:-(10**-i)/(o>=pd?10:o>=gd?5:o>=yd?2:1)}function md(t,e,n){const r=Math.abs(e-t)/Math.max(0,n);let i=10**Math.floor(Math.log(r)/Math.LN10);const o=r/i;return o>=pd?i*=10:o>=gd?i*=5:o>=yd&&(i*=2),e<t?-i:i}const bd=(t,e,n,r)=>{let i,o,a=t,s=e;if(a===s&&n>0)return[a];let c=vd(a,s,n);if(0===c||!Number.isFinite(c))return[];if(c>0){a=Math.ceil(a/c),s=Math.floor(s/c),o=new Array(i=Math.ceil(s-a+1));for(let t=0;t<i;t+=1)o[t]=(a+t)*c}else{c=-c,a=Math.ceil(a*c),s=Math.floor(s*c),o=new Array(i=Math.ceil(s-a+1));for(let t=0;t<i;t+=1)o[t]=(a+t)/c}return((t,e)=>{if(!(null==e?void 0:e.length))return t;const n=[...t,...e.flatMap((t=>[t.start,t.end]))],r=Array.from(new Set(n)).sort(((t,e)=>t-e)),i=r.filter((t=>!e.some((({start:e,end:n})=>t>e&&t<n))));return i.length?i:t})(o,r)};class xd extends od{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:bd}}map(t){const[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){const[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){const{tickMethod:t,domain:e,tickCount:n}=this.options,[r,i]=e;return ze(r)&&ze(i)?t(r,i,n):[]}clone(){return new xd(this.options)}}var wd=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))};function Od(t){var e;let n=t;for(;n;){if("view"===(null===(e=n.attributes)||void 0===e?void 0:e.class))return n;n=n.parentNode}return null}function kd(t){const{markType:e,nodeName:n}=t;return"heatmap"===e&&"image"===n}function Md(t,e){const n=null!=e?e:Od(t).__data__,r=t.__data__,{markKey:i,index:o,seriesIndex:a,normalized:s={x:0}}=r,{markState:c}=n,l=Array.from(c.keys()).find((t=>t.key===i));if(l)return a?a.map((t=>l.data[t])):kd(t)?l.data[Math.round(l.data.length*s.x)]:l.data[o]}function _d(t,e){const{color:n,facet:r=!1}=t,{color:i,series:o}=e,a=function(t,e){var n,r,i,o;const a=null!==(n=e.markKey)&&void 0!==n?n:null===(i=null===(r=e.element)||void 0===r?void 0:r.__data__)||void 0===i?void 0:i.markKey,s=Object.keys(t).find((e=>{if(e.startsWith("series")){const n=t[e].getOptions();return"series"===n.name&&n.markerKey===a}}));return null!==(o=t[s])&&void 0!==o?o:t.series}(t,e),s=t=>t&&t.invert&&!(t instanceof dd)&&!(t instanceof xd);if(s(a)){return a.clone().invert(o)}if(o&&a instanceof dd&&a.invert(o)!==i&&!r)return a.invert(o);if(s(n)){const t=n.invert(i);return Array.isArray(t)?null:t}return null}function Ed(t){return t}function Sd(t){return t.reduce(((t,e)=>(n,...r)=>e(t(n,...r),...r)),Ed)}function Ad(t){return t.replace(/( |^)[a-z]/g,(t=>t.toUpperCase()))}function jd(t=""){throw new Error(t)}function Td(t,e){const{attributes:n}=e,r=new Set(["id","className"]);for(const[e,i]of Object.entries(n))r.has(e)||t.attr(e,i)}function Pd(t){return null!=t&&!Number.isNaN(t)}function Cd(t){const e=new Map;return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}function Rd(t,e){return Ld(t,e)||{}}function Ld(t,e){const n=Object.entries(t||{}).filter((([t])=>t.startsWith(e))).map((([t,n])=>[ed(t.replace(e,"").trim()),n])).filter((([t])=>!!t));return 0===n.length?null:Object.fromEntries(n)}function Nd(t,...e){return Object.fromEntries(Object.entries(t).filter((([t])=>e.every((e=>!t.startsWith(e))))))}function Id(t,e){if(void 0===t)return null;if("number"==typeof t)return t;const n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function Dd(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function Bd(t){return null===t||!1===t}function Fd(t,e,n=5,r=0){if(!(r>=n)){for(const i of Object.keys(e)){const o=e[i];Xh(o)&&Xh(t[i])?Fd(t[i],o,n,r+1):t[i]=o}return t}}function zd(t){return new Zd([t],null,t,t.ownerDocument)}class Zd{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){const e="string"==typeof t?this._parent.querySelectorAll(t):t;return new Zd(e,null,this._elements[0],this._document)}selectFacetAll(t){const e="string"==typeof t?this._parent.querySelectorAll(t):t;return new Zd(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){const e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new Zd([e],null,e,this._document)}append(t){const e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){const r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new Zd(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){const r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new Zd(n,null,n[0],this._document)}maybeAppend(t,e,n){const r=this._elements[0],i=r.getElementById(t);if(i)return new Zd([i],null,this._parent,this._document);const o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new Zd([o],null,this._parent,this._document)}data(t,e=(t=>t),n=(()=>null)){const r=[],i=[],o=new Set(this._elements),a=[],s=new Set,c=new Map(this._elements.map(((t,n)=>[e(t.__data__,n),t]))),l=new Map(this._facetElements.map(((t,n)=>[e(t.__data__,n),t]))),u=Gh(this._elements,(t=>n(t.__data__)));for(let f=0;f<t.length;f++){const h=t[f],d=e(h,f),p=n(h,f);if(c.has(d)){const t=c.get(d);t.__data__=h,t.__facet__=!1,i.push(t),o.delete(t),c.delete(d)}else if(l.has(d)){const t=l.get(d);t.__data__=h,t.__facet__=!0,i.push(t),l.delete(d)}else if(u.has(d)){const t=u.get(d);a.push([h,t]);for(const e of t)o.delete(e);u.delete(d)}else if(c.has(p)){const t=c.get(p);t.__toData__?t.__toData__.push(h):t.__toData__=[h],s.add(t),o.delete(t)}else r.push(h)}const f=[new Zd([],r,this._parent,this._document),new Zd(i,null,this._parent,this._document),new Zd(o,null,this._parent,this._document),new Zd([],a,this._parent,this._document),new Zd(s,null,this._parent,this._document)];return new Zd(this._elements,null,this._parent,this._document,f)}merge(t){const e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new Zd(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});const e=Zd.registry[t];return e?new e:jd(`Unknown node type: ${t}`)}join(t=(t=>t),e=(t=>t),n=(t=>t.remove()),r=(t=>t),i=(t=>t.remove())){const o=t(this._enter),a=e(this._update),s=n(this._exit),c=r(this._merge),l=i(this._split);return a.merge(o).merge(s).merge(c).merge(l)}remove(){for(let t=0;t<this._elements.length;t++){const e=this._transitions[t];if(this._elements[t].__removed__=!0,e){const n=Array.isArray(e)?e:[e];Promise.all(n.map((t=>t.finished))).then((()=>{const e=this._elements[t];e.__removed__&&e.remove()}))}else{const e=this._elements[t];e.__removed__&&e.remove()}}return new Zd([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){const n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){const n="function"!=typeof e?()=>e:e;return this.each((function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))}))}style(t,e){const n="function"!=typeof e?()=>e:e;return this.each((function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))}))}transition(t){const e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each((function(t,r,i){n[r]=e(t,r,i)}))}on(t,e){return this.each((function(n,r,i){i.addEventListener(t,e)})),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}Zd.registry={g:pl,rect:El,circle:ul,path:wl,text:Al,ellipse:dl,image:vl,line:bl,polygon:kl,polyline:_l,html:yl};const Wd="beforerender",$d="afterrender",Gd="beforepaint",qd="afterpaint",Yd="beforeclear",Hd="afterclear",Vd="beforedestroy",Ud="afterdestroy",Xd="beforechangesize",Kd="afterchangesize",Qd="pointertap",Jd="pointerdown",tp="pointerup",ep="pointerover",np="pointerout",rp="pointermove",ip="pointerenter",op="pointerleave",ap="pointerupoutside",sp="dragstart",cp="drag",lp="dragend",up="dragenter",fp="dragleave",hp="dragover",dp="DROP",pp="click",gp="dblclick",yp={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow};class vp extends Error{constructor(t,e,n){super(t),this.position=e,this.token=n,this.name="ExpressionError"}}var mp;!function(t){t[t.STRING=0]="STRING",t[t.NUMBER=1]="NUMBER",t[t.BOOLEAN=2]="BOOLEAN",t[t.NULL=3]="NULL",t[t.IDENTIFIER=4]="IDENTIFIER",t[t.OPERATOR=5]="OPERATOR",t[t.FUNCTION=6]="FUNCTION",t[t.DOT=7]="DOT",t[t.BRACKET_LEFT=8]="BRACKET_LEFT",t[t.BRACKET_RIGHT=9]="BRACKET_RIGHT",t[t.PAREN_LEFT=10]="PAREN_LEFT",t[t.PAREN_RIGHT=11]="PAREN_RIGHT",t[t.COMMA=12]="COMMA",t[t.QUESTION=13]="QUESTION",t[t.COLON=14]="COLON",t[t.DOLLAR=15]="DOLLAR"}(mp||(mp={}));const bp=new Set([32,9,10,13]),xp=new Set([43,45,42,47,37,33,38,124,61,60,62]),wp=new Map([["true",mp.BOOLEAN],["false",mp.BOOLEAN],["null",mp.NULL]]),Op=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),kp=new Map([[46,mp.DOT],[91,mp.BRACKET_LEFT],[93,mp.BRACKET_RIGHT],[40,mp.PAREN_LEFT],[41,mp.PAREN_RIGHT],[44,mp.COMMA],[63,mp.QUESTION],[58,mp.COLON],[36,mp.DOLLAR]]),Mp=new Map;for(const[t,e]of kp.entries())Mp.set(t,{type:e,value:String.fromCharCode(t)});function _p(t){return t>=48&&t<=57}function Ep(t){return t>=97&&t<=122||t>=65&&t<=90||95===t}function Sp(t){return Ep(t)||_p(t)}function Ap(t){return xp.has(t)}var jp;!function(t){t[t.Program=0]="Program",t[t.Literal=1]="Literal",t[t.Identifier=2]="Identifier",t[t.MemberExpression=3]="MemberExpression",t[t.CallExpression=4]="CallExpression",t[t.BinaryExpression=5]="BinaryExpression",t[t.UnaryExpression=6]="UnaryExpression",t[t.ConditionalExpression=7]="ConditionalExpression"}(jp||(jp={}));const Tp=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),Pp={type:jp.Literal,value:null},Cp={type:jp.Literal,value:!0},Rp={type:jp.Literal,value:!1},Lp=t=>{let e=0;const n=t.length,r=()=>e>=n?null:t[e],i=()=>t[e++],o=t=>{const e=r();return null!==e&&e.type===t},a=t=>t.type===mp.OPERATOR?Tp.get(t.value)||-1:t.type===mp.DOT||t.type===mp.BRACKET_LEFT?9:t.type===mp.QUESTION?1:-1,s=t=>{let n,a;if(i().type===mp.DOT){if(!o(mp.IDENTIFIER)){const t=r();throw new vp("Expected property name",e,t?t.value:"<end of input>")}const t=i();n={type:jp.Identifier,name:t.value},a=!1}else{if(n=l(0),!o(mp.BRACKET_RIGHT)){const t=r();throw new vp("Expected closing bracket",e,t?t.value:"<end of input>")}i(),a=!0}return{type:jp.MemberExpression,object:t,property:n,computed:a}},c=()=>{const t=r();if(!t)throw new vp("Unexpected end of input",e,"<end of input>");if(t.type===mp.OPERATOR&&("!"===t.value||"-"===t.value)){i();const e=c();return{type:jp.UnaryExpression,operator:t.value,argument:e,prefix:!0}}switch(t.type){case mp.NUMBER:return i(),{type:jp.Literal,value:Number(t.value)};case mp.STRING:return i(),{type:jp.Literal,value:t.value};case mp.BOOLEAN:return i(),"true"===t.value?Cp:Rp;case mp.NULL:return i(),Pp;case mp.IDENTIFIER:return i(),{type:jp.Identifier,name:t.value};case mp.FUNCTION:return(()=>{const t=i(),n=[];if(!o(mp.PAREN_LEFT)){const t=r();throw new vp("Expected opening parenthesis after function name",e,t?t.value:"<end of input>")}for(i();;){if(o(mp.PAREN_RIGHT)){i();break}if(!r()){const t=r();throw new vp("Expected closing parenthesis",e,t?t.value:"<end of input>")}if(n.length>0){if(!o(mp.COMMA)){const t=r();throw new vp("Expected comma between function arguments",e,t?t.value:"<end of input>")}i()}const t=l(0);n.push(t)}return{type:jp.CallExpression,callee:{type:jp.Identifier,name:t.value},arguments:n}})();case mp.PAREN_LEFT:{i();const t=l(0);if(!o(mp.PAREN_RIGHT)){const t=r();throw new vp("Expected closing parenthesis",e,t?t.value:"<end of input>")}return i(),t}default:throw new vp(`Unexpected token: ${t.type}`,e,t.value)}},l=(u=0)=>{let f=c();for(;e<n;){const n=t[e],c=a(n);if(c<=u)break;if(n.type!==mp.QUESTION)if(n.type!==mp.OPERATOR){if(n.type!==mp.DOT&&n.type!==mp.BRACKET_LEFT)break;f=s(f)}else{i();const t=l(c);f={type:jp.BinaryExpression,operator:n.value,left:f,right:t}}else{i();const t=l(0);if(!o(mp.COLON)){const t=r();throw new vp("Expected : in conditional expression",e,t?t.value:"<end of input>")}i();const n=l(0);f={type:jp.ConditionalExpression,test:f,consequent:t,alternate:n}}}return f},u=l();return{type:jp.Program,body:u}},Np=(t,e,n)=>{let r=e;n&&(r={...e,context:{...e.context,...n}});const i=t=>{switch(t.type){case jp.Literal:return(t=>t.value)(t);case jp.Identifier:return(t=>{if(!(t.name in r.context))throw new vp(`Undefined variable: ${t.name}`);return r.context[t.name]})(t);case jp.MemberExpression:return(t=>{const e=i(t.object);if(null==e)throw new vp("Cannot access property of null or undefined");return e[t.computed?i(t.property):t.property.name]})(t);case jp.CallExpression:return(t=>{const e=r.functions[t.callee.name];if(!e)throw new vp(`Undefined function: ${t.callee.name}`);return e(...t.arguments.map((t=>i(t))))})(t);case jp.BinaryExpression:return(t=>{if("&&"===t.operator){const e=i(t.left);return e?i(t.right):e}if("||"===t.operator)return i(t.left)||i(t.right);const e=i(t.left),n=i(t.right);switch(t.operator){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n;case"%":return e%n;case"===":return e===n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n;default:throw new vp(`Unknown operator: ${t.operator}`)}})(t);case jp.UnaryExpression:return(t=>{const e=i(t.argument);if(t.prefix)switch(t.operator){case"!":return!e;case"-":if("number"!=typeof e)throw new vp(`Cannot apply unary - to non-number: ${e}`);return-e;default:throw new vp(`Unknown operator: ${t.operator}`)}throw new vp(`Postfix operators are not supported: ${t.operator}`)})(t);case jp.ConditionalExpression:return(t=>{const e=i(t.test);return i(e?t.consequent:t.alternate)})(t);default:throw new vp(`Evaluation error: Unsupported node type: ${t.type}`)}};return i(t.body)};function Ip(t){const e=(t=>{const e=t,n=e.length,r=new Array(Math.ceil(n/3));let i=0,o=0;function a(t){const r=o+1;o++;let i="",a=!1;for(;o<n;){const n=e.charCodeAt(o);if(n===t)return a||(i=e.substring(r,o)),o++,{type:mp.STRING,value:i};92===n?(a||(i=e.substring(r,o),a=!0),o++,i+=e[o]):a&&(i+=e[o]),o++}throw new vp(`Unterminated string starting with ${String.fromCharCode(t)}`,o,e.substring(Math.max(0,o-10),o))}function s(){const t=o;for(45===e.charCodeAt(o)&&o++;o<n&&_p(e.charCodeAt(o));)o++;if(o<n&&46===e.charCodeAt(o))for(o++;o<n&&_p(e.charCodeAt(o));)o++;const r=e.slice(t,o);return{type:mp.NUMBER,value:r}}function c(){o++;const t=o;if(o<n&&Ep(e.charCodeAt(o)))for(o++;o<n&&Sp(e.charCodeAt(o));)o++;const r=e.slice(t,o);return{type:mp.FUNCTION,value:r}}function l(){const t=o++;for(;o<n&&Sp(e.charCodeAt(o));)o++;const r=e.slice(t,o),i=wp.get(r);return i?{type:i,value:r}:{type:mp.IDENTIFIER,value:r}}function u(){if(o+2<n){const t=e.substring(o,o+3);if(Op.has(t))return o+=3,{type:mp.OPERATOR,value:t}}if(o+1<n){const t=e.substring(o,o+2);if(Op.has(t))return o+=2,{type:mp.OPERATOR,value:t}}const t=e[o];if(Op.has(t))return o++,{type:mp.OPERATOR,value:t};throw new vp(`Unknown operator at position ${o}: ${e.substring(o,o+1)}`,o,e.substring(Math.max(0,o-10),o))}for(;o<n;){const t=e.charCodeAt(o);if(f=t,bp.has(f)){o++;continue}const h=Mp.get(t);if(h)r[i++]=h,o++;else if(34!==t&&39!==t)if(_p(t)||45===t&&o+1<n&&_p(e.charCodeAt(o+1)))r[i++]=s();else if(64!==t)if(Ep(t))r[i++]=l();else{if(!Ap(t))throw new vp(`Unexpected character: ${e[o]}`,o,e.substring(Math.max(0,o-10),o));r[i++]=u()}else r[i++]=c();else r[i++]=a(t)}var f;return i===r.length?r:r.slice(0,i)})(t),n=Lp(e),r=((t={},e={})=>({context:t,functions:e}))({},yp);return(t={})=>Np(n,r,t)}var Dp=function(t){return t};function Bp(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}Bp(3);function Fp(t,e=((...t)=>`${t[0]}`),n=16){const r=Bp(n);return(...n)=>{const i=e(...n);let o=r.get(i);return r.has(i)?r.get(i):(o=t(...n),r.set(i,o),o)}}const zp=["style","encode","labels","children"],Zp=Fp((t=>{const e=Ip(t);return(...t)=>{const n=Array.from({length:t.length},((t,e)=>String.fromCharCode(97+e))),r=Object.fromEntries(t.map(((t,e)=>[n[e],t])));return e(Object.assign(Object.assign({},r),{global:Object.assign({},r)}))}}),(t=>t),128);function Wp(t,e=!0){if(Array.isArray(t))return t.map(((n,r)=>Wp(t[r],e)));if("object"==typeof t&&t)return function(t,e){void 0===e&&(e=Dp);var n={};return zn(t)&&!We(t)&&Object.keys(t).forEach((function(r){n[r]=e(t[r],r)})),n}(t,((t,n)=>e&&zp.includes(n)?Wp(t,"children"===n):e?t:Wp(t,!1)));if("string"==typeof t){const e=t.trim();if(e.startsWith("{")&&e.endsWith("}"))return Zp(e.slice(1,-1))}return t}var $p=function(t){var e=td(t);return e.charAt(0).toUpperCase()+e.substring(1)};function Gp(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var qp,Yp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hp(t){if(!(e=Yp.exec(t)))throw new Error("invalid format: "+t);var e;return new Vp({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]})}function Vp(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 Up(t,e){var n=Gp(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Hp.prototype=Vp.prototype,Vp.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 Xp={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?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)=>Up(100*t,e),r:Up,s:function(t,e){var n=Gp(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(qp=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Gp(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Kp(t){return t}var Qp,Jp,tg=Array.prototype.map,eg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ng(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Kp:(e=tg.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Kp:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(tg.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Hp(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,v=t.trim,m=t.type;"n"===m?(g=!0,m="g"):Xp[m]||(void 0===y&&(y=12),v=!0,m="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===h?o:/[%p]/.test(m)?c:"",w=Xp[m],O=/[defgprs%]/.test(m);function k(t){var i,o,c,h=b,k=x;if("c"===m)k=w(t)+k,t="";else{var M=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:w(Math.abs(t),y),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==f&&(M=!1),h=(M?"("===f?f:l:"-"===f||"("===f?"":f)+h,k=("s"===m?eg[8+qp/3]:"")+k+(M&&"("===f?")":""),O)for(i=-1,o=t.length;++i<o;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?a+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var _=h.length+t.length+k.length,E=_<p?new Array(p-_+1).join(e):"";switch(g&&d&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=h+t+k+E;break;case"=":t=h+E+t+k;break;case"^":t=E.slice(0,_=E.length>>1)+h+t+k+E.slice(_);break;default:t=E+h+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=Hp(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(function(t){return(t=Gp(Math.abs(t)))?t[1]:NaN}(e)/3))),i=Math.pow(10,-r),o=eg[8+r/3];return function(t){return n(i*t)+o}}}}function rg(t,e){return Object.entries(t).reduce(((n,[r,i])=>(n[r]=e(i,r,t),n)),{})}function ig(t){return t.map(((t,e)=>e))}function og(t){return t[0]}function ag(t){return t[t.length-1]}function sg(t,e){const n=[[],[]];return t.forEach((t=>{n[e(t)?0:1].push(t)})),n}function cg(t,e=t.length){if(1===e)return t.map((t=>[t]));const n=[];for(let r=0;r<t.length;r++){cg(t.slice(r+1),e-1).forEach((e=>{n.push([t[r],...e])}))}return n}Qp=ng({thousands:",",grouping:[3],currency:["$",""]}),Jp=Qp.format,Qp.formatPrefix;var lg=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},ug=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if($e(t)||$e(e))return!1;if(lg(t)||lg(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=ug(t[r],e[r]));r++);return n}if(Uh(t)||Uh(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=ug(t[i[r]],e[i[r]]));r++);return n}return!1},fg=ug;function hg(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function dg(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}const pg=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},e),t);return Object.assign(Object.assign({},n),(r=n.startAngle,i=n.endAngle,r%=2*Math.PI,i%=2*Math.PI,r<0&&(r=2*Math.PI+r),i<0&&(i=2*Math.PI+i),r>=i&&(i+=2*Math.PI),{startAngle:r,endAngle:i}));var r,i},gg=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=pg(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};gg.props={};const yg=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},vg=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=yg(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...gg({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};function mg(t,e,n){return Math.max(e,Math.min(t,n))}function bg(t,e=10){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}vg.props={};const xg=[["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"]]]]],wg=["lineX","lineY","rangeX","rangeY","range","connector"];var Og=n(78830);function kg(t){const{transformations:e}=t.getOptions();return e.map((([t])=>t)).filter((t=>"transpose"===t)).length%2!=0}function Mg(t){const{transformations:e}=t.getOptions();return e.some((([t])=>"polar"===t))}function _g(t){const{transformations:e}=t.getOptions();return e.some((([t])=>"reflect"===t))&&e.some((([t])=>t.startsWith("transpose")))}function Eg(t){const{transformations:e}=t.getOptions();return e.some((([t])=>"helix"===t))}function Sg(t){const{transformations:e}=t.getOptions();return e.some((([t])=>"parallel"===t))}function Ag(t){const{transformations:e}=t.getOptions();return e.some((([t])=>"fisheye"===t))}function jg(t){return Eg(t)||Mg(t)}function Tg(t){return Mg(t)&&kg(t)}function Pg(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find((t=>"polar"===t[0]));return[+n,+r]}function Cg(t,e=!0){const{transformations:n}=t.getOptions(),[,r,i]=n.find((t=>"polar"===t[0]));return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}function Rg(t,e){e(t),t.children&&t.children.forEach((function(t){t&&Rg(t,e)}))}function Lg(t){Ig(t,!0)}function Ng(t){Ig(t,!1)}function Ig(t,e){var n=e?"visible":"hidden";Rg(t,(function(t){t.attr("visibility",n)}))}function Dg(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter((function(t){var n=(0,qe.CR)(t,1)[0];return!e.includes(n)})));return Object.fromEntries(e.map((function(e){return function(t){return"boolean"!=typeof t&&"enter"in t&&"update"in t&&"exit"in t}(t)?!1===t[e]?[e,!1]:[e,(0,qe.pi)((0,qe.pi)({},t[e]),n)]:[e,n]})))}function Bg(t,e){t?t.finished.then(e):e()}function Fg(t,e){"update"in t?t.update(e):t.attr(e)}function zg(t,e,n){return 0===e.length?null:n?t.animate(e,n):(Fg(t,{style:e.slice(-1)[0]}),null)}function Zg(t,e,n){var r={},i={};return Object.entries(e).forEach((function(e){var n=(0,qe.CR)(e,2),o=n[0],a=n[1];if(!We(a)){var s=t.style[o]||t.parsedStyle[o]||0;s!==a&&(r[o]=s,i[o]=a)}})),n?zg(t,[r,i],(0,qe.pi)({fill:"both"},n)):(Fg(t,i),null)}var Wg=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach((function(i){var o=(0,qe.CR)(i,2),a=o[0],s=o[1],c=t;Object.prototype.hasOwnProperty.call(e,a)&&(s?Xh(s)?(Xh(t[a])||(c[a]={}),n<r?Wg(t[a],s,n+1,r):c[a]=e[a]):xn(s)?(c[a]=[],c[a]=c[a].concat(s)):c[a]=s:c[a]=s)}))},$g=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)Wg(t,e[r]);return t},Gg=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,(0,qe.ev)([],(0,qe.CR)(e),!1))||this;return r.isMutationObserved=!0,r.addEventListener(bc.INSERTED,(function(){Ng(r)})),r}return(0,qe.ZT)(e,t),e}(pl);function qg(t){var e=t.appendChild(new Gg({class:"offscreen"}));return Ng(e),e}function Yg(){Ig(this,"hidden"!==this.attributes.visibility)}var Hg=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,$g({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=qg(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&Yg.call(this)},e.prototype.update=function(t,e){var n;return this.attr($g({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e.prototype.getSubShapeStyle=function(t){t.x,t.y,t.transform,t.transformOrigin,t.class,t.className,t.zIndex;return(0,qe._T)(t,["x","y","transform","transformOrigin","class","className","zIndex"])},e}(hl);function Vg(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t?n(e):(r&&i(e),null)}var Ug=function(t){if(!xn(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e},Xg=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=(0,qe._T)(e,["style"]);return t.call(this,(0,qe.pi)({style:(0,qe.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=qg(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e}(Al);var Kg=function(){function t(t,n,r,i,o,a,s){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===s&&(s=[]),e.add(this),this._elements=Array.from(t),this._data=n,this._parent=r,this._document=i,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=a,this._facetElements=s}var e,n,r;return t.prototype.selectAll=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t):t;return new n(e,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t):t;return new n(this._elements,null,this._parent,this._document,void 0,void 0,e)},t.prototype.select=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new n([e],null,e,this._document)},t.prototype.append=function(t){var e=this,r="function"==typeof t?t:function(){return e.createElement(t)},i=[];if(null!==this._data){for(var o=0;o<this._data.length;o++){var a=this._data[o],s=(0,qe.CR)(Array.isArray(a)?a:[a,null],2),c=s[0],l=s[1];(f=r(c,o)).__data__=c,null!==l&&(f.__fromElements__=l),this._parent.appendChild(f),i.push(f)}return new n(i,null,this._parent,this._document)}for(o=0;o<this._elements.length;o++){var u=this._elements[o],f=r(c=u.__data__,o);u.appendChild(f),i.push(f)}return new n(i,null,i[0],this._document)},t.prototype.maybeAppend=function(t,n){var i=(0,qe.Q_)(this,e,"m",r).call(this,"#"===t[0]?t:"#".concat(t),n);return i.attr("id",t),i},t.prototype.maybeAppendByClassName=function(t,n){var i=t.toString(),o=(0,qe.Q_)(this,e,"m",r).call(this,"."===i[0]?i:".".concat(i),n);return o.attr("className",i),o},t.prototype.maybeAppendByName=function(t,n){var i=(0,qe.Q_)(this,e,"m",r).call(this,'[name="'.concat(t,'"]'),n);return i.attr("name",t),i},t.prototype.data=function(t,e,r){var i,o;void 0===e&&(e=function(t){return t}),void 0===r&&(r=function(){return null});for(var a=[],s=[],c=new Set(this._elements),l=[],u=new Set,f=new Map(this._elements.map((function(t,n){return[e(t.__data__,n),t]}))),h=new Map(this._facetElements.map((function(t,n){return[e(t.__data__,n),t]}))),d=function(t,e){var n=new Map;return t.forEach((function(t){var r=e(t);n.has(r)||n.set(r,[]),n.get(r).push(t)})),n}(this._elements,(function(t){return r(t.__data__)})),p=0;p<t.length;p++){var g=t[p],y=e(g,p),v=r(g,p);if(f.has(y))(w=f.get(y)).__data__=g,w.__facet__=!1,s.push(w),c.delete(w),f.delete(y);else if(h.has(y)){(w=h.get(y)).__data__=g,w.__facet__=!0,s.push(w),h.delete(y)}else if(d.has(y)){var m=d.get(y);l.push([g,m]);try{for(var b=(i=void 0,(0,qe.XA)(m)),x=b.next();!x.done;x=b.next()){var w=x.value;c.delete(w)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}d.delete(y)}else if(f.has(v)){(w=f.get(v)).__toData__?w.__toData__.push(g):w.__toData__=[g],u.add(w),c.delete(w)}else a.push(g)}var O=[new n([],a,this._parent,this._document),new n(s,null,this._parent,this._document),new n(c,null,this._parent,this._document),new n([],l,this._parent,this._document),new n(u,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,O)},t.prototype.merge=function(t){var e=(0,qe.ev)((0,qe.ev)([],(0,qe.CR)(this._elements),!1),(0,qe.CR)(t._elements),!1),r=(0,qe.ev)((0,qe.ev)([],(0,qe.CR)(this._transitions),!1),(0,qe.CR)(t._transitions),!1);return new n(e,null,this._parent,this._document,void 0,r)},t.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=n.registry[t];return e?new e:function(t){throw new Error(t)}("Unknown node type: ".concat(t))},t.prototype.join=function(t,e,n,r,i){void 0===t&&(t=function(t){return t}),void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});var o=t(this._enter),a=e(this._update),s=n(this._exit),c=r(this._merge),l=i(this._split);return a.merge(o).merge(s).merge(c).merge(l)},t.prototype.remove=function(){for(var t=function(t){var n=e._elements[t],r=e._transitions[t];r?r.then((function(){return n.remove()})):n.remove()},e=this,r=0;r<this._elements.length;r++)t(r);return new n([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},t.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each((function(r,i){void 0!==e&&(this[t]=n.call(this,r,i))}))},t.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each((function(n,i){void 0!==e&&(this.style[t]=r.call(this,n,i))}))},t.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each((function(n,r){var i=this;Object.entries(t).forEach((function(t){var o=(0,qe.CR)(t,2),a=o[0],s=o[1],c="function"==typeof s&&e?s:function(){return s};void 0!==s&&i.attr(a,c.call(i,n,r))}))}))},t.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each((function(e,r){t&&this.update&&this.update(n.call(this,e,r))}))},t.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each((function(e,r){t&&this.update&&this.update(n.call(this,e,r))}))},t.prototype.transition=function(t){this._transitions;var e=new Array(this._elements.length);return this.each((function(n,r){e[r]=t.call(this,n,r)})),this._transitions=Ug(e),this},t.prototype.on=function(t,e){return this.each((function(){this.addEventListener(t,e)})),this},t.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,(0,qe.ev)([this._parent,this],(0,qe.CR)(e),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter((function(t){return!!t}))},t.prototype.parent=function(){return this._parent},n=t,e=new WeakSet,r=function(t,e){var r=this._elements[0],i=r.querySelector(t);if(i)return new n([i],null,this._parent,this._document);var o="string"==typeof e?this.createElement(e):e();return r.appendChild(o),new n([o],null,this._parent,this._document)},t.registry={g:pl,rect:El,circle:ul,path:wl,text:Xg,ellipse:dl,image:vl,line:bl,polygon:kl,polyline:_l,html:yl},t}();function Qg(t){return new Kg([t],null,t,t.ownerDocument)}var Jg=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map((function(t){var e=(0,qe.CR)(t,2),r=e[0],i=e[1],o=n(i);return[r,{name:o,class:".".concat(o),id:"#".concat(o),toString:function(){return o}}]})));return Object.assign(r,{prefix:n}),r},ty={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new wl({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},ey=(Jh({},ty,{style:{type:"arc"}}),Jh({},ty,{style:{}}),Jg({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis"));function ny(t,e){return[t[0]*e,t[1]*e]}function ry(t,e){return[t[0]+e[0],t[1]+e[1]]}function iy(t,e){return[t[0]-e[0],t[1]-e[1]]}function oy(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function ay(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function sy(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function cy(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function ly(t){return t*Math.PI/180}function uy(t){return Number((180*t/Math.PI).toPrecision(5))}function fy(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function hy(t,e,n){var r;void 0===n&&(n=!0);var i=e||(null===(r=t.match(/^([a-z][a-z0-9]+)/))||void 0===r?void 0:r[0])||"",o=t.replace(new RegExp("^(".concat(i,")")),"");return n?function(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}(o):o}var dy=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function py(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach((function(t){var i=(0,qe.CR)(t,2),o=i[0],a=i[1];if("className"===o||"class"===o);else if(dy(o,"show")&&dy(hy(o,"show"),e)!==n)o===function(t,e){return"".concat(e).concat(fy(t))}(e,"show")?r[o]=a:r[o.replace(new RegExp(fy(e)),"")]=a;else if(!dy(o,"show")&&dy(o,e)!==n){var s=hy(o,e);"filter"===s&&"function"==typeof a||(r[s]=a)}})),r}function gy(t,e){return Object.entries(t).reduce((function(t,n){var r=(0,qe.CR)(n,2),i=r[0],o=r[1];return i.startsWith("show")?t["show".concat(e).concat(i.slice(4))]=o:t["".concat(e).concat(fy(i))]=o,t}),{})}function yy(t,e){void 0===e&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(t).forEach((function(t){var o=(0,qe.CR)(t,2),a=o[0],s=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=s:r[a]=s)})),[r,i]}function vy(t,e){return Fn(t)?t.apply(void 0,(0,qe.ev)([],(0,qe.CR)(e),!1)):t}function my(t,e){return t.style.opacity||(t.style.opacity=1),Zg(t,{opacity:0},e)}var by=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function xy(t){return by.includes(t)}function wy(t){var e={};for(var n in t)xy(n)&&(e[n]=t[n]);return e}var Oy=Jg({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function ky(t){return t.reduce((function(t,e,n){return t.push((0,qe.ev)([0===n?"M":"L"],(0,qe.CR)(e),!1)),t}),[])}function My(t,e,n){return"surround"===e.type?function(t,e,n){var r=e.connect,i=void 0===r?"line":r,o=e.center;if("line"===i)return ky(t);if(!o)return[];var a=sy(t[0],o),s=n?0:1;return t.reduce((function(t,e,n){return 0===n?t.push((0,qe.ev)(["M"],(0,qe.CR)(e),!1)):t.push((0,qe.ev)(["A",a,a,0,0,s],(0,qe.CR)(e),!1)),t}),[])}(t,e,n):ky(t)}function _y(t,e,n){var r=n.type,i=n.connect,o=n.center,a=n.closed?[["Z"]]:[],s=(0,qe.CR)([My(t,n),My(e.slice().reverse(),n,!0)],2),c=s[0],l=s[1],u=(0,qe.CR)([t[0],e.slice(-1)[0]],2),f=u[0],h=u[1],d=function(t,e){return[c,t,l,e,a].flat()};if("line"===i||"surround"===r)return d([(0,qe.ev)(["L"],(0,qe.CR)(h),!1)],[(0,qe.ev)(["L"],(0,qe.CR)(f),!1)]);if(!o)throw new Error("Arc grid need to specified center");var p=(0,qe.CR)([sy(h,o),sy(f,o)],2),g=p[0],y=p[1];return d([(0,qe.ev)(["A",g,g,0,0,1],(0,qe.CR)(h),!1),(0,qe.ev)(["L"],(0,qe.CR)(h),!1)],[(0,qe.ev)(["A",y,y,0,0,0],(0,qe.CR)(f),!1),(0,qe.ev)(["L"],(0,qe.CR)(f),!1)])}var Ey=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,qe.ZT)(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n=(0,qe._T)(t,["type","center","areaFill","closed"]),r=function(t){var e=t.data,n=void 0===e?[]:e;return t.closed?n.map((function(t){var e=t.points,n=(0,qe.CR)(e,1)[0];return(0,qe.pi)((0,qe.pi)({},t),{points:(0,qe.ev)((0,qe.ev)([],(0,qe.CR)(e),!1),[n],!1)})})):n}(t),i=Qg(e).maybeAppendByClassName(Oy.lineGroup,"g"),o=Qg(e).maybeAppendByClassName(Oy.regionGroup,"g"),a=function(t,e,n,r){var i=n.animate,o=n.isBillboard,a=e.map((function(t,e){return{id:t.id||"grid-line-".concat(e),d:My(t.points,n)}}));return t.selectAll(Oy.line.class).data(a,(function(t){return t.id})).join((function(t){return t.append("path").each((function(t,e){var n=vy(wy((0,qe.pi)({d:t.d},r)),[t,e,a]);this.attr((0,qe.pi)({class:Oy.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:o},n))}))}),(function(t){return t.transition((function(t,e){return Zg(this,vy(wy((0,qe.pi)({d:t.d},r)),[t,e,a]),i.update)}))}),(function(t){return t.transition((function(){var t=this,e=my(this,i.exit);return Bg(e,(function(){return t.remove()})),e}))})).transitions()}(i,r,t,n),s=function(t,e,n){var r=n.animate,i=n.connect,o=n.areaFill;if(e.length<2||!o||!i)return[];for(var a=Array.isArray(o)?o:[o,"transparent"],s=function(t){return a[t%a.length]},c=[],l=0;l<e.length-1;l++){var u=(0,qe.CR)([e[l].points,e[l+1].points],2),f=_y(u[0],u[1],n);c.push({d:f,fill:s(l)})}return t.selectAll(Oy.region.class).data(c,(function(t,e){return e})).join((function(t){return t.append("path").each((function(t,e){var n=vy(t,[t,e,c]);this.attr(n)})).attr("className",Oy.region.name)}),(function(t){return t.transition((function(t,e){return Zg(this,vy(t,[t,e,c]),r.update)}))}),(function(t){return t.transition((function(){var t=this,e=my(this,r.exit);return Bg(e,(function(){return t.remove()})),e}))})).transitions()}(o,r,t);return(0,qe.ev)((0,qe.ev)([],(0,qe.CR)(a),!1),(0,qe.CR)(s),!1)},e}(Hg);function Sy(t,e){return"number"==typeof t&&"number"==typeof e?function(t,e){return function(n){return t*(1-n)+e*n}}(t,e):Array.isArray(t)&&Array.isArray(e)?function(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0;return function(i){var o=new Array(r),a=new Array(n),s=0;for(s=0;s<r;++s)o[s]=Sy(t[s],e[s]);for(;s<n;++s)a[s]=e[s];for(s=0;s<r;++s)a[s]=o[s](i);return a}}(t,e):"object"==typeof t&&"object"==typeof e?function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n={},r={};return Object.entries(e).forEach((function(e){var i=(0,qe.CR)(e,2),o=i[0],a=i[1];o in t?n[o]=Sy(t[o],a):r[o]=a})),function(t){return Object.entries(n).forEach((function(e){var n=(0,qe.CR)(e,2),i=n[0],o=n[1];return r[i]=o(t)})),r}}(t,e):function(e){return t}}function Ay(t){return"function"==typeof t?t():$e(t)||ze(t)?new Xg({style:{text:String(t)}}):t}function jy(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,o=r.height,a=e/Math.max(i,o);return n&&(t.style.transform="scale(".concat(a,")")),a}function Ty(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)r.includes(i)||(n[i]=t[i]);return n}function Py(t,e){return Object.fromEntries(Object.entries(t).map((function(t){var n=(0,qe.CR)(t,2);return[n[0],vy(n[1],e)]})))}function Cy(t,e){return e&&Fn(e)?t.filter(e):t}function Ry(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function Ly(t,e){if("linear"===e.type){var n=(0,qe.CR)(e.startPos,2),r=n[0],i=n[1],o=(0,qe.CR)(e.endPos,2),a=o[0],s=o[1],c=(0,qe.CR)([a-r,s-i],2);return cy([c[0],c[1]])}var l=ly(Ry(t,e));return[-Math.sin(l),Math.cos(l)]}function Ny(t,e,n){return function(t,e){return e?[t[1],-t[0]]:[-t[1],t[0]]}(Ly(t,n),"positive"!==e)}function Iy(t,e){return Ny(t,e.labelDirection,e)}function Dy(t,e){return"linear"===e.type?function(t,e){var n=(0,qe.CR)(e.startPos,2),r=n[0],i=n[1],o=(0,qe.CR)(e.endPos,2),a=o[0],s=o[1],c=(0,qe.CR)([a-r,s-i],2);return[r+c[0]*t,i+c[1]*t]}(t,e):function(t,e){var n=e.radius,r=(0,qe.CR)(e.center,2),i=r[0],o=r[1],a=ly(Ry(t,e));return[i+n*Math.cos(a),o+n*Math.sin(a)]}(t,e)}function By(t){return 0===Ly(0,t)[1]}function Fy(t){return 0===Ly(0,t)[0]}function zy(t,e){return e-t==360}function Zy(t,e,n,r,i){var o=e-t,a=(0,qe.CR)([i,i],2),s=a[0],c=a[1],l=(0,qe.CR)([ly(t),ly(e)],2),u=l[0],f=l[1],h=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},d=(0,qe.CR)(h(u),2),p=d[0],g=d[1],y=(0,qe.CR)(h(f),2),v=y[0],m=y[1];if(zy(t,e)){var b=(f+u)/2,x=(0,qe.CR)(h(b),2);return[["M",p,g],["A",s,c,0,1,0,x[0],x[1]],["A",s,c,0,1,0,v,m]]}var w=o>180?1:0,O=t>e?0:1;return"M".concat(p,",").concat(g,",A").concat(s,",").concat(c,",0,").concat(w,",").concat(O,",").concat(v,",").concat(m)}function Wy(t,e,n,r){var i=e.startAngle,o=e.endAngle,a=e.center,s=e.radius;return t.selectAll(ey.line.class).data([{d:Zy.apply(void 0,(0,qe.ev)((0,qe.ev)([i,o],(0,qe.CR)(a),!1),[s],!1))}],(function(t,e){return e})).join((function(t){return t.append("path").attr("className",ey.line.name).styles(e).styles({d:function(t){return t.d}})}),(function(t){return t.transition((function(){var t=this,e=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,o=void 0===i?0:i,a=Sy(e,n),s=Math.ceil(+o/16),c=new Array(s).fill(0).map((function(t,e,n){return{__keyframe_data__:a(e/(n.length-1))}}));return t.animate(c,(0,qe.pi)({fill:"both"},r))}(this,function(t){var e=t.attributes,n=e.startAngle,r=e.endAngle,i=e.center,o=e.radius;return(0,qe.ev)((0,qe.ev)([n,r],(0,qe.CR)(i),!1),[o],!1)}(this),(0,qe.ev)((0,qe.ev)([i,o],(0,qe.CR)(a),!1),[s],!1),r.update);if(e){var n=function(){var e=Dh(t.attributes,"__keyframe_data__");t.style.d=Zy.apply(void 0,(0,qe.ev)([],(0,qe.CR)(e),!1))};e.onframe=n,e.onfinish=n}return e})).styles(e)}),(function(t){return t.remove()})).styles(n).transitions()}function $y(t){var e=(0,qe.CR)(t,2),n=(0,qe.CR)(e[0],2),r=n[0],i=n[1],o=(0,qe.CR)(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function Gy(t,e,n,r){var i=e.showTrunc,o=e.startPos,a=e.endPos,s=e.truncRange,c=e.lineExtension,l=(0,qe.CR)([o,a],2),u=(0,qe.CR)(l[0],2),f=u[0],h=u[1],d=(0,qe.CR)(l[1],2),p=d[0],g=d[1],y=(0,qe.CR)(c?function(t,e,n){void 0===n&&(n=[0,0]);var r=(0,qe.CR)([t,e,n],3),i=(0,qe.CR)(r[0],2),o=i[0],a=i[1],s=(0,qe.CR)(r[1],2),c=s[0],l=s[1],u=(0,qe.CR)(r[2],2),f=u[0],h=u[1],d=(0,qe.CR)([c-o,l-a],2),p=d[0],g=d[1],y=Math.sqrt(Math.pow(p,2)+Math.pow(g,2)),v=(0,qe.CR)([-f/y,h/y],2),m=v[0],b=v[1];return[m*p,m*g,b*p,b*g]}(o,a,c):new Array(4).fill(0),4),v=y[0],m=y[1],b=y[2],x=y[3],w=function(e){return t.selectAll(ey.line.class).data(e,(function(t,e){return e})).join((function(t){return t.append("line").attr("className",(function(t){return"".concat(ey.line.name," ").concat(t.className)})).styles(n).transition((function(t){return Zg(this,$y(t.line),!1)}))}),(function(t){return t.styles(n).transition((function(t){return Zg(this,$y(t.line),r.update)}))}),(function(t){return t.remove()})).transitions()};if(!i||!s)return w([{line:[[f+v,h+m],[p+b,g+x]],className:ey.line.name}]);var O=(0,qe.CR)(s,2),k=O[0],M=O[1],_=p-f,E=g-h,S=(0,qe.CR)([f+_*k,h+E*k],2),A=S[0],j=S[1],T=(0,qe.CR)([f+_*M,h+E*M],2),P=T[0],C=T[1],R=w([{line:[[f+v,h+m],[A,j]],className:ey.lineFirst.name},{line:[[P,C],[p+b,g+x]],className:ey.lineSecond.name}]);return function(t,e){e.truncRange,e.truncShape,e.lineExtension}(0,e),R}function qy(t,e,n){var r,i=e.type,o=py(e,"line");return r="linear"===i?Gy(t,e,Ty(o,"arrow"),n):Wy(t,e,Ty(o,"arrow"),n),function(t,e,n,r){var i,o=n.showArrow,a=n.showTrunc,s=n.lineArrow,c=n.lineArrowOffset,l=n.lineArrowSize;if(i="arc"===e?t.select(ey.line.class):a?t.select(ey.lineSecond.class):t.select(ey.line.class),!o||!s||"arc"===n.type&&zy(n.startAngle,n.endAngle)){var u=i.node();u&&(u.style.markerEnd=void 0)}else{var f=Ay(s);f.attr(r),jy(f,l,!0),i.style("markerEnd",f).style("markerEndOffset",-c)}}(t,i,e,o),r}function Yy(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Hy(t,e){var n=e.gridLength;return t.map((function(t,r){var i=t.value,o=(0,qe.CR)(Dy(i,e),2),a=o[0],s=o[1],c=(0,qe.CR)(ny(function(t,e){return Ny(t,e.gridDirection,e)}(i,e),n),2);return{id:r,points:[[a,s],[a+c[0],s+c[1]]]}}))}function Vy(t,e,n,r){var i=py(n,"grid"),o=i.type,a=i.areaFill,s=Yy(n),c=Cy(e,n.gridFilter),l="segment"===o?Hy(c,n):function(t,e){var n=e.gridControlAngles,r=Yy(e);if(!r)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(!n||0===n.length)throw new Error("Invalid gridControlAngles");var i=(0,qe.CR)(r,2),o=i[0],a=i[1];return t.map((function(t,r){var i=t.value,s=(0,qe.CR)(Dy(i,e),2),c=s[0],l=s[1],u=(0,qe.CR)([c-o,l-a],2),f=u[0],h=u[1],d=[];return n.forEach((function(t){var e=ly(t),n=(0,qe.CR)([Math.cos(e),Math.sin(e)],2),r=n[0],i=n[1],s=f*r-h*i+o,c=f*i+h*r+a;d.push([s,c])})),{points:d,id:r}}))}(c,n),u=(0,qe.pi)((0,qe.pi)({},i),{center:s,areaFill:Fn(a)?c.map((function(t,e){return vy(a,[t,e,c])})):a,animate:r,data:l});return t.selectAll(ey.grid.class).data([1]).join((function(t){return t.append((function(){return new Ey({style:u})})).attr("className",ey.grid.name)}),(function(t){return t.transition((function(){return this.update(u)}))}),(function(t){return t.remove()})).transitions()}function Uy(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!1),!!(r&&t===e||i&&t===n)||t>e&&t<n}function Xy(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}var Ky,Qy,Jy=new Map;var tv,ev,nv,rv=(tv=function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return Qy?Qy(t,n):(Ky||(Ky=Xc.offscreenCanvasCreator.getOrCreateContext(void 0)),Ky.font=[o,a,i,"".concat(n,"px"),r].join(" "),Ky.measureText(t).width)},ev=function(t,e){return[t,Object.values(e||iv(t)).join()].join("")},void 0===(nv=4096)&&(nv=128),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ev?ev.apply(this,t):t[0];Jy.has(tv)||Jy.set(tv,Xy(nv));var r=Jy.get(tv);if(r.has(n))return r.get(n);var i=tv.apply(this,t);return r.set(n,i),i}),iv=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,o=t.style.fontSize;return{fontSize:o="object"==typeof o?o.value:o,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function ov(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function av(t,e){var n=ov(t);n&&n.attr(e)}function sv(t,e,n){void 0===n&&(n="..."),av(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function cv(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,(function(e,n,r){return"translate(".concat(function(t,e,n){var r=t.getBBox(),i=r.width,o=r.height,a=(0,qe.CR)([e,n].map((function(t,e){var n;return t.includes("%")?parseFloat((null===(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))||void 0===n?void 0:n[0])||"0")/100*(0===e?i:o):t})),2);return[a[0],a[1]]}(t,n,r),")")}));t.attr("transform",n)}catch(t){}}function lv(t){if(ze(t))return[t,t,t,t];if(xn(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var uv=function(){function t(t,e,n,r){this.set(t,e,n,r)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(t,e,n){var r=this,i=r.x1,o=r.y1,a=r.x2,s=r.y2,c=Math.cos(t),l=Math.sin(t),u=e-e*c+n*l,f=n-e*l-n*c;return[[c*i-l*s+u,l*i+c*s+f],[c*a-l*s+u,l*a+c*s+f],[c*i-l*o+u,l*i+c*o+f],[c*a-l*o+u,l*a+c*o+f]]},t.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function fv(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getBounds(),i=(0,qe.CR)(r.min,2),o=i[0],a=i[1],s=(0,qe.CR)(r.max,2),c=s[0],l=s[1],u=t.getBBox(),f=u.width,h=u.height,d=0,p=0,g=o,y=a,v=ov(t);if(v){h-=1.5;var m=v.style.textAlign,b=v.style.textBaseline;"center"===m?g=(o+c)/2:"right"!==m&&"end"!==m||(g=c),"middle"===b?y=(a+l)/2:"bottom"===b&&(y=l)}var x=(0,qe.CR)(lv(e),4),w=x[0],O=void 0===w?0:w,k=x[1],M=void 0===k?0:k,_=x[2],E=void 0===_?O:_,S=x[3],A=new uv((d+=o)-(void 0===S?M:S),(p+=a)-O,d+f+M,p+h+E);return t.setEulerAngles(n),A.rotatedPoints(ly(n),g,y)}function hv(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function dv(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function pv(t,e){return e.every((function(e){return function(t,e){var n=t.length;if(n<3)return!1;var r,i,o,a,s,c,l=[e,[9999,e[1]]],u=0,f=0;do{var h=[t[f],t[(f+1)%n]];if(i=l,o=void 0,a=void 0,s=void 0,c=void 0,o=dv((r=h)[0],r[1],i[0]),a=dv(r[0],r[1],i[1]),s=dv(i[0],i[1],r[0]),c=dv(i[0],i[1],r[1]),o!==a&&s!==c||0===o&&hv(r,i[0])||0===a&&hv(r,i[1])||0===s&&hv(i,r[0])||0===c&&hv(i,r[1])){if(0===dv(h[0],e,h[1]))return hv(h,e);u++}f=(f+1)%n}while(0!==f);return!!(1&u)}(t,e)}))}function gv(t,e){var n=(0,qe.CR)(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=(0,qe.CR)(e,4),c=s[0],l=s[1],u=o-r,f=a-i,h=s[2]-c,d=s[3]-l,p=u*d-h*f;if(0===p)return!1;var g=p>0,y=r-c,v=i-l,m=u*v-f*y;if(m<0===g)return!1;var b=h*v-d*y;return b<0!==g&&(m>p!==g&&b>p!==g)}function yv(t,e){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some((function(t){return gv(e,t)}))}function vv(t,e,n){var r,i,o=e.crossPadding,a=new Set,s=null,c=function(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if("arc"===n){var o=t.center,a=t.radius,s=(0,qe.CR)(o,2),c=s[0],l=s[1],u="negative"===r?0:i,f=-a-u,h=a+u,d=(0,qe.CR)(lv(e),4),p=d[0],g=d[1],y=d[2],v=d[3];return new uv(c+f-v,l+f-p,c+h+g,l+h+y)}var m=(0,qe.CR)(t.startPos,2),b=m[0],x=m[1],w=(0,qe.CR)(t.endPos,2),O=w[0],k=w[1],M=(0,qe.CR)(Fy(t)?[-e,0,e,0]:[0,e,0,-e],4),_=M[0],E=M[1],S=M[2],A=M[3],j=ny(Iy(0,t),i),T=new uv(b,x,O,k);return T.x1+=A,T.y1+=_,T.x2+=E+j[0],T.y2+=S+j[1],T}(e,o),l=function(t){return!c||function(t,e,n){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;return pv([[r,o],[i,o],[i,a],[r,a]],fv(e,n))}(c,t)},u=function(t,e){return!t||!t.firstChild||!function(t,e,n){var r,i,o=fv(t,n).flat(1),a=fv(e,n).flat(1),s=[[o[0],o[1],o[2],o[3]],[o[0],o[1],o[4],o[5]],[o[4],o[5],o[6],o[7]],[o[2],o[3],o[6],o[7]]];try{for(var c=(0,qe.XA)(s),l=c.next();!l.done;l=c.next())if(yv(a,l.value))return!0}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return!1}(t.firstChild,e.firstChild,lv(n))};try{for(var f=(0,qe.XA)(t),h=f.next();!h.done;h=f.next()){var d=h.value;l(d)?!s||u(s,d)?s=d:(a.add(s),a.add(d)):a.add(d)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return Array.from(a)}function mv(t,e){return void 0===e&&(e={}),We(t)?0:"number"==typeof t?t:Math.floor(rv(t,e))}var bv=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function xv(t){var e=t.getLocalBounds(),n=e.min,r=e.max,i=(0,qe.CR)([n,r],2),o=(0,qe.CR)(i[0],2),a=o[0],s=o[1],c=(0,qe.CR)(i[1],2),l=c[0],u=c[1];return{x:a,y:s,width:l-a,height:u-s,left:a,bottom:u,top:s,right:l}}function wv(t,e){var n=(0,qe.CR)(t,2),r=n[0],i=n[1],o=(0,qe.CR)(e,2),a=o[0],s=o[1];return r!==a&&i===s}var Ov=function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter((function(t,e){return!(e%r)||(Ng(t),!1)}))};var kv=new Map([["hide",function(t,e,n,r){var i=t.length,o=e.keepHeader,a=e.keepTail;if(!(i<=1||2===i&&o&&a)){var s,c,l,u=Ov,f=function(t){return t.forEach(r.show),t},h=2,d=t.slice(),p=t.slice(),g=Math.min.apply(Math,(0,qe.ev)([1],(0,qe.CR)(t.map((function(t){return t.getBBox().width}))),!1));if("linear"===n.type&&(By(n)||Fy(n))){var y=xv(t[0]).left,v=xv(t[i-1]).right,m=Math.abs(v-y)||1;h=Math.max(Math.floor(i*g/m),h)}for(o&&(s=d.splice(0,1)[0]),a&&(c=d.splice(-1,1)[0],d.reverse()),f(d);h<t.length&&vv((l=c?(0,qe.ev)((0,qe.ev)([c],(0,qe.CR)(p),!1),[s],!1):(0,qe.ev)([s],(0,qe.CR)(p),!1),l.filter(bv)),n,null==e?void 0:e.margin).length;){if(c&&!s&&h%2==0)d.splice(0,1).forEach(r.hide);else if(c&&s){d.splice(0,1).forEach(r.hide)}p=u(f(d),{seq:h}),h++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,s=void 0===a?[0,45,90]:a,c=e.margin,l=e.recoverWhenFailed,u=void 0===l||l,f=t.map((function(t){return t.getLocalEulerAngles()})),h=function(e){return t.forEach((function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)}))};try{for(var d=(0,qe.XA)(s),p=d.next();!p.done;p=d.next()){if(h(p.value),vv(t,n,c).length<1)return}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}u&&h(f)}],["ellipsis",function(t,e,n,r){if(!(t.length<=0)){var i=e.suffix,o=void 0===i?"...":i,a=e.minLength,s=e.maxLength,c=void 0===s?1/0:s,l=e.step,u=void 0===l?" ":l,f=e.margin,h=void 0===f?[0,0,0,0]:f,d=iv(r.getTextShape(t[0])),p=mv(u,d),g=a?mv(a,d):p,y=mv(c,d);(We(y)||y===1/0)&&(y=Math.max.apply(null,t.map((function(t){return t.getBBox().width}))));for(var v=t.slice(),m=(0,qe.CR)(h,4),b=(m[0],m[1],m[2],m[3],function(e){if(v.forEach((function(t){r.ellipsis(r.getTextShape(t),e,o)})),(v=vv(t,n,h)).length<1)return{value:void 0}}),x=y;x>g+p;x-=p){var w=b(x);if("object"==typeof w)return w.value}}}],["wrap",function(t,e,n,r,i){var o,a=e.maxLines,s=void 0===a?3:a,c=e.recoverWhenFailed,l=void 0===c||c,u=e.margin,f=void 0===u?[0,0,0,0]:u,h=vy(null!==(o=e.wordWrapWidth)&&void 0!==o?o:50,[i]),d=t.map((function(t){return t.attr("maxLines")||1})),p=Math.min.apply(Math,(0,qe.ev)([],(0,qe.CR)(d),!1)),g=function(){return vv(t,n,f).length<1},y=function(t){var e=t.type,n=t.labelDirection;return"linear"===e&&By(t)?"negative"===n?"bottom":"top":"middle"}(n),v=function(e){return t.forEach((function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,h,i,y)}))};if(!(p>s)){if("linear"===n.type&&By(n)){if(v(s),g())return}else for(var m=p;m<=s;m++)if(v(m),g())return;l&&v(d)}}]]);function Mv(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return"positive"===t?-1:1};return t.reduce((function(t,e){return t*n(e)}),1)}function _v(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function Ev(t,e){var n=(0,qe.CR)(t,2),r=n[0],i=n[1],o=(0,qe.CR)(e,2),a=o[0],s=o[1],c=(0,qe.CR)([r*a+i*s,r*s-i*a],2),l=c[0],u=c[1];return Math.atan2(u,l)}function Sv(t,e,n){var r,i=n.labelAlign;if(null===(r=e.style.transform)||void 0===r?void 0:r.includes("rotate"))return e.getLocalEulerAngles();var o=Iy(t.value,n),a=Ly(t.value,n);return"horizontal"===i?0:function(t){var e=(t+360)%180;return Uy(e,-90,90)||(e+=180),e}(uy("perpendicular"===i?Ev([1,0],o):Ev([a[0]<0?-1:1,0],a)))}function Av(t,e,n){var r=n.type,i=n.labelAlign,o=Iy(t,n),a=_v(e),s=_v(uy(Ev([1,0],o))),c="center",l="middle";return"linear"===r?[90,270].includes(s)&&0===a?(c="center",l=1===o[1]?"top":"bottom"):s%180||![90,270].includes(a)?0===s?(Uy(a,0,90,!1,!0)||Uy(a,0,90)||Uy(a,270,360))&&(c="start"):90===s?Uy(a,0,90,!1,!0)?c="start":(Uy(a,90,180)||Uy(a,270,360))&&(c="end"):270===s?Uy(a,0,90,!1,!0)?c="end":(Uy(a,90,180)||Uy(a,270,360))&&(c="start"):180===s&&(90===a?c="start":(Uy(a,0,90)||Uy(a,270,360))&&(c="end")):c="center":"parallel"===i?l=Uy(s,0,180,!0)?"top":"bottom":"horizontal"===i?Uy(s,90,270,!1)?c="end":(Uy(s,270,360,!1)||Uy(s,0,90))&&(c="start"):"perpendicular"===i&&(c=Uy(s,90,270)?"end":"start"),{textAlign:c,textBaseline:l}}function jv(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,s=n.labelSpacing,c=e.indexOf(t),l=vy(s,[t,c,e]),u=(0,qe.CR)([Iy(t.value,n),Mv(a,o)],2),f=u[0],h=1===u[1]?vy(r?i:0,[t,c,e]):0,d=(0,qe.CR)(ry(ny(f,l+h),Dy(t.value,n)),2);return{x:d[0],y:d[1]}}function Tv(t,e,n,r){var i=r.labelRender,o=(Dh(r,"endPos.0",400)-Dh(r,"startPos.0",0))/n.length,a=Fn(i)?vy(i,[t,e,n,Iy(t.value,r)]):t.label||"",s=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body.firstElementChild;if(console.log(null==e?void 0:e.getClientRects(),11),!e)return 0;var n=e.getAttribute("style")||"",r=Object.fromEntries(n.split(";").map((function(t){return t.trim()})).filter((function(t){return t.includes(":")})).map((function(t){var e=(0,qe.CR)(t.split(":").map((function(t){return t.trim()})),2),n=e[0],r=e[1];return[n.toLowerCase(),r]}))),i=function(t){if(!t)return 0;var e=t.match(/([\d.]+)px/);return e?parseFloat(e[1]):0};if(r.height)return i(r.height);var o,a=i(r["font-size"])||16,s=r["line-height"];o=s&&"normal"!==s?s.endsWith("px")?i(s):/^[\d.]+$/.test(s)?parseFloat(s)*a:a:1.2*a;var c=i(r["padding-top"]),l=i(r["padding-bottom"]);r.padding&&(1===(u=r.padding.split(/\s+/).map(i)).length||2===u.length?(c=u[0],l=u[0]):(3===u.length||4===u.length)&&(c=u[0],l=u[2]));var u,f=i(r["border-top-width"]),h=i(r["border-bottom-width"]);if(r.border){var d=r.border.match(/([\d.]+)px/);d&&(f=parseFloat(d[1]),h=parseFloat(d[1]))}return r["border-width"]&&(1===(u=r["border-width"].split(/\s+/).map(i)).length||2===u.length?(f=u[0],h=u[0]):(3===u.length||4===u.length)&&(f=u[0],h=u[2])),o+c+l+f+h}(a)||30;return function(){return e={width:o,height:s},"function"==typeof(t=a)?t():$e(t)||ze(t)?new yl({style:(0,qe.pi)((0,qe.pi)({},e),{innerHTML:String(t)})}):t;var t,e}}function Pv(t,e){["text","html"].includes(t.nodeName)&&t.attr(e)}function Cv(t,e){!function(t,e,n,r){var i=e.labelOverlap,o=void 0===i?[]:i;o.length&&o.forEach((function(i){var o=i.type,a=kv.get(o);(function(t,e,n){return!(e.labelOverlap.length<1)&&("hide"===n?!function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(t[0]):"rotate"===n?!t.some((function(t){var e;return!!(null===(e=t.attr("transform"))||void 0===e?void 0:e.includes("rotate"))})):"ellipsis"!==n&&"wrap"!==n||t.filter((function(t){return t.querySelector("text")})).length>=1)})(t,e,o)&&(null==a||a(t,i,e,r,n))}))}(this.node().childNodes,t,e,{hide:Ng,show:Lg,rotate:function(e,n){!function(t,e,n){e.setLocalEulerAngles(t);var r=Av(e.__data__.value,t,n),i=e.querySelector(ey.labelItem.class);i&&Pv(i,r)}(+n,e,t)},ellipsis:function(t,e,n){t&&sv(t,e||1/0,n)},wrap:function(t,e,n){var r,i;t&&(void 0===(r=n)&&(r=2),void 0===i&&(i="top"),av(t,{wordWrap:!0,wordWrapWidth:e,maxLines:r,textBaseline:i}))},getTextShape:function(t){return t.querySelector("text")}})}function Rv(t,e,n,r,i){var o=n.indexOf(e),a=i.labelRender,s=Qg(t).append(a?Tv(e,o,n,i):function(t,e,n,r){var i=r.labelFormatter;return Fn(i)?function(){return Ay(vy(i,[t,e,n,Iy(t.value,r)]))}:function(){return Ay(t.label||"")}}(e,o,n,i)).attr("className",ey.labelItem.name).node(),c=(0,qe.CR)(yy(Py(r,[e,o,n])),2),l=c[0],u=c[1],f=u.transform,h=(0,qe._T)(u,["transform"]);cv(s,f);var d=Sv(e,s,i);return s.getLocalEulerAngles()||s.setLocalEulerAngles(d),Pv(s,(0,qe.pi)((0,qe.pi)({},Av(e.value,d,i)),l)),t.attr(h),s}function Lv(t,e,n,r,i){var o,a,s,c=Cy(e,n.labelFilter),l=py(n,"label"),u=t.selectAll(ey.label.class).data(c,(function(t,e){return e})).join((function(t){return t.append("g").attr("className",ey.label.name).transition((function(t){Rv(this,t,e,l,n);var r=jv(t,e,n),i=r.x,o=r.y;return this.style.transform="translate(".concat(i,", ").concat(o,")"),null}))}),(function(t){return t.transition((function(t){var i=function(t,e,n,r){if(void 0===r&&(r="destroy"),function(t,e){return"text"===t.nodeName&&"text"===e.nodeName&&t.attributes.text===e.attributes.text}(t,e))return t.remove(),[null];var i=function(){"destroy"===r?t.destroy():"hide"===r&&Ng(t),e.isVisible()&&Lg(e)};if(!n)return i(),[null];var o=n.duration,a=void 0===o?0:o,s=n.delay,c=void 0===s?0:s,l=Math.ceil(+a/2),u=+a/4,f=(0,qe.CR)(t.getGeometryBounds().center,2),h=f[0],d=f[1],p=(0,qe.CR)(e.getGeometryBounds().center,2),g=p[0],y=p[1],v=(0,qe.CR)([(h+g)/2-h,(d+y)/2-d],2),m=v[0],b=v[1],x=t.style.opacity,w=void 0===x?1:x,O=e.style.opacity,k=void 0===O?1:O,M=t.style.transform||"",_=e.style.transform||"",E=t.animate([{opacity:w,transform:"translate(0, 0) ".concat(M)},{opacity:0,transform:"translate(".concat(m,", ").concat(b,") ").concat(M)}],(0,qe.pi)((0,qe.pi)({fill:"both"},n),{duration:c+l+u})),S=e.animate([{opacity:0,transform:"translate(".concat(-m,", ").concat(-b,") ").concat(_),offset:.01},{opacity:k,transform:"translate(0, 0) ".concat(_)}],(0,qe.pi)((0,qe.pi)({fill:"both"},n),{duration:l+u,delay:c+l-u}));return Bg(S,i),[E,S]}(this.querySelector(ey.labelItem.class),Rv(this,t,e,l,n),r.update),o=jv(t,e,n),a=o.x,s=o.y,c=Zg(this,{transform:"translate(".concat(a,", ").concat(s,")")},r.update);return(0,qe.ev)((0,qe.ev)([],(0,qe.CR)(i),!1),[c],!1)}))}),(function(t){return o=t,t.transition((function(){var t=this,e=my(this.childNodes[0],r.exit);return Bg(e,(function(){return Qg(t).remove()})),e})),o})).transitions();return s=function(){Cv.call(t,n,i)},0===(a=u).length?s():Promise.all(a.map((function(t){return null==t?void 0:t.finished}))).then(s),u}function Nv(t,e){return Ny(t,e.tickDirection,e)}function Iv(t,e,n,r,i){var o=i.tickLength,a=(0,qe.CR)(function(t,e){var n=(0,qe.CR)(t,2);return[[0,0],[n[0]*e,n[1]*e]]}(r,vy(o,[t,e,n])),2),s=(0,qe.CR)(a[0],2),c=s[0],l=s[1],u=(0,qe.CR)(a[1],2);return{x1:c,x2:u[0],y1:l,y2:u[1]}}function Dv(t,e,n,r,i,o){var a=function(t,e,n,r,i){var o=i.tickFormatter,a=Nv(e.value,i),s="line";return Fn(o)&&(s=function(){return vy(o,[e,n,r,a])}),t.append(s).attr("className",ey.tickItem.name)}(Qg(this),t,e,n,r);!function(t,e,n,r,i,o,a){var s=Nv(t.value,o),c=Iv(t,e,n,s,o),l=c.x1,u=c.x2,f=c.y1,h=c.y2,d=(0,qe.CR)(yy(Py(a,[t,e,n,s])),2),p=d[0],g=d[1];"line"===r.node().nodeName&&r.styles((0,qe.pi)({x1:l,x2:u,y1:f,y2:h},p)),i.attr(g),r.styles(p)}(t,e,n,a,this,r,i);var s=(0,qe.CR)(Dy(t.value,r),2),c=s[0],l=s[1];return Zg(this,{transform:"translate(".concat(c,", ").concat(l,")")},o)}function Bv(t){return/\S+-\S+/g.test(t)?t.split("-").map((function(t){return t[0]})):t.length>2?[t[0]]:t.split("")}function Fv(t,e,n,r,i){var o=py(r,"title"),a=(0,qe.CR)(yy(o),2),s=a[0],c=a[1],l=c.transform,u=c.transformOrigin,f=(0,qe._T)(c,["transform","transformOrigin"]);e.styles(f);var h=l||function(t,e,n){var r=2*t.getGeometryBounds().halfExtents[1];if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(r/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(r/2,")")}return""}(t.node(),s.direction,s.position);t.styles((0,qe.pi)((0,qe.pi)({},s),{transformOrigin:u})),cv(t.node(),h);var d=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=Bv(i),s=t.node().getLocalBounds(),c=(0,qe.CR)(s.min,2),l=c[0],u=c[1],f=(0,qe.CR)(s.halfExtents,2),h=f[0],d=f[1],p=(0,qe.CR)(e.node().getLocalBounds().halfExtents,2),g=p[0],y=p[1],v=(0,qe.CR)([l+h,u+d],2),m=v[0],b=v[1],x=(0,qe.CR)(lv(o),4),w=x[0],O=x[1],k=x[2],M=x[3];if(["start","end"].includes(i)&&"linear"===n.type){var _=n.startPos,E=n.endPos,S=(0,qe.CR)("start"===i?[_,E]:[E,_],2),A=S[0],j=S[1],T=cy([-j[0]+A[0],-j[1]+A[1]]),P=(0,qe.CR)(ny(T,w),2),C=P[0],R=P[1];return{x:A[0]+C,y:A[1]+R}}return a.includes("t")&&(b-=d+y+w),a.includes("r")&&(m+=h+g+O),a.includes("l")&&(m-=h+g+M),a.includes("b")&&(b+=d+y+k),{x:m,y:b}}(Qg(n._offscreen||n.querySelector(ey.mainGroup.class)),e,r),p=d.x,g=d.y;return Zg(e.node(),{transform:"translate(".concat(p,", ").concat(g,")")},i)}function zv(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,s=Vg(i,e.maybeAppendByClassName(ey.lineGroup,"g"),(function(e){return qy(e,t,r)}))||[],c=Vg(o,e.maybeAppendByClassName(ey.tickGroup,"g"),(function(e){return function(t,e,n,r){var i=Cy(e,n.tickFilter),o=py(n,"tick");return t.selectAll(ey.tick.class).data(i,(function(t){return t.id||t.label})).join((function(t){return t.append("g").attr("className",ey.tick.name).transition((function(t,e){return Dv.call(this,t,e,i,n,o,!1)}))}),(function(t){return t.transition((function(t,e){return this.removeChildren(),Dv.call(this,t,e,i,n,o,r.update)}))}),(function(t){return t.transition((function(){var t=this,e=my(this.childNodes[0],r.exit);return Bg(e,(function(){return t.remove()})),e}))})).transitions()}(e,n,t,r)}))||[],l=Vg(a,e.maybeAppendByClassName(ey.labelGroup,"g"),(function(i){return Lv(i,n,t,r,e.node())}))||[];return(0,qe.ev)((0,qe.ev)((0,qe.ev)([],(0,qe.CR)(s),!1),(0,qe.CR)(c),!1),(0,qe.CR)(l),!1).filter((function(t){return!!t}))}var Zv=function(t){function e(e){return t.call(this,e,ty)||this}return(0,qe.ZT)(e,t),e.prototype.render=function(t,e,n){var r=this,i=t.titleText,o=t.data,a=t.animate,s=t.showTitle,c=t.showGrid,l=t.dataThreshold,u=t.truncRange,f=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(o,l).filter((function(t){var e=t.value;return!(u&&e>u[0]&&e<u[1])})),h=Dg(void 0===n?a:n),d=Vg(c,Qg(e).maybeAppendByClassName(ey.gridGroup,"g"),(function(e){return Vy(e,f,t,h)}))||[],p=Qg(e).maybeAppendByClassName(ey.mainGroup,"g");i&&(!this.initialized&&h.enter||this.initialized&&h.update)&&zv(t,Qg(this.offscreenGroup),f,Dg(!1));var g=zv(t,Qg(p.node()),f,h),y=Vg(s,Qg(e).maybeAppendByClassName(ey.titleGroup,"g"),(function(e){return function(t,e,n,r){var i=n.titleText;return t.selectAll(ey.title.class).data([{title:i}].filter((function(t){return!!t.title})),(function(t,e){return t.title})).join((function(o){return o.append((function(){return Ay(i)})).attr("className",ey.title.name).transition((function(){return Fv(Qg(this),t,e,n,r.enter)}))}),(function(i){return i.transition((function(){return Fv(Qg(this),t,e,n,r.update)}))}),(function(t){return t.remove()})).transitions()}(e,r,t,h)}))||[];return(0,qe.ev)((0,qe.ev)((0,qe.ev)([],(0,qe.CR)(d),!1),(0,qe.CR)(g),!1),(0,qe.CR)(y),!1).flat().filter((function(t){return!!t}))},e}(Hg);function Wv(t){if(lg(t)){return t[t.length-1]}}var $v=function(t){return t};function Gv(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function qv(t,...e){return e.reduce(((t,e)=>n=>t(e(n))),t)}function Yv(t,e,n,r,i){let o=n||0,a=r||t.length;const s=i||(t=>t);for(;o<a;){const n=Math.floor((o+a)/2);s(t[n])>e?a=n:o=n+1}return o}var Hv=n(7945),Vv=n.n(Hv);function Uv(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Xv(t){const e=Vv().get(t);if(!e)return null;const{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];const o=r<.5?r*(1+n):r+n-r*n,a=2*r-o;return[255*Uv(a,o,e+1/3),255*Uv(a,o,e),255*Uv(a,o,e-1/3),i]}(r):null}const Kv=(t,e)=>n=>t*(1-n)+e*n,Qv=(t,e)=>"number"==typeof t&&"number"==typeof e?Kv(t,e):"string"==typeof t&&"string"==typeof e?((t,e)=>{const n=Xv(t),r=Xv(e);return null===n||null===r?n?()=>t:()=>e:t=>{const e=new Array(4);for(let i=0;i<4;i+=1){const o=n[i],a=r[i];e[i]=o*(1-t)+a*t}const[i,o,a,s]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${s})`}})(t,e):()=>t,Jv=(t,e)=>{const n=Kv(t,e);return t=>Math.round(n(t))};function tm(t){return null===t}function em(t){return!Nn(t)&&!tm(t)&&!Number.isNaN(t)}const nm=(t,e,n=5)=>{const r=[t,e];let i,o=0,a=r.length-1,s=r[o],c=r[a];return c<s&&([s,c]=[c,s],[o,a]=[a,o]),i=vd(s,c,n),i>0?(s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i,i=vd(s,c,n)):i<0&&(s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i,i=vd(s,c,n)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(c/i)*i):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(c*i)/i),r};const rm=(t,e,n)=>{const[r,i]=t,[o,a]=e;let s,c;return r<i?(s=Gv(r,i),c=n(o,a)):(s=Gv(i,r),c=n(a,o)),qv(c,s)},im=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=Gv(s[t],s[t+1]),o[t]=n(c[t],c[t+1]);return e=>{const n=Yv(t,e,1,r)-1,a=i[n];return qv(o[n],a)(e)}},om=(t,e,n,r)=>(Math.min(t.length,e.length)>2?im:rm)(t,e,r?Jv:n);class am extends od{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Kv,tickCount:5}}map(t){return em(t)?this.output(t):this.options.unknown}invert(t){return em(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice||xn(this.options.breaks))return;const[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){const{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return nm}rescale(){this.nice();const[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){const{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){const n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):$v}composeOutput(t,e){const{domain:n,range:r,round:i,interpolate:o}=this.options,a=om(n.map(t),r,o,i);this.output=qv(a,e,t)}composeInput(t,e,n){const{domain:r,range:i}=this.options,o=om(i,r.map(t),Kv);this.input=qv(e,n,o)}}class sm extends am{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Qv,tickMethod:bd,tickCount:5}}removeUnsortedValues(t,e,n){let r=-1/0;const i=e.reduce(((t,i,o)=>{if(0===o)return t;const a=r>0?r:i;if(r>0&&(n?i>r:i<r))t.push(o);else{(a-e[o-1])*(n?-1:1)<0?(r<0&&(r=e[o-1]),t.push(o)):r=-1/0}return t}),[]);return i.slice().reverse().forEach((n=>{t.splice(n,1),e.splice(n,1)})),{breaksDomain:t,breaksRange:e}}transformDomain(t){const{domain:e=[],range:n=[1,0],breaks:r=[],tickCount:i=5,nice:o}=t,[a,s]=[Math.min(...e),Math.max(...e)];let c=a,l=s;if(o&&r.length<2){const t=this.chooseNice()(a,s,i);c=t[0],l=t[t.length-1]}const u=Math.min(c,a);let f=Math.max(l,s);const h=r.filter((({end:t})=>t<f)).sort(((t,e)=>t.start-e.start)),d=bd(u,f,i,h);if(Wv(d)<f){const t=nm(0,f-Wv(d),3);d.push(Wv(d)+Wv(t)),f=Wv(d)}const[p,g]=[n[0],Wv(n)],y=f-u,v=Math.abs(g-p),m=p>g,b=d.map((t=>{const e=(t-u)/y;return m?p-e*v:p+e*v})),[x,w]=[.2,.8];return h.forEach((({start:t,end:e,gap:n=.03,compress:r="middle"})=>{const i=d.indexOf(t),o=d.indexOf(e);let a=(b[i]+b[o])/2;"start"===r&&(a=b[i]),"end"===r&&(a=b[o]);const s=n*v/2;let c=m?a+s:a-s,l=m?a-s:a+s;c<x&&(l+=x-c,c=x),l>w&&(c-=l-w,l=w),c>w&&(l-=c-w,c=w),l<x&&(c+=x-l,l=x),b[i]=c,b[o]=l})),this.removeUnsortedValues(d,b,m)}transformBreaks(t){const{domain:e,breaks:n=[]}=t;if(!xn(t.breaks))return t;const r=Math.max(...e),i=n.filter((({end:t})=>t<r)),o={...t,breaks:i},{breaksDomain:a,breaksRange:s}=this.transformDomain(o);return{...t,domain:a,range:s,breaks:i,tickMethod:()=>[...a]}}chooseTransforms(){return[$v,$v]}clone(){return new sm(this.options)}}var cm=function(t,e){if(t)if(xn(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(zn(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break},lm=function(t,e,n){if(!xn(t)&&!Xh(t))return t;var r=n;return cm(t,(function(t,n){r=e(r,t,n)})),r},um=function(t,e){return lm(t,(function(t,n,r){return e.includes(r)||(t[r]=n),t}),{})};function fm(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}var hm=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}();function dm(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++){var a=t[o],s=a.x,c=a.y,l=a.width,u=a.height,f=(0,qe.CR)([s+l,c+u],2),h=f[0],d=f[1];s<e&&(e=s),c<n&&(n=c),h>r&&(r=h),d>i&&(i=d)}return new hm(e,n,r-e,i-n)}var pm=function(t,e,n){var r=t.width,i=t.height,o=n.flexDirection,a=void 0===o?"row":o,s=(n.flexWrap,n.justifyContent),c=void 0===s?"flex-start":s,l=(n.alignContent,n.alignItems),u=void 0===l?"flex-start":l,f="row"===a,h="row"===a||"column"===a,d=f?h?[1,0]:[-1,0]:h?[0,1]:[0,-1],p=(0,qe.CR)([0,0],2),g=p[0],y=p[1],v=e.map((function(t){var e,n=t.width,r=t.height,i=(0,qe.CR)([g,y],2),o=i[0],a=i[1];return e=(0,qe.CR)([g+n*d[0],y+r*d[1]],2),g=e[0],y=e[1],new hm(o,a,n,r)})),m=dm(v),b={"flex-start":0,"flex-end":f?r-m.width:i-m.height,center:f?(r-m.width)/2:(i-m.height)/2},x=v.map((function(t){var e=t.x,n=t.y,r=hm.fromRect(t);return r.x=f?e+b[c]:e,r.y=f?n:n+b[c],r})),w=(dm(x),function(t){var e=(0,qe.CR)(f?["height",i]:["width",r],2),n=e[0],o=e[1];switch(u){case"flex-start":default:return 0;case"flex-end":return o-t[n];case"center":return o/2-t[n]/2}}),O=x.map((function(t){var e=t.x,n=t.y,r=hm.fromRect(t);return r.x=f?e:e+w(r),r.y=f?n+w(r):n,r})),k=O.map((function(e){var n,r,i=hm.fromRect(e);return i.x+=null!==(n=t.x)&&void 0!==n?n:0,i.y+=null!==(r=t.y)&&void 0!==r?r:0,i}));return k},gm=function(t,e,n){return[]},ym=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[bc.BOUNDS_CHANGED,bc.INSERTED,bc.REMOVED],n.$margin=lv(0),n.$padding=lv(0);var r=e.style||{},i=r.margin,o=void 0===i?0:i,a=r.padding,s=void 0===a?0:a;return n.margin=o,n.padding=s,n.isMutationObserved=!0,n.bindEvents(),n}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=lv(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=lv(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=void 0===e?0:e,r=t.y,i=void 0===r?0:r,o=t.width,a=t.height,s=(0,qe.CR)(this.$margin,4),c=s[0],l=s[1],u=s[2],f=s[3];return new hm(n-f,i-c,o+f+l,a+c+u)},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=(0,qe.CR)(this.$padding,4),i=r[0],o=r[1],a=r[2],s=r[3],c=(0,qe.CR)(this.$margin,4),l=c[0],u=c[3];return new hm(s+u,i+l,e-s-o,n-i-a)},e.prototype.layout=function(){if(this.attributes.display&&this.isConnected&&!this.children.some((function(t){return!t.isConnected})))try{var t=this.attributes,e=t.x,n=t.y;this.style.transform="translate(".concat(e,", ").concat(n,")");var r=function(t,e,n){if(0===e.length)return[];var r={flex:pm,grid:gm},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]}(this.getAvailableSpace(),this.children.map((function(t){return t.getBBox()})),this.attributes);this.children.forEach((function(t,e){var n=r[e],i=n.x,o=n.y;t.style.transform="translate(".concat(i,", ").concat(o,")")}))}catch(t){}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach((function(e){t.addEventListener(e,(function(e){e.target&&(e.target.isMutationObserved=!0,t.layout())}))}))},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(pl),vm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function mm(t,e,n){return t.querySelector(e)?zd(t).select(e):zd(t).append(n)}function bm(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function xm(t,e){let{flexDirection:n,justifyContent:r,alignItems:i}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};const o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in o&&([n,r,i]=o[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:i},e)}class wm extends ym{get child(){var t;return null===(t=this.children)||void 0===t?void 0:t[0]}update(t){var e;this.attr(t);const{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n)}}class Om extends wm{update(t){var e;const{subOptions:n}=t;this.attr(t),null===(e=this.child)||void 0===e||e.update(n)}}function km(t,e){var n;return null===(n=t.filter((t=>t.getOptions().name===e)))||void 0===n?void 0:n[0]}function Mm(t){return"vertical"===t||t===-Math.PI/2}function _m(t,e,n){const{bbox:r}=t,{position:i="top",size:o,length:a}=e,s=["top","bottom","center"].includes(i),[c,l]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=n.props,h=o||u||c,d=a||f||l,p=s?"horizontal":"vertical",[g,y]=s?[d,h]:[h,d];return{orientation:p,width:g,height:y,size:h,length:d}}function Em(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=vm(t,["style"]),i={};return Object.entries(r).forEach((([t,n])=>{e.includes(t)?i[`show${$p(t)}`]=n:i[t]=n})),Object.assign(Object.assign({},i),n)}var Sm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function Am(t,e){const{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function jm(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function Tm(t,e,n,r,i,o,a,s){var c;void 0===n&&void 0===o||t.update(Object.assign(Object.assign({},n&&{tickCount:n}),o&&{tickMethod:o}));const l=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;const[r,i]=fm(e,(t=>+t)),{tickCount:o}=t.getOptions();return n(r,i,o)}(t,e,o),u=i?l.filter(i):l,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),h=r||(null===(c=t.getFormatter)||void 0===c?void 0:c.call(t))||f,d=function(t,e){if(Mg(e))return t=>t;const n=e.getOptions(),{innerWidth:r,innerHeight:i,insetTop:o,insetBottom:a,insetLeft:s,insetRight:c}=n,[l,u,f]="left"===t||"right"===t?[o,a,i]:[s,c,r],h=new sm({domain:[0,1],range:[l/f,1-u/f]});return t=>h.map(t)}(a,s),p=function(t,e){const{width:n,height:r}=e.getOptions();return i=>{if(!Ag(e))return i;const o="bottom"===t?[i,1]:[0,i],a=e.map(o);if("bottom"===t){const t=a[0];return new sm({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){const t=a[1];return new sm({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,s),g=t=>["left","right"].includes(t);return Mg(s)||kg(s)?u.map(((e,n,r)=>{var i,o;const c=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,l=d(t.map(e)+c);return{value:_g(s)&&"center"===a||kg(s)&&(null===(o=t.getTicks)||void 0===o?void 0:o.call(t))&&(t=>["top","bottom","center","outer"].includes(t))(a)||kg(s)&&g(a)?1-l:l,label:f(h(bg(e),n,r)),id:String(n)}})):u.map(((e,n,r)=>{var i;const o=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,s=p(d(t.map(e)+o));return{value:g(a)?1-s:s,label:f(h(bg(e),n,r)),id:String(n)}}))}function Pm(t=[],e){if(t.length>0)return t;const{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:o}=e,a=[],s=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return s({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),s({type:"ellipsis",minLength:20},i),s({type:"hide"},r),s({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},o),a}function Cm(t,e,n){return!Tg(e)&&!Sg(e)&&(void 0===t?!!n.getTicks:t)}function Rm(t,e,n,r,i,o){const a=function(t,e,n,r,i,o){const a=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${Ad(i)}`]:n.axisLinear,c=t.getOptions().name,l=n[`axis${$p(c)}`]||{};return Object.assign({},a,s,l)}(t,0,n,0,i);return"center"===i?Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:Mm(o)?10:0,tick:"center"!==r&&void 0}):a}const Lm=t=>e=>{const{labelFormatter:n,labelFilter:r=(()=>!0)}=e;return i=>{var o;const{scales:[a]}=i,s=(null===(o=a.getTicks)||void 0===o?void 0:o.call(a))||a.getOptions().domain,c="string"==typeof n?Jp(n):n,l=Object.assign(Object.assign({},e),{labelFormatter:c,labelFilter:(t,e,n)=>r(s[e],e,s),scale:a});return t(l)(i)}},Nm=Lm((t=>{const{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:o,actualPosition:a,position:s,size:c,style:l={},title:u,tickCount:f,tickFilter:h,tickMethod:d,tickLength:p,transform:g,indexBBox:y}=t,v=Sm(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","tickLength","transform","indexBBox"]);return({scales:i,value:m,coordinate:b,theme:x})=>{const{bbox:w}=m,[O]=i,{domain:k,xScale:M}=O.getOptions(),_=Rm(O,0,x,e,s,o),E=Object.assign(Object.assign(Object.assign({},_),l),v),S=function(t,e,n="xy"){const[r,i,o]=jm(e);return"xy"===n?t.includes("bottom")||t.includes("top")?i:r:"xz"===n?t.includes("bottom")||t.includes("top")?o:r:t.includes("bottom")||t.includes("top")?i:o}(a||s,b,t.plane),A=function(t,e,n,r,i){const{x:o,y:a,width:s,height:c}=n;if("bottom"===t)return{startPos:[o,a],endPos:[o+s,a]};if("left"===t)return{startPos:[o+s,a+c],endPos:[o+s,a]};if("right"===t)return{startPos:[o,a+c],endPos:[o,a]};if("top"===t)return{startPos:[o,a+c],endPos:[o+s,a+c]};if("center"===t){if("vertical"===e)return{startPos:[o,a],endPos:[o,a+c]};if("horizontal"===e)return{startPos:[o,a],endPos:[o+s,a]};if("number"==typeof e){const[t,n]=r.getCenter(),[l,u]=Pg(r),[f,h]=Cg(r),d=Math.min(s,c)/2,{insetLeft:p,insetTop:g}=r.getOptions(),y=l*d,v=u*d,[m,b]=[t+o-p,n+a-g],[x,w]=[Math.cos(e),Math.sin(e)],O=[m+v*x,b+v*w],k=[m+y*x,b+y*w],M=()=>{const{domain:t}=i.getOptions();return t.length},_=Mg(r)&&i?M():3;return{startPos:O,endPos:k,gridClosed:Math.abs(h-f-360)<1e-6,gridCenter:[m,b],gridControlAngles:new Array(_).fill(0).map(((t,e,n)=>(h-f)/_*e))}}}return{}}(s,o,w,b,M),j=function(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(b),T=Tm(O,k,f,r,h,d,s,b),P=y?T.map(((t,e)=>{const n=y.get(e);return n?n[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:n[1]}):t})):T,C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E),{type:"linear",data:P,crossSize:c,titleText:bm(u),labelOverlap:Pm(g,E),grid:Cm(E.grid,b,O),gridLength:S,line:!0,indexBBox:y}),void 0!==p?{tickLength:p}:null),E.line?null:{lineOpacity:0}),A),j),n),R=C.labelOverlap.find((t=>"hide"===t.type));return R&&(C.crossSize=!1),new Zv({className:"axis",style:Em(C)})}})),Im=Lm((t=>{const{order:e,size:n,position:r,orientation:i,labelFormatter:o,tickFilter:a,tickCount:s,tickMethod:c,tickLength:l,important:u={},style:f={},indexBBox:h,title:d,grid:p=!1}=t,g=Sm(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","tickLength","important","style","indexBBox","title","grid"]);return({scales:[t],value:e,coordinate:n,theme:i})=>{const{bbox:f}=e,{domain:y}=t.getOptions(),v=Tm(t,y,s,o,a,c,r,n),m=h?v.map(((t,e)=>{const n=h.get(e);return n?n[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:n[1]}):t})):v,[b,x]=Pg(n),w=function(t,e,n,r,i){const{x:o,y:a,width:s,height:c}=e,l=[o+s/2,a+c/2],u=Math.min(s,c)/2,[f,h]=Cg(i),[d,p]=jm(i),g={center:l,radius:u,startAngle:f,endAngle:h,gridLength:(r-n)*(Math.min(d,p)/2)};if("inner"===t){const{insetLeft:t,insetTop:e}=i.getOptions();return Object.assign(Object.assign({},g),{center:[l[0]-t,l[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},g),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(r,f,b,x,n),{axis:O,axisArc:k={}}=i,M=Em(Jh({},O,k,w,Object.assign(Object.assign(Object.assign({type:"arc",data:m,titleText:bm(d),grid:p},void 0!==l?{tickLength:l}:null),g),u)));return new Zv({style:um(M,["transform"])})}}));Nm.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},Im.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var Dm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function Bm(t,e,n,r){const{radar:i}=t,[o]=r,a=o.getOptions().name,[s,c]=Cg(n),{axisRadar:l={}}=e;return Object.assign(Object.assign({},l),{grid:"position"===a,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map(((t,e)=>(c-s)/i.count*e))})}const Fm=t=>{const{important:e={}}=t,n=Dm(t,["important"]);return r=>{const{theme:i,coordinate:o,scales:a}=r;return Nm(Object.assign(Object.assign(Object.assign({},n),function(t){const e=t%(2*Math.PI);return e===Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&e<Math.PI/2?{titleTransform:"translate(50%, 0)"}:e>Math.PI/2&&e<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{}}(t.orientation)),{important:Object.assign(Object.assign({},Bm(t,i,o,a)),e)}))(r)}};Fm.props=Object.assign(Object.assign({},Nm.props),{defaultPosition:"center"});class zm{constructor(t){this.options=Jh({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Jh({},this.options,t),this.rescale(t)}rescale(t){}}function Zm(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function Wm(t,...e){return e.reduce(((t,e)=>n=>t(e(n))),t)}function $m(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Gm(t){const e=Vv().get(t);if(!e)return null;const{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];const o=r<.5?r*(1+n):r+n-r*n,a=2*r-o;return[255*$m(a,o,e+1/3),255*$m(a,o,e),255*$m(a,o,e-1/3),i]}(r):null}const qm=(t,e)=>n=>t*(1-n)+e*n,Ym=(t,e)=>"number"==typeof t&&"number"==typeof e?qm(t,e):"string"==typeof t&&"string"==typeof e?((t,e)=>{const n=Gm(t),r=Gm(e);return null===n||null===r?n?()=>t:()=>e:t=>{const e=new Array(4);for(let i=0;i<4;i+=1){const o=n[i],a=r[i];e[i]=o*(1-t)+a*t}const[i,o,a,s]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${s})`}})(t,e):()=>t,Hm=(t,e)=>{const n=qm(t,e);return t=>Math.round(n(t))};function Vm(t){return!Nn(t)&&!tm(t)&&!Number.isNaN(t)}const Um=Math.sqrt(50),Xm=Math.sqrt(10),Km=Math.sqrt(2);function Qm(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=Um?10:o>=Xm?5:o>=Km?2:1)*10**i:-(10**-i)/(o>=Um?10:o>=Xm?5:o>=Km?2:1)}const Jm=(t,e,n=5)=>{const r=[t,e];let i,o=0,a=r.length-1,s=r[o],c=r[a];return c<s&&([s,c]=[c,s],[o,a]=[a,o]),i=Qm(s,c,n),i>0?(s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i,i=Qm(s,c,n)):i<0&&(s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i,i=Qm(s,c,n)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(c/i)*i):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(c*i)/i),r};const tb=(t,e,n)=>{const[r,i]=t,[o,a]=e;let s,c;return r<i?(s=Zm(r,i),c=n(o,a)):(s=Zm(i,r),c=n(a,o)),Wm(c,s)},eb=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=Zm(s[t],s[t+1]),o[t]=n(c[t],c[t+1]);return e=>{const n=function(t,e,n,r,i){let o=n||0,a=r||t.length;const s=i||(t=>t);for(;o<a;){const n=Math.floor((o+a)/2);s(t[n])>e?a=n:o=n+1}return o}(t,e,1,r)-1,a=i[n];return Wm(o[n],a)(e)}},nb=(t,e,n,r)=>(Math.min(t.length,e.length)>2?eb:tb)(t,e,r?Hm:n);class rb extends zm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:qm,tickCount:5}}map(t){return Vm(t)?this.output(t):this.options.unknown}invert(t){return Vm(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){const{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Jm}rescale(){this.nice();const[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){const{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){const n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):$v}composeOutput(t,e){const{domain:n,range:r,round:i,interpolate:o}=this.options,a=nb(n.map(t),r,o,i);this.output=Wm(a,e,t)}composeInput(t,e,n){const{domain:r,range:i}=this.options,o=nb(i,r.map(t),qm);this.input=Wm(e,n,o)}}const ib=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let s=Qm(o,a,n);if(0===s||!Number.isFinite(s))return[];if(s>0){o=Math.ceil(o/s),a=Math.floor(a/s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*s}else{s=-s,o=Math.ceil(o*s),a=Math.floor(a*s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/s}return i};class ob extends rb{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Ym,tickMethod:ib,tickCount:5}}chooseTransforms(){return[$v,$v]}clone(){return new ob(this.options)}}function ab(t,e){return+t.toPrecision(e)}function sb(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e)return[e.x,e.y];if(n){var o=n[0];return[o.clientX,o.clientY]}return r&&i?[r,i]:[0,0]}var cb={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},lb=Jg({background:"background",labelGroup:"label-group",label:"label"},"indicator"),ub=function(t){function e(e){var n=t.call(this,e,cb)||this;return n.point=[0,0],n.group=n.appendChild(new pl({})),n.isMutationObserved=!0,n}return(0,qe.ZT)(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=t.padding,r=(0,qe.CR)(lv(n),4),i=r[0],o=r[1],a=r[2],s=r[3],c=this.label.node().getLocalBounds(),l=c.min,u=c.max,f=new hm(l[0]-s,l[1]-i,u[0]+o-l[0]+s,u[1]+a-l[1]+i),h=this.getPath(e,f),d=py(this.attributes,"background");this.background=Qg(this.group).maybeAppendByClassName(lb.background,"path").styles((0,qe.pi)((0,qe.pi)({},d),{d:h})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=py(this.attributes,"label"),i=(0,qe.CR)(yy(r),2),o=i[0],a=i[1],s=(o.text,(0,qe._T)(o,["text"]));(this.label=Qg(this.group).maybeAppendByClassName(lb.labelGroup,"g").styles(a),n)&&this.label.maybeAppendByClassName(lb.label,(function(){return Ay(e(n))})).style("text",e(n).toString()).selectAll("text").styles(s)},e.prototype.adjustLayout=function(){var t=(0,qe.CR)(this.point,2),e=t[0],n=t[1],r=this.attributes,i=r.x,o=r.y;this.group.attr("transform","translate(".concat(i-e,", ").concat(o-n,")"))},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,i=e.y,o=e.width,a=e.height,s=[["M",r+n,i],["L",r+o-n,i],["A",n,n,0,0,1,r+o,i+n],["L",r+o,i+a-n],["A",n,n,0,0,1,r+o-n,i+a],["L",r+n,i+a],["A",n,n,0,0,1,r,i+a-n],["L",r,i+n],["A",n,n,0,0,1,r+n,i],["Z"]],c={top:4,right:6,bottom:0,left:2}[t],l=this.createCorner([s[c].slice(-2),s[c+1].slice(-2)]);return s.splice.apply(s,(0,qe.ev)([c+1,1],(0,qe.CR)(l),!1)),s[0][0]="M",s},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=wv.apply(void 0,(0,qe.ev)([],(0,qe.CR)(t),!1)),r=(0,qe.CR)(t,2),i=(0,qe.CR)(r[0],2),o=i[0],a=i[1],s=(0,qe.CR)(r[1],2),c=s[0],l=s[1],u=(0,qe.CR)(n?[c-o,[o,c]]:[l-a,[a,l]],2),f=u[0],h=(0,qe.CR)(u[1],2),d=h[0],p=h[1],g=f/2,y=e*(f/Math.abs(f)),v=y/2,m=y*Math.sqrt(3)/2*.8,b=(0,qe.CR)([d,d+g-v,d+g,d+g+v,p],5),x=b[0],w=b[1],O=b[2],k=b[3],M=b[4];return n?(this.point=[O,a-m],[["L",x,a],["L",w,a],["L",O,a-m],["L",k,a],["L",M,a]]):(this.point=[o+m,O],[["L",o,x],["L",o,w],["L",o+m,O],["L",o,k],["L",o,M]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?Ng(this):Lg(this)},e.prototype.bindEvents=function(){this.label.on(bc.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(Hg),fb={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},hb={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},db={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},pb=Jg({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),gb=Jg({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),yb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,qe.ZT)(e,t),e.prototype.render=function(t,e){var n=t.x,r=t.y,i=t.size,o=void 0===i?10:i,a=t.radius,s=void 0===a?o/4:a,c=t.orientation,l=(0,qe._T)(t,["x","y","size","radius","orientation"]),u=o,f=2.4*u,h=Qg(e).maybeAppendByClassName(gb.iconRect,"rect").styles((0,qe.pi)((0,qe.pi)({},l),{width:u,height:f,radius:s,x:n-u/2,y:r-f/2,transformOrigin:"center"})),d=n+1/3*u-u/2,p=n+2/3*u-u/2,g=r+1/4*f-f/2,y=r+3/4*f-f/2;h.maybeAppendByClassName("".concat(gb.iconLine,"-1"),"line").styles((0,qe.pi)({x1:d,x2:d,y1:g,y2:y},l)),h.maybeAppendByClassName("".concat(gb.iconLine,"-2"),"line").styles((0,qe.pi)({x1:p,x2:p,y1:g,y2:y},l)),"vertical"===c&&(h.node().style.transform="rotate(90)")},e}(Hg),vb=function(t){function e(e){return t.call(this,e,db)||this}return(0,qe.ZT)(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.x,i=n.y,o=n.showLabel,a=py(this.attributes,"label"),s=a.x,c=void 0===s?0:s,l=a.y,u=void 0===l?0:l,f=a.transform,h=a.transformOrigin,d=(0,qe._T)(a,["x","y","transform","transformOrigin"]),p=(0,qe.CR)(yy(d,[]),2),g=p[0],y=p[1],v=Qg(t).maybeAppendByClassName(gb.labelGroup,"g").styles(y),m=(0,qe.pi)((0,qe.pi)({},hb),g),b=m.text,x=(0,qe._T)(m,["text"]);Vg(!!o,v,(function(t){e.label=t.maybeAppendByClassName(gb.label,"text").styles((0,qe.pi)((0,qe.pi)({},x),{x:r+c,y:i+u,transform:f,transformOrigin:h,text:"".concat(b)})),e.label.on("mousedown",(function(t){t.stopPropagation()})),e.label.on("touchstart",(function(t){t.stopPropagation()}))}))},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.orientation,o=e.type,a=(0,qe.pi)((0,qe.pi)({x:n,y:r,orientation:i},fb),py(this.attributes,"icon")),s=this.attributes.iconShape,c=void 0===s?function(){return new yb({style:a})}:s;Qg(t).maybeAppendByClassName(gb.iconGroup,"g").selectAll(gb.icon.class).data([c]).join((function(t){return t.append("string"==typeof c?c:function(){return c(o)}).attr("className",gb.icon.name)}),(function(t){return t.update(a)}),(function(t){return t.remove()}))},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(Hg),mb=Jg({text:"text"},"title");function bb(t,e){var n=Object.entries(e).reduce((function(e,n){var r=(0,qe.CR)(n,2),i=r[0],o=r[1];return t.node().attr(i)||(e[i]=o),e}),{});t.styles(n)}var xb=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return(0,qe.ZT)(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,o=t.inset,a=this.querySelector(mb.text.class);if(!a)return new hm(0,0,+e,+n);var s=a.getBBox(),c=s.width,l=s.height,u=(0,qe.CR)(lv(i),4),f=u[0],h=u[1],d=u[2],p=u[3],g=(0,qe.CR)([0,0,+e,+n],4),y=g[0],v=g[1],m=g[2],b=g[3],x=Bv(r);if(x.includes("i"))return new hm(y,v,m,b);x.forEach((function(t,r){var i,o,a,s;"t"===t&&(i=(0,qe.CR)(0===r?[l+d,+n-l-d]:[0,+n],2),v=i[0],b=i[1]),"r"===t&&(o=(0,qe.CR)([+e-c-p],1),m=o[0]),"b"===t&&(a=(0,qe.CR)([+n-l-f],1),b=a[0]),"l"===t&&(s=(0,qe.CR)(0===r?[c+h,+e-c-h]:[0,+e],2),y=s[0],m=s[1])}));var w=(0,qe.CR)(lv(o),4),O=w[0],k=w[1],M=w[2],_=w[3],E=(0,qe.CR)([_+k,O+M],2),S=E[0],A=E[1];return new hm(y+_,v+O,m-S,b-A)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new hm(0,0,0,0)},e.prototype.render=function(t,e){var n=this,r=(t.width,t.height,t.position,t.spacing,(0,qe._T)(t,["width","height","position","spacing"])),i=(0,qe.CR)(yy(r),1)[0],o=function(t){var e,n,r,i,o=t,a=o.width,s=o.height,c=o.position,l=(0,qe.CR)([+a/2,+s/2],2),u=l[0],f=l[1],h=(0,qe.CR)([+u,+f,"center","middle"],4),d=h[0],p=h[1],g=h[2],y=h[3],v=Bv(c);return v.includes("l")&&(d=(e=(0,qe.CR)([0,"start"],2))[0],g=e[1]),v.includes("r")&&(d=(n=(0,qe.CR)([+a,"end"],2))[0],g=n[1]),v.includes("t")&&(p=(r=(0,qe.CR)([0,"top"],2))[0],y=r[1]),v.includes("b")&&(p=(i=(0,qe.CR)([+s,"bottom"],2))[0],y=i[1]),{x:d,y:p,textAlign:g,textBaseline:y}}(t),a=o.x,s=o.y,c=o.textAlign,l=o.textBaseline;Vg(!!r.text,Qg(e),(function(t){n.title=t.maybeAppendByClassName(mb.text,"text").styles(i).call(bb,{x:a,y:s,textAlign:c,textBaseline:l}).node()}))},e}(Hg),wb=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},Ob=wb,kb=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},Mb=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},_b=Mb;var Eb=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function Sb(t){var e=function(t){var e="default";if(zn(t)&&t instanceof Image)e="image";else if(Fn(t))e="symbol";else if($e(t)){var n=new RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(t);return["base64","url","image"].includes(e)?"image":t&&"symbol"===e?"path":null}var Ab=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,qe.ZT)(e,t),e.prototype.render=function(t,n){var r=t.x,i=void 0===r?0:r,o=t.y,a=void 0===o?0:o,s=this.getSubShapeStyle(t),c=s.symbol,l=s.size,u=void 0===l?16:l,f=(0,qe._T)(s,["symbol","size"]),h=Sb(c);Vg(!!h,Qg(n),(function(t){t.maybeAppendByClassName("marker",h).attr("className","marker ".concat(h,"-marker")).call((function(t){if("image"===h){var n=2*u;t.styles({img:c,width:n,height:n,x:i-u,y:a-u})}else{n=u/2;var r=Fn(c)?c:e.getSymbol(c);t.styles((0,qe.pi)({d:null==r?void 0:r(i,a,n)},f))}}))}))},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(Hg);Ab.registerSymbol("cross",(function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]})),Ab.registerSymbol("hyphen",(function(t,e,n){return[["M",t-n,e],["L",t+n,e]]})),Ab.registerSymbol("line",kb),Ab.registerSymbol("plus",(function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]})),Ab.registerSymbol("tick",(function(t,e,n){return[["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]]})),Ab.registerSymbol("circle",wb),Ab.registerSymbol("point",Ob),Ab.registerSymbol("bowtie",(function(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"]]})),Ab.registerSymbol("hexagon",(function(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"]]})),Ab.registerSymbol("square",(function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]})),Ab.registerSymbol("diamond",(function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]})),Ab.registerSymbol("triangle",(function(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"]]})),Ab.registerSymbol("triangle-down",(function(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"]]})),Ab.registerSymbol("line",kb),Ab.registerSymbol("dot",Mb),Ab.registerSymbol("dash",_b),Ab.registerSymbol("smooth",(function(t,e,n){return[["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]]})),Ab.registerSymbol("hv",(function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]})),Ab.registerSymbol("vh",(function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]})),Ab.registerSymbol("hvh",(function(t,e,n){return[["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]]})),Ab.registerSymbol("vhv",(function(t,e){return[["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]]})),Ab.registerSymbol("focus",(function(t,e,n){var r=.2*n,i=.7*n;return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"],["M",t-i,e],["L",t-r,e],["M",t+r,e],["L",t+i,e],["M",t,e-i],["L",t,e-r],["M",t,e+r],["L",t,e+i]]}));Ab.registerSymbol("hiddenHandle",(function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]})),Ab.registerSymbol("verticalHandle",(function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+o],["L",t+r-2,e+o],["M",a,e-o],["L",t+r-2,e-o]]})),Ab.registerSymbol("horizontalHandle",(function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-o,a],["L",t-o,e+r-2],["M",t+o,a],["L",t+o,e+r-2]]}));function jb(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}var Tb=Jg({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Pb={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},Cb=function(t){function e(e){return t.call(this,e,Pb)||this}return(0,qe.ZT)(e,t),e.prototype.render=function(t,e){var n=Qg(e).maybeAppendByClassName(Tb.markerGroup,"g");this.renderMarker(n);var r=Qg(e).maybeAppendByClassName(Tb.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.orientation,i=n.markerSymbol,o=void 0===i?jb(r,"horizontalHandle","verticalHandle"):i;Vg(!!o,t,(function(t){var n=py(e.attributes,"marker"),r=(0,qe.pi)({symbol:o},n);e.marker=t.maybeAppendByClassName(Tb.marker,(function(){return new Ab({style:r})})).update(r)}))},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.showLabel,i=n.orientation,o=n.spacing,a=void 0===o?0:o,s=n.formatter;Vg(r,t,(function(t){var n,r=py(e.attributes,"label"),o=r.text,c=(0,qe._T)(r,["text"]),l=(null===(n=t.select(Tb.marker.class))||void 0===n?void 0:n.node().getBBox())||{},u=l.width,f=void 0===u?0:u,h=l.height,d=void 0===h?0:h,p=(0,qe.CR)(jb(i,[0,d+a,"center","top"],[f+a,0,"start","middle"]),4),g=p[0],y=p[1],v=p[2],m=p[3];t.maybeAppendByClassName(Tb.label,"text").styles((0,qe.pi)((0,qe.pi)({},c),{x:g,y:y,text:s(o).toString(),textAlign:v,textBaseline:m}))}))},e}(Hg),Rb={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},Lb=$g({},Rb,{}),Nb=$g({},Rb,gy(Pb,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),Ib=Jg({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend");function Db(t,e){var n=(0,qe.CR)(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var Bb=Jg({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Fb(t){var e=t.orientation,n=t.size,r=t.length;return jb(e,[r,n],[n,r])}function zb(t){var e=t.type,n=(0,qe.CR)(Fb(t),2),r=n[0],i=n[1];return"size"===e?[["M",0,i],["L",0+r,0],["L",0+r,i],["Z"]]:[["M",0,i],["L",0,0],["L",0+r,0],["L",0+r,i],["Z"]]}function Zb(t){return zb(t)}function Wb(t){var e,n=t.orientation,r=t.color,i=t.block,o=t.partition;if(Fn(r)){e=new Array(20).fill(0).map((function(t,e,n){return r(e/(n.length-1))}))}else e=r;var a=e.length,s=e.map((function(t){return Po(t).toString()}));return a?1===a?s[0]:i?function(t,e,n){var r=Array.from(e),i=t.length;return new Array(i).fill(0).reduce((function(e,n,o){var a=r[o%r.length];return e+" ".concat(t[o],":").concat(a).concat(o<i-1?" ".concat(t[o+1],":").concat(a):"")}),"l(".concat("horizontal"===n?"0":"270",")"))}(o,s,n):s.reduce((function(t,e,n){return t+" ".concat(n/(a-1),":").concat(e)}),"l(".concat(jb(n,"0","270"),")")):""}function $b(t){var e=t.orientation,n=t.range;if(!n)return[];var r=(0,qe.CR)(Fb(t),2),i=r[0],o=r[1],a=(0,qe.CR)(n,2),s=a[0],c=a[1],l=jb(e,s*i,0),u=jb(e,0,s*o),f=jb(e,c*i,i),h=jb(e,o,c*o);return[["M",l,u],["L",l,h],["L",f,h],["L",f,u],["Z"]]}var Gb=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return(0,qe.ZT)(e,t),e.prototype.render=function(t,e){!function(t,e){var n=py(e,"track");t.maybeAppendByClassName(Bb.track,"path").styles((0,qe.pi)({d:zb(e)},n))}(Qg(e).maybeAppendByClassName(Bb.trackGroup,"g"),t),function(t,e){var n=py(e,"selection"),r=Wb(e),i=t.maybeAppendByClassName(Bb.selection,"path").styles((0,qe.pi)({d:Zb(e),fill:r},n)),o=i.maybeAppendByClassName(Bb.clipPath,"path").styles({d:$b(e)}).node();i.style("clipPath",o)}(Qg(e).maybeAppendByClassName(Bb.selectionGroup,"g"),t)},e}(Hg);var qb=function(t){function e(e){var n=t.call(this,e,Nb)||this;return n.eventToOffsetScale=new ob({}),n.innerRibbonScale=new ob({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,i=e.block;t.stopPropagation();var o=n.getValueByCanvasPoint(t);if(i){var a=Db(r.map((function(t){return t.value})),o).range,s=n.getRealSelection(a);n.showIndicator((a[0]+a[1])/2,"".concat(s[0],"-").concat(s[1])),n.dispatchIndicated(o,a)}else{var c=n.getTickValue(o);n.showIndicator(c,"".concat(n.getRealValue(c))),n.dispatchIndicated(c)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=(0,qe.CR)(n.selection,2),i=r[0],o=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),s=a-n.prevValue;"start"===e?i!==a&&n.updateSelection(a,o):"end"===e?o!==a&&n.updateSelection(i,a):"ribbon"===e&&0!==s&&(n.prevValue=a,n.updateSelection(s,s,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.width,n=t.height;return new hm(0,0,e,n)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(Qg(e));var i=this.availableSpace,o=i.x,a=i.y,s=Qg(e).maybeAppendByClassName(Ib.contentGroup,"g").styles({transform:"translate(".concat(o,", ").concat(a,")")});Vg(!!r,s.maybeAppendByClassName(Ib.labelGroup,"g").styles({zIndex:1}),(function(t){n.renderLabel(t)}));var c=s.maybeAppendByClassName(Ib.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=s.maybeAppendByClassName(Ib.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(c),this.renderIndicator(s),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t=this.attributes,e=t.data,n=t.domain;return n?{min:n[0],max:n[1]}:function(t){return{min:Math.min.apply(Math,(0,qe.ev)([],(0,qe.CR)(t.map((function(t){return t.value}))),!1)),max:Math.max.apply(Math,(0,qe.ev)([],(0,qe.CR)(t.map((function(t){return t.value}))),!1))}}(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=(0,qe.CR)(this.selection,2),e=t[0],n=t[1],r=this.ribbonScale;return[r.map(e),r.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,r=this.attributes.defaultValue,i=void 0===r?[e,n]:r,o=(0,qe.CR)(i,2);return[o[0],o[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return jb(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,o=e.height,a=py(this.attributes,"title"),s=(0,qe.pi)((0,qe.pi)({},a),{width:i,height:o,text:r}),c=this;t.selectAll(Ib.title.class).data(n?[r]:[]).join((function(t){return t.append((function(){return new xb({style:s})})).attr("className",Ib.title.name).each((function(){c.title=this}))}),(function(t){return t.update(s)}),(function(t){return t.each((function(){c.title=void 0})).remove()}))},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes,e=t.width,n=t.height;return new hm(0,0,e,n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,n=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){var t;if(!this.attributes.showLabel)return new hm(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var e=(null===(t=this.label.querySelector(ey.labelGroup.class))||void 0===t?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new hm(0,0,n,r),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing,r=void 0===n?0:n;if(!e)return{width:0,height:0,size:0,length:0};var i=this.labelBBox,o=i.width,a=i.height;return{width:o,height:a,size:this.ifHorizontal(a,o)+r+this.labelFixedSpacing,length:this.ifHorizontal(o,a)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,i=r.width,o=r.height,a=this.labelShape,s=a.size,c=a.length,l=(0,qe.CR)(this.ifHorizontal([o,i],[i,o]),2),u=l[0],f=l[1],h=e?this.handleShape:{size:0,length:0},d=h.size,p=h.length,g=this.handleOffsetRatio,y=0,v=this.labelPosition;y=n||(["bottom","right"].includes(v)?Math.min(u-s,(u-d)/g):u*(1-g)>d?Math.max(u-s,0):Math.max((u-s-d)/g,0));var m=Math.max(p,c),b=f-m,x=(0,qe.CR)(this.ifHorizontal([b,y],[y,b]),2),w=x[0],O=x[1],k=["top","left"].includes(v)?s:0,M=(0,qe.CR)(this.ifHorizontal([m/2,k],[k,m/2]),2),_=M[0],E=M[1];return new hm(_,E,w,O)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,o=e.color,a=e.block,s=py(this.attributes,"ribbon"),c=this.range,l=c.min,u=c.max,f=this.ribbonBBox,h=f.x,d=f.y,p=this.ribbonShape,g=p.length,y=p.size,v=$g({transform:"translate(".concat(h,", ").concat(d,")"),length:g,size:y,type:r,orientation:i,color:o,block:a,partition:n.map((function(t){return(t.value-l)/(u-l)})),range:this.ribbonRange},s);this.ribbon=t.maybeAppendByClassName(Ib.ribbon,(function(){return new Gb({style:v})})).update(v)},e.prototype.getHandleClassName=function(t){return"".concat(Ib.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=py(this.attributes,"handle"),i=(0,qe.CR)(this.selection,2),o=i[0],a=i[1],s=(0,qe.pi)((0,qe.pi)({},r),{orientation:n}),c=r.shape,l="basic"===(void 0===c?"slider":c)?Cb:vb,u=this;this.handlesGroup.selectAll(Ib.handle.class).data(e?[{value:o,type:"start"},{value:a,type:"end"}]:[],(function(t){return t.type})).join((function(t){return t.append((function(){return new l({style:s})})).attr("className",(function(t){var e=t.type;return"".concat(Ib.handle," ").concat(u.getHandleClassName(e))})).each((function(t){var e=t.type,n=t.value;this.update({labelText:n});var r="".concat(e,"Handle");u[r]=this,this.addEventListener("pointerdown",u.onDragStart(e))}))}),(function(t){return t.update(s).each((function(t){var e=t.value;this.update({labelText:e})}))}),(function(t){return t.each((function(t){var e=t.type,n="".concat(e,"Handle");u[n]=void 0})).remove()}))},e.prototype.adjustHandles=function(){var t=(0,qe.CR)(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n)},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new hm(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=r.width,o=r.height,a=(0,qe.CR)([Math.max(e,i),Math.max(n,o)],2),s=a[0],c=a[1];return this.cacheHandleBBox=new hm(0,0,s,c),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=(0,qe.CR)(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,o=r.y,a=this.ribbonShape.size,s=this.getOffset(e),c=(0,qe.CR)(this.ifHorizontal([i+s,o+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,o+s]),2),l=c[0],u=c[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({transform:"translate(".concat(l,", ").concat(u,")"),formatter:n})},e.prototype.renderIndicator=function(t){var e=py(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(Ib.indicator,(function(){return new ub({})})).update(e)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce((function(e,n,r,i){var o,a,s=null!==(o=null==n?void 0:n.id)&&void 0!==o?o:r.toString();if(e.push((0,qe.pi)((0,qe.pi)({},n),{id:s,index:r,type:"value",label:null!==(a=null==n?void 0:n.label)&&void 0!==a?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var c=i[r+1],l=(0,qe.CR)([n.value,c.value],2),u=l[0],f=l[1],h=(u+f)/2;e.push((0,qe.pi)((0,qe.pi)({},n),{id:s,index:r,type:"range",range:[u,f],label:[u,f].join("~"),value:t.ribbonScale.map(h)}))}return e}),[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=(0,qe.CR)(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=void 0!==n&&n,i=e.labelFilter,o=e.labelFormatter,a=py(this.attributes,"tick"),s=py(this.attributes,"label"),c=s.align,l=$g((0,qe.pi)({showLine:!1,showGrid:!1,showTick:r,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),gy(a,"tick"),gy(s,"label"),{data:this.labelData}),u={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!i||i(t,t.index,n.filter((function(t){return"value"!==t.type}))))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===c&&(!i||i(t,t.index,n.filter((function(t){return t.type===c}))))},labelFormatter:o},f=(0,qe.pi)((0,qe.pi)((0,qe.pi)({},l),u),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(Ib.label,(function(){return new Zv({style:f})})).node(),this.label.update(f,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,i=t.tickLength,o=this.ribbonShape.size,a=this.labelPosition,s=this.labelFixedSpacing,c=(0,qe.CR)([0,0,0],3),l=c[0],u=c[1],f=c[2],h=null!=i?i:o;return e?(f=h,u=s,"positive"===n?"right"===a?(l=h,f=h):"bottom"===a&&(l=f):"negative"===n&&("top"===a||"left"===a)&&(l=o)):"positive"===n?"right"===a?u=h:"bottom"===a&&(l=o+s,u=r):"negative"===n&&("left"===a||"top"===a)&&(u=r),{offset:l,spacing:u,tickLength:f}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=t.width,i=t.height,o=this.labelAxisStyle,a=o.offset,s=o.spacing,c=o.tickLength,l=(0,qe.CR)(this.ifHorizontal([[e,n+a],[e+r,n+a]],[[e+a,n+i],[e+a,n]]),2),u=l[0],f=l[1];this.label.update({startPos:u,endPos:f,tickLength:c,labelSpacing:s},!1)}},e.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t){var n=this.range,r=n.min,i=n.max,o=this.ribbonBBox,a=o.x,s=o.y,c=Ge(t,r,i),l=this.getOffset(c),u=this.ifHorizontal([l+a,s],[a,l+s]);this.indicator.update({x:u[0],y:u[1],position:this.ifHorizontal("top","left"),labelText:e}),Lg(this.indicator.node())}else this.hideIndicator()},e.prototype.hideIndicator=function(){Ng(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){var r;void 0===n&&(n=!1);var i=(0,qe.CR)(this.selection,2),o=i[0],a=i[1],s=(0,qe.CR)([t,e],2),c=s[0],l=s[1];n&&(c+=o,l+=a);var u=this.range,f=u.min,h=u.max;r=(0,qe.CR)(function(t,e,n,r){var i;void 0===r&&(r=4);var o=(0,qe.CR)(t,2),a=o[0],s=o[1],c=(0,qe.CR)(e,2),l=c[0],u=c[1],f=(0,qe.CR)(n,2),h=f[0],d=f[1],p=(0,qe.CR)([l,u],2),g=p[0],y=p[1],v=y-g;return g>y&&(g=(i=(0,qe.CR)([y,g],2))[0],y=i[1]),v>s-a?[a,s]:g<a?h===a&&d===y?[a,y]:[a,v+a]:y>s?d===s&&h===g?[g,s]:[s-v,s]:[g,y]}([f,h],[c,l],this.selection),2),c=r[0],l=r[1],this.update({defaultValue:[c,l]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,i=n.max;return Nn(e)?ab(.01*(i-r),0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,r=e.block,i=this.range.min;return r?Db(n.map((function(t){return t.value})),t).tick:function(t,e,n){return n+Math.round((t-n)/e)*e}(t,this.step,i)},e.prototype.getValueByCanvasPoint=function(t){var e=this.range,n=e.min,r=e.max,i=(0,qe.CR)(this.ribbon.node().getPosition(),2),o=i[0],a=i[1],s=this.ifHorizontal(o,a),c=this.ifHorizontal.apply(this,(0,qe.ev)([],(0,qe.CR)(sb(t)),!1))-s;return Ge(this.getOffset(c,!0),n,r)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=this.ribbonShape.length,a=this.eventToOffsetScale;return a.update({domain:[r,i],range:[0,o]}),e?a.invert(t):a.map(t)},e.prototype.getRealSelection=function(t){var e=this.range.max,n=(0,qe.CR)(t,2),r=n[0],i=n[1];return this.ifHorizontal([r,i],[e-i,e-r])},e.prototype.getRealValue=function(t){var e=this.range.max;return this.ifHorizontal(t,e-t)},e.prototype.dispatchSelection=function(){var t=this.getRealSelection(this.selection),e=new uc("valuechange",{detail:{value:t}});this.dispatchEvent(e)},e.prototype.dispatchIndicated=function(t,e){var n=this,r=this.range.max,i=this.ifHorizontal((function(){return{value:t,range:e}}),(function(){return{value:r-t,range:e?n.getRealSelection(e):void 0}})),o=new uc("indicate",{detail:i});this.dispatchEvent(o)},e}(Hg);class Yb extends od{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!em(t))return this.options.unknown;const e=Yv(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){const{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new Yb(this.options)}rescale(){const{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}function Hb(t){return We(t)?0:lg(t)?t.length:Object.keys(t).length}var Vb=function(t,e){if(!lg(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};function Ub(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const Xb=[1,5,2,2.5,4,3],Kb=100*Number.EPSILON;function Qb(t,e,n,r,i,o){const a=Hb(e),s=Vb(e,t);let c=0;const l=function(t,e){return(t%e+e)%e}(r,o);return(l<Kb||o-l<Kb)&&r<=0&&i>=0&&(c=1),1-s/(a-1)-n+c}function Jb(t,e,n){const r=Hb(e);return 1-Vb(e,t)/(r-1)-n+1}function tx(t,e,n,r,i,o){const a=(t-1)/(o-i),s=(e-1)/(Math.max(o,r)-Math.min(n,i));return 2-Math.max(a/s,s/a)}function ex(t,e){return t>=e?2-(t-1)/(e-1):1}function nx(t,e,n,r){return 1-.5*((e-r)**2+(t-n)**2)/(.1*(e-t))**2}function rx(t,e,n){const r=e-t;if(n>r){return 1-((n-r)/2)**2/(.1*r)**2}return 1}const ix=(t,e,n=5,r=!0,i=Xb,o=[.25,.2,.5,.05])=>{const a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let c=1;for(;c<1/0;){for(let n=0;n<i.length;n+=1){const l=i[n],u=Jb(l,i,c);if(o[0]*u+o[1]+o[2]+o[3]<s.score){c=1/0;break}let f=2;for(;f<1/0;){const n=ex(f,a);if(o[0]*u+o[1]+o[2]*n+o[3]<s.score)break;const h=(e-t)/(f+1)/c/l;let d=Math.ceil(Math.log10(h));for(;d<1/0;){const h=c*l*10**d,p=rx(t,e,h*(f-1));if(o[0]*u+o[1]*p+o[2]*n+o[3]<s.score)break;const g=Math.floor(e/h)*c-(f-1)*c,y=Math.ceil(t/h)*c;if(g<=y){const n=y-g;for(let u=0;u<=n;u+=1){const n=(g+u)*(h/c),d=n+h*(f-1),p=h,y=Qb(l,i,c,n,d,p),v=nx(t,e,n,d),m=tx(f,a,t,e,n,d),b=1,x=o[0]*y+o[1]*v+o[2]*m+o[3]*b;x>s.score&&(!r||n<=t&&d>=e)&&(s.lmin=n,s.lmax=d,s.lstep=p,s.score=x)}}d+=1}f+=1}}c+=1}const l=Ub(s.lmax),u=Ub(s.lmin),f=Ub(s.lstep),h=Math.floor(function(t){return Math.round(1e12*t)/1e12}((l-u)/f))+1,d=new Array(h);d[0]=Ub(u);for(let t=1;t<h;t+=1)d[t]=Ub(d[t-1]+f);return d};class ox extends Yb{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:ix}}constructor(t){super(t)}nice(){const{nice:t}=this.options;if(t){const[t,e,n]=this.getTickMethodOptions();this.options.domain=nm(t,e,n)}}getTicks(){const{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();const{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){const[e,n]=super.invert(t),[r,i]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||i]}getThresholds(){return this.thresholds}clone(){return new ox(this.options)}}function ax(t,e){const n=t.length;if(!n)return;if(n<2)return t[n-1];const r=(n-1)*e,i=Math.floor(r),o=t[i];return o+(t[i+1]-o)*(r-i)}class sx extends Yb{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:ix}}constructor(t){super(t)}rescale(){const{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){const r=t;n||r.sort(((t,e)=>t-e));const i=[];for(let t=1;t<e;t+=1)i.push(ax(r,t/e));return i}(t,this.n+1,!1)}invert(t){const[e,n]=super.invert(t),{domain:r}=this.options,i=r[0],o=r[r.length-1];return void 0===e&&void 0===n?[e,n]:[e||i,n||o]}getThresholds(){return this.thresholds}clone(){return new sx(this.options)}getTicks(){const{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var cx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function lx(t,e,n,r,i){const o=e.thresholds,a=function(t){return e=>({value:e/t,label:String(e)})}(r);return Object.assign(Object.assign({},t),{color:i,data:[n,...o,r].map(a)})}function ux(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],ag(e)];return[n,r]}function fx(t,e,n,r,i,o){const{length:a}=t,s=n||r,c=i.color?o.legendContinuous.ribbonFill||"black":o.color,l=e||function(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[Po(e).toString()]})),r}(s,c),[u,f]=ux(l),[h,d]=ux([e,n,r].filter((t=>void 0!==t)).find((t=>!(t instanceof xd))));return Object.assign(Object.assign({},t),{domain:[h,d],data:l.getTicks().map((t=>({value:t}))),color:new Array(Math.floor(a)).fill(0).map(((t,e)=>{const n=(f-u)/(a-1)*e+u,i=l.map(n)||c,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,((t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`))}))})}function hx(t,e,n,r,i,o){const a=km(t,"color"),s=function(t,e,n){const{size:r}=e,i=_m(t,e,n);return function(t,e,n){return t.size=e,function(t){return"horizontal"===t||0===t}(n)?t.height=e:t.width=e,t}(i,r,i.orientation)}(n,r,i);if(a instanceof Yb){const{range:t}=a.getOptions(),[e,n]=ux(a);return a instanceof ox||a instanceof sx?lx(s,a,e,n,t):function(t,e,n){const r=[-1/0,...e.thresholds,1/0].map(((t,e)=>({value:e,label:t})));return Object.assign(Object.assign({},t),{data:r,color:n,labelFilter:(t,e)=>e>0&&e<r.length-1})}(s,a,t)}return fx(s,a,km(t,"size"),km(t,"opacity"),e,o)}const dx=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:s,style:c,crossPadding:l,padding:u}=t,f=cx(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:r,value:i,theme:a,scale:l})=>{const{bbox:u}=i,{x:h,y:d,width:p,height:g}=u,y=xm(o,n),{legendContinuous:v={}}=a,m=Em(Object.assign({},v,Object.assign(Object.assign({titleText:bm(s),labelAlign:"value",labelFormatter:"string"==typeof e?t=>Jp(e)(t.label):e},hx(r,l,i,t,dx,a)),c),f)),b=new wm({style:Object.assign(Object.assign({x:h,y:d,width:p,height:g},y),{subOptions:m})});return b.appendChild(new qb({className:"legend-continuous",style:m})),b}};dx.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const px=t=>(...e)=>dx(Object.assign({},{block:!0},t))(...e);px.props=Object.assign(Object.assign({},dx.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const gx=t=>e=>{const{scales:n}=e,r=km(n,"size");return dx(Object.assign({},{type:"size",data:r.getTicks().map(((t,e)=>({value:t,label:String(t)})))},t))(e)};gx.props=Object.assign(Object.assign({},dx.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const yx=t=>gx(Object.assign({},{block:!0},t));yx.props=Object.assign(Object.assign({},dx.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var vx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const mx=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:o,paddingRight:a,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,margin:g,marginLeft:y,marginBottom:v,marginTop:m,marginRight:b,data:x,coordinate:w,theme:O,component:k,interaction:M,x:_,y:E,z:S,key:A,frame:j,labelTransform:T,parentKey:P,clip:C,viewStyle:R,title:L}=e,N=vx(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:_,y:E,z:S,key:A,width:n,height:r,depth:i,padding:l,paddingLeft:o,paddingRight:a,paddingTop:s,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,paddingBottom:c,theme:O,coordinate:w,component:k,interaction:M,frame:j,labelTransform:T,margin:g,marginLeft:y,marginBottom:v,marginTop:m,marginRight:b,parentKey:P,clip:C,style:R},!t&&{title:L}),{marks:[Object.assign(Object.assign(Object.assign({},N),{key:`${A}-0`,data:x}),t&&{title:L})]})]};mx.props={};var bx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function xx(t){return(e,...n)=>Jh({},t(e,...n),e)}function wx(t){return(e,...n)=>Jh({},e,t(e,...n))}function Ox(t,e){if(!t)return e;if(Array.isArray(t))return t;if(function(t){return!(t instanceof Date)&&"object"==typeof t}(t)){const{value:n=e}=t,r=bx(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}return t}var kx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const Mx=()=>t=>{const{children:e}=t,n=kx(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:o={},legend:a={},encode:s={},transform:c=[],slider:l={}}=n,u=kx(n,["data","scale","axis","legend","encode","transform","slider"]),f=e.map((t=>{var{data:e,scale:n={},axis:u={},legend:f={},encode:h={},transform:d=[],slider:p={}}=t,g=kx(t,["data","scale","axis","legend","encode","transform","slider"]);return Object.assign({data:Ox(e,r),scale:Jh({},i,n),encode:Jh({},s,h),transform:[...c,...d],axis:!(!u||!o)&&Jh({},o,u),legend:!(!f||!a)&&Jh({},a,f),slider:Jh({},l,p)},g)}));return[Object.assign(Object.assign({},u),{marks:f,type:"standardView",slider:l})]};function _x([t,e],[n,r]){return[t-n,e-r]}function Ex([t,e],[n,r]){return[t+n,e+r]}function Sx([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Ax([t,e]){return Math.atan2(e,t)}function jx([t,e]){return Ax([t,e])+Math.PI/2}function Tx(t,e){const n=Ax(t),r=Ax(e);return n<r?r-n:2*Math.PI-(n-r)}function Px(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(const[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);return[e,r,n-e,i-r]}function Cx([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Rx(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function Lx(t,e,n,r,i){const o=Ax(_x(r,e))+Math.PI,a=Ax(_x(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function Nx(t,e,n,r="y",i="between",o=!1){const a="y"===r||!0===r?n:e,s=((t,e)=>"y"===t||!0===t?e?180:90:e?90:0)(r,o),c=ig(a),[l,u]=fm(c,(t=>a[t])),f=new sm({domain:[l,u],range:[0,100]}),h=t=>ze(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,d={between:e=>`${t[e]} ${h(e)}%`,start:e=>0===e?`${t[e]} ${h(e)}%`:`${t[e-1]} ${h(e)}%, ${t[e]} ${h(e)}%`,end:e=>e===t.length-1?`${t[e]} ${h(e)}%`:`${t[e]} ${h(e)}%, ${t[e+1]} ${h(e)}%`},p=c.sort(((t,e)=>h(t)-h(e))).map(d[i]||d.between).join(",");return`linear-gradient(${s}deg, ${p})`}function Ix(t){const[e,n,r,i]=t;return[i,e,n,r]}function Dx(t,e,n){const[r,i,,o]=kg(t)?Ix(e):e,[a,s]=n,c=t.getCenter(),l=jx(_x(r,c)),u=jx(_x(i,c)),f=u===l&&a!==s?u+2*Math.PI:u,h=1e-4;return{startAngle:l+h,endAngle:(f-l>=0?f:2*Math.PI+f)-h,innerRadius:Sx(o,c),outerRadius:Sx(r,c)}}function Bx(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function Fx(t,e){if(!Mg(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function zx(t){if(1===t.length)return t[0];const[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}function Zx(t){return t.replace(/-(\w)/g,(function(t,e){return e.toUpperCase()}))}Mx.props={};Array.prototype.slice;function Wx(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function $x(t){return function(){return t}}function Gx(t){this._context=t}function qx(t){return new Gx(t)}Gx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(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;default:this._context.lineTo(t,e)}}};const Yx=Math.PI,Hx=2*Yx,Vx=1e-6,Ux=Hx-Vx;function Xx(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Kx{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Xx:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Xx;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-t,c=r-e,l=o-t,u=a-e,f=l*l+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>Vx)if(Math.abs(u*s-c*l)>Vx&&i){let h=n-o,d=r-a,p=s*s+c*c,g=h*h+d*d,y=Math.sqrt(p),v=Math.sqrt(f),m=i*Math.tan((Yx-Math.acos((p+f-g)/(2*y*v)))/2),b=m/v,x=m/y;Math.abs(b-1)>Vx&&this._append`L${t+b*l},${e+b*u}`,this._append`A${i},${i},0,0,${+(u*h>l*d)},${this._x1=t+x*s},${this._y1=e+x*c}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),c=t+a,l=e+s,u=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Vx||Math.abs(this._y1-l)>Vx)&&this._append`L${c},${l}`,n&&(f<0&&(f=f%Hx+Hx),f>Ux?this._append`A${n},${n},0,1,${u},${t-a},${e-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:f>Vx&&this._append`A${n},${n},0,${+(f>=Yx)},${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 Qx(){return new Kx}function Jx(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Kx(e)}function tw(t){return t[0]}function ew(t){return t[1]}function nw(t,e){var n=$x(!0),r=null,i=qx,o=null,a=Jx(s);function s(s){var c,l,u,f=(s=Wx(s)).length,h=!1;for(null==r&&(o=i(u=a())),c=0;c<=f;++c)!(c<f&&n(l=s[c],c,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(l,c,s),+e(l,c,s));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?tw:$x(t),e="function"==typeof e?e:void 0===e?ew:$x(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:$x(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:$x(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:$x(!!t),s):n},s.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),s):i},s.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),s):r},s}function rw(t){const e="function"==typeof t?t:t.render;return class extends hl{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Qx.prototype=Kx.prototype;var iw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function ow(t){const{min:[e,n],max:[r,i]}=t.getLocalBounds();let o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}const aw=rw((t=>{const e=t.attributes,{className:n,class:r,transform:i,rotate:o,labelTransform:a,labelTransformOrigin:s,x:c,y:l,x0:u=c,y0:f=l,text:h,background:d,connector:p,startMarker:g,endMarker:y,coordCenter:v,innerHTML:m}=e,b=iw(e,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(t.style.transform=`translate(${c}, ${l})`,[c,l,u,f].some((t=>!ze(t))))return void t.children.forEach((t=>t.remove()));const x=Rd(b,"background"),{padding:w}=x,O=iw(x,["padding"]),k=Rd(b,"connector"),{points:M=[]}=k,_=iw(k,["points"]);let E;E=m?zd(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",m).call(Rx,Object.assign({transform:a,transformOrigin:s},b)).node():zd(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(Rx,Object.assign({textBaseline:"middle",transform:a,transformOrigin:s},b)).node();const S=zd(t).maybeAppend("background","rect").style("zIndex",-1).call(Rx,function(t,e=[]){const[n=0,r=0,i=n,o=r]=e,a=t.parentNode,s=a.getEulerAngles();a.setEulerAngles(0);const{min:c,halfExtents:l}=t.getLocalBounds(),[u,f]=c,[h,d]=l;return a.setEulerAngles(s),{x:u-o,y:f-n,width:2*h+o+r,height:2*d+n+i}}(E,w)).call(Rx,d?O:{}).node(),A=function(t,e,n,r,i=!0,o=!0){const a=t=>nw()(t);if(!e[0]&&!e[1])return a([ow(t),e]);if(!n.length)return a([[0,0],e]);const[s,c]=n,l=[...c],u=[...s];if(c[0]!==s[0]){const t=i?-4:4;l[1]=c[1],o&&!i&&(l[0]=Math.max(s[0],c[0]-t),c[1]<s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.max(u[0],l[0]-t))),o||i||(l[0]=Math.max(s[0],c[0]-t),c[1]>s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.max(u[0],l[0]-t))),!o&&i&&(l[0]=Math.min(s[0],c[0]-t),c[1]>s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.min(u[0],l[0]-t))),o&&i&&(l[0]=Math.min(s[0],c[0]-t),c[1]<s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.min(u[0],l[0]-t)))}return a([c,l,u,s,e])}(S,[+u-+c,+f-+l],M,0,+u<v[0],+f<v[1]),j=g&&new Ab({id:"startMarker",style:Object.assign({x:0,y:0},Rd(b,"startMarker"))}),T=y&&new Ab({id:"endMarker",style:Object.assign({x:0,y:0},Rd(b,"endMarker"))});zd(t).maybeAppend("connector","path").style("zIndex",0).style("d",A).style("markerStart",j).style("markerEnd",T).call(Rx,p?_:{})}));function sw(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function cw(t,e,n,r){const i=e.length/2,o=e.slice(0,i),a=e.slice(i);let s=sw(o,((t,e)=>Math.abs(t[1]-a[e][1])));s=Math.max(Math.min(s,i-2),1);const c=t=>[o[t][0],(o[t][1]+a[t][1])/2],l=c(s),u=c(s-1),f=Ax(_x(c(s+1),u))/Math.PI*180;return{x:l[0],y:l[1],transform:`rotate(${f})`,textAlign:"center",textBaseline:"middle"}}function lw(t,e,n,r){const{bounds:i}=n,[[o,a],[s,c]]=i,l=s-o,u=c-a,f=t=>{const{x:e,y:r}=t,i=Id(n.x,l),s=Id(n.y,u);return Object.assign(Object.assign({},t),{x:(i||e)+o,y:(s||r)+a})};return f("left"===t?{x:0,y:u/2,textAlign:"start",textBaseline:"middle"}:"right"===t?{x:l,y:u/2,textAlign:"end",textBaseline:"middle"}:"top"===t?{x:l/2,y:0,textAlign:"center",textBaseline:"top"}:"bottom"===t?{x:l/2,y:u,textAlign:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAlign:"start",textBaseline:"top"}:"top-right"===t?{x:l,y:0,textAlign:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAlign:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:l,y:u,textAlign:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAlign:"center",textBaseline:"middle"})}function uw(t,e,n,r){const{y:i,y1:o,autoRotate:a,rotateToAlignArc:s}=n,c=r.getCenter(),l=Dx(r,e,[i,o]),{innerRadius:u,outerRadius:f,startAngle:h,endAngle:d}=l,p="inside"===t?(h+d)/2:d,g=hw(p,a,s),y=(()=>{const[n,r]=e,i=u+.5*(f-u),[o,a]="inside"===t?fw(c,p,i):Cx(n,r);return{x:o,y:a}})();return Object.assign(Object.assign({},y),{textAlign:"inside"===t?"center":"start",textBaseline:"middle",rotate:g})}function fw(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function hw(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function dw(t,e,n,r){const{y:i,y1:o,autoRotate:a,rotateToAlignArc:s,radius:c=.5,offset:l=0}=n,u=Dx(r,e,[i,o]),{startAngle:f,endAngle:h}=u,d=r.getCenter(),p=(f+h)/2,g={textAlign:"center",textBaseline:"middle",rotate:hw(p,a,s)},{innerRadius:y,outerRadius:v}=u,m=y+(v-y)*c+l,[b,x]=fw(d,p,m);return Object.assign({x:b,y:x},g)}function pw(t){return void 0===t?null:t}function gw(t,e,n,r){const{bounds:i}=n,[o]=i;return{x:pw(o[0]),y:pw(o[1])}}function yw(t,e,n,r){const{bounds:i}=n;if(1===i.length)return gw(0,0,n);return(_g(r)?uw:jg(r)?dw:lw)(t,e,n,r)}function vw(t,e,n){const r=Dx(n,t,[e.y,e.y1]),{innerRadius:i,outerRadius:o}=r;return i+(o-i)}function mw(t,e,n){const r=Dx(n,t,[e.y,e.y1]),{startAngle:i,endAngle:o}=r;return(i+o)/2}function bw(t,e,n,r){const{autoRotate:i,rotateToAlignArc:o,offset:a=0,connector:s=!0,connectorLength:c=a,connectorLength2:l=0,connectorDistance:u=0}=n,f=r.getCenter(),h=mw(e,n,r),d=Math.sin(h)>0?1:-1,p=hw(h,i,o),g={textAlign:d>0||_g(r)?"start":"end",textBaseline:"middle",rotate:p},y=vw(e,n,r),v=y+(s?c:a),[[m,b],[x,w],[O,k]]=function(t,e,n,r,i){const[o,a]=fw(t,e,n),[s,c]=fw(t,e,r);return[[o,a],[s,c],[s+(Math.sin(e)>0?1:-1)*i,c]]}(f,h,y,v,s?l:0),M=s?+u*d:0,_=O+M,E={connector:s,connectorPoints:[[x-_,w-k],[O-_,k-k]]};return Object.assign(Object.assign({x0:m,y0:b,x:O+M,y:k},g),E)}function xw(t,e,n,r){const{bounds:i}=n;if(1===i.length)return gw(0,0,n);return(_g(r)?uw:jg(r)?bw:lw)(t,e,n,r)}function ww(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ow(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,((t,e)=>e));return e.length>1?(e=e.map((e=>t.map(e))),r.sort(((t,n)=>{for(const r of e){const e=Mw(r[t],r[n]);if(e)return e}}))):(n=t.map(n),r.sort(((t,e)=>Mw(n[t],n[e])))),function(t,e){return Array.from(e,(e=>t[e]))}(t,r)}return t.sort(kw(n))}function kw(t=ww){if(t===ww)return Mw;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function Mw(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function _w(t,e={}){const{labelHeight:n=14,height:r}=e,i=Ow(t,(t=>t.y)),o=i.length,a=new Array(o);for(let t=0;t<o;t++){const e=i[t],{y:r}=e;a[t]={y:r,y1:r+n,labels:[r]}}let s=!0;for(;s;){s=!1;for(let t=a.length-1;t>0;t--){const e=a[t],n=a[t-1];if(n.y1>e.y){s=!0,n.labels.push(...e.labels),a.splice(t,1),n.y1+=e.y1-e.y;const i=n.y1-n.y;n.y1=Math.max(Math.min(n.y1,r),i),n.y=n.y1-i}}}let c=0;for(const t of a){const{y:e,labels:r}=t;let o=e-n;for(const t of r){const e=i[c++],r=o+n-t;e.connectorPoints[0][1]-=r,e.y=o+n,o+=n}}}function Ew(t,e){const n=Ow(t,(t=>t.y)),{height:r,labelHeight:i=14}=e,o=Math.ceil(r/i);if(n.length<=o)return _w(n,e);const a=[];for(let t=0;t<n.length;t++)t<n.length-o?(n[t].opacity=0,n[t].connector=!1):a.push(n[t]);_w(a,e)}var Sw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const Aw=new WeakMap;function jw(t,e,n,r,i,o){if(!jg(r))return{};if(Aw.has(e))return Aw.get(e);const a=o.map((t=>function(t,e,n){const{connectorLength:r,connectorLength2:i,connectorDistance:o}=e,a=Sw(bw(0,t,e,n),[]),s=n.getCenter(),c=vw(t,e,n),l=mw(t,e,n),u=c+r+i,f=Math.sin(l)>0?1:-1,h=s[0]+(u+ +o)*f,{x:d}=a,p=h-d;return a.x+=p,a.connectorPoints[0][0]-=p,a}(t,n,r))),{width:s,height:c}=r.getOptions(),l=a.filter((t=>t.x<s/2)),u=a.filter((t=>t.x>=s/2)),f=Object.assign(Object.assign({},i),{height:c});return Ew(l,f),Ew(u,f),a.forEach(((t,e)=>Aw.set(o[e],t))),Aw.get(e)}var Tw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function Pw(t,e,n,r){if(!jg(r))return{};const{connectorLength:i,connectorLength2:o,connectorDistance:a}=n,s=Tw(bw(0,e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),f=function(t){if(jg(t)){const[e,n]=t.getSize(),r=t.getOptions().transformations.find((t=>"polar"===t[0]));if(r)return Math.max(e,n)/2*r[4]}return 0}(r),h=f+i,d=jx([c-u[0],l-u[1]]),p=Math.sin(d)>0?1:-1,[g,y]=fw(u,d,h);return s.x=g+(o+a)*p,s.y=y,s}var Cw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function Rw(t,e,n,r,o,a){const{position:s}=e,{render:c}=o,l=function(t,e){return void 0!==t?t:jg(e)?"inside":kg(e)?"right":"top"}(s,n),u=r[c?"htmlLabel":"inside"===l?"innerLabel":"label"],f=Object.assign({},u,e),h=i[Zx(l)];if(!h)throw new Error(`Unknown position: ${l}`);return Object.assign(Object.assign({},u),h(l,t,f,n,o,a))}const Lw=(t,e)=>{const{coordinate:n,theme:r}=e,{render:i}=t;return(e,o,a,s)=>{const{text:c,x:l,y:u,transform:f="",transformOrigin:h,className:d=""}=o,p=Cw(o,["text","x","y","transform","transformOrigin","className"]),g=Rw(e,o,n,r,t,s),{rotate:y=0,transform:v=""}=g,m=Cw(g,["rotate","transform"]);return zd(new aw).call(Rx,m).style("text",`${c}`).style("className",`${d} g2-label`).style("innerHTML",i?i(c,o.datum,o.index):void 0).style("labelTransform",`${v} rotate(${+y}) ${f}`.trim()).style("labelTransformOrigin",h).style("coordCenter",n.getCenter()).call(Rx,p).node()}};Lw.props={defaultMarker:"point"};var Nw=function(t,e,n){var r=t,i=$e(e)?e.split("."):e;return i.forEach((function(t,e){e<i.length-1?(zn(r[t])||(r[t]=ze(i[e+1])?[]:{}),r=r[t]):r[t]=n})),t},Iw=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},Dw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const Bw=.03,Fw={fill:"#fff",stroke:"#aaa",lineDash:"4 3",lineWidth:.5,fillOpacity:1,strokeOpacity:1},zw=(t,e,n,r,i,o)=>{const a=[],s=[],c=r-1;for(let r=1;r<c;r++){const l=r/c*e,u=t+(r%2==0?n:-n);a.push(`${l},${u}`),s.push(`${l},${i?u-o:u+o}`)}return a.push(`${e},${t}`),s.push(`${e+o},${t}`),[a,s]},Zw=(t,e)=>{const{context:n,selection:r,view:i}=e,o=r.select(`.${N}`).node(),{document:a}=n.canvas,{scale:s}=i,c=new Map;return t=>{const{key:e,start:r,end:i,gap:l=Bw,vertices:u=50,lineWidth:f=.5,verticeOffset:h=3}=t,d=Dw(t,["key","start","end","gap","vertices","lineWidth","verticeOffset"]),p=a.createElement("g",{id:`break-group-${e}`,className:z}),g=Dh(s,"x.sortedDomain",[]),y=s.y.getOptions(),{range:v,domain:m}=y,b=m.indexOf(r),x=m.indexOf(i),{width:w,height:O}=o.getBBox();if(-1===b||-1===x||!g.length)return p;const k=v[0]>v[1],M=v[b]*O,_=v[x]*O;let E="",S="";for(const[t,{y:e,isLower:n}]of[{y:_,isLower:!1},{y:M,isLower:!0}].entries()){const r=k?f:-f,[i,o]=zw(e,w-0,h,u,n,r);0===t?(E=`M 0,${e} L ${i.join(" L ")} `,S=`M ${0-f},${e+r} L ${o.join(" L ")} `):(E+=`L ${w-0},${e} L ${[...i].reverse().join(" L ")} L 0,${e} Z`,S+=`L ${w-0+f+2},${e-r} L ${[...o].reverse().join(" L ")} L ${0-f},${e-r} Z`)}const A=Object.assign(Object.assign({},Fw),d);try{const t=new wl({style:Object.assign(Object.assign({},A),{d:E})}),a=new wl({style:Object.assign(Object.assign({},A),{d:S,lineWidth:0,cursor:"pointer"})});a.addEventListener("click",(t=>Iw(void 0,void 0,void 0,(function*(){t.stopPropagation(),2===t.detail&&(yield((t,e,r)=>Iw(void 0,void 0,void 0,(function*(){const{update:i,setState:o}=n.externals;o("options",(n=>{const{marks:i}=n;if(!i||!i.length)return n;const o=i.map((t=>{const n=Dh(t,"scale.y.breaks",[]),i=n.filter((t=>t.start!==e&&t.end!==r&&!t.collapsed));return n.forEach((t=>{t.start===e&&t.end===r&&(t.collapsed=!0)})),console.log("breaks group:",n,i),Jh({},t,{scale:{y:{breaks:i}}})}));return c.set(t,{start:e,end:r}),Object.assign(Object.assign({},n),{marks:o})})),yield i()})))(e,r,i))})))),p.appendChild(t),p.appendChild(a),o.addEventListener("click",(t=>Iw(void 0,void 0,void 0,(function*(){2===t.detail&&(yield Iw(void 0,void 0,void 0,(function*(){if(!c.size)return;const{update:t,setState:e}=n.externals;e("options",(t=>{const{marks:e}=t,n=e.map((t=>{const e=Dh(t,"scale.y.breaks",[]);return Nw(t,"scale.y.breaks",e.map((t=>Object.assign(Object.assign({},t),{collapsed:!1})))),t}));return c.clear(),Object.assign(Object.assign({},t),{marks:n})})),yield t()})))})))),o.appendChild(p)}catch(t){console.error("Failed to create break path:",t)}return p}};function Ww(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $w(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<0?i=e+1:o=e}while(i<o)}return i}return 2!==t.length?(e=ww,n=(e,n)=>ww(t(e),n),r=(e,n)=>t(e)-n):(e=t===ww||t===Ww?t:Gw,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<=0?i=e+1:o=e}while(i<o)}return i}}}function Gw(){return 0}Zw.props={};var qw=function(t,e){if(!lg(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n};function Yw(t){return null===t?NaN:+t}const Hw=$w(ww),Vw=Hw.right,Uw=Hw.left,Xw=$w(Yw).center;var Kw=Vw;function Qw(t){return!!t.getBandWidth}function Jw(t,e,n){if(!Qw(t))return t.invert(e);const{adjustedRange:r}=t;if(r.includes(e))return t.invert(e);const{domain:i}=t.getOptions(),o=n?-1:0,a=t.getStep(),s=n?r:r.map((t=>t+a)),c=function(t,e,n){return Math.min(n,Math.max(e,t))}(Uw(s,e)+o,0,i.length-1);return i[c]}function tO(t,e,n){if(!e)return t.getOptions().domain;if(!Qw(t)){const r=Ow(e);if(!n)return r;const[i]=r,{range:o}=t.getOptions(),[a,s]=o,c=a>s?-1:1;return[i,t.invert(t.map(i)+c*n)]}const{domain:r}=t.getOptions(),i=e[0],o=r.indexOf(i);if(n){const t=o+Math.round(r.length*n);return r.slice(o,t)}const a=e[e.length-1],s=r.indexOf(a);return r.slice(o,s+1)}function eO(t,e,n,r,i,o){const{x:a,y:s}=i,c=(t,e)=>{const[n,r]=o.invert(t);return[Jw(a,n,e),Jw(s,r,e)]},l=c([t,e],!0),u=c([n,r],!1);return[tO(a,[l[0],u[0]]),tO(s,[l[1],u[1]])]}function nO(t,e){const[n,r]=t;return[e.map(n),e.map(r)+(t=>t.getStep?t.getStep():0)(e)]}const rO=(t,e)=>{var n,r;const[i,o]=t,a=(null===(r=null===(n=e.getOptions)||void 0===n?void 0:n.call(e))||void 0===r?void 0:r.domain)||[],s=a.indexOf(i),c=a.indexOf(o);if(-1===s||-1===c)return[e.map(i),e.map(o)];const l=a.length;return l<=1?[0,1]:[s/(l-1),c/(l-1)]};const iO=Math.abs,oO=Math.atan2,aO=Math.cos,sO=Math.max,cO=Math.min,lO=Math.sin,uO=Math.sqrt,fO=1e-12,hO=Math.PI,dO=hO/2,pO=2*hO;function gO(t){return t>1?0:t<-1?hO:Math.acos(t)}function yO(t){return t>=1?dO:t<=-1?-dO:Math.asin(t)}function vO(t){return t.innerRadius}function mO(t){return t.outerRadius}function bO(t){return t.startAngle}function xO(t){return t.endAngle}function wO(t){return t&&t.padAngle}function OO(t,e,n,r,i,o,a,s){var c=n-t,l=r-e,u=a-i,f=s-o,h=f*c-u*l;if(!(h*h<fO))return[t+(h=(u*(e-o)-f*(t-i))/h)*c,e+h*l]}function kO(t,e,n,r,i,o,a){var s=t-n,c=e-r,l=(a?o:-o)/uO(s*s+c*c),u=l*c,f=-l*s,h=t+u,d=e+f,p=n+u,g=r+f,y=(h+p)/2,v=(d+g)/2,m=p-h,b=g-d,x=m*m+b*b,w=i-o,O=h*g-p*d,k=(b<0?-1:1)*uO(sO(0,w*w*x-O*O)),M=(O*b-m*k)/x,_=(-O*m-b*k)/x,E=(O*b+m*k)/x,S=(-O*m+b*k)/x,A=M-y,j=_-v,T=E-y,P=S-v;return A*A+j*j>T*T+P*P&&(M=E,_=S),{cx:M,cy:_,x01:-u,y01:-f,x11:M*(i/w-1),y11:_*(i/w-1)}}function MO(){var t=vO,e=mO,n=$x(0),r=null,i=bO,o=xO,a=wO,s=null,c=Jx(l);function l(){var l,u,f=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-dO,p=o.apply(this,arguments)-dO,g=iO(p-d),y=p>d;if(s||(s=l=c()),h<f&&(u=h,h=f,f=u),h>fO)if(g>pO-fO)s.moveTo(h*aO(d),h*lO(d)),s.arc(0,0,h,d,p,!y),f>fO&&(s.moveTo(f*aO(p),f*lO(p)),s.arc(0,0,f,p,d,y));else{var v,m,b=d,x=p,w=d,O=p,k=g,M=g,_=a.apply(this,arguments)/2,E=_>fO&&(r?+r.apply(this,arguments):uO(f*f+h*h)),S=cO(iO(h-f)/2,+n.apply(this,arguments)),A=S,j=S;if(E>fO){var T=yO(E/f*lO(_)),P=yO(E/h*lO(_));(k-=2*T)>fO?(w+=T*=y?1:-1,O-=T):(k=0,w=O=(d+p)/2),(M-=2*P)>fO?(b+=P*=y?1:-1,x-=P):(M=0,b=x=(d+p)/2)}var C=h*aO(b),R=h*lO(b),L=f*aO(O),N=f*lO(O);if(S>fO){var I,D=h*aO(x),B=h*lO(x),F=f*aO(w),z=f*lO(w);if(g<hO)if(I=OO(C,R,F,z,D,B,L,N)){var Z=C-I[0],W=R-I[1],$=D-I[0],G=B-I[1],q=1/lO(gO((Z*$+W*G)/(uO(Z*Z+W*W)*uO($*$+G*G)))/2),Y=uO(I[0]*I[0]+I[1]*I[1]);A=cO(S,(f-Y)/(q-1)),j=cO(S,(h-Y)/(q+1))}else A=j=0}M>fO?j>fO?(v=kO(F,z,C,R,h,j,y),m=kO(D,B,L,N,h,j,y),s.moveTo(v.cx+v.x01,v.cy+v.y01),j<S?s.arc(v.cx,v.cy,j,oO(v.y01,v.x01),oO(m.y01,m.x01),!y):(s.arc(v.cx,v.cy,j,oO(v.y01,v.x01),oO(v.y11,v.x11),!y),s.arc(0,0,h,oO(v.cy+v.y11,v.cx+v.x11),oO(m.cy+m.y11,m.cx+m.x11),!y),s.arc(m.cx,m.cy,j,oO(m.y11,m.x11),oO(m.y01,m.x01),!y))):(s.moveTo(C,R),s.arc(0,0,h,b,x,!y)):s.moveTo(C,R),f>fO&&k>fO?A>fO?(v=kO(L,N,D,B,f,-A,y),m=kO(C,R,F,z,f,-A,y),s.lineTo(v.cx+v.x01,v.cy+v.y01),A<S?s.arc(v.cx,v.cy,A,oO(v.y01,v.x01),oO(m.y01,m.x01),!y):(s.arc(v.cx,v.cy,A,oO(v.y01,v.x01),oO(v.y11,v.x11),!y),s.arc(0,0,f,oO(v.cy+v.y11,v.cx+v.x11),oO(m.cy+m.y11,m.cx+m.x11),y),s.arc(m.cx,m.cy,A,oO(m.y11,m.x11),oO(m.y01,m.x01),!y))):s.arc(0,0,f,O,w,y):s.lineTo(L,N)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-hO/2;return[aO(r)*n,lO(r)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:$x(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:$x(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:$x(+t),l):n},l.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:$x(+t),l):r},l.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:$x(+t),l):i},l.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:$x(+t),l):o},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:$x(+t),l):a},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}var _O=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function EO(t,e,n,r,i={}){const{inset:o=0,radius:a=0,insetLeft:s=o,insetTop:c=o,insetRight:l=o,insetBottom:u=o,radiusBottomLeft:f=a,radiusBottomRight:h=a,radiusTopLeft:d=a,radiusTopRight:p=a,minWidth:g=-1/0,maxWidth:y=1/0,minHeight:v=-1/0}=i,m=_O(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!Mg(r)&&!Eg(r)){const n=!!kg(r),[i,,o]=n?Ix(e):e,[a,b]=i,[x,w]=_x(o,i),O=(x>0?a:a+x)+s,k=(w>0?b:b+w)+c,M=Math.abs(x)-(s+l),_=Math.abs(w)-(c+u),E=n?mg(M,v,1/0):mg(M,g,y),S=n?mg(_,g,y):mg(_,v,1/0),A=n?O:O-(E-M)/2,j=n?k-(S-_)/2:k-(S-_);return zd(t.createElement("rect",{})).style("x",A).style("y",j).style("width",E).style("height",S).style("radius",[d,p,h,f]).call(Rx,m).node()}const{y:b,y1:x}=n,w=r.getCenter(),O=Dx(r,e,[b,x]),k=MO().cornerRadius(a).padAngle(o*Math.PI/180);return zd(t.createElement("path",{})).style("d",k(O)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",a).style("inset",o).call(Rx,m).node()}const SO=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=_O(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(e,r,l)=>{const{color:u,radius:f=0}=l,h=_O(l,["color","radius"]),d=h.lineWidth||1,{stroke:p,radius:g=f,radiusTopLeft:y=g,radiusTopRight:v=g,radiusBottomRight:m=g,radiusBottomLeft:b=g,innerRadius:x=0,innerRadiusTopLeft:w=x,innerRadiusTopRight:O=x,innerRadiusBottomRight:k=x,innerRadiusBottomLeft:M=x,lineWidth:_=("stroke"===n||p?d:0),inset:E=0,insetLeft:S=E,insetRight:A=E,insetBottom:j=E,insetTop:T=E,minWidth:P,maxWidth:C,minHeight:R}=a,L=_O(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:N=u,opacity:I}=r,D=[i?y:w,i?v:O,o?m:k,o?b:M],B=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];kg(s)&&B.push(B.shift());const F=Object.assign(Object.assign({radius:g},Object.fromEntries(B.map(((t,e)=>[t,D[e]])))),{inset:E,insetLeft:S,insetRight:A,insetBottom:j,insetTop:T,minWidth:P,maxWidth:C,minHeight:R});return zd(EO(c,e,r,s,F)).call(Rx,h).style("fill","transparent").style(n,N).style(Bx(t),I).style("lineWidth",_).style("stroke",void 0===p?N:p).call(Rx,L).node()}};function AO(t,e){if(e(t))return!0;if("g"===t.tagName){const{childNodes:n=[]}=t;for(const t of n)if(AO(t,e))return!0}return!1}SO.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const jO={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function TO(t,e){let n;return AO(t,(t=>{var r;return"g"!==t.tagName&&void 0!==(null===(r=t.style)||void 0===r?void 0:r[e])&&(n=t.style[e],!0)})),null!=n?n:jO[e]}function PO(t,e,n,r){t.style[e]=n,r&&t.children.forEach((t=>PO(t,e,n,r)))}function CO(t){PO(t,"visibility","hidden",!0)}function RO(t){PO(t,"visibility","visible",!0)}var LO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function NO(t){return zd(t).selectAll(`.${R}`).nodes().filter((t=>!t.__removed__))}function IO(t,e){return DO(t,e).flatMap((({container:t})=>NO(t)))}function DO(t,e){return e.filter((e=>e!==t&&e.options.parentKey===t.options.key))}function BO(t){return zd(t).select(`.${N}`).node()}function FO(t){if("g"===t.tagName)return t.getRenderBounds();const e=t.getGeometryBounds(),n=new Sr;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function zO(t,e){const{offsetX:n,offsetY:r}=e,i=FO(t),{min:[o,a],max:[s,c]}=i;return n<o||n>s||(r<a||r>c)?null:[n-o,r-a]}function ZO(t,e){const{offsetX:n,offsetY:r}=e,[i,o,a,s]=function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,o]}=e;return[n,r,i,o]}(t);return[Math.min(a,Math.max(i,n))-i,Math.min(s,Math.max(o,r))-o]}function WO(t){return t=>t.__data__.color}function $O(t){return t=>t.__data__.x}function GO(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap((t=>Array.from(t.markState.keys()).map((e=>[XO(t.key,e.key),e.data])))));return t=>{const{index:e,markKey:r,viewKey:i}=t.__data__;return n.get(XO(i,r))[e]}}const qO={selected:3,unselected:3,active:2,inactive:2,default:1},YO={selection:["selected","unselected"],highlight:["active","inactive"]},HO=(t,e,n)=>{AO(t,(t=>{"setAttribute"in t&&"function"==typeof t.setAttribute&&t.setAttribute(e,n)}))};function VO(t,e){return e.forEach((e=>{const n=e.__interactionStyle__;e.__interactionStyle__=n?Object.assign(Object.assign({},n),t):t})),(t=((t,e)=>t),e=HO)=>UO(void 0,t,e)}function UO(t,e=((t,e)=>t),n=HO){const r="__states__",i="__ordinal__",o=t=>qO[t]||qO.default,a=t=>{var e;return null===(e=Object.entries(YO).find((([e,n])=>n.includes(t))))||void 0===e?void 0:e[0]},s=a=>{var s;const{[r]:c=[],[i]:l={}}=a,u=[...c].sort(((t,e)=>o(e)-o(t))),f=new Map;for(const e of u){const n=(null===(s=null!=t?t:a.__interactionStyle__)||void 0===s?void 0:s[e])||{};for(const[t,e]of Object.entries(n))f.has(t)||f.set(t,e)}const h=Object.assign({},l);for(const[t,e]of f.entries())h[t]=e;if(0!==Object.keys(h).length){for(const[t,r]of Object.entries(h)){const i=TO(a,t),o=e(r,a);n(a,t,o),t in l||(l[t]=i)}a[i]=l}},c=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{c(t),t[r]=[...e],s(t)},updateState:(t,...e)=>{c(t);const n=t[r],i=new Set(e.map((t=>a(t))).filter((t=>void 0!==t))),o=n.filter((t=>!i.has(a(t))));t[r]=[...o,...e],s(t)},removeState:(t,...e)=>{c(t);for(const n of e){const e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}s(t)},hasState:(t,e)=>(c(t),-1!==t[r].indexOf(e))}}function XO(t,e){return`${t},${e}`}function KO(t,e){const n=(Array.isArray(t)?t:[t]).flatMap((t=>t.marks.map((e=>[XO(t.key,e.key),e.state])))),r={};for(const t of e){const[e,i]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce(((t,n)=>{const[r,o={}]=n,a=void 0===(s=o[e])||"object"==typeof s&&0===Object.keys(s).length?i:o[e];var s;for(const[e,n]of Object.entries(a)){const i=t[e],o=(t,e,o,a)=>{const s=XO(a.__data__.viewKey,a.__data__.markKey);return r!==s?null==i?void 0:i(t,e,o,a):"function"!=typeof n?n:n(t,e,o,a)};t[e]=o}return t}),{})}return r}function QO(t,e){const n=new Map(t.map(((t,e)=>[t,e]))),r=e?t.map(e):t;return(t,i)=>{if("function"!=typeof t)return t;const o=n.get(i);return t(e?e(i):i,o,r,i)}}function JO(t){var{link:e=!1,valueof:n=((t,e)=>t),coordinate:r}=t,i=LO(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const o=t=>t.__data__.points,a=(t,e)=>{const[,n,r]=t,[i,,,o]=e;return[n,i,o,r]};return[t=>{var e;if(t.length<=1)return;const r=Ow(t,((t,e)=>{const{x:n}=t.__data__,{x:r}=e.__data__;return n-r}));for(let t=1;t<r.length;t++){const s=Qx(),c=r[t-1],l=r[t],[u,f,h,d]=a(o(c),o(l));s.moveTo(...u),s.lineTo(...f),s.lineTo(...h),s.lineTo(...d),s.closePath();const p=rg(i,(t=>n(t,c))),{fill:g=c.getAttribute("fill")}=p,y=LO(p,["fill"]),v=new wl({className:"element-link",style:Object.assign({d:s.toString(),fill:g,zIndex:-2},y)});null===(e=c.link)||void 0===e||e.remove(),c.parentNode.appendChild(v),c.link=v}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function tk(t,e,n){const r=e=>{const{transform:n}=t.style;return n?`${n} ${e}`:e};if(Mg(n)){const{points:i}=t.__data__,[o,a]=kg(n)?Ix(i):i,s=n.getCenter(),c=_x(o,s),l=_x(a,s),u=Ax(c)+Tx(c,l)/2;return r(`translate(${e*Math.cos(u)}, ${e*Math.sin(u)})`)}return kg(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function ek(t){var{document:e,background:n,scale:r,coordinate:i,valueof:o}=t,a=LO(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(t,e,n)=>{const r=t.invert(e),i=e+t.getBandWidth(r)/2,o=t.getStep(r)/2,a=o*n;return[i-o+a,i+o-a]},l=(t,n)=>{const{padding:o}=n,[a,s]=((t,e)=>{const{x:n}=r;if(!Qw(n))return[0,1];const{__data__:i}=t,{x:o}=i,[a,s]=c(n,o,e);return[a,s]})(t,o),[l,u]=((t,e)=>{const{y:n}=r;if(!Qw(n))return[0,1];const{__data__:i}=t,{y:o}=i,[a,s]=c(n,o,e);return[a,s]})(t,o),f=[[a,l],[s,l],[s,u],[a,u]].map((t=>i.map(t))),{__data__:h}=t,{y:d,y1:p}=h;return EO(e,f,{y:d,y1:p},i,n)},u=(t,e)=>{const{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,o=LO(e,["transform","transformOrigin","stroke"]),a=Object.assign({transform:n,transformOrigin:r,stroke:i},o),s=t.cloneNode(!0);for(const[t,e]of Object.entries(a))s.style[t]=e;return s};return[t=>{t.background&&t.background.remove();const e=rg(a,(e=>o(e,t))),{fill:n="#CCD6EC",fillOpacity:i=.3,zIndex:c=-2,padding:f=.001,lineWidth:h=0}=e,d=LO(e,["fill","fillOpacity","zIndex","padding","lineWidth"]),p=Object.assign(Object.assign({},d),{fill:n,fillOpacity:i,zIndex:c,padding:f,lineWidth:h}),g=(()=>{const{x:t,y:e}=r;return[t,e].some(Qw)})()?l:u,y=g(t,p);y.className=s,t.parentNode.parentNode.appendChild(y),t.background=y},t=>{var e;null===(e=t.background)||void 0===e||e.remove(),t.background=null},t=>t.className===s]}function nk(t,e){const n=t.getRootNode().defaultView.getContextService().getDomElement();(null==n?void 0:n.style)&&(t.cursor=n.style.cursor,n.style.cursor=e)}function rk(t){nk(t,t.cursor)}function ik(t,e,n){return t.find((t=>Object.entries(e).every((([e,r])=>n(t)[e]===r))))}function ok(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function ak(t,e=!1){const n=qw(t,(t=>!!t)).map(((t,e)=>[0===e?"M":"L",...t]));return e&&n.push(["Z"]),n}function sk(t){return t.querySelectorAll(".element")}function ck(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}const lk=["interval","point","density"];function uk({elementsof:t,root:e,coordinate:n,scale:r,validFindByXMarks:i=lk}){var o,a;let s=t(e);const c=t=>i.includes(t.markType);if(s.find(c)){s=s.filter(c);const t=r.x,i=r.series,l=null!==(a=null===(o=null==t?void 0:t.getBandWidth)||void 0===o?void 0:o.call(t))&&void 0!==a?a:0,u=i?t=>{var e,n;const r=Math.round(1/(null!==(e=i.valueBandWidth)&&void 0!==e?e:1));return t.__data__.x+(null!==(n=t.__data__.series)&&void 0!==n?n:0)*l+l/(2*r)}:t=>t.__data__.x+l/2;return s.sort(((t,e)=>u(t)-u(e))),t=>{const r=zO(e,t);if(!r)return;const[i]=n.invert(r),o=(0,$w(u).center)(s,i);return s[o]}}return t=>{const{target:e}=t;return ck(e,(t=>!!t.classList&&t.classList.includes("element")))}}function fk(t){const e=.01/Math.max(t,1e-4);return Math.max(.1,Math.min(100,e))}function hk(t){return!1===t||null==t}function dk(t,e){return e.some((e=>{const{scale:n}=e,r=null==n?void 0:n[t];return!!(null==r?void 0:r.independent)}))}function pk(t){var e,n,r,i;const o=Array.from(t.markState.keys()),a=dk("x",o),s=dk("y",o),c=[],l=[],u=[],f=[],h=new Map,d=new Map;let p=1,g=1;for(const[o]of t.markState.entries()){const t=o.key;(null===(n=null===(e=null==o?void 0:o.scale)||void 0===e?void 0:e.x)||void 0===n?void 0:n.independent)?(l.push(t),h.set(t,"x"+p++)):(c.push(t),h.set(t,"x")),(null===(i=null===(r=null==o?void 0:o.scale)||void 0===r?void 0:r.y)||void 0===i?void 0:i.independent)?(f.push(t),d.set(t,"y"+g++)):(u.push(t),d.set(t,"y"))}return{hasIndependentX:a,hasIndependentY:s,marksWithSharedX:c,marksWithIndependentX:l,marksWithSharedY:u,marksWithIndependentY:f,markToXScaleMap:h,markToYScaleMap:d}}function gk(t,e,n,r=(t=>!0)){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);const{target:o}=i;if(!o)return;const{className:a}=o;if("plot"===a)return;const s=ck(o,(t=>"element"===t.className));const c=function(t){return ck(t,(t=>"component"===t.className))}(o),l=function(t){return ck(t,(t=>"label"===t.className))}(o),u=s||c||l;if(!u)return;const{className:f,markType:h}=u,d=Object.assign(Object.assign({},i),{nativeEvent:!0});"element"===f?(d.data={data:Md(u,e)},n.emit(`element:${t}`,d),n.emit(`${h}:${t}`,d)):"label"===f?(d.data={data:u.attributes.datum},n.emit(`label:${t}`,d),n.emit(`${a}:${t}`,d)):(n.emit(`component:${t}`,d),n.emit(`${a}:${t}`,d))}}function yk(){return(t,e,n)=>{const{container:r,view:i}=t,o=gk(pp,i,n,(t=>1===t.detail)),a=gk(gp,i,n,(t=>2===t.detail)),s=gk(Qd,i,n),c=gk(Jd,i,n),l=gk(tp,i,n),u=gk(ep,i,n),f=gk(np,i,n),h=gk(rp,i,n),d=gk(ip,i,n),p=gk(op,i,n),g=gk(ap,i,n),y=gk(sp,i,n),v=gk(cp,i,n),m=gk(lp,i,n),b=gk(up,i,n),x=gk(fp,i,n),w=gk(hp,i,n),O=gk(dp,i,n);return r.addEventListener("click",o),r.addEventListener("click",a),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",y),r.addEventListener("drag",v),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",O),()=>{r.removeEventListener("click",o),r.removeEventListener("click",a),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",y),r.removeEventListener("drag",v),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",O)}}}yk.props={reapplyWhenUpdate:!0};var vk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function mk(t,e){const n=Object.assign(Object.assign({},{"component.axisRadar":Fm,"component.axisLinear":Nm,"component.axisArc":Im,"component.legendContinuousBlock":px,"component.legendContinuousBlockSize":yx,"component.legendContinuousSize":gx,"interaction.event":yk,"composition.mark":mx,"composition.view":Mx,"shape.label.label":Lw,"shape.break":Zw}),e),r=e=>{if("string"!=typeof e)return e;const r=`${t}.${e}`;return n[r]||jd(`Unknown Component: ${r}`)};return[(t,e)=>{const{type:n}=t,i=vk(t,["type"]);n||jd("Plot type is required!");const o=r(n);return null==o?void 0:o(i,e)},r]}function bk(t){const{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||jd("Cannot find library document")}var xk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function wk(t,e){const{coordinate:n={},coordinates:r}=t,i=xk(t,["coordinate","coordinates"]);if(r)return t;const{type:o,transform:a=[]}=n,s=xk(n,["type","transform"]);if(!o)return Object.assign(Object.assign({},i),{coordinates:a});const[,c]=mk("coordinate",e),{transform:l=!1}=c(o).props||{};if(l)throw new Error(`Unknown coordinate: ${o}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:o},s),...a]})}function Ok(t,e){return t.filter((t=>t.type===e))}function kk(t){return Ok(t,"polar").length>0}function Mk(t){return Ok(t,"transpose").length%2==1}function _k(t){return Ok(t,"theta").length>0}function Ek(t){return Ok(t,"radial").length>0}function Sk(t){return Ok(t,"radar").length>0}function Ak(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}var jk=Ak("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Tk=Ak("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Pk=Ak("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Ck=Ak("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),Rk=Ak("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Lk=Ak("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Nk=Ak("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Ik=Ak("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Dk=Ak("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Bk=Ak("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Fk=Ak("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function zk(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Zk(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Wk(){}var $k=.7,Gk=1/$k,qk="\\s*([+-]?\\d+)\\s*",Yk="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hk="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vk=/^#([0-9a-f]{3,8})$/,Uk=new RegExp("^rgb\\(".concat(qk,",").concat(qk,",").concat(qk,"\\)$")),Xk=new RegExp("^rgb\\(".concat(Hk,",").concat(Hk,",").concat(Hk,"\\)$")),Kk=new RegExp("^rgba\\(".concat(qk,",").concat(qk,",").concat(qk,",").concat(Yk,"\\)$")),Qk=new RegExp("^rgba\\(".concat(Hk,",").concat(Hk,",").concat(Hk,",").concat(Yk,"\\)$")),Jk=new RegExp("^hsl\\(".concat(Yk,",").concat(Hk,",").concat(Hk,"\\)$")),tM=new RegExp("^hsla\\(".concat(Yk,",").concat(Hk,",").concat(Hk,",").concat(Yk,"\\)$")),eM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function nM(){return this.rgb().formatHex()}function rM(){return this.rgb().formatRgb()}function iM(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Vk.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?oM(e):3===n?new lM(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?aM(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?aM(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=Uk.exec(t))?new lM(e[1],e[2],e[3],1):(e=Xk.exec(t))?new lM(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Kk.exec(t))?aM(e[1],e[2],e[3],e[4]):(e=Qk.exec(t))?aM(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Jk.exec(t))?gM(e[1],e[2]/100,e[3]/100,1):(e=tM.exec(t))?gM(e[1],e[2]/100,e[3]/100,e[4]):eM.hasOwnProperty(t)?oM(eM[t]):"transparent"===t?new lM(NaN,NaN,NaN,0):null}function oM(t){return new lM(t>>16&255,t>>8&255,255&t,1)}function aM(t,e,n,r){return r<=0&&(t=e=n=NaN),new lM(t,e,n,r)}function sM(t){return t instanceof Wk||(t=iM(t)),t?new lM((t=t.rgb()).r,t.g,t.b,t.opacity):new lM}function cM(t,e,n,r){return 1===arguments.length?sM(t):new lM(t,e,n,null==r?1:r)}function lM(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function uM(){return"#".concat(pM(this.r)).concat(pM(this.g)).concat(pM(this.b))}function fM(){var t=hM(this.opacity);return"".concat(1===t?"rgb(":"rgba(").concat(dM(this.r),", ").concat(dM(this.g),", ").concat(dM(this.b)).concat(1===t?")":", ".concat(t,")"))}function hM(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function dM(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function pM(t){return((t=dM(t))<16?"0":"")+t.toString(16)}function gM(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vM(t,e,n,r)}function yM(t){if(t instanceof vM)return new vM(t.h,t.s,t.l,t.opacity);if(t instanceof Wk||(t=iM(t)),!t)return new vM;if(t instanceof vM)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new vM(a,s,c,t.opacity)}function vM(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mM(t){return(t=(t||0)%360)<0?t+360:t}function bM(t){return Math.max(0,Math.min(1,t||0))}function xM(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function wM(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}zk(Wk,iM,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:nM,formatHex:nM,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return yM(this).formatHsl()},formatRgb:rM,toString:rM}),zk(lM,cM,Zk(Wk,{brighter:function(t){return t=null==t?Gk:Math.pow(Gk,t),new lM(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?$k:Math.pow($k,t),new lM(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new lM(dM(this.r),dM(this.g),dM(this.b),hM(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uM,formatHex:uM,formatHex8:function(){return"#".concat(pM(this.r)).concat(pM(this.g)).concat(pM(this.b)).concat(pM(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:fM,toString:fM})),zk(vM,(function(t,e,n,r){return 1===arguments.length?yM(t):new vM(t,e,n,null==r?1:r)}),Zk(Wk,{brighter:function(t){return t=null==t?Gk:Math.pow(Gk,t),new vM(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?$k:Math.pow($k,t),new vM(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new lM(xM(t>=240?t-240:t+120,i,r),xM(t,i,r),xM(t<120?t+240:t-120,i,r),this.opacity)},clamp:function(){return new vM(mM(this.h),bM(this.s),bM(this.l),hM(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=hM(this.opacity);return"".concat(1===t?"hsl(":"hsla(").concat(mM(this.h),", ").concat(100*bM(this.s),"%, ").concat(100*bM(this.l),"%").concat(1===t?")":", ".concat(t,")"))}}));var OM=function(t){return function(){return t}};function kM(t,e){return function(n){return t+n*e}}function MM(t){return 1==(t=+t)?_M:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):OM(isNaN(e)?n:e)}}function _M(t,e){var n=e-t;return n?kM(t,n):OM(isNaN(t)?e:t)}(function t(e){var n=MM(e);function r(t,e){var r=n((t=cM(t)).r,(e=cM(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=_M(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r})(1);function EM(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=cM(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}var SM=EM((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return wM((n-r/e)*e,a,i,o,s)}})),AM=(EM((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return wM((n-r/e)*e,i,o,a,s)}})),t=>SM(t[t.length-1])),jM=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Ak),TM=AM(jM),PM=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Ak),CM=AM(PM),RM=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Ak),LM=AM(RM),NM=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Ak),IM=AM(NM),DM=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Ak),BM=AM(DM),FM=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Ak),zM=AM(FM),ZM=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Ak),WM=AM(ZM),$M=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Ak),GM=AM($M),qM=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Ak),YM=AM(qM),HM=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Ak),VM=AM(HM),UM=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Ak),XM=AM(UM),KM=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Ak),QM=AM(KM),JM=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Ak),t_=AM(JM),e_=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Ak),n_=AM(e_),r_=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Ak),i_=AM(r_),o_=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Ak),a_=AM(o_),s_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Ak),c_=AM(s_),l_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Ak),u_=AM(l_),f_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Ak),h_=AM(f_),d_=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Ak),p_=AM(d_),g_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Ak),y_=AM(g_),v_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Ak),m_=AM(v_),b_=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Ak),x_=AM(b_),w_=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Ak),O_=AM(w_),k_=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Ak),M_=AM(k_),__=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Ak),E_=AM(__),S_=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Ak),A_=AM(S_);function j_(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)))))))+")"}var T_=Math.PI/180,P_=180/Math.PI,C_=-.14861,R_=1.78277,L_=-.29227,N_=-.90649,I_=1.97294,D_=-1.7884503806,B_=3.5172982438,F_=-.6557636667999999;function z_(t){if(t instanceof W_)return new W_(t.h,t.s,t.l,t.opacity);t instanceof lM||(t=sM(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(F_*r+D_*e-B_*n)/(F_+D_-B_),o=r-i,a=(I_*(n-i)-L_*o)/N_,s=Math.sqrt(a*a+o*o)/(I_*i*(1-i)),c=s?Math.atan2(a,o)*P_-120:NaN;return new W_(c<0?c+360:c,s,i,t.opacity)}function Z_(t,e,n,r){return 1===arguments.length?z_(t):new W_(t,e,n,null==r?1:r)}function W_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $_(t){return function e(n){function r(e,r){var i=t((e=Z_(e)).h,(r=Z_(r)).h),o=_M(e.s,r.s),a=_M(e.l,r.l),s=_M(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}zk(W_,Z_,Zk(Wk,{brighter:function(t){return t=null==t?Gk:Math.pow(Gk,t),new W_(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?$k:Math.pow($k,t),new W_(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*T_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new lM(255*(e+n*(C_*r+R_*i)),255*(e+n*(L_*r+N_*i)),255*(e+n*(I_*r)),this.opacity)}}));$_((function(t,e){var n=e-t;return n?kM(t,n>180||n<-180?n-360*Math.round(n/360):n):OM(isNaN(t)?e:t)}));var G_=$_(_M),q_=G_(Z_(300,.5,0),Z_(-240,.5,1)),Y_=G_(Z_(-100,.75,.35),Z_(80,1.5,.8)),H_=G_(Z_(260,.75,.35),Z_(80,1.5,.8)),V_=Z_();function U_(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return V_.h=360*t-100,V_.s=1.5-1.5*e,V_.l=.8-.9*e,V_+""}var X_=cM(),K_=Math.PI/3,Q_=2*Math.PI/3;function J_(t){var e;return t=(.5-t)*Math.PI,X_.r=255*(e=Math.sin(t))*e,X_.g=255*(e=Math.sin(t+K_))*e,X_.b=255*(e=Math.sin(t+Q_))*e,X_+""}function tE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function eE(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var nE=eE(Ak("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rE=eE(Ak("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),iE=eE(Ak("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),oE=eE(Ak("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function aE(t,e,n,r,i,a){const{guide:s={}}=n,c=function(t,e,n){const{type:r,domain:i,range:o,quantitative:a,ordinal:s}=n;if(void 0!==r)return r;if(function(t){return OE(t,Dd)}(e))return"identity";if("string"==typeof o)return"linear";if((i||o||[]).length>2)return vE(t,s);if(void 0!==i)return xE([i])?vE(t,s):wE(e)?"time":mE(t,o,a);return xE(e)?vE(t,s):wE(e)?"time":mE(t,o,a)}(t,e,n);if("string"!=typeof c)return n;const l=function(t,e,n,r){const{domain:i}=r;if(void 0!==i)return i;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return bE(function(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const e of t)for(const t of e)Pd(t)&&(r=Math.min(r,+t),i=Math.max(i,+t));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}(n,r),r);case"band":case"ordinal":case"point":return function(t){return Array.from(new Set(t.flat()))}(n);case"quantile":return function(t){return t.flat().sort()}(n);case"sequential":return bE(function(t){let e=1/0,n=-1/0;for(const r of t)for(const t of r)Pd(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(n),r);default:return[]}}(c,0,e,n),u=function(t,e,n){const{ratio:r}=n;if(null==r)return e;if(dE({type:t}))return function(t,e,n){const r=t.map(Number),i=new sm({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return"time"===n?t.map((t=>new Date(i.map(t)))):t.map((t=>i.map(t)))}(e,r,t);return pE({type:t})?function(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}(e,r):e}(c,l,n);return Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t,e){const{interpolate:n=Qv,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}(0,r);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});const i=function(t,e,n){return"enterDelay"===e||"enterDuration"===e||"size"===e?0:"band"===t?_k(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:o=i,paddingOuter:a=i}=r;return Object.assign(Object.assign({},r),{paddingInner:o,paddingOuter:a,padding:i,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=$p(e),i=o[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(r);default:return r}}(c,t,0,n,r)),{domain:u,range:gE(c,t,e,n,u,i,a),expectedDomain:l,guide:s,name:t,type:c})}function sE(t,e){const n={};for(const r of t){const{values:t,name:i}=r,o=e[i];for(const e of t){const{name:t,value:r}=e;n[t]=r.map((t=>o.map(t)))}}return n}function cE(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:e}=r.getOptions();if(e in t){const i=n.filter((t=>t.startsWith(e))).map((t=>+(t.replace(e,"")||0))),o=dg(i)+1,a=`${e}${o}`;t[a]=r,r.getOptions().key=a}else t[e]=r}return t}function lE(t,e){const[n]=mk("scale",e),{relations:r}=t,[i]=function(t){if(!t||!Array.isArray(t))return[Ed,Ed];let e,n;return[r=>{var i;e=r.map.bind(r),n=null===(i=r.invert)||void 0===i?void 0:i.bind(r);const o=t.filter((([t])=>"function"==typeof t)),a=t.filter((([t])=>"function"!=typeof t)),s=new Map(a);if(r.map=t=>{for(const[e,n]of o)if(e(t))return n;return s.has(t)?s.get(t):e(t)},!n)return r;const c=new Map(a.map((([t,e])=>[e,t]))),l=new Map(o.map((([t,e])=>[e,t])));return r.invert=t=>l.has(t)?t:c.has(t)?c.get(t):n(t),r},t=>(null!==e&&(t.map=e),null!==n&&(t.invert=n),t)]}(r);return i(n(t))}function uE(t){const e=t.flatMap((t=>Array.from(t.values()))).flatMap((t=>t.channels.map((t=>t.scale))));hE(e,"x"),hE(e,"y")}function fE(t){const{channels:e=[],type:n,scale:r={}}=t,i=["shape","color","opacity","size"];return 0!==e.length?e:"axisX"===n?["x"]:"axisY"===n?["y"]:"legends"===n?Object.keys(r).filter((t=>i.includes(t))):[]}function hE(t,e){const n=t.filter((({name:t,facet:n=!0})=>n&&t===e)),r=n.flatMap((t=>t.domain)),i=n.every(dE)?fm(r):n.every(pE)?Array.from(new Set(r)):null;if(null!==i)for(const t of n)t.domain=i}function dE(t){const{type:e}=t;if("string"!=typeof e)return!1;return["linear","log","pow","time"].includes(e)}function pE(t){const{type:e}=t;if("string"!=typeof e)return!1;return["band","point","ordinal"].includes(e)}function gE(t,e,n,r,i,o,a){const{range:s}=r;if("string"==typeof s)return function(t){return t.split("-")}(s);if(void 0!==s)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const t=yE(n,r,i,o,a),[s,u]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[og(e),ag(e)]:"opacity"===t?[0,1]:"size"===t?[1,10]:[0,1]}(e,t);return[null!=c?c:s,null!=l?l:u]}case"band":case"point":return[null!=c?c:"size"===e?5:0,null!=l?l:"size"===e?10:1];case"ordinal":return yE(n,r,i,o,a);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function yE(t,e,n,r,i){const[a]=mk("palette",i),{category10:s,category20:c}=r,l=function(t){return Array.from(new Set(t))}(n).length<=s.length?s:c,{palette:u=l,offset:f}=e;if(Array.isArray(u))return u;try{return a({type:u})}catch(t){const e=function(t,e,n=(t=>t)){if(!t)return null;const r=$p(t),i=o[`scheme${r}`],a=o[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const t=i[e.length];if(t)return t}return e.map(((t,r)=>a(n(r/e.length))))}(u,n,f);if(e)return e;throw new Error(`Unknown Component: ${u} `)}}function vE(t,e){return e||(function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal")}function mE(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function bE(t,e){if(0===t.length)return t;const{domainMin:n,domainMax:r}=e,[i,o]=t;return[null!=n?n:i,null!=r?r:o]}function xE(t){return OE(t,(t=>{const e=typeof t;return"string"===e||"boolean"===e}))}function wE(t){return OE(t,(t=>t instanceof Date))}function OE(t,e){for(const n of t)if(n.some(e))return!0;return!1}const kE={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},ME={threshold:"threshold",quantize:"quantize",quantile:"quantile"},_E={ordinal:"ordinal",band:"band",point:"point"},EE={constant:"constant"};var SE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function AE(t,e,n){const{coordinates:r=[],title:i}=e,[,o]=mk("component",n),a=t.filter((({guide:t})=>null!==t)),s=[],c=function(t,e,n){const[,r]=mk("component",n),{coordinates:i}=t;function o(t,e,n,o){const a=function(t,e,n=[]){return"x"===t?Mk(n)?`${e}Y`:`${e}X`:"y"===t?Mk(n)?`${e}X`:`${e}Y`:null}(e,t,i);if(!o||!a)return;const{props:s}=r(a),{defaultPosition:c,defaultSize:l,defaultOrder:u,defaultCrossPadding:[f]}=s;return Object.assign(Object.assign({position:c,defaultSize:l,order:u,type:a,crossPadding:f},o),{scales:[n]})}return e.filter((t=>t.slider||t.scrollbar)).flatMap((t=>{const{slider:e,scrollbar:n,name:r}=t;return[o("slider",r,t,e),o("scrollbar",r,t,n)]})).filter((t=>!!t))}(e,t,n);if(s.push(...c),i){const{props:t}=o("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:a,defaultCrossPadding:c}=t,l="string"==typeof i?{title:i}:i;s.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:c[0],defaultSize:a},l))}const l=function(t,e){const n=t.filter((t=>function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;const{type:e,domain:n,range:r,interpolator:i}=t,o=n&&n.length>0,a=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&o&&a)||!(!["sequential"].includes(e)||!o||!a&&!i)||!(!["constant","identity"].includes(e)||!a)}(t)));return[...PE(n,e),...RE(n,e)]}(a,r);return l.forEach((([t,e])=>{const{props:n}=o(t),{defaultPosition:i,defaultPlane:c="xy",defaultOrientation:l,defaultSize:u,defaultOrder:f,defaultLength:h,defaultPadding:d=[0,0],defaultCrossPadding:p=[0,0]}=n,g=Jh({},...e),{guide:y,field:v}=g,m=Array.isArray(y)?y:[y];for(const n of m){const[o,g]=IE(t,i,l,n,e,a,r);if(!o&&!g)continue;const y="left"===o||"right"===o,m=y?d[1]:d[0],b=y?p[1]:p[0],{size:x,order:w=f,length:O=h,padding:k=m,crossPadding:M=b}=n;s.push(Object.assign(Object.assign({title:v},n),{defaultSize:u,length:O,position:o,plane:c,orientation:g,padding:k,order:w,crossPadding:M,size:x,type:t,scales:e}))}})),s}function jE(t,e,n,r,i){const[o]=mk("component",r),{scaleInstances:a,scale:s,bbox:c}=t,l={bbox:c,library:r};return o(SE(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:i,scales:a,theme:n,value:l,scale:s})}function TE(t,e){const n=["left","right","bottom","top"],r=qh(t,(({type:t,position:e,group:r})=>n.includes(e)?void 0===r?t.startsWith("legend")?`legend-${e}`:Symbol("independent"):"independent"===r?Symbol("independent"):r:Symbol("independent")));return r.flatMap((([,t])=>{if(1===t.length)return t[0];if(void 0!==e){const n=t.filter((t=>void 0!==t.length)).map((t=>t.length)),r=hg(n);if(r>e)return t.forEach((t=>t.group=Symbol("independent"))),t;const i=(e-r)/(t.length-n.length);t.forEach((t=>{void 0===t.length&&(t.length=i)}))}const n=dg(t,(t=>t.size)),r=dg(t,(t=>t.order)),i=dg(t,(t=>t.crossPadding));return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}}))}function PE(t,e){const n=["shape","size","color","opacity"],r=t.filter((({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!((t,e)=>"constant"===t&&"size"===e)(t,e))),i=r.filter((({type:t})=>"constant"===t)),o=qh(r.filter((({type:t})=>"constant"!==t)),(t=>t.field?t.field:Symbol("independent"))).map((([t,e])=>[t,[...e,...i]])).filter((([,t])=>t.some((t=>"constant"!==t.type)))),a=new Map(o);if(0===a.size)return[];const s=t=>t.sort((([t],[e])=>t.localeCompare(e))),c=Array.from(a).map((([,t])=>{const e=function(t){if(1===t.length)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...cg(t,n));return e}(t).sort(((t,e)=>e.length-t.length)),n=e.map((t=>({combination:t,option:t.map((t=>[t.name,CE(t)]))})));for(const{option:t,combination:e}of n)if(!t.every((t=>"constant"===t[1]))&&t.every((t=>"discrete"===t[1]||"constant"===t[1])))return["legendCategory",e];for(const[t,e]of xg)for(const{option:r,combination:i}of n)if(e.some((t=>fg(s(t),s(r)))))return[t,i];return null})).filter(Pd);return c}function CE(t){const{type:e}=t;return"string"!=typeof e?null:e in kE?"continuous":e in _E?"discrete":e in ME?"distribution":e in EE?"constant":null}function RE(t,e){return t.map((t=>{const{name:n}=t;if(function(t){return Ok(t,"helix").length>0}(e)||_k(e))return null;if(Mk(e)&&(kk(e)||Ek(e)))return null;if(n.startsWith("x"))return kk(e)?["axisArc",[t]]:Ek(e)?["axisLinear",[t]]:[Mk(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return kk(e)?["axisLinear",[t]]:Ek(e)?["axisArc",[t]]:[Mk(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if(Sk(e))return["axisRadar",[t]];if(!kk(e))return["axisY",[t]]}return null})).filter(Pd)}function LE(t){const e=Ok(t,"polar");if(e.length){const t=e[e.length-1],{startAngle:n,endAngle:r}=pg(t);return[n,r]}const n=Ok(t,"radial");if(n.length){const t=n[n.length-1],{startAngle:e,endAngle:r}=yg(t);return[e,r]}return[-Math.PI/2,Math.PI/2*3]}function NE(t,e,n,r,i){const{name:o}=n[0];if("axisRadar"===t){const t=r.filter((t=>t.name.startsWith("position"))),e=function(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}(o);if(null===e)return[null,null];const[n,a]=LE(i);return["center",(a-n)/(Sk(i)?t.length:t.length-1)*e+n]}if("axisY"===t&&function(t){return Ok(t,"parallel").length>0}(i))return Mk(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){const[t]=LE(i);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:kk(i)||Ek(i)?["center",null]:"axisX"===t&&function(t){return Ok(t,"reflect").length>0}(i)||"axisX"===t&&function(t){return Ok(t,"reflectY").length>0}(i)?["top",null]:e}function IE(t,e,n,r,i,o,a){const[s]=LE(a),c=[r.position||e,null!=s?s:n];return"string"==typeof t&&t.startsWith("axis")?NE(t,c,i,o,a):"string"==typeof t&&t.startsWith("legend")&&kk(a)&&"center"===r.position?["center","vertical"]:c}function DE(t,e,n,r,i,o){const{type:a}=t;if(!["left","right","bottom","top"].includes(r))return;if("string"!=typeof a)return;const s=a;return(s.startsWith("axis")?WE:s.startsWith("group")?BE:s.startsWith("legendContinuous")?$E:"legendCategory"===s?GE:s.startsWith("slider")?ZE:"title"===s?zE:s.startsWith("scrollbar")?FE:()=>{})(t,e,n,r,i,o)}function BE(t,e,n,r,i,o){const{children:a}=t,s=dg(a,(t=>t.crossPadding));a.forEach((t=>t.crossPadding=s)),a.forEach((t=>DE(t,e,n,r,i,o)));const c=dg(a,(t=>t.size));t.size=c,a.forEach((t=>t.size=c))}function FE(t,e,n,r,i,o){const{trackSize:a=6}=Jh({},i.scrollbar,t);t.size=a}function zE(t,e,n,r,i,o){const a=Jh({},i.title,t),{title:s,subtitle:c,spacing:l=0}=a,u=SE(a,["title","subtitle","spacing"]);if(s){const e=XE(s,Rd(u,"title"));t.size=e.height}if(c){const e=XE(c,Rd(u,"subtitle"));t.size+=l+e.height}}function ZE(t,e,n,r,i,o){const{trackSize:a,handleIconSize:s}=(()=>{const{slider:e}=i;return Jh({},e,t)})(),c=Math.max(a,2.4*s);t.size=c}function WE(t,e,n,r,i,o){var a,s;t.transform=t.transform||[{type:"hide"}];const c="left"===r||"right"===r,l=VE(t,r,i),{tickLength:u=0,labelSpacing:f=0,titleSpacing:h=0,labelAutoRotate:d}=l,p=SE(l,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),g=qE(t,o),y=YE(p,g);let v=u;if("function"==typeof t.tickLength){const e=((null===(a=g.getTicks)||void 0===a?void 0:a.call(g))||g.getOptions().domain).map(((e,n,r)=>t.tickLength(e,n,r)));v=Math.max(...e,0)}const m=v+f;if(y&&y.length){const r=dg(y,(t=>t.width)),i=dg(y,(t=>t.height));if(c)t.size=r+m;else{const{tickFilter:o,labelTransform:a}=t;!function(t,e,n,r,i){const o=hg(e,(t=>t.width));if(o>n)return!0;const a=t.clone();a.update({range:[0,n]});const s=UE(t,i),c=s.map((t=>a.map(t)+function(t,e){if(!t.getBandWidth)return 0;const n=t.getBandWidth(e)/2;return n}(a,t))),l=s.map(((t,e)=>e)),u=-r[0],f=n+r[1],h=(t,e)=>{const{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<l.length;t++){const n=c[t],[r,i]=h(n,e[t]);if(r<u||i>f)return!0;const o=c[t+1];if(o){const[n]=h(o,e[t+1]);if(i>n)return!0}}return!1}(g,y,e,n,o)||a||!1===d||null===d?(t.labelTransform=null!==(s=t.labelTransform)&&void 0!==s?s:"rotate(0)",t.size=i+m):(t.labelTransform="rotate(90)",t.size=r+m)}}else t.size=v;const b=HE(p);b&&(t.size+=c?h+b.width:h+b.height)}function $E(t,e,n,r,i,o){const a=(()=>{const{legendContinuous:e}=i;return Jh({},e,t)})(),{labelSpacing:s=0,titleSpacing:c=0}=a,l=SE(a,["labelSpacing","titleSpacing"]),u="left"===r||"right"===r,f=Rd(l,"ribbon"),{size:h}=f,d=Rd(l,"handleIcon"),{size:p}=d,g=Math.max(h,2.4*p);t.size=g;const y=YE(l,qE(t,o));if(y){const e=u?"width":"height",n=dg(y,(t=>t[e]));t.size+=n+s}const v=HE(l);v&&(u?t.size=Math.max(t.size,v.width):t.size+=c+v.height)}function GE(t,e,n,r,i,o){const a=(()=>{const{legendCategory:e}=i,{title:n}=t,[r,o]=Array.isArray(n)?[n,void 0]:[void 0,n];return Jh({title:r},e,Object.assign(Object.assign({},t),{title:o}))})(),{focus:s,itemSpacing:c,focusMarkerSize:l,itemMarkerSize:u,titleSpacing:f,rowPadding:h,colPadding:d,maxCols:p=1/0,maxRows:g=1/0}=a,y=SE(a,["focus","itemSpacing","focusMarkerSize","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:v,length:m}=t,b=t=>Math.min(t,g),x=t=>Math.min(t,p),w="left"===r||"right"===r,O=void 0===m?e+(w?0:n[0]+n[1]):m,k=HE(y),M=YE(y,qE(t,o),"itemLabel"),_=Math.max(M[0].height,u)+h,E=(t,e=0)=>u+t+c[0]+e+(s?l+c[2]:0);w?(()=>{let e=-1/0,n=0,r=1,i=0,o=-1/0,a=-1/0;const s=k?k.height:0,c=O-s;for(const{width:t}of M){const s=E(t,d);e=Math.max(e,s),n+_>c?(r++,o=Math.max(o,i),a=Math.max(a,n),i=1,n=_):(n+=_,i++)}r<=1&&(o=i,a=n),t.size=e*x(r),t.length=a+s,Jh(t,{cols:x(r),gridRow:o})})():"number"==typeof v?(()=>{const e=Math.ceil(M.length/v),n=dg(M,(t=>E(t.width)))*v;t.size=_*b(e)-h,t.length=Math.min(n,O)})():(()=>{let e=1,n=0,r=-1/0;for(const{width:t}of M){const i=E(t,d);n+i>O?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=_*b(e)-h,t.length=r})(),k&&(w?t.size=Math.max(t.size,k.width):t.size+=f+k.height)}function qE(t,e){const[n]=mk("scale",e),{scales:r,tickCount:i,tickMethod:o}=t,a=r.find((t=>"constant"!==t.type&&"identity"!==t.type));return void 0!==i&&(a.tickCount=i),void 0!==o&&(a.tickMethod=o),n(a)}function YE(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:o=!0}=t,a=SE(t,["labelFormatter","tickFilter","label"]);if(!o)return null;const s=function(t,e,n){const r=UE(t,n),i=r.map((t=>"number"==typeof t?bg(t):t)),o=e?"string"==typeof e?Jp(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return i.map(o)}(e,r,i),c=Rd(a,n),l=s.map(((t,e)=>Object.fromEntries(Object.entries(c).map((([n,r])=>[n,"function"==typeof r?r(t,e):r]))))),u=s.map(((t,e)=>XE(t,l[e]))),f=l.some((t=>t.transform));if(!f){const e=s.map(((t,e)=>e));t.indexBBox=new Map(e.map((t=>[t,[s[t],u[t]]])))}return u}function HE(t){const{title:e}=t,n=SE(t,["title"]);if((t=>!1===t||null===t)(e)||void 0===e)return null;const r=Rd(n,"title"),{direction:i,transform:o}=r,a=Array.isArray(e)?e.join(","):e;if("string"!=typeof a)return null;return XE(a,Object.assign(Object.assign({},r),{transform:o||("vertical"===i?"rotate(-90)":"")}))}function VE(t,e,n){const{title:r}=t,[i,o]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:a,[`axis${Ad(e)}`]:s}=n;return Jh({title:i},a,s,Object.assign(Object.assign({},t),{title:o}))}function UE(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function XE(t,e){const n=function(t){return t instanceof ll?t:new Al({style:{text:`${t}`}})}(t),{filter:r}=e,i=SE(e,["filter"]);n.attr(Object.assign(Object.assign({},i),{visibility:"none"}));return n.getBBox()}function KE(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function QE(t,e,n,r){var i,o,a,s;const{width:c,height:l,depth:u,x:f=0,y:h=0,z:d=0,inset:p=(null!==(i=n.inset)&&void 0!==i?i:0),insetLeft:g=p,insetTop:y=p,insetBottom:v=p,insetRight:m=p,margin:b=(null!==(o=n.margin)&&void 0!==o?o:0),marginLeft:x=b,marginBottom:w=b,marginTop:O=b,marginRight:k=b,padding:M=n.padding,paddingBottom:_=M,paddingLeft:E=M,paddingRight:S=M,paddingTop:A=M}=function(t,e,n,r){const{coordinates:i}=e;if(!kk(i)&&!Ek(i))return e;const o=t.filter((t=>"string"==typeof t.type&&t.type.startsWith("axis")));if(0===o.length)return e;const a=o.map((t=>VE(t,"axisArc"===t.type?"arc":"linear",n))),s=dg(a,(t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0})),c=o.flatMap(((t,e)=>YE(a[e],qE(t,r)))).filter(Pd),l=dg(c,(t=>t.height))+s,u=o.flatMap(((t,e)=>HE(a[e]))).filter((t=>null!==t)),f=0===u.length?0:dg(u,(t=>t.height)),{inset:h=l,insetLeft:d=h,insetBottom:p=h,insetTop:g=h+f,insetRight:y=h}=e;return Object.assign(Object.assign({},e),{insetLeft:d,insetBottom:p,insetTop:g,insetRight:y})}(t,e,n,r),j=16===x&&"auto"===E,T=16===k&&"auto"===S,P=Dh(e,"coordinates",[]).some((t=>"transpose"===t.type)),C=t.find((({type:t})=>"axisX"===t)),{size:R,labelTransform:L}=C||{},N=(t,n,r,i,o)=>{const{marks:a}=e;if(0===a.length)return[i,o];if(t-i-o-.25*t>0)return[i,o];const s=.75*t;return["auto"===n?s*i/(i+o):i,"auto"===r?s*o/(i+o):o]},I=t=>"auto"===t?20:null!=t?t:20,D=I(A),B=I(_),F=JE(t,l-D-B,[D+O,B+w],["left","right"],e,n,r),{paddingLeft:z,paddingRight:Z}=F,W=c-x-k;let[$,G]=N(W,E,S,z,Z),q=W-$-G;const Y=JE(t,q,[$+x,G+k],["bottom","top"],e,n,r),{paddingTop:H,paddingBottom:V}=Y,U=l-w-O,[X,K]=N(U,_,A,V,H),Q=U-X-K;if(R&&!P&&!L){const{fontSize:t=12,fontFamily:e="sans-serif",scales:n=[]}=C,r=null!==(s=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.domain)&&void 0!==s?s:[];if(!r.length)return;const i=(n,r,i,o)=>{const a=rv(r,{fontSize:t,fontFamily:e}),s=a/2-i-o;s>0&&(q-=s,"left"===n?$+=a/2-i:G+=a/2-i)};j&&i("left",function(t){if(lg(t))return t[0]}(r),x,$),T&&i("right",Wv(r),k,G)}return{width:c,height:l,depth:u,insetLeft:g,insetTop:y,insetBottom:v,insetRight:m,innerWidth:q,innerHeight:Q,paddingLeft:$,paddingRight:G,paddingTop:K,paddingBottom:X,marginLeft:x,marginBottom:w,marginTop:O,marginRight:k,x:f,y:h,z:d}}function JE(t,e,n,r,i,o,a){const s=Gh(t,(t=>t.position)),{padding:c=o.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:h=c}=i,d={paddingBottom:f,paddingLeft:l,paddingTop:h,paddingRight:u};for(const t of r){const r=`padding${Ad(Zx(t))}`,i=s.get(t)||[],c=d[r],l=t=>{void 0===t.size&&(t.size=t.defaultSize)},u=t=>{"group"===t.type?(t.children.forEach(l),t.size=dg(t.children,(t=>t.size))):t.size=t.defaultSize},f=r=>{r.size||("auto"!==c?u(r):(DE(r,e,n,t,o,a),l(r)))},h=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},p="bottom"===t||"top"===t,g=KE(i,(t=>t.order)),y=i.filter((t=>t.type.startsWith("axis")&&t.order==g));if(y.length&&(y[0].crossPadding=0),"number"==typeof c)i.forEach(l),i.forEach(h);else if(0===i.length)d[r]=0;else{const t=TE(i,p?e+n[0]+n[1]:e);t.forEach(f);const o=t.reduce(((t,{size:e,crossPadding:n=12})=>t+e+n),0);d[r]=o}}return d}function tS({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o,marginLeft:a,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:h,insetLeft:d,insetRight:p,insetTop:g}){const y=n+a,v=i+s,m=r+l,b=o+c,x=t-a-l,w=[y+d,v+g,f-d-p,u-g-h,"center",null,null];return{top:[y,0,f,v,"vertical",!0,ww,a,x],right:[t-m,v,m,u,"horizontal",!1,ww],bottom:[y,e-b,f,b,"vertical",!1,ww,a,x],left:[0,v,y,u,"horizontal",!0,ww],"top-left":[y,0,f,v,"vertical",!0,ww],"top-right":[y,0,f,v,"vertical",!0,ww],"bottom-left":[y,e-b,f,b,"vertical",!1,ww],"bottom-right":[y,e-b,f,b,"vertical",!1,ww],center:w,inner:w,outer:w}}function eS(t,e,n,r){const[i,o]=sg(t,(t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))));!function(t,e,n,r){"center"===r?function(t){return Sg(t)&&Mg(t)}(e)?function(t,e,n,r){const[i,o,a,s]=n;for(const e of t)e.bbox={x:i,y:o,width:a,height:s},e.radar={index:t.indexOf(e),count:t.length}}(t,0,n):Mg(e)?function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,0,n):Sg(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){const[r,i,o]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter(((t,e)=>e%2==1)).map((t=>t+i));for(let e=0;e<t.length;e++){const n=t[e],i=c[e],a=c[e+1]-i;n.bbox={x:r,y:i,width:o,height:a}}}(t,e,n):"vertical"===r&&function(t,e,n){const[r,i,,o]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter(((t,e)=>e%2==0)).map((t=>t+r));for(let e=0;e<t.length;e++){const n=t[e],r=c[e],a=c[e+1]-r;n.bbox={x:r,y:i,width:a,height:o}}}(t,e,n)}(t,e,n,t[0].orientation):"inner"===r?function(t,e,n){const[r,i,,o]=n,[a,s]=e.getCenter(),[c]=Pg(e),l=o/2,u=c*l,f=a-u,h=s-u;for(let e=0;e<t.length;e++){t[e].bbox={x:r+f,y:i+h,width:2*u,height:2*u}}}(t,e,n):"outer"===r&&function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,0,n)}(i,e,n,r),function(t,e,n){if(0===t.length)return;const[r,i,o,a]=n,[s]=Pg(e),c=a/2*s/Math.sqrt(2),l=r+o/2,u=i+a/2;for(let e=0;e<t.length;e++){t[e].bbox={x:l-c,y:u-c,width:2*c,height:2*c}}}(o,e,n)}function nS(t,e,n){const[r,i,o,a,s,c,l,u,f]=n,[h,d,p,g,y,v,m,b]="vertical"===s?["y",i,"x",r,"height",a,"width",o]:["x",r,"y",i,"width",o,"height",a];t.sort(((t,e)=>null==l?void 0:l(t.order,e.order)));const x=t=>"title"===t||"group"===t||t.startsWith("legend"),w=(t,e,n)=>void 0===n?e:x(t)?n:e,O=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=c?d+v:d;e<t.length;e++){const r=t[e],{crossPadding:i=0,type:o}=r,{size:a}=r;r.bbox={[h]:c?n-a-i:n+i,[p]:O(o,g,u),[y]:a,[m]:w(o,b,f)},n+=(a+i)*(c?-1:1)}const k=t.filter((t=>"group"===t.type));for(const t of k){const{bbox:e,children:n}=t,r=e[m],i=r/n.length,o=n.reduce(((t,e)=>{var n;const r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t}),"flex-start"),a=n.map(((t,e)=>{const{length:r=i,padding:o=0}=t;return r+(e===n.length-1?0:o)})),s=r-hg(a),c="flex-start"===o?0:"center"===o?s/2:s;for(let t=0,r=e[p]+c;t<n.length;t++){const i=n[t],{padding:s=0}=i,c=t===n.length-1?0:s;i.bbox={[y]:e[y],[h]:e[h],[p]:r,[m]:a[t]-c},Jh(i,{layout:{justifyContent:o}}),r+=a[t]}}}function rS(t,e,n={},r=!1){if(Bd(t))return t;if(Array.isArray(t)&&r)return t;const i=Rd(t,e);return Jh(n,i)}function iS(t,e={}){return Bd(t)||Array.isArray(t)?t:oS(t)?Jh(e,t):t}function oS(t){if(0===Object.keys(t).length)return!0;const{title:e,items:n}=t;return void 0!==e||void 0!==n}function aS(t,e){return"object"==typeof t?Rd(t,e):t}var sS=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},cS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const lS=Symbol("CALLBACK_ITEM");function uS(t,e,n){const{encode:r={},scale:i={},transform:o=[]}=e,a=cS(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},a),{encode:r,scale:i,transform:o})]}function fS(t,e,n){return sS(this,void 0,void 0,(function*(){const{library:t}=n,{data:r}=e,[i]=mk("data",t),o=function(t){if(ze(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:e="inline"}=t,n=cS(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}(r),{transform:a=[]}=o,s=[cS(o,["transform"]),...a].map((t=>i(t,n))),c=yield function(t){return t.reduce(((t,e)=>n=>wd(this,void 0,void 0,(function*(){const r=yield t(n);return e(r)}))),Ed)}(s)(r),l=!r||Array.isArray(r)||Array.isArray(c)?c:{value:c};return[Array.isArray(c)?ig(c):[],Object.assign(Object.assign({},e),{data:l})]}))}function hS(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i={};for(const[t,e]of Object.entries(r))if(Array.isArray(e))for(let n=0;n<e.length;n++){i[`${t}${0===n?"":n}`]=e[n]}else i[t]=e;return[t,Object.assign(Object.assign({},e),{encode:i})]}function dS(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const o=rg(r,(t=>{if(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;const{type:e}=t;return Pd(e)}(t))return t;const e=function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some((t=>void 0!==t[e]))}(t,e)?"field":"constant"}(i,t);return{type:e,value:t}}));return[t,Object.assign(Object.assign({},e),{encode:o})]}function pS(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=rg(r,((t,e)=>{const{type:n}=t;return"constant"!==n||function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||"enterDelay"===t||"enterDuration"===t||"updateDelay"===t||"updateDuration"===t||"exitDelay"===t||"exitDuration"===t}(e)?t:Object.assign(Object.assign({},t),{constant:!0})}));return[t,Object.assign(Object.assign({},e),{encode:i})]}function gS(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:o}=n,a=function(t){const[e]=mk("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:_S(n)})}(o),s=rg(r,(t=>a(i,t)));return[t,Object.assign(Object.assign({},e),{encode:s})]}function yS(t,e,n){const{tooltip:r={}}=e;return Bd(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Dd(r)&&oS(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function vS(t,e,n){const{data:r,encode:i,tooltip:o={}}=e;if(Bd(o))return[t,e];const a=e=>{if(!e)return e;if("string"==typeof e)return t.map((t=>({name:e,value:r[t][e]})));if(Dd(e)){const{field:n,channel:o,color:a,name:s=n,valueFormatter:c=(t=>t)}=e,l="string"==typeof c?Jp(c):c,u=o&&i[o],f=u&&i[o].field,h=s||f||o,d=[];for(const e of t){const t=n?r[e][n]:u?i[o].value[e]:null;d[e]={name:h,color:a,value:l(t)}}return d}if("function"==typeof e){const n=[];for(const o of t){const t=e(r[o],o,r,i);Dd(t)?n[o]=Object.assign(Object.assign({},t),{[lS]:!0}):n[o]={value:t}}return n}return e},{title:s,items:c=[]}=o,l=cS(o,["title","items"]),u=Object.assign({title:a(s),items:Array.isArray(c)?c.map(a):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function mS(t,e,n){const{encode:r}=e,i=cS(e,["encode"]);if(!r)return[t,e];const o=Object.entries(r),a=o.filter((([,t])=>{const{value:e}=t;return Array.isArray(e[0])})).flatMap((([e,n])=>{const r=[[e,new Array(t.length).fill(void 0)]],{value:i}=n,o=cS(n,["value"]);for(let n=0;n<i.length;n++){const o=i[n];if(Array.isArray(o))for(let i=0;i<o.length;i++){const a=r[i]||[`${e}${i}`,new Array(t).fill(void 0)];a[1][n]=o[i],r[i]=a}}return r.map((([t,e])=>[t,Object.assign({type:"column",value:e},o)]))})),s=Object.fromEntries([...o,...a]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function bS(t,e,n){const{axis:r={},legend:i={},slider:o={},scrollbar:a={}}=e,s=(t,e)=>{if("boolean"==typeof t)return t?{}:null;const n=t[e];return void 0===n||n?n:null},c="object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return Jh(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map((t=>{const e=s(a,t);return[t,Object.assign({guide:s(r,t),slider:s(o,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 xS(t,e,n){const{animate:r}=e;return r||void 0===r||Jh(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function wS(t,e,n){var r,i;return Jh(e,{scale:{series:Object.assign({key:`DEFAULT_${e.type}_SERIES_KEY`},null!==(i=null===(r=null==e?void 0:e.scale)||void 0===r?void 0:r.series)&&void 0!==i?i:{})}}),[t,e]}var OS=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},kS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function MS(t,e,n){return OS(this,void 0,void 0,(function*(){const[r,i]=yield function(t,e,n){return OS(this,void 0,void 0,(function*(){const{library:r}=n,[i]=mk("transform",r),{preInference:o=[],postInference:a=[]}=e,{transform:s=[]}=t,c=[uS,fS,hS,dS,pS,gS,mS,xS,bS,yS,wS,...o.map(i),...s.map(i),...a.map(i),vS];let l=[],u=t;for(const t of c)[l,u]=yield t(l,u,n);return[l,u]}))}(t,e,n),{encode:o,scale:a,data:s,tooltip:c,key:l}=i;if(!1===Array.isArray(s))return null;const{channels:u}=e,f=Hh(Object.entries(o).filter((([,t])=>Pd(t))),(t=>t.map((([t,e])=>Object.assign({name:t},e)))),(([t])=>{var e;const n=null===(e=/([^\d]+)\d*$/.exec(t))||void 0===e?void 0:e[1],r=u.find((t=>t.name===n));return(null==r?void 0:r.independent)?t:n})),h=u.filter((t=>{const{name:e,required:n}=t;if(f.find((([t])=>t===e)))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1})).flatMap((t=>{const{name:e,scale:n,scaleKey:r,range:i,quantitative:o,ordinal:s}=t;return f.filter((([t])=>t.startsWith(e))).map((([t,e],c)=>{const u=e.some((t=>t.visual)),f=e.some((t=>t.constant)),h=a[t]||{},{independent:d=!1,key:p=r||t,type:g=(f?"constant":u?"identity":n)}=h,y=kS(h,["independent","key","type"]),v="constant"===g,m=v?void 0:i;return{name:t,values:e,scaleKey:d||v?Symbol("independent"):p,scale:Object.assign(Object.assign({type:g,markerKey:l,range:m},y),{quantitative:o,ordinal:s})}}))}));return[i,Object.assign(Object.assign({},e),{index:r,channels:h,tooltip:c})]}))}function _S(t){const{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}var ES=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},SS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function AS(t,e,n){var r;return ES(this,void 0,void 0,(function*(){const{library:i}=n,[o]=mk("composition",i),[a]=mk("interaction",i),s=new Set(Object.keys(i).map((t=>{var e;return null===(e=/mark\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Pd)),c=new Set(Object.keys(i).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Pd)),l=t=>{const{type:e}=t;if("function"==typeof e){const{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||c.has(e)?"mark":e},u=t=>"mark"===l(t),f=t=>"standardView"===l(t),h=t=>{const{type:e}=t;return"string"==typeof e&&!!c.has(e)},d=t=>{if(f(t))return[t];const e=l(t);return o({type:e,static:h(t)})(t)},p=[],g=new Map,y=new Map,v=[t],m=[];for(;v.length;){const t=v.shift();if(f(t)){const e=y.get(t),[r,o]=e?LS(e,t,i):yield PS(t,n);g.set(r,t),p.push(r);const a=o.flatMap(d).map((t=>wk(t,i)));if(v.push(...a),a.every(f)){const t=yield Promise.all(a.map((t=>CS(t,n))));uE(t);for(let e=0;e<a.length;e++){const n=a[e],r=t[e];y.set(n,r)}}}else{const e=d(u(t)?t:yield US(t,n));Array.isArray(e)?v.push(...e):"function"==typeof e&&m.push(e())}}n.emitter.emit(Gd);const b=new Map,x=new Map,w=[];e.selectAll(JS(L)).data(p,(t=>t.key)).join((t=>t.append("g").attr("className",L).attr("id",(t=>t.key)).call(jS).each((function(t,e,r){NS(t,zd(r),w,n),b.set(t,r)}))),(t=>t.call(jS).each((function(t,e,r){NS(t,zd(r),w,n),x.set(t,r)}))),(t=>t.each((function(t,e,n){const r=n.nameInteraction.values();for(const t of r)t.destroy()})).remove()));const O=(t,e,r)=>Array.from(t.entries()).map((([i,o])=>{const a=r||new Map,s=(t,e=(t=>t))=>a.set(t,e),c=g.get(i),l=function(t,e,n){const{library:r}=n,i=function(t){const[,e]=mk("interaction",t);return t=>{const[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(r),o=t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate,a=VS(e),s=a.map(i).filter(o).map((t=>t[0]));return(e,r,i)=>ES(this,void 0,void 0,(function*(){const o=[],[a,c]=yield PS(e,n);NS(a,t,o,n);for(const i of s.filter((t=>t!==r)))TS(i,t,e,a,n);for(const e of c)AS(e,t,n);return i(),{options:e,view:a}}))}(zd(o),c,n),u={view:i,container:o,options:c,setState:s,update:(n,r)=>ES(this,void 0,void 0,(function*(){const i=Sd(Array.from(a.values()))(c);return yield l(i,n,(()=>{xn(r)&&e(t,r,a)}))}))};return n.externals.update=u.update,n.externals.setState=s,u})),k=(t=x,e,r)=>{var i;const o=O(t,k,r);for(const t of o){const{options:r,container:s}=t,c=s.nameInteraction;let l=VS(r);e&&(l=l.filter((t=>e.includes(t[0]))));for(const e of l){const[r,s]=e,l=c.get(r);if(l&&(null===(i=l.destroy)||void 0===i||i.call(l)),s){const e=RS(t.view,r,s,a)(t,o,n.emitter);c.set(r,{destroy:e})}}}},M=O(b,k);for(const t of M){const{options:e}=t,r=new Map;t.container.nameInteraction=r;for(const i of VS(e)){const[e,o]=i;if(o){const i=RS(t.view,e,o,a)(t,M,n.emitter);r.set(e,{destroy:i})}}}k();const{width:_,height:E}=t,S=[];for(const t of m){const r=new Promise((r=>ES(this,void 0,void 0,(function*(){for(const r of t){const t=Object.assign({width:_,height:E},r);yield AS(t,e,n)}r()}))));S.push(r)}n.views=p,null===(r=n.animations)||void 0===r||r.forEach((t=>null==t?void 0:t.cancel())),n.animations=w,n.emitter.emit(qd);const A=w.filter(Pd).map(GS).map((t=>t.finished));return Promise.all([...A,...S])}))}function jS(t){t.style("transform",(t=>`translate(${t.layout.x}, ${t.layout.y})`))}function TS(t,e,n,r,i){var o;const{library:a}=i,[s]=mk("interaction",a),c=e.node().nameInteraction,l=VS(n).find((([e])=>e===t)),u=c.get(t);if(!u)return;if(null===(o=u.destroy)||void 0===o||o.call(u),!l[1])return;const f=RS(r,t,l[1],s),h={options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},d=f(h,[],i.emitter);c.set(t,{destroy:d})}function PS(t,e){return ES(this,void 0,void 0,(function*(){const{library:n}=e,r=yield function(t,e){return ES(this,void 0,void 0,(function*(){const{library:n}=e,[r,i]=mk("mark",n),o=new Set(Object.keys(n).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Pd)),{marks:a}=t,s=[],c=[],l=[...a],{width:u,height:f}=function(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:o=r,paddingTop:a=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:h=c,inset:d=0,insetLeft:p=d,insetRight:g=d,insetTop:y=d,insetBottom:v=d}=t,m=t=>"auto"===t?20:t;return{width:n-m(i)-m(o)-l-u-p-g,height:e-m(a)-m(s)-f-h-y-v}}(t),h={options:t,width:u,height:f};for(;l.length;){const[t]=l.splice(0,1),n=yield US(t,e),{type:a=jd("G2Mark type is required."),key:u}=n;if(o.has(a))c.push(n);else{const{props:t={}}=i(a),{composite:e=!0}=t;if(e){const{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),i=yield r(e,h),o=Array.isArray(i)?i:[i];l.unshift(...o.map(((t,e)=>Object.assign(Object.assign({},t),{key:`${u}-${e}`}))))}else s.push(n)}}return Object.assign(Object.assign({},t),{marks:s,components:c})}))}(t,e),i=function(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,o=SS(t,["coordinate","interaction","style","marks"]),a=i.map((t=>t.coordinate||{})),s=i.map((t=>t.interaction||{})),c=i.map((t=>t.viewStyle||{})),l=[...a,e].reduceRight(((t,e)=>Jh(t,e)),{}),u=[n,...s].reduce(((t,e)=>Jh(t,e)),{}),f=[...c,r].reduce(((t,e)=>Jh(t,e)),{});return Object.assign(Object.assign({},o),{marks:i,coordinate:l,interaction:u,style:f})}(r);t.interaction=i.interaction,t.coordinate=i.coordinate,t.marks=[...i.marks,...i.components];const o=wk(i,n);return LS(yield CS(o,e),o,n)}))}function CS(t,e){return ES(this,void 0,void 0,(function*(){const{library:n}=e,[r]=mk("theme",n),[,i]=mk("mark",n),{theme:o,marks:a,coordinates:s=[]}=t,c=r(HS(o)),l=new Map;for(const t of a){const{type:n}=t,{props:r={}}=i(n),o=yield MS(t,r,e);if(o){const[t,e]=o;l.set(t,e)}}const u=Gh(Array.from(l.values()).flatMap((t=>t.channels)),(({scaleKey:t})=>t));for(const t of u.values()){const e=t.reduce(((t,{scale:e})=>Jh(t,e)),{}),{scaleKey:r}=t[0],{values:i}=t[0],o=Array.from(new Set(i.map((t=>t.field)).filter(Pd))),a=Jh({guide:{title:0===o.length?void 0:o},field:o[0]},e),{name:l}=t[0],u=t.flatMap((({values:t})=>t.map((t=>t.value)))),f=Object.assign(Object.assign({},aE(l,u,a,s,c,n)),{uid:Symbol("scale"),key:r});t.forEach((t=>t.scale=f))}return l}))}function RS(t,e,n,r){const i=t.theme,o="string"==typeof e&&i[e]||{};return r(Jh(o,Object.assign({type:e},n)))}function LS(t,e,n){var r;const[i]=mk("mark",n),[o]=mk("theme",n),[a]=mk("labelTransform",n),{key:s,frame:c=!1,theme:l,clip:u,style:f={},labelTransform:h=[]}=e,d=o(HS(l)),p=Array.from(t.values()),g=function(t,e){var n;const{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],o=Array.from(new Set(t.flatMap((t=>t.channels.map((t=>t.scale)))))),a=new Map(o.map((t=>[t.name,t])));for(const t of r){const e=fE(t);for(const r of e){const e=a.get(r),s=(null===(n=t.scale)||void 0===n?void 0:n[r])||{},{independent:c=!1}=s;if(e&&!c){const{guide:n}=e,r="boolean"==typeof n?{}:n;e.guide=Jh({},r,t),Object.assign(e,s)}else{const e=Object.assign(Object.assign({},s),{expectedDomain:s.domain,name:r,guide:um(t,i)});o.push(e)}}}return o}(p,e),y=function(t){return t.map((t=>{const e=Jh(t,t.style);return delete e.style,e}))}(AE(function(t,e,n){var r;for(const[e]of n.entries())if("cell"===e.type)return t.filter((t=>"shape"!==t.name));if(1!==e.length||t.some((t=>"shape"===t.name)))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},a=(null===(r=t.find((t=>"color"===t.name)))||void 0===r?void 0:r.field)||null,s={field:a,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...t,s]}(Array.from(g),p,t),e,n)),v=QE(y,e,d,n),m=function(t,e,n){const[r]=mk("coordinate",n),{innerHeight:i,innerWidth:o,insetLeft:a,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=(h=u).find((t=>"cartesian"===t.type||"cartesian3D"===t.type))?h:[...h,{type:"cartesian"}];var h;const d="cartesian3D"===f[0].type,p=Object.assign(Object.assign({},t),{x:a,y:s,width:o-a-c,height:i-l-s,transformations:f.flatMap(r)});return d?new Og.Coordinate3D(p):new Og.Coordinate(p)}(v,e,n),b=c?Jh({mainLineWidth:1,mainStroke:"#000"},f):f;!function(t,e,n){const r=Gh(t,(t=>`${t.plane||"xy"}-${t.position}`)),{paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:y,insetTop:v,height:m,width:b,depth:x}=n,w={xy:tS({width:b,height:m,paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:y,insetTop:v}),yz:tS({width:x,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:tS({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[t,n]of r.entries()){const[r,i]=t.split("-"),o=w[r][i],[a,s]=sg(n,(t=>"string"==typeof t.type&&("center"===i||!(!t.type.startsWith("axis")||!["inner","outer"].includes(i)))));a.length&&eS(a,e,o,i),s.length&&nS(n,0,o)}}(TE(y),m,v),function(t){const e=t.find((({type:t})=>"axisX"===t)),n=t.find((({type:t})=>"axisY"===t)),r=t.find((({type:t})=>"axisZ"===t));e&&n&&r&&(e.plane="xy",n.plane="xy",r.plane="yz",r.origin=[e.bbox.x,e.bbox.y,0],r.eulerAngles=[0,-90,0],r.bbox.x=e.bbox.x,r.bbox.y=e.bbox.y,t.push(Object.assign(Object.assign({},e),{plane:"xz",showLabel:!1,showTitle:!1,origin:[e.bbox.x,e.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},n),{plane:"yz",showLabel:!1,showTitle:!1,origin:[n.bbox.x+n.bbox.width,n.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},r),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})))}(y);const x=new Map(Array.from(t.values()).flatMap((t=>{const{channels:e}=t;return e.map((({scale:t})=>[t.uid,lE(t,n)]))})));!function(t,e){const n=Array.from(t.values()).flatMap((t=>t.channels)),r=Hh(n,(t=>t.map((t=>e.get(t.scale.uid)))),(t=>t.name)).filter((([,t])=>t.some((t=>"function"==typeof t.getOptions().groupTransform))&&t.every((t=>t.getTicks)))).map((t=>t[1]));r.forEach((t=>{const e=t.map((t=>t.getOptions().groupTransform))[0];e(t)}))}(t,x);const w={};for(const t of y){const{scales:e=[]}=t,i=[];for(const t of e){const{name:e,uid:o}=t,a=null!==(r=x.get(o))&&void 0!==r?r:lE(t,n);i.push(a),"y"===e&&a.update(Object.assign(Object.assign({},a.getOptions()),{xScale:w.x})),cE(w,{[e]:a})}t.scaleInstances=i}const O=[],k=new Map;for(const[e,n]of t.entries()){const{children:t,dataDomain:r,modifier:o,key:a,data:c}=e;k.set(a,c);const{index:l,channels:u,tooltip:f}=n,h=rg(Object.fromEntries(u.map((({name:t,scale:e})=>[t,e]))),(({uid:t})=>x.get(t)));cE(w,h);const d=sE(u,h),p=i(e),[g,y,b]=IS(p(l,h,d,m)),M=r||g.length,_=o?o(y,M,v):[],E=t=>{var e,n;return null===(n=null===(e=f.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},S=t=>f.items.map((e=>e[t])),A=g.map(((t,e)=>{const n=Object.assign({points:y[e],transform:_[e],index:t,markKey:a,viewKey:s,data:c[t]},f&&{title:E(t),items:S(t)});for(const[r,i]of Object.entries(d))n[r]=i[t],b&&(n[`series${$p(r)}`]=b[e].map((t=>i[t])));return b&&(n.seriesIndex=b[e]),b&&f&&(n.seriesItems=b[e].map((t=>S(t))),n.seriesTitle=b[e].map((t=>E(t)))),n}));n.data=A,n.index=g;const j=null==t?void 0:t(A,h,v);O.push(...j||[])}return[{layout:v,theme:d,coordinate:m,markState:t,key:s,clip:u,scale:w,style:b,components:y,data:k,options:e,labelTransform:Sd(h.map(a))},O]}function NS(t,e,n,r){return ES(this,void 0,void 0,(function*(){const{library:i}=r,{components:o,theme:a,layout:s,markState:c,coordinate:l,key:u,style:f,clip:h,scale:d}=t,{x:p,y:g,width:y,height:v}=s,m=SS(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map(((t,e)=>e)),w=b.map((t=>Ld(Object.assign({},a.view,f),t))),O=["a","margin","padding","inset"].map((t=>Rd(m,t))),k=t=>t.style("x",(t=>A[t].x)).style("y",(t=>A[t].y)).style("width",(t=>A[t].width)).style("height",(t=>A[t].height)).each((function(t,e,n){!function(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}(zd(n),w[t])}));let M=0,_=0,E=y,S=v;const A=x.map((t=>{const e=O[t],{left:n=0,top:r=0,bottom:i=0,right:o=0}=e;return M+=n,_+=r,E-=n+o,S-=r+i,{x:M,y:_,width:E,height:S}}));e.selectAll(JS(B)).data(x.filter((t=>Pd(w[t]))),(t=>b[t])).join((t=>t.append("rect").attr("className",B).style("zIndex",-2).call(k)),(t=>t.call(k)),(t=>t.remove()));const j=function(t){let e=-1/0,n=1/0;for(const[r,i]of t){const{animate:t={}}=r,{data:o}=i,{enter:a={},update:s={},exit:c={}}=t,{type:l,duration:u=300,delay:f=0}=s,{type:h,duration:d=300,delay:p=0}=a,{type:g,duration:y=300,delay:v=0}=c;for(const t of o){const{updateType:r=l,updateDuration:i=u,updateDelay:o=f,enterType:a=h,enterDuration:s=d,enterDelay:c=p,exitDuration:m=y,exitDelay:b=v,exitType:x=g}=t;(void 0===r||r)&&(e=Math.max(e,i+o),n=Math.min(n,o)),(void 0===x||x)&&(e=Math.max(e,m+b),n=Math.min(n,b)),(void 0===a||a)&&(e=Math.max(e,s+c),n=Math.min(n,c))}}return e===-1/0?null:[n,e-n]}(c),T=!!j&&{duration:j[1]};for(const[,t]of qh(o,(t=>`${t.type}-${t.position}`)))t.forEach(((t,e)=>t.index=e));const P=e.selectAll(JS(I)).data(o,(t=>`${t.type}-${t.position}-${t.index}`)).join((t=>t.append("g").style("zIndex",(({zIndex:t})=>t||-1)).attr("className",I).append((t=>jE(Jh({animate:T,scale:d},t),l,a,i,c)))),(t=>t.transition((function(t,e,n){const{preserve:r=!1}=t;if(r)return;const o=jE(Jh({animate:T,scale:d},t),l,a,i,c),{attributes:s}=o,[u]=n.childNodes;return u.update(s,!1)})))).transitions();n.push(...P.flat().filter(Pd));const L=e.selectAll(JS(N)).data([s],(()=>u)).join((t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",N).call(XS).call(QS,Array.from(c.keys())).call(tA,h)),(t=>t.call(QS,Array.from(c.keys())).call(XS).call(tA,h))).transitions();n.push(...L.flat());for(const[o,a]of c.entries()){const{data:s}=a,{key:c,class:l,type:u}=o,f=e.select(`#${c}`),h=zS(o,a,t,r),d=$S(o,a,t,i),p=qS(o,a,t,i),g=YS(o,a,t,i),y=BS(e,f,l,"element"),v=f.selectAll(JS(R)).selectFacetAll(y).data(s,(t=>t.key),(t=>t.groupKey)).join((t=>t.append(h).attr("className",R).attr("markType",u).transition((function(t,e,n){return d(t,[n])}))),(t=>t.call((t=>{const e=t.parent(),n=Cd((t=>{const[e,n]=t.getBounds().min;return[e,n]}));t.transition((function(t,r,i){FS(i,e,n);const o=h(t,r),a=p(t,[i],[o]);return(null==a?void 0:a.length)||(i.nodeName===o.nodeName&&"g"!==o.nodeName?Td(i,o):(i.parentNode.replaceChild(o,i),o.className=R,o.markType=u,o.__data__=i.__data__)),a})).each((function(t,e,n){n.__removed__&&(n.__removed__=!1)})).attr("markType",u).attr("className",R)}))),(t=>t.each((function(t,e,n){n.__removed__=!0})).transition((function(t,e,n){return g(t,[n])})).remove()),(t=>t.append(h).attr("className",R).attr("markType",u).transition((function(t,e,n){const{__fromElements__:r}=n,i=p(t,r,[n]);return new Zd(r,null,n.parentNode).transition(i).remove(),i}))),(t=>t.transition((function(t,e,n){const r=new Zd([],n.__toData__,n.parentNode).append(h).attr("className",R).attr("markType",u).nodes();return p(t,[n],r)})).remove())).transitions();n.push(...v.flat())}!function(t,e,n,r,i){const[o]=mk("labelTransform",r),{markState:a,labelTransform:s}=t,c=e.select(JS(C)).node(),l=new Map,u=new Map,f=Array.from(a.entries()).flatMap((([n,o])=>{const{labels:a=[],key:s}=n,c=function(t,e,n,r,i){const[o]=mk("shape",r),{data:a,encode:s}=t,{data:c,defaultLabelShape:l}=e,u=c.map((t=>t.points)),f=rg(s,(t=>t.value)),{theme:h,coordinate:d}=n,p=Object.assign(Object.assign({},i),{document:bk(i),theme:h,coordinate:d});return t=>{const{index:e,points:n}=t,r=a[e],{formatter:i=(t=>`${t}`),transform:s,style:c,render:d,selector:g,element:y}=t,v=SS(t,["formatter","transform","style","render","selector","element"]),m=rg(Object.assign(Object.assign({},v),c),(t=>DS(t,r,e,a,{channel:f,element:y}))),{shape:b=l,text:x}=m,w=SS(m,["shape","text"]),O="string"==typeof i?Jp(i):i,k=Object.assign(Object.assign({},w),{text:O(x,r,e,a),datum:r}),M=Object.assign({type:`label.${b}`,render:d},w);return o(M,p)(n,k,ZS(h,"label",b,"label"),u)}}(n,o,t,r,i),f=e.select(`#${s}`).selectAll(JS(R)).nodes().filter((t=>!t.__removed__));return a.flatMap(((t,e)=>{const{transform:n=[]}=t,r=SS(t,["transform"]);return f.flatMap((n=>{const i=function(t,e,n){const{seriesIndex:r,seriesKey:i,points:o,key:a,index:s}=n.__data__,c=function(t){const e=t.cloneNode(!0),n=t.getAnimations();e.style.visibility="hidden",n.forEach((t=>{const n=t.effect.getKeyframes();e.attr(n[n.length-1])})),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:i,max:o}=r;return[i,o]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${a}-${e}`,bounds:c,index:s,points:o,dependentElement:n})];const l=function(t){const{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw new Error(`Unknown selector: ${e}`)}(t),u=r.map(((r,a)=>Object.assign(Object.assign({},t),{key:`${i[a]}-${e}`,bounds:[o[a]],index:r,points:o,dependentElement:n})));return l?l(u):u}(r,e,n);return i.forEach((e=>{l.set(e,(t=>c(Object.assign(Object.assign({},t),{element:n})))),u.set(e,t)})),i}))}))})),h=zd(c).selectAll(JS(D)).data(f,(t=>t.key)).join((t=>t.append((t=>l.get(t)(t))).attr("className",D)),(t=>t.each((function(t,e,n){Td(n,l.get(t)(t))}))),(t=>t.remove())).nodes(),d=Gh(h,(t=>u.get(t.__data__))),{coordinate:p,layout:g}=t,y={canvas:i.canvas,coordinate:p,layout:g};for(const[t,e]of d){const{transform:n=[]}=t;Sd(n.map(o))(e,y)}s&&s(h,y)}(t,e,0,i,r),function(t,e,n,r){const i=t.scale,o=Dh(i,"y.options.breaks",[]),{document:a}=r.canvas;if([F,z].forEach((t=>{a.getElementsByClassName(t).forEach((t=>{t.remove()}))})),!o.length)return;const s=e.select(JS(N)).node(),[c]=mk("shape",n),l=new Map;o.forEach(((n,i)=>{l.set(n,c({type:"break"},{view:t,selection:e,context:r}))})),zd(s).selectAll(JS(F)).data(o,(t=>t.key)).join((t=>t.append(((t,e)=>l.get(t)(t,e))).attr("className",F)),(t=>t.each((function(t,e,n){Td(n,l.get(t)(t,e))}))),(t=>t.remove())).nodes()}(t,e,i,r)}))}function IS([t,e,n]){if(n)return[t,e,n];const r=[],i=[];for(let n=0;n<t.length;n++){const o=t[n],a=e[n];a.every((([t,e])=>Pd(t)&&Pd(e)))&&(r.push(o),i.push(a))}return[r,i]}function DS(t,e,n,r,i){return"function"==typeof t?t(e,n,r,i):"string"!=typeof t?t:Dd(e)&&void 0!==e[t]?e[t]:t}function BS(t,e,n,r){const i=t.node().parentElement;return i&&"function"==typeof i.findAll?i.findAll((t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node())).flatMap((t=>t.getElementsByClassName(r))):[]}function FS(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=e.parentNode,[o,a]=n(r),[s,c]=n(i);!function(t,e){const{transform:n}=t.style,r=(t=>"none"===t||void 0===t)(n)?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${o-s}, ${a-c})`),e.append(t)}function zS(t,e,n,r){const{library:i}=r,[o]=mk("shape",i),{data:a,encode:s}=t,{defaultShape:c,data:l,shape:u}=e,f=rg(s,(t=>t.value)),h=l.map((t=>t.points)),{theme:d,coordinate:p}=n,{type:g,style:y={}}=t,v=Object.assign(Object.assign({},r),{document:bk(r),coordinate:p,theme:d});return e=>{const{shape:n=c}=y,{shape:r=n,points:i,seriesIndex:s,index:l}=e,p=SS(e,["shape","points","seriesIndex","index"]),m=Object.assign(Object.assign({},p),{index:l}),b=s?s.map((t=>a[t])):a[l],x=s||l,w=rg(y,(t=>DS(t,b,x,a,{channel:f})));return(u[r]?u[r](w,v):o(Object.assign(Object.assign({},w),{type:KS(t,r)}),v))(i,m,ZS(d,g,r,c),h)}}function ZS(t,e,n,r){if("string"!=typeof e)return;const{color:i}=t,o=t[e]||{},a=o[n]||o[r];return Object.assign({color:i},a)}function WS(t,e,n,r,i){var o,a;const[,s]=mk("shape",i),[c]=mk("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:h}=r,d=`default${$p(t)}Animation`,{[d]:p}=(null===(o=u[l])||void 0===o?void 0:o.props)||s(KS(e,l)).props,{[t]:g={}}=f,y=(null===(a=e.animate)||void 0===a?void 0:a[t])||{},v={coordinate:h};return(e,n,r)=>{const{[`${t}Type`]:i,[`${t}Delay`]:o,[`${t}Duration`]:a,[`${t}Easing`]:s}=e,l=Object.assign({type:i||p},y);if(!l.type)return null;const u=c(l,v)(n,r,Jh(g,{delay:o,duration:a,easing:s}));let f=[];return f=Array.isArray(u)?u:[u],f.filter(Boolean)}}function $S(t,e,n,r){return WS("enter",t,e,n,r)}function GS(t){return t.finished.then((()=>{t.cancel()})),t}function qS(t,e,n,r){return WS("update",t,e,n,r)}function YS(t,e,n,r){return WS("exit",t,e,n,r)}function HS(t={}){if("string"==typeof t)return{type:t};const{type:e="light"}=t,n=SS(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function VS(t){const{interaction:e={}}=t;return Object.entries(Jh({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function US(t,e){return ES(this,void 0,void 0,(function*(){const{data:n}=t,r=SS(t,["data"]);if(null==n)return t;const[,{data:i}]=yield fS(0,{data:n},e);return Object.assign({data:i},r)}))}function XS(t){t.style("transform",(t=>`translate(${t.paddingLeft+t.marginLeft}, ${t.paddingTop+t.marginTop})`)).style("width",(t=>t.innerWidth)).style("height",(t=>t.innerHeight))}function KS(t,e){const{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function QS(t,e){const n=t=>void 0!==t.class?`${t.class}`:"";if(0===t.nodes().length)return;t.selectAll(JS(P)).data(e,(t=>t.key)).join((t=>t.append("g").attr("className",P).attr("id",(t=>t.key)).style("facet",n).style("fill","transparent").style("zIndex",(t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}))),(t=>t.style("facet",n).style("fill","transparent").style("zIndex",(t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}))),(t=>t.remove()));t.select(JS(C)).node()||t.append("g").attr("className",C).style("zIndex",0)}function JS(...t){return t.map((t=>`.${t}`)).join("")}function tA(t,e){t.node()&&t.style("clipPath",(t=>{if(!e)return null;const{paddingTop:n,paddingLeft:r,marginLeft:i,marginTop:o,innerWidth:a,innerHeight:s}=t;return new El({style:{x:r+i,y:n+o,width:a,height:s}})}))}function eA(t){const{style:e,scale:n,type:r}=t,i={},o=Dh(e,"columnWidthRatio");return o&&"interval"===r&&(i.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-o})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),i)})}const nA=t=>{if(!t||"string"!=typeof t)return t;const e=t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t);if(isNaN(e)||e<0||e>1)throw new Error(`Invalid gap value: ${t}. It should be between 0 and 1.`);return e};function rA(t){const{axis:e}=t,n=Dh(e,"y.breaks");return n&&Nw(t,"scale.y.breaks",n.map((t=>Object.assign(Object.assign({key:`break-${t.start}-${t.end}`},t),{gap:nA(t.gap)})))),t}function iA(t){const e=function(t){return function(...t){return e=>t.reduce(((t,e)=>e(t)),e)}(eA,rA)(t)}(t);return e.children&&Array.isArray(e.children)&&(e.children=e.children.map((t=>iA(t)))),e}function oA(t){const e=Jh({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){const t=i.shift();if(void 0===t.key){const e=n.get(t),i=r.get(t),o=null===e?"0":`${e.key}-${i}`;t.key=o}const{children:e=[]}=t;if(Array.isArray(e))for(let o=0;o<e.length;o++){const a=Jh({},e[o]);e[o]=a,n.set(a,t),r.set(a,o),i.push(a)}}return e}function aA(t,e){const n=new Rh;return n.registerPlugin(new Nh),new $l({width:t,height:e,container:document.createElement("div"),renderer:n})}function sA(t,e={},n=(()=>{}),r=(t=>{throw t})){const i=Wp(t),{width:o=640,height:a=480,depth:s=0}=i,c=oA(iA(i)),{canvas:l=aA(o,a),emitter:u=new T,library:f}=e;e.canvas=l,e.emitter=u,e.externals={};const{width:h,height:d}=l.getConfig();h===o&&d===a||l.resize(o,a),u.emit(Wd);const p=zd(l.document.documentElement);return l.ready.then((()=>AS(Object.assign(Object.assign({},c),{width:o,height:a,depth:s}),p,e))).then((()=>{if(s){const[t,e]=l.document.documentElement.getPosition();l.document.documentElement.setPosition(t,e,-s/2)}l.requestAnimationFrame((()=>{l.requestAnimationFrame((()=>{u.emit($d),null==n||n()}))}))})).catch((t=>{null==r||r(t)})),"string"==typeof(g=l.getConfig().container)?document.getElementById(g):g;var g}function cA(t,e={},n=!1,r=!0){const{canvas:i,emitter:o}=e;i&&(!function(t){const e=t.getRoot().querySelectorAll(`.${L}`);null==e||e.forEach((t=>{const{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach((t=>{null==t||t.destroy()}))}))}(i),n?i.destroy():i.destroyChildren()),r&&o.off()}function lA(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function uA(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}var fA=function(t,e,n){var r,i,o,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:Date.now(),r=null,a=t.apply(i,o),r||(i=o=null)},l=function(){var l=Date.now();s||!1!==n.leading||(s=l);var u=e-(l-s);return i=this,o=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,u)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l};function hA(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}var dA=function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,(function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?"":e[n]})):t},pA=function(t,e){null!=e?t.replaceChildren?Array.isArray(e)?t.replaceChildren.apply(t,(0,qe.ev)([],(0,qe.CR)(e),!1)):t.replaceChildren(e):(t.innerHTML="",Array.isArray(e)?e.forEach((function(e){return t.appendChild(e)})):t.appendChild(e)):t.innerHTML=""};function gA(t){return void 0===t&&(t=""),{CONTAINER:"".concat(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 yA={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function vA(t){var e;void 0===t&&(t="");var n=gA(t);return(e={})[".".concat(n.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"},e[".".concat(n.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(n.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(n.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(n.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(n.NAME)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(n.NAME_LABEL)]=(0,qe.pi)({flex:1},yA),e[".".concat(n.VALUE)]=(0,qe.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},yA),e[".".concat(n.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(n.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e}var mA=function(t){function e(e){var n,r,i=this,o=null===(r=null===(n=e.style)||void 0===n?void 0:n.template)||void 0===r?void 0:r.prefixCls,a=gA(o);return(i=t.call(this,e,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(a.CONTAINER,'"></div>'),title:'<div class="'.concat(a.TITLE,'"></div>'),item:'<li class="'.concat(a.LIST_ITEM,'" data-index={index}>\n <span class="').concat(a.NAME,'">\n <span class="').concat(a.MARKER,'" style="background:{color}"></span>\n <span class="').concat(a.NAME_LABEL,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(a.VALUE,'" title="{value}">{value}</span>\n </li>')},style:vA(o)})||this).timestamp=-1,i.prevCustomContentKey=i.attributes.contentKey,i.initShape(),i.render(i.attributes,i),i}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,n=t.template;return e.map((function(t,e){var r=t.name,i=void 0===r?"":r,o=t.color,a=void 0===o?"black":o,s=t.index,c=(0,qe._T)(t,["name","color","index"]),l=(0,qe.pi)({name:i,color:a,index:null!=s?s:e},c);return hA(dA(n.item,l))}))},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var e;null===(e=this.element)||void 0===e||e.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(t,e){var n=this;if(void 0!==t&&void 0!==e){var r=function(){n.attributes.x=null!=t?t:n.attributes.x,n.attributes.y=null!=e?e:n.attributes.y,n.updatePosition()};"hidden"===this.element.style.visibility?this.closeTransition(r):r()}this.element.style.visibility="visible"},e.prototype.hide=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.attributes.enterable&&this.isCursorEntered(t,e)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var t=this.attributes.template;this.element=hA(t.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&("string"==typeof t?this.element.innerHTML=t:pA(this.element,t))}},e.prototype.renderHTMLTooltipElement=function(){var t,e,n=this.attributes,r=n.template,i=n.title,o=n.enterable,a=n.style,s=n.content,c=gA(r.prefixCls),l=this.element;if(this.element.style.pointerEvents=o?"auto":"none",s)this.renderCustomContent();else{i?(l.innerHTML=r.title,l.getElementsByClassName(c.TITLE)[0].innerHTML=i):null===(e=null===(t=l.getElementsByClassName(c.TITLE))||void 0===t?void 0:t[0])||void 0===e||e.remove();var u=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=c.LIST,pA(f,u);var h=this.element.querySelector(".".concat(c.LIST));h?h.replaceWith(f):l.appendChild(f)}!function(t,e){Object.entries(e).forEach((function(e){var n=(0,qe.CR)(e,2),r=n[0],i=n[1];(0,qe.ev)([t],(0,qe.CR)(t.querySelectorAll(r)),!1).filter((function(t){return t.matches(r)})).forEach((function(t){t&&(t.style.cssText+=Object.entries(i).reduce((function(t,e){return"".concat(t).concat(e.join(":"),";")}),""))}))}))}(l,a)},e.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,r=e.offset,i=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},a=this.elementSize,s=a.width,c=a.height,l=[-s/2,-c/2];return i.forEach((function(t){var e=(0,qe.CR)(l,2),n=e[0],i=e[1],a=(0,qe.CR)(o[t],2),u=a[0],f=a[1];l=[n+(s/2+r[0])*u,i+(c/2+r[1])*f]})),l},e.prototype.setOffsetPosition=function(t){var e=(0,qe.CR)(t,2),n=e[0],r=e[1],i=this.attributes,o=i.x,a=void 0===o?0:o,s=i.y,c=void 0===s?0:s,l=i.container,u=l.x,f=l.y;this.element.style.left="".concat(+a+u+n,"px"),this.element.style.top="".concat(+c+f+r,"px")},e.prototype.updatePosition=function(){var t=this.attributes.showDelay,e=void 0===t?60:t,n=Date.now();this.timestamp>0&&n-this.timestamp<e||(this.timestamp=n,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(t){var e=(0,qe.CR)(t,2),n=e[0],r=e[1],i=this.attributes,o=i.x,a=i.y,s=i.bounding,c=i.position;if(!s)return[n,r];var l=this.element,u=l.offsetWidth,f=l.offsetHeight,h=(0,qe.CR)([+o+n,+a+r],2),d=h[0],p=h[1],g={left:"right",right:"left",top:"bottom",bottom:"top"},y=s.x,v=s.y,m={left:d<y,right:d+u>y+s.width,top:p<v,bottom:p+f>v+s.height},b=[];c.split("-").forEach((function(t){m[t]?b.push(g[t]):b.push(t)}));var x=b.join("-");return this.getRelativeOffsetFromCursor(x)},e.prototype.isCursorEntered=function(t,e){if(this.element){var n=this.element.getBoundingClientRect(),r=n.x,i=n.y,o=n.width,a=n.height;return new hm(r,i,o,a).isPointIn(t,e)}return!1},e.prototype.closeTransition=function(t){var e=this,n=this.element.style.transition;this.element.style.transition="none",t(),setTimeout((function(){e.element.style.transition=n}),10)},e.tag="tooltip",e}(Hg),bA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const xA="tooltipLocked";function wA(t,e){var n;if(e)return"string"==typeof e?document.querySelector(e):e;const r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r)return;return r.getContextService().getDomElement().parentElement}function OA(t,e,n,r,i,o,a,s={},c=[10,10]){const l=new mA({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:o,position:r,enterable:i,title:"",offset:c,template:{prefixCls:"g2-"},style:Jh({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},s)}});return t.appendChild(l.HTMLTooltipElement),l}function kA({root:t,data:e,x:n,y:r,render:i,event:o,single:a,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f,offset:h}){const d=wA(t,u),p=wA(t),g=a?p:t,y=f||function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,o]}=e;return{x:n,y:r,width:i-n,height:o-r}}(t),v=function(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(p,d),{tooltipElement:m=OA(d,n,r,s,c,y,v,l,h)}=g,{items:b,title:x=""}=e;m.update(Object.assign({x:n,y:r,data:b.map((t=>Object.assign(Object.assign({},t),{value:t.value||0===t.value?t.value:""}))),title:x,position:s,enterable:c,container:v},void 0!==i&&{content:i(o,{items:b,title:x})})),g.tooltipElement=m}function MA({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const o=wA(t),a=e?o:t,{tooltipElement:s}=a;s&&s.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY),RA(t),LA(t),NA(t)}function _A({root:t,single:e}){const n=wA(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),RA(t),LA(t),NA(t)}function EA(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function SA(t){const{__data__:e}=t;if(kd(t))return function(t){var e,n,r,i,o,a,s;const{__data__:c}=t,{title:l,items:u=[]}=c;if(u.some((t=>lS in t))){const e=u.filter(Pd).map((e=>{var{color:n=AA(t)}=e,r=bA(e,["color"]);return Object.assign(Object.assign({},r),{color:n})})).map(EA);return Object.assign(Object.assign({},l&&{title:l}),{items:e})}const f=null!==(n=null===(e=null==c?void 0:c.normalized)||void 0===e?void 0:e.x)&&void 0!==n?n:0,h=null===(r=t.parentNode)||void 0===r?void 0:r.__data__,d=null!==(i=null==h?void 0:h.encode)&&void 0!==i?i:{},{x:p={},y:g={},color:y={}}=d,{value:v=[]}=p,{value:m=[]}=g,{value:b=[]}=y,x=Math.min(Math.round(v.length*f),v.length-1);return{title:`${v[x]}, ${m[x]}`,items:[{name:null!==(o=y.field)&&void 0!==o?o:"value",value:b[x],color:(null===(a=t.style)||void 0===a?void 0:a.fill)||(null===(s=t.getAttribute)||void 0===s?void 0:s.call(t,"color"))||"#000"}]}}(t);const{title:n,items:r=[]}=e,i=r.filter(Pd).map((e=>{var{color:n=AA(t)}=e,r=bA(e,["color"]);return Object.assign(Object.assign({},r),{color:n})})).map(EA);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function AA(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=(e&&"transparent"!==e?e:n)}=r;return i}function jA(t,e=(t=>t)){const n=new Map(t.map((t=>[e(t),t])));return Array.from(n.values())}function TA(t,e,n,r=t.map((t=>t.__data__)),i={}){const o=t=>t instanceof Date?+t:t,a=jA(r.map((t=>t.title)),o).filter(Pd),s=r.flatMap(((r,o)=>{const a=r.element||t[o],{items:s=[],title:c}=r,l=s.filter(Pd),u=void 0!==n?n:s.length<=1;return l.map((t=>{var{color:n=AA(a)||i.color,name:o}=t,s=bA(t,["color","name"]);const l=_d(e,r),f=u&&!(lS in s)?l||o:o||l;return Object.assign(Object.assign({},s),{color:n,name:f||c})}))})).map(EA);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:jA(s,(t=>`(${o(t.name)}, ${o(t.value)}, ${o(t.color)})`))})}function PA(t,e,n,r){var{plotWidth:i,plotHeight:o,mainWidth:a,mainHeight:s,startX:c,startY:l,transposed:u,polar:f,insetLeft:h,insetTop:d}=r,p=bA(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const g=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},p),y=((t,e)=>{if(1===e.length)return e[0];const n=e.map((e=>Sx(e,t))),r=lA(n,(t=>t));return e[r]})(n,e);if(f){const[e,n,r]=(()=>{const t=c+h+a/2,e=l+d+s/2;return[t,e,Sx([t,e],y)]})(),i=t.ruleX||((e,n,r)=>{const i=new ul({style:Object.assign({cx:e,cy:n,r:r},g)});return t.appendChild(i),i})(e,n,r);i.style.cx=e,i.style.cy=n,i.style.r=r,t.ruleX=i}else{const[e,n,r,a]=u?[c+y[0],c+y[0],l,l+o]:[c,c+i,y[1]+l,y[1]+l],s=t.ruleX||((e,n,r,i)=>{const o=new bl({style:Object.assign({x1:e,x2:n,y1:r,y2:i},g)});return t.appendChild(o),o})(e,n,r,a);s.style.x1=e,s.style.x2=n,s.style.y1=r,s.style.y2=a,t.ruleX=s}}function CA(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:o,mainHeight:a,startX:s,startY:c,transposed:l,polar:u,insetLeft:f,insetTop:h}=n,d=bA(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},d),g=e.map((t=>t[1])),y=e.map((t=>t[0])),v=uA(g),m=uA(y),[b,x,w,O]=(()=>{if(u){const t=Math.min(o,a)/2,e=s+f+o/2,n=c+h+a/2,r=Ax(_x([m,v],[e,n]));return[e,e+t*Math.cos(r),n,n+t*Math.sin(r)]}return l?[s,s+r,v+c,v+c]:[m+s,m+s,c,c+i]})();if(y.length>0){const e=t.ruleY||(()=>{const e=new bl({style:Object.assign({x1:b,x2:x,y1:w,y2:O},p)});return t.appendChild(e),e})();e.style.x1=b,e.style.x2=x,e.style.y1=w,e.style.y2=O,t.ruleY=e}}function RA(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function LA(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function NA(t){t.markers&&(t.markers.forEach((t=>t.remove())),t.markers=[])}function IA(t,e){return Array.from(t.values()).some((t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]}))}function DA(t,e){return void 0===t?e:t}function BA(t){const{title:e,items:n}=t;return 0===n.length&&void 0===e}function FA({root:t,event:e,elements:n=[],coordinate:r,scale:i,shared:o}){var a,s;const c=n.every((t=>"interval"===t.markType))&&!Mg(r),l=i.x,u=function(t){const{x:e}=t;if(!e||!e.valueBandWidth)return!0;const{valueBandWidth:n}=e;return!!ze(n)||1===new Set(n.values()).size}(i),f=i.series,h=null!==(s=null===(a=null==l?void 0:l.getBandWidth)||void 0===a?void 0:a.call(l))&&void 0!==s?s:0,d=f&&f.valueBandWidth?t=>{const e=Math.round(1/f.valueBandWidth);return t.__data__.x+t.__data__.series*h+h/(2*e)}:t=>t.__data__.x+h/2;c&&n.sort(((t,e)=>d(t)-d(e)));const p=t=>{const{target:e=Wv(n)}=t;return ck(e,(e=>!!e.classList&&(kd(e)&&Nw(e,"__data__.normalized",function(t,e){const{innerWidth:n,innerHeight:r,marginLeft:i,paddingLeft:o,insetLeft:a,marginTop:s,paddingTop:c,insetTop:l}=t.getOptions();return{x:(e.x-i-o-a)/n,y:(e.y-s-c-l)/r}}(r,{x:t.offsetX,y:t.offsetY})),e.classList.includes("element"))))},g=c?e=>{const i=zO(t,e);if(!i)return;const[a]=r.invert(i),s=$w(d).center,c=u?s(n,a):function(t,e){const{adjustedRange:n,valueBandWidth:r,valueStep:i}=t,o=Array.from(r.values()),a=Array.from(i.values()),s=n.map(((t,e)=>{const n=(a[e]-o[e])/2;return[t-n,t+o[e]+n]})),c=s.findIndex((([t,n])=>t<=e&&e<=n));return-1!==c?c:e>.5?n.length-1:0}(l,a),f=n[c];if(!o){const t=n.find((t=>t!==f&&d(t)===d(f)));if(t)return p(e)||t}return f}:p;return g(e)}function zA({root:t,event:e,elements:n,coordinate:r,scale:i,startX:o,startY:a}){const s=kg(r),c=[],l=[];for(const t of n){const{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?c.push(t):(r||i)&&l.push(t)}const u=l.length&&l.every((t=>"interval"===t.markType))&&!Mg(r),f=t=>t.__data__.x,h=!!i.x.getBandWidth&&l.length>0;c.sort(((t,e)=>{const n=s?0:1,r=t=>t.getBounds().min[n];return s?r(e)-r(t):r(t)-r(e)}));const d=t=>{const e=s?1:0,{min:n,max:r}=t.getLocalBounds();return Ow([n[e],r[e]])};u?n.sort(((t,e)=>f(t)-f(e))):l.sort(((t,e)=>{const[n,r]=d(t),[i,o]=d(e),a=(n+r)/2,c=(i+o)/2;return s?c-a:a-c}));const p=new Map(c.map((t=>{const{__data__:e}=t,{seriesX:n}=e,r=n.map(((t,e)=>e)),i=Ow(r,(t=>n[+t]));return[t,[i,n]]}))),{x:g}=i,y=(null==g?void 0:g.getBandWidth)?g.getBandWidth()/2:0,v=t=>{const[e]=r.invert(t);return e-y},m=(t,e,n,r)=>{const{_x:i}=t,o=void 0!==i?g.map(i):v(e),a=r.filter(Pd),[s,c]=Ow([a[0],a[a.length-1]]);if(!h&&(o<s||o>c)&&!(s===c))return null;const l=$w((t=>r[+t])).center;return n[l(n,o)]},b=u?(t,e)=>{const n=e[(0,$w(f).center)(e,v(t))];return Gh(e,f).get(f(n))}:(t,e)=>{const n=t[s?1:0],r=e.filter((t=>{const[e,r]=d(t);return n>=e&&n<=r}));if(!h||r.length>0)return r;const i=$w((t=>{const[e,n]=d(t);return(e+n)/2})).center;return[e[i(e,n)]].filter(Pd)},x=(t,e)=>{const{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter((([t])=>t.startsWith("series")&&"series"!==t)).map((([t,n])=>{const r=n[e];return[ed(t.replace("series","")),r]})))},w=zO(t,e);if(!w)return;const O=[w[0]-o,w[1]-a];if(!O)return;const k=b(O,l),M=[],_=[];for(const t of c){const[n,i]=p.get(t),o=m(e,O,n,i);if(null!==o){M.push(t);const e=x(t,o),{x:n,y:i}=e,a=r.map([(n||0)+y,i||0]);_.push([Object.assign(Object.assign({},e),{element:t}),a])}}const E=Array.from(new Set(_.map((t=>t[0].x)))),S=E[lA(E,(t=>Math.abs(t-v(O))))],A=_.filter((t=>t[0].x===S)),j=[...A.map((t=>t[0])),...k.map((t=>t.__data__))];return{selectedElements:[...M,...k],selectedData:j,filteredSeriesData:A,abstractX:v}}function ZA(t,e){var{elements:n,sort:r,filter:i,scale:o,coordinate:a,crosshairs:s,crosshairsX:c,crosshairsY:l,render:u,groupName:f,emitter:h,wait:d=50,leading:p=!0,trailing:g=!1,startX:y=0,startY:v=0,body:m=!0,single:b=!0,position:x,enterable:w,mount:O,bounding:k,theme:M,offset:_,disableNative:E=!1,marker:S=!0,preserve:A=!1,style:j={},css:T={},clickLock:P=!1}=e,C=bA(e,["elements","sort","filter","scale","coordinate","crosshairs","crosshairsX","crosshairsY","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","offset","disableNative","marker","preserve","style","css","clickLock"]);const R=n(t),L=Jh(j,C),N=Mg(a),I=kg(a),{innerWidth:D,innerHeight:B,width:F,height:z,insetLeft:Z,insetTop:W}=a.getOptions(),$=fA((e=>{var n;if(P&&t.getAttribute(xA))return;const d=zO(t,e);if(!d)return;const p=FO(t),g=p.min[0],E=p.min[1],{selectedElements:A,selectedData:j,filteredSeriesData:C,abstractX:$}=zA({root:t,event:e,elements:R,coordinate:a,scale:o,startX:y,startY:v}),q=TA(A,o,f,j,M);if(r&&q.items.sort(((t,e)=>r(t)-r(e))),i&&(q.items=q.items.filter(i)),0===A.length||BA(q))return void G(e);if(m&&kA({root:t,data:q,x:d[0]+g,y:d[1]+E,render:u,event:e,single:b,position:x,enterable:w,mount:O,bounding:k,css:T,offset:_}),s||c||l){const e=Rd(L,"crosshairs"),n=Object.assign(Object.assign({},e),Rd(L,"crosshairsX")),r=Object.assign(Object.assign({},e),Rd(L,"crosshairsY")),i=C.map((t=>t[1]));c&&PA(t,i,d,Object.assign(Object.assign({},n),{plotWidth:D,plotHeight:B,mainWidth:F,mainHeight:z,insetLeft:Z,insetTop:W,startX:y,startY:v,transposed:I,polar:N})),l&&CA(t,i,Object.assign(Object.assign({},r),{plotWidth:D,plotHeight:B,mainWidth:F,mainHeight:z,insetLeft:Z,insetTop:W,startX:y,startY:v,transposed:I,polar:N}))}if(S){const e=Rd(L,"marker");!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach((t=>t.remove()));const{type:i=""}=n,o=e.filter((t=>{const[{x:e,y:n}]=t;return Pd(e)&&Pd(n)})).map((t=>{const[{color:e,element:o},a]=t,s=e||o.style.fill||o.style.stroke||r.color,c="hollow"===i?"transparent":s,l="hollow"===i?s:"#fff";return new ul({className:"g2-tooltip-marker",style:Object.assign({cx:a[0],cy:a[1],fill:c,r:4,stroke:l,lineWidth:2,pointerEvents:"none"},n)})}));for(const e of o)t.appendChild(e);t.markers=o}(t,{data:C,style:e,theme:M})}const Y=null===(n=C[0])||void 0===n?void 0:n[0].x,H=null!=Y?Y:$(focus);h.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},q),{data:{x:Jw(o.x,H,!0)}})}))}),d,{leading:p,trailing:g}),G=e=>{P&&t.getAttribute(xA)||MA({root:t,single:b,emitter:h,event:e})},q=()=>{_A({root:t,single:b})},Y=e=>{var n,{nativeEvent:r,data:i,offsetX:s,offsetY:c}=e,l=bA(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;const u=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.x,f=o.x.map(u),[h,d]=a.map([f,.5]),p=t.getRenderBounds(),g=p.min[0],y=p.min[1];$(Object.assign(Object.assign({},l),{offsetX:void 0!==s?s:g+h,offsetY:void 0!==c?c:y+d,_x:u}))},H=()=>{MA({root:t,single:b,emitter:h,nativeEvent:!1})},V=()=>{J(),q()},U=e=>{zO(t,e)||G(e)},X=()=>{Q()},K=e=>{P&&t.setAttribute(xA,!t.getAttribute(xA)),$(e)},Q=()=>{E||(t.addEventListener("pointerdown",K),t.addEventListener("pointerenter",$),t.addEventListener("pointermove",$),t.addEventListener("pointerleave",U),t.addEventListener("pointerup",G))},J=()=>{E||(t.removeEventListener("pointerdown",K),t.removeEventListener("pointerenter",$),t.removeEventListener("pointermove",$),t.removeEventListener("pointerleave",U),t.removeEventListener("pointerup",G))};return Q(),h.on("tooltip:show",Y),h.on("tooltip:hide",H),h.on("tooltip:disable",V),h.on("tooltip:enable",X),()=>{J(),h.off("tooltip:show",Y),h.off("tooltip:hide",H),h.off("tooltip:disable",V),h.off("tooltip:enable",X),A?MA({root:t,single:b,emitter:h,nativeEvent:!1}):q()}}function WA(t){const{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:i,series:o,name:a,item:s=(()=>({})),facet:c=!1}=t,l=bA(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,a,u)=>{const{container:f,view:h}=t,{scale:d,markState:p,coordinate:g,theme:y}=h,v=IA(p,"seriesTooltip"),m=IA(p,"crosshairs"),b=BO(f),x=DA(o,v),w=DA(n,m);if(l.clickLock&&!c&&b.setAttribute(xA,!1),x&&function(t){return Array.from(t.values()).some((t=>{var e;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)&&t.tooltip}))}(p)&&!c)return ZA(b,Object.assign(Object.assign({},l),{theme:y,elements:NO,scale:d,coordinate:g,crosshairs:w,crosshairsX:DA(DA(r,n),!1),crosshairsY:DA(i,w),item:s,emitter:u}));if(x&&c){const e=a.filter((e=>e!==t&&e.options.parentKey===t.options.key)),o=IO(t,a),c=e[0].view.scale,f=b.getBounds(),h=f.min[0],d=f.min[1];Object.assign(c,{facet:!0});const p=b.parentNode.parentNode;return l.clickLock&&p.setAttribute(xA,!1),ZA(p,Object.assign(Object.assign({},l),{theme:y,elements:()=>o,scale:c,coordinate:g,crosshairs:DA(n,m),crosshairsX:DA(DA(r,n),!1),crosshairsY:DA(i,w),item:s,startX:h,startY:d,emitter:u}))}return function(t,{elements:e,coordinate:n,scale:r,render:i,groupName:o,sort:a,filter:s,emitter:c,wait:l=50,leading:u=!0,trailing:f=!1,groupKey:h=(t=>t),single:d=!0,position:p,enterable:g,datum:y,view:v,mount:m,bounding:b,theme:x,offset:w,shared:O=!1,body:k=!0,disableNative:M=!1,preserve:_=!1,css:E={},clickLock:S=!1}){const A=e(t),j=Gh(A,h),T=fA((e=>{if(S&&t.getAttribute(xA))return;const l=FA({root:t,event:e,elements:A,coordinate:n,scale:r,shared:O});if(!l)return void MA({root:t,single:d,emitter:c,event:e});const u=h(l),f=j.get(u);if(!f)return;const y=1!==f.length||O?TA(f,r,o,void 0,x):SA(f[0]);if(a&&y.items.sort(((t,e)=>a(t)-a(e))),s&&(y.items=y.items.filter(s)),BA(y))return void MA({root:t,single:d,emitter:c,event:e});const{offsetX:M,offsetY:_}=e;k&&kA({root:t,data:y,x:M,y:_,render:i,event:e,single:d,position:p,enterable:g,mount:m,bounding:b,css:E,offset:w}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},y),{data:Md(l,v)})}))}),l,{leading:u,trailing:f}),P=e=>{MA({root:t,single:d,emitter:c,event:e})},C=e=>{S&&t.setAttribute(xA,!t.getAttribute(xA)),T(e)},R=()=>{M||(t.addEventListener("pointerdown",C),t.addEventListener("pointermove",T),t.addEventListener("pointerleave",P),t.addEventListener("pointerup",P))},L=()=>{M||(t.removeEventListener("pointerdown",C),t.removeEventListener("pointermove",T),t.removeEventListener("pointerleave",P),t.removeEventListener("pointerup",P))},N=({nativeEvent:e,offsetX:n,offsetY:r,data:i})=>{if(e)return;const{data:o}=i,a=ik(A,o,y);if(!a)return;const s=a.getBBox(),{x:c,y:l,width:u,height:f}=s,h=t.getBBox();T({target:a,offsetX:void 0!==n?n+h.x:c+u/2,offsetY:void 0!==r?r+h.y:l+f/2})},I=({nativeEvent:e}={})=>{e||MA({root:t,single:d,emitter:c,nativeEvent:!1})},D=()=>{L(),_A({root:t,single:d})},B=()=>{R()};return c.on("tooltip:show",N),c.on("tooltip:hide",I),c.on("tooltip:enable",B),c.on("tooltip:disable",D),R(),()=>{L(),c.off("tooltip:show",N),c.off("tooltip:hide",I),c.off("tooltip:enable",B),c.off("tooltip:disable",D),_?MA({root:t,single:d,emitter:c,nativeEvent:!1}):_A({root:t,single:d})}}(b,Object.assign(Object.assign({},l),{datum:GO(h),elements:NO,scale:d,coordinate:g,groupKey:e?t=>t.__data__.x:void 0,item:s,emitter:u,view:h,theme:y,shared:e}))}}WA.props={reapplyWhenUpdate:!0};const $A=t=>t?parseInt(t):0;function GA(t,e){const n=[t];for(;n.length;){const t=n.shift();e&&e(t);const r=t.children||[];for(const t of r)n.push(t)}}class qA{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=(t=>t)){const e=t(this.value);return this.value=e,this}attr(t,e){return 1===arguments.length?this.value[t]:this.map((n=>(n[t]=e,n)))}append(t){const e=new t({});return e.children=[],this.push(e),e}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){const t=this.parentNode;if(t){const{children:e}=t,n=e.findIndex((t=>t===this));e.splice(n,1)}return this}getNodeByKey(t){let e=null;return GA(this,(n=>{t===n.attr("key")&&(e=n)})),e}getNodesByType(t){const e=[];return GA(this,(n=>{t===n.type&&e.push(n)})),e}getNodeByType(t){let e=null;return GA(this,(n=>{e||t===n.type&&(e=n)})),e}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}var YA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const HA=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],VA="__remove__",UA="__callback__";function XA(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function KA(t,e){const{width:n,height:r,autoFit:i,depth:o=0}=t;let a=640,s=480;if(i){const{width:t,height:n}=function(t){const e=getComputedStyle(t),n=t.clientWidth||$A(e.width),r=t.clientHeight||$A(e.height);return{width:n-($A(e.paddingLeft)+$A(e.paddingRight)),height:r-($A(e.paddingTop)+$A(e.paddingBottom))}}(e);a=t||a,s=n||s}return a=n||a,s=r||s,{width:Math.max(ze(a)?a:1,1),height:Math.max(ze(s)?s:1,1),depth:o}}function QA(t){const e=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];for(const n of HA)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,XA(e));n.length;){const t=n.pop(),e=r.get(t),{children:i=[]}=t;for(const t of i)if(t.type===UA)e.children=t.value;else{const i=XA(t),{children:o=[]}=e;o.push(i),n.push(t),r.set(t,i),e.children=o}}return r.get(e)}function JA(t,e,n,r,i){const{type:o}=t,{type:a=n||o}=e;if(function(t,e){return"function"!=typeof t&&new Set(Object.keys(e)).has(t)}(a,i)){for(const n of HA)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(function(t,e){return"function"==typeof t||new Set(Object.keys(e)).has(t)}(a,r)){const t={type:"view"},n=Object.assign({},e);for(const e of HA)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}function tj(t,e,n){if("function"==typeof t){const e=new qA;return e.value=t,e.type=UA,e}const{type:r,children:i}=t,o=YA(t,["type","children"]),a=function(t,e,n){if("function"==typeof t)return e.mark;const r=Object.assign(Object.assign({},e),n)[t];if(!r)throw new Error(`Unknown mark: ${t}.`);return r}(r,e,n),s=new a;return s.value=o,s.type=r,s}function ej(t,e){const{type:n,children:r}=e,i=YA(e,["type","children"]);t.type===n||void 0===n?Fd(t.value,i):"string"==typeof n&&(t.type=n,t.value=i)}function nj(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[t,e]=i.shift(),o=tj(e,n,r);Array.isArray(t.children)&&t.push(o);const{children:a}=e;if(Array.isArray(a))for(const t of a)i.push([o,t]);else"function"==typeof a&&i.push([o,a])}}function rj(t,e,{key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function ij(t,e,{key:n=e}){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(n);if(Array.isArray(t))return this.attr(n,t);const e=[...this.attr(n)||[],t];return this.attr(n,e)}}function oj(t,e,{key:n=e}){t.prototype[e]=function(t,e){if(0===arguments.length)return this.attr(n);if(1===arguments.length&&"string"!=typeof t)return this.attr(n,t);const r=this.attr(n)||{};return r[t]=1===arguments.length||e,this.attr(n,r)}}function aj(t,e,n){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(e);if(Array.isArray(t))return this.attr(e,{items:t});if(Dd(t)&&(void 0!==t.title||void 0!==t.items))return this.attr(e,t);if(null===t||!1===t)return this.attr(e,t);const n=this.attr(e)||{},{items:r=[]}=n;return r.push(t),n.items=r,this.attr(e,n)}}function sj(t,e,{ctor:n}){t.prototype[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}function cj(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function lj(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:t}=r;"value"===t?rj(e,n,r):"array"===t?ij(e,n,r):"object"===t?oj(e,n,r):"node"===t?sj(e,n,r):"container"===t?cj(e,n,r):"mix"===t&&aj(e,n)}return e}}function uj(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,{type:"node",ctor:e}])))}const fj={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},hj=Object.assign(Object.assign({},fj),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),dj=Object.assign(Object.assign({},fj),{labelTransform:{type:"array"}});var pj=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};let gj=class extends qA{changeData(t){var e;const n=this.getRoot();if(n)return this.attr("data",t),(null===(e=this.children)||void 0===e?void 0:e.length)&&this.children.forEach((e=>{e.attr("data",t)})),null==n?void 0:n.render()}getView(){const t=this.getRoot(),{views:e}=t.getContext();if(null==e?void 0:e.length)return e.find((t=>t.key===this._key))}getScale(){var t;return null===(t=this.getView())||void 0===t?void 0:t.scale}getScaleByChannel(t){const e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null===(t=this.getView())||void 0===t?void 0:t.coordinate}getTheme(){var t;return null===(t=this.getView())||void 0===t?void 0:t.theme}getGroup(){const t=this._key;if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){const t=this.getGroup();t&&!t.isVisible()&&RO(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&CO(t)}};gj=pj([lj(dj)],gj);var yj=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};let vj=class extends qA{changeData(t){const e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(!e)return;const{markState:n}=e,r=Array.from(n.keys()).find((t=>t.key===this.attr("key")));return n.get(r)}getScale(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;const r=null===(e=this.getRoot())||void 0===e?void 0:e.getView();if(r)return null===(n=null==r?void 0:r.scale)||void 0===n?void 0:n[t]}getGroup(){const t=this.attr("key");if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};vj=yj([lj(hj)],vj);var mj=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},bj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const xj="G2_CHART_KEY";var wj=Object.prototype.hasOwnProperty,Oj=function(t,e){if(null===t||!Xh(t))return{};var n={};return cm(e,(function(e){wj.call(t,e)&&(n[e]=t[e])})),n};function kj(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Mj(t,e,n,r,i){for(var o,a=t.children,s=-1,c=a.length,l=t.value&&(r-e)/t.value;++s<c;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function _j(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&Mj(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a<i&&(i=a=(i+a)/2),s<o&&(o=s=(o+s)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=s}}(e,o)),r&&i.eachBefore(kj),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}var Ej=n(10154);function Sj(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}var Aj=n(86222);var jj=n(90819),Tj=jj().mark(Pj);function Pj(){var t,e,n,r,i,o;return jj().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=[t=this];case 1:e=n.reverse(),n=[];case 2:if(!(t=e.pop())){a.next=8;break}return a.next=5,t;case 5:if(r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);a.next=2;break;case 8:if(n.length){a.next=1;break}case 9:case"end":return a.stop()}}),Tj,this)}function Cj(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Lj)):void 0===e&&(e=Rj);for(var n,r,i,o,a,s=new Dj(t),c=[s];n=c.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)c.push(r=i[o]=new Dj(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ij)}function Rj(t){return t.children}function Lj(t){return Array.isArray(t)?t[1]:null}function Nj(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Ij(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Dj(t){this.data=t,this.depth=this.height=0,this.parent=null}function Bj(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function Fj(t,e,n,r){return e&&Bj(t,e),n&&Bj(t,n),r&&Bj(t,r),t}Dj.prototype=Cj.prototype=Ej({constructor:Dj,count:function(){return this.eachAfter(Sj)},each:function(t,e){var n,r=-1,i=Aj(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.call(e,o,++r,this)}}catch(t){i.e(t)}finally{i.f()}return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],c=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++c,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){var n,r=-1,i=Aj(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(t.call(e,o,++r,this))return o}}catch(t){i.e(t)}finally{i.f()}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Cj(this).eachBefore(Nj)}},Symbol.iterator,Pj);const zj={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},Zj="childNodeCount",Wj="Invalid field: it must be a string!";function $j(t,e){const n=(e=Fj({},zj,e)).as;if(!xn(n)||2!==n.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=function(t,e){const{field:n,fields:r}=t;if($e(n))return n;if(xn(n))return console.warn(Wj),n[0];if(console.warn(`${Wj} will try to get fields instead.`),$e(r))return r;if(xn(r)&&r.length)return r[0];if(e)return e;throw new TypeError(Wj)}(e)}catch(t){console.warn(t)}const i=(t=>_j().size(e.size).round(e.round).padding(e.padding)(Cj(t).sum((t=>Hb(t.children)?e.ignoreParentValue?0:t[r]-lm(t.children,((t,e)=>t+e[r]),0):t[r])).sort(e.sort)))(t),o=n[0],a=n[1];return i.each((t=>{var e,r;t[o]=[t.x0,t.x1,t.x1,t.x0],t[a]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null===(e=t.data)||void 0===e?void 0:e.name)||(null===(r=t.data)||void 0===r?void 0:r.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach((e=>{-1===n.indexOf(e)&&delete t[e]}))})),function(t){const e=[];if(t&&t.each){let n,r;t.each((t=>{var i,o;t.parent!==n?(n=t.parent,r=0):r+=1;const a=qw(((null===(i=t.ancestors)||void 0===i?void 0:i.call(t))||[]).map((t=>e.find((e=>e.name===t.name))||t)),(({depth:e})=>e>0&&e<t.depth));t.nodeAncestor=a,t[Zj]=(null===(o=t.children)||void 0===o?void 0:o.length)||0,t.nodeIndex=r,e.push(t)}))}else t&&t.eachNode&&t.eachNode((t=>{e.push(t)}));return e}(i)}var Gj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const qj="sunburst",Yj="markType",Hj="path",Vj="ancestor-node";const Uj={id:qj,encode:{x:"x",y:"y",key:Hj,color:Vj,value:"value"},axis:{x:!1,y:!1},style:{[Yj]:qj,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Zj]:Zj,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},Xj=t=>{const{encode:e,data:n=[]}=t,r=Gj(t,["encode","data"]),i=Object.assign(Object.assign({},r.coordinate),{innerRadius:Math.max(Dh(r,["coordinate","innerRadius"],.2),1e-5)}),o=Object.assign(Object.assign({},Uj.encode),e),{value:a}=o,s=function(t){const{data:e,encode:n}=t,{color:r,value:i}=n,o=$j(e,{field:i,type:"hierarchy.partition",as:["x","y"]}),a=[];return o.forEach((t=>{var e,n,o,s;if(0===t.depth)return null;let c=t.data.name;const l=[c];let u=Object.assign({},t);for(;u.depth>1;)c=`${null===(e=u.parent.data)||void 0===e?void 0:e.name} / ${c}`,l.unshift(null===(n=u.parent.data)||void 0===n?void 0:n.name),u=u.parent;const f=Object.assign(Object.assign(Object.assign({},Oj(t.data,[i])),{[Hj]:c,[Vj]:u.data.name}),t);r&&r!==Vj&&(f[r]=t.data[r]||(null===(s=null===(o=t.parent)||void 0===o?void 0:o.data)||void 0===s?void 0:s[r])),a.push(f)})),a.map((t=>{const e=t.x.slice(0,2),n=[t.y[2],t.y[0]];return e[0]===e[1]&&(n[0]=n[1]=(t.y[2]+t.y[0])/2),Object.assign(Object.assign({},t),{x:e,y:n,fillOpacity:Math.pow(.85,t.depth)})}))}({encode:o,data:n});return[Jh({},Uj,Object.assign(Object.assign({type:"rect",data:s,encode:o,tooltip:{title:"path",items:[t=>({name:a,value:t[a]})]}},r),{coordinate:i}))]};Xj.props={};var Kj=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return cm(t,(function(n,r){Fn(t)&&"prototype"===r||e.push(r)})),e},Qj=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))};const Jj={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function tT(t={}){const{breadCrumb:e={},isFixedColor:n=!1}=t,r=Jh({},Jj,e);return t=>{const{update:e,setState:i,container:o,view:a,options:s}=t,c=o.ownerDocument,l=function(t){return zd(t).select(`.${N}`).node()}(o),u=s.marks.find((({id:t})=>t===qj)),{state:f}=u,h=c.createElement("g");l.appendChild(h);const d=(t,o)=>Qj(this,void 0,void 0,(function*(){if(h.removeChildren(),t){const e=c.createElement("text",{style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});h.appendChild(e);let n="";const i=null==t?void 0:t.split(" / ");let o=r.style.y,a=h.getBBox().width;const s=l.getBBox().width,u=i.map(((t,e)=>{const i=c.createElement("text",{style:Object.assign(Object.assign({x:a,text:" / "},r.style),{y:o})});h.appendChild(i),a+=i.getBBox().width,n=`${n}${t} / `;const l=c.createElement("text",{name:n.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:a,depth:e+1},r.style),{y:o})});return h.appendChild(l),a+=l.getBBox().width,a>s&&(o=h.getBBox().height,a=0,i.attr({x:a,y:o}),a+=i.getBBox().width,l.attr({x:a,y:o}),a+=l.getBBox().width),l}));[e,...u].forEach(((t,e)=>{if(e===u.length)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",(()=>{t.attr(r.active)})),t.addEventListener("mouseleave",(()=>{t.attr(n)})),t.addEventListener("click",(()=>{d(t.name,Dh(t,["style","depth"]))}))}))}i("drillDown",(e=>{const{marks:r}=e,i=r.map((e=>{if(e.id!==qj&&"rect"!==e.type)return e;const{data:r}=e,i=Object.fromEntries(["color"].map((t=>[t,{domain:a.scale[t].getOptions().domain}]))),s=r.filter((e=>{const r=e.path;if(n||(e[Vj]=r.split(" / ")[o]),!t)return!0;return new RegExp(`^${t}.+`).test(r)}));return Jh({},e,n?{data:s,scale:i}:{data:s})}));return Object.assign(Object.assign({},e),{marks:i})})),yield e()})),p=t=>{const e=t.target;if(Dh(e,["style",Yj])!==qj||"rect"!==Dh(e,["markType"])||!Dh(e,["style",Zj]))return;const n=Dh(e,["__data__","key"]),r=Dh(e,["style","depth"]);e.style.cursor="pointer",d(n,r)};l.addEventListener("click",p);const g=Kj(Object.assign(Object.assign({},f.active),f.inactive)),y=()=>{(t=>t.querySelectorAll(".element").filter((t=>Dh(t,["style",Yj])===qj)))(l).forEach((t=>{const e=Dh(t,["style",Zj]);if("pointer"!==Dh(t,["style","cursor"])&&e){t.style.cursor="pointer";const e=Oj(t.attributes,g);t.addEventListener("mouseenter",(()=>{t.attr(f.active)})),t.addEventListener("mouseleave",(()=>{t.attr(Jh(e,f.inactive))}))}}))};return l.addEventListener("mousemove",y),()=>{h.remove(),l.removeEventListener("click",p),l.removeEventListener("mousemove",y)}}}const eT=()=>[["cartesian"]];eT.props={};const nT=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];nT.props={transform:!0};const rT=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=((t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)})(t);return[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5],...gg({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};rT.props={};const iT=()=>[["parallel",0,1,0,1]];iT.props={};const oT=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];oT.props={transform:!0};const aT=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[["parallel",0,1,0,1],...gg({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};aT.props={};const sT=({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]];sT.props={};const cT=({value:t})=>e=>e.map((()=>t));cT.props={};const lT=({value:t})=>e=>e.map((e=>e[t]));lT.props={};const uT=({value:t})=>e=>e.map(t);uT.props={};const fT=({value:t})=>()=>t;function hT(t,e){if(null!==t)return{type:"column",value:t,field:e}}function dT(t,e){const n=hT(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function pT(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function gT(t,e){const n=hT(t,e);return Object.assign(Object.assign({},n),{constant:!1})}function yT(t,e){const n=[];for(const r of t)n[r]=e;return n}function vT(t,e){const n=t[e];if(!n)return[null,null];const{value:r,field:i=null}=n;return[r,i]}function mT(t,...e){for(const n of e){if("string"!=typeof n)return[n,null];{const[e,r]=vT(t,n);if(null!==e)return[e,r]}}return[null,null]}function bT(t){return!(t instanceof Date)&&"object"==typeof t}fT.props={};const xT=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,Jh({},e,{encode:{y1:dT(yT(t,0))}})]};xT.props={};const wT=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,Jh({},e,{encode:{x:dT(yT(t,0))},scale:{x:{guide:null}}})]};wT.props={};const OT=(t,e)=>SO(Object.assign({colorAttribute:"fill"},t),e);OT.props=Object.assign(Object.assign({},SO.props),{defaultMarker:"square"});const kT=(t,e)=>SO(Object.assign({colorAttribute:"stroke"},t),e);function MT(){}function _T(t){this._context=t}function ET(t){return new _T(t)}kT.props=Object.assign(Object.assign({},SO.props),{defaultMarker:"hollowSquare"}),_T.prototype={areaStart:MT,areaEnd:MT,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var ST=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function AT(t,e,n){const[r,i,o,a]=t;if(kg(n)){return[r,[e?e[0][0]:i[0],i[1]],[e?e[3][0]:o[0],o[1]],a]}return[r,[i[0],e?e[0][1]:i[1]],[o[0],e?e[3][1]:o[1]],a]}const jT=(t,e)=>{const{adjustPoints:n=AT}=t,r=ST(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,s)=>{const{index:c}=e,{color:l}=a,u=ST(a,["color"]),f=s[c+1],h=n(t,f,i),d=!!kg(i),[p,g,y,v]=d?Ix(h):h,{color:m=l,opacity:b}=e,x=nw().curve(ET)([p,g,y,v]);return zd(o.createElement("path",{})).call(Rx,u).style("d",x).style("fill",m).style("fillOpacity",b).call(Rx,r).node()}};function TT(t,e,n){const[r,i,o,a]=t;if(kg(n)){return[r,[e?e[0][0]:(i[0]+o[0])/2,i[1]],[e?e[3][0]:(i[0]+o[0])/2,o[1]],a]}return[r,[i[0],e?e[0][1]:(i[1]+o[1])/2],[o[0],e?e[3][1]:(i[1]+o[1])/2],a]}jT.props={defaultMarker:"square"};const PT=(t,e)=>jT(Object.assign({adjustPoints:TT},t),e);function CT(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function RT(t){const e=`${t.getFullYear()}-${CT(t.getMonth()+1)}-${CT(t.getDate())}`,n=t.getHours(),r=t.getMinutes(),i=t.getSeconds();return n||r||i?`${e} ${CT(n)}:${CT(r)}:${CT(i)}`:e}PT.props={defaultMarker:"square"};const LT=(t={})=>{const{channel:e="x"}=t;return(t,n)=>{const{encode:r}=n,{tooltip:i}=n;if(Bd(i))return[t,n];const{title:o}=i;if(void 0!==o)return[t,n];const a=Object.keys(r).filter((t=>t.startsWith(e))).filter((t=>!r[t].inferred)).map((t=>vT(r,t))).filter((([t])=>t)).map((t=>t[0]));if(0===a.length)return[t,n];const s=[];for(const e of t)s[e]={value:a.map((t=>t[e]instanceof Date?RT(t[e]):t[e])).join(", ")};return[t,Jh({},n,{tooltip:{title:s}})]}};LT.props={};const NT=t=>{const{channel:e}=t;return(t,n)=>{const{encode:r,tooltip:i}=n;if(Bd(i))return[t,n];const{items:o=[]}=i;if(!o||o.length>0)return[t,n];const a=(Array.isArray(e)?e:[e]).flatMap((t=>Object.keys(r).filter((e=>e.startsWith(t))).map((t=>{const{field:e,value:n,inferred:i=!1,aggregate:o}=r[t];return i?null:o&&n?{channel:t}:e?{field:e}:n?{channel:t}:null})).filter((t=>null!==t))));return[t,Jh({},n,{tooltip:{items:a}})]}};NT.props={};var IT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const DT=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,i=IT(n,["key"]);if(void 0!==r)return[t,e];const o=Object.values(i).map((({value:t})=>t)),a=t.map((t=>o.filter(Array.isArray).map((e=>e[t])).join("-")));return[t,Jh({},e,{encode:{key:hT(a)}})]};function BT(t={}){const{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function FT(t={}){return[...BT(t),{name:"title",scale:"identity"}]}function zT(){return[{type:LT,channel:"color"},{type:NT,channel:["x","y"]}]}function ZT(){return[{type:LT,channel:"x"},{type:NT,channel:["y"]}]}function WT(t={}){return BT(t)}function $T(){return[{type:DT}]}function GT(t,e){return t.getBandWidth(t.invert(e))}function qT(t,e,n={}){const{x:r,y:i,series:o}=e,{x:a,y:s,series:c}=t,{style:{bandOffset:l=(c?0:.5),bandOffsetX:u=l,bandOffsetY:f=l}={}}=n,h=!!(null==a?void 0:a.getBandWidth),d=!!(null==s?void 0:s.getBandWidth),p=!!(null==c?void 0:c.getBandWidth);return h||d?(t,e)=>{const n=h?GT(a,r[e]):0,l=d?GT(s,i[e]):0,g=p&&o?(GT(c,o[e])/2+ +o[e])*n:0,[y,v]=t;return[y+u*n+g,v+f*l]}:t=>t}function YT(t){return parseFloat(t)/100}function HT(t,e,n,r){const{x:i,y:o}=n,{innerWidth:a,innerHeight:s}=r.getOptions(),c=Array.from(t,(t=>{const e=i[t],n=o[t];return[["string"==typeof e?YT(e)*a:+e,"string"==typeof n?YT(n)*s:+n]]}));return[t,c]}function VT(t){return"function"==typeof t?t:e=>e[t]}function UT(t,e){return Array.from(t,VT(e))}function XT(t,e){const n=function(t){return Array.isArray(t)?{links:t}:t&&"object"==typeof t?{links:t.links||[],nodes:t.nodes}:{links:[]}}(t),{source:r=(t=>t.source),target:i=(t=>t.target),value:o=(t=>t.value)}=e,{links:a,nodes:s}=n;if(!a.length)return{links:[],nodes:s||[]};const c=UT(a,r),l=UT(a,i),u=UT(a,o);return{links:a.map(((t,e)=>({target:l[e],source:c[e],value:u[e]}))),nodes:s||Array.from(new Set([...c,...l]),(t=>({key:t})))}}function KT(t,e){return t.getBandWidth(t.invert(e))}DT.props={};const QT={rect:OT,hollow:kT,funnel:jT,pyramid:PT},JT=()=>(t,e,n,r)=>{const{x:i,y1:o,series:a,size:s}=n;let{y:c}=n;c=c.map((t=>void 0!==t?t:1));const l=e.x,u=e.series,[f]=r.getSize(),h=s?s.map((t=>+t/f)):null,d=s?(t,e,n)=>{const r=t+e/2,i=h[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],p=Array.from(t,(t=>{const e=KT(l,i[t]),n=e*(u?KT(u,null==a?void 0:a[t]):1),s=(+(null==a?void 0:a[t])||0)*e,f=+i[t]+s,[h,p]=d(f,n,t),g=+c[t],y=+o[t];return[[h,g],[p,g],[p,y],[h,y]].map((t=>r.map(t)))}));return[t,p]};JT.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:QT,channels:[...FT({shapes:Object.keys(QT)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...$T(),{type:xT},{type:wT}],postInference:[...ZT()],interaction:{shareTooltip:!0}};const tP={rect:OT,hollow:kT},eP=()=>(t,e,n,r)=>{const{x:i,x1:o,y:a,y1:s}=n,c=Array.from(t,(t=>[[+i[t],+a[t]],[+o[t],+a[t]],[+o[t],+s[t]],[+i[t],+s[t]]].map((t=>r.map(t)))));return[t,c]};eP.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:tP,channels:[...FT({shapes:Object.keys(tP)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...$T(),{type:xT}],postInference:[...ZT()],interaction:{shareTooltip:!0}};var nP=iP(qx);function rP(t){this._curve=t}function iP(t){function e(e){return new rP(t(e))}return e._curve=t,e}function oP(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(iP(t)):e()._curve},t}rP.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))}};var aP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const sP=rw((t=>{const{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;zd(t).maybeAppend("line",(()=>o.createElement("path",{}))).style("d",e).call(Rx,r),zd(t).maybeAppend("line1",(()=>o.createElement("path",{}))).style("d",n).call(Rx,i)}));const cP=(t,e)=>{const{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=(t=>!Number.isNaN(t)&&null!=t),connect:a=!1}=t,s=aP(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(t,e,u)=>{const{color:f,lineWidth:h}=u,d=aP(u,["color","lineWidth"]),{color:p=f,size:g=h,seriesColor:y,seriesX:v,seriesY:m}=e,b=Fx(c,e),x=kg(c),w=r&&y?Nx(y,v,m,r,i,x):p,O=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),w&&{stroke:w}),g&&{lineWidth:g}),b&&{transform:b}),s);let k;if(Mg(c)){const t=c.getCenter();k=e=>oP(nw().curve(nP)).angle(((n,r)=>jx(_x(e[r],t)))).radius(((n,r)=>Sx(e[r],t))).defined((([t,e])=>o(t)&&o(e))).curve(n)(e)}else k=nw().x((t=>t[0])).y((t=>t[1])).defined((([t,e])=>o(t)&&o(e))).curve(n);const[M,_]=function(t,e){const n=[],r=[];let i=!1,o=null;for(const a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(t,o),E=Rd(O,"connect"),S=!!_.length;if(!S||a&&!Object.keys(E).length)return zd(l.createElement("path",{})).style("d",k(M)||[]).call(Rx,O).node();if(S&&!a)return zd(l.createElement("path",{})).style("d",k(t)).call(Rx,O).node();return zd(new sP).style("style1",Object.assign(Object.assign({},O),E)).style("style2",O).style("d1",(A=_,A.map(k).join(","))).style("d2",k(t)).node();var A}};cP.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const lP=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Mg(n)?ET:qx;return cP(Object.assign({curve:i},t),e)(...r)}};function uP(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function fP(t,e){this._context=t,this._k=(1-e)/6}lP.props=Object.assign(Object.assign({},cP.props),{defaultMarker:"line"}),fP.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:uP(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:uP(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 t(e){function n(t){return new fP(t,e)}return n.tension=function(e){return t(+e)},n})(0);function hP(t,e){this._context=t,this._k=(1-e)/6}hP.prototype={areaStart:MT,areaEnd:MT,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:uP(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 t(e){function n(t){return new hP(t,e)}return n.tension=function(e){return t(+e)},n})(0);function dP(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>fO){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>fO){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function pP(t,e){this._context=t,this._alpha=e}pP.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){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(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:dP(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}};(function t(e){function n(t){return e?new pP(t,e):new fP(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function gP(t,e){this._context=t,this._alpha=e}gP.prototype={areaStart:MT,areaEnd:MT,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){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(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:dP(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 yP=function t(e){function n(t){return e?new gP(t,e):new hP(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function vP(t){return t<0?-1:1}function mP(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(vP(o)+vP(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function bP(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function xP(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function wP(t){this._context=t}function OP(t){this._context=new kP(t)}function kP(t){this._context=t}function MP(t){return new wP(t)}function _P(t){return new OP(t)}wP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xP(this,this._t0,bP(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(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,xP(this,bP(this,n=mP(this,t,e)),n);break;default:xP(this,this._t0,n=mP(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(OP.prototype=Object.create(wP.prototype)).point=function(t,e){wP.prototype.point.call(this,e,t)},kP.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};var EP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const SP=(t,e)=>{const n=EP(t,[]),{coordinate:r}=e;return(...t)=>{const i=Mg(r)?yP:kg(r)?_P:MP;return cP(Object.assign({curve:i},n),e)(...t)}};function AP(t,e){this._context=t,this._t=e}function jP(t){return new AP(t,.5)}function TP(t){return new AP(t,0)}function PP(t){return new AP(t,1)}SP.props=Object.assign(Object.assign({},cP.props),{defaultMarker:"smooth"}),AP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,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;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};const CP=(t,e)=>cP(Object.assign({curve:PP},t),e);CP.props=Object.assign(Object.assign({},cP.props),{defaultMarker:"hv"});const RP=(t,e)=>cP(Object.assign({curve:TP},t),e);RP.props=Object.assign(Object.assign({},cP.props),{defaultMarker:"vh"});const LP=(t,e)=>cP(Object.assign({curve:jP},t),e);LP.props=Object.assign(Object.assign({},cP.props),{defaultMarker:"hvh"});var NP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function IP(t,e,n,r,i){const o=Ax(_x(n,e)),a=o+Math.PI/2,s=[r/2*Math.cos(a),r/2*Math.sin(a)],c=[i/2*Math.cos(a),i/2*Math.sin(a)],l=[i/2*Math.cos(o),i/2*Math.sin(o)],u=[r/2*Math.cos(o),r/2*Math.sin(o)],f=Ex(e,s),h=Ex(n,c),d=Ex(h,l),p=Ex(n,l),g=_x(p,c),y=_x(n,c),v=_x(e,s),m=_x(v,u),b=_x(e,u),x=_x(f,u);t.moveTo(...f),t.lineTo(...h),t.arcTo(...d,...p,i/2),t.arcTo(...g,...y,i/2),t.lineTo(...v),t.arcTo(...m,...b,r/2),t.arcTo(...x,...f,r/2),t.closePath()}const DP=(t,e)=>{const{document:n}=e;return(e,r,i)=>{const{seriesSize:o,color:a}=r,{color:s}=i,c=NP(i,["color"]),l=Qx();for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1],i=o[t],a=o[t+1];[...n,...r].every(Pd)&&IP(l,n,r,i,a)}return zd(n.createElement("path",{})).call(Rx,c).style("fill",a||s).style("d",l.toString()).call(Rx,t).node()}};DP.props=Object.assign(Object.assign({},cP.props),{defaultMarker:"line"});const BP=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,Jh({},e,{encode:{series:pT(yT(t,void 0))}})]};BP.props={};const FP=()=>(t,e)=>{const{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];const[o,a]=vT(n,"color");return[t,Jh({},e,{encode:{series:hT(o,a)}})]};FP.props={};const zP={line:lP,smooth:SP,hv:CP,vh:RP,hvh:LP,trail:DP},ZP=(t,e,n,r)=>{var i,o;const{series:a,x:s,y:c}=n,{x:l,y:u}=e;if(void 0===s||void 0===c)throw new Error("Missing encode for x or y channel.");const f=a?Array.from(Gh(t,(t=>a[t])).values()):[t],h=f.map((t=>t[0])).filter((t=>void 0!==t)),d=((null===(i=null==l?void 0:l.getBandWidth)||void 0===i?void 0:i.call(l))||0)/2,p=((null===(o=null==u?void 0:u.getBandWidth)||void 0===o?void 0:o.call(u))||0)/2,g=Array.from(f,(t=>t.map((t=>r.map([+s[t]+d,+c[t]+p])))));return[h,g,f]},WP=(t,e,n,r)=>{const i=Object.entries(n).filter((([t])=>t.startsWith("position"))).map((([,t])=>t));if(0===i.length)throw new Error("Missing encode for position channel.");Mg(r)&&i.push(i[0]);const o=Array.from(t,(t=>{const e=i.map((e=>+e[t])),n=r.map(e),o=[];for(let t=0;t<n.length;t+=2)o.push([n[t],n[t+1]]);return o}));return[t,o]},$P=()=>(t,e,n,r)=>(Sg(r)?WP:ZP)(t,e,n,r);$P.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:zP,channels:[...FT({shapes:Object.keys(zP)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...$T(),{type:BP},{type:FP}],postInference:[...ZT(),{type:LT,channel:"color"},{type:NT,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var GP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function qP(t,e,n,r){if(1===e.length)return;const{size:i}=n;if("fixed"===t)return i;if("normal"===t||Ag(r)){const[[t,n],[r,i]]=e,o=Math.abs((r-t)/2),a=Math.abs((i-n)/2);return Math.max(0,(o+a)/2)}return i}const YP=(t,e)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=GP(t,["colorAttribute","symbol","mode"]),a=vf.get(Zx(r))||vf.get("point"),{coordinate:s,document:c}=e;return(e,r,l)=>{const{lineWidth:u,color:f}=l,h=o.stroke?u||1:u,{color:d=f,transform:p,opacity:g}=r,[y,v]=zx(e),m=qP(i,e,r,s)||o.r||l.r;return zd(c.createElement("path",{})).call(Rx,l).style("fill","transparent").style("d",a(y,v,m)).style("lineWidth",h).style("transform",p).style("transformOrigin",`${y-m} ${v-m}`).style("stroke",d).style(Bx(t),g).style(n,d).call(Rx,o).node()}};YP.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const HP=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);HP.props=Object.assign({defaultMarker:"hollowPoint"},YP.props);const VP=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);VP.props=Object.assign({defaultMarker:"hollowDiamond"},YP.props);const UP=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);UP.props=Object.assign({defaultMarker:"hollowHexagon"},YP.props);const XP=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);XP.props=Object.assign({defaultMarker:"hollowSquare"},YP.props);const KP=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);KP.props=Object.assign({defaultMarker:"hollowTriangleDown"},YP.props);const QP=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);QP.props=Object.assign({defaultMarker:"hollowTriangle"},YP.props);const JP=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);JP.props=Object.assign({defaultMarker:"hollowBowtie"},YP.props);var tC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const eC=(t,e)=>{const{colorAttribute:n,mode:r="auto"}=t,i=tC(t,["colorAttribute","mode"]),{coordinate:o,document:a}=e;return(e,s,c)=>{const{lineWidth:l,color:u}=c,f=i.stroke?l||1:l,{color:h=u,transform:d,opacity:p}=s,[g,y]=zx(e),v=qP(r,e,s,o)||i.r||c.r;return zd(a.createElement("circle",{})).call(Rx,c).style("fill","transparent").style("cx",g).style("cy",y).style("r",v).style("lineWidth",f).style("transform",d).style("transformOrigin",`${g} ${y}`).style("stroke",h).style(Bx(t),p).style(n,h).call(Rx,i).node()}},nC=(t,e)=>eC(Object.assign({colorAttribute:"fill"},t),e);nC.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};const rC=(t,e)=>eC(Object.assign({colorAttribute:"stroke"},t),e);rC.props=Object.assign({defaultMarker:"hollowPoint"},nC.props);const iC=(t,e)=>YP(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);iC.props=Object.assign({defaultMarker:"point"},YP.props);const oC=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);oC.props=Object.assign({defaultMarker:"plus"},YP.props);const aC=(t,e)=>YP(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);aC.props=Object.assign({defaultMarker:"diamond"},YP.props);const sC=(t,e)=>YP(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);sC.props=Object.assign({defaultMarker:"square"},YP.props);const cC=(t,e)=>YP(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);cC.props=Object.assign({defaultMarker:"triangle"},YP.props);const lC=(t,e)=>YP(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);lC.props=Object.assign({defaultMarker:"hexagon"},YP.props);const uC=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);uC.props=Object.assign({defaultMarker:"cross"},YP.props);const fC=(t,e)=>YP(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);fC.props=Object.assign({defaultMarker:"bowtie"},YP.props);const hC=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);hC.props=Object.assign({defaultMarker:"hyphen"},YP.props);const dC=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);dC.props=Object.assign({defaultMarker:"line"},YP.props);const pC=(t,e)=>YP(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);pC.props=Object.assign({defaultMarker:"tick"},YP.props);const gC=(t,e)=>YP(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);gC.props=Object.assign({defaultMarker:"triangleDown"},YP.props);const yC=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,Jh({},e,{encode:{y:dT(yT(t,0))},scale:{y:{guide:null}}})]};yC.props={};const vC=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,Jh({},e,{encode:{size:pT(yT(t,3))}})]};vC.props={};const mC={hollow:HP,hollowDiamond:VP,hollowHexagon:UP,hollowSquare:XP,hollowTriangleDown:KP,hollowTriangle:QP,hollowBowtie:JP,hollowCircle:rC,point:iC,plus:oC,diamond:aC,square:sC,triangle:cC,hexagon:lC,cross:uC,bowtie:fC,hyphen:hC,line:dC,tick:pC,triangleDown:gC,circle:nC},bC=t=>(e,n,r,i)=>{const{x:o,y:a,x1:s,y1:c,size:l,dx:u,dy:f}=r,[h,d]=i.getSize(),p=qT(n,r,t),g=t=>{const e=+((null==u?void 0:u[t])||0),n=+((null==f?void 0:f[t])||0);return[(s?(+o[t]+ +s[t])/2:+o[t])+e,(c?(+a[t]+ +c[t])/2:+a[t])+n]},y=l?Array.from(e,(t=>{const[e,n]=g(t),r=+l[t],o=r/h,a=r/d,s=[e-o,n-a],c=[e+o,n+a];return[i.map(p(s,t)),i.map(p(c,t))]})):Array.from(e,(t=>[i.map(p(g(t),t))]));return[e,y]};bC.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:mC,channels:[...FT({shapes:Object.keys(mC)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...$T(),{type:wT},{type:yC}],postInference:[{type:vC},...zT()]};const xC=(t,e)=>{const{coordinate:n}=e;return(e,r,i)=>{const{color:o,text:a="",fontSize:s,rotate:c=0,transform:l=""}=r,u={text:String(a),stroke:o,fill:o,fontSize:s},[[f,h]]=e;return zd(new aw).style("x",f).style("y",h).call(Rx,i).style("transform",`${l}rotate(${+c})`).style("coordCenter",n.getCenter()).call(Rx,u).call(Rx,t).node()}};xC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var wC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const OC=rw((t=>{const e=t.attributes,{class:n,x:r,y:i,transform:o}=e,a=wC(e,["class","x","y","transform"]),s=Rd(a,"marker"),{size:c=24}=s,l=()=>function(t){const e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[s,c]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,s,c],["L",o,a],["Z"]]}(c/2),u=zd(t).maybeAppend("marker",(()=>new Ab({}))).call((t=>t.node().update(Object.assign({symbol:l},s)))).node(),[f,h]=function(t){const{min:e,max:n}=t.getLocalBounds();return[.5*(e[0]+n[0]),.5*(e[1]+n[1])]}(u);zd(t).maybeAppend("text","text").style("x",f).style("y",h).call(Rx,a)})),kC=(t,e)=>{const n=wC(t,[]);return(t,e,r)=>{const{color:i}=r,o=wC(r,["color"]),{color:a=i,text:s=""}=e,c={text:String(s),stroke:a,fill:a},[[l,u]]=t;return zd(new OC).call(Rx,o).style("transform",`translate(${l},${u})`).call(Rx,c).call(Rx,n).node()}};kC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const MC=(t,e)=>{const{coordinate:n}=e;return(e,r,i)=>{const{color:o,text:a="",fontSize:s,rotate:c=0,transform:l=""}=r,u={text:String(a),stroke:o,fill:o,fontSize:s,textAlign:"center",textBaseline:"middle"},[[f,h]]=e;return zd(new Al).style("x",f).style("y",h).call(Rx,i).style("transformOrigin","center center").style("transform",`${l}rotate(${c}deg)`).style("coordCenter",n.getCenter()).call(Rx,u).call(Rx,t).node()}};MC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _C=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(bT))return[t,e];const r=Array.isArray(n[0])?n:[n],i=r.map((t=>t[0])),o=r.map((t=>t[1]));return[t,Jh({},e,{encode:{x:hT(i),y:hT(o)}})]};_C.props={};var EC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const SC=()=>(t,e)=>{const{data:n,style:r={}}=e,i=EC(e,["data","style"]),{x:o,y:a}=r,s=EC(r,["x","y"]);if(null==o||null==a)return[t,e];const c=a||0;return[[0],Jh({},i,{data:[0],cartesian:!0,encode:{x:hT([o||0]),y:hT([c])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};SC.props={};const AC={text:xC,badge:kC,tag:MC},jC=t=>{const{cartesian:e=!1}=t;return e?HT:(e,n,r,i)=>{const{x:o,y:a}=r,s=qT(n,r,t),c=Array.from(e,(t=>{const e=[+o[t],+a[t]];return[i.map(s(e,t))]}));return[e,c]}};jC.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:AC,channels:[...FT({shapes:Object.keys(AC)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...$T(),{type:_C},{type:SC}],postInference:[...zT()]};const TC=()=>(t,e)=>[t,Jh({scale:{x:{padding:0},y:{padding:0}}},e)];TC.props={};const PC={cell:OT,hollow:kT},CC=()=>(t,e,n,r)=>{const{x:i,y:o}=n,a=e.x,s=e.y,c=Array.from(t,(t=>{const e=a.getBandWidth(a.invert(+i[t])),n=s.getBandWidth(s.invert(+o[t])),c=+i[t],l=+o[t];return[[c,l],[c+e,l],[c+e,l+n],[c,l+n]].map((t=>r.map(t)))}));return[t,c]};function RC(t,e,n){var r=null,i=$x(!0),o=null,a=qx,s=null,c=Jx(l);function l(l){var u,f,h,d,p,g=(l=Wx(l)).length,y=!1,v=new Array(g),m=new Array(g);for(null==o&&(s=a(p=c())),u=0;u<=g;++u){if(!(u<g&&i(d=l[u],u,l))===y)if(y=!y)f=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=f;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}y&&(v[u]=+t(d,u,l),m[u]=+e(d,u,l),s.point(r?+r(d,u,l):v[u],n?+n(d,u,l):m[u]))}if(p)return s=null,p+""||null}function u(){return nw().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?tw:$x(+t),e="function"==typeof e?e:$x(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?ew:$x(+n),l.x=function(e){return arguments.length?(t="function"==typeof e?e:$x(+e),r=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:$x(+e),l):t},l.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:$x(+t),l):r},l.y=function(t){return arguments.length?(e="function"==typeof t?t:$x(+t),n=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:$x(+t),l):e},l.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:$x(+t),l):n},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(n)},l.lineX1=function(){return u().x(r).y(e)},l.defined=function(t){return arguments.length?(i="function"==typeof t?t:$x(!!t),l):i},l.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),l):a},l.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),l):o},l}CC.props={defaultShape:"cell",defaultLabelShape:"label",shape:PC,composite:!1,channels:[...FT({shapes:Object.keys(PC)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...$T(),{type:wT},{type:yC},{type:TC}],postInference:[...zT()]};var LC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const NC=rw((t=>{const{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;zd(t).maybeAppend("connect-path",(()=>o.createElement("path",{}))).style("d",n).call(Rx,i),zd(t).maybeAppend("area-path",(()=>o.createElement("path",{}))).style("d",e).call(Rx,r)})),IC=(t,e)=>{const{curve:n,gradient:r=!1,defined:i=(t=>!Number.isNaN(t)&&null!=t),connect:o=!1}=t,a=LC(t,["curve","gradient","defined","connect"]),{coordinate:s,document:c}=e;return(t,e,l)=>{const{color:u}=l,{color:f=u,seriesColor:h,seriesX:d,seriesY:p}=e,g=kg(s),y=Fx(s,e),v=r&&h?Nx(h,d,p,r,void 0,g):f,m=Object.assign(Object.assign(Object.assign(Object.assign({},l),{stroke:v,fill:v}),y&&{transform:y}),a),[b,x]=function(t,e){const n=[],r=[],i=[];let o=!1,a=null;const s=t.length/2;for(let c=0;c<s;c++){const l=t[c],u=t[c+s];if([...l,...u].some((t=>!e(t))))o=!0;else{if(n.push(l),r.push(u),o&&a){o=!1;const[t,e]=a;i.push([t,l,e,u])}a=[l,u]}}return[n.concat(r),i]}(t,i),w=Rd(m,"connect"),O=!!x.length,k=t=>zd(c.createElement("path",{})).style("d",t||"").call(Rx,m).node();if(Mg(s)){const e=t=>{const e=s.getCenter(),r=t.slice(0,t.length/2),o=t.slice(t.length/2);return function(){var t=RC().curve(nP),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return 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 oP(n())},delete t.lineX0,t.lineEndAngle=function(){return oP(r())},delete t.lineX1,t.lineInnerRadius=function(){return oP(i())},delete t.lineY0,t.lineOuterRadius=function(){return oP(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(iP(t)):e()._curve},t}().angle(((t,n)=>jx(_x(r[n],e)))).outerRadius(((t,n)=>Sx(r[n],e))).innerRadius(((t,n)=>Sx(o[n],e))).defined(((t,e)=>[...r[e],...o[e]].every(i))).curve(n)(o)};return!O||o&&!Object.keys(w).length?k(e(b)):O&&!o?k(e(t)):zd(new NC).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node()}{const e=t=>{const e=t.slice(0,t.length/2),r=t.slice(t.length/2);return g?RC().y(((t,n)=>e[n][1])).x1(((t,n)=>e[n][0])).x0(((t,e)=>r[e][0])).defined(((t,n)=>[...e[n],...r[n]].every(i))).curve(n)(e):RC().x(((t,n)=>e[n][0])).y1(((t,n)=>e[n][1])).y0(((t,e)=>r[e][1])).defined(((t,n)=>[...e[n],...r[n]].every(i))).curve(n)(e)};return!O||o&&!Object.keys(w).length?k(e(b)):O&&!o?k(e(t)):zd(new NC).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node()}}};IC.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const DC=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Mg(n)?ET:qx;return IC(Object.assign({curve:i},t),e)(...r)}};DC.props=Object.assign(Object.assign({},IC.props),{defaultMarker:"square"});var BC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const FC=(t,e)=>{const n=BC(t,[]),{coordinate:r}=e;return(...t)=>{const i=Mg(r)?yP:kg(r)?_P:MP;return IC(Object.assign({curve:i},n),e)(...t)}};FC.props=Object.assign(Object.assign({},IC.props),{defaultMarker:"smooth"});const zC=(t,e)=>(...n)=>IC(Object.assign({curve:jP},t),e)(...n);zC.props=Object.assign(Object.assign({},IC.props),{defaultMarker:"hvh"});const ZC=(t,e)=>(...n)=>IC(Object.assign({curve:TP},t),e)(...n);ZC.props=Object.assign(Object.assign({},IC.props),{defaultMarker:"vh"});const WC=(t,e)=>(...n)=>IC(Object.assign({curve:PP},t),e)(...n);WC.props=Object.assign(Object.assign({},IC.props),{defaultMarker:"hv"});const $C={area:DC,smooth:FC,hvh:zC,vh:ZC,hv:WC},GC=()=>(t,e,n,r)=>{var i,o;const{x:a,y:s,y1:c,series:l}=n,{x:u,y:f}=e,h=l?Array.from(Gh(t,(t=>l[t])).values()):[t],d=h.map((t=>t[0])).filter((t=>void 0!==t)),p=((null===(i=null==u?void 0:u.getBandWidth)||void 0===i?void 0:i.call(u))||0)/2,g=((null===(o=null==f?void 0:f.getBandWidth)||void 0===o?void 0:o.call(f))||0)/2,y=Array.from(h,(t=>{const e=t.length,n=new Array(2*e);for(let i=0;i<t.length;i++){const o=t[i];n[i]=r.map([+a[o]+p,+s[o]+g]),n[e+i]=r.map([+a[o]+p,+c[o]+g])}return n}));return[d,y,h]};GC.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:$C,channels:[...FT({shapes:Object.keys($C)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...$T(),{type:FP},{type:xT},{type:TC}],postInference:[...ZT()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const qC=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[i]=vT(n,"y");return[t,Jh({},e,{encode:{y1:hT([...i])}})]};qC.props={};const YC=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[i]=vT(n,"x");return[t,Jh({},e,{encode:{x1:hT([...i])}})]};YC.props={};var HC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const VC=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,i=HC(t,["arrow","arrowSize"]),{document:o}=e;return(t,e,a)=>{const{defaultColor:s}=a,c=HC(a,["defaultColor"]),{color:l=s,transform:u}=e,[f,h]=t,d=Qx();if(d.moveTo(...f),d.lineTo(...h),n){const[t,e]=function(t,e,n){const{arrowSize:r}=n,i="string"==typeof r?+parseFloat(r)/100*Sx(t,e):r,o=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),s=Math.PI/2-a-o,c=a-o;return[[e[0]-i*Math.sin(s),e[1]-i*Math.cos(s)],[e[0]-i*Math.cos(c),e[1]-i*Math.sin(c)]]}(f,h,{arrowSize:r});d.moveTo(...t),d.lineTo(...h),d.lineTo(...e)}return zd(o.createElement("path",{})).call(Rx,c).style("d",d.toString()).style("stroke",l).style("transform",u).call(Rx,i).node()}};VC.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const UC=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>VC(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};UC.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var XC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const KC=(t,e)=>{const n=XC(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{const{color:a}=o,s=XC(o,["color"]),{color:c=a,transform:l}=e,[u,f]=t,h=Qx();if(h.moveTo(u[0],u[1]),Mg(r)){const t=r.getCenter();h.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{Lx(h,u,f,Cx(u,f),Sx(u,f)/2)}return zd(i.createElement("path",{})).call(Rx,s).style("d",h.toString()).style("stroke",c).style("transform",l).call(Rx,n).node()}};KC.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var QC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const JC=(t,e)=>{const n=QC(t,[]),{document:r}=e;return(t,e,i)=>{const{color:o}=i,a=QC(i,["color"]),{color:s=o,transform:c}=e,[l,u]=t,f=Qx();return f.moveTo(l[0],l[1]),f.bezierCurveTo(l[0]/2+u[0]/2,l[1],l[0]/2+u[0]/2,u[1],u[0],u[1]),zd(r.createElement("path",{})).call(Rx,a).style("d",f.toString()).style("stroke",s).style("transform",c).call(Rx,n).node()}};JC.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var tR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const eR=(t,e)=>{const{cornerRatio:n=1/3}=t,r=tR(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{const{defaultColor:s}=a,c=tR(a,["defaultColor"]),{color:l=s,transform:u}=e,[f,h]=t,d=function(t,e,n,r){const i=Qx();if(Mg(n)){const o=n.getCenter(),a=Sx(t,o),s=(Sx(e,o)-a)*r+a;return i.moveTo(t[0],t[1]),Lx(i,t,e,o,s),i.lineTo(e[0],e[1]),i}return kg(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1]),i.lineTo(e[0],e[1]),i):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],e[1]),i)}(f,h,i,n);return zd(o.createElement("path",{})).call(Rx,c).style("d",d.toString()).style("stroke",l).style("transform",u).call(Rx,r).node()}};eR.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nR={link:UC,arc:KC,smooth:JC,vhv:eR},rR=t=>(e,n,r,i)=>{const{x:o,y:a,x1:s=o,y1:c=a}=r,l=qT(n,r,t),u=e.map((t=>[i.map(l([+o[t],+a[t]],t)),i.map(l([+s[t],+c[t]],t))]));return[e,u]};rR.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:nR,channels:[...FT({shapes:Object.keys(nR)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...$T(),{type:qC},{type:YC}],postInference:[...zT()]};var iR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const oR=(t,e)=>{const{coordinate:n,document:r}=e;return(e,i,o)=>{const{color:a}=o,s=iR(o,["color"]),{color:c=a,src:l="",size:u=32,transform:f=""}=i;let{width:h=u,height:d=u}=t;const[[p,g]]=e,[y,v]=n.getSize();h="string"==typeof h?YT(h)*y:h,d="string"==typeof d?YT(d)*v:d;const m=p-Number(h)/2,b=g-Number(d)/2;return zd(r.createElement("image",{})).call(Rx,s).style("x",m).style("y",b).style("src",l).style("stroke",c).style("transform",f).call(Rx,t).style("width",h).style("height",d).node()}};oR.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const aR={image:oR},sR=t=>{const{cartesian:e}=t;return e?HT:(e,n,r,i)=>{const{x:o,y:a}=r,s=qT(n,r,t),c=Array.from(e,(t=>{const e=[+o[t],+a[t]];return[i.map(s(e,t))]}));return[e,c]}};sR.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:aR,channels:[...FT({shapes:Object.keys(aR)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...$T(),{type:_C},{type:SC}],postInference:[...zT()]};var cR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const lR=(t,e)=>{const{coordinate:n,document:r}=e;return(e,i,o)=>{const{color:a}=o,s=cR(o,["color"]),{color:c=a,transform:l}=i,u=function(t,e){const n=Qx();if(Mg(e)){const r=e.getCenter(),i=[...t,t[0]],o=i.map((t=>Sx(t,r)));return i.forEach(((e,i)=>{if(0===i)return void n.moveTo(e[0],e[1]);const a=o[i],s=t[i-1],c=o[i-1];void 0!==c&&Math.abs(a-c)<1e-10?Lx(n,s,e,r,a):n.lineTo(e[0],e[1])})),n.closePath(),n}return function(t,e){return e.forEach(((e,n)=>0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1]))),t.closePath(),t}(n,t)}(e,n);return zd(r.createElement("path",{})).call(Rx,s).style("d",u.toString()).style("stroke",c).style("fill",c).style("transform",l).call(Rx,t).node()}};lR.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var uR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const fR=(t,e)=>{const n=uR(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{const{color:a}=o,s=uR(o,["color"]),{color:c=a,transform:l}=e,u=function(t,e){const[n,r,i,o]=t,a=Qx();if(Mg(e)){const t=e.getCenter(),s=Sx(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),Lx(a,i,o,t,s),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),Lx(a,r,n,t,s),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return zd(i.createElement("path",{})).call(Rx,s).style("d",u.toString()).style("fill",c||a).style("stroke",c||a).style("transform",l).call(Rx,n).node()}};fR.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const hR={polygon:lR,ribbon:fR},dR=()=>(t,e,n,r)=>{const i=Object.entries(n).filter((([t])=>t.startsWith("x"))).map((([,t])=>t)),o=Object.entries(n).filter((([t])=>t.startsWith("y"))).map((([,t])=>t)),a=t.map((t=>{const e=[];for(let n=0;n<i.length;n++){const a=i[n][t];if(void 0===a)break;const s=o[n][t];e.push(r.map([+a,+s]))}return e}));return[t,a]};dR.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:hR,channels:[...FT({shapes:Object.keys(hR)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...$T()],postInference:[...zT()]};var pR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const gR=(t,e)=>{const{coordinate:n,document:r}=e;return(e,i,o)=>{const{color:a,transform:s}=i,{color:c,fill:l=c,stroke:u=c}=o,f=pR(o,["color","fill","stroke"]),h=function(t,e){const n=Qx();if(Mg(e)){const r=e.getCenter(),[i,o]=r,a=Ax(_x(t[0],r)),s=Ax(_x(t[1],r)),c=Sx(r,t[2]),l=Sx(r,t[3]),u=Sx(r,t[8]),f=Sx(r,t[10]),h=Sx(r,t[11]);n.moveTo(...t[0]),n.arc(i,o,c,a,s),n.arc(i,o,c,s,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,o,l,a,s),n.lineTo(...t[6]),n.arc(i,o,f,s,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,o,u,a,s),n.arc(i,o,u,s,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,o,h,a,s),n.arc(i,o,h,s,a,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return zd(r.createElement("path",{})).call(Rx,f).style("d",h.toString()).style("stroke",u).style("fill",a||l).style("transform",s).call(Rx,t).node()}};gR.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var yR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const vR=(t,e)=>{const{coordinate:n,document:r}=e;return(e,i,o)=>{const{color:a,transform:s}=i,{color:c,fill:l=c,stroke:u=c}=o,f=yR(o,["color","fill","stroke"]),h=function(t,e,n=4){const r=Qx();if(!Mg(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;const i=e.getCenter(),[o,a]=i,s=Sx(i,t[3]),c=Sx(i,t[8]),l=Sx(i,t[10]),u=Ax(_x(t[2],i)),f=Math.asin(n/c),h=u-f,d=u+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(h)*s+o,Math.sin(h)*s+a),r.arc(o,a,s,h,d),r.lineTo(Math.cos(d)*l+o,Math.sin(d)*l+a),r.arc(o,a,l,d,h,!0),r.lineTo(Math.cos(h)*s+o,Math.sin(h)*s+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);const p=(h+d)/2;return r.moveTo(Math.cos(p)*(c+n/2)+o,Math.sin(p)*(c+n/2)+a),r.arc(Math.cos(p)*c+o,Math.sin(p)*c+a,n/2,p,2*Math.PI+p),r.closePath(),r}(e,n,4);return zd(r.createElement("path",{})).call(Rx,f).style("d",h.toString()).style("stroke",u).style("fill",a||l).style("transform",s).call(Rx,t).node()}};vR.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const mR={box:gR,violin:vR},bR=()=>(t,e,n,r)=>{const{x:i,y:o,y1:a,y2:s,y3:c,y4:l,series:u}=n,f=e.x,h=e.series,d=Array.from(t,(t=>{const e=f.getBandWidth(f.invert(+i[t])),n=e*(h?h.getBandWidth(h.invert(+(null==u?void 0:u[t]))):1),d=(+(null==u?void 0:u[t])||0)*e,p=+i[t]+d+n/2,[g,y,v,m,b]=[+o[t],+a[t],+s[t],+c[t],+l[t]];return[[p-n/2,b],[p+n/2,b],[p,b],[p,m],[p-n/2,m],[p+n/2,m],[p+n/2,y],[p-n/2,y],[p-n/2,v],[p+n/2,v],[p,y],[p,g],[p-n/2,g],[p+n/2,g]].map((t=>r.map(t)))}));return[t,d]};bR.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:mR,channels:[...FT({shapes:Object.keys(mR)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...$T(),{type:wT}],postInference:[...ZT()],interaction:{shareTooltip:!0}};const xR={vector:VC},wR=()=>(t,e,n,r)=>{const{x:i,y:o,size:a,rotate:s}=n,[c,l]=r.getSize(),u=t.map((t=>{const e=+s[t]/180*Math.PI,n=+a[t],u=n/l,f=n/c*Math.cos(e),h=-u*Math.sin(e);return[r.map([+i[t]-f/2,+o[t]-h/2]),r.map([+i[t]+f/2,+o[t]+h/2])]}));return[t,u]};wR.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:xR,channels:[...FT({shapes:Object.keys(xR)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...$T()],postInference:[...zT()]};var OR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const kR=(t,e)=>{const{arrow:n,arrowSize:r=4}=t,i=OR(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,s)=>{const{color:c,lineWidth:l}=s,u=OR(s,["color","lineWidth"]),{color:f=c,size:h=l}=e,d=n?function(t,e,n){return t.createElement("path",{style:Object.assign({d:`M ${e},${e} L -${e},0 L ${e},-${e} L 0,0 Z`,transformOrigin:"center"},n)})}(a,r,Object.assign({fill:i.stroke||f,stroke:i.stroke||f},Rd(i,"arrow"))):null,p=function(t,e){if(!Mg(e))return nw().x((t=>t[0])).y((t=>t[1]))(t);const n=e.getCenter();return MO()({startAngle:0,endAngle:2*Math.PI,outerRadius:Sx(t[0],n),innerRadius:Sx(t[1],n)})}(t,o),g=function(t,e){if(!Mg(t))return e;const[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return zd(a.createElement("path",{})).call(Rx,u).style("d",p).style("stroke",f).style("lineWidth",h).style("transform",g).style("markerEnd",d).call(Rx,i).node()}};kR.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const MR=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(bT)?[t,e]:[t,Jh({},e,{encode:{x:hT(n)}})]};MR.props={};const _R={line:kR},ER=t=>(e,n,r,i)=>{const{x:o}=r,a=qT(n,r,Jh({style:{bandOffset:0}},t)),s=Array.from(e,(t=>[[o[t],1],[o[t],0]].map((e=>i.map(a(e,t))))));return[e,s]};ER.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:_R,channels:[...WT({shapes:Object.keys(_R)}),{name:"x",required:!0}],preInference:[...$T(),{type:MR}],postInference:[]};const SR=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(bT)?[t,e]:[t,Jh({},e,{encode:{y:hT(n)}})]};SR.props={};const AR={line:kR},jR=t=>(e,n,r,i)=>{const{y:o}=r,a=qT(n,r,Jh({style:{bandOffset:0}},t)),s=Array.from(e,(t=>[[0,o[t]],[1,o[t]]].map((e=>i.map(a(e,t))))));return[e,s]};jR.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:AR,channels:[...WT({shapes:Object.keys(AR)}),{name:"y",required:!0}],preInference:[...$T(),{type:SR}],postInference:[]};var TR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function PR(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}const CR=(t,e)=>{const{offsetX:n=0,sourceOffsetX:r=n,targetOffsetX:i=n,offsetY:o=0,sourceOffsetY:a=o,targetOffsetY:s=o,connectLength1:c,endMarker:l=!0}=t,u=TR(t,["offsetX","sourceOffsetX","targetOffsetX","offsetY","sourceOffsetY","targetOffsetY","connectLength1","endMarker"]),{coordinate:f}=e;return(t,e,n)=>{const{color:o,connectLength1:h}=n,d=TR(n,["color","connectLength1"]),{color:p,transform:g}=e,y=function(t,e,n,r,i,o,a=0){const[[s,c],[l,u]]=e;if(kg(t)){const t=s+n,e=t+a,f=c+i,h=u+o;return[[t,f],[e,f],[e,h],[l+r,h]]}const f=c-n,h=f-a,d=s-i,p=l-o;return[[d,f],[d,h],[p,h],[p,u-r]]}(f,t,a,s,r,i,null!=c?c:h),v=Rd(Object.assign(Object.assign({},u),n),"endMarker");return zd(new wl).call(Rx,d).style("d",function(t){return nw().x((t=>t[0])).y((t=>t[1]))(t)}(y)).style("stroke",p||o).style("transform",g).style("markerEnd",l?new Ab({className:"marker",style:Object.assign(Object.assign({},v),{symbol:PR})}):null).call(Rx,u).node()}};CR.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const RR={connector:CR},LR=(...t)=>rR(...t);function NR(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[`${t}1`]:o}=n;return t=>{var e;const n=(null===(e=r.getBandWidth)||void 0===e?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+n]}}function IR(t={}){const{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{const a=NR("x",e,i,r.x),s=NR("y",n,i,r.y),c=Array.from(t,(t=>{const[e,n]=a(t),[r,i]=s(t);return[[e,r],[n,r],[n,i],[e,i]].map((t=>o.map(t)))}));return[t,c]}}LR.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:RR,channels:[...WT({shapes:Object.keys(RR)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...$T()],postInference:[]};const DR={range:OT},BR=()=>IR();BR.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:DR,channels:[...WT({shapes:Object.keys(DR)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...$T()],postInference:[]};const FR=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(bT))){const r=(t,e)=>Array.isArray(t[0])?t.map((t=>t[e])):[t[e]];return[t,Jh({},e,{encode:{x:hT(r(n,0)),x1:hT(r(n,1))}})]}return[t,e]};FR.props={};const zR={range:OT},ZR=()=>IR({extendY:!0});ZR.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:zR,channels:[...WT({shapes:Object.keys(zR)}),{name:"x",required:!0}],preInference:[...$T(),{type:FR}],postInference:[]};const WR=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(bT))){const r=(t,e)=>Array.isArray(t[0])?t.map((t=>t[e])):[t[e]];return[t,Jh({},e,{encode:{y:hT(r(n,0)),y1:hT(r(n,1))}})]}return[t,e]};WR.props={};const $R={range:OT},GR=()=>IR({extendX:!0});GR.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:$R,channels:[...WT({shapes:Object.keys($R)}),{name:"y",required:!0}],preInference:[...$T(),{type:WR}],postInference:[]};var qR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const YR=(t,e)=>{const{arrow:n,colorAttribute:r}=t,i=qR(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{const{color:s,stroke:c}=n,l=qR(n,["color","stroke"]),{d:u,color:f=s}=e,[h,d]=o.getSize();return zd(a.createElement("path",{})).call(Rx,l).style("d","function"==typeof u?u({width:h,height:d}):u).style(r,f).call(Rx,i).node()}};YR.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const HR=(t,e)=>YR(Object.assign({colorAttribute:"fill"},t),e);HR.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const VR=(t,e)=>YR(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);VR.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const UR={path:HR,hollow:VR},XR=t=>(t,e,n,r)=>[t,t.map((()=>[[0,0]]))];XR.props={defaultShape:"path",defaultLabelShape:"label",shape:UR,composite:!1,channels:[...FT({shapes:Object.keys(UR)}),{name:"d",scale:"identity"}],preInference:[...$T()],postInference:[]};var KR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const QR=(t,e)=>{const{render:n}=t,r=KR(t,["render"]);return t=>{const[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};QR.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const JR=()=>(t,e)=>{const{style:n={}}=e;return[t,Jh({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter((([,t])=>"function"==typeof t)).map((([t,e])=>[t,()=>e]))))})]};JR.props={};const tL=t=>{const{cartesian:e}=t;return e?HT:(e,n,r,i)=>{const{x:o,y:a}=r,s=qT(n,r,t),c=Array.from(e,(t=>{const e=[+o[t],+a[t]];return[i.map(s(e,t))]}));return[e,c]}};tL.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:QR},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...$T(),{type:_C},{type:SC},{type:JR}]};var eL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const nL=(t,e)=>{const{document:n}=e;return(e,r,i)=>{const{transform:o}=r,{color:a}=i,s=eL(i,["color"]),{color:c=a}=r,[l,...u]=e,f=Qx();return f.moveTo(...l),u.forEach((([t,e])=>{f.lineTo(t,e)})),f.closePath(),zd(n.createElement("path",{})).call(Rx,s).style("d",f.toString()).style("stroke",c||a).style("fill",c||a).style("fillOpacity",.4).style("transform",o).call(Rx,t).node()}};nL.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const rL={density:nL},iL=()=>(t,e,n,r)=>{const{x:i,series:o}=n,a=Object.entries(n).filter((([t])=>t.startsWith("y"))).map((([,t])=>t)),s=Object.entries(n).filter((([t])=>t.startsWith("size"))).map((([,t])=>t));if(void 0===i||void 0===a||void 0===s)throw new Error("Missing encode for x or y or size channel.");const c=e.x,l=e.series,u=Array.from(t,(e=>{const n=c.getBandWidth(c.invert(+i[e])),u=n*(l?l.getBandWidth(l.invert(+(null==o?void 0:o[e]))):1),f=(+(null==o?void 0:o[e])||0)*n,h=+i[e]+f+u/2;return[...a.map(((n,r)=>[h+ +s[r][e]/t.length,+a[r][e]])),...a.map(((n,r)=>[h-+s[r][e]/t.length,+a[r][e]])).reverse()].map((t=>r.map(t)))}));return[t,u]};function oL(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}iL.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:rL,channels:[...FT({shapes:Object.keys(rL)}),{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:[...$T(),{type:xT},{type:wT}],postInference:[...ZT()],interaction:{shareTooltip:!0}};const aL=Fp(((t,e,n)=>{const r=oL(n,2*t,2*t),i=r.getContext("2d"),o=t,a=t;if(1===e)i.beginPath(),i.arc(o,a,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{const n=i.createRadialGradient(o,a,t*e,o,a,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=n,i.fillRect(0,0,2*t,2*t)}return r}),(t=>`${t}`));function sL(t,e,n,r,i,o,a){const s=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)"]]},o);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const c=oL(a,t,e).getContext("2d"),l=function(t,e){const n=oL(e,256,1).getContext("2d"),r=n.createLinearGradient(0,0,256,1);return function(t){return"string"==typeof t?t.split(" ").map((t=>{const[e,n]=t.split(":");return[+e,n]})):t}(t).forEach((([t,e])=>{r.addColorStop(t,e)})),n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}(s.gradient,a);c.clearRect(0,0,t,e),function(t,e,n,r,i,o){const{blur:a}=i;let s=r.length;for(;s--;){const{x:i,y:c,value:l,radius:u}=r[s],f=Math.min(l,n),h=i-u,d=c-u,p=aL(u,1-a,o),g=(f-e)/(n-e);t.globalAlpha=Math.max(g,.001),t.drawImage(p,h,d)}}(c,n,r,i,s,a);const u=function(t,e,n,r,i){const{minOpacity:o,opacity:a,maxOpacity:s,useGradientOpacity:c}=i,l=e,u=n,f=t.getImageData(0,0,l,u),h=f.data,d=h.length;for(let t=3;t<d;t+=4){const e=h[t],n=4*e;if(!n)continue;const i=a||Math.max(0,Math.min(s,Math.max(o,e)));h[t-3]=r[n],h[t-2]=r[n+1],h[t-1]=r[n+2],h[t]=c?r[n+3]:i}return f}(c,t,e,l,s),f=oL(a,t,e).getContext("2d");return f.putImageData(u,0,0),f}var cL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const lL=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:s}=t,c=cL(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:l,createCanvas:u,document:f}=e;return(t,e,h)=>{const{transform:d}=e,[p,g]=l.getSize(),y=t.map((t=>({x:t[0],y:t[1],value:t[2],radius:t[3]}))),v=KE(t,(t=>t[2])),m=dg(t,(t=>t[2])),b=p&&g?sL(p,g,v,m,y,function(t,e){return Object.keys(t).reduce(((n,r)=>{const i=t[r];return e(i,r)||(n[r]=i),n}),{})}({gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:s},(t=>void 0===t)),u):{canvas:null};return zd(f.createElement("image",{})).call(Rx,h).style("x",0).style("y",0).style("width",p).style("height",g).style("src",b.canvas.toDataURL()).style("transform",d).call(Rx,c).node()}};lL.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const uL={heatmap:lL},fL=t=>(t,e,n,r)=>{const{x:i,y:o,size:a,color:s}=n,c=Array.from(t,(t=>{const e=a?+a[t]:40;return[...r.map([+i[t],+o[t]]),s[t],e]}));return[[0],[c]]};fL.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:uL,channels:[...FT({shapes:Object.keys(uL)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...$T(),{type:wT},{type:yC}],postInference:[...zT()]};var hL=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},dL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const pL=(t,e)=>hL(void 0,void 0,void 0,(function*(){const{width:n,height:r}=e,{data:i,encode:o={},scale:a,style:s={},layout:c={}}=t,l=dL(t,["data","encode","scale","style","layout"]),u=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]})))}(i,o);return Jh({},{axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size",shape:"tag"},scale:{x:{range:[0,1]},y:{range:[0,1]}},style:{fontFamily:t=>t.fontFamily},tooltip:{items:[t=>({name:t.text,value:t.value})]}},Object.assign(Object.assign({data:{value:u,transform:[Object.assign({type:"wordCloud",size:[n,r]},c)]},encode:o,scale:a,style:s},l),{axis:!1}))}));pL.props={};var gL={value:function(){}};function yL(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new vL(r)}function vL(t){this._=t}function mL(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function bL(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function xL(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=gL,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}vL.prototype=yL.prototype={constructor:vL,on:function(t,e){var n,r=this._,i=mL(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=xL(r[n],t.name,e);else if(null==e)for(n in r)r[n]=xL(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=bL(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new vL(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var wL,OL,kL=yL,ML=0,_L=0,EL=0,SL=0,AL=0,jL=0,TL="object"==typeof performance&&performance.now?performance:Date,PL="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function CL(){return AL||(PL(RL),AL=TL.now()+jL)}function RL(){AL=0}function LL(){this._call=this._time=this._next=null}function NL(t,e,n){var r=new LL;return r.restart(t,e,n),r}function IL(){AL=(SL=TL.now())+jL,ML=_L=0;try{!function(){CL(),++ML;for(var t,e=wL;e;)(t=AL-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ML}()}finally{ML=0,function(){var t,e,n=wL,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:wL=e);OL=t,BL(r)}(),AL=0}}function DL(){var t=TL.now(),e=t-SL;e>1e3&&(jL-=e,SL=t)}function BL(t){ML||(_L&&(_L=clearTimeout(_L)),t-AL>24?(t<1/0&&(_L=setTimeout(IL,t-TL.now()-jL)),EL&&(EL=clearInterval(EL))):(EL||(SL=TL.now(),EL=setInterval(DL,1e3)),ML=1,PL(IL)))}LL.prototype=NL.prototype={constructor:LL,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?CL():+n)+(null==e?0:+e),this._next||OL===this||(OL?OL._next=this:wL=this,OL=this),this._call=t,this._time=n,BL()},stop:function(){this._call&&(this._call=null,this._time=1/0,BL())}};const FL=4294967296;function zL(t){return t.x}function ZL(t){return t.y}var WL=Math.PI*(3-Math.sqrt(5));function $L(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,c=NL(f),l=kL("tick","end"),u=function(){let t=1;return()=>(t=(1664525*t+1013904223)%FL)/FL}();function f(){h(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function h(r){var c,l,u=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(o-n)*i,s.forEach((function(t){t(n)})),c=0;c<u;++c)null==(l=t[c]).fx?l.x+=l.vx*=a:(l.x=l.fx,l.vx=0),null==l.fy?l.y+=l.vy*=a:(l.y=l.fy,l.vy=0);return e}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),o=n*WL;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,u),e}return null==t&&(t=[]),d(),e={tick:h,restart:function(){return c.restart(f),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},randomSource:function(t){return arguments.length?(u=t,s.forEach(p),e):u},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,s,c,l=0,u=t.length;for(null==r?r=1/0:r*=r,l=0;l<u;++l)(a=(i=e-(s=t[l]).x)*i+(o=n-s.y)*o)<r&&(c=s,r=a);return c},on:function(t,n){return arguments.length>1?(l.on(t,n),e):l.on(t)}}}function GL(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,c,l,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,v=t._x1,m=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((l=e>=(o=(g+v)/2))?g=o:v=o,(u=n>=(a=(y+m)/2))?y=a:m=a,i=d,!(d=d[f=u<<1|l]))return i[f]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(l=e>=(o=(g+v)/2))?g=o:v=o,(u=n>=(a=(y+m)/2))?y=a:m=a}while((f=u<<1|l)==(h=(c>=a)<<1|s>=o));return i[h]=d,i[f]=p,t}function qL(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function YL(t){return t[0]}function HL(t){return t[1]}function VL(t,e,n){var r=new UL(null==e?YL:e,null==n?HL:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function UL(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function XL(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var KL=VL.prototype=UL.prototype;function QL(t){return function(){return t}}function JL(t){return 1e-6*(t()-.5)}function tN(t){return t.x+t.vx}function eN(t){return t.y+t.vy}function nN(t){var e,n,r,i=QL(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=QL(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:QL(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:QL(+e),a(),o):t},o}function rN(t){var e,n,r,i=QL(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=QL(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:QL(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:QL(+e),a(),o):t},o}KL.copy=function(){var t,e,n=new UL(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=XL(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=XL(e));return n},KL.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return GL(this.cover(e,n),e,n,t)},KL.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),c=1/0,l=1/0,u=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,s[n]=i,r<c&&(c=r),r>u&&(u=r),i<l&&(l=i),i>f&&(f=i));if(c>u||l>f)return this;for(this.cover(c,l).cover(u,f),n=0;n<o;++n)GL(this,a[n],s[n],t[n]);return this},KL.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,c=i-n||1,l=this._root;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,(a=new Array(4))[s]=l,l=a,c*=2,s){case 0:i=n+c,o=r+c;break;case 1:n=i-c,o=r+c;break;case 2:i=n+c,r=o-c;break;case 3:n=i-c,r=o-c}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},KL.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},KL.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},KL.find=function(t,e,n){var r,i,o,a,s,c,l,u=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new qL(g,u,f,h,d)),null==n?n=1/0:(u=t-n,f=e-n,h=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>h||(o=c.y0)>d||(a=c.x1)<u||(s=c.y1)<f))if(g.length){var y=(i+a)/2,v=(o+s)/2;p.push(new qL(g[3],y,v,a,s),new qL(g[2],i,v,y,s),new qL(g[1],y,o,a,v),new qL(g[0],i,o,y,v)),(l=(e>=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var m=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),x=m*m+b*b;if(x<n){var w=Math.sqrt(n=x);u=t-w,f=e-w,h=t+w,d=e+w,r=g.data}}return r},KL.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,c,l,u,f,h,d=this._root,p=this._x0,g=this._y0,y=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((l=o>=(s=(p+y)/2))?p=s:y=s,(u=a>=(c=(g+v)/2))?g=c:v=c,e=d,!(d=d[f=u<<1|l]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},KL.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},KL.root=function(){return this._root},KL.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},KL.visit=function(t){var e,n,r,i,o,a,s=[],c=this._root;for(c&&s.push(new qL(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&c.length){var l=(r+o)/2,u=(i+a)/2;(n=c[3])&&s.push(new qL(n,l,u,o,a)),(n=c[2])&&s.push(new qL(n,r,u,l,a)),(n=c[1])&&s.push(new qL(n,l,i,o,u)),(n=c[0])&&s.push(new qL(n,r,i,l,u))}return this},KL.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new qL(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,c=e.x1,l=e.y1,u=(a+c)/2,f=(s+l)/2;(o=i[0])&&n.push(new qL(o,a,s,u,f)),(o=i[1])&&n.push(new qL(o,u,s,c,f)),(o=i[2])&&n.push(new qL(o,a,f,u,l)),(o=i[3])&&n.push(new qL(o,u,f,c,l))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},KL.x=function(t){return arguments.length?(this._x=t,this):this._x},KL.y=function(t){return arguments.length?(this._y=t,this):this._y};const iN={hollow:HP,hollowDiamond:VP,hollowHexagon:UP,hollowSquare:XP,hollowTriangleDown:KP,hollowTriangle:QP,hollowBowtie:JP,hollowCircle:rC,point:iC,plus:oC,diamond:aC,square:sC,triangle:cC,hexagon:lC,cross:uC,bowtie:fC,hyphen:hC,line:dC,tick:pC,triangleDown:gC,circle:nC},oN=t=>(e,n,r,i)=>{const{x:o,y:a,size:s}=r;if(!o.length||!a.length)return[e,a.map((()=>[[]]))];const[c,l]=i.getSize(),u=qT(n,r,t),f=Array.from(e,(t=>({i:t,x:+o[t]*c,y:+a[t]*l,r:+s[t]||4}))),h=$L(f).stop().force("collide",function(t){var e,n,r,i=1,o=1;function a(){for(var t,a,c,l,u,f,h,d=e.length,p=0;p<o;++p)for(a=VL(e,tN,eN).visitAfter(s),t=0;t<d;++t)c=e[t],f=n[c.index],h=f*f,l=c.x+c.vx,u=c.y+c.vy,a.visit(g);function g(t,e,n,o,a){var s=t.data,d=t.r,p=f+d;if(!s)return e>l+p||o<l-p||n>u+p||a<u-p;if(s.index>c.index){var g=l-s.x-s.vx,y=u-s.y-s.vy,v=g*g+y*y;v<p*p&&(0===g&&(v+=(g=JL(r))*g),0===y&&(v+=(y=JL(r))*y),v=(p-(v=Math.sqrt(v)))/v*i,c.vx+=(g*=v)*(p=(d*=d)/(h+d)),c.vy+=(y*=v)*p,s.vx-=g*(p=1-p),s.vy-=y*p)}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function c(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=QL(null==t?1:+t)),a.initialize=function(t,n){e=t,r=n,c()},a.iterations=function(t){return arguments.length?(o=+t,a):o},a.strength=function(t){return arguments.length?(i=+t,a):i},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:QL(+e),c(),a):t},a}().radius((t=>t.r+1)).strength(1));h.force("x",nN((t=>t.x)).strength(.5)),h.force("y",rN((t=>t.y)).strength(5));for(let t=0;t<200;t++)h.tick();h.stop();const d=t=>{const e=f.find((e=>e.i===t));return[e.x/c,e.y/l]},p=s?Array.from(e,(t=>{const[e,n]=d(t),r=+s[t],o=r/c,a=r/l,f=[e-o,n-a],h=[e+o,n+a];return[i.map(u(f,t)),i.map(u(h,t))]})):Array.from(e,(t=>[i.map(u(d(t),t))]));return[e,p]};oN.props={defaultShape:"point",defaultLabelShape:"label",composite:!1,shape:iN,channels:[...FT({shapes:Object.keys(iN)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"}],preInference:[...$T(),{type:wT},{type:yC}],postInference:[{type:vC},...zT()]};const aN=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];aN.props={};const sN=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];sN.props={};const cN=t=>new sm(t);cN.props={};const lN=t=>new ud(t);lN.props={};const uN=t=>new dd(t);uN.props={};class fN extends od{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:ix}}map(t){return em(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new fN(this.options)}getTicks(){const{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return ze(r)&&ze(i)?n(r,i,e):[]}}const hN=t=>new fN(t);hN.props={};class dN extends dd{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:ad,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new dN(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const pN=t=>new dN(t);pN.props={};var gN=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,yN="\\d\\d?",vN="\\d\\d",mN="[^\\s]+",bN=/\[([^]*?)\]/gm;function xN(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var wN=function(t){return function(e,n){var r=n[t].map((function(t){return t.toLowerCase()})),i=r.indexOf(e.toLowerCase());return i>-1?i:null}};function ON(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o=i[r];for(var a in o)t[a]=o[a]}return t}var kN=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],MN=["January","February","March","April","May","June","July","August","September","October","November","December"],_N=xN(MN,3),EN={dayNamesShort:xN(kN,3),dayNames:kN,monthNamesShort:_N,monthNames:MN,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},SN=ON({},EN),AN=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},jN={D:function(t){return String(t.getDate())},DD:function(t){return AN(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return AN(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return AN(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return AN(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return AN(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return AN(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return AN(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return AN(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return AN(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return AN(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return AN(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+AN(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+AN(Math.floor(Math.abs(e)/60),2)+":"+AN(Math.abs(e)%60,2)}},TN=function(t){return+t-1},PN=[null,yN],CN=[null,mN],RN=["isPm",mN,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],LN=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?n:-n}return 0}],NN=(wN("monthNamesShort"),wN("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"}),IN=function(t,e,n){if(void 0===e&&(e=NN.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var r=[];e=(e=NN[e]||e).replace(bN,(function(t,e){return r.push(e),"@@@"}));var i=ON(ON({},SN),n);return(e=e.replace(gN,(function(e){return jN[e](t,i)}))).replace(/@@@/g,(function(){return r.shift()}))};const DN=1e3,BN=6e4,FN=36e5,zN=864e5,ZN=6048e5,WN=2592e6,$N=31536e6;function GN(t,e,n,r){const i=(t,i)=>{i&&((t,e)=>{const i=t=>r(t)%e==0;let o=e;for(;o&&!i(t);)n(t,-1),o-=1})(t,i),e(t)},o=(t,e)=>{const r=new Date(+t-1);return i(r,e),n(r,e),i(r),r};return{ceil:o,floor:(t,e)=>{const n=new Date(+t);return i(n,e),n},range:(t,e,r,a)=>{const s=[],c=Math.floor(r);for(let l=a?o(t,r):o(t);l<e;n(l,c),i(l))s.push(new Date(+l));return s},duration:t}}const qN=GN(1,(t=>t),((t,e=1)=>{t.setTime(+t+e)}),(t=>t.getTime())),YN=GN(DN,(t=>{t.setMilliseconds(0)}),((t,e=1)=>{t.setTime(+t+DN*e)}),(t=>t.getSeconds())),HN=GN(BN,(t=>{t.setSeconds(0,0)}),((t,e=1)=>{t.setTime(+t+BN*e)}),(t=>t.getMinutes())),VN=GN(FN,(t=>{t.setMinutes(0,0,0)}),((t,e=1)=>{t.setTime(+t+FN*e)}),(t=>t.getHours())),UN=GN(zN,(t=>{t.setHours(0,0,0,0)}),((t,e=1)=>{t.setTime(+t+zN*e)}),(t=>t.getDate()-1)),XN=GN(WN,(t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)}),(t=>t.getMonth())),KN=GN(ZN,(t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)}),((t,e=1)=>{t.setDate(t.getDate()+7*e)}),(t=>{const e=XN.floor(t),n=new Date(+t);return Math.floor((+n-+e)/ZN)})),QN=GN($N,(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e=1)=>{const n=t.getFullYear();t.setFullYear(n+e)}),(t=>t.getFullYear())),JN={millisecond:qN,second:YN,minute:HN,hour:VN,day:UN,week:KN,month:XN,year:QN},tI=GN(1,(t=>t),((t,e=1)=>{t.setTime(+t+e)}),(t=>t.getTime())),eI=GN(DN,(t=>{t.setUTCMilliseconds(0)}),((t,e=1)=>{t.setTime(+t+DN*e)}),(t=>t.getUTCSeconds())),nI=GN(BN,(t=>{t.setUTCSeconds(0,0)}),((t,e=1)=>{t.setTime(+t+BN*e)}),(t=>t.getUTCMinutes())),rI=GN(FN,(t=>{t.setUTCMinutes(0,0,0)}),((t,e=1)=>{t.setTime(+t+FN*e)}),(t=>t.getUTCHours())),iI=GN(zN,(t=>{t.setUTCHours(0,0,0,0)}),((t,e=1)=>{t.setTime(+t+zN*e)}),(t=>t.getUTCDate()-1)),oI=GN(WN,(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)}),(t=>t.getUTCMonth())),aI=GN(ZN,(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)}),((t,e=1)=>{t.setTime(+t+ZN*e)}),(t=>{const e=oI.floor(t),n=new Date(+t);return Math.floor((+n-+e)/ZN)})),sI=GN($N,(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e=1)=>{const n=t.getUTCFullYear();t.setUTCFullYear(n+e)}),(t=>t.getUTCFullYear())),cI={millisecond:tI,second:eI,minute:nI,hour:rI,day:iI,week:aI,month:oI,year:sI};function lI(t,e,n,r,i){const o=+t,a=+e,{tickIntervals:s,year:c,millisecond:l}=function(t){const e=t?cI:JN,{year:n,month:r,week:i,day:o,hour:a,minute:s,second:c,millisecond:l}=e;return{tickIntervals:[[c,1],[c,5],[c,15],[c,30],[s,1],[s,5],[s,15],[s,30],[a,1],[a,3],[a,6],[a,12],[o,1],[o,2],[i,1],[r,1],[r,3],[n,1]],year:n,millisecond:l}}(i),u=([t,e])=>t.duration*e,f=r?(a-o)/r:n||5,h=r||(a-o)/f,d=s.length,p=Yv(s,h,0,d,u);let g;if(p===d){g=[c,md(o/c.duration,a/c.duration,f)]}else if(p){const t=h/u(s[p-1])<u(s[p])/h,[e,n]=t?s[p-1]:s[p];g=[e,r?Math.ceil(r/e.duration):n]}else{g=[l,Math.max(md(o,a,f),1)]}return g}const uI=(t,e,n,r,i)=>{const o=t>e,a=o?e:t,s=o?t:e,[c,l]=lI(a,s,n,r,i),u=c.range(a,new Date(+s+1),l,!0);return o?u.reverse():u},fI=(t,e,n,r,i)=>{const o=t>e,a=o?e:t,s=o?t:e,[c,l]=lI(a,s,n,r,i),u=[c.floor(a,l),c.ceil(s,l)];return o?u.reverse():u};function hI(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class dI extends am{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:uI,interpolate:Kv,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return fI}getTickMethodOptions(){const{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:t,utc:e}=this.options,n=e?cI:JN,r=e?hI:$v;return e=>IN(r(e),t||function(t,e){const{second:n,minute:r,hour:i,day:o,week:a,month:s,year:c}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":o.floor(t)<t?"hh A":s.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new dI(this.options)}}const pI=t=>new dI(t);pI.props={};const gI=t=>e=>-t(-e),yI=(t,e)=>{const n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?gI(r):r},vI=(t,e)=>{const n=t===Math.E?Math.exp:e=>t**e;return e?gI(n):n},mI=(t,e,n,r=10)=>{const i=t<0,o=vI(r,i),a=yI(r,i),s=e<t,c=s?e:t,l=s?t:e;let u=a(c),f=a(l),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const t=o(u);for(let e=r-1;e>=1;e-=1){const n=t*e;if(n>l)break;n>=c&&h.push(n)}}else for(;u<=f;u+=1){const t=o(u);for(let e=1;e<r;e+=1){const n=t*e;if(n>l)break;n>=c&&h.push(n)}}2*h.length<n&&(h=bd(c,l,n))}else{const t=-1===n?f-u:Math.min(f-u,n);h=bd(u,f,t).map(o)}return s?h.reverse():h},bI=(t,e,n,r)=>{const i=t<0,o=yI(r,i),a=vI(r,i),s=t>e,c=s?e:t,l=s?t:e,u=[a(Math.floor(o(c))),a(Math.ceil(o(l)))];return s?u.reverse():u};class xI extends am{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Qv,tickMethod:mI,tickCount:5}}chooseNice(){return bI}getTickMethodOptions(){const{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){const{base:t,domain:e}=this.options,n=e[0]<0;return[yI(t,n),vI(t,n)]}clone(){return new xI(this.options)}}const wI=t=>new xI(t);wI.props={};const OI=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class kI extends am{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Qv,tickMethod:bd,tickCount:5}}constructor(t){super(t)}chooseTransforms(){const{exponent:t}=this.options;if(1===t)return[$v,$v];const e=.5===t?OI:(t=>e=>e<0?-((-e)**t):e**t)(t),n=(t=>e=>e<0?-((-e)**(1/t)):e**(1/t))(t);return[e,n]}clone(){return new kI(this.options)}}const MI=t=>new kI(t);MI.props={};class _I extends kI{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Qv,tickMethod:bd,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new _I(this.options)}}const EI=t=>new _I(t);EI.props={};const SI=t=>new Yb(t);SI.props={};const AI=t=>new sx(t);AI.props={};const jI=t=>new ox(t);jI.props={};var TI,PI=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};let CI=TI=class extends sm{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:$v,tickMethod:bd,tickCount:5}}constructor(t){super(t)}clone(){return new TI(this.options)}};CI=TI=PI([function(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();const[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){const{interpolator:e}=this.options;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){const{domain:r,interpolator:i,round:o}=this.getOptions(),a=e(r.map(t)),s=o?(t=>e=>{const n=t(e);return ze(n)?Math.round(n):n})(i):i;this.output=qv(s,a,n,t)},n.prototype.invert=void 0}}((function(t){return[t(0),t(1)]}),(t=>{const[e,n]=t;return qv(Kv(0,1),Gv(e,n))}))],CI);const RI=t=>new CI(t);RI.props={};const LI=t=>new xd(t);function NI({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:o,padding2:a,padding3:s,alpha90:c,alpha65:l,alpha45:u,alpha25:f,alpha10:h,category10:d,category20:p,sizeDefault:g=1,padding:y="auto",margin:v=16}){return{padding:y,margin:v,size:g,color:t,category10:d,category20:p,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},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:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,lineWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,lineWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:h,labelAlign:"horizontal",labelFill:e,labelOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:o,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:u,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:u,titleFill:e,titleOpacity:c,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom",titleTransform:"translate(0, 8)"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransform:"rotate(-90) translate(0, -8)",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:c,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,focusMarkerSize:12,itemSpacing:[o,o,o/2],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:o,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:u,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:c,tickStroke:e,tickStrokeOpacity:u},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:e,titleFillOpacity:c,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:l,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"},tooltip:{css:{".g2-tooltip":{"font-family":"sans-serif"}}}}}LI.props={};const II=NI({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),DI=t=>Jh({},II,t);DI.props={};const BI=t=>Jh({},DI(),{category10:"category10",category20:"category20"},t);BI.props={};const FI=NI({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),zI=t=>Jh({},FI,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{".g2-tooltip":{background:"#1f1f1f",opacity:.95},".g2-tooltip-title":{color:"#A6A6A6"},".g2-tooltip-list-item-name-label":{color:"#A6A6A6"},".g2-tooltip-list-item-value":{color:"#A6A6A6"}}}},t),ZI=t=>Object.assign({},zI(),{category10:"category10",category20:"category20"},t);ZI.props={};const WI=NI({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),$I=t=>Jh({},WI,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(t,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);$I.props={};const GI=t=>(...e)=>{const n=Nm(Object.assign({},{crossPadding:50},t))(...e);return Am(n,t),n};GI.props=Object.assign(Object.assign({},Nm.props),{defaultPosition:"bottom"});const qI=t=>(...e)=>{const n=Nm(Object.assign({},{crossPadding:10},t))(...e);return Am(n,t),n};qI.props=Object.assign(Object.assign({},Nm.props),{defaultPosition:"left"});var YI=function(){};var HI,VI=Jg({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),UI=function(t){function e(e){var n=t.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:Eb(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new pl({class:VI.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new pl({class:VI.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){var t=this.attributes.defaultPage;return Ge(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t=this.pageViews,e=(0,qe.CR)(function(t){var e;return(null===(e=t[0])||void 0===e?void 0:e.map((function(e,n){return t.map((function(t){return t[n]}))})))||[]}(t.map((function(t){var e=t.getBBox();return[e.width,e.height]}))).map((function(t){return Math.max.apply(Math,(0,qe.ev)([],(0,qe.CR)(t),!1))})),2),n=e[0],r=e[1],i=this.attributes,o=i.pageWidth,a=void 0===o?n:o,s=i.pageHeight;return{pageWidth:a,pageHeight:void 0===s?r:s}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=e.x,r=e.y,i=this.controllerShape,o=this.pageShape,a=o.pageWidth,s=o.pageHeight;return new hm(n,r,a+i.width,s)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this,i=r.currPage,o=r.playState,a=r.playWindow,s=r.pageViews;if("idle"!==o||t<0||s.length<=0||t>=s.length)return null;s[i].setLocalPosition(0,0),this.prepareFollowingPage(t);var c=(0,qe.CR)(this.getFollowingPageDiff(t),2),l=c[0],u=c[1];this.playState="running";var f=zg(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-l,", ").concat(-u,")")}],n);return Bg(f,(function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()})),f},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:Ge(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:Ge(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;n&&r?(this.clipPath=t.maybeAppendByClassName(VI.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach((function(e,n){t.includes(n)?Lg(e):Ng(e)}))},e.prototype.adjustControllerLayout=function(){var t=this,e=t.prevBtnGroup,n=t.nextBtnGroup,r=t.pageInfoGroup,i=this.attributes,o=i.orientation,a=i.controllerPadding,s=r.getBBox(),c=s.width,l=(s.height,(0,qe.CR)("horizontal"===o?[-180,0]:[-90,90],2)),u=l[0],f=l[1];e.setLocalEulerAngles(u),n.setLocalEulerAngles(f);var h=e.getBBox(),d=h.width,p=h.height,g=n.getBBox(),y=g.width,v=g.height,m=Math.max(d,c,y),b="horizontal"===o?{offset:[[0,0],[d/2+a,0],[d+c+2*a,0]],textAlign:"start"}:{offset:[[m/2,-p-a],[m/2,0],[m/2,v+a]],textAlign:"center"},x=(0,qe.CR)(b.offset,3),w=(0,qe.CR)(x[0],2),O=w[0],k=w[1],M=(0,qe.CR)(x[1],2),_=M[0],E=M[1],S=(0,qe.CR)(x[2],2),A=S[0],j=S[1],T=b.textAlign,P=r.querySelector("text");P&&(P.style.textAlign=T),e.setLocalPosition(O,k),r.setLocalPosition(_,E),n.setLocalPosition(A,j)},e.prototype.updatePageInfo=function(){var t,e=this,n=e.currPage,r=e.pageViews,i=e.attributes.formatter;r.length<2||(null===(t=this.pageInfoGroup.querySelector(VI.pageInfo.class))||void 0===t||t.attr("text",i(n+1,r.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=t<e?-1:1;return"horizontal"===n?[a*i,0]:[0,a*o]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=(0,qe.CR)(this.getFollowingPageDiff(t),2),i=r[0],o=r[1];n[t].setLocalPosition(i,o)}},e.prototype.renderController=function(t){var e=this,n=this.attributes.controllerSpacing,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=this.pageViews.length>=2,s=t.maybeAppendByClassName(VI.controller,"g");if(Ig(s.node(),a),a){var c=py(this.attributes,"button"),l=py(this.attributes,"pageNum"),u=(0,qe.CR)(yy(c),2),f=u[0],h=u[1],d=f.size,p=(0,qe._T)(f,["size"]),g=!s.select(VI.prevBtnGroup.class).node(),y=s.maybeAppendByClassName(VI.prevBtnGroup,"g").styles(h);this.prevBtnGroup=y.node();var v=y.maybeAppendByClassName(VI.prevBtn,"path"),m=s.maybeAppendByClassName(VI.nextBtnGroup,"g").styles(h);this.nextBtnGroup=m.node(),[v,m.maybeAppendByClassName(VI.nextBtn,"path")].forEach((function(t){t.styles((0,qe.pi)((0,qe.pi)({},p),{transformOrigin:"center"})),jy(t.node(),d,!0)}));var b=s.maybeAppendByClassName(VI.pageInfoGroup,"g");this.pageInfoGroup=b.node(),b.maybeAppendByClassName(VI.pageInfo,"text").styles(l),this.updatePageInfo(),s.node().setLocalPosition(i+n,o/2),g&&(this.prevBtnGroup.addEventListener("click",(function(){e.prev()})),this.nextBtnGroup.addEventListener("click",(function(){e.next()})))}},e.prototype.render=function(t,e){var n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i;this.attr("transform","translate(".concat(r,", ").concat(o,")"));var a=Qg(e);this.renderClipPath(a),this.renderController(a),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=Ih((function(){return t.render(t.attributes,t)}),50);this.playWindow.addEventListener(bc.INSERTED,e),this.playWindow.addEventListener(bc.REMOVED,e)},e}(Hg);var XI="component-poptip",KI="component-poptip-arrow",QI="component-poptip-text",JI=((HI={})[".".concat(XI)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},HI[".".concat(QI)]={"text-align":"center"},HI[".".concat(XI,"[data-position='top']")]={transform:"translate(-50%, -100%)"},HI[".".concat(XI,"[data-position='left']")]={transform:"translate(-100%, -50%)"},HI[".".concat(XI,"[data-position='right']")]={transform:"translate(0, -50%)"},HI[".".concat(XI,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},HI[".".concat(XI,"[data-position='top-left']")]={transform:"translate(0,-100%)"},HI[".".concat(XI,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},HI[".".concat(XI,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},HI[".".concat(XI,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},HI[".".concat(XI,"[data-position='right-top']")]={transform:"translate(0, 0)"},HI[".".concat(XI,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},HI[".".concat(XI,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},HI[".".concat(XI,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},HI[".".concat(KI)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},HI[".".concat(XI,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},HI["[data-position='top'] .".concat(KI)]={bottom:"-2px"},HI[".".concat(XI,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},HI["[data-position='left'] .".concat(KI)]={right:"-2px"},HI[".".concat(XI,"[data-position='right']")]={transform:"translate(5px, -50%)"},HI["[data-position='right'] .".concat(KI)]={left:"-2px"},HI[".".concat(XI,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},HI["[data-position='bottom'] .".concat(KI)]={top:"-2px"},HI[".".concat(XI,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},HI["[data-position='top-left'] .".concat(KI)]={left:"10px",bottom:"-2px"},HI[".".concat(XI,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},HI["[data-position='top-right'] .".concat(KI)]={right:"10px",bottom:"-2px"},HI[".".concat(XI,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},HI["[data-position='left-top'] .".concat(KI)]={right:"-2px",top:"8px"},HI[".".concat(XI,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},HI["[data-position='left-bottom'] .".concat(KI)]={right:"-2px",bottom:"8px"},HI[".".concat(XI,"[data-position='right-top']")]={transform:"translate(5px, 0)"},HI["[data-position='right-top'] .".concat(KI)]={left:"-2px",top:"8px"},HI[".".concat(XI,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},HI["[data-position='right-bottom'] .".concat(KI)]={left:"-2px",bottom:"8px"},HI[".".concat(XI,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},HI["[data-position='bottom-left'] .".concat(KI)]={top:"-2px",left:"8px"},HI[".".concat(XI,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},HI["[data-position='bottom-right'] .".concat(KI)]={top:"-2px",right:"8px"},HI),tD=void 0;function eD(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function nD(t){var e=function(t){var e;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e||(e=t.apply(tD,n)),e}}(eD)(t);return e}var rD=function(t){function e(n){var r=t.call(this,Jh({style:{id:"component-poptip"}},e.defaultOptions,n))||this;return r.visibility="visible",r.map=new Map,r.domStyles="",r.initShape(),r.render(r.attributes,r),r}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},e.prototype.update=function(t){this.attr(Jh({},this.style,t)),this.render(this.attributes,this)},e.prototype.bind=function(t,e){var n=this;if(t){var r=this.style.text,i=function(i){var o=t,a=n.style,s=r;if(e){var c="function"==typeof e?e.call(null,i):e,l=c.html,u=c.target,f=(0,qe._T)(c,["html","target"]);a=Fj({},n.style,f),(u||!1===u)&&(o=u),"string"==typeof l&&(s=l)}var h=a.position,d=a.arrowPointAtCenter,p=a.follow,g=a.offset;if(o){var y=i,v=y.clientX,m=y.clientY,b=(0,qe.CR)(function(t,e,n,r,i,o){if(void 0===i&&(i=!1),void 0===o&&(o=!1),o)return[t,e];var a=n.getBoundingClientRect(),s=a.x,c=a.y,l=a.width,u=a.height;switch(r){case"top":return i?[s+l/2,c]:[t,c];case"left":return i?[s,c+u/2]:[s,e];case"bottom":return i?[s+l/2,c+u]:[t,c+u];case"right":return i?[s+l,c+u/2]:[s+l,e];case"top-right":case"right-top":return[s+l,c];case"left-bottom":case"bottom-left":return[s,c+u];case"right-bottom":case"bottom-right":return[s+l,c+u];default:return[s,c]}}(v,m,o,h,d,p),2),x=b[0],w=b[1];n.showTip(x,w,{text:s,position:h,offset:g})}else n.hideTip()},o=function(){n.hideTip()};t.addEventListener("mousemove",i),t.addEventListener("mouseleave",o),this.map.set(t,[i,o])}},e.prototype.unbind=function(t){if(this.map.has(t)){var e=(0,qe.CR)(this.map.get(t)||[],2),n=e[0],r=e[1];n&&t.removeEventListener("mousemove",n),r&&t.removeEventListener("mouseleave",r),this.map.delete(t)}},e.prototype.clear=function(){this.container.innerHTML=""},e.prototype.destroy=function(){var e,n=this;(0,qe.ev)([],(0,qe.CR)(this.map.keys()),!1).forEach((function(t){return n.unbind(t)})),null===(e=this.container)||void 0===e||e.remove(),t.prototype.destroy.call(this)},e.prototype.showTip=function(t,e,n){var r=Dh(n,"text");if((!r||"string"==typeof r)&&(this.applyStyles(),t&&e&&n)){var i=n.offset,o=n.position;if(o&&this.container.setAttribute("data-position",o),this.setOffsetPosition(t,e,i),"string"==typeof r){var a=this.container.querySelector(".".concat(QI));a&&(a.innerHTML=r)}this.visibility="visible",this.container.style.visibility="visible"}},e.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},e.prototype.getContainer=function(){return this.container},e.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(XI).concat(t?" ".concat(t):"")},e.prototype.initShape=function(){var t=this,e=this.style.id;this.container=nD(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",(function(){return t.showTip()})),this.container.addEventListener("mouseleave",(function(){return t.hideTip()}))},e.prototype.updatePoptipElement=function(){var t=this.container;this.clear();var e=this.style,n=e.id,r=e.template,i=e.text;this.container.setAttribute("id",n),this.container.className=this.getClassName();var o='<span class="'.concat(KI,'"></span>');t.innerHTML=o,$e(r)?t.innerHTML+=r:r&&function(t){return t instanceof Element||t instanceof Document}(r)&&t.appendChild(r),i&&(t.getElementsByClassName(QI)[0].textContent=i),this.applyStyles(),this.container.style.visibility=this.visibility},e.prototype.applyStyles=function(){var t=$g({},JI,this.style.domStyles),e=Object.entries(t).reduce((function(t,e){var n=(0,qe.CR)(e,2),r=n[0],i=n[1],o=Object.entries(i).reduce((function(t,e){var n=(0,qe.CR)(e,2),r=n[0],i=n[1];return"".concat(t).concat(r,": ").concat(i,";")}),"");return"".concat(t).concat(r,"{").concat(o,"}")}),"");if(this.domStyles!==e){this.domStyles=e;var n=this.container.querySelector("style");n&&this.container.removeChild(n),(n=document.createElement("style")).innerHTML=e,this.container.appendChild(n)}},e.prototype.setOffsetPosition=function(t,e,n){void 0===n&&(n=this.style.offset);var r=(0,qe.CR)(n,2),i=r[0],o=void 0===i?0:i,a=r[1],s=void 0===a?0:a;this.container.style.left="".concat(t+o,"px"),this.container.style.top="".concat(e+s,"px")},e.tag="poptip",e.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:JI,template:'<div class="'.concat(QI,'"></div>')}},e}(Hg),iD=Jg({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),oD={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};var aD=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new ul({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes,r=n.markerSize,i=n.focus,o=n.focusMarkerSize,a=t.node().getBBox(),s=a.width,c=a.height,l=e.node().getBBox(),u=l.width,f=l.height;return{markerWidth:r,labelWidth:s,valueWidth:u,focusWidth:i?null!=o?o:12:0,height:Math.max(r,c,f)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=(0,qe.CR)(lv(t),2),n=e[0],r=e[1],i=this.showValue?r:0,o=n+i;return[n/o,i/o]},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(e,n){t.prototype.setAttribute.call(this,e,n)},Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,i=this.actualSpace,o=i.markerWidth,a=i.focusWidth,s=i.height,c=this.actualSpace,l=c.labelWidth,u=c.valueWidth,f=(0,qe.CR)(this.spacing,3),h=f[0],d=f[1],p=f[2];if(r){var g=r-n-h-d-a-p,y=(0,qe.CR)(this.span,2),v=y[0],m=y[1];l=(t=(0,qe.CR)([v*g,m*g],2))[0],u=t[1]}return{width:o+l+u+h+d+a+p,height:s,markerWidth:o,labelWidth:l,valueWidth:u,focusWidth:a}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes,e=t.spacing,n=t.focus;if(!e)return[0,0,0];var r=(0,qe.CR)(lv(e),3),i=r[0],o=r[1],a=r[2];return[i,this.showValue?o:0,n?a:0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.focusWidth,o=t.width,a=t.height,s=(0,qe.CR)(this.spacing,3),c=s[0],l=s[1];return{height:a,width:o,markerWidth:e,labelWidth:n,valueWidth:r,focusWidth:i,position:[e/2,e+c,e+n+c+l,e+n+r+c+l+s[2]+i/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t=function(t){var e=t.querySelector(iD.marker.class);return e?e.style:{}}(this.markerGroup.node()),e=this.attributes,n=e.markerSize,r=e.markerStrokeWidth,i=void 0===r?t.strokeWidth:r,o=e.markerLineWidth,a=void 0===o?t.lineWidth:o,s=e.markerStroke,c=void 0===s?t.stroke:s,l=+(i||a||(c?1:0))*Math.sqrt(2),u=this.markerGroup.node().getBBox(),f=u.width,h=u.height;return(1-l/Math.max(f,h))*n},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=py(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(iD.markerGroup,"g").style("zIndex",0),Vg(!!n,this.markerGroup,(function(){var t,i=e.markerGroup.node(),o=null===(t=i.childNodes)||void 0===t?void 0:t[0],a="string"==typeof n?new Ab({style:{symbol:n},className:iD.marker.name}):n();o?a.nodeName===o.nodeName?o instanceof Ab?o.update((0,qe.pi)((0,qe.pi)({},r),{symbol:n})):(!function(t,e){var n,r,i=e.attributes;try{for(var o=(0,qe.XA)(Object.entries(i)),a=o.next();!a.done;a=o.next()){var s=(0,qe.CR)(a.value,2),c=s[0],l=s[1];"id"!==c&&"className"!==c&&t.attr(c,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(o,a),Qg(o).styles(r)):(o.remove(),Qg(a).attr("className",iD.marker.name).styles(r),i.appendChild(a)):(a instanceof Ab||Qg(a).attr("className",iD.marker.name).styles(r),i.appendChild(a)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]);var s=jy(e.markerGroup.node(),e.scaleSize,!0);e.markerGroup.node().style._transform="scale(".concat(s,")")}))},e.prototype.renderLabel=function(t){var e=py(this.attributes,"label"),n=e.text,r=(0,qe._T)(e,["text"]);this.labelGroup=t.maybeAppendByClassName(iD.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(iD.label,(function(){return Ay(n)})).styles(r)},e.prototype.renderValue=function(t){var e=this,n=py(this.attributes,"value"),r=n.text,i=(0,qe._T)(n,["text"]);this.valueGroup=t.maybeAppendByClassName(iD.valueGroup,"g").style("zIndex",0),Vg(this.showValue,this.valueGroup,(function(){e.valueGroup.maybeAppendByClassName(iD.value,(function(){return Ay(r)})).styles(i)}))},e.prototype.createPoptip=function(){var t=this.attributes.poptip||{},e=(t.render,(0,qe._T)(t,["render"])),n=new rD({style:$g(oD,e)});return this.poptipGroup=n,n},e.prototype.bindPoptip=function(t){var e=this,n=this.attributes.poptip;n&&(this.poptipGroup||this.createPoptip()).bind(t,(function(){var t=e.attributes,r=t.labelText,i=t.valueText,o=t.markerFill,a="string"==typeof r?r:null==r?void 0:r.attr("text"),s="string"==typeof i?i:null==i?void 0:i.attr("text");if("function"==typeof n.render)return{html:n.render({label:a,value:s,color:o})};var c="";return"string"!=typeof a&&"number"!=typeof a||(c+='<div class="component-poptip-label">'.concat(a,"</div>")),"string"!=typeof s&&"number"!=typeof s||(c+='<div class="component-poptip-value">'.concat(s,"</div>")),{html:c}}))},e.prototype.renderFocus=function(t){var e=this,n=this.attributes,r=n.focus,i={x:0,y:0,size:n.focusMarkerSize,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};Nn(r)||(this.focusGroup=t.maybeAppendByClassName(iD.focusGroup,"g").style("zIndex",0),Vg(r,this.focusGroup,(function(){var n=new Ab({style:(0,qe.pi)((0,qe.pi)({},i),{symbol:"focus"})}),r=new ul({style:{r:i.size/2,fill:"transparent"}}),o=e.focusGroup.node();o.appendChild(r),o.appendChild(n),n.update({opacity:0}),t.node().addEventListener("pointerenter",(function(){n.update({opacity:1})})),t.node().addEventListener("pointerleave",(function(){n.update({opacity:0})}))})))},e.prototype.renderPoptip=function(t){var e=this;this.attributes.poptip&&[t.maybeAppendByClassName(iD.value,"g").node(),t.maybeAppendByClassName(iD.label,"g").node()].forEach((function(t){t&&e.bindPoptip(t)}))},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=py(this.attributes,"background");this.background=t.maybeAppendByClassName(iD.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(iD.background,"rect").styles((0,qe.pi)({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=(0,qe.CR)(t.position,4),o=i[0],a=i[1],s=i[2],c=i[3],l=r/2;this.markerGroup.styles({transform:"translate(".concat(o,", ").concat(l,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(a,", ").concat(l,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(c,", ").concat(l,")")}),sv(this.labelGroup.select(iD.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(s,", ").concat(l,")")}),sv(this.valueGroup.select(iD.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=Qg(e),r=t.x,i=void 0===r?0:r,o=t.y,a=void 0===o?0:o;n.styles({transform:"translate(".concat(i,", ").concat(a,")")}),this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.renderPoptip(n),this.renderFocus(n),this.adjustLayout()},e}(Hg),sD=Jg({page:"item-page",navigator:"navigator",item:"item"},"items"),cD=function(t,e,n){return void 0===n&&(n=!0),t?e(t):n},lD=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:YI,mouseenter:YI,mouseleave:YI})||this;return n.navigatorShape=[0,0],n}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw new Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=t.poptip,i=t.focus,o=t.focusMarkerSize,a=py(this.attributes,"item"),s=e.map((function(t,s){var c=t.id,l=void 0===c?s:c,u=t.label,f=t.value;return{id:"".concat(l),index:s,style:(0,qe.pi)({layout:n,labelText:u,valueText:f,poptip:r,focus:i,focusMarkerSize:o},Object.fromEntries(Object.entries(a).map((function(n){var r=(0,qe.CR)(n,2);return[r[0],vy(r[1],[t,s,e])]}))))}}));return s},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,i=e.rowPadding,o=e.colPadding,a=(0,qe.CR)(this.navigatorShape,1)[0],s=(0,qe.CR)(this.grid,2),c=s[0],l=s[1],u=l*c,f=0;return this.pageViews.children.map((function(e,s){var h,d,p=Math.floor(s/u),g=s%u,y=t.ifHorizontal(l,c),v=[Math.floor(g/y),g%y];"vertical"===n&&v.reverse();var m=(0,qe.CR)(v,2),b=m[0],x=m[1],w=(r-a-(l-1)*o)/l,O=e.getBBox().height,k=(0,qe.CR)([0,0],2),M=k[0],_=k[1];return"horizontal"===n?(M=(h=(0,qe.CR)([f,b*(O+i)],2))[0],_=h[1],f=x===l-1?0:f+w+o):(M=(d=(0,qe.CR)([x*(w+o),f],2))[0],_=d[1],f=b===c-1?0:f+O+i),{page:p,index:s,row:b,col:x,pageIndex:g,width:w,height:O,x:M,y:_}}))},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=(0,qe.CR)(this.navigatorShape,1)[0],a=(0,qe.CR)(this.grid,2),s=a[0],c=a[1],l=(0,qe.CR)([e-o,n],2),u=l[0],f=l[1],h=(0,qe.CR)([0,0,0,0,0,0,0,0],8),d=h[0],p=h[1],g=h[2],y=h[3],v=h[4],m=h[5],b=h[6],x=h[7];return this.pageViews.children.map((function(t,e){var n,o,a,l,h=t.getBBox(),w=h.width,O=h.height,k=0===b?0:i,M=b+k+w;return M<=u&&cD(v,(function(t){return t<c}))?(n=(0,qe.CR)([b+k,x,M],3),d=n[0],p=n[1],b=n[2],{width:w,height:O,x:d,y:p,page:g,index:e,pageIndex:y++,row:m,col:v++}):(o=(0,qe.CR)([m+1,0,0,x+O+r],4),m=o[0],v=o[1],b=o[2],(x=o[3])+O<=f&&cD(m,(function(t){return t<s}))?(a=(0,qe.CR)([b,x,w],3),d=a[0],p=a[1],b=a[2],{width:w,height:O,x:d,y:p,page:g,index:e,pageIndex:y++,row:m,col:v++}):(l=(0,qe.CR)([0,0,w,0,g+1,0,0,0],8),d=l[0],p=l[1],b=l[2],x=l[3],g=l[4],y=l[5],m=l[6],v=l[7],{width:w,height:O,x:d,y:p,page:g,index:e,pageIndex:y++,row:m,col:v++}))}))},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return jb(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(sD.item.class).forEach((function(e){t.appendChild(e)})),t.querySelectorAll(sD.page.class).forEach((function(e){t.removeChild(e).destroy()}))},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);Qg(t).selectAll(sD.item.class).data(this.renderData,(function(t){return t.id})).join((function(t){return t.append((function(t){var e=t.style;return new aD({style:e})})).attr("className",sD.item.name).on("click",(function(){null==n||n(this),o("itemClick",{item:this})})).on("pointerenter",(function(){null==r||r(this),o("itemMouseenter",{item:this})})).on("pointerleave",(function(){null==i||i(this),o("itemMouseleave",{item:this})}))}),(function(t){return t.each((function(t){var e=t.style;this.update(e)}))}),(function(t){return t.remove()}))},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,i=(null===(t=this.pageViews.children[0])||void 0===t?void 0:t.getBBox().height)||0,o=(0,qe.CR)(this.navigatorShape,2),a=o[0],s=o[1];this.navigator.update("grid"===n?{pageWidth:r-a,pageHeight:i-s}:{})},e.prototype.adjustLayout=function(){var t,e,n=this,r=Object.entries((t=this.itemsLayout,e="page",t.reduce((function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t}),{}))).map((function(t){var e=(0,qe.CR)(t,2);return{page:e[0],layouts:e[1]}})),i=(0,qe.ev)([],(0,qe.CR)(this.navigator.getContainer().children),!1);r.forEach((function(t){var e=t.layouts,r=n.pageViews.appendChild(new pl({className:sD.page.name}));e.forEach((function(t){var e=t.x,n=t.y,o=t.index,a=t.width,s=t.height,c=i[o];r.appendChild(c),Nw(c,"__layout__",t),c.update({x:e,y:n,width:a,height:s})}))})),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=py(this.attributes,"nav"),r=$g({orientation:e},n),i=this;return t.selectAll(sD.navigator.class).data(["nav"]).join((function(t){return t.append((function(){return new UI({style:r})})).attr("className",sD.navigator.name).each((function(){i.navigator=this}))}),(function(t){return t.each((function(){this.update(r)}))}),(function(t){return t.remove()})),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(Qg(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new uc(t,{detail:e});this.dispatchEvent(n)},e}(Hg),uD=function(t){function e(e){return t.call(this,e,Lb)||this}return(0,qe.ZT)(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=py(this.attributes,"title"),s=(0,qe.CR)(yy(a),2),c=s[0],l=s[1];this.titleGroup=t.maybeAppendByClassName(Ib.titleGroup,"g").styles(l);var u=(0,qe.pi)((0,qe.pi)({width:e,height:n},c),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(Ib.title,(function(){return new xb({style:u})})).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=py(this.attributes,"title",!0),s=(0,qe.CR)(yy(a),2),c=s[0],l=s[1],u=(0,qe.pi)((0,qe.pi)({},c),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(Ib.itemsGroup,"g").styles((0,qe.pi)((0,qe.pi)({},l),{transform:"translate(".concat(n,", ").concat(r,")")}));var f=this;this.itemsGroup.selectAll(Ib.items.class).data(["items"]).join((function(t){return t.append((function(){return new lD({style:u})})).attr("className",Ib.items.name).each((function(){f.items=Qg(this)}))}),(function(t){return t.update(u)}),(function(t){return t.remove()}))},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().style.transform="translate(".concat(e,", ").concat(n,")")}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,r=t.height;return e?this.title.node().getAvailableSpace():new hm(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null===(e=this.title)||void 0===e?void 0:e.node(),i=null===(n=this.items)||void 0===n?void 0:n.node();return r&&i?function(t,e){var n=t.attributes,r=n.position,i=n.spacing,o=n.inset,a=n.text,s=t.getBBox(),c=e.getBBox(),l=Bv(r),u=(0,qe.CR)(lv(a?i:0),4),f=u[0],h=u[1],d=u[2],p=u[3],g=(0,qe.CR)(lv(o),4),y=g[0],v=g[1],m=g[2],b=g[3],x=(0,qe.CR)([p+h,f+d],2),w=x[0],O=x[1],k=(0,qe.CR)([b+v,y+m],2),M=k[0],_=k[1];if("l"===l[0])return new hm(s.x,s.y,c.width+s.width+w+M,Math.max(c.height+_,s.height));if("t"===l[0])return new hm(s.x,s.y,Math.max(c.width+M,s.width),c.height+s.height+O+_);var E=(0,qe.CR)([e.attributes.width||c.width,e.attributes.height||c.height],2),S=E[0],A=E[1];return new hm(c.x,c.y,S+s.width+w+M,A+s.height+O+_)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=this.attributes,r=n.width,i=n.height,o=n.x,a=void 0===o?0:o,s=n.y,c=void 0===s?0:s,l=Qg(e);e.style.transform="translate(".concat(a,", ").concat(c,")"),this.renderTitle(l,r,i),this.renderItems(l,this.availableSpace),this.adjustLayout()},e}(Hg),fD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function hD(t,e){const n=km(t,"shape"),r=km(t,"color"),i=n?n.clone():null,o=[];for(const[t,n]of e){const e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map(((e,r)=>{var o;return i?i.map(e||"point"):(null===(o=null==t?void 0:t.style)||void 0===o?void 0:o.shape)||n.defaultShape||"point"}));"string"==typeof e&&o.push([e,a])}if(0===o.length)return["point",["point"]];if(1===o.length)return o[0];if(!n)return o[0];const{range:a}=n.getOptions();return o.map((([t,e])=>{let n=0;for(let t=0;t<o.length;t++){const r=a[t%a.length];e[t]===r&&n++}return[n/e.length,[t,e]]})).sort(((t,e)=>e[0]-t[0]))[0][1]}function dD(t,e){const{scales:n,library:r,markState:i}=e,[o,a]=hD(n,i),{itemMarker:s,itemMarkerSize:c}=t,l=(t,e)=>{var n,i,a;const s=(null===(a=null===(i=null===(n=r[`mark.${o}`])||void 0===n?void 0:n.props)||void 0===i?void 0:i.shape[t])||void 0===a?void 0:a.props.defaultMarker)||Wv(t.split(".")),l="function"==typeof c?c(e):c;return()=>function(t,e){var{d:n,fill:r,lineWidth:i,path:o,stroke:a,color:s}=e,c=Wu(e,["d","fill","lineWidth","path","stroke","color"]);const l=vf.get(t)||vf.get("point");return(...t)=>new wl({style:Object.assign(Object.assign({},c),{d:l(...t),stroke:l.style.includes("stroke")?s||a:"",fill:l.style.includes("fill")?s||r:"",lineWidth:l.style.includes("lineWidth")?i||i||2:0})})}(s,{color:e.color})(0,0,l)},u=t=>`${a[t]}`;return km(n,"shape")&&!s?(t,e)=>l(u(e),t):"function"==typeof s?(t,e)=>{const n=s(t.id,e);return"string"==typeof n?l(n,t):n}:(t,e)=>l(s||u(e),t)}function pD(t){const e=km(t,"opacity");if(e){const{range:t}=e.getOptions();return(e,n)=>t[n]}}function gD(t,e){const{scales:n,markState:r}=e,[i,o]=hD(n,r),{itemMarker:a,itemMarkerLineWidth:s}=t;if(void 0!==s)return s;const c=["line","hyphen","dash","smooth","hv","hvh","vh","vhv"];if("string"==typeof a&&c.includes(a))return 4;if("function"==typeof a)return(t,e)=>{const n=a(t.id,e);if("string"==typeof n&&c.includes(n))return 4};const l=(Array.isArray(o)?o:[o]).some((t=>c.includes(t)));return l?4:void 0}function yD(t,e){const{labelFormatter:n=(t=>`${t}`)}=t,{scales:r,theme:i}=e,o=function(t,e){const n=km(t,"size");return n instanceof fN?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:dD(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:pD(r),itemMarkerLineWidth:gD(t,e)},s="string"==typeof n?Jp(n):n,c=km(r,"color"),l=function(t){return t.find((t=>t.getOptions().domain.length>0)).getOptions().domain}(r),u=c?t=>c.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:l.map((t=>({id:t,label:s(t),color:u(t)})))})}const vD=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:s,cols:c,itemMarker:l}=t,u=fD(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=u;return e=>{const{value:r,theme:i}=e,{bbox:a}=r,{width:l,height:h}=function(t,e,n){const{position:r}=e;if("center"===r){const{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}const{width:i,height:o}=_m(t,e,n);return{width:i,height:o}}(r,t,vD),d=xm(o,n),p=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(o)?"vertical":"horizontal",width:l,height:h,layout:void 0!==c?"grid":"flex"},void 0!==c&&{gridCol:c}),void 0!==f&&{gridRow:f}),{titleText:bm(s)}),yD(t,e)),{legendCategory:g={}}=i,y=Em(Object.assign({},g,function(t){return Object.assign(Object.assign({},t),{data:(null==t?void 0:t.data.filter((t=>""!==t.id)))||[]})}(p),u)),v=new Om({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},d),{subOptions:y})});return v.appendChild(new uD({className:"legend-category",style:y})),v}};vD.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const mD=t=>()=>new pl;mD.props={};var bD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function xD(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"}}}const wD=(OD={render(t,e){const{width:n,title:r,subtitle:i,spacing:o=2,align:a="left",x:s,y:c}=t,l=bD(t,["width","title","subtitle","spacing","align","x","y"]);e.style.transform=`translate(${s}, ${c})`;const u=Rd(l,"title"),f=Rd(l,"subtitle"),h=mm(e,".title","text").attr("className","title").call(Rx,Object.assign(Object.assign(Object.assign({},xD(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),u)).node().getLocalBounds();mm(e,".sub-title","text").attr("className","sub-title").call((t=>{if(!i)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},xD(0,h.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),f))}))}},class extends hl{constructor(t){super(t),this.descriptor=OD}connectedCallback(){var t,e;null===(e=(t=this.descriptor).render)||void 0===e||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(Jh({},this.attributes,t)),null===(n=(e=this.descriptor).render)||void 0===n||n.call(e,this.attributes,this)}});var OD;const kD=t=>({value:e,theme:n})=>{const{x:r,y:i,width:o,height:a}=e.bbox;return new wD({style:Jh({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function MD({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function _D(t){return"object"==typeof t?t.valueOf():t}kD.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class ED extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=_D,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(MD({map:this.map,initKey:this.initKey},t))}has(t){return super.has(MD({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}const SD=Symbol("defaultUnknown");function AD(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function jD(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t;let a=i.get(e);if(void 0===a){if(o!==SD)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function TD(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class PD extends zm{getDefaultOptions(){return{domain:[],range:[],unknown:SD}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&AD(this.domainIndexMap,this.getDomain(),this.domainKey),jD({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&AD(this.rangeIndexMap,this.getRange(),this.rangeKey),jD({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=TD(e),this.rangeKey=TD(n),!this.rangeIndexMap)return this.rangeIndexMap=new Map,void(this.domainIndexMap=new Map);t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new PD(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}function CD(t){return Math.round(1e12*t)/1e12}function RD(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:s}=t,c=e.length,l=function(t,e){const n=e-t.length;return n>0?[...t,...new Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,c),[u,f]=n,h=f-u,d=h/(2/c*r+1-1/c*i),p=d*i/c,g=d-c*p,y=function(t){const e=Math.min(...t);return t.map((t=>t/e))}(l),v=y.reduce(((t,e)=>t+e)),m=g/v,b=new ED(e.map(((t,e)=>{const n=y[e]*m;return[t,a?Math.floor(n):n]}))),x=new ED(e.map(((t,e)=>{const n=y[e]*m+p;return[t,a?Math.floor(n):n]}))),w=Array.from(x.values()).reduce(((t,e)=>t+e)),O=u+(h-(w-w/c*i))*s;let k=a?Math.round(O):O;const M=new Array(c);for(let t=0;t<c;t+=1){M[t]=CD(k);const n=e[t];k+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:M}}class LD extends PD{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:SD,flex:[]}}constructor(t){super(t)}clone(){return new LD(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){const{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();const{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:s}=function(t){var e;const{domain:n}=t,r=n.length;if(0===r)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return RD(t);const{range:i,paddingOuter:o,paddingInner:a,round:s,align:c}=t;let l,u,f=i[0];const h=i[1]-f,d=2*o,p=r-a;l=h/Math.max(1,d+p),s&&(l=Math.floor(l)),f+=(h-l*(r-a))*c,u=l*(1-a),s&&(f=Math.round(f),u=Math.round(u));const g=new Array(r).fill(0).map(((t,e)=>f+e*l));return{valueStep:l,valueBandWidth:u,adjustedRange:g}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=s,this.valueBandWidth=a,this.adjustedRange=o}}var ND=function(t){if("object"!=typeof t||null===t)return t;var e;if(xn(t)){e=[];for(var n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=ND(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=ND(t[i]):e[i]=t[i];return e},ID=ND,DD=function(t){function e(e){var n=this,r=e.style,i=(0,qe._T)(e,["style"]);return(n=t.call(this,Jh({},{type:"column"},(0,qe.pi)({style:r},i)))||this).columnsGroup=new pl({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return(0,qe.ZT)(e,t),e.prototype.render=function(){var t=this.attributes,e=t.columns,n=t.x,r=t.y;this.columnsGroup.style.transform="translate(".concat(n,", ").concat(r,")"),Qg(this.columnsGroup).selectAll(".column").data(e.flat()).join((function(t){return t.append("rect").attr("className","column").each((function(t){this.attr(t)}))}),(function(t){return t.each((function(t){this.attr(t)}))}),(function(t){return t.remove()}))},e.prototype.update=function(t){this.attr($g({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(ll),BD=function(t){function e(e){var n=this,r=e.style,i=(0,qe._T)(e,["style"]);return(n=t.call(this,Jh({},{type:"lines"},(0,qe.pi)({style:r},i)))||this).linesGroup=n.appendChild(new pl),n.areasGroup=n.appendChild(new pl),n.render(),n}return(0,qe.ZT)(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas,r=t.x,i=t.y;this.style.transform="translate(".concat(r,", ").concat(i,")"),e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr($g({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){Qg(this.linesGroup).selectAll(".line").data(t).join((function(t){return t.append("path").attr("className","line").each((function(t){this.attr(t)}))}),(function(t){return t.each((function(t){this.attr(t)}))}),(function(t){return t.remove()}))},e.prototype.renderAreas=function(t){Qg(this.linesGroup).selectAll(".area").data(t).join((function(t){return t.append("path").attr("className","area").each((function(t){this.attr(t)}))}),(function(t){return t.each((function(t){this.style(t)}))}),(function(t){return t.remove()}))},e}(ll);function FD(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r=!!e,i=[],o=0,a=t.length;o<a;o+=2)i.push([t[o],t[o+1]]);var s,c,l,u=function(t,e,n,r){var i,o,a,s,c,l,u=[],f=!!r,h=[1/0,1/0],d=[-1/0,-1/0];if(f){h=(i=(0,qe.CR)(r,2))[0],d=i[1];for(var p=0,g=t.length;p<g;p+=1)h=oy(h,v=t[p]),d=ay(d,v)}p=0;for(var y=t.length;p<y;p+=1){var v=t[p];if(0!==p||n)if(p!==y-1||n){o=t[[p?p-1:y-1,p-1][n?0:1]];var m=[0,0];m=ny(m=iy(a=t[n?(p+1)%y:p+1],o),e);var b=sy(v,o),x=sy(v,a),w=b+x;0!==w&&(b/=w,x/=w);var O=ny(m,-b),k=ny(m,x);c=ry(v,O),s=oy(s=ry(v,k),ay(a,v)),s=ay(s,oy(a,v)),c=oy(c=ry(v,O=ny(O=iy(s,v),-b/x)),ay(o,v)),s=ry(v,k=ny(k=iy(v,c=ay(c,oy(o,v))),x/b)),f&&(c=oy(c=ay(c,h),d),s=oy(s=ay(s,h),d)),u.push(l),u.push(c),l=s}else c=v,u.push(l),u.push(c);else l=v}return n&&u.push(u.shift()),u}(i,.4,r,n),f=i.length,h=[];for(o=0;o<f-1;o+=1)s=u[2*o],c=u[2*o+1],l=i[o+1],h.push(["C",s[0],s[1],c[0],c[1],l[0],l[1]]);return r&&(s=u[f],c=u[f+1],l=(0,qe.CR)(i,1)[0],h.push(["C",s[0],s[1],c[0],c[1],l[0],l[1]])),h}function zD(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map((function(t,e){return(0,qe.ev)([e===n?"M":"L"],(0,qe.CR)(t),!1)}));return e?r.reverse():r}function ZD(t,e){if(void 0===e&&(e=!1),t.length<=2)return zD(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];fg(o,n.slice(-2))||n.push.apply(n,(0,qe.ev)([],(0,qe.CR)(o),!1))}var a=FD(n,!1);return e?a.unshift((0,qe.ev)(["M"],(0,qe.CR)(t[r-1]),!1)):a.unshift((0,qe.ev)(["M"],(0,qe.CR)(t[0]),!1)),a}function WD(t,e,n){var r=ID(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var $D=function(t,e){if(xn(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=Fn(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},GD=function(t,e){if(xn(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=Fn(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function qD(t){return 0===t.length?[0,0]:[wn($D(t,(function(t){return wn(t)||0}))),On(GD(t,(function(t){return On(t)||0})))]}function YD(t){for(var e=ID(t),n=e[0].length,r=(0,qe.CR)([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],o=r[1],a=0;a<e.length;a+=1)for(var s=e[a],c=0;c<n;c+=1)s[c]>=0?(s[c]+=i[c],i[c]=s[c]):(s[c]+=o[c],o[c]=s[c]);return e}var HD=function(t){function e(e){return t.call(this,e,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||0===(null==t?void 0:t.length))return[[]];var e=ID(t);return ze(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?YD(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=(0,qe.CR)(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return r<0?t.map(r):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,r=e.isStack,i=e.smooth;if("line"!==n)throw new Error("linesStyle can only be used in line type");var o=py(this.attributes,"area"),a=py(this.attributes,"line"),s=this.containerShape.width,c=this.data;if(0===c[0].length)return{lines:[],areas:[]};var l=this.scales,u=function(t,e){var n,r=e.x,i=e.y,o=(0,qe.CR)(i.getOptions().range||[0,0],2),a=o[0],s=o[1];return s>a&&(n=(0,qe.CR)([a,s],2),s=n[0],a=n[1]),t.map((function(t){return t.map((function(t,e){return[r.map(e),Ge(i.map(t),s,a)]}))}))}(c,{type:"line",x:l.x,y:l.y}),f=[];if(o){var h=this.baseline;f=r?i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=t[i],a=ZD(o),s=void 0;if(0===i)s=WD(a,e,n);else{var c=ZD(t[i-1],!0),l=o[0];c[0][0]="L",s=(0,qe.ev)((0,qe.ev)((0,qe.ev)([],(0,qe.CR)(a),!1),(0,qe.CR)(c),!1),[(0,qe.ev)(["M"],(0,qe.CR)(l),!1),["Z"]],!1)}r.push(s)}return r}(u,s,h):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=zD(t[i]),a=void 0;if(0===i)a=WD(o,e,n);else{var s=zD(t[i-1],!0);s[0][0]="L",a=(0,qe.ev)((0,qe.ev)((0,qe.ev)([],(0,qe.CR)(o),!1),(0,qe.CR)(s),!1),[["Z"]],!1)}r.push(a)}return r}(u,s,h):function(t,e,n,r){return t.map((function(t){return WD(e?ZD(t):zD(t),n,r)}))}(u,i,s,h)}return{lines:u.map((function(e,n){return(0,qe.pi)({stroke:t.getColor(n),d:i?ZD(e):zD(e)},a)})),areas:f.map((function(e,n){return(0,qe.pi)({d:e,fill:t.getColor(n)},o)}))}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=py(this.attributes,"column"),n=this.attributes,r=n.isStack,i=n.type,o=n.scale;if("column"!==i)throw new Error("columnsStyle can only be used in column type");var a=this.containerShape.height,s=this.rawData;if(!s)return{columns:[]};r&&(s=YD(s));var c=this.createScales(s),l=c.x,u=c.y,f=(0,qe.CR)(qD(s),2),h=f[0],d=f[1],p=new ob({domain:[0,d-(h>0?0:h)],range:[0,a*o]}),g=l.getBandWidth(),y=this.rawData;return{columns:s.map((function(n,i){return n.map((function(n,o){var a=g/s.length;return(0,qe.pi)((0,qe.pi)({fill:t.getColor(i)},e),r?{x:l.map(o),y:u.map(n),width:g,height:p.map(y[i][o])}:{x:l.map(o)+a*i,y:n>=0?u.map(n):u.map(0),width:a,height:p.map(Math.abs(n))})}))}))}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){var n,r,i;(n=e,r=".container",i="rect",n.querySelector(r)?Qg(n).select(r):Qg(n).append(i)).attr("className","container").node();var o=t.type,a=t.x,s=t.y,c="spark".concat(o),l=(0,qe.pi)({x:a,y:s},"line"===o?this.linesStyle:this.columnsStyle);Qg(e).selectAll(".spark").data([o]).join((function(t){return t.append((function(t){return"line"===t?new BD({className:c,style:l}):new DD({className:c,style:l})})).attr("className","spark ".concat(c))}),(function(t){return t.update(l)}),(function(t){return t.remove()}))},e.prototype.getColor=function(t){var e=this.attributes.color;return xn(e)?e[t%e.length]:Fn(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,i=r.type,o=r.scale,a=r.range,s=void 0===a?[]:a,c=r.spacing,l=this.containerShape,u=l.width,f=l.height,h=(0,qe.CR)(qD(t),2),d=h[0],p=h[1],g=new ob({domain:[null!==(e=s[0])&&void 0!==e?e:d,null!==(n=s[1])&&void 0!==n?n:p],range:[f,f*(1-o)]});return"line"===i?{type:i,x:new ob({domain:[0,t[0].length-1],range:[0,u]}),y:g}:{type:i,x:new LD({domain:t[0].map((function(t,e){return e})),range:[0,u],paddingInner:c,paddingOuter:c/2,align:.5}),y:g}},e.tag="sparkline",e}(Hg),VD=function(t){function e(e){var n=t.call(this,e,(0,qe.pi)((0,qe.pi)((0,qe.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},gy(db,"handle")),gy(fb,"handleIcon")),gy(hb,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(sb(e));var r=n.availableSpace,i=r.x,o=r.y,a=n.getBBox(),s=a.x,c=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([i,o])-n.getOrientVal([+s,+c])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,i=e.brushable,o=e.type;t.stopPropagation();var a=n.getOrientVal(sb(t)),s=a-n.prevPos;if(s){var c=n.getRatio(s);switch(n.target){case"start":r&&n.setValuesOffset(c);break;case"end":r&&n.setValuesOffset(0,c);break;case"selection":r&&n.setValuesOffset(c,c);break;case"track":if(!i)return;n.selectionWidth+=c,"range"===o?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,i=e.type,o="range"===i?t:t[1],a="range"===i?n.getValues():n.getValues()[1],s=new uc("valuechange",{detail:{oldValue:o,value:a}});n.dispatchEvent(s),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=py(this.attributes,"sparkline");return(0,qe.pi)((0,qe.pi)({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=(0,qe.CR)(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=(t.x,t.y,t.padding),n=(0,qe.CR)(lv(e),4),r=n[0],i=n[1],o=n[2],a=n[3],s=this.shape;return{x:a,y:r,width:s.width-(a+i),height:s.height-(r+o)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(pb.selection.class).each((function(n,r){Zg(this,e[r],t)}))},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&Zg(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&Zg(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=this.attributes,n=e.x,r=e.y,i=py(this.attributes,"track");this.trackShape=Qg(t).maybeAppendByClassName(pb.track,"rect").styles((0,qe.pi)((0,qe.pi)({x:n,y:r},this.shape),i))},e.prototype.renderBrushArea=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.brushable;this.brushArea=Qg(t).maybeAppendByClassName(pb.brushArea,"rect").styles((0,qe.pi)({x:n,y:r,fill:"transparent",cursor:i?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this,n=this.attributes,r=n.x,i=n.y;Vg("horizontal"===n.orientation,Qg(t).maybeAppendByClassName(pb.sparklineGroup,"g"),(function(t){var n=(0,qe.pi)((0,qe.pi)({},e.sparklineStyle),{x:r,y:i});t.maybeAppendByClassName(pb.sparkline,(function(){return new HD({style:n})})).update(n)}))},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle,i=n.type,o=r?"range"===i?["start","end"]:["end"]:[],a=this;null===(t=this.foregroundGroup)||void 0===t||t.selectAll(pb.handle.class).data(o.map((function(t){return{type:t}})),(function(t){return t.type})).join((function(t){return t.append((function(t){var n=t.type;return new vb({style:e.getHandleStyle(n)})})).each((function(t){var e=t.type;this.attr("class","".concat(pb.handle.name," ").concat(e,"-handle"));var n="".concat(e,"Handle");a[n]=this,this.addEventListener("pointerdown",a.onDragStart(e))}))}),(function(t){return t.each((function(t){var e=t.type;this.update(a.getHandleStyle(e))}))}),(function(t){return t.each((function(t){var e=t.type,n="".concat(e,"Handle");a[n]=void 0})).remove()}))},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.type,o=e.selectionType;this.foregroundGroup=Qg(t).maybeAppendByClassName(pb.foreground,"g");var a=py(this.attributes,"selection"),s=function(t){return t.style("visibility",(function(t){return t.show?"visible":"hidden"})).style("cursor",(function(t){return"select"===o?"grab":"invert"===o?"crosshair":"default"})).styles((0,qe.pi)((0,qe.pi)({},a),{transform:"translate(".concat(n,", ").concat(r,")")}))},c=this;this.foregroundGroup.selectAll(pb.selection.class).data("value"===i?[]:this.calcSelectionArea().map((function(t,e){return{style:(0,qe.pi)({},t),index:e,show:"select"===o?1===e:1!==e}})),(function(t){return t.index})).join((function(t){return t.append("rect").attr("className",pb.selection.name).call(s).each((function(t,e){var n=this;1===e?(c.selectionShape=Qg(this),this.on("pointerdown",(function(t){n.attr("cursor","grabbing"),c.onDragStart("selection")(t)})),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",(function(){n.attr("cursor","grabbing")})),this.addEventListener("pointerup",(function(){n.attr("cursor","pointer")})),this.addEventListener("pointerover",(function(){n.attr("cursor","pointer")}))):this.on("pointerdown",c.onDragStart("track"))}))}),(function(t){return t.call(s)}),(function(t){return t.remove()})),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){var n;void 0===e&&(e=4);var r=(0,qe.CR)(this.range,2),i=r[0],o=r[1],a=(0,qe.CR)(this.getValues().map((function(t){return ab(t,e)})),2),s=a[0],c=a[1],l=Array.isArray(t)?t:[s,null!=t?t:c],u=(0,qe.CR)((l||[s,c]).map((function(t){return ab(t,e)})),2),f=u[0],h=u[1];if("value"===this.attributes.type)return[0,Ge(h,i,o)];f>h&&(f=(n=(0,qe.CR)([h,f],2))[0],h=n[1]);var d=h-f;return d>o-i?[i,o]:f<i?s===i&&c===h?[i,h]:[i,d+i]:h>o?c===o&&s===f?[f,o]:[o-d,o]:[f,h]},e.prototype.calcSelectionArea=function(t){var e=(0,qe.CR)(this.clampValues(t),2),n=e[0],r=e[1],i=this.availableSpace,o=i.x,a=i.y,s=i.width,c=i.height;return this.getOrientVal([[{y:a,height:c,x:o,width:n*s},{y:a,height:c,x:n*s+o,width:(r-n)*s},{y:a,height:c,x:r*s,width:(1-r)*s}],[{x:o,width:s,y:a,height:n*c},{x:o,width:s,y:n*c+a,height:(r-n)*c},{x:o,width:s,y:r*c,height:(1-r)*c}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,i=n.y,o=n.width,a=n.height,s=(0,qe.CR)(this.clampValues(),2),c=s[0],l=s[1],u="start"===t?-e:e,f=("start"===t?c:l)*this.getOrientVal([o,a])+u;return{x:r+this.getOrientVal([f,o/2]),y:i+this.getOrientVal([a/2,f])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:"end"===t?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,i=n.orientation,o=n.formatter,a=n.autoFitLabel,s=py(this.attributes,"handle"),c=py(s,"label"),l=s.spacing,u=this.getHandleSize(),f=this.clampValues(),h=o("start"===t?f[0]:f[1]),d=new Xg({style:(0,qe.pi)((0,qe.pi)((0,qe.pi)({},c),this.inferTextStyle(t)),{text:h})}),p=d.getBBox(),g=p.width,y=p.height;if(d.destroy(),!a){if("value"===r)return{text:h,x:0,y:-y-l};var v=l+u+("horizontal"===i?g/2:0);return(e={text:h})["horizontal"===i?"x":"y"]="start"===t?-v:v,e}var m=0,b=0,x=this.availableSpace,w=x.width,O=x.height,k=this.calcSelectionArea()[1],M=k.x,_=k.y,E=k.width,S=k.height,A=l+u;if("horizontal"===i){var j=A+g/2;if("start"===t)m=M-A-g>0?-j:j;else m=w-M-E-A>g?j:-j}else{var T=y+A;b="start"===t?_-u>y?-T:A:O-(_+S)-u>y?T:-A}return{x:m,y:b,text:h}},e.prototype.getHandleLabelStyle=function(t){var e=py(this.attributes,"handleLabel");return(0,qe.pi)((0,qe.pi)((0,qe.pi)({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=py(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return(0,qe.pi)({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.showLabel,o=e.showLabelOnInteraction,a=e.orientation,s=this.calcHandlePosition(t),c=s.x,l=s.y,u=this.calcHandleText(t),f=i;return!i&&o&&(f=!!this.target),(0,qe.pi)((0,qe.pi)((0,qe.pi)({},gy(this.getHandleIconStyle(),"icon")),gy((0,qe.pi)((0,qe.pi)({},this.getHandleLabelStyle(t)),u),"label")),{transform:"translate(".concat(c+n,", ").concat(l+r,")"),orientation:a,showLabel:f,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,r=t.height;return e||Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=(0,qe.CR)(t,2),n=e[0],r=e[1];return"horizontal"===this.attributes.orientation?n:r},e.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=this.attributes.type,r=(0,qe.CR)(this.getValues(),2),i=[r[0]+("range"===n?t:0),r[1]+e].sort();this.innerSetValues(i,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,r=e.height;return t/this.getOrientVal([n,r])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,(function(t){t.stopPropagation(),r.dispatchEvent(new uc(n,{detail:t}))}))},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=t.deltaX,n=t.deltaY||e,r=this.getRatio(n);this.setValuesOffset(r,r)}},e.tag="slider",e}(Hg),UD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const XD=t=>{const{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=UD(t,["orientation","labelFormatter","size","style","position"]);return r=>{var s;const{scales:[c],value:l,theme:u,coordinate:f}=r,{bbox:h}=l,{width:d,height:p}=h,{slider:g={}}=u,y=(null===(s=c.getFormatter)||void 0===s?void 0:s.call(c))||(t=>t+""),v="string"==typeof n?Jp(n):n,m="horizontal"===e,b=kg(f)&&m,{trackSize:x=g.trackSize}=i,[w,O]=function(t,e,n){const{x:r,y:i,width:o,height:a}=t;return"left"===e?[r+o-n,i]:"right"===e||"bottom"===e?[r,i]:"top"===e?[r,i+a-n]:void 0}(h,o,x);return new VD({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:w,y:O,trackLength:m?d:p,orientation:e,formatter:t=>(v||y)(Jw(c,b?1-t:t,!0)),sparklineData:KD(t,r)},i),a))})}};function KD(t,e){const{markState:n}=e;return xn(t.sparklineData)?t.sparklineData:function(t,e){const[n]=Array.from(t.entries()).filter((([t])=>"line"===t.type||"area"===t.type||"interval"===t.type)).filter((([t])=>t.slider)).map((([t])=>{const{encode:n,slider:r}=t;if(null==r?void 0:r.x){const t=t=>{const e=n[t];return[t,e?e.value:void 0]};return Object.fromEntries(e.map(t))}}));if(!(null==n?void 0:n.series))return null==n?void 0:n.y;const r=n.series.reduce(((t,e,r)=>(t[e]=t[e]||[],t[e].push(n.y[r]),t)),{});return Object.values(r)}(n,["y","series"])}XD.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const QD=t=>XD(Object.assign(Object.assign({},t),{orientation:"horizontal"}));QD.props=Object.assign(Object.assign({},XD.props),{defaultPosition:"bottom"});const JD=t=>XD(Object.assign(Object.assign({},t),{orientation:"vertical"}));JD.props=Object.assign(Object.assign({},XD.props),{defaultPosition:"left"});var tB=function(t){function e(e){var n=t.call(this,e,{x:0,y:0,isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new uc("scroll",r)),n.dispatchEvent(new uc("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=(0,qe.CR)(n.getLocalPosition(),2),r=e[0],i=e[1],o=(0,qe.CR)(n.padding,4),a=o[0],s=o[3],c=n.getOrientVal([r+s,i+a]),l=(n.getOrientVal(sb(t))-c)/n.trackLength;n.setValue(l,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new uc("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new uc("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new uc("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new uc("trackMouseleave",{detail:t.detail}))},n}return(0,qe.ZT)(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return lv(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=(0,qe.CR)(this.range,2),n=e[0],r=e[1];return Ge(t,n,r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength;return void 0===n?e:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=(0,qe.CR)(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],s=(0,qe.CR)(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+s[0]-(a+i),height:+s[1]-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var r=this.availableSpace,i=r.width,o=r.height;return n||this.getOrientVal([o,i])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=(0,qe.CR)(this.range,2),i=r[0],o=t*(r[1]-i-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.x,r=e.y,i=e.orientation,o=e.trackSize,a=e.padding,s=e.slidable,c=py(this.attributes,"track"),l=py(this.attributes,"thumb"),u=(0,qe.pi)((0,qe.pi)({x:n,y:r,brushable:!1,orientation:i,padding:a,selectionRadius:this.thumbRadius,showHandle:!1,slidable:s,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:o,values:this.getValues()},gy(c,"track")),gy(l,"selection"));this.slider=Qg(t).maybeAppendByClassName("scrollbar",(function(){return new VD({style:u})})).update(u).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=(0,qe.CR)(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(Ge(t,i,o)),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",(function(e){e.stopPropagation(),t.onTrackClick(e.detail)})),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},e.tag="scrollbar",e}(Hg),eB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const nB=t=>{const{orientation:e,labelFormatter:n,style:r}=t,i=eB(t,["orientation","labelFormatter","style"]);return({scales:[t],value:n,theme:o})=>{const{bbox:a}=n,{x:s,y:c,width:l,height:u}=a,{scrollbar:f={}}=o,{ratio:h,range:d}=t.getOptions(),p="horizontal"===e?l:u,g=p/h,[y,v]=d,m=v>y?0:1;return new tB({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:s,y:c,trackLength:p,value:m}),i),{orientation:e,contentLength:g,viewportLength:p}))})}};nB.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const rB=t=>nB(Object.assign(Object.assign({},t),{orientation:"horizontal"}));rB.props=Object.assign(Object.assign({},nB.props),{defaultPosition:"bottom"});const iB=t=>nB(Object.assign(Object.assign({},t),{orientation:"vertical"}));iB.props=Object.assign(Object.assign({},nB.props),{defaultPosition:"left"});const oB=(t,e)=>{const{coordinate:n}=e;return(e,r,i)=>{const[o]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=o.style,[u,f]=kg(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],h=[{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l}];return o.animate(h,Object.assign(Object.assign({},i),t))}},aB=(t,e)=>{const{coordinate:n}=e;return(e,r,i)=>{const[o]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=o.style,[u,f]=kg(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],h=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(h,Object.assign(Object.assign({},i),t))}},sB=(t,e)=>{const n=1e-4,{coordinate:r}=e;return Tl({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:fi.NUMBER}),(e,i,o)=>{const[a]=e;return Mg(r)?(e=>{const{__data__:i,style:a}=e,{fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=a,{points:u,y:f,y1:h}=i,d=Dx(r,u,[f,h]),{innerRadius:p,outerRadius:g}=d,y=[{scaleInYRadius:p+n,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:p+n,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:c,opacity:l}];return e.animate(y,Object.assign(Object.assign({},o),t))})(a):(e=>{const{style:n}=e,{transform:i="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=n,[l,u]=kg(r)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],f=[{transform:`${i} ${u}`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${i} ${u}`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.01},{transform:`${i} scale(1, 1)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c}];return e.animate(f,Object.assign(Object.assign({},o),t))})(a)}},cB=(t,e)=>{const{coordinate:n}=e;return(e,r,i)=>{const[o]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=o.style,[u,f]=kg(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],h=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(h,Object.assign(Object.assign({},i),t))}},lB=(t,e)=>{const n=1e-4;Tl({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:fi.NUMBER});const{coordinate:r}=e;return(i,o,a)=>{const[s]=i;if(!Mg(r))return oB(t,e)(i,o,a);const{__data__:c,style:l}=s,{radius:u=0,inset:f=0,fillOpacity:h=1,strokeOpacity:d=1,opacity:p=1}=l,{points:g,y:y,y1:v}=c,m=MO().cornerRadius(u).padAngle(f*Math.PI/180),b=Dx(r,g,[y,v]),{startAngle:x,endAngle:w}=b,O=[{waveInArcAngle:x+n,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+n,fillOpacity:h,strokeOpacity:d,opacity:p,offset:.01},{waveInArcAngle:w,fillOpacity:h,strokeOpacity:d,opacity:p}],k=s.animate(O,Object.assign(Object.assign({},a),t));return k.onframe=function(){s.style.d=m(Object.assign(Object.assign({},b),{endAngle:Number(s.style.waveInArcAngle)}))},k.onfinish=function(){s.style.d=m(Object.assign(Object.assign({},b),{endAngle:w}))},k}};lB.props={};const uB=t=>(e,n,r)=>{const[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:s=1}=i.style,c=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))};uB.props={};const fB=t=>(e,n,r)=>{const[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:s=1}=i.style,c=[{fillOpacity:o,strokeOpacity:a,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))};fB.props={};const hB=t=>(e,n,r)=>{const[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=i.style,l="center center",u=[{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c}];return i.animate(u,Object.assign(Object.assign({},r),t))},dB=t=>(e,n,r)=>{const[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=i.style,l="center center",u=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:l},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.99},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(u,Object.assign(Object.assign({},r),t))},pB=t=>(e,n,r)=>{var i,o;const[a]=e,s=(null===(o=(i=a).getTotalLength)||void 0===o?void 0:o.call(i))||0,c=[{lineDash:[0,s]},{lineDash:[s,0]}];return a.animate(c,Object.assign(Object.assign({},r),t))};pB.props={};const gB={opacity:1,strokeOpacity:1,fillOpacity:1,lineWidth:0,x:0,y:0,cx:0,cy:0,r:0,rx:0,ry:0,width:0,height:0},yB={[vr.CIRCLE]:["cx","cy","r"],[vr.ELLIPSE]:["cx","cy","rx","ry"],[vr.RECT]:["x","y","width","height"],[vr.IMAGE]:["x","y","width","height"],[vr.LINE]:["x1","y1","x2","y2"],[vr.POLYLINE]:["points"],[vr.POLYGON]:["points"]};function vB(t,e,n=!1){const r={};for(const i of e){const e=t.style[i];e?r[i]=e:n&&(r[i]=gB[i])}return r}const mB=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function bB(t){const{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function xB(t){const[e,n,r,i]=t;return`\n M ${e} ${n}\n L ${e+r} ${n}\n L ${e+r} ${n+i}\n L ${e} ${n+i}\n Z\n `}function wB(t,e){const[n,r,i,o]=bB(t),a=o/i,s=Math.ceil(Math.sqrt(e/a)),c=[],l=o/Math.ceil(e/s);let u=0,f=e;for(;f>0;){const t=Math.min(f,s),e=i/t;for(let i=0;i<t;i++){const t=n+i*e,o=r+u*l;c.push(xB([t,o,e,l]))}f-=t,u+=1}return c}function OB(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function kB(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function MB(t){const e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getLocalTransform(),n=[];switch(t.nodeName){case vr.LINE:var r=t.parsedStyle,i=r.x1,o=void 0===i?0:i,a=r.y1,s=void 0===a?0:a,c=r.x2,l=void 0===c?0:c,u=r.y2;n=ha(o,s,l,void 0===u?0:u);break;case vr.CIRCLE:var f=t.parsedStyle,h=f.r,d=void 0===h?0:h,p=f.cx,g=void 0===p?0:p,y=f.cy;n=da(d,d,g,void 0===y?0:y);break;case vr.ELLIPSE:var v=t.parsedStyle,m=v.rx,b=void 0===m?0:m,x=v.ry,w=void 0===x?0:x,O=v.cx,k=void 0===O?0:O,M=v.cy;n=da(b,w,k,void 0===M?0:M);break;case vr.POLYLINE:case vr.POLYGON:n=pa(t.parsedStyle.points.points,t.nodeName===vr.POLYGON);break;case vr.RECT:var _=t.parsedStyle,E=_.width,S=void 0===E?0:E,A=_.height,j=void 0===A?0:A,T=_.x,P=void 0===T?0:T,C=_.y,R=void 0===C?0:C,L=_.radius,N=L&&L.some((function(t){return 0!==t}));n=ga(S,j,P,R,N&&L.map((function(t){return Ge(t,0,Math.min(Math.abs(S)/2,Math.abs(j)/2))})));break;case vr.PATH:var I=t.parsedStyle.d.absolutePath;n=(0,G.Z)(I)}if(n.length)return fa(n,0,e)}(t);if(e&&!function(t){return!kB(t,"m")||!kB(t,"M")}(e))return e}function _B(t){const{nodeName:e}=t;if("path"===e){const e=Dh(t,"attributes");return e.markerEnd||e.markerStart}return!1}function EB(t,e,n,r){const{nodeName:i}=e,{nodeName:o}=n,a=MB(e),s=MB(n),{opacity:c=1,strokeOpacity:l=1,fillOpacity:u=1}=e.style,{opacity:f=1,strokeOpacity:h=1,fillOpacity:d=1}=n.style,p=i===o&&"path"!==i,g=void 0===a||void 0===s,y=_B(e)||_B(n);if(p||g||y)return function(t,e,n){let{transform:r}=t.style;const{transform:i}=e.style;OB(e,t);let o=mB;if(t.nodeName===vr.GROUP){const[n,i,o,a]=bB(t),[s,c,l,u]=bB(e);r=`translate(${n-s}, ${i-c}) scale(${o/l}, ${a/u})`}else o=o.concat(yB[t.nodeName]||[]);const a=[Object.assign({transform:null!=r?r:"none"},vB(t,o,!0)),Object.assign({transform:null!=i?i:"none"},vB(e,o,!0))];return e.animate(a,n)}(e,n,r);const v=function(t,e){const{nodeName:n}=t;if("path"===n)return t;const r=new wl({style:Object.assign(Object.assign({},vB(t,mB)),{d:e})});return OB(r,t),r}(t,a),m=Object.assign(Object.assign({},vB(e,mB)),{opacity:c,strokeOpacity:l,fillOpacity:u}),b=Object.assign(Object.assign({},vB(n,mB)),{opacity:f,strokeOpacity:h,fillOpacity:d}),x=[m,b];if(a!==s){x[0].d=a,x[1].d=s;const t=v.animate(x,r);return t.onfinish=()=>{Td(v,n),v.style.d=s,v.style.transform="none"},v.style.transform="none",t}return fg(m,b)?null:v.animate(x,r)}const SB=t=>(e,n,r)=>{const i=function(t="pack"){return"function"==typeof t?t:wB}(t.split),o=Object.assign(Object.assign({},r),t),{length:a}=e,{length:s}=n;if(1===a&&1===s||a>1&&s>1){const[t]=e,[r]=n;return EB(t,t,r,o)}if(1===a&&s>1){const[t]=e;return function(t,e,n,r){t.style.visibility="hidden";const i=r(t,e.length);return e.map(((e,r)=>EB(e,new wl({style:Object.assign({d:i[r]},vB(t,mB))}),e,n)))}(t,n,o,i)}if(a>1&&1===s){const[t]=n;return function(t,e,n,r){const i=r(e,t.length),{fillOpacity:o=1,strokeOpacity:a=1,opacity:s=1}=e.style,c=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:o,strokeOpacity:a,opacity:s}],l=e.animate(c,n),u=t.map(((t,r)=>EB(t,t,new wl({style:{d:i[r],fill:e.style.fill}}),n)));return[...u,l]}(e,t,o,i)}return null};SB.props={};const AB=(t,e)=>(n,r,i)=>{const[o]=n,{min:[a,s],halfExtents:c}=o.getLocalBounds(),l=2*c[0],u=2*c[1],f=new wl({style:{d:`M${a},${s}L${a+l},${s}L${a+l},${s+u}L${a},${s+u}Z`}});o.appendChild(f),o.style.clipPath=f;return oB(t,e)([f],r,i)};AB.props={};const jB=(t,e)=>(n,r,i)=>{const[o]=n,{min:[a,s],halfExtents:c}=o.getLocalBounds(),l=2*c[0],u=2*c[1],f=new wl({style:{d:`M${a},${s}L${a+l},${s}L${a+l},${s+u}L${a},${s+u}Z`}});o.appendChild(f),o.style.clipPath=f;return sB(t,e)([f],r,i)};jB.props={};var TB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function PB(t){var{delay:e,createGroup:n,createRegionGroup:r,background:i=!1,link:o=!1}=t,a=TB(t,["delay","createGroup","createRegionGroup","background","link"]);return(t,s,c)=>{const{container:l,view:u,options:f}=t,{scale:h,coordinate:d}=u;return function(t,{elements:e,datum:n,groupKey:r=(t=>t),regionGroupKey:i=(t=>t),link:o=!1,background:a=!1,delay:s=60,scale:c,coordinate:l,emitter:u,state:f={},region:h=!1,regionEleFilter:d=(t=>lk.includes(t.markType))}){var p,g;const y=null!==(p=e(t))&&void 0!==p?p:[],v=h?y.filter(d):y,m=new Set(v),b=h?i:r,x=Gh(v,b),w=uk({elementsof:e,root:t,coordinate:l,scale:c}),O=QO(v,n),[k,M]=JO(Object.assign({elements:v,valueof:O,link:o,coordinate:l},Rd(f.active,"link"))),[_,E,S]=ek(Object.assign({document:t.ownerDocument,scale:c,coordinate:l,background:a,valueof:O},Rd(f.active,"background"))),A=Jh(f,{active:Object.assign({},(null===(g=f.active)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=f.active.offset(...t),[,n]=t;return tk(v[n],e,l)}})}),j=VO(A,v),{updateState:T,removeState:P,hasState:C}=j(O);let R;const L=t=>{const{nativeEvent:e=!0}=t;let r=t.target;if(h&&(r=w(t)),!m.has(r))return;R&&clearTimeout(R);const i=b(r),o=x.get(i),a=new Set(o);for(const t of v)a.has(t)?C(t,"active")||T(t,"active"):(T(t,"inactive"),M(t)),t!==r&&E(t);_(r),k(o),e&&u.emit("element:highlight",{nativeEvent:e,data:{data:n(r),group:o.map(n)}})},N=()=>{R&&clearTimeout(R),R=setTimeout((()=>{I(),R=null}),s)},I=(t=!0)=>{for(const t of v)P(t,"active","inactive"),E(t),M(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},D=t=>{let e=t.target;h&&(e=w(t)),e?a&&!S(e)||(a||m.has(e))&&(s>0?N():I()):s>0?N():I()},B=()=>{I()};t.addEventListener("pointerover",L),t.addEventListener("pointermove",L),t.addEventListener("pointerout",D),t.addEventListener("pointerleave",B);const F=t=>{const{nativeEvent:e}=t;e||I(!1)},z=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,i=ik(v,r,n);i&&L({target:i,nativeEvent:!1})};return u.on("element:highlight",z),u.on("element:unhighlight",F),()=>{t.removeEventListener("pointerover",L),t.removeEventListener("pointermove",L),t.removeEventListener("pointerout",D),t.removeEventListener("pointerleave",B),u.off("element:highlight",z),u.off("element:unhighlight",F);for(const t of v)E(t),M(t)}}(BO(l),Object.assign({elements:NO,datum:GO(u),groupKey:n?n(u):void 0,regionGroupKey:r?r(u):t=>t.__data__.x,coordinate:d,scale:h,state:KO(f,[["active",i?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:i,link:o,delay:e,emitter:c},a))}}function CB(t){return PB(Object.assign(Object.assign({},t),{createGroup:$O}))}function RB(t){return PB(Object.assign(Object.assign({},t),{createGroup:WO}))}PB.props={reapplyWhenUpdate:!0},CB.props={reapplyWhenUpdate:!0},RB.props={reapplyWhenUpdate:!0};var LB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function NB(t,{elements:e,datum:n,groupKey:r=(t=>t),regionGroupKey:i=(t=>t),link:o=!1,single:a=!1,multipleSelectHotkey:s,coordinate:c,background:l=!1,scale:u,emitter:f,state:h={},region:d=!1,regionEleFilter:p=(t=>lk.includes(t.markType))}){var g;const y=e(t),v=new Set(y),m=uk({elementsof:e,root:t,coordinate:c,scale:u}),b=Gh(y,r),x=Gh(y,i),w=QO(y,n),[O,k]=JO(Object.assign({link:o,elements:y,valueof:w,coordinate:c},Rd(h.selected,"link"))),[M,_]=ek(Object.assign({document:t.ownerDocument,background:l,coordinate:c,scale:u,valueof:w},Rd(h.selected,"background"))),E=Jh(h,{selected:Object.assign({},(null===(g=h.selected)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=h.selected.offset(...t),[,n]=t;return tk(y[n],e,c)}})}),S=VO(E,y),{updateState:A,removeState:j,hasState:T}=S(w);let P=!a,C=null;const R=(t=!0)=>{for(const t of y)j(t,"selected","unselected"),k(t),_(t);t&&f.emit("element:unselect",{nativeEvent:!0})},L=({event:t,element:e,nativeEvent:i=!0,filter:o=(t=>!0),groupBy:a=r,groupMap:s=b})=>{const c=y.filter(o);if(T(e,"selected"))R();else{const r=a(e),o=s.get(r),l=new Set(o);for(const t of c)l.has(t)?A(t,"selected"):(A(t,"unselected"),k(t)),t!==e&&_(t);if(O(o),M(e),!i)return;f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...o.map(n)]}}))}},N=({event:t,element:e,nativeEvent:i=!0,filter:a=(t=>!0),groupBy:s=r,groupMap:c=b})=>{const l=s(e),u=c.get(l),h=new Set(u),d=y.filter(a);if(T(e,"selected")){const t=y.some((t=>!h.has(t)&&T(t,"selected")));if(!t)return R();for(const t of u)A(t,"unselected"),k(t),_(t)}else{const t=u.some((t=>T(t,"selected")));for(const t of d)h.has(t)?A(t,"selected"):T(t,"selected")||A(t,"unselected");!t&&o&&O(u),M(e)}i&&f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:y.filter((t=>T(t,"selected"))).map(n)}}))},I=t=>{if(v.has(t))return t;for(const e of v){let n=null;if(AO(e,(r=>{r===t&&(n=e)})),n)return n}return t},D=t=>{const{target:e,nativeEvent:n=!0}=t,o=P?N:L;let a=e;const s=(t=>{if(v.has(t))return!0;for(const e of v)if(AO(e,(e=>e===t)))return!0;return!1})(e);return!d||s?s?o({event:t,element:I(a),nativeEvent:n,groupBy:r}):R():(a=m(t),v.has(a)?o({event:t,element:a,nativeEvent:n,filter:p,groupBy:i,groupMap:x}):R())},B=Array.isArray(s)?s:[s],F=t=>{B.includes(t.code)&&!C&&(C=t.code,P=!0)},z=t=>{t.code===C&&(C=null,P=!1)};t.addEventListener("click",D),s&&(P=!1,document.addEventListener("keydown",F),document.addEventListener("keyup",z));const Z=t=>{const{nativeEvent:e,data:r}=t;if(e)return;const i=P?r.data:r.data.slice(0,1);for(const t of i){const e=ik(y,t,n);D({target:e,nativeEvent:!1})}},W=()=>{R(!1)};return f.on("element:select",Z),f.on("element:unselect",W),()=>{for(const t of y)k(t);t.removeEventListener("click",D),s&&(document.removeEventListener("keydown",F),document.removeEventListener("keyup",z)),f.off("element:select",Z),f.off("element:unselect",W)}}function IB(t){var{createGroup:e,createRegionGroup:n,background:r=!1,link:i=!1}=t,o=LB(t,["createGroup","createRegionGroup","background","link"]);return(t,a,s)=>{const{container:c,view:l,options:u}=t,{coordinate:f,scale:h}=l;return NB(BO(c),Object.assign({elements:NO,datum:GO(l),groupKey:e?e(l):void 0,regionGroupKey:n?n(l):t=>t.__data__.x,coordinate:f,scale:h,state:KO(u,[["selected",r?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:r,link:i,emitter:s},o))}}function DB(t){return IB(Object.assign(Object.assign({},t),{createGroup:$O}))}function BB(t){return IB(Object.assign(Object.assign({},t),{createGroup:WO}))}function FB({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:o,setState:a,container:s}=r,c=BO(s),l=fA((t=>{const e=zO(c,t);if(!e)return a("fisheye"),void o();a("fisheye",(t=>{const n=Jh({},t,{interaction:{tooltip:{preserve:!0}}});for(const t of n.marks)t.animate=!1;const[r,i]=e,o=function(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find((t=>"fisheye"===t.type));if(r)return r;const i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}(n);return o.focusX=r,o.focusY=i,o.visual=!0,n})),o()}),t,{leading:e,trailing:n});return c.addEventListener("pointerenter",l),c.addEventListener("pointermove",l),c.addEventListener("pointerleave",l),()=>{c.removeEventListener("pointerenter",l),c.removeEventListener("pointermove",l),c.removeEventListener("pointerleave",l)}}}IB.props={reapplyWhenUpdate:!0},DB.props={reapplyWhenUpdate:!0},BB.props={reapplyWhenUpdate:!0};var zB=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},ZB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function WB(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=(t=>`${t}`)}=t,o=ZB(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{view:a,container:s,update:c,setState:l}=t,{markState:u,scale:f,coordinate:h}=a,d=function(t,e,n){const[r]=Array.from(t.entries()).filter((([t])=>t.type===e)).map((([t])=>{const{encode:e}=t;return Object.fromEntries(n.map((t=>{const n=e[t];return[t,n?n.value:void 0]})))}));return r}(u,"line",["x","y","series"]);if(!d)return;const{y:p,x:g,series:y=[]}=d,v=p.map(((t,e)=>e)),m=Ow(v.map((t=>g[t]))),b=BO(s),x=s.getElementsByClassName(R),w=Gh(s.getElementsByClassName(D),(t=>t.__data__.key.split("-")[0])),O=new bl({style:Object.assign({x1:0,y1:0,x2:0,y2:b.getAttribute("height"),stroke:"black",lineWidth:1},Rd(o,"rule"))}),k=new Al({style:Object.assign({x:0,y:b.getAttribute("height"),text:"",fontSize:10},Rd(o,"label"))});O.append(k),b.appendChild(O);const M=(t,e,n)=>{const[r]=t.invert(n),i=e.invert(r);return m[Xw(m,i)]},_=(t,e)=>{O.setAttribute("x1",t[0]),O.setAttribute("x2",t[0]),k.setAttribute("text",i(e))};let E;const S=fA((t=>{const e=zO(b,t);e&&(t=>{const{scale:e,coordinate:n}=E,{x:r,y:i}=e,o=M(n,r,t);_(t,o);for(const t of x){const{seriesIndex:e,key:r}=t.__data__,a=e[$w((t=>g[+t])).center(e,o)],s=[0,i.map(1)],c=[0,i.map(p[a]/p[e[0]])],[,l]=n.map(s),[,u]=n.map(c),f=l-u;t.setAttribute("transform",`translate(0, ${f})`);const h=w.get(r)||[];for(const t of h)t.setAttribute("dy",f)}})(e)}),e,{leading:n,trailing:r});return(t=>{zB(this,void 0,void 0,(function*(){const{x:e}=f,n=M(h,e,t);_(t,n),l("chartIndex",(t=>{const e=Jh({},t),r=e.marks.find((t=>"line"===t.type)),i=dg(Yh(v,(t=>dg(t,(t=>+p[t]))/KE(t,(t=>+p[t]))),(t=>y[t])).values());Jh(r,{scale:{y:{domain:[1/i,i]}}});const o=function(t){const{transform:e=[]}=t,n=e.find((t=>"normalizeY"===t.type));if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);o.groupBy="color",o.basis=(t,e)=>e[t[$w((t=>g[+t])).center(t,n)]];for(const t of e.marks)t.animate=!1;return e}));const r=yield c("chartIndex");E=r.view}))})([0,0]),b.addEventListener("pointerenter",S),b.addEventListener("pointermove",S),b.addEventListener("pointerleave",S),()=>{O.remove(),b.removeEventListener("pointerenter",S),b.removeEventListener("pointermove",S),b.removeEventListener("pointerleave",S)}}}WB.props={reapplyWhenUpdate:!0};var $B=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))};const GB="legend-category";function qB(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function YB(t){return t.getElementsByClassName("legend-category-item-label")[0]}function HB(t){return t.getElementsByClassName("legend-category-item-focus-group")[0]}function VB(t){return t.getElementsByClassName("items-item")}function UB(t){return t.getElementsByClassName(GB)}function XB(t){return t.getElementsByClassName("legend-continuous")}function KB(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function QB(t,{legend:e,channel:n,value:r,ordinal:i,channels:o,allChannels:a,facet:s=!1}){return $B(this,void 0,void 0,(function*(){const{view:c,update:l,setState:u}=t;u(e,(t=>{const{marks:e}=t,l=e.map((t=>{if("legends"===t.type)return t;if(wg.includes(t.type))return t;const{transform:e=[],data:l=[]}=t,u=e.findIndex((({type:t})=>t.startsWith("group")||t.startsWith("bin"))),f=[...e];l.length&&f.splice(u+1,0,{type:"filter",[n]:{value:r,ordinal:i}});const h=Object.fromEntries(o.map((t=>[t,{domain:c.scale[t].getOptions().domain}])));return Jh({},t,Object.assign(Object.assign({transform:f,scale:h},!i&&{animate:!1}),{legend:!s&&Object.fromEntries(a.map((t=>[t,{preserve:!0}])))}))}));return Object.assign(Object.assign({},t),{marks:l})})),yield l()}))}function JB(t,e){for(const n of t)QB(n,Object.assign(Object.assign({},e),{facet:!0}))}function tF(){return(t,e,n)=>{const{container:r}=t,i=e.filter((e=>e!==t)),o=i.length>0,a=t=>KB(t).scales.map((t=>t.name)),s=[...UB(r),...XB(r)],c=s.flatMap(a),l=fA(o?JB:QB,50,{trailing:!0}),u=s.map((e=>{const{name:s,domain:u}=KB(e).scales[0],f={legend:e,channel:s,channels:a(e),allChannels:c};return e.className===GB?function(t,{legends:e,marker:n,label:r,datum:i,filter:o,defaultSelect:a,emitter:s,channel:c,state:l={}}){const u=new Map,f=new Map,h=new Map,d=new Map,{unselected:p={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=l,g={unselected:Rd(p,"marker")},y={unselected:Rd(p,"label")},{setState:v,removeState:m}=UO(g,void 0),{setState:b,removeState:x}=UO(y,void 0),w=Array.from(e(t));let O=w.map(i);const k=()=>{for(const t of w){const e=i(t),o=n(t),a=r(t);O.includes(e)?(m(o,"unselected"),x(a,"unselected")):(v(o,"unselected"),b(a,"unselected"))}};for(const e of w){const n=()=>{nk(t,"pointer")},r=()=>{rk(t)},a=t=>$B(this,void 0,void 0,(function*(){const n=i(e),r=O.indexOf(n);-1===r?O.push(n):O.splice(r,1),yield o(O),k();const{nativeEvent:a=!0}=t;a&&(O.length===w.length?s.emit("legend:reset",{nativeEvent:a}):s.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:a,data:{channel:c,values:O}})))}));e.addEventListener("click",a),e.addEventListener("pointerenter",n),e.addEventListener("pointerout",r),u.set(e,a),f.set(e,n),h.set(e,r);const l=HB(e);if(l){const t=t=>$B(this,void 0,void 0,(function*(){t.stopPropagation();const n=i(e),r=O.indexOf(n),{nativeEvent:a=!0}=t;if(-1!==r&&1===O.length){if(!a)return;O=w.map(i),yield o(O),k(),s.emit("legend:reset",{nativeEvent:a})}else{if(O=[n],yield o(O),k(),!a)return;s.emit("legend:focus",Object.assign(Object.assign({},t),{nativeEvent:a,data:{channel:c,value:n}}))}}));l.addEventListener("click",t),d.set(e,t)}}const M=t=>$B(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,value:i}=n;r===c&&(O=[i],yield o(O),k())})),_=t=>$B(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,values:i}=n;r===c&&(O=i,yield o(O),k())})),E=t=>$B(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;e||(O=w.map(i),yield o(O),k())}));return s.on("legend:filter",_),s.on("legend:focus",M),s.on("legend:reset",E),a&&s.emit("legend:filter",{data:{channel:c,values:a}}),()=>{for(const t of w){t.removeEventListener("click",u.get(t)),t.removeEventListener("pointerenter",f.get(t)),t.removeEventListener("pointerout",h.get(t));const e=HB(t);e&&e.removeEventListener("click",d.get(t)),s.on("legend:focus",M),s.off("legend:filter",_),s.off("legend:reset",E)}}}(r,{legends:VB,marker:qB,label:YB,datum:t=>{const{__data__:e}=t,{index:n}=e;return u[n]},filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});l(o?i:t,n)},state:e.attributes.state,defaultSelect:e.attributes.defaultSelect,channel:s,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:i}){const o=({detail:{value:t}})=>{n(t),r.emit({nativeEvent:!0,data:{channel:i,values:t}})};return e.addEventListener("valuechange",o),()=>{e.removeEventListener("valuechange",o)}}(0,{legend:e,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!1});l(o?i:t,n)},emitter:n,channel:s})}));return()=>{u.forEach((t=>t()))}}}function eF(){return(t,e,n)=>{const{container:r,view:i,options:o}=t,a=UB(r),s=NO(r),c=t=>KB(t).scales[0].name,l=t=>{const{scale:{[t]:e}}=i;return e},u=KO(o,["active","inactive"]),f=QO(s,GO(i)),h=[];for(const t of a){const e=e=>{const{data:n}=t.attributes,{__data__:r}=e,{index:i}=r;return n[i].label},r=c(t),i=VB(t),o=l(r),a=Gh(s,(t=>o.invert(t.__data__[r]))),{state:d={}}=t.attributes,{inactive:p={}}=d,{setState:g,removeState:y}=UO(u,f),v={inactive:Rd(p,"marker")},m={inactive:Rd(p,"label")},{setState:b,removeState:x}=UO(v),{setState:w,removeState:O}=UO(m),k=t=>{for(const e of i){const n=qB(e),r=YB(e);e===t||null===t?(x(n,"inactive"),O(r,"inactive")):(b(n,"inactive"),w(r,"inactive"))}},M=(t,i)=>{const o=e(i),c=new Set(a.get(o));for(const t of s)c.has(t)?g(t,"active"):g(t,"inactive");k(i);const{nativeEvent:l=!0}=t;l&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:l,data:{channel:r,value:o}}))},_=new Map;for(const t of i){const e=e=>{M(e,t)};t.addEventListener("pointerover",e),_.set(t,e)}const E=t=>{for(const t of s)y(t,"inactive","active");k(null);const{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},S=t=>{const{nativeEvent:n,data:o}=t;if(n)return;const{channel:a,value:s}=o;if(a!==r)return;const c=i.find((t=>e(t)===s));c&&M({nativeEvent:!1},c)},A=t=>{const{nativeEvent:e}=t;e||E({nativeEvent:!1})};t.addEventListener("pointerleave",E),n.on("legend:highlight",S),n.on("legend:unhighlight",A);const j=()=>{t.removeEventListener(E),n.off("legend:highlight",S),n.off("legend:unhighlight",A);for(const[t,e]of _)t.removeEventListener(e)};h.push(j)}return()=>h.forEach((t=>t()))}}var nF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function rF(t,e){const[n,r,i,o]=t,[a,s,c,l]=e;return!(a>i||c<n||s>o||l<r)}function iF(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function oF(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const aF=rw((t=>{const e=t.attributes,{x:n,y:r,width:i,height:o,class:a,renders:s={},handleSize:c=10,document:l}=e,u=nF(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||void 0===i||void 0===o||void 0===n||void 0===r)return;const f=c/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));const{handle:r}=t;return r.attr(e),r},d=Rd(Nd(u,"handleNW","handleNE"),"handleN"),{render:p=h}=d,g=nF(d,["render"]),y=Rd(u,"handleE"),{render:v=h}=y,m=nF(y,["render"]),b=Rd(Nd(u,"handleSE","handleSW"),"handleS"),{render:x=h}=b,w=nF(b,["render"]),O=Rd(u,"handleW"),{render:k=h}=O,M=nF(O,["render"]),_=Rd(u,"handleNW"),{render:E=h}=_,S=nF(_,["render"]),A=Rd(u,"handleNE"),{render:j=h}=A,T=nF(A,["render"]),P=Rd(u,"handleSE"),{render:C=h}=P,R=nF(P,["render"]),L=Rd(u,"handleSW"),{render:N=h}=L,I=nF(L,["render"]),D=t=>()=>{const e=rw((e=>((t,e)=>{const{id:n}=t,r=e(t,t.attributes,l);r.id=n,r.style.draggable=!0})(e,t)));return new e({})},B=zd(t).attr("className",a).style("transform",`translate(${n}, ${r})`).style("draggable",!0);B.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(oF,Object.assign(Object.assign({width:i,height:o},Nd(u,"handle")),{transform:void 0})),B.maybeAppend("handle-n",D(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(oF,g),B.maybeAppend("handle-e",D(v)).style("x",i-f).style("y",f).style("width",c).style("height",o-c).style("fill","transparent").call(oF,m),B.maybeAppend("handle-s",D(x)).style("x",f).style("y",o-f).style("width",i-c).style("height",c).style("fill","transparent").call(oF,w),B.maybeAppend("handle-w",D(k)).style("x",-f).style("y",f).style("width",c).style("height",o-c).style("fill","transparent").call(oF,M),B.maybeAppend("handle-nw",D(E)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(oF,S),B.maybeAppend("handle-ne",D(j)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(oF,T),B.maybeAppend("handle-se",D(C)).style("x",i-f).style("y",o-f).style("width",c).style("height",c).style("fill","transparent").call(oF,R),B.maybeAppend("handle-sw",D(N)).style("x",-f).style("y",o-f).style("width",c).style("height",c).style("fill","transparent").call(oF,I)}));function sF(t,e){var{brushed:n=(()=>{}),brushended:r=(()=>{}),brushcreated:i=(()=>{}),brushstarted:o=(()=>{}),brushupdated:a=(()=>{}),extent:s=iF(t),brushRegion:c=((t,e,n,r,i)=>[t,e,n,r]),reverse:l=!1,fill:u="#777",fillOpacity:f="0.3",stroke:h="#fff",selectedHandles:d=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,p=nF(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let g=null,y=null,v=null,m=null,b=null,x=!1;const[w,O,k,M]=s;nk(t,"crosshair"),t.style.draggable=!0;const _=(t,e,n)=>{if(o(n),m&&m.remove(),b&&b.remove(),g=[t,e],l)return E();S()},E=()=>{b=new wl({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:h,pointerEvents:"none"})}),m=new aF({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},S=()=>{m=new aF({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:h,draggable:!0}),className:"mask"}),t.appendChild(m)},A=(t=!0)=>{m&&m.remove(),b&&b.remove(),g=null,y=null,v=null,x=!1,m=null,b=null,r(t)},j=(t,e,r=!0)=>{const[i,o,a,u]=function(t,e,n,r,i){const[o,a,s,c]=i;return[Math.max(o,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[f,h,d,p]=c(i,o,a,u,s);return l?P(f,h,d,p):T(f,h,d,p),n(f,h,d,p,r),[f,h,d,p]},T=(t,e,n,r)=>{m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},P=(t,e,n,r)=>{b.style.d=`\n M${w},${O}L${k},${O}L${k},${M}L${w},${M}Z\n M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z\n `,m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},C={"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"}},R=t=>N(t)||L(t),L=t=>{const{id:e}=t;return-1!==d.indexOf(e)&&new Set(Object.keys(C)).has(e)},N=t=>t===m.getElementById("selection"),I=e=>{const{target:n}=e,[r,i]=ZO(t,e);if(!m||!R(n))return _(r,i,e),void(x=!0);R(n)&&(v=[r,i])},D=e=>{const{target:n}=e,r=ZO(t,e);if(!g)return;if(!v)return j(g,r);if(N(n))return(t=>{const e=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,n=t[0]-v[0],r=t[1]-v[1],i=e(n,g[0],y[0],w,k),o=e(r,g[1],y[1],O,M),a=[g[0]+i,g[1]+o],s=[y[0]+i,y[1]+o];j(a,s)})(r);const[i,o]=[r[0]-v[0],r[1]-v[1]],{id:a}=n;if(C[a]){const[t,e,n,r]=C[a].vector;return j([g[0]+i*t,g[1]+o*e],[y[0]+i*n,y[1]+o*r])}},B=e=>{if(v){v=null;const{x:t,y:n,width:r,height:i}=m.style;return g=[t,n],y=[t+r,n+i],void a(t,n,t+r,n+i,e)}y=ZO(t,e);const[n,r,o,s]=j(g,y);x=!1,i(n,r,o,s,e)},F=t=>{const{target:e}=t;m&&!R(e)&&A()},z=e=>{const{target:n}=e;m&&R(n)&&!x?N(n)?nk(t,"move"):L(n)&&nk(t,C[n.id].cursor):nk(t,"crosshair")},Z=()=>{nk(t,"default")};return t.addEventListener("dragstart",I),t.addEventListener("drag",D),t.addEventListener("dragend",B),t.addEventListener("click",F),t.addEventListener("pointermove",z),t.addEventListener("pointerleave",Z),{mask:m,move(t,e,n,r,i=!0){m||_(t,e,{}),g=[t,e],y=[n,r],j([t,e],[n,r],i)},remove(t=!0){m&&A(t)},destroy(){m&&A(!1),nk(t,"default"),t.removeEventListener("dragstart",I),t.removeEventListener("drag",D),t.removeEventListener("dragend",B),t.removeEventListener("click",F),t.removeEventListener("pointermove",z),t.removeEventListener("pointerleave",Z)}}}function cF(t,e,n){return e.filter((e=>{if(e===t)return!1;const{interaction:r={}}=e.options;return Object.values(r).find((t=>t.brushKey===n))}))}function lF(t,e,n){return cF(t,e,n).map((t=>t.options))}function uF(t,e){var{elements:n,selectedHandles:r,siblings:i=(t=>[]),datum:o,brushRegion:a,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:h=(t=>t),bboxOf:d=(t=>{const{x:e,y:n,width:r,height:i}=t.style;return{x:e,y:n,width:r,height:i}}),state:p={},emitter:g}=e,y=nF(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const v=n(t),m=i(t),b=m.flatMap(n),x=QO(v,o),w=Rd(y,"mask"),{setState:O,removeState:k}=UO(p,x),M=new Map,{width:_,height:E,x:S=0,y:A=0}=d(t),j=s||[0,0,_,E],T=()=>{for(const t of[...v,...b])k(t,"active","inactive")},P=(t,e,n,r)=>{var i;for(const t of m)null===(i=t.brush)||void 0===i||i.remove();const o=new Set;for(const i of v){const{min:a,max:s}=i.getLocalBounds(),[c,l]=a,[u,f]=s;rF([c,l,u,f],[t,e,n,r])?(O(i,"active"),o.add(h(i))):O(i,"inactive")}for(const t of b)o.has(h(t))?O(t,"active"):O(t,"inactive")},C=()=>{for(const t of v)k(t,"inactive");for(const t of M.values())t.remove();M.clear()},R=(e,n,r,i)=>{const o=t=>{const e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),M.set(t,e),e},a=new El({style:{x:e+S,y:n+A,width:r-e,height:i-n}});t.appendChild(a);for(const t of v){const e=M.get(t)||o(t);e.style.clipPath=a,O(t,"inactive"),O(e,"active")}},L=sF(t,Object.assign(Object.assign({},w),{extent:j,brushRegion:a,reverse:c,selectedHandles:r,brushended:t=>{const e=f?C:T;t&&g.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{const o=eO(t,e,n,r,l,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}});(f?R:P)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{const o=eO(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushupdated:(t,e,n,r,i)=>{const o=eO(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushstarted:t=>{g.emit("brush:start",t)}})),N=({nativeEvent:t,data:e})=>{if(t)return;const{selection:n}=e,[r,i,o,a]=function(t,e,n){const{x:r,y:i}=e,[o,a]=t,s=nO(o,r),c=nO(a,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,h]=n.map(l),[d,p]=n.map(u);return[f,h,d,p]}(n,l,u);L.move(r,i,o,a,!1)};g.on("brush:highlight",N);const I=({nativeEvent:t}={})=>{t||L.remove(!1)};g.on("brush:remove",I);const D=L.destroy.bind(L);return L.destroy=()=>{g.off("brush:highlight",N),g.off("brush:remove",I),D()},L}function fF(t){var{facet:e,brushKey:n}=t,r=nF(t,["facet","brushKey"]);return(t,i,o)=>{const{container:a,view:s,options:c}=t,l=BO(a),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=s;if(e){const e=l.getBounds(),n=e.min[0],a=e.min[1],s=e.max[0],c=e.max[1];return uF(l.parentNode.parentNode,Object.assign(Object.assign({elements:()=>IO(t,i),datum:GO(DO(t,i).map((t=>t.view))),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,s,c],state:KO(DO(t,i).map((t=>t.options)),f),emitter:o,scale:h,coordinate:d,selectedHandles:void 0},u),r))}const p=uF(l,Object.assign(Object.assign({elements:NO,key:t=>t.__data__.key,siblings:()=>function(t,e,n){return cF(t,e,n).map((t=>BO(t.container)))}(t,i,n),datum:GO([s,...cF(t,i,n).map((t=>t.view))]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:KO([c,...lF(t,i,n)],f),emitter:o,scale:h,coordinate:d,selectedHandles:void 0},u),r));return l.brush=p,()=>p.destroy()}}function hF(t,e,n,r,i){const[,o,,a]=i;return[t,o,n,a]}function dF(t){return fF(Object.assign(Object.assign({},t),{brushRegion:hF,selectedHandles:["handle-e","handle-w"]}))}function pF(t,e,n,r,i){const[o,,a]=i;return[o,e,a,r]}function gF(t){return fF(Object.assign(Object.assign({},t),{brushRegion:pF,selectedHandles:["handle-n","handle-s"]}))}fF.props={reapplyWhenUpdate:!0};var yF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const vF="axis-hot-area";function mF(t){return t.getElementsByClassName("axis")}function bF(t){return t.getElementsByClassName("axis-line")[0]}function xF(t){return function(t){return t.getElementsByClassName("axis-main-group")[0]}(t).getLocalBounds()}function wF(t,e){var{cross:n,offsetX:r,offsetY:i}=e,o=yF(e,["cross","offsetX","offsetY"]);const a=xF(t),s=bF(t),[c]=s.getLocalBounds().min,[l,u]=a.min,[f,h]=a.max,d=2*(f-l);return{brushRegion:pF,hotZone:new El({className:vF,style:Object.assign({width:n?d/2:d,transform:`translate(${(n?l:c-d/2).toFixed(2)}, ${u})`,height:h-u},o)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,i)=>[Math.floor(l-r),e,Math.ceil(f-r),i]}}function OF(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,o=yF(e,["offsetY","offsetX","cross"]);const a=xF(t),s=bF(t),[,c]=s.getLocalBounds().min,[l,u]=a.min,[f,h]=a.max,d=h-u;return{brushRegion:hF,hotZone:new El({className:vF,style:Object.assign({width:f-l,height:i?d:2*d,transform:`translate(${l}, ${i?u:c-d})`},o)}),extent:i?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,i)=>[t,Math.floor(u-n),r,Math.ceil(h-n)]}}function kF(t){return(e,n,r)=>{const{container:i,view:o,options:a}=e,s=BO(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=o;return function(t,e){var{axes:n,elements:r,points:i,horizontal:o,datum:a,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:h}=e,d=yF(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),g=n(t),y=QO(p,a),{setState:v,removeState:m}=UO(u,y),b=new Map,x=Rd(d,"mask"),w=t=>Array.from(b.values()).every((([e,n,r,i])=>t.some((([t,o])=>t>=e&&t<=r&&o>=n&&o<=i)))),O=g.map((t=>t.attributes.scale)),k=t=>t.length>2?[t[0],t[t.length-1]]:t,M=new Map,_=()=>{M.clear();for(let t=0;t<g.length;t++){const e=O[t],{domain:n}=e.getOptions();M.set(t,k(n))}};_();const E=(t,e)=>{const n=[];for(const t of p){const e=i(t);w(e)?(v(t,"active"),n.push(t)):v(t,"inactive")}M.set(t,A(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!j)return Array.from(M.values());const t=[];for(const[e,n]of M){const r=O[e],{name:i}=r.getOptions();"x"===i?t[0]=n:t[1]=n}return t})()}})},S=t=>{for(const t of p)m(t,"active","inactive");_(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},A=(t,e)=>{const n=O[e],{name:r}=n.getOptions(),i=t.map((t=>{const e=t.__data__;return n.invert(e[r])}));return k(tO(n,i))},j=g.some(o)&&g.some((t=>!o(t))),T=[];for(let t=0;t<g.length;t++){const e=g[t],n=o(e)?OF:wF,{hotZone:r,brushRegion:i,extent:a}=n(e,{offsetY:s,offsetX:c,cross:j,zIndex:999,fill:"transparent"});e.parentNode.appendChild(r);const u=sF(r,Object.assign(Object.assign({},x),{reverse:l,brushRegion:i,brushended(n){b.delete(e),0===Array.from(b.entries()).length?S(n):E(t,n)},brushed(n,r,i,o,s){b.set(e,a(n,r,i,o)),E(t,s)}}));T.push(u)}const P=(t={})=>{const{nativeEvent:e}=t;e||T.forEach((t=>t.remove(!1)))},C=(t,e,n)=>{const[r,i]=t,a=R(r,e,n),s=R(i,e,n)+(t=>t.getStep?t.getStep():0)(e);return o(n)?[a,-1/0,s,1/0]:[-1/0,a,1/0,s]},R=(t,e,n)=>{const{height:r,width:i}=h.getOptions(),a=e.clone();return o(n)?a.update({range:[0,i]}):a.update({range:[r,0]}),a.map(t)},L=t=>{const{nativeEvent:e}=t;if(e)return;const{selection:n}=t.data;for(let t=0;t<T.length;t++){const e=n[t],r=T[t],i=g[t];if(e){const n=O[t];r.move(...C(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",P),f.on("brushAxis:highlight",L),()=>{T.forEach((t=>t.destroy())),f.off("brushAxis:remove",P),f.off("brushAxis:highlight",L)}}(i,Object.assign({elements:NO,axes:mF,offsetY:l,offsetX:c,points:t=>t.__data__.points,horizontal:t=>{const{startPos:[e,n],endPos:[r,i]}=t.attributes;return e!==r&&n===i},datum:GO(o),state:KO(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var MF=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},_F=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function EF(t){var{hideX:e=!0,hideY:n=!0}=t,r=_F(t,["hideX","hideY"]);return(t,i,o)=>{const{container:a,view:s,options:c,update:l,setState:u}=t,f=BO(a);let h=!1,d=!1,p=s;const{scale:g,coordinate:y}=s;return function(t,e){var{filter:n,reset:r,brushRegion:i,extent:o,reverse:a,emitter:s,scale:c,coordinate:l,selection:u,series:f=!1}=e;const h=Rd(_F(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:d,height:p}=t.getBBox(),g=o||[0,0,d,p],y=function(t=300){let e=null;return n=>{const{timeStamp:r}=n;return null!==e&&r-e<t?(e=r,!0):(e=r,!1)}}(),v=sF(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:a,brushcreated:function(t,e,r,i,o){t===r&&e===i||(o.nativeEvent=!0,n(u(t,e,r,i),o),v.remove())}}));function m(t){y(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",m);const b=({nativeEvent:t,data:e})=>{if(t)return;const{selection:r}=e;n(r,{nativeEvent:!1})};return s.on("brush:filter",b),()=>{v.destroy(),s.off("brush:filter",b),t.removeEventListener("click",m)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{const{scale:i,coordinate:o}=p;return eO(t,e,n,r,i,o)},filter:(t,r)=>MF(this,void 0,void 0,(function*(){if(d)return;d=!0;const[i,a]=t;u("brushFilter",(t=>{const{marks:r}=t,o=r.map((t=>Jh({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:i,nice:!1},y:{domain:a,nice:!1}}})));return Object.assign(Object.assign({},c),{marks:o,clip:!0})})),o.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[i,a]}}));const s=yield l();p=s.view,d=!1,h=!0})),reset:t=>{if(d||!h)return;const{scale:e}=s,{x:n,y:r}=e,i=n.getOptions().domain,a=r.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[i,a]}})),h=!1,p=s,u("brushFilter"),l()},extent:void 0,emitter:o,scale:g,coordinate:y},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function SF(t){return EF(Object.assign(Object.assign({hideX:!0},t),{brushRegion:hF}))}function AF(t){return EF(Object.assign(Object.assign({hideY:!0},t),{brushRegion:pF}))}function jF(t,e,n){const r=t?n:e,i=t?e:n,o=Qw(r),a=Qw(i),s=i.getOptions().domain;return{currentScale:r,targetScale:i,isSourceDiscrete:o,isTargetDiscrete:a,shouldPreserveZeroBaseline:!a&&s&&s.length>=2&&0===s[0]}}function TF({isTargetDiscrete:t,filteredValues:e,shouldPreserveZeroBaseline:n}){if(t)return r=e,Array.from(new Set(r)).sort(((t,e)=>t-e));{const t=Math.min(...e),r=Math.max(...e);return n?[0,r]:[t,r]}var r}function PF(t){return t instanceof Date?t.getTime():"string"==typeof t?parseFloat(t):Number(t)}function CF(t,e,n,r,i,o="filter",a=!1){if(hk(o))return[];const s=a?"y":"x",c=a?"x":"y",l=[];for(const r of t){const{channelData:t}=r,i=t[s]||[],a=t[c]||[],u=Array.isArray(i[0])?i[0]:i,f=Array.isArray(a[0]);if(0===u.length)continue;const h=u.length;for(let t=0;t<h;t++){const r=u[t];let i=!1;if(n)i=e.includes(r);else if(e.length>=2){const t=PF(r),n=PF(e[0]),o=PF(e[e.length-1]);isNaN(t)||isNaN(n)||isNaN(o)||(i=t>=n&&t<=o)}if("filter"===o&&i)if(f){const e=a.length;for(let n=0;n<e;n++){const e=a[n];if(Array.isArray(e)&&t<e.length){const n=PF(e[t]);isNaN(n)||l.push(n)}}}else if(t<a.length){const e=PF(a[t]);isNaN(e)||l.push(e)}}}return l.length>0?TF({isTargetDiscrete:r,filteredValues:l,shouldPreserveZeroBaseline:i}):[]}function RF(t,e,n,r){r&&e instanceof Map?e.forEach(((e,n)=>{e&&Array.isArray(e)&&e.length>0&&(t[n]=e)})):!r&&Array.isArray(e)&&e.length>0&&(t[n?"x":"y"]=e)}var LF=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))};const NF="slider";function IF(t){var e,n,r,i;if(!(null==t?void 0:t.markState))return 0;let o=0;for(const[a,s]of t.markState.entries()){if("point"!==a.type||!(null==s?void 0:s.channels))continue;const t=null===(e=s.channels)||void 0===e?void 0:e.find((t=>"size"===t.name));if(t)if((null===(r=null===(n=t.scale)||void 0===n?void 0:n.range)||void 0===r?void 0:r.length)>0){const e=Math.max(...t.scale.range.filter((t=>"number"==typeof t)));o=Math.max(o,e)}else if((null===(i=t.values)||void 0===i?void 0:i.length)>0){const e=t.values.filter((t=>void 0!==t.value)).flatMap((t=>Array.isArray(t.value)?t.value:[t.value])).filter((t=>"number"==typeof t&&!isNaN(t)));e.length>0&&(o=Math.max(o,...e))}}return o}function DF(t,e,n,r,i,o,a){if(a){const s=o?r:i.x,c=o?i.y:r;t.emit(e,Object.assign(Object.assign({},n),{nativeEvent:a,data:{selection:[zF(s),zF(c)]}}))}}function BF(t,e,n,r){const{domain0:i,filteredDomain:o,channel0:a,channel1:s,prefix:c,hasState:l,isMultiAxis:u,markToScaleMap:f,enableAdaptiveFiltering:h}=r;u&&o instanceof Map?t(e,(t=>Object.assign({},function(t,e,n,r,i=!1,o="x",a="y",s=new Map,c=new Map){const{marks:l}=t,u=IF(e),f=l.map((t=>{var e,l;const u="string"==typeof(null==t?void 0:t.key)?t.key:String((null==t?void 0:t.key)||""),f=s.get(u),h=c.get(f),d=h&&{y:Object.assign({domain:h,nice:!0},"y"!==f?{independent:!0}:void 0)};return Jh({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:Object.assign(Object.assign({},n),d),[r]:Object.assign(Object.assign({},(null===(e=t[r])||void 0===e?void 0:e[o])&&{[o]:Object.assign({preserve:!0},i&&{ratio:null})}),(null===(l=t[r])||void 0===l?void 0:l[a])&&{[a]:{preserve:!0}}),animate:!1})}));return Object.assign(Object.assign({},t),{marks:f,insetLeft:u,insetRight:u,insetTop:u,insetBottom:u,clip:!0,animate:!1})}(t,n,{[a]:{domain:i,nice:!1}},c,l,a,s,f||new Map,o)))):t(e,(t=>Object.assign({},function(t,e,n,r,i=!1,o="x",a="y"){const{marks:s}=t,c=IF(e),l=s.map((t=>{var e,s;return Jh({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:n,[r]:Object.assign(Object.assign({},(null===(e=t[r])||void 0===e?void 0:e[o])&&{[o]:Object.assign({preserve:!0},i&&{ratio:null})}),(null===(s=t[r])||void 0===s?void 0:s[a])&&{[a]:{preserve:!0}}),animate:!1})}));return Object.assign(Object.assign({},t),{marks:l,insetLeft:c,insetRight:c,insetTop:c,insetBottom:c,clip:!0,animate:!1})}(t,n,Object.assign({[a]:{domain:i,nice:!1}},h&&Array.isArray(o)?{[s]:{domain:o,nice:!0}}:{}),c,l,a,s))))}function FF(t,e,n){const[r,i]=t,o=n?t=>1-t:t=>t;return tO(e,[Jw(e,o(r),!0),Jw(e,o(i),!1)])}function zF(t){return[t[0],t[t.length-1]]}function ZF({initDomain:t={},className:e=NF,prefix:n="slider",setValue:r=((t,e)=>t.setValues(e)),hasState:i=!1,wait:o=50,leading:a=!0,trailing:s=!1,adaptiveMode:c="filter",getInitValues:l=(t=>{var e;const n=null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.values;if(0!==n[0]||1!==n[1])return n})}){return(u,f,h)=>{const{container:d,view:p,update:g,setState:y}=u,v=d.getElementsByClassName(e);if(!v.length)return()=>{};let m=!1;const{scale:b,coordinate:x}=p,{x:w,y:O}=b,k=kg(x),M=t=>{const e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return k?[n,e]:[e,n]},_=new Map,E=new Set,S=pk(p),A=function(t,e,n,r,i){var o,a,s,c;const l={x:e.x||n.getOptions().domain||[],y:e.y||r.getOptions().domain||[]},u=i||pk(t),{hasIndependentX:f,hasIndependentY:h}=u;if(f||h){let e=1,n=1;for(const[r,i]of t.markState.entries())if(null==i?void 0:i.channels){if(f){const t=i.channels.find((t=>"x"===t.name));(null===(a=null===(o=null==r?void 0:r.scale)||void 0===o?void 0:o.x)||void 0===a?void 0:a.independent)&&(l[`x${e}`]=t.scale.domain,e++)}if(h){const t=i.channels.find((t=>"y"===t.name));(null===(c=null===(s=null==r?void 0:r.scale)||void 0===s?void 0:s.y)||void 0===c?void 0:c.independent)&&(l[`y${n}`]=t.scale.domain,n++)}}}return l}(p,t,w,O,S),j=Array.from(v),T=t=>j.some((e=>{const{orientation:n}=e.attributes,[r]=M(n);return r===t})),P=T("x")&&!T("y"),C=T("y")&&!T("x"),R=!hk(c)&&(P||C);for(const t of v){const{orientation:e}=t.attributes,[u,f]=M(e),d=`${n}${$p(u)}:filter`,v="x"===u,{ratio:x}=w.getOptions(),{ratio:j}=O.getOptions(),T=t=>{if(t.data){const{selection:e}=t.data,[n=zF(A.x),r=zF(A.y)]=e;return v?[tO(w,n,x),tO(O,r,j)]:[tO(O,r,j),tO(w,n,x)]}const{value:n}=t.detail;return[FF(n,b[u],k&&"horizontal"===e),A[f]]};let L=!1;const N=t=>{L=t,t||(m=!1)},I=GF({getFiltering:()=>L,setFiltering:N,domainsOf:T,view:p,independentScaleInfo:S,enableAdaptiveFiltering:R,hasOnlyXSlider:P,hasOnlyYSlider:C,adaptiveMode:c,scaleX:w,scaleY:O,scale:b,channelDomain:A,channel0:u,channel1:f,isX:v,emitter:h,eventName:d,setState:y,slider:t,prefix:n,hasState:i,update:g,wait:o,leading:a,trailing:s}),D=e=>{const{nativeEvent:n}=e;if(n)return;const{data:i}=e,{selection:o}=i,[a,s]=o;t.dispatchEvent(new uc("valuechange",{data:i,nativeEvent:!1}));const c=v?rO(a,w):rO(s,O);r(t,c)};h.on(d,D),t.addEventListener("valuechange",I),_.set(t,I),E.add([d,D]);const B=l(t);B&&t.dispatchEvent(new uc("valuechange",{detail:{value:B},nativeEvent:!1,initValue:!0}))}return()=>{for(const[t,e]of _)t.removeEventListener("valuechange",e);for(const[t,e]of E)h.off(t,e)}}}function WF({view:t,domain0:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:i,adaptiveMode:o,scaleX:a,scaleY:s,scale:c,channelDomain:l,independentScaleInfo:u,channel0:f}){const h=new Map,d=new Map;if(!r||0===i.length||!(null==e?void 0:e.length))return{filteredDomain:h,markToScaleMap:d};const p=Dh(t,"options.slider");if(Object.keys(p).length>0&&Object.prototype.hasOwnProperty.call(p,f)){const t=function(t,e,n,r,i){const o=t?r:n,a=t=>{const e={};return Object.keys(i).forEach((n=>{(n===t||n.match(new RegExp(`^${t}\\d+$`)))&&(e[n]=i[n])})),e},s=a(t?"x":"y"),c=Object.keys(s),l=c.map((t=>e[t])),u=Qw(o),f=l.map((t=>Qw(t))),h=l.map(((t,e)=>{const n=t.getOptions().domain;return!f[e]&&n&&n.length>=2&&0===n[0]}));return{currentScale:o,targetScales:l,isSourceDiscrete:u,isTargetDiscrete:f,shouldPreserveZeroBaseline:h,targetScaleKeys:c}}(n,c,a,s,l);(n?u.markToXScaleMap:u.markToYScaleMap).forEach(((t,e)=>{d.set(e,t)}));const r=function({markDataPairs:t,domain:e,scaleInfo:n,markToScaleMap:r,adaptiveMode:i,shouldFilterXAxis:o=!1}){const a=new Map,{isSourceDiscrete:s,isTargetDiscrete:c,shouldPreserveZeroBaseline:l,targetScaleKeys:u}=n;return t.forEach((t=>{const n=r.get(t.markKey);if(!n)return;const f=u.indexOf(n);if(-1===f)return;const h=c[f],d=l[f],p=CF([t],e,s,h,d,i,o);a.set(n,p)})),a}({markDataPairs:i,domain:e,scaleInfo:t,markToScaleMap:d,adaptiveMode:o,isViewSlider:!0,shouldFilterXAxis:n});return RF(l,r,n,!0),{filteredDomain:r,markToScaleMap:d}}{const r=function(t,e){for(const[n]of t.markState.entries()){const t=Dh(n,"slider");if(Object.keys(t||{}).length>0&&Object.prototype.hasOwnProperty.call(t,e))return String(n.key||"")}return null}(t,f);if(r){const t=jF(n,a,s),c=n?u.markToXScaleMap:u.markToYScaleMap,l=c.get(r)||"";if(l){d.set(r,l);const a=function(t,e,n,r,i,o,a=!1,s){const c=new Map;if(0===t.length||0===e.length)return c;const{isSourceDiscrete:l,isTargetDiscrete:u,shouldPreserveZeroBaseline:f}=n,h=s?t.filter((t=>s.get(t.markKey)===i)):t.filter((t=>t.markKey===r));if(0===h.length)return c;const d=CF(h,e,l,u,f,o,a);return c.set(i,d),c}(i,e,t,r,l,o,n,c);return{filteredDomain:a,markToScaleMap:d}}}}return{filteredDomain:h,markToScaleMap:d}}function $F({domain0:t,domain1:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:i,adaptiveMode:o,scaleX:a,scaleY:s,channelDomain:c,hasOnlyXSlider:l,hasOnlyYSlider:u,isX:f}){let h=e;if(r&&i.length>0&&(l&&f||u&&!f)&&(null==t?void 0:t.length)>0){h=function({markDataPairs:t,domain:e,scaleInfo:n,adaptiveMode:r,shouldFilterXAxis:i=!1}){const{isSourceDiscrete:o,isTargetDiscrete:a,shouldPreserveZeroBaseline:s}=n;return CF(t,e,o,a,s,r,i)}({markDataPairs:i,domain:t,scaleInfo:jF(n,a,s),adaptiveMode:o,shouldFilterXAxis:n}),RF(c,h,n,!1)}return h}function GF({getFiltering:t,setFiltering:e,domainsOf:n,view:r,independentScaleInfo:i,enableAdaptiveFiltering:o,hasOnlyXSlider:a,hasOnlyYSlider:s,adaptiveMode:c,scaleX:l,scaleY:u,scale:f,channelDomain:h,channel0:d,channel1:p,isX:g,emitter:y,eventName:v,setState:m,slider:b,prefix:x,hasState:w,update:O,wait:k,leading:M,trailing:_}){return fA((k=>LF(this,void 0,void 0,(function*(){const{initValue:M=!1}=k;if(t()&&!M)return;e(!0);const{nativeEvent:_=!0}=k,{markDataPairs:E}=function(t){var e,n;const r=[],i=[],o=[],a=t.markState;if(a)for(const[t,s]of a.entries())if(null==s?void 0:s.channels){const a={};for(const t of s.channels)if("x"===(null==t?void 0:t.name)&&(null===(e=t.values)||void 0===e?void 0:e.length)>0){let e=[];for(const n of t.values)(null==n?void 0:n.value)&&(e=e.concat(n.value),r.push(n.value));a.x=e}else if(t&&("y"===t.name||t.name.startsWith("y"))&&(null===(n=t.values)||void 0===n?void 0:n.length)>0){const e=t.name,n=[];for(const r of t.values)if(null==r?void 0:r.value){const t=r.value;n.push(t),"y"!==e&&"y1"!==e||(Array.isArray(t)?i.push(t.flat()):i.push([t]))}a[e]=n}const c=a.x||[],l=a.y||[];c.length>0&&l.length>0&&o.push({markKey:t.key||`mark_${o.length}`,channelData:a})}return{xChannelValues:r.flat(),yChannelValues:i.flat(),markDataPairs:o}}(r);if(i[`hasIndependent${p.toUpperCase()}`]){const[t]=n(k),e=s&&!g,{filteredDomain:O,markToScaleMap:M}=WF({view:r,domain0:t,shouldFilterXAxis:e,enableAdaptiveFiltering:o&&(a&&g||s&&!g),markDataPairs:E,adaptiveMode:c,scaleX:l,scaleY:u,scale:f,channelDomain:h,independentScaleInfo:i,channel0:d});h[d]=t,DF(y,v,k,t,h,g,_),BF(m,b,r,{domain0:t,filteredDomain:O,channel0:d,channel1:p,prefix:x,hasState:w,isMultiAxis:!0,markToScaleMap:M,enableAdaptiveFiltering:o})}else{const[t,e]=n(k),i=$F({domain0:t,domain1:e,shouldFilterXAxis:s&&!g,enableAdaptiveFiltering:o,markDataPairs:E,adaptiveMode:c,scaleX:l,scaleY:u,channelDomain:h,hasOnlyXSlider:a,hasOnlyYSlider:s,isX:g});h[d]=t,DF(y,v,k,t,h,g,_),BF(m,b,r,{domain0:t,filteredDomain:i,channel0:d,channel1:p,prefix:x,hasState:w,isMultiAxis:!1,markToScaleMap:void 0,enableAdaptiveFiltering:o})}yield O(),e(!1)}))),k,{leading:M,trailing:_})}function qF({className:t=NF,setValue:e=((t,e)=>t.setValues(e)),minRange:n=.01,wheelSensitivity:r=.05,x:i=!0,y:o=!0}={}){return a=>{const{container:s,view:c}=a,{coordinate:l}=c,u=kg(l),f=function(t){var e;try{const n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;if(!n||"function"!=typeof n.getContextService)return null;const r=n.getContextService().getDomElement();return r instanceof HTMLElement?r:null}catch(t){return null}}(s),h=Math.max(1e-6,Math.min(1,n)),d=s.getElementsByClassName(t);if(!d.length)return()=>{};const p=(t,e)=>!0===t||!1!==t&&("shift"===t?e.shiftKey&&!e.ctrlKey&&!e.altKey:"ctrl"===t?e.ctrlKey&&!e.shiftKey&&!e.altKey:"alt"===t&&(e.altKey&&!e.shiftKey&&!e.ctrlKey)),g=(t,n)=>{e(t,n),t.dispatchEvent(new uc("valuechange",{detail:{value:n},nativeEvent:!0}))},y=(t,e,n,r,i)=>{const o=(t-e)/n,a=Math.max(0,Math.min(1,o));return Math.max(r,Math.min(i,a))},v=t=>{if(!f)return;const e=t.target;if(!f.contains(e))return;const n=f.getBoundingClientRect(),a=t.clientX-n.left,s=t.clientY-n.top,c=[];for(const e of d){const{values:n,orientation:r}=e.attributes;if(!n)continue;const a="horizontal"===r;p("x"===(u?a?"y":"x":a?"x":"y")?i:o,t)&&c.push(e)}if(0!==c.length){t.preventDefault(),t.stopPropagation();for(const e of c){const{values:n,orientation:i,x:o,y:c,trackLength:l}=e.attributes,[u,f]=n,d=f-u,p="horizontal"===i?y(a,o,l,u,f):y(s,c,l,u,f),v=r*fk(d),m=1+t.deltaY*v,b=Math.max(h,Math.min(1,d*m));let x=p-b*((p-u)/d),w=p+b*((f-p)/d);x<0?(x=0,w=Math.min(1,b)):w>1&&(w=1,x=Math.max(0,1-b)),g(e,[x,w])}}};return f&&f.addEventListener("wheel",v,{passive:!1,capture:!0}),()=>{f&&f.removeEventListener("wheel",v,{capture:!0})}}}qF.props={reapplyWhenUpdate:!0};const YF="g2-scrollbar";function HF(t={}){return(e,n,r)=>{const{view:i,container:o}=e;if(!o.getElementsByClassName(YF).length)return()=>{};const{scale:a}=i,{x:s,y:c}=a,l={x:[...s.getOptions().domain],y:[...c.getOptions().domain]};s.update({domain:s.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain});return ZF(Object.assign({initDomain:l,className:YF,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0]),getInitValues:t=>{const e=t.slider.attributes.values;if(0!==e[0]||1!==e[1])return e}},t))(e,n,r)}}var VF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function UF(t,e,n){return`<${t} style="${Object.entries(n).map((([t,e])=>`${function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}(t)}:${e}`)).join(";")}">${e}</${t}>`}const XF={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 KF(t){return"text"===t.nodeName&&!!t.isOverflowing()}function QF(t){var{offsetX:e=8,offsetY:n=8}=t,r=VF(t,["offsetX","offsetY"]);return t=>{const{container:i}=t,[o,a]=i.getBounds().min,s=Rd(r,"tip"),c=new Set,l=t=>{const{target:r}=t;if(!KF(r))return void t.stopPropagation();const{offsetX:l,offsetY:u}=t,f=l+e-o,h=u+n-a;if(r.tip)return r.tip.style.x=f,void(r.tip.style.y=h);const{text:d}=r.style,p=new yl({className:"poptip",style:{innerHTML:UF("div",d,Object.assign(Object.assign({},XF),s)),x:f,y:h}});i.appendChild(p),r.tip=p,c.add(p)},u=t=>{const{target:e}=t;KF(e)?e.tip&&(e.tip.remove(),e.tip=null,c.delete(e.tip)):t.stopPropagation()};return i.addEventListener("pointerover",l),i.addEventListener("pointerout",u),()=>{i.removeEventListener("pointerover",l),i.removeEventListener("pointerout",u),c.forEach((t=>t.remove()))}}}QF.props={reapplyWhenUpdate:!0};var JF=function(t,e){var n=Kj(e),r=n.length;if(We(t))return!r;for(var i=0;i<r;i+=1){var o=n[i];if(e[o]!==t[o]||!(o in t))return!1}return!0};var tz=function(t,e){if(!xn(t))return null;var n;if(Fn(e)&&(n=e),Xh(e)&&(n=function(t){return JF(t,e)}),n)for(var r=0;r<t.length;r+=1)if(n(t[r]))return t[r];return null};function ez(t){return null==t?null:nz(t)}function nz(t){if("function"!=typeof t)throw new Error;return t}var rz={depth:-1},iz={},oz={};function az(t){return t.id}function sz(t){return t.parentId}function cz(){var t,e=az,n=sz;function r(r){var i,o,a,s,c,l,u,f,h=Array.from(r),d=e,p=n,g=new Map;if(null!=t){var y,v=h.map((function(e,n){return function(t){t="".concat(t);var e=t.length;uz(t,e-1)&&!uz(t,e-2)&&(t=t.slice(0,-1));return"/"===t[0]?t:"/".concat(t)}(t(e,n,r))})),m=v.map(lz),b=new Set(v).add(""),x=Aj(m);try{for(x.s();!(y=x.n()).done;){var w=y.value;b.has(w)||(b.add(w),v.push(w),m.push(lz(w)),h.push(oz))}}catch(t){x.e(t)}finally{x.f()}d=function(t,e){return v[e]},p=function(t,e){return m[e]}}for(a=0,i=h.length;a<i;++a)o=h[a],l=h[a]=new Dj(o),null!=(u=d(o,a,r))&&(u+="")&&(f=l.id=u,g.set(f,g.has(f)?iz:l)),null!=(u=p(o,a,r))&&(u+="")&&(l.parent=u);for(a=0;a<i;++a)if(u=(l=h[a]).parent){if(!(c=g.get(u)))throw new Error("missing: "+u);if(c===iz)throw new Error("ambiguous: "+u);c.children?c.children.push(l):c.children=[l],l.parent=c}else{if(s)throw new Error("multiple roots");s=l}if(!s)throw new Error("no root");if(null!=t){for(;s.data===oz&&1===s.children.length;)s=s.children[0],--i;for(var O=h.length-1;O>=0&&(l=h[O]).data===oz;--O)l.data=null}if(s.parent=rz,s.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Ij),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(t){return arguments.length?(e=ez(t),r):e},r.parentId=function(t){return arguments.length?(n=ez(t),r):n},r.path=function(e){return arguments.length?(t=ez(e),r):t},r}function lz(t){var e=t.length;if(e<2)return"";for(;--e>1&&!uz(t,e););return t.slice(0,e)}function uz(t,e){if("/"===t[e]){for(var n=0;e>0&&"\\"===t[--e];)++n;if(0==(1&n))return!0}return!1}function fz(t,e,n,r,i){var o,a,s=t.children,c=s.length,l=new Array(c+1);for(l[0]=a=o=0;o<c;++o)l[o+1]=a+=s[o].value;!function t(e,n,r,i,o,a,c){if(e>=n-1){var u=s[e];return u.x0=i,u.y0=o,u.x1=a,void(u.y1=c)}var f=l[e],h=r/2+f,d=e+1,p=n-1;for(;d<p;){var g=d+p>>>1;l[g]<h?d=g+1:p=g}h-l[d-1]<l[d]-h&&e+1<d&&--d;var y=l[d]-f,v=r-y;if(a-i>c-o){var m=r?(i*v+a*y)/r:a;t(e,d,y,i,o,m,c),t(d,n,v,m,o,a,c)}else{var b=r?(o*v+c*y)/r:c;t(e,d,y,i,o,a,b),t(d,n,v,i,b,a,c)}}(0,c,t.value,e,n,r,i)}function hz(t,e,n,r,i){for(var o,a=t.children,s=-1,c=a.length,l=t.value&&(i-n)/t.value;++s<c;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}function dz(t,e,n,r,i){(1&t.depth?hz:Mj)(t,e,n,r,i)}var pz=(1+Math.sqrt(5))/2;function gz(t,e,n,r,i,o){for(var a,s,c,l,u,f,h,d,p,g,y,v=[],m=e.children,b=0,x=0,w=m.length,O=e.value;b<w;){c=i-n,l=o-r;do{u=m[x++].value}while(!u&&x<w);for(f=h=u,y=u*u*(g=Math.max(l/c,c/l)/(O*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=m[x].value,s<f&&(f=s),s>h&&(h=s),y=u*u*g,(d=Math.max(h/y,y/f))>p){u-=s;break}p=d}v.push(a={value:u,dice:c<l,children:m.slice(b,x)}),a.dice?Mj(a,n,r,i,O?r+=l*u/O:o):hz(a,n,r,O?n+=c*u/O:i,o),O-=u,b=x}return v}var yz=function t(e){function n(t,n,r,i,o){gz(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(pz),vz=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,c,l,u,f=-1,h=a.length,d=t.value;++f<h;){for(c=(s=a[f]).children,l=s.value=0,u=c.length;l<u;++l)s.value+=c[l].value;s.dice?Mj(s,n,r,i,d?r+=(o-r)*s.value/d:o):hz(s,n,r,d?n+=(i-n)*s.value/d:i,o),d-=s.value}else t._squarify=a=gz(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(pz);function mz(){return 0}function bz(t){return function(){return t}}function xz(t,e=[t.data.name]){t.id=t.id||t.data.name,t.path=e,t.children&&t.children.forEach((n=>{n.id=`${t.id}/${n.data.name}`,n.path=[...e,n.data.name],xz(n,n.path)}))}function wz(t){const e=Dh(t,["data","name"]);e.replaceAll&&(t.path=e.replaceAll(".","/").split("/")),t.children&&t.children.forEach((t=>{wz(t)}))}function Oz(t,e,n){const{value:r}=n,i=function(t,e){const n={treemapBinary:fz,treemapDice:Mj,treemapSlice:hz,treemapSliceDice:dz,treemapSquarify:yz,treemapResquarify:vz},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw new TypeError("Invalid tile method!");return r}(e.tile,e.ratio),o=function(t,e){return Array.isArray(t)?"function"==typeof e?cz().path(e)(t):cz()(t):Cj(t)}(t,e.path);xn(t)?wz(o):xz(o),r?o.sum((t=>e.ignoreParentValue&&t.children?0:VT(r)(t))).sort(e.sort):o.count(),function(){var t=yz,e=!1,n=1,r=1,i=[0],o=mz,a=mz,s=mz,c=mz,l=mz;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(kj),t}function f(e){var n=i[e.depth],r=e.x0+n,u=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<u&&(u=h=(u+h)/2),e.x0=r,e.y0=u,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=l(e)-n,u+=a(e)-n,(f-=s(e)-n)<r&&(r=f=(r+f)/2),(h-=c(e)-n)<u&&(u=h=(u+h)/2),t(e,r,u,f,h))}return u.round=function(t){return arguments.length?(e=!!t,u):e},u.size=function(t){return arguments.length?(n=+t[0],r=+t[1],u):[n,r]},u.tile=function(e){return arguments.length?(t=nz(e),u):t},u.padding=function(t){return arguments.length?u.paddingInner(t).paddingOuter(t):u.paddingInner()},u.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:bz(+t),u):o},u.paddingOuter=function(t){return arguments.length?u.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):u.paddingTop()},u.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:bz(+t),u):a},u.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:bz(+t),u):s},u.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:bz(+t),u):c},u.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:bz(+t),u):l},u}().tile(i).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(o);const a=o.descendants().map((t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]}))),s=a.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer);return[s,a]}var kz=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},Mz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const _z={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function Ez(t={}){const{originData:e=[],layout:n}=t,r=Mz(t,["originData","layout"]),i=Jh({},_z,r),o=Rd(i,"breadCrumb"),a=Rd(i,"active");return t=>{const{update:r,setState:i,container:s,options:c}=t,l=function(t){return zd(t).select(`.${N}`).node()}(s),u=c.marks[0],{state:f}=u,h=new pl;l.appendChild(h);const d=(t,c)=>kz(this,void 0,void 0,(function*(){if(h.removeChildren(),c){let e="",n=o.y,r=0;const i=[],s=l.getBBox().width,c=t.map(((a,c)=>{e=`${e}${a}/`,i.push(a);const l=new Al({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:a,x:r,path:[...i],depth:c},o),{y:n})});h.appendChild(l),r+=l.getBBox().width;const u=new Al({style:Object.assign(Object.assign({x:r,text:" / "},o),{y:n})});return h.appendChild(u),r+=u.getBBox().width,r>s&&(n=h.getBBox().height+o.y,r=0,l.attr({x:r,y:n}),r+=l.getBBox().width,u.attr({x:r,y:n}),r+=u.getBBox().width),c===Hb(t)-1&&u.remove(),l}));c.forEach(((t,e)=>{if(e===Hb(c)-1)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",(()=>{t.attr(a)})),t.addEventListener("mouseleave",(()=>{t.attr(n)})),t.addEventListener("click",(()=>{d(Dh(t,["style","path"]),Dh(t,["style","depth"]))}))}))}!function(t,e){[...UB(t),...XB(t)].forEach((t=>{e(t,(t=>t))}))}(s,i),i("treemapDrillDown",(r=>{const{marks:i}=r,o=t.join("/"),a=i.map((t=>{if("rect"!==t.type)return t;let r=e;if(c){const t=e.filter((t=>{const e=Dh(t,["id"]);return e&&(e.match(`${o}/`)||o.match(e))})).map((t=>({value:0===t.height?Dh(t,["value"]):void 0,name:Dh(t,["id"])}))),{paddingLeft:i,paddingBottom:a,paddingRight:s}=n,l=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||h.getBBox().height+10)/(c+1),paddingLeft:i/(c+1),paddingBottom:a/(c+1),paddingRight:s/(c+1),path:t=>t.name,layer:t=>t.depth===c+1});r=Oz(t,l,{value:"value"})[0]}else r=e.filter((t=>1===t.depth));const i=[];return r.forEach((({path:t})=>{i.push(Wv(t))})),Jh({},t,{data:r,scale:{color:{domain:i}}})}));return Object.assign(Object.assign({},r),{marks:a})})),yield r(void 0,["legendFilter"])})),p=t=>{const n=t.target,{markType:r,nodeName:i,attributes:o}=n||{};if("rect"!==r&&i!==vr.TEXT)return;const a=i===vr.TEXT&&!0===Dh(o,"isTreemapLabel")?(t=>t.attributes.key.split("-")[0])(n):(t=>Dh(t,["__data__","key"]))(n),s=tz(e,(t=>t.id===a));Dh(s,"height")&&d(Dh(s,"path"),Dh(s,"depth"))};l.addEventListener("click",p);const g=Kj(Object.assign(Object.assign({},f.active),f.inactive)),y=()=>{sk(l).forEach((t=>{const n=Dh(t,["style","cursor"]),r=tz(e,(e=>e.id===Dh(t,["__data__","key"])));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";const e=Oj(t.attributes,g);t.addEventListener("mouseenter",(()=>{t.attr(f.active)})),t.addEventListener("mouseleave",(()=>{t.attr(Jh(e,f.inactive))}))}}))};return y(),l.addEventListener("mousemove",y),()=>{h.remove(),l.removeEventListener("click",p),l.removeEventListener("mousemove",y)}}}var Sz=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},Az=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const jz={pointR:6,pointStrokeWidth:1,pointStroke:"#888",pointActiveStroke:"#f5f5f5",pathStroke:"#888",pathLineDash:[3,4],labelFontSize:12,labelFill:"#888",labelStroke:"#fff",labelLineWidth:1,labelY:-6,labelX:2},Tz="movePoint",Pz=t=>{const e=t.target,{markType:n}=e;"line"===n&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),"interval"===n&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},Cz=t=>{const e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},Rz=(t,e,n)=>{t.forEach(((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)}))},Lz=(t,e,n,r)=>{const i=new wl({style:n}),o=new Al({style:r});return e.appendChild(o),t.appendChild(i),[i,o]},Nz=(t,e)=>{if(!Dh(t,["options","range","indexOf"]))return;const n=t.options.range.indexOf(e);return t.sortedDomain[n]},Iz=(t,e,n)=>{const r=ok(t,e),i=ok(t,n)/r;return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]};function Dz(t={}){const{selection:e=[],precision:n=2}=t,r=Az(t,["selection","precision"]),i=Object.assign(Object.assign({},jz),r||{}),o=Rd(i,"path"),a=Rd(i,"label"),s=Rd(i,"point");return(t,r,i)=>{const{update:c,setState:l,container:u,view:f,options:{marks:h,coordinate:d}}=t,p=BO(u);let g,y=sk(p),v=e;const{transform:m=[],type:b}=d,x=!!tz(m,(({type:t})=>"transpose"===t)),w="polar"===b,O="theta"===b,k=!!tz(y,(({markType:t})=>"area"===t));k&&(y=y.filter((({markType:t})=>"area"===t)));const M=new pl({style:{zIndex:2}});p.appendChild(M);const _=()=>{i.emit("element-point:select",{nativeEvent:!0,data:{selection:v}})},E=t=>{const e=t.target;v=[e.parentNode.childNodes.indexOf(e)],_(),A(e)},S=t=>{const{data:{selection:e},nativeEvent:n}=t;if(n)return;v=e;const r=Dh(y,[null==v?void 0:v[0]]);r&&A(r)},A=t=>{const{attributes:e,markType:r,__data__:d}=t,{stroke:p}=e,{points:y,seriesTitle:m,color:b,title:E,seriesX:S,y1:j}=d;if(x&&"interval"!==r)return;const{scale:T,coordinate:P}=(null==g?void 0:g.view)||f,{color:C,y:R,x:L}=T,N=P.getCenter();let I;M.removeChildren();const D=(t,e,n,r)=>Sz(this,void 0,void 0,(function*(){return l("elementPointMove",(o=>{var a;const s=((null===(a=null==g?void 0:g.options)||void 0===a?void 0:a.marks)||h).map((o=>{if(!r.includes(o.type))return o;const{data:a,encode:s}=o,c=Object.keys(s).reduce(((r,i)=>{const o=s[i];return"x"===i&&(r[o]=t),"y"===i&&(r[o]=e),"color"===i&&(r[o]=n),r}),{}),l=((t,e,n)=>e.map((e=>{const r=["x","color"].reduce(((r,i)=>{const o=n[i];return o?e[o]===t[o]&&r:r}),!0);return r?Object.assign(Object.assign({},e),t):e})))(c,a,s);return((t,e)=>{i.emit("element-point:moved",{nativeEvent:!0,data:{changeData:t,data:e}})})(c,l),Jh({},o,{data:l,animate:!1})}));return Object.assign(Object.assign({},o),{marks:s})})),yield c("elementPointMove")}));if(["line","area"].includes(r))y.forEach(((e,r)=>{const i=L.invert(S[r]);if(!i)return;const c=new ul({name:Tz,style:Object.assign({cx:e[0],cy:e[1],fill:p},s)}),l=((t,e)=>{const n=Dh(t,["__data__","seriesItems",e,"0","value"]),r=Dh(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:o,transform:a}}=t.parentNode,s=tz(a,(({type:t})=>"normalizeY"===t)),c=Dh(o,["y","field"]),l=i[r][c];return t=>s?1===n?t:t/(1-t)/(n/(1-n))*l:t})(t,r);c.addEventListener("mousedown",(f=>{const h=P.output([S[r],0]),d=null==m?void 0:m.length;u.attr("cursor","move"),v[1]!==r&&(v[1]=r,_()),Rz(M.childNodes,v,s);const[p,x]=Lz(M,c,o,a),O=t=>{const i=e[1]+t.clientY-I[1];if(k)if(w){const o=e[0]+t.clientX-I[0],[a,s]=Iz(N,h,[o,i]),[,u]=P.output([1,R.output(0)]),[,f]=P.invert([a,u-(y[r+d][1]-s)]),g=(r+1)%d,v=ak([y[(r-1+d)%d],[a,s],m[g]&&y[g]]);x.attr("text",l(R.invert(f)).toFixed(n)),p.attr("d",v),c.attr("cx",a),c.attr("cy",s)}else{const[,t]=P.output([1,R.output(0)]),[,o]=P.invert([e[0],t-(y[r+d][1]-i)]),a=ak([y[r-1],[e[0],i],m[r+1]&&y[r+1]]);x.attr("text",l(R.invert(o)).toFixed(n)),p.attr("d",a),c.attr("cy",i)}else{const[,t]=P.invert([e[0],i]),o=ak([y[r-1],[e[0],i],y[r+1]]);x.attr("text",R.invert(t).toFixed(n)),p.attr("d",o),c.attr("cy",i)}};I=[f.clientX,f.clientY],window.addEventListener("mousemove",O);const E=()=>Sz(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),window.removeEventListener("mousemove",O),u.removeEventListener("mouseup",E),Nn(x.attr("text")))return;const e=Number(x.attr("text")),n=Nz(C,b);g=yield D(i,e,n,["line","area"]),x.remove(),p.remove(),A(t)}));u.addEventListener("mouseup",E)})),M.appendChild(c)})),Rz(M.childNodes,v,s);else if("interval"===r){let e=[(y[0][0]+y[1][0])/2,y[0][1]];x?e=[y[0][0],(y[0][1]+y[1][1])/2]:O&&(e=y[0]);const i=(t=>{const e=Dh(t,["__data__","y"]),n=Dh(t,["__data__","y1"])-e,{__data__:{data:r,encode:i,transform:o},childNodes:a}=t.parentNode,s=tz(o,(({type:t})=>"normalizeY"===t)),c=Dh(i,["y","field"]),l=r[a.indexOf(t)][c];return(t,e=!1)=>s||e?t/(1-t)/(n/(1-n))*l:t})(t),c=new ul({name:Tz,style:Object.assign(Object.assign({cx:e[0],cy:e[1],fill:p},s),{stroke:s.activeStroke})});c.addEventListener("mousedown",(s=>{u.attr("cursor","move");const l=Nz(C,b),[f,h]=Lz(M,c,o,a),d=t=>{if(x){const r=e[0]+t.clientX-I[0],[o]=P.output([R.output(0),R.output(0)]),[,a]=P.invert([o+(r-y[2][0]),e[1]]),s=ak([[r,y[0][1]],[r,y[1][1]],y[2],y[3]],!0);h.attr("text",i(R.invert(a)).toFixed(n)),f.attr("d",s),c.attr("cx",r)}else if(O){const r=e[1]+t.clientY-I[1],o=e[0]+t.clientX-I[0],[a,s]=Iz(N,[o,r],e),[l,u]=Iz(N,[o,r],y[1]),d=P.invert([a,s])[1],p=j-d;if(p<0)return;const g=function(t,e,n=0){const r=[["M",...e[1]]],i=ok(t,e[1]),o=ok(t,e[0]);return 0===i?r.push(["L",...e[3]],["A",o,o,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",o,o,0,n,1,...e[0]],["Z"]),r}(N,[[a,s],[l,u],y[2],y[3]],p>.5?1:0);h.attr("text",i(p,!0).toFixed(n)),f.attr("d",g),c.attr("cx",a),c.attr("cy",s)}else{const r=e[1]+t.clientY-I[1],[,o]=P.output([1,R.output(0)]),[,a]=P.invert([e[0],o-(y[2][1]-r)]),s=ak([[y[0][0],r],[y[1][0],r],y[2],y[3]],!0);h.attr("text",i(R.invert(a)).toFixed(n)),f.attr("d",s),c.attr("cy",r)}};I=[s.clientX,s.clientY],window.addEventListener("mousemove",d);const p=()=>Sz(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),u.removeEventListener("mouseup",p),window.removeEventListener("mousemove",d),Nn(h.attr("text")))return;const e=Number(h.attr("text"));g=yield D(E,e,l,[r]),h.remove(),f.remove(),A(t)}));u.addEventListener("mouseup",p)})),M.appendChild(c)}};y.forEach(((t,e)=>{v[0]===e&&A(t),t.addEventListener("click",E),t.addEventListener("mouseenter",Pz),t.addEventListener("mouseleave",Cz)}));const j=t=>{const e=null==t?void 0:t.target;e&&(e.name===Tz||y.includes(e))||(v=[],_(),M.removeChildren())};return i.on("element-point:select",S),i.on("element-point:unselect",j),u.addEventListener("mousedown",j),()=>{M.remove(),i.off("element-point:select",S),i.off("element-point:unselect",j),u.removeEventListener("mousedown",j),y.forEach((t=>{t.removeEventListener("click",E),t.removeEventListener("mouseenter",Pz),t.removeEventListener("mouseleave",Cz)}))}}}var Bz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const Fz=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map((t=>{var{data:e,x:s,y:c,width:l,height:u}=t,f=Bz(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},f),{data:Ox(e,a),x:null!=s?s:n,y:null!=c?c:r,width:null!=l?l:i,height:null!=u?u:o})}))};Fz.props={};var zz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const Zz=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map((()=>1)),padding:i=0,data:o}=t,[a,s,c,l]="col"===n?["y","height","width","x"]:["x","width","height","y"],u=r.reduce(((t,e)=>t+e)),f=t[s]-i*(e.length-1),h=r.map((t=>f*(t/u))),d=[];let p=t[a]||0;for(let n=0;n<h.length;n+=1){const r=e[n],{data:u}=r,f=zz(r,["data"]),g=Ox(u,o);d.push(Object.assign({[a]:p,[s]:h[n],[l]:t[l]||0,[c]:t[c],data:g},f)),p+=h[n]+i}return d};Zz.props={};class Wz{constructor(t){this.$value=t}static of(t){return new Wz(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}var $z=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const Gz=xx((t=>{const{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:o,y:a}=e,s=(t,e)=>{var o;if(void 0===t||!i)return{};const a=Gh(n,(e=>e[t])),s=(null===(o=null==r?void 0:r[e])||void 0===o?void 0:o.domain)||Array.from(a.keys()),c=s.map((t=>a.has(t)?a.get(t).length:1));return{domain:s,flex:c}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===o?null:{position:"top"}},void 0===o&&{paddingInner:0}),s(o,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"right"}},void 0===a&&{paddingInner:0}),s(a,"y"))}}})),qz=wx((t=>{const{data:e,scale:n,legend:r}=t,i=[t];let o,a,s;for(;i.length;){const t=i.shift(),{children:e,encode:n={},scale:r={},legend:c={}}=t,{color:l}=n,{color:u}=r,{color:f}=c;void 0!==l&&(o=l),void 0!==u&&(a=u),void 0!==f&&(s=f),Array.isArray(e)&&i.push(...e)}const c="string"==typeof o?o:"",[l,u]=(()=>{var t;const r=null===(t=null==n?void 0:n.color)||void 0===t?void 0:t.domain;if(void 0!==r)return[r];if(void 0===o)return[void 0];const i="function"==typeof o?o:t=>t[o],a=e.map(i);return a.some((t=>"number"==typeof t))?[fm(a)]:[Array.from(new Set(a)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=l?l:[]}},scale:{color:Jh({},a,{domain:l,type:u})}},void 0===r&&{legend:{color:Jh({title:c},s)}})})),Yz=xx((()=>({animate:{enterType:"fadeIn"}}))),Hz=wx((()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}}))),Vz=wx((()=>({type:"cell"}))),Uz=wx((t=>{const{data:e}=t,n={type:"custom",callback:()=>{const{data:e,encode:n}=t,{x:r,y:i}=n,o=r?Array.from(new Set(e.map((t=>t[r])))):[],a=i?Array.from(new Set(e.map((t=>t[i])))):[];return(()=>{if(o.length&&a.length){const t=[];for(const e of o)for(const n of a)t.push({[r]:e,[i]:n});return t}return o.length?o.map((t=>({[r]:t}))):a.length?a.map((t=>({[i]:t}))):void 0})()}};return{data:{type:"inline",value:e,transform:[n]}}})),Xz=wx(((t,e=Kz,n=Jz,r=tZ,i={})=>{const{data:o,encode:a,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:h}=t,{value:d}=o,{x:p,y:g}=a,{color:y}=c,{domain:v}=y;return{children:(t,o,a)=>{const{x:c,y:y}=o,{paddingLeft:m,paddingTop:b,marginLeft:x,marginTop:w}=a,{domain:O}=c.getOptions(),{domain:k}=y.getOptions(),M=ig(t),_=t.map(e),E=t.map((({x:t,y:e})=>[c.invert(t),y.invert(e)])),S=E.map((([t,e])=>n=>{const{[p]:r,[g]:i}=n;return(void 0===p||r===t)&&(void 0===g||i===e)})),A=S.map((t=>d.filter(t))),j=f?dg(A,(t=>t.length)):void 0,T=E.map((([t,e])=>({columnField:p,columnIndex:O.indexOf(t),columnValue:t,columnValuesLength:O.length,rowField:g,rowIndex:k.indexOf(e),rowValue:e,rowValuesLength:k.length}))),P=T.map((t=>Array.isArray(s)?s:[s(t)].flat(1)));return M.flatMap((t=>{const[e,o,a,s]=_[t],c=T[t],f=A[t];return P[t].map((y=>{var O,k,{scale:M,key:_,facet:E=!0,axis:S={},legend:A={}}=y,T=$z(y,["scale","key","facet","axis","legend"]);const P=(null===(O=null==M?void 0:M.y)||void 0===O?void 0:O.guide)||S.y,C=(null===(k=null==M?void 0:M.x)||void 0===k?void 0:k.guide)||S.x,R={x:{tickCount:p?5:void 0},y:{tickCount:g?5:void 0}},L=E?f:0===f.length?[]:d,N={color:{domain:v}},I={x:eZ(C,n)(c,L),y:eZ(P,r)(c,L)};return Object.assign(Object.assign({key:`${_}-${t}`,data:L,margin:0,x:e+m+l+x,y:o+b+u+w,parentKey:h,width:a,height:s,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!L.length,dataDomain:j,scale:Jh(R,M,N),axis:Jh({},S,I),legend:!1},T),i)}))}))}}}));function Kz(t){const{points:e}=t;return Px(e)}function Qz(t,e){return e.length?Jh({title:!1,tick:null,label:null},t):Jh({title:!1,tick:null,label:null,grid:null},t)}function Jz(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:o,columnValuesLength:a}=e;if(r!==i-1)return Qz(t,n);const s=o===a-1&&void 0,c=n.length?void 0:null;return Jh({title:s,grid:c},t)}}function tZ(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(0!==i)return Qz(t,n);const o=0===r&&void 0,a=n.length?void 0:null;return Jh({title:o,grid:a},t)}}function eZ(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}const nZ=()=>t=>[Wz.of(t).call(Vz).call(qz).call(Yz).call(Gz).call(Hz).call(Uz).call(Xz).value()];nZ.props={};var rZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const iZ=xx((t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),oZ=wx((t=>{const{data:e,children:n,x:r=0,y:i=0,key:o}=t;return{children:(t,a,s)=>{const{x:c,y:l}=a,{paddingLeft:u,paddingTop:f,marginLeft:h,marginTop:d}=s,{domain:p}=c.getOptions(),{domain:g}=l.getOptions(),y=ig(t),v=t.map((({points:t})=>Px(t))),m=t.map((({x:t,y:e})=>[c.invert(t),l.invert(e)])),b=m.map((([t,e])=>({columnField:t,columnIndex:p.indexOf(t),columnValue:t,columnValuesLength:p.length,rowField:e,rowIndex:g.indexOf(e),rowValue:e,rowValuesLength:g.length}))),x=b.map((t=>Array.isArray(n)?n:[n(t)].flat(1)));return y.flatMap((t=>{const[n,a,s,c]=v[t],[l,p]=m[t],g=b[t];return x[t].map((y=>{var v,m;const{scale:b,key:x,encode:w,axis:O,interaction:k}=y,M=rZ(y,["scale","key","encode","axis","interaction"]),_=null===(v=null==b?void 0:b.y)||void 0===v?void 0:v.guide,E={x:sZ(null===(m=null==b?void 0:b.x)||void 0===m?void 0:m.guide)(g,e),y:cZ(_)(g,e)};return Object.assign({data:e,parentKey:o,key:`${x}-${t}`,x:n+u+r+h,y:a+f+i+d,width:s,height:c,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Jh({x:{facet:!1},y:{facet:!1}},b),axis:Jh({x:{tickCount:5},y:{tickCount:5}},O,E),legend:!1,encode:Jh({},w,{x:l,y:p}),interaction:Jh({},k,{legendFilter:!1})},M)}))}))}}})),aZ=wx((t=>{const{encode:e}=t,n=rZ(t,["encode"]),{position:r=[],x:i=r,y:o=[...r].reverse()}=e,a=rZ(e,["position","x","y"]),s=[];for(const t of[i].flat(1))for(const e of[o].flat(1))s.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},a),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[i].flat(1).length&&{x:{paddingInner:0}}),1===[o].flat(1).length&&{y:{paddingInner:0}})})}));function sZ(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return Qz(t,n)}}function cZ(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{columnIndex:r}=e;if(0!==r)return Qz(t,n)}}const lZ=()=>t=>[Wz.of(t).call(Vz).call(qz).call(oZ).call(aZ).call(Yz).call(Hz).call(iZ).value()];var uZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const fZ=xx((t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),hZ=xx((t=>({coordinate:{type:"polar"}}))),dZ=t=>{const{encode:e}=t,n=uZ(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function pZ(t){return t=>null}function gZ(t){const{points:e}=t,[n,r,i,o]=e,a=Sx(n,o),s=_x(n,o),c=Tx(s,_x(r,i)),l=1/Math.sin(c/2),u=a/(1+l),f=u*Math.sqrt(2),[h,d]=i,p=jx(s)+c/2,g=u*l;return[h+g*Math.sin(p)-f/2,d-g*Math.cos(p)-f/2,f,f]}const yZ=()=>t=>[Wz.of(t).call(Vz).call(dZ).call(qz).call(hZ).call(Uz).call(Xz,gZ,pZ,pZ,{frame:!1}).call(Yz).call(Hz).call(fZ).value()];function vZ(t,e,n){const r=[0,n],i=[1-n,1];return"normal"===t?r:"reverse"===t?i:"alternate"===t?e%2==0?r:i:"reverse-alternate"===t?e%2==0?i:r:void 0}const mZ=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:o="ease-in-out-sine"}=t,a=e.length;if(!Array.isArray(e)||0===a)return[];const{key:s}=e[0],c=e.map((t=>Object.assign(Object.assign({},t),{key:s}))).map((t=>function(t,e,n){const r=[t];for(;r.length;){const t=r.pop();t.animate=Jh({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});const{children:i}=t;Array.isArray(i)&&r.push(...i)}return t}(t,n,o)));return function*(){let t,e=0;for(;"infinite"===r||e<r;){const[n,r]=vZ(i,e,a);for(let e=n;e<r;e+=1){const n=Math.abs(e);t!==n&&(yield c[n]),t=n}e++}}};function bZ(t,e,n){const{encode:r}=n;if(null===t)return[e];const i=function(t){return Array.isArray(t)?t:[t]}(t).map((t=>{var e;return[t,null===(e=vT(r,t))||void 0===e?void 0:e[0]]})).filter((([,t])=>Pd(t)));return Array.from(Gh(e,(t=>i.map((([,e])=>e[t])).join("-"))).values())}function xZ(t){return Array.isArray(t)?function(t){return(e,n,r)=>(n,r)=>t.reduce(((t,i)=>0!==t?t:ww(e[n][i],e[r][i])),0)}(t):"function"==typeof t?function(t){return(e,n,r)=>SZ((n=>t(e[n])))}(t):"series"===t?kZ:"value"===t?MZ:"sum"===t?_Z:"maxIndex"===t?EZ:null}function wZ(t,e){for(const n of t)n.sort(e)}function OZ(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function kZ(t,e,n){return SZ((t=>n[t]))}function MZ(t,e,n){return SZ((t=>e[t]))}function _Z(t,e,n){const r=ig(t),i=Array.from(Gh(r,(t=>n[+t])).entries()),o=new Map(i.map((([t,n])=>[t,n.reduce(((t,n)=>t+ +e[n]))])));return SZ((t=>o.get(n[t])))}function EZ(t,e,n){const r=ig(t),i=Array.from(Gh(r,(t=>n[+t])).entries()),o=new Map(i.map((([t,n])=>[t,sw(n,(t=>e[t]))])));return SZ((t=>o.get(n[t])))}function SZ(t){return(e,n)=>ww(t(e),t(n))}mZ.props={};const AZ=(t={})=>{const{groupBy:e="x",orderBy:n=null,reverse:r=!1,y:i="y",y1:o="y1",series:a=!0}=t;return(t,s)=>{var c;const{data:l,encode:u,style:f={}}=s,[h,d]=vT(u,"y"),[p,g]=vT(u,"y1"),[y]=a?mT(u,"series","color"):vT(u,"color"),v=bZ(e,t,s),m=(null!==(c=xZ(n))&&void 0!==c?c:()=>null)(l,h,y);m&&wZ(v,m);const b=new Array(t.length),x=new Array(t.length),w=new Array(t.length),O=[],k=[];for(const t of v){r&&t.reverse();const e=p?+p[t[0]]:0,n=[],i=[];for(const r of t){const t=w[r]=+h[r]-e;t<0?i.push(r):t>=0&&n.push(r)}const o=n.length>0?n:i,a=i.length>0?i:n;let s=n.length-1,c=0;for(;s>0&&0===h[o[s]];)s--;for(;c<a.length-1&&0===h[a[c]];)c++;O.push(o[s]),k.push(a[c]);let l=e;for(const t of i.reverse()){const e=w[t];l=b[t]=(x[t]=l)+e}let u=e;for(const t of n){const e=w[t];e>0?u=b[t]=(x[t]=u)+e:b[t]=x[t]=u}}const M=new Set(O),_=new Set(k),E="y"===i?b:x,S="y"===o?b:x;let A;return A="point"===s.type?{y0:dT(h,d),y:hT(E,d)}:{y0:dT(h,d),y:hT(E,d),y1:hT(S,g)},[t,Jh({},s,{encode:Object.assign({},A),style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>_.has(e)},f)})]}};function jZ(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}function TZ(t,e){const n=function(t,e){let n,r=0,i=0,o=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,o+=n*(e-i));else{let a=-1;for(let s of t)null!=(s=e(s,++a,t))&&(s=+s)>=s&&(n=s-i,i+=n/++r,o+=n*(s-i))}if(r>1)return o/(r-1)}(t,e);return n?Math.sqrt(n):n}AZ.props={};var PZ=Array.prototype,CZ=PZ.slice;PZ.map;function RZ(t){return()=>t}const LZ=Math.sqrt(50),NZ=Math.sqrt(10),IZ=Math.sqrt(2);function DZ(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=LZ?10:o>=NZ?5:o>=IZ?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),c=Math.round(e*l),s/l<t&&++s,c/l>e&&--c,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),c=Math.round(e/l),s*l<t&&++s,c*l>e&&--c),c<s&&.5<=n&&n<2?DZ(t,e,2*n):[s,c,l]}function BZ(t,e,n){return DZ(t=+t,e=+e,n=+n)[2]}function FZ(t){return Math.max(1,Math.ceil(Math.log(jZ(t))/Math.LN2)+1)}function zZ(){var t=$h,e=fm,n=FZ;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,s=r.length,c=new Array(s);for(i=0;i<s;++i)c[i]=t(r[i],i,r);var l=e(c),u=l[0],f=l[1],h=n(c,u,f);if(!Array.isArray(h)){const t=f,n=+h;if(e===fm&&([u,f]=function(t,e,n){let r;for(;;){const i=BZ(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(u,f,n)),h=function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e<t,[i,o,a]=r?DZ(e,t,n):DZ(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let t=0;t<s;++t)c[t]=(o-t)/-a;else for(let t=0;t<s;++t)c[t]=(o-t)*a;else if(a<0)for(let t=0;t<s;++t)c[t]=(i+t)/-a;else for(let t=0;t<s;++t)c[t]=(i+t)*a;return c}(u,f,n),h[0]<=u&&(a=BZ(u,f,n)),h[h.length-1]>=f)if(t>=f&&e===fm){const t=BZ(u,f,n);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=(Math.ceil(f*-t)+1)/-t))}else h.pop()}for(var d=h.length,p=0,g=d;h[p]<=u;)++p;for(;h[g-1]>f;)--g;(p||g<d)&&(h=h.slice(p,g),d=g-p);var y,v=new Array(d+1);for(i=0;i<=d;++i)(y=v[i]=[]).x0=i>0?h[i-1]:u,y.x1=i<d?h[i]:f;if(isFinite(a)){if(a>0)for(i=0;i<s;++i)null!=(o=c[i])&&u<=o&&o<=f&&v[Math.min(d,Math.floor((o-u)/a))].push(r[i]);else if(a<0)for(i=0;i<s;++i)if(null!=(o=c[i])&&u<=o&&o<=f){const t=Math.floor((u-o)*a);v[Math.min(d,t+(h[t]<=o))].push(r[i])}}else for(i=0;i<s;++i)null!=(o=c[i])&&u<=o&&o<=f&&v[Kw(h,o,0,d)].push(r[i]);return v}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:RZ(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:RZ([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:RZ(Array.isArray(t)?CZ.call(t):t),r):n},r}function ZZ(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?Mw:kw(i);r>n;){if(r-n>600){const o=r-n+1,a=e-n+1,s=Math.log(o),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(o-c)/o)*(a-o/2<0?-1:1);ZZ(t,e,Math.max(n,Math.floor(e-a*c/o+l)),Math.min(r,Math.floor(e+(o-a)*c/o+l)),i)}const o=t[e];let a=n,s=r;for(WZ(t,n,e),i(t[r],o)>0&&WZ(t,n,r);a<s;){for(WZ(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}0===i(t[n],o)?WZ(t,n,s):(++s,WZ(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function WZ(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function $Z(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return KE(t);if(e>=1)return dg(t);var r,i=(r-1)*e,o=Math.floor(i),a=dg(ZZ(t,o).subarray(0,o+1));return a+(KE(t.subarray(o+1))-a)*(i-o)}}function GZ(t,e,n=Yw){if(!isNaN(e=+e)){if(r=Float64Array.from(t,((e,r)=>Yw(n(t[r],r,t)))),e<=0)return lA(r);if(e>=1)return sw(r);var r,i=Uint32Array.from(t,((t,e)=>e)),o=r.length-1,a=Math.floor(o*e);return ZZ(i,a,0,o,((t,e)=>Mw(r[t],r[e]))),a=function(t,e=ww){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?ww(t,i)>0:0===ww(t,t))&&(n=o,i=t,r=!0)}}else for(const i of t)(r?e(i,n)>0:0===e(i,i))&&(n=i,r=!0);return n}(i.subarray(0,a+1),(t=>r[t])),a>=0?a:-1}}function qZ(t,e){return $Z(t,.5,e)}function YZ(t,e){return GZ(t,.5,e)}var HZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function VZ(t){return e=>null===e?t:`${t} of ${e}`}function UZ(){return[(t,e)=>uA(t,(t=>+e[t])),VZ("mean")]}function XZ(){return[(t,e)=>qZ(t,(t=>+e[t])),VZ("median")]}function KZ(){return[(t,e)=>dg(t,(t=>+e[t])),VZ("max")]}function QZ(){return[(t,e)=>KE(t,(t=>+e[t])),VZ("min")]}function JZ(){return[(t,e)=>t.length,VZ("count")]}function tW(){return[(t,e)=>hg(t,(t=>+e[t])),VZ("sum")]}function eW(){return[(t,e)=>e[t[0]],VZ("first")]}function nW(){return[(t,e)=>e[t[t.length-1]],VZ("last")]}const rW=(t={})=>{const{groupBy:e}=t,n=HZ(t,["groupBy"]);return(t,r)=>{const{data:i,encode:o}=r,a=e(t,r);if(!a)return[t,r];const s=Object.entries(n).map((([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];const e={mean:UZ,max:KZ,count:JZ,first:eW,last:nW,sum:tW,min:QZ,median:XZ}[t];if(!e)throw new Error(`Unknown reducer: ${t}.`);return e()}(e),[s,c]=vT(o,t),l=((t,e)=>{if(t)return t;const{from:n}=e;if(!n)return t;const[,r]=vT(o,n);return r})(c,e),u=a.map((t=>n(t,null!=s?s:i)));return[t,Object.assign(Object.assign({},gT(u,(null==r?void 0:r(l))||l)),{aggregate:!0})]})),c=Object.keys(o).map((t=>{const[e,n]=vT(o,t),r=a.map((t=>e[t[0]]));return[t,hT(r,n)]})),l=a.map((t=>i[t[0]]));return[ig(a),Jh({},r,{data:l,encode:Object.fromEntries([...c,...s])})]}};rW.props={};var iW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const oW="thresholds";function aW(t){const[e,n]=fm(t);return Math.min(200,function(t,e,n){const r=jZ(t),i=TZ(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}(t,e,n))}const sW=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=iW(t,["groupChannels","binChannels"]),i={};return rW(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter((([t])=>!t.startsWith(oW))))),Object.fromEntries(n.flatMap((t=>{const e=([e])=>+i[t].get(e).split(",")[1];return e.from=t,[[t,([e])=>+i[t].get(e).split(",")[0]],[`${t}1`,e]]})))),{groupBy:(t,o)=>{const{encode:a}=o,s=n.map((t=>{const[e]=vT(a,t);return e})),c=Rd(r,oW),l=t.filter((t=>s.every((e=>Pd(e[t]))))),u=[...e.map((t=>{const[e]=vT(a,t);return e})).filter(Pd).map((t=>e=>t[e])),...n.map(((t,e)=>{const n=s[e],r=c[t]||aW(n),o=zZ().thresholds(r).value((t=>+n[t]))(l),a=new Map(o.flatMap((t=>{const{x0:e,x1:n}=t,r=`${e},${n}`;return t.map((t=>[t,r]))})));return i[t]=a,t=>a.get(t)}))];return Array.from(Gh(l,(t=>u.map((e=>e(t))).join("-"))).values())}}))};sW.props={};const cW=(t={})=>{const{thresholds:e}=t;return sW(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};cW.props={};var lW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const uW=(t={})=>{const{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t;lW(t,["groupBy","reverse","orderBy","padding"]);return(t,o)=>{const{data:a,encode:s,scale:c}=o,{series:l}=c,[u]=vT(s,"y"),[f]=mT(s,"series","color"),h=OZ(f,l),d=Jh({},o,{scale:{series:{domain:h,paddingInner:i}}}),p=bZ(e,t,o),g=xZ(r);if(!g)return[t,Jh(d,{encode:{series:hT(f)}})];const y=g(a,u,f);y&&wZ(p,y);const v=new Array(t.length);for(const t of p){n&&t.reverse();for(let e=0;e<t.length;e++)v[t[e]]=h[e]}return[t,Jh(d,{encode:{series:hT(r?v:f)}})]}};function fW(t,e,n){if(null===t)return[-.5,.5];const r=OZ(t,e),i=new dd({domain:r,range:[0,1],padding:n}).getBandWidth();return[-i/2,i/2]}function hW(t,e,n){return e*(1-t)+n*t}uW.props={};const dW=(t={})=>{const{padding:e=0,paddingX:n=e,paddingY:r=e,random:i=Math.random}=t;return(t,e)=>{const{encode:o,scale:a}=e,{x:s,y:c}=a,[l]=vT(o,"x"),[u]=vT(o,"y"),f=fW(l,s,n),h=fW(u,c,r),d=t.map((()=>hW(i(),...h))),p=t.map((()=>hW(i(),...f)));return[t,Jh({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:hT(d),dx:hT(p)}})]}};dW.props={};const pW=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(t,r)=>{const{encode:i,scale:o}=r,{x:a}=o,[s]=vT(i,"x"),c=fW(s,a,e),l=t.map((()=>hW(n(),...c)));return[t,Jh({scale:{x:{padding:.5}}},r,{encode:{dx:hT(l)}})]}};pW.props={};const gW=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(t,r)=>{const{encode:i,scale:o}=r,{y:a}=o,[s]=vT(i,"y"),c=fW(s,a,e),l=t.map((()=>hW(n(),...c)));return[t,Jh({scale:{y:{padding:.5}}},r,{encode:{dy:hT(l)}})]}};gW.props={};var yW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const vW=(t={})=>{const{groupBy:e="x"}=t;return(t,n)=>{const{encode:r}=n,{x:i}=r,o=yW(r,["x"]),a=Object.entries(o).filter((([t])=>t.startsWith("y"))).map((([t])=>[t,vT(r,t)[0]])),s=a.map((([e])=>[e,new Array(t.length)])),c=bZ(e,t,n),l=new Array(c.length);for(let t=0;t<c.length;t++){const e=c[t].flatMap((t=>a.map((([,e])=>+e[t])))),[n,r]=fm(e);l[t]=(n+r)/2}const u=Math.max(...l);for(let t=0;t<c.length;t++){const e=u-l[t],n=c[t];for(const t of n)for(let n=0;n<a.length;n++){const[,r]=a[n],[,i]=s[n];i[t]=+r[t]+e}}return[t,Jh({},n,{encode:Object.fromEntries(s.map((([t,e])=>[t,hT(e,vT(r,t)[1])])))})]}};vW.props={};const mW=(t={})=>{const{groupBy:e="x"}=t;return(t,n)=>{const{encode:r}=n,[i]=vT(r,"y"),[o,a]=vT(r,"y1"),s=bZ(e,t,n),c=new Array(t.length);for(const t of s){const e=t.map((t=>+i[t]));for(let n=0;n<t.length;n++){const r=t[n],o=Math.max(...e.filter(((t,e)=>e!==n)));c[r]=+i[r]>o?o:i[r]}}return[t,Jh({},n,{encode:{y1:hT(c,a)}})]}};mW.props={};const bW=t=>{const{groupBy:e=["x"],reducer:n=((t,e)=>e[t[0]]),orderBy:r=null,reverse:i=!1,duration:o}=t;return(t,a)=>{const{encode:s}=a,c=(Array.isArray(e)?e:[e]).map((t=>[t,vT(s,t)[0]]));if(0===c.length)return[t,a];let l=[t];for(const[,t]of c){const e=[];for(const n of l){const r=Array.from(Gh(n,(e=>t[e])).values());e.push(...r)}l=e}if(r){const[t]=vT(s,r);t&&l.sort(((e,r)=>n(e,t)-n(r,t))),i&&l.reverse()}const u=(o||3e3)/l.length,[f]=o?[yT(t,u)]:mT(s,"enterDuration",yT(t,u)),[h]=mT(s,"enterDelay",yT(t,0)),d=new Array(t.length);for(let t=0,e=0;t<l.length;t++){const n=l[t],r=dg(n,(t=>+f[t]));for(const t of n)d[t]=+h[t]+e;e+=r}return[t,Jh({},a,{encode:{enterDuration:pT(f),enterDelay:pT(d)}})]}};bW.props={};var xW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const wW=(t={})=>{const{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{const{encode:i,tooltip:o}=r,{x:a}=i,s=xW(i,["x"]),c=Object.entries(s).filter((([t])=>t.startsWith("y"))).map((([t])=>[t,vT(i,t)[0]])),[,l]=c.find((([t])=>"y"===t)),u=c.map((([e])=>[e,new Array(t.length)])),f=bZ(e,t,r),h=function(t){if("function"==typeof t)return t;const e={min:(t,e)=>KE(t,(t=>e[+t])),max:(t,e)=>dg(t,(t=>e[+t])),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>uA(t,(t=>e[+t])),median:(t,e)=>qZ(t,(t=>e[+t])),sum:(t,e)=>hg(t,(t=>e[+t])),deviation:(t,e)=>TZ(t,(t=>e[+t]))};return e[t]||dg}(n);for(const t of f){const e=h(t,l);for(const n of t)for(let t=0;t<c.length;t++){const[,r]=c[t],[,i]=u[t];i[n]=+r[n]/e}}const d=Bd(o)||(null==o?void 0:o.items)&&0!==(null==o?void 0:o.items.length);return[t,Jh({},r,Object.assign({encode:Object.fromEntries(u.map((([t,e])=>[t,hT(e,vT(i,t)[1])])))},!d&&i.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function OW(t,e){return[t[0]]}function kW(t,e){return[t[t.length-1]]}function MW(t,e){return[t[sw(t,(t=>e[t]))]]}function _W(t,e){return[t[lA(t,(t=>e[t]))]]}wW.props={};const EW=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(t,i)=>{const{encode:o}=i,a=bZ(e,t,i),[s]=vT(o,n),c=function(t){return"function"==typeof t?t:{first:OW,last:kW,max:MW,min:_W}[t]||OW}(r);return[a.flatMap((t=>c(t,s))),i]}};EW.props={};var SW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const AW=(t={})=>{const{selector:e}=t,n=SW(t,["selector"]);return EW(Object.assign({channel:"x",selector:e},n))};AW.props={};var jW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const TW=(t={})=>{const{selector:e}=t,n=jW(t,["selector"]);return EW(Object.assign({channel:"y",selector:e},n))};TW.props={};var PW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const CW=(t={})=>{const{channels:e=["x","y"]}=t,n=PW(t,["channels"]);return rW(Object.assign(Object.assign({},n),{groupBy:(t,n)=>bZ(e,t,n)}))};CW.props={};const RW=(t={})=>CW(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));RW.props={};const LW=(t={})=>CW(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));LW.props={};const NW=(t={})=>CW(Object.assign(Object.assign({},t),{channels:["color"]}));NW.props={};const IW=(t={})=>(e,n)=>{const{reverse:r,slice:i,channel:o,by:a,ordinal:s=!0,reducer:c}=t,{encode:l,scale:u={}}=n,f=u[o].domain,[h]=vT(l,null!=a?a:o),[d]=vT(l,o),p=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[o]=vT(n,r);if("function"==typeof i)return t=>i(t,o);if("max"===i)return t=>dg(t,(t=>+o[t]));if("min"===i)return t=>KE(t,(t=>+o[t]));if("sum"===i)return t=>hg(t,(t=>+o[t]));if("median"===i)return t=>qZ(t,(t=>+o[t]));if("mean"===i)return t=>uA(t,(t=>+o[t]));if("first"===i)return t=>o[t[0]];if("last"===i)return t=>o[t[t.length-1]];throw new Error(`Unknown reducer: ${i}`)}(o,{by:a,reducer:c},l),g=function(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter((t=>r.has(e[t])))}(e,d,f),y=function(t,e,n){return(2!==e.length?Ow(Yh(t,e,n),(([t,e],[n,r])=>ww(e,r)||ww(t,n))):Ow(Gh(t,n),(([t,n],[r,i])=>e(n,i)||ww(t,r)))).map((([t])=>t))}(g,p,(t=>d[t])),v=s?e:Ow(e,(t=>h[t]));r&&(!s&&v.reverse(),y.reverse());const m="number"==typeof i?[0,i]:i,b=i?y.slice(...m):y;return[v,Jh(n,{scale:{[o]:{domain:b}}})]};IW.props={};const DW=(t={})=>IW(Object.assign(Object.assign({},t),{channel:"x"}));DW.props={};const BW=(t={})=>IW(Object.assign(Object.assign({},t),{channel:"y"}));BW.props={};const FW=(t={})=>IW(Object.assign(Object.assign({},t),{channel:"color"}));FW.props={};const zW=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(t,i)=>{const{data:o,encode:a}=i,[s]=vT(a,"x"),c=e?function(t,e){return"string"==typeof e?t.map((t=>t[e])):t.map(e)}(o,e):vT(a,n)[0],l=function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>hg(t,(t=>+e[t]));throw new Error(`Unknown reducer: ${t}`)}(r,c),u=Hh(t,l,(t=>s[t])).map((t=>t[1]));return[t,Jh({},i,{scale:{x:{flex:u}}})]}};function ZW(t){const{padding:e=0,direction:n="col"}=t;return(t,r,i)=>{const o=t.length;if(0===o)return[];const{innerWidth:a,innerHeight:s}=i,c=s/a;let l=Math.ceil(Math.sqrt(r/c)),u=a/l,f=Math.ceil(r/l),h=f*u;for(;h>s;)l+=1,u=a/l,f=Math.ceil(r/l),h=f*u;const d=s-f*u,p=f<=1?0:d/(f-1),[g,y]=f<=1?[(a-o*u)/(o-1),(s-u)/2]:[0,0];return t.map(((t,r)=>{const[i,o,a,s]=Px(t),c="col"===n?r%l:Math.floor(r/f),h="col"===n?Math.floor(r/l):r%f;return`translate(${c*u-i+g*c+.5*e}, ${(f-h-1)*u+d-o-p*h-y+.5*e}) scale(${(u-e)/a}, ${(u-e)/s})`}))}}zW.props={};const WW=t=>(e,n)=>[e,Jh({},n,{modifier:ZW(t),axis:!1})];function $W(t,e,n,r){const i=t.length;if(r>=i||0===r)return t;const o=n=>1*e[t[n]],a=e=>1*n[t[e]],s=[],c=(i-2)/(r-2);let l,u,f,h=0;s.push(h);for(let t=0;t<r-2;t++){let e=0,n=0,r=Math.floor((t+1)*c)+1,d=Math.floor((t+2)*c)+1;d=Math.min(d,i);const p=d-r;for(;r<d;r++)e+=o(r),n+=a(r);e/=p,n/=p;let g=Math.floor((t+0)*c)+1;const y=Math.floor((t+1)*c)+1,v=[o(h),a(h)];for(l=u=-1;g<y;g++)u=.5*Math.abs((v[0]-e)*(o(g)-v[1])-(v[0]-a(g))*(n-v[0])),u>l&&(l=u,f=g);s.push(f),h=f}return s.push(i-1),s.map((e=>t[e]))}WW.props={};const GW=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=function(t){if("function"==typeof t)return t;if("lttb"===t)return $W;const e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[lA(t,(t=>n[t]))]],max:(t,e,n)=>[t[sw(t,(t=>n[t]))]],median:(t,e,n)=>[t[YZ(t,(t=>n[t]))]]},n=e[t]||e.median;return(t,e,r,i)=>{const o=function(t,e){const n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/i)));return o.flatMap((t=>n(t,e,r)))}}(e);return(t,e)=>{const{encode:o}=e,a=bZ(r,t,e),[s]=vT(o,"x"),[c]=vT(o,"y");return[a.flatMap((t=>i(t,s,c,n))),e]}};GW.props={};const qW=(t={})=>(e,n)=>{const{encode:r,data:i}=n,o=Object.entries(t).map((([t,e])=>{const[n]=vT(r,t);if(!n)return null;const[i,o=!0]=function(t){return"object"==typeof t?[t.value,t.ordinal]:[t,!0]}(e);if("function"==typeof i)return t=>i(n[t]);if(o){const t=Array.isArray(i)?i:[i];return 0===t.length?null:e=>t.includes(n[e])}{const[t,e]=i;return r=>n[r]>=t&&n[r]<=e}})).filter(Pd),a=e.filter((t=>o.every((e=>e(t))))),s=a.map(((t,e)=>e));if(0===o.length){const t=function(t){var e;const{encode:n}=t,r=Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),{y:Object.assign(Object.assign({},t.encode.y),{value:[]})})}),i=null===(e=null==n?void 0:n.color)||void 0===e?void 0:e.field;if(!n||!i)return r;let o;for(const[t,e]of Object.entries(n))"x"!==t&&"y"!==t||e.field!==i||(o=Object.assign(Object.assign({},o),{[t]:Object.assign(Object.assign({},e),{value:[]})}));return o?Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),o)}):r}(n);return[e,t]}const c=Object.entries(r).map((([t,e])=>[t,Object.assign(Object.assign({},e),{value:s.map((t=>e.value[a[t]])).filter((t=>void 0!==t))})]));return[s,Jh({},n,{encode:Object.fromEntries(c),data:a.map((t=>i[t]))})]};qW.props={};var YW={},HW={};function VW(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function UW(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function XW(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function KW(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+XW(-t,6):t>9999?"+"+XW(t,6):XW(t,4)}(t.getUTCFullYear())+"-"+XW(t.getUTCMonth()+1,2)+"-"+XW(t.getUTCDate(),2)+(i?"T"+XW(e,2)+":"+XW(n,2)+":"+XW(r,2)+"."+XW(i,3)+"Z":r?"T"+XW(e,2)+":"+XW(n,2)+":"+XW(r,2)+"Z":n||e?"T"+XW(e,2)+":"+XW(n,2)+"Z":"")}function QW(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,c=o<=0,l=!1;function u(){if(c)return HW;if(l)return l=!1,YW;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?c=!0:10===(r=t.charCodeAt(a++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(e=a++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=u())!==HW;){for(var f=[];r!==YW&&r!==HW;)f.push(r),r=u();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function o(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?KW(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=VW(t);return function(r,i){return e(n(r),i,t)}}(t,e):VW(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=UW(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=UW(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}function JW(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;t$&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const t$=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var e$=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))};const n$=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>e$(void 0,void 0,void 0,(function*(){const t=yield fetch(e);if("csv"===n){const e=yield t.text();return QW(r).parse(e,i?JW:Ed)}if("json"===n)return yield t.json();throw new Error(`Unknown format: ${n}.`)}))};n$.props={};const r$=t=>{const{value:e}=t;return()=>e};r$.props={};const i$=t=>{const{fields:e=[]}=t,n=(r=!0,e.map((t=>{if(Array.isArray(t)){const[e,n=r]=t;return[e,n]}return[t,r]})));var r;return t=>[...t].sort(((t,e)=>n.reduce(((n,[r,i=!0])=>0!==n?n:i?t[r]<e[r]?-1:+(t[r]!==e[r]):t[r]>e[r]?-1:+(t[r]!==e[r])),0)))};i$.props={};const o$=t=>{const{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function a$(t){return null!=t&&!Number.isNaN(t)}o$.props={};const s$=t=>{const{callback:e=a$}=t;return t=>t.filter(e)};s$.props={};const c$=t=>{const{fields:e}=t;return t=>t.map((t=>function(t,e=[]){return e.reduce(((e,n)=>(n in t&&(e[n]=t[n]),e)),{})}(t,e)))};c$.props={};const l$=t=>e=>{if(!t||(n=t,0===Object.keys(n).length))return e;var n;return e.map((e=>Object.entries(e).reduce(((e,[n,r])=>(e[t[n]||n]=r,e)),{})))};l$.props={};const u$=t=>{const{fields:e,key:n="key",value:r="value"}=t;return t=>{return(i=e)&&0!==Object.keys(i).length?t.flatMap((t=>e.map((e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))))):t;var i}};u$.props={};const f$=t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)};f$.props={};const h$=t=>{const{callback:e=Ed}=t;return t=>e(t)};h$.props={};const d$=t=>{const{callback:e=Ed}=t;return t=>Array.isArray(t)?t.map(e):t};function p$(t){return"string"==typeof t?e=>e[t]:t}d$.props={};const g$=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:o=NaN}=t,[a,s]=n,c=p$(s),l=p$(a),u=Yh(e,(([t])=>t),(t=>c(t)));return t=>t.map((t=>{const e=u.get(l(t));return Object.assign(Object.assign({},t),r.reduce(((t,n,r)=>(t[i[r]]=e?e[n]:o,t)),{}))}))};g$.props={};var y$=n(86311),v$=n.n(y$);const m$=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:i,max:o,size:a=10,width:s}=t,[c,l]=r;return t=>{const r=Array.from(Gh(t,(t=>n.map((e=>t[e])).join("-"))).values());return r.map((t=>{const n=v$().create(t.map((t=>t[e])),{min:i,max:o,size:a,width:s}),r=n.map((t=>t.x)),u=n.map((t=>t.y));return Object.assign(Object.assign({},t[0]),{[c]:r,[l]:u})}))}};m$.props={};const b$=()=>t=>(console.log("G2 data section:",t),t);b$.props={};var x$=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))};const w$=Math.PI/180,O$=2048;function k$(t){return t.text}function M$(){return"serif"}function _$(){return"normal"}function E$(t){return t.value}function S$(){return 90*~~(2*Math.random())}function A$(){return 1}function j$(){}function T$(t,e,n,r){if(e.sprite)return;const i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,O$/o);let a=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,l=e.size<<1;if(e.rotate){const n=Math.sin(e.rotate*w$),r=Math.cos(e.rotate*w$),i=t*r,o=t*n,a=l*r,s=l*n;t=Math.max(Math.abs(i+s),Math.abs(i-s))+31>>5<<5,l=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(l>c&&(c=l),a+t>=2048&&(a=0,s+=c,c=0),s+l>=O$)break;i.translate((a+(t>>1))/o,(s+(l>>1))/o),e.rotate&&i.rotate(e.rotate*w$),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=l,e.xoff=a,e.yoff=s,e.x1=t>>1,e.y1=l>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}const u=i.getImageData(0,0,2048/o,O$/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;const t=e.width,i=t>>5;let o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(a=e.xoff,null==a)return;s=e.yoff;let c=0,l=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){const t=i*n+(e>>5),r=u[2048*(s+n)+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,c|=r}c?l=n:(e.y0++,o--,n--,s++)}e.y1=e.y0+l,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}function P$(t,e,n){n>>=5;const r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,s=32-a,c=t.y1-t.y0;let l,u=(t.y+t.y0)*n+(o>>5);for(let t=0;t<c;t++){l=0;for(let n=0;n<=i;n++)if((l<<s|(n<i?(l=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}function C$(t,e){const n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function R$(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function L$(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function N$(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function I$(){return document.createElement("canvas")}function D$(t){return"function"==typeof t?t:function(){return t}}const B$={archimedean:L$,rectangular:function(t){const e=4*t[0]/t[1];let n=0,r=0;return function(t){const i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};function F$(){let t=[256,256],e=k$,n=M$,r=E$,i=_$,o=S$,a=A$,s=L$,c=Math.random,l=j$,u=[],f=null,h=1/0,d=I$;const p=_$,g={};function y(e,n,r){const i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=s(t),u=c()<.5?1:-1;let f,h,d,p=-u;for(;(f=l(p+=u))&&(h=~~f[0],d=~~f[1],!(Math.min(Math.abs(h),Math.abs(d))>=a));)if(n.x=i+h,n.y=o+d,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||!P$(n,e,t[0]))&&(!r||R$(n,r))){const r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),s=127&a,c=32-s,l=n.y1-n.y0;let u,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<l;t++){u=0;for(let n=0;n<=i;n++)e[f+n]|=u<<c|(n<i?(u=r[t*i+n])>>>s:0);f+=o}return delete n.sprite,!0}return!1}return g.start=function(){const[s,v]=t,m=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=O$/e;const n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",n.textBaseline="middle",{context:n,ratio:e}}(d()),b=g.board?g.board:N$((t[0]>>5)*t[1]),x=u.length,w=[],O=u.map((function(t,s,c){return t.text=e.call(this,t,s,c),t.font=n.call(this,t,s,c),t.style=p.call(this,t,s,c),t.weight=i.call(this,t,s,c),t.rotate=o.call(this,t,s,c),t.size=~~r.call(this,t,s,c),t.padding=a.call(this,t,s,c),t})).sort((function(t,e){return e.size-t.size}));let k=-1,M=g.board?[{x:0,y:0},{x:s,y:v}]:void 0;function _(){const e=Date.now();for(;Date.now()-e<h&&++k<x;){const e=O[k];e.x=s*(c()+.5)>>1,e.y=v*(c()+.5)>>1,T$(m,e,O,k),e.hasText&&y(b,e,M)&&(l.call(null,"word",{cloud:g,word:e}),w.push(e),M?g.hasImage||C$(M,e):M=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}g._tags=w,g._bounds=M,k>=x&&(g.stop(),l.call(null,"end",{cloud:g,words:w,bounds:M}))}return f&&clearInterval(f),f=setInterval(_,0),_(),g},g.stop=function(){return f&&(clearInterval(f),f=null),g},g.createMask=e=>{const n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;const o=r>>5,a=N$((r>>5)*i);n.width=r,n.height=i;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,i);const c=s.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=o*t+(e>>5),i=t*r+e<<2,s=c[i]>=250&&c[i+1]>=250&&c[i+2]>=250?1<<31-e%32:0;a[n]|=s}g.board=a,g.hasImage=!0},g.timeInterval=function(t){h=null==t?1/0:t},g.words=function(t){u=t},g.size=function(e=[]){t=[+e[0],+e[1]]},g.text=function(t){e=D$(t)},g.font=function(t){n=D$(t)},g.fontWeight=function(t){i=D$(t)},g.rotate=function(t){o=D$(t)},g.canvas=function(t){d=D$(t)},g.spiral=function(t){s=B$[t]||t},g.fontSize=function(t){r=D$(t)},g.padding=function(t){a=D$(t)},g.random=function(t){c=D$(t)},g.on=function(t){l=D$(t)},g}var z$=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):function(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))},Z$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const W$={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return 30*(~~(6*Math.random())-3)}};function $$(t){return new Promise(((e,n)=>{if(t instanceof HTMLImageElement)e(t);else{if("string"==typeof t){const r=new Image;return r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),void(r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()})}n()}}))}const G$=(t,e)=>n=>z$(void 0,void 0,void 0,(function*(){const r=Object.assign({},W$,t,{canvas:e.createCanvas}),i=F$();var o,a;yield(o=i,a=r,{set(t,e,n){if(void 0===a[t])return this;const r=e?e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof o[t]?o[t](r):o[t]=r,this},setAsync(t,e,n){return x$(this,void 0,void 0,(function*(){if(void 0===a[t])return this;const r=e?yield e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof o[t]?o[t](r):o[t]=r,this}))}}).set("fontSize",(t=>{const e=n.map((t=>t.value));return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[i,o]=e;return o===i?()=>(r+n)/2:({value:t})=>(r-n)/(o-i)*(t-i)+n}return()=>t}(t,[KE(e),dg(e)])})).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",$$,i.createMask),i.words([...n]);const s=i.start(),[c,l]=r.size,u=[{x:0,y:0},{x:c,y:l}],{_bounds:f=u,_tags:h,hasImage:d}=s,p=h.map((t=>{var{x:e,y:n,font:r}=t,i=Z$(t,["x","y","font"]);return Object.assign(Object.assign({},i),{x:e+c/2,y:n+l/2,fontFamily:r})})),[{x:g,y:y},{x:v,y:m}]=f,b={text:"",value:0,opacity:0,fontSize:0};return p.push(Object.assign(Object.assign({},b),{x:d?0:g,y:d?0:y}),Object.assign(Object.assign({},b),{x:d?c:v,y:d?l:m})),p}));G$.props={};const q$=t=>{const{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{const i=t.map((t=>t[e])),o=function(t,e){if(e<0||e>1)throw new Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0];const r=[];for(const i of t){if(null==i){r.push(i),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=i);const o=n*e+(1-e)*i;r.push(o),n=o}return r}(i,n);return t.map(((t,e)=>Object.assign(Object.assign({},t),{[r]:o[e]})))}};q$.props={};function Y$(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function H$(t,e,n=.01){const[r,i]=t,[o,a]=e;return r>=o[0]-n&&r<=a[0]+n&&i>=o[1]-n&&i<=a[1]+n}function V$(t,e,n=.01){const[r,i]=t;return!(H$(r,e,n)&&H$(i,e,n))}const U$=t=>{const{priority:e}=t;return t=>{const n=[];return e&&t.sort(e),t.forEach((t=>{RO(t);const e=t.getLocalBounds(),r=n.some((t=>function(t,e){const[n,r]=t,[i,o]=e;return n[0]<o[0]&&r[0]>i[0]&&n[1]<o[1]&&r[1]>i[1]}(Y$(e),Y$(t.getLocalBounds()))));r?CO(t):n.push(t)})),t}};function X$([t,e],[n,r]){return r>t&&e>n}function K$(){const t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function Q$(t){const e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);const{min:r,max:i}=e.getRenderBounds();return e.destroy(),{min:r,max:i}}const J$=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{const i=t.length;if(i<=1)return t;const[o,a]=K$(),[s,c]=K$(),[l,u]=K$(),[f,h]=K$();for(const e of t){const{min:t,max:n}=Q$(e),[r,i]=t,[o,s]=n;a(e,i),c(e,i),u(e,s-i),h(e,[r,o])}for(let o=0;o<e;o++){t.sort(((t,e)=>ww(s(t),s(e))));let e=0;for(let n=0;n<i-1;n++){const i=t[n];let o,a=n+1;for(;(o=t[a])&&!X$(f(i),f(o));)a+=1;if(o){const t=s(i),n=l(i),a=s(o),u=a-(t+n);if(u<r){const n=(r-u)/2;e=Math.max(e,n),c(i,t-n),c(o,a+n)}}}if(e<n)break}for(const e of t)e.style.y+=s(e)-o(e);return t}},tG=()=>t=>(t.forEach((t=>{RO(t);const e=t.attr("bounds");V$(Y$(t.getLocalBounds()),e)&&CO(t)})),t);function eG(t){return"object"==typeof t?t:Po(t)}function nG(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function rG(t,e,n){return.2126*nG(t)+.7152*nG(e)+.0722*nG(n)}function iG(t,e){if(!t||!e||t===e)return 1;const{r:n,g:r,b:i}=t,{r:o,g:a,b:s}=e,c=rG(n,r,i),l=rG(o,a,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function oG(t,e){const n=sw(e,(e=>iG(t,eG(e))));return e[n]}const aG=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach((t=>{const r=t.attr("dependentElement").parsedStyle.fill;iG(t.parsedStyle.fill,r)<e&&t.attr("fill",oG(r,n))})),t)};function sG(t){var e;const n=t.getAnimations();if(!n||0===n.length)return FO(t);const r=t.cloneNode(!0);r.style.visibility="hidden",n.forEach((t=>{const e=t.effect.getKeyframes();e&&e.length>0&&r.attr(e[e.length-1])})),null===(e=t.parentNode)||void 0===e||e.appendChild(r);const i=FO(r);return r.destroy(),i}const cG=t=>{const{palette:e=["#000","#fff"],threshold:n=2}=t;return t=>(t.forEach((t=>{var r,i;const o=t.attr("dependentElement"),a=null!==(i=null!==(r=t.attributes.fill)&&void 0!==r?r:t.parsedStyle.fill)&&void 0!==i?i:"#fff";if(V$(Y$(sG(t)),Y$(sG(o)),n)){const n=oG(eG(a),e);t.attr("stroke",n)}else t.removeAttribute("stroke")})),t)},lG=(t={})=>(e,{canvas:n,layout:r})=>{const{bounds:i="view",offsetX:o=0,offsetY:a=0}=t,s=(()=>{if("main"===i){const{x:t=0,y:e=0,width:n=0,height:i=0,marginLeft:s=0,marginRight:c=0,marginTop:l=0,marginBottom:u=0,paddingLeft:f=0,paddingRight:h=0,paddingTop:d=0,paddingBottom:p=0}=r;return[[t+s+f+o,e+l+d+a],[t+n-c-h-o,e+i-u-p-a]]}{const{x:t=0,y:e=0,width:n=0,height:i=0}=r;return[[t+o,e+a],[t+n-o,e+i-a]]}})();return e.forEach((t=>{RO(t);const{max:e,min:n}=((t,e)=>({min:[Math.min(t.min[0],e.min[0]),Math.min(t.min[1],e.min[1])],max:[Math.max(t.max[0],e.max[0]),Math.max(t.max[1],e.max[1])]}))(t.getRenderBounds(),t.getBounds()),[r,i]=e,[o,a]=n,c=((t,e)=>{const[[n,r],[i,o]]=e,[[a,s],[c,l]]=t;let u=0,f=0;return a<n?u=n-a:c>i&&(u=i-c),s<r?f=r-s:l>o&&(f=o-l),[u,f]})([[o,a],[r,i]],s);t.style.connector&&t.style.connectorPoints&&(t.style.connectorPoints[0][0]-=c[0],t.style.connectorPoints[0][1]-=c[1]),t.style.x+=c[0],t.style.y+=c[1]})),e};var uG=t=>t;function fG(t,e){t&&dG.hasOwnProperty(t.type)&&dG[t.type](t,e)}var hG={Feature:function(t,e){fG(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)fG(n[r].geometry,e)}},dG={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){pG(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)pG(n[r],e,0)},Polygon:function(t,e){gG(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)gG(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)fG(n[r],e)}};function pG(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function gG(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)pG(t[n],e,1);e.polygonEnd()}function yG(t,e){t&&hG.hasOwnProperty(t.type)?hG[t.type](t,e):fG(t,e)}class vG{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}var mG=1e-6,bG=Math.PI,xG=bG/2,wG=bG/4,OG=2*bG,kG=180/bG,MG=bG/180,_G=Math.abs,EG=Math.atan,SG=Math.atan2,AG=Math.cos,jG=Math.ceil,TG=Math.exp,PG=(Math.floor,Math.hypot,Math.log),CG=Math.pow,RG=Math.sin,LG=Math.sign||function(t){return t>0?1:t<0?-1:0},NG=Math.sqrt,IG=Math.tan;function DG(t){return t>1?0:t<-1?bG:Math.acos(t)}function BG(t){return t>1?xG:t<-1?-xG:Math.asin(t)}function FG(){}var zG,ZG,WG,$G,GG=new vG,qG=new vG,YG={point:FG,lineStart:FG,lineEnd:FG,polygonStart:function(){YG.lineStart=HG,YG.lineEnd=XG},polygonEnd:function(){YG.lineStart=YG.lineEnd=YG.point=FG,GG.add(_G(qG)),qG=new vG},result:function(){var t=GG/2;return GG=new vG,t}};function HG(){YG.point=VG}function VG(t,e){YG.point=UG,zG=WG=t,ZG=$G=e}function UG(t,e){qG.add($G*t-WG*e),WG=t,$G=e}function XG(){UG(zG,ZG)}var KG=YG,QG=1/0,JG=QG,tq=-QG,eq=tq,nq={point:function(t,e){t<QG&&(QG=t);t>tq&&(tq=t);e<JG&&(JG=e);e>eq&&(eq=e)},lineStart:FG,lineEnd:FG,polygonStart:FG,polygonEnd:FG,result:function(){var t=[[QG,JG],[tq,eq]];return tq=eq=-(JG=QG=1/0),t}};var rq,iq,oq,aq,sq=nq,cq=0,lq=0,uq=0,fq=0,hq=0,dq=0,pq=0,gq=0,yq=0,vq={point:mq,lineStart:bq,lineEnd:Oq,polygonStart:function(){vq.lineStart=kq,vq.lineEnd=Mq},polygonEnd:function(){vq.point=mq,vq.lineStart=bq,vq.lineEnd=Oq},result:function(){var t=yq?[pq/yq,gq/yq]:dq?[fq/dq,hq/dq]:uq?[cq/uq,lq/uq]:[NaN,NaN];return cq=lq=uq=fq=hq=dq=pq=gq=yq=0,t}};function mq(t,e){cq+=t,lq+=e,++uq}function bq(){vq.point=xq}function xq(t,e){vq.point=wq,mq(oq=t,aq=e)}function wq(t,e){var n=t-oq,r=e-aq,i=NG(n*n+r*r);fq+=i*(oq+t)/2,hq+=i*(aq+e)/2,dq+=i,mq(oq=t,aq=e)}function Oq(){vq.point=mq}function kq(){vq.point=_q}function Mq(){Eq(rq,iq)}function _q(t,e){vq.point=Eq,mq(rq=oq=t,iq=aq=e)}function Eq(t,e){var n=t-oq,r=e-aq,i=NG(n*n+r*r);fq+=i*(oq+t)/2,hq+=i*(aq+e)/2,dq+=i,pq+=(i=aq*t-oq*e)*(oq+t),gq+=i*(aq+e),yq+=3*i,mq(oq=t,aq=e)}var Sq=vq;function Aq(t){this._context=t}Aq.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,OG)}},result:FG};var jq,Tq,Pq,Cq,Rq,Lq=new vG,Nq={point:FG,lineStart:function(){Nq.point=Iq},lineEnd:function(){jq&&Dq(Tq,Pq),Nq.point=FG},polygonStart:function(){jq=!0},polygonEnd:function(){jq=null},result:function(){var t=+Lq;return Lq=new vG,t}};function Iq(t,e){Nq.point=Dq,Tq=Cq=t,Pq=Rq=e}function Dq(t,e){Cq-=t,Rq-=e,Lq.add(NG(Cq*Cq+Rq*Rq)),Cq=t,Rq=e}var Bq=Nq;let Fq,zq,Zq,Wq;class $q{constructor(t){this._append=null==t?Gq:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Gq;if(e!==Fq){const t=10**e;Fq=e,zq=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return zq}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==Zq||this._append!==zq){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,Zq=t,zq=this._append,Wq=this._,this._=e}this._+=Wq}}result(){const t=this._;return this._="",t.length?t:null}}function Gq(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function qq(t,e){let n,r,i=3,o=4.5;function a(t){return t&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),yG(t,n(r))),r.result()}return a.area=function(t){return yG(t,n(KG)),KG.result()},a.measure=function(t){return yG(t,n(Bq)),Bq.result()},a.bounds=function(t){return yG(t,n(sq)),sq.result()},a.centroid=function(t){return yG(t,n(Sq)),Sq.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,uG):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new $q(i)):new Aq(e=t),"function"!=typeof o&&r.pointRadius(o),a):e},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(r.pointRadius(+t),+t),a):o},a.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new $q(i)),a},a.projection(t).digits(i).context(e)}function Yq(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)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Hq(t,e,n){var r=Yq(t,e-mG,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Vq(t,e,n){var r=Yq(t,e-mG,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Uq(){return function(){var t,e,n,r,i,o,a,s,c,l,u,f,h=10,d=h,p=90,g=360,y=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return Yq(jG(r/p)*p,n,p).map(u).concat(Yq(jG(s/g)*g,a,g).map(f)).concat(Yq(jG(e/h)*h,t,h).filter((function(t){return _G(t%p)>mG})).map(c)).concat(Yq(jG(o/d)*d,i,d).filter((function(t){return _G(t%g)>mG})).map(l))}return v.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(f(a).slice(1),u(n).reverse().slice(1),f(s).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),v.precision(y)):[[r,s],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(y)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],v):[p,g]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(y=+h,c=Hq(o,i,90),l=Vq(e,t,y),u=Hq(s,a,90),f=Vq(r,n,y),v):y},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}function Xq(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:FG,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Kq(t,e){return _G(t[0]-e[0])<mG&&_G(t[1]-e[1])<mG}function Qq(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Jq(t,e,n,r,i){var o,a,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(Kq(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new Qq(r,t,null,!0)),c.push(n.o=new Qq(r,null,n,!1)),s.push(n=new Qq(a,t,null,!1)),c.push(n.o=new Qq(a,null,n,!0))}})),s.length){for(c.sort(e),tY(s),tY(c),o=0,a=c.length;o<a;++o)c[o].e=n=!n;for(var l,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=l.length;o<a;++o)i.point((u=l[o])[0],u[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((u=l[o])[0],u[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function tY(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function eY(t){return[SG(t[1],t[0]),BG(t[2])]}function nY(t){var e=t[0],n=t[1],r=AG(n);return[r*AG(e),r*RG(e),RG(n)]}function rY(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function iY(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function oY(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function aY(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function sY(t){var e=NG(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function cY(t){return _G(t[0])<=bG?t[0]:LG(t[0])*((_G(t[0])+bG)%OG-bG)}function lY(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function uY(t,e,n,r){return function(i){var o,a,s,c=e(i),l=Xq(),u=e(l),f=!1,h={point:d,lineStart:g,lineEnd:y,polygonStart:function(){h.point=v,h.lineStart=m,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=y,a=lY(a);var t=function(t,e){var n=cY(e),r=e[1],i=RG(r),o=[RG(n),-AG(n),0],a=0,s=0,c=new vG;1===i?r=xG+mG:-1===i&&(r=-xG-mG);for(var l=0,u=t.length;l<u;++l)if(h=(f=t[l]).length)for(var f,h,d=f[h-1],p=cY(d),g=d[1]/2+wG,y=RG(g),v=AG(g),m=0;m<h;++m,p=x,y=O,v=k,d=b){var b=f[m],x=cY(b),w=b[1]/2+wG,O=RG(w),k=AG(w),M=x-p,_=M>=0?1:-1,E=_*M,S=E>bG,A=y*O;if(c.add(SG(A*_*RG(E),v*k+A*AG(E))),a+=S?M+_*OG:M,S^p>=n^x>=n){var j=iY(nY(d),nY(b));sY(j);var T=iY(o,j);sY(T);var P=(S^M>=0?-1:1)*BG(T[2]);(r>P||r===P&&(j[0]||j[1]))&&(s+=S^M>=0?1:-1)}}return(a<-1e-6||a<mG&&c<-1e-12)^1&s}(o,r);a.length?(f||(i.polygonStart(),f=!0),Jq(a,hY,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){h.point=p,c.lineStart()}function y(){h.point=d,c.lineEnd()}function v(t,e){s.push([t,e]),u.point(t,e)}function m(){u.lineStart(),s=[]}function b(){v(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),h=l.result(),d=h.length;if(s.pop(),o.push(s),s=null,d)if(1&c){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(fY))}return h}}function fY(t){return t.length>1}function hY(t,e){return((t=t.x)[0]<0?t[1]-xG-mG:xG-t[1])-((e=e.x)[0]<0?e[1]-xG-mG:xG-e[1])}var dY=uY((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?bG:-bG,c=_G(o-n);_G(c-bG)<mG?(t.point(n,r=(r+a)/2>0?xG:-xG),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&c>=bG&&(_G(n-i)<mG&&(n-=i*mG),_G(o-s)<mG&&(o-=s*mG),r=function(t,e,n,r){var i,o,a=RG(t-n);return _G(a)>mG?EG((RG(e)*(o=AG(r))*RG(n)-RG(r)*(i=AG(e))*RG(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*xG,r.point(-bG,i),r.point(0,i),r.point(bG,i),r.point(bG,0),r.point(bG,-i),r.point(0,-i),r.point(-bG,-i),r.point(-bG,0),r.point(-bG,i);else if(_G(t[0]-e[0])>mG){var o=t[0]<e[0]?bG:-bG;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-bG,-xG]);function pY(t,e,n,r,i,o){if(n){var a=AG(e),s=RG(e),c=r*n;null==i?(i=e+r*OG,o=e-c/2):(i=gY(a,i),o=gY(a,o),(r>0?i<o:i>o)&&(i+=r*OG));for(var l,u=i;r>0?u>o:u<o;u-=c)l=eY([a,-s*AG(u),-s*RG(u)]),t.point(l[0],l[1])}}function gY(t,e){(e=nY(e))[0]-=t,sY(e);var n=DG(-e[1]);return((-e[2]<0?-n:n)+OG-mG)%OG}function yY(t){var e=AG(t),n=2*MG,r=e>0,i=_G(e)>mG;function o(t,n){return AG(t)*AG(n)>e}function a(t,n,r){var i=[1,0,0],o=iY(nY(t),nY(n)),a=rY(o,o),s=o[0],c=a-s*s;if(!c)return!r&&t;var l=e*a/c,u=-e*s/c,f=iY(i,o),h=aY(i,l);oY(h,aY(o,u));var d=f,p=rY(h,d),g=rY(d,d),y=p*p-g*(rY(h,h)-1);if(!(y<0)){var v=NG(y),m=aY(d,(-p-v)/g);if(oY(m,h),m=eY(m),!r)return m;var b,x=t[0],w=n[0],O=t[1],k=n[1];w<x&&(b=x,x=w,w=b);var M=w-x,_=_G(M-bG)<mG;if(!_&&k<O&&(b=O,O=k,k=b),_||M<mG?_?O+k>0^m[1]<(_G(m[0]-x)<mG?O:k):O<=m[1]&&m[1]<=k:M>bG^(x<=m[0]&&m[0]<=w)){var E=aY(d,(-p+v)/g);return oY(E,h),[m,eY(E)]}}}function s(e,n){var i=r?t:bG-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return uY(o,(function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(f,h){var d,p=[f,h],g=o(f,h),y=r?g?0:s(f,h):g?s(f+(f<0?bG:-bG),h):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(d=a(e,p))||Kq(e,d)||Kq(p,d))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),d=a(p,e),t.point(d[0],d[1])):(d=a(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var v;y&n||!(v=a(p,e,!0))||(u=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!g||e&&Kq(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,o){pY(o,t,n,i,e,r)}),r?[0,-t]:[-bG,t-bG])}var vY=1e9,mY=-vY;function bY(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,l){var u=0,f=0;if(null==i||(u=a(i,s))!==(f=a(o,s))||c(i,o)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==f);else l.point(o[0],o[1])}function a(r,i){return _G(r[0]-t)<mG?i>0?0:3:_G(r[0]-n)<mG?i>0?2:1:_G(r[1]-e)<mG?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var c,l,u,f,h,d,p,g,y,v,m,b=a,x=Xq(),w={point:O,lineStart:function(){w.point=k,l&&l.push(u=[]);v=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(f,h),d&&y&&x.rejoin(),c.push(x.result()));w.point=O,y&&b.lineEnd()},polygonStart:function(){b=x,c=[],l=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var o,a,s=l[n],c=1,u=s.length,f=s[0],h=f[0],d=f[1];c<u;++c)o=h,a=d,h=(f=s[c])[0],d=f[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(t-o)&&++e:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--e;return e}(),n=m&&e,i=(c=lY(c)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&Jq(c,s,e,o,a),a.polygonEnd());b=a,c=l=u=null}};function O(t,e){i(t,e)&&b.point(t,e)}function k(o,a){var s=i(o,a);if(l&&u.push([o,a]),v)f=o,h=a,d=s,v=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&y)b.point(o,a);else{var c=[p=Math.max(mY,Math.min(vY,p)),g=Math.max(mY,Math.min(vY,g))],x=[o=Math.max(mY,Math.min(vY,o)),a=Math.max(mY,Math.min(vY,a))];!function(t,e,n,r,i,o){var a,s=t[0],c=t[1],l=0,u=1,f=e[0]-s,h=e[1]-c;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<u&&(u=a)}else if(f>0){if(a>u)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<u&&(u=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<u&&(u=a)}else if(h>0){if(a>u)return;a>l&&(l=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<u&&(u=a)}return l>0&&(t[0]=s+l*f,t[1]=c+l*h),u<1&&(e[0]=s+u*f,e[1]=c+u*h),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(o,a),m=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=o,g=a,y=s}return w}}function xY(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function wY(t,e){return _G(t)>bG&&(t-=Math.round(t/OG)*OG),[t,e]}function OY(t,e,n){return(t%=OG)?e||n?xY(MY(t),_Y(e,n)):MY(t):e||n?_Y(e,n):wY}function kY(t){return function(e,n){return _G(e+=t)>bG&&(e-=Math.round(e/OG)*OG),[e,n]}}function MY(t){var e=kY(t);return e.invert=kY(-t),e}function _Y(t,e){var n=AG(t),r=RG(t),i=AG(e),o=RG(e);function a(t,e){var a=AG(e),s=AG(t)*a,c=RG(t)*a,l=RG(e),u=l*n+s*r;return[SG(c*i-u*o,s*n-l*r),BG(u*i+c*o)]}return a.invert=function(t,e){var a=AG(e),s=AG(t)*a,c=RG(t)*a,l=RG(e),u=l*i-c*o;return[SG(c*i+l*o,s*n+u*r),BG(u*n-s*r)]},a}function EY(t){return function(e){var n=new SY;for(var r in t)n[r]=t[r];return n.stream=e,n}}function SY(){}function AY(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),yG(n,t.stream(sq)),e(sq.result()),null!=r&&t.clipExtent(r),t}function jY(t,e,n){return AY(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}function TY(t,e,n){return jY(t,[[0,0],e],n)}function PY(t,e,n){return AY(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function CY(t,e,n){return AY(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}wY.invert=wY,SY.prototype={constructor:SY,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var RY=AG(30*MG);function LY(t,e){return+e?function(t,e){function n(r,i,o,a,s,c,l,u,f,h,d,p,g,y){var v=l-r,m=u-i,b=v*v+m*m;if(b>4*e&&g--){var x=a+h,w=s+d,O=c+p,k=NG(x*x+w*w+O*O),M=BG(O/=k),_=_G(_G(O)-1)<mG||_G(o-f)<mG?(o+f)/2:SG(w,x),E=t(_,M),S=E[0],A=E[1],j=S-r,T=A-i,P=m*j-v*T;(P*P/b>e||_G((v*j+m*T)/b-.5)>.3||a*h+s*d+c*p<RY)&&(n(r,i,o,a,s,c,S,A,_,x/=k,w/=k,O,g,y),y.point(S,A),n(S,A,_,x,w,O,l,u,f,h,d,p,g,y))}}return function(e){var r,i,o,a,s,c,l,u,f,h,d,p,g={point:y,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=v}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){u=NaN,g.point=m,e.lineStart()}function m(r,i){var o=nY([r,i]),a=t(r,i);n(u,f,l,h,d,p,u=a[0],f=a[1],l=r,h=o[0],d=o[1],p=o[2],16,e),e.point(u,f)}function b(){g.point=y,e.lineEnd()}function x(){v(),g.point=w,g.lineEnd=O}function w(t,e){m(r=t,e),i=u,o=f,a=h,s=d,c=p,g.point=m}function O(){n(u,f,l,h,d,p,i,o,r,a,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return EY({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var NY=EY({point:function(t,e){this.stream.point(t*MG,e*MG)}});function IY(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=AG(o),s=RG(o),c=a*t,l=s*t,u=a/t,f=s/t,h=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(t,o){return[c*(t*=r)-l*(o*=i)+e,n-l*t-c*o]}return p.invert=function(t,e){return[r*(u*t-f*e+h),i*(d-f*t-u*e)]},p}function DY(t){return BY((function(){return t}))()}function BY(t){var e,n,r,i,o,a,s,c,l,u,f=150,h=480,d=250,p=0,g=0,y=0,v=0,m=0,b=0,x=1,w=1,O=null,k=dY,M=null,_=uG,E=.5;function S(t){return c(t[0]*MG,t[1]*MG)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*kG,t[1]*kG]}function j(){var t=IY(f,0,0,x,w,b).apply(null,e(p,g)),r=IY(f,h-t[0],d-t[1],x,w,b);return n=OY(y,v,m),s=xY(e,r),c=xY(n,s),a=LY(s,E),T()}function T(){return l=u=null,S}return S.stream=function(t){return l&&u===t?l:l=NY(function(t){return EY({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(a(_(u=t)))))},S.preclip=function(t){return arguments.length?(k=t,O=void 0,T()):k},S.postclip=function(t){return arguments.length?(_=t,M=r=i=o=null,T()):_},S.clipAngle=function(t){return arguments.length?(k=+t?yY(O=t*MG):(O=null,dY),T()):O*kG},S.clipExtent=function(t){return arguments.length?(_=null==t?(M=r=i=o=null,uG):bY(M=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),T()):null==M?null:[[M,r],[i,o]]},S.scale=function(t){return arguments.length?(f=+t,j()):f},S.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],j()):[h,d]},S.center=function(t){return arguments.length?(p=t[0]%360*MG,g=t[1]%360*MG,j()):[p*kG,g*kG]},S.rotate=function(t){return arguments.length?(y=t[0]%360*MG,v=t[1]%360*MG,m=t.length>2?t[2]%360*MG:0,j()):[y*kG,v*kG,m*kG]},S.angle=function(t){return arguments.length?(b=t%360*MG,j()):b*kG},S.reflectX=function(t){return arguments.length?(x=t?-1:1,j()):x<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,j()):w<0},S.precision=function(t){return arguments.length?(a=LY(s,E=t*t),T()):NG(E)},S.fitExtent=function(t,e){return jY(S,t,e)},S.fitSize=function(t,e){return TY(S,t,e)},S.fitWidth=function(t,e){return PY(S,t,e)},S.fitHeight=function(t,e){return CY(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,j()}}function FY(t){var e=0,n=bG/3,r=BY(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*MG,n=t[1]*MG):[e*kG,n*kG]},i}function zY(t,e){var n=RG(t),r=(n+RG(e))/2;if(_G(r)<mG)return function(t){var e=AG(t);function n(t,n){return[t*e,RG(n)/e]}return n.invert=function(t,n){return[t/e,BG(n*e)]},n}(t);var i=1+n*(2*r-n),o=NG(i)/r;function a(t,e){var n=NG(i-2*r*RG(e))/r;return[n*RG(t*=r),o-n*AG(t)]}return a.invert=function(t,e){var n=o-e,a=SG(t,_G(n))*LG(n);return n*r<0&&(a-=bG*LG(t)*LG(n)),[a/r,BG((i-(t*t+n*n)*r*r)/(2*r))]},a}function ZY(){return FY(zY).scale(155.424).center([0,33.6442])}function WY(){return ZY().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function $Y(){var t,e,n,r,i,o,a=WY(),s=ZY().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=ZY().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){o=[t,e]}};function u(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},u.stream=function(n){return t&&e===n?t:t=function(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}([a.stream(e=n),s.stream(n),c.stream(n)])},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),c.precision(t),f()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),c.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,u-.238*e],[o+.455*e,u+.238*e]]).stream(l),r=s.translate([o-.307*e,u+.201*e]).clipExtent([[o-.425*e+mG,u+.12*e+mG],[o-.214*e-mG,u+.234*e-mG]]).stream(l),i=c.translate([o-.205*e,u+.212*e]).clipExtent([[o-.214*e+mG,u+.166*e+mG],[o-.115*e-mG,u+.234*e-mG]]).stream(l),f()},u.fitExtent=function(t,e){return jY(u,t,e)},u.fitSize=function(t,e){return TY(u,t,e)},u.fitWidth=function(t,e){return PY(u,t,e)},u.fitHeight=function(t,e){return CY(u,t,e)},u.scale(1070)}function GY(t){return function(e,n){var r=AG(e),i=AG(n),o=t(r*i);return o===1/0?[2,0]:[o*i*RG(e),o*RG(n)]}}function qY(t){return function(e,n){var r=NG(e*e+n*n),i=t(r),o=RG(i),a=AG(i);return[SG(e*o,r*a),BG(r&&n*o/r)]}}var YY=GY((function(t){return NG(2/(1+t))}));function HY(){return DY(YY).scale(124.75).clipAngle(179.999)}YY.invert=qY((function(t){return 2*BG(t/2)}));var VY=GY((function(t){return(t=DG(t))&&t/RG(t)}));function UY(){return DY(VY).scale(79.4188).clipAngle(179.999)}function XY(t,e){return[t,PG(IG((xG+e)/2))]}function KY(){return QY(XY).scale(961/OG)}function QY(t){var e,n,r,i=DY(t),o=i.center,a=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var o=bG*a(),s=i(function(t){function e(e){return(e=t(e[0]*MG,e[1]*MG))[0]*=kG,e[1]*=kG,e}return t=OY(t[0]*MG,t[1]*MG,t.length>2?t[2]*MG:0),e.invert=function(e){return(e=t.invert(e[0]*MG,e[1]*MG))[0]*=kG,e[1]*=kG,e},e}(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===XY?[[Math.max(s[0]-o,l),e],[Math.min(s[0]+o,n),r]]:[[l,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),u()):a()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(o(t),u()):o()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function JY(t){return IG((xG+t)/2)}function tH(t,e){var n=AG(t),r=t===e?RG(t):PG(n/AG(e))/PG(JY(e)/JY(t)),i=n*CG(JY(t),r)/r;if(!r)return XY;function o(t,e){i>0?e<-xG+mG&&(e=-xG+mG):e>xG-mG&&(e=xG-mG);var n=i/CG(JY(e),r);return[n*RG(r*t),i-n*AG(r*t)]}return o.invert=function(t,e){var n=i-e,o=LG(r)*NG(t*t+n*n),a=SG(t,_G(n))*LG(n);return n*r<0&&(a-=bG*LG(t)*LG(n)),[a/r,2*EG(CG(i/o,1/r))-xG]},o}function eH(){return FY(tH).scale(109.5).parallels([30,30])}function nH(t,e){return[t,e]}function rH(){return DY(nH).scale(152.63)}function iH(t,e){var n=AG(t),r=t===e?RG(t):(n-AG(e))/(e-t),i=n/r+t;if(_G(r)<mG)return nH;function o(t,e){var n=i-e,o=r*t;return[n*RG(o),i-n*AG(o)]}return o.invert=function(t,e){var n=i-e,o=SG(t,_G(n))*LG(n);return n*r<0&&(o-=bG*LG(t)*LG(n)),[o/r,i-LG(r)*NG(t*t+n*n)]},o}function oH(){return FY(iH).scale(131.154).center([0,13.9389])}VY.invert=qY((function(t){return t})),XY.invert=function(t,e){return[t,2*EG(TG(e))-xG]},nH.invert=nH;var aH=1.340264,sH=-.081106,cH=893e-6,lH=.003796,uH=NG(3)/2;function fH(t,e){var n=BG(uH*RG(e)),r=n*n,i=r*r*r;return[t*AG(n)/(uH*(aH+3*sH*r+i*(7*cH+9*lH*r))),n*(aH+sH*r+i*(cH+lH*r))]}function hH(){return DY(fH).scale(177.158)}function dH(t,e){var n=AG(e),r=AG(t)*n;return[n*RG(t)/r,RG(e)/r]}function pH(){return DY(dH).scale(144.049).clipAngle(60)}function gH(){var t,e,n,r,i,o,a,s=1,c=0,l=0,u=1,f=1,h=0,d=null,p=1,g=1,y=EY({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),v=uG;function m(){return p=s*u,g=s*f,o=a=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(h){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+c,i+l]}return b.invert=function(n){var r=n[0]-c,i=n[1]-l;if(h){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/p,i/g]},b.stream=function(t){return o&&a===t?o:o=y(v(a=t))},b.postclip=function(t){return arguments.length?(v=t,d=n=r=i=null,m()):v},b.clipExtent=function(t){return arguments.length?(v=null==t?(d=n=r=i=null,uG):bY(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),m()):null==d?null:[[d,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,m()):s},b.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],m()):[c,l]},b.angle=function(n){return arguments.length?(e=RG(h=n%360*MG),t=AG(h),m()):h*kG},b.reflectX=function(t){return arguments.length?(u=t?-1:1,m()):u<0},b.reflectY=function(t){return arguments.length?(f=t?-1:1,m()):f<0},b.fitExtent=function(t,e){return jY(b,t,e)},b.fitSize=function(t,e){return TY(b,t,e)},b.fitWidth=function(t,e){return PY(b,t,e)},b.fitHeight=function(t,e){return CY(b,t,e)},b}function yH(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function vH(){return DY(yH).scale(175.295)}function mH(t,e){return[AG(e)*RG(t),RG(e)]}function bH(){return DY(mH).scale(249.5).clipAngle(90.000001)}function xH(t,e){var n=AG(e),r=1+AG(t)*n;return[n*RG(t)/r,RG(e)/r]}function wH(){return DY(xH).scale(250).clipAngle(142)}function OH(t,e){return[PG(IG((xG+e)/2)),-t]}function kH(){var t=QY(OH),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}fH.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(aH+sH*i+o*(cH+lH*i))-e)/(aH+3*sH*i+o*(7*cH+9*lH*i)))*r)*i*i,!(_G(n)<1e-12));++a);return[uH*t*(aH+3*sH*i+o*(7*cH+9*lH*i))/AG(r),BG(RG(r)/uH)]},dH.invert=qY(EG),yH.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(_G(n)>mG&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},mH.invert=qY(BG),xH.invert=qY((function(t){return 2*EG(t)})),OH.invert=function(t,e){return[-e,2*EG(TG(t))-xG]};var MH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function _H(t,e,n,r){const i=()=>{const t=e.filter(SH),n=t.find((t=>t.sphere));return n?{type:"Sphere"}:(r=t.filter((t=>!t.sphere)).flatMap((t=>t.data.value)),{type:"FeatureCollection",features:r.flatMap((t=>function(t){const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!t||!t.type)return null;const n=e[t.type];return n?"geometry"===n?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===n?{type:"FeatureCollection",features:[t]}:"featureCollection"===n?t:void 0:null}(t).features))});var r},{outline:o=i()}=r,{size:a="fitExtent"}=r;return"fitExtent"===a?function(t,e,n){const{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(t,o,n):"fitWidth"===a?function(t,e,n){const{width:r,height:i}=n,[[o,a],[s,c]]=qq(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-a),u=Math.min(Math.ceil(s-o),l),f=t.scale()*(u-1)/u,[h,d]=t.translate(),p=d+(i-l)/2;t.scale(f).translate([h,p]).precision(.2)}(t,o,n):void 0}function EH(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[Uq()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function SH(t){return"geoPath"===t.type}const AH=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=MH(n,["type"]),o=function(t){if("function"==typeof t)return t;const e=`geo${$p(t)}`,n=a[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}(r),s=e.map((e=>Object.assign(Object.assign({},e),{data:Ox(e.data,t.data)}))).map(EH);let c;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 a=o();_H(a,s,{x:t,y:e,width:n,height:r},i),function(t,e){var n;for(const[r,i]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,i)}(a,i),c=qq(a);const l=new sm({domain:[t,t+n]}),u=new sm({domain:[e,e+r]});return{transform:t=>(t=>{const e=a(t);if(!e)return[null,null];const[n,r]=e;return[l.map(n),u.map(r)]})(t),untransform:t=>(t=>{if(!t)return null;const[e,n]=t,r=[l.invert(e),u.invert(n)];return a.invert(r)})(t)}}]]}},children:s.flatMap((t=>SH(t)?function(t){const{style:e,tooltip:n={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:iS(n,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},e),{d:t=>c(t)||[]})})}(t):t))})]};AH.props={};var jH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const TH=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:s,state:c,tooltip:l}=t,u=jH(t,["type","data","scale","encode","style","animate","key","state","tooltip"]);return[Object.assign(Object.assign({type:"geoView"},u),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:c,tooltip:l}]})]};function PH(t){return t.index}function CH(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}TH.props={};var RH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const LH={joint:!0},NH={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}},IH={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},DH={text:""};function BH(t,e,n){const{nodes:r,links:i}=t,{joint:o,nodeStrength:a,linkStrength:s}=e,{nodeKey:c=(t=>t.id),linkKey:l=(t=>t.id)}=n,u=function(){var t,e,n,r,i,o=QL(-30),a=1,s=1/0,c=.81;function l(n){var i,o=t.length,a=VL(t,zL,ZL).visitAfter(f);for(r=n,i=0;i<o;++i)e=t[i],a.visit(h)}function u(){if(t){var e,n,r=t.length;for(i=new Array(r),e=0;e<r;++e)n=t[e],i[n.index]=+o(n,e,t)}}function f(t){var e,n,r,o,a,s=0,c=0;if(t.length){for(r=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,r+=n*e.x,o+=n*e.y);t.x=r/c,t.y=o/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function h(t,o,l,u){if(!t.value)return!0;var f=t.x-e.x,h=t.y-e.y,d=u-o,p=f*f+h*h;if(d*d/c<p)return p<s&&(0===f&&(p+=(f=JL(n))*f),0===h&&(p+=(h=JL(n))*h),p<a&&(p=Math.sqrt(a*p)),e.vx+=f*t.value*r/p,e.vy+=h*t.value*r/p),!0;if(!(t.length||p>=s)){(t.data!==e||t.next)&&(0===f&&(p+=(f=JL(n))*f),0===h&&(p+=(h=JL(n))*h),p<a&&(p=Math.sqrt(a*p)));do{t.data!==e&&(d=i[t.data.index]*r/p,e.vx+=f*d,e.vy+=h*d)}while(t=t.next)}}return l.initialize=function(e,r){t=e,n=r,u()},l.strength=function(t){return arguments.length?(o="function"==typeof t?t:QL(+t),u(),l):o},l.distanceMin=function(t){return arguments.length?(a=t*t,l):Math.sqrt(a)},l.distanceMax=function(t){return arguments.length?(s=t*t,l):Math.sqrt(s)},l.theta=function(t){return arguments.length?(c=t*t,l):Math.sqrt(c)},l}(),f=function(t){var e,n,r,i,o,a,s=PH,c=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},l=QL(30),u=1;function f(r){for(var i=0,s=t.length;i<u;++i)for(var c,l,f,h,d,p,g,y=0;y<s;++y)l=(c=t[y]).source,h=(f=c.target).x+f.vx-l.x-l.vx||JL(a),d=f.y+f.vy-l.y-l.vy||JL(a),h*=p=((p=Math.sqrt(h*h+d*d))-n[y])/p*r*e[y],d*=p,f.vx-=h*(g=o[y]),f.vy-=d*g,l.vx+=h*(g=1-g),l.vy+=d*g}function h(){if(r){var a,c,l=r.length,u=t.length,f=new Map(r.map(((t,e)=>[s(t,e,r),t])));for(a=0,i=new Array(l);a<u;++a)(c=t[a]).index=a,"object"!=typeof c.source&&(c.source=CH(f,c.source)),"object"!=typeof c.target&&(c.target=CH(f,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(a=0,o=new Array(u);a<u;++a)c=t[a],o[a]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(u),d(),n=new Array(u),p()}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+l(t[e],e,t)}return null==t&&(t=[]),f.initialize=function(t,e){r=t,a=e,h()},f.links=function(e){return arguments.length?(t=e,h(),f):t},f.id=function(t){return arguments.length?(s=t,f):s},f.iterations=function(t){return arguments.length?(u=+t,f):u},f.strength=function(t){return arguments.length?(c="function"==typeof t?t:QL(+t),d(),f):c},f.distance=function(t){return arguments.length?(l="function"==typeof t?t:QL(+t),p(),f):l},f}(i).id(VT(l));"function"==typeof a&&u.strength(a),"function"==typeof s&&f.strength(s);const h=$L(r).force("link",f).force("charge",u);o?h.force("center",function(t,e){var n,r=1;function i(){var i,o,a=n.length,s=0,c=0;for(i=0;i<a;++i)s+=(o=n[i]).x,c+=o.y;for(s=(s/a-t)*r,c=(c/a-e)*r,i=0;i<a;++i)(o=n[i]).x-=s,o.y-=c}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}()):h.force("x",nN()).force("y",rN()),h.stop();const d=Math.ceil(Math.log(h.alphaMin())/Math.log(1-h.alphaDecay()));for(let t=0;t<d;t++)h.tick();return{nodesData:r,linksData:i}}const FH=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{nodeKey:u=(t=>t.id),linkKey:f=(t=>t.id)}=n,h=RH(n,["nodeKey","linkKey"]),d=Object.assign({nodeKey:u,linkKey:f},h),p=Rd(d,"node"),g=Rd(d,"link"),{links:y,nodes:v}=XT(e,d),{nodesData:m,linksData:b}=BH({links:y,nodes:v},Jh({},LH,o),d),x=rS(l,"link",{items:[t=>({name:"source",value:VT(f)(t.source)}),t=>({name:"target",value:VT(f)(t.target)})]}),w=rS(l,"node",{items:[t=>({name:"key",value:VT(u)(t)})]},!0);return[Jh({},NH,{data:b,encode:g,labels:s,style:Rd(i,"link"),tooltip:x,animate:aS(c,"link")}),Jh({},IH,{data:m,encode:Object.assign({},p),scale:r,style:Rd(i,"node"),tooltip:w,labels:[Object.assign(Object.assign({},DH),Rd(i,"label")),...a],animate:aS(c,"link")})]};function zH(t,e){return t.parent===e.parent?1:2}function ZH(t){var e=t.children;return e?e[0]:t.t}function WH(t){var e=t.children;return e?e[e.length-1]:t.t}function $H(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 GH(t,e,n){return t.a.parent===e.parent?t.a:n}function qH(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function YH(){var t=zH,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,o,a=new qH(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new qH(r[i],i)),n.parent=e;return(a.parent=new qH(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(s);else{var l=i,u=i,f=i;i.eachBefore((function(t){t.x<l.x&&(l=t),t.x>u.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=l===u?1:t(l,u)/2,d=h-l.x,p=e/(u.x+h+d),g=n/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,c=o.parent.children[0],l=o.m,u=a.m,f=s.m,h=c.m;s=WH(s),o=ZH(o),s&&o;)c=ZH(c),(a=WH(a)).a=e,(i=s.z+f-o.z-l+t(s._,o._))>0&&($H(GH(s,e,r),e,i),l+=i,u+=i),f+=s.m,l+=o.m,h+=c.m,u+=a.m;s&&!WH(a)&&(a.t=s,a.m+=f-u),o&&!ZH(c)&&(c.t=o,c.m+=l-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function HH(t,e){return t.parent===e.parent?1:2}function VH(t,e){return t+e.x}function UH(t,e){return Math.max(t,e.y)}function XH(){var t=HH,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(VH,0)/t.length}(n),e.y=function(t){return 1+t.reduce(UH,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,c)/2,u=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(u-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}FH.props={},qH.prototype=Object.create(Dj.prototype);const KH=t=>e=>n=>{const{field:r="value",nodeSize:i,separation:o,sortBy:a,as:s=["x","y"]}=e,[c,l]=s,u=Cj(n,(t=>t.children)).sum((t=>t[r])).sort(a),f=t();f.size([1,1]),i&&f.nodeSize(i),o&&f.separation(o),f(u);const h=[];u.each((t=>{t[c]=t.x,t[l]=t.y,t.name=t.data.name,h.push(t)}));const d=u.links();return d.forEach((t=>{t[c]=[t.source[c],t.target[c]],t[l]=[t.source[l],t.target[l]]})),{nodes:h,edges:d}},QH=t=>KH(XH)(t);QH.props={};const JH=t=>KH(YH)(t);JH.props={};const tV={sortBy:(t,e)=>e.value-t.value},eV={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},nV={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},rV={text:"",fontSize:10},iV=t=>{const{data:e,encode:n={},scale:r={},style:i={},layout:o={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,u=null==n?void 0:n.value,{nodes:f,edges:h}=JH(Object.assign(Object.assign(Object.assign({},tV),o),{field:u}))(e),d=rS(l,"node",{title:"name",items:["value"]},!0),p=rS(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[Jh({},nV,{data:h,encode:Rd(n,"link"),scale:Rd(r,"link"),labels:s,style:Object.assign({stroke:"#999"},Rd(i,"link")),tooltip:p,animate:aS(c,"link")}),Jh({},eV,{data:f,scale:Rd(r,"node"),encode:Rd(n,"node"),labels:[Object.assign(Object.assign({},rV),Rd(i,"label")),...a],style:Object.assign({},Rd(i,"node")),tooltip:d,animate:aS(c,"node")})]};iV.props={};var oV=4294967296;var aV=n(89957);function sV(t,e){for(var n,r,i=0,o=(t=function(t,e){for(var n,r,i=t.length;i;)r=e()*i--|0,n=t[i],t[i]=t[r],t[r]=n;return t}(Array.from(t),e)).length,a=[];i<o;)n=t[i],r&&uV(r,n)?++i:(r=hV(a=cV(a,n)),i=0);return r}function cV(t,e){var n,r;if(fV(e,t))return[e];for(n=0;n<t.length;++n)if(lV(e,t[n])&&fV(dV(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(lV(dV(t[n],t[r]),e)&&lV(dV(t[n],e),t[r])&&lV(dV(t[r],e),t[n])&&fV(pV(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function lV(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function uV(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function fV(t,e){for(var n=0;n<e.length;++n)if(!uV(t,e[n]))return!1;return!0}function hV(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return dV(t[0],t[1]);case 3:return pV(t[0],t[1],t[2])}}function dV(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,c=o-n,l=a-r,u=s-i,f=Math.sqrt(c*c+l*l);return{x:(n+o+c/f*u)/2,y:(r+a+l/f*u)/2,r:(f+i+s)/2}}function pV(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,c=e.r,l=n.x,u=n.y,f=n.r,h=r-a,d=r-l,p=i-s,g=i-u,y=c-o,v=f-o,m=r*r+i*i-o*o,b=m-a*a-s*s+c*c,x=m-l*l-u*u+f*f,w=d*p-h*g,O=(p*x-g*b)/(2*w)-r,k=(g*y-p*v)/w,M=(d*b-h*x)/(2*w)-i,_=(h*v-d*y)/w,E=k*k+_*_-1,S=2*(o+O*k+M*_),A=O*O+M*M-o*o,j=-(Math.abs(E)>1e-6?(S+Math.sqrt(S*S-4*E*A))/(2*E):A/S);return{x:r+O+k*j,y:i+M+_*j,r:j}}function gV(t,e,n){var r,i,o,a,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(l+a-i)/(2*l),o=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-o*c,n.y=t.y-r*c+o*s):(r=(l+i-a)/(2*l),o=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-o*c,n.y=e.y+r*c+o*s)):(n.x=e.x+n.r,n.y=e.y)}function yV(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function vV(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function mV(t){this._=t,this.next=null,this.previous=null}function bV(t,e){if(!(o=(t=function(t){return"object"===aV(t)&&"length"in t?t:Array.from(t)}(t)).length))return 0;var n,r,i,o,a,s,c,l,u,f,h;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;gV(r,n,i=t[2]),n=new mV(n),r=new mV(r),i=new mV(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<o;++c){gV(n._,r._,i=t[c]),i=new mV(i),l=r.next,u=n.previous,f=r._.r,h=n._.r;do{if(f<=h){if(yV(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(yV(u._,i._)){(n=u).next=r,r.previous=n,--c;continue t}h+=u._.r,u=u.previous}}while(l!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=vV(n);(i=i.next)!==r;)(s=vV(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=sV(n,e),c=0;c<o;++c)(n=t[c]).x-=i.x,n.y-=i.y;return i.r}function xV(t){return Math.sqrt(t.value)}function wV(){var t=null,e=1,n=1,r=mz;function i(i){var o=function(){var t=1;return function(){return(t=(1664525*t+1013904223)%oV)/oV}}();return i.x=e/2,i.y=n/2,t?i.eachBefore(OV(t)).eachAfter(kV(r,.5,o)).eachBefore(MV(1)):i.eachBefore(OV(xV)).eachAfter(kV(mz,1,o)).eachAfter(kV(r,i.r/Math.min(e,n),o)).eachBefore(MV(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=ez(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:bz(+t),i):r},i}function OV(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kV(t,e,n){return function(r){if(i=r.children){var i,o,a,s=i.length,c=t(r)*e||0;if(c)for(o=0;o<s;++o)i[o].r+=c;if(a=bV(i,n),c)for(o=0;o<s;++o)i[o].r-=c;r.r=a+c}}}function MV(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var _V=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const EV={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},SV={title:t=>t.data.name,items:[{field:"value"}]},AV=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:o={},scale:a={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=_V(t,["data","encode","scale","style","layout","labels","tooltip"]),h=((t,e,n)=>({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:n.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}))(n,r,o),d=((t,e,n)=>{const{value:r}=n,i=xn(t)?cz().path(e.path)(t):Cj(t);return r?i.sum((t=>VT(r)(t))).sort(e.sort):i.count(),wV().size(e.size).padding(e.padding)(i),i.descendants()})(i,Jh({},((t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}))(n,r),c),Jh({},h.encode,o)),p=Rd(s,"label");return Jh({},h,Object.assign(Object.assign({data:d,encode:o,scale:a,style:s,labels:[Object.assign(Object.assign({},EV),p),...l]},f),{tooltip:iS(u,SV),axis:!1}))};function jV(t){return t.target.depth}function TV(t,e){return t.sourceLinks.length?t.depth:e-1}function PV(t){return function(){return t}}function CV(t,e){return LV(t.source,e.source)||t.index-e.index}function RV(t,e){return LV(t.target,e.target)||t.index-e.index}function LV(t,e){return t.y0-e.y0}function NV(t){return t.value}function IV(t){return t.index}function DV(t){return t.nodes}function BV(t){return t.links}function FV(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function zV({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function ZV(){let t,e,n,r,i=0,o=0,a=1,s=1,c=24,l=8,u=IV,f=TV,h=DV,d=BV,p=6;function g(g){const m={nodes:h(g),links:d(g)};return function({nodes:t,links:e}){t.forEach(((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]}));const n=new Map(t.map((t=>[u(t),t])));if(e.forEach(((t,e)=>{t.index=e;let{source:r,target:i}=t;"object"!=typeof r&&(r=t.source=FV(n,r)),"object"!=typeof i&&(i=t.target=FV(n,i)),r.sourceLinks.push(t),i.targetLinks.push(t)})),null!=r)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(r),n.sort(r)}(m),function({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(hg(e.sourceLinks,NV),hg(e.targetLinks,NV)):e.fixedValue}(m),function({nodes:t}){const n=t.length;let r=new Set(t),i=new Set,o=0;for(;r.size;){if(r.forEach((t=>{t.depth=o;for(const{target:e}of t.sourceLinks)i.add(e)})),++o>n)throw new Error("circular link");r=i,i=new Set}if(e){const n=Math.max(dg(t,(t=>t.depth))+1,0);let r;for(let i=0;i<t.length;i++)r=t[i],r.depth=e.call(null,r,n)}}(m),function({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){if(n.forEach((t=>{t.height=i;for(const{source:e}of t.targetLinks)r.add(e)})),++i>e)throw new Error("circular link");n=r,r=new Set}}(m),function(e){const r=function({nodes:t}){const e=Math.max(dg(t,(t=>t.depth))+1,0),r=(a-i-c)/(e-1),o=new Array(e).fill(0).map((()=>[]));for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(f.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+c,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const t of o)t.sort(n);return o}(e);t=Math.min(l,(s-o)/(dg(r,(t=>t.length))-1)),function(e){const n=KE(e,(e=>(s-o-(e.length-1)*t)/hg(e,NV)));for(const r of e){let e=o;for(const i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*n}e=(s-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}O(r)}}(r);for(let t=0;t<p;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/p);v(r,e,n),y(r,e,n)}}(m),zV(m),m}function y(t,e,r){for(let i=1,o=t.length;i<o;++i){const o=t[i];for(const t of o){let n=0,r=0;for(const{source:e,value:i}of t.targetLinks){const o=i*(t.layer-e.layer);n+=k(e,t)*o,r+=o}if(!(r>0))continue;const i=(n/r-t.y0)*e;t.y0+=i,t.y1+=i,w(t)}void 0===n&&o.sort(LV),o.length&&m(o,r)}}function v(t,e,r){for(let i=t.length-2;i>=0;--i){const o=t[i];for(const t of o){let n=0,r=0;for(const{target:e,value:i}of t.sourceLinks){const o=i*(e.layer-t.layer);n+=M(t,e)*o,r+=o}if(!(r>0))continue;const i=(n/r-t.y0)*e;t.y0+=i,t.y1+=i,w(t)}void 0===n&&o.sort(LV),o.length&&m(o,r)}}function m(e,n){const r=e.length>>1,i=e[r];x(e,i.y0-t,r-1,n),b(e,i.y1+t,r+1,n),x(e,s,e.length-1,n),b(e,o,0,n)}function b(e,n,r,i){for(;r<e.length;++r){const o=e[r],a=(n-o.y0)*i;a>1e-6&&(o.y0+=a,o.y1+=a),n=o.y1+t}}function x(e,n,r,i){for(;r>=0;--r){const o=e[r],a=(o.y1-n)*i;a>1e-6&&(o.y0-=a,o.y1-=a),n=o.y0-t}}function w({sourceLinks:t,targetLinks:e}){if(void 0===r){for(const{source:{sourceLinks:t}}of e)t.sort(RV);for(const{target:{targetLinks:e}}of t)e.sort(CV)}}function O(t){if(void 0===r)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(RV),n.sort(CV)}function k(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:o}of e.sourceLinks){if(i===n)break;r+=o+t}for(const{source:t,width:i}of n.targetLinks){if(t===e)break;r-=i}return r}function M(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:i,width:o}of n.targetLinks){if(i===e)break;r+=o+t}for(const{target:t,width:i}of e.sourceLinks){if(t===n)break;r-=i}return r}return g.update=function(t){return zV(t),t},g.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:PV(t),g):u},g.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:PV(t),g):f},g.nodeDepth=function(t){return arguments.length?(e=t,g):e},g.nodeSort=function(t){return arguments.length?(n=t,g):n},g.nodeWidth=function(t){return arguments.length?(c=+t,g):c},g.nodePadding=function(e){return arguments.length?(l=t=+e,g):l},g.nodes=function(t){return arguments.length?(h="function"==typeof t?t:PV(t),g):h},g.links=function(t){return arguments.length?(d="function"==typeof t?t:PV(t),g):d},g.linkSort=function(t){return arguments.length?(r=t,g):r},g.size=function(t){return arguments.length?(i=o=0,a=+t[0],s=+t[1],g):[a-i,s-o]},g.extent=function(t){return arguments.length?(i=+t[0][0],a=+t[1][0],o=+t[0][1],s=+t[1][1],g):[[i,o],[a,s]]},g.iterations=function(t){return arguments.length?(p=+t,g):p},g}AV.props={};const WV={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},$V={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?KE(t.sourceLinks,jV)-1:0},justify:TV};const GV=t=>e=>{const{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:o,nodePadding:a,nodeDepth:s,nodes:c,links:l,linkSort:u,iterations:f}=Object.assign({},WV,t),h=ZV().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(o).nodePadding(a).nodeDepth(s).nodeAlign(function(t){const e=typeof t;return"string"===e?$V[t]||TV:"function"===e?t:TV}(i)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&h.nodeId(n);const d=h(e),{nodes:p,links:g}=d,y=p.map((t=>{const{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]})})),v=g.map((t=>{const{source:e,target:n}=t,r=e.x1,i=n.x0,o=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,i,i],y:[t.y0+o,t.y0-o,t.y1+o,t.y1-o]})}));return{nodes:y,links:v}};GV.props={};var qV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const YV={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},HV={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},VV={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},UV={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},XV=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={},interaction:u,state:f={},viewStyle:h={}}=t,{links:d,nodes:p}=XT(e,n);if(!d||0===d.length)return[Jh({},HV,{data:[],encode:{},scale:r,style:Rd(i,"node"),viewStyle:h,labels:[],tooltip:!1,animate:!1,axis:!1,interaction:u,state:{}}),Jh({},VV,{data:[],encode:{},labels:[],style:Rd(i,"link"),tooltip:!1,animate:!1,interaction:u,state:{}})];const g=Rd(n,"node"),y=Rd(n,"link"),{key:v=(t=>t.key),color:m=v}=g,{links:b,nodes:x}=GV(Object.assign(Object.assign(Object.assign({},YV),{nodeId:VT(v)}),o))({links:d,nodes:p}),w=Rd(i,"label"),{text:O=v,spacing:k=5}=w,M=qV(w,["text","spacing"]),_=VT(v),E=rS(l,"node",{title:_,items:[{field:"value"}]},!0),S=rS(l,"link",{title:"",items:[t=>({name:"source",value:_(t.source)}),t=>({name:"target",value:_(t.target)})]}),[A,j]=Object.entries(f).reduce(((t,[e,n])=>{const r=Nd(n,"node","link"),i=Rd(n,"node");t[0][e]=Object.assign(Object.assign({},r),i);const o=Rd(n,"link");return t[1][e]=Object.assign(Object.assign({},r),o),t}),[{},{}]);return[Jh({},HV,{data:x,encode:Object.assign(Object.assign({},g),{color:m}),scale:r,style:Rd(i,"node"),viewStyle:h,labels:[Object.assign(Object.assign(Object.assign({},UV),{text:O,dx:t=>t.x[0]<.5?k:-k}),M),...a],tooltip:E,animate:aS(c,"node"),axis:!1,interaction:u,state:A}),Jh({},VV,{data:b,encode:y,labels:s,style:Object.assign({fill:y.color?void 0:"#aaa",lineWidth:0},Rd(i,"link")),tooltip:S,animate:aS(c,"link"),interaction:u,state:j})]};function KV(t,e){return e.value-t.value}function QV(t,e){return e.frequency-t.frequency}function JV(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function tU(t,e){return`${t.name}`.localeCompare(`${e.name}`)}XV.props={};const eU={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 nU(t){const{y:e,thickness:n,weight:r,marginRatio:i,id:o,source:a,target:c,sourceWeight:l,targetWeight:u,sortBy:f}=Object.assign(Object.assign({},eU),t);return function(t){const h=t.nodes.map((t=>Object.assign({},t))),d=t.edges.map((t=>Object.assign({},t)));return function(t,e){e.forEach((t=>{t.source=a(t),t.target=c(t),t.sourceWeight=l(t),t.targetWeight=u(t)}));const n=Gh(e,(t=>t.source)),r=Gh(e,(t=>t.target));t.forEach((t=>{t.id=o(t);const e=n.has(t.id)?n.get(t.id):[],i=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+i.length,t.value=hg(e,(t=>t.sourceWeight))+hg(i,(t=>t.targetWeight))}))}(h,d),function(t,e){const n="function"==typeof f?f:s[f];n&&t.sort(n)}(h),function(t,o){const a=t.length;if(!a)throw jd("Invalid nodes: it's empty!");if(!r){const n=1/a;return t.forEach(((t,r)=>{t.x=(r+.5)*n,t.y=e})),{nodes:t,edges:o}}const s=i/(2*a),c=t.reduce(((t,e)=>t+e.value),0);t.reduce(((t,r)=>{r.weight=r.value/c,r.width=r.weight*(1-i),r.height=n;const o=s+t,a=o+r.width,l=e-n/2,u=l+n;return r.x=[o,a,a,o],r.y=[l,l,u,u],t+r.width+2*s}),0)}(h,d),function(t,n){const i=new Map(t.map((t=>[t.id,t])));if(!r)return n.forEach((t=>{const e=a(t),n=c(t),r=i.get(e),o=i.get(n);r&&o&&(t.x=[r.x,o.x],t.y=[r.y,o.y])})),{nodes:t,edges:n};n.forEach((t=>{t.x=[0,0,0,0],t.y=[e,e,e,e]}));const o=Gh(n,(t=>t.source)),s=Gh(n,(t=>t.target));t.forEach((t=>{const{edges:e,width:n,x:r,y:i,value:a,id:c}=t,l=o.get(c)||[],u=s.get(c)||[];let f=0;l.map((t=>{const e=t.sourceWeight/a*n;t.x[0]=r[0]+f,t.x[1]=r[0]+f+e,f+=e})),u.forEach((t=>{const e=t.targetWeight/a*n;t.x[3]=r[0]+f,t.x[2]=r[0]+f+e,f+=e}))}))}(h,d),{nodes:h,edges:d}}}const rU=t=>e=>nU(t)(e);rU.props={};var iU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const oU={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},aU={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},sU={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1}},cU={position:"outside",fontSize:10},lU=(t,e)=>{const{data:n,encode:r={},scale:i,style:o={},layout:a={},nodeLabels:s=[],linkLabels:c=[],animate:l={},tooltip:u={}}=t,{nodes:f,links:h}=XT(n,r),d=Rd(r,"node"),p=Rd(r,"link"),{key:g=(t=>t.key),color:y=g}=d,{linkEncodeColor:v=(t=>t.source)}=p,{nodeWidthRatio:m=oU.thickness,nodePaddingRatio:b=oU.marginRatio}=a,x=iU(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:O}=rU(Object.assign(Object.assign(Object.assign(Object.assign({},oU),{id:VT(g),thickness:m,marginRatio:b}),x),{weight:!0}))({nodes:f,edges:h}),k=Rd(o,"label"),{text:M=g}=k,_=iU(k,["text"]),E=rS(u,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),S=rS(u,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:A,width:j}=e,T=Math.min(A,j);return[Jh({},sU,{data:O,encode:Object.assign(Object.assign({},p),{color:v}),labels:c,style:Object.assign({fill:v?void 0:"#aaa"},Rd(o,"link")),tooltip:S,animate:aS(l,"link")}),Jh({},aU,{data:w,encode:Object.assign(Object.assign({},d),{color:y}),scale:i,style:Rd(o,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:2*-Math.PI,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},cU),{text:M}),_),...s],tooltip:E,animate:aS(l,"node"),axis:!1})]};lU.props={};var uU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const fU={fontSize:10,text:t=>Wv(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,isTreemapLabel:!0},hU={title:t=>{var e,n;return null===(n=null===(e=t.path)||void 0===e?void 0:e.join)||void 0===n?void 0:n.call(e,".")},items:[{field:"value"}]},dU={title:t=>Wv(t.path),items:[{field:"value"}]},pU=(t,e)=>{const{width:n,height:r,options:i}=e,{data:o,encode:a={},scale:s,style:c={},layout:l={},labels:u=[],tooltip:f={}}=t,h=uU(t,["data","encode","scale","style","layout","labels","tooltip"]),d=Dh(i,["interaction","treemapDrillDown"])||Dh(i,["marks",0,"interaction","treemapDrillDown"]),p=Jh({},((t,e)=>({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}))(n,r),l,{layer:d?t=>1===t.depth:l.layer}),[g,y]=Oz(o,p,a),v=Rd(c,"label");return Jh({},((t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}))(n,r),Object.assign(Object.assign({data:g,scale:s,style:c,labels:[Object.assign(Object.assign(Object.assign({},fU),v),d&&{cursor:"pointer"}),...u]},h),{encode:a,tooltip:iS(f,hU),axis:!1}),d?{interaction:Object.assign(Object.assign({},h.interaction),{treemapDrillDown:d?Object.assign(Object.assign({},d),{originData:y,layout:p}):void 0}),encode:Object.assign({color:t=>Wv(t.path)},a),tooltip:iS(f,dU)}:{})};pU.props={};var gU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function yU(t,e){return KE(t,(t=>e[t]))}function vU(t,e){return dg(t,(t=>e[t]))}function mU(t,e){const n=2.5*bU(t,e)-1.5*wU(t,e);return KE(t,(t=>e[t]>=n?e[t]:NaN))}function bU(t,e){return $Z(t,.25,(t=>e[t]))}function xU(t,e){return $Z(t,.5,(t=>e[t]))}function wU(t,e){return $Z(t,.75,(t=>e[t]))}function OU(t,e){const n=2.5*wU(t,e)-1.5*bU(t,e);return dg(t,(t=>e[t]<=n?e[t]:NaN))}function kU(){return(t,e)=>{const{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i,s=Array.from(Gh(t,(t=>a[+t])).values()),c=s.flatMap((t=>{const e=mU(t,o),n=OU(t,o);return t.filter((t=>o[t]<e||o[t]>n))}));return[c,e]}}const MU=t=>{const{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,s=gU(t,["data","encode","style","tooltip","transform","animate"]),{point:c=!0}=r,l=gU(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},h={y1:bU,y2:xU,y3:wU},d=rS(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),p=rS(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!c)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:yU},h),{y4:vU})],encode:Object.assign(Object.assign({},n),f),style:l,tooltip:d},s);const g=Rd(l,"box"),y=Rd(l,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:mU},h),{y4:OU})],encode:Object.assign(Object.assign({},n),f),style:g,tooltip:d,animate:aS(a,"box")},s),{type:"point",data:e,transform:[{type:kU}],encode:n,style:Object.assign({},y),tooltip:p,animate:aS(a,"point")}]};MU.props={};const _U=(t,e)=>Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))/2,EU=(t,e)=>{if(!e)return;const{coordinate:n}=e;if(!(null==n?void 0:n.getCenter))return;const r=n.getCenter();return(n,i,o)=>{const{document:a}=e.canvas,{color:s,index:c}=i,l=a.createElement("g",{}),u=_U(n[0],n[1]),f=2*_U(n[0],r),h=((t,e,n)=>{const r=Math.atan2(t[1]-n[1],t[0]-n[0]);let i=Math.atan2(e[1]-n[1],e[0]-n[0])-r;return i<0&&(i+=2*Math.PI),i})(n[3],n[0],r)>Math.PI,d=a.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:[["M",...n[0]],["A",u,u,0,1,0,...n[1]],["A",f+2*u,f+2*u,0,h?1:0,0,...n[2]],["A",u,u,0,1,0===c?0:1,...n[3]],["A",f,f,0,h?1:0,1,...n[0]],["Z"]]},o),um(t,["shape","last","first"])),{fill:s||o.color})});return l.appendChild(d),l}};var SU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const AU={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"]}}},jU={style:{shape:(t,e)=>{const{shape:n,radius:r}=t,i=SU(t,["shape","radius"]),o=Rd(i,"pointer"),a=Rd(i,"pin"),{shape:s}=o,c=SU(o,["shape"]),{shape:l}=a,u=SU(a,["shape"]),{coordinate:f,theme:h}=e;return(t,e)=>{const n=t.map((t=>f.invert(t))),[o,a,d]=function(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find((t=>t[0]===e));return r}(f,"polar"),p=f.clone(),{color:g}=e,y=vg({startAngle:o,endAngle:a,innerRadius:d,outerRadius:r});y.push(["cartesian"]),p.update({transformations:y});const v=n.map((t=>p.map(t))),[m,b]=zx(v),[x,w]=f.getCenter(),O=Object.assign(Object.assign({x1:m,y1:b,x2:x,y2:w,stroke:g},c),i),k=Object.assign(Object.assign({cx:x,cy:w,stroke:g},u),i),M=zd(new pl);return Bd(s)||("function"==typeof s?M.append((()=>s(v,e,p,h))):M.append("line").call(Rx,O).node()),Bd(l)||("function"==typeof l?M.append((()=>l(v,e,p,h))):M.append("circle").call(Rx,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},TU={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},tooltip:!1};function PU(t,e){const{name:n="score",target:r,total:i,percent:o,thresholds:a=[]}=function(t){if(ze(t)){const e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),s=o||r,c=o?1:i,l=Object.assign({y:{domain:[0,c]}},e);return a.length?{targetData:[{x:n,y:s,color:"target"}],totalData:a.map(((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e}))),target:s,total:c,scale:l}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:c-s,color:"total"}],target:s,total:c,scale:l}}function CU(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const RU=t=>{const{data:e={},scale:n={},style:r={},animate:i={},transform:o=[]}=t,a=SU(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=PU(e,n),h=Rd(r,"text"),{tooltip:d}=h,p=SU(h,["tooltip"]),g=(y=r,v=["pointer","pin"],Object.fromEntries(Object.entries(y).filter((([t])=>v.find((e=>t.startsWith(e)))))));var y,v;const m=Rd(r,"arc"),b=m.shape;return[Jh({},AU,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:"round"===b?Object.assign(Object.assign({},m),{shape:EU}):m,animate:"object"==typeof i?Rd(i,"arc"):i},a)),Jh({},AU,jU,Object.assign({type:"point",data:s,scale:f,style:g,animate:"object"==typeof i?Rd(i,"indicator"):i},a)),Jh({},TU,{style:Object.assign({text:CU(p,{target:l,total:u})},p),tooltip:d,animate:"object"==typeof i?Rd(i,"text"):i})]};RU.props={};function LU(t,e,n){return t+(e-t)*n}function NU(t,e,n,r){return 0===e?[[t+.5*n/Math.PI/2,r/2],[t+.5*n/Math.PI,r],[t+n/4,r]]:1===e?[[t+.5*n/Math.PI/2*(Math.PI-2),r],[t+.5*n/Math.PI/2*(Math.PI-1),r/2],[t+n/4,0]]:2===e?[[t+.5*n/Math.PI/2,-r/2],[t+.5*n/Math.PI,-r],[t+n/4,-r]]:[[t+.5*n/Math.PI/2*(Math.PI-2),-r],[t+.5*n/Math.PI/2*(Math.PI-1),-r/2],[t+n/4,0]]}function IU(t,e,n,r,i,o,a){const s=4*Math.ceil(2*t/n*4),c=[];let l=r;for(;l<2*-Math.PI;)l+=2*Math.PI;for(;l>0;)l-=2*Math.PI;l=l/Math.PI/2*n;const u=o-t+l-2*t;c.push(["M",u,e]);let f=0;for(let t=0;t<s;++t){const r=NU(t*n/4,t%4,n,i);c.push(["C",r[0][0]+u,-r[0][1]+e,r[1][0]+u,-r[1][1]+e,r[2][0]+u,-r[2][1]+e]),t===s-1&&(f=r[2][0])}return c.push(["L",f+u,a+t]),c.push(["L",u,a+t]),c.push(["Z"]),c}const DU={pin:function(t,e,n){const r=4*n/3,i=Math.max(r,2*n),o=r/2,a=t,s=o+e-i/2,c=Math.asin(o/(.85*(i-o))),l=Math.sin(c)*o,u=Math.cos(c)*o,f=a-u,h=s+l,d=t,p=s+o/Math.sin(c);return`\n M ${f} ${h}\n A ${o} ${o} 0 1 1 ${f+2*u} ${h}\n Q ${d} ${p} ${t} ${e+i/2}\n Q ${d} ${p} ${f} ${h}\n Z \n `},rect:function(t,e,n){const r=.618*n;return`\n M ${t-r} ${e-n}\n L ${t+r} ${e-n}\n L ${t+r} ${e+n}\n L ${t-r} ${e+n}\n Z\n `},circle:function(t,e,n){return`\n M ${t} ${e-n} \n a ${n} ${n} 0 1 0 0 ${2*n}\n a ${n} ${n} 0 1 0 0 ${2*-n}\n Z\n `},diamond:function(t,e,n){return`\n M ${t} ${e-n}\n L ${t+n} ${e}\n L ${t} ${e+n}\n L ${t-n} ${e}\n Z\n `},triangle:function(t,e,n){return`\n M ${t} ${e-n}\n L ${t+n} ${e+n}\n L ${t-n} ${e+n}\n Z\n `}};var BU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const FU=(t,e)=>{if(!e)return;const{coordinate:n}=e,{liquidOptions:r,styleOptions:i}=t,{liquidShape:o,percent:a}=r,{background:s,outline:c={},wave:l={}}=i,u=BU(i,["background","outline","wave"]),{border:f=2,distance:h=0}=c,d=BU(c,["border","distance"]),{length:p=192,count:g=3}=l;return(t,r,i)=>{const{document:c}=e.canvas,{color:l,fillOpacity:y}=i,v=Object.assign(Object.assign({fill:l},i),u),m=c.createElement("g",{}),[b,x]=n.getCenter(),w=n.getSize(),O=Math.min(...w)/2,k=Fn(o)?o:((t="circle")=>DU[t]||DU.circle)(o),M=k(b,x,O,...w),_=k(b,x,O+f/2,...w);if(Object.keys(s).length){const t=c.createElement("path",{style:Object.assign({d:M,fill:"#fff"},s)});m.appendChild(t)}if(a>0){const t=c.createElement("path",{style:{d:_}});m.appendChild(t),m.style.clipPath=t,function(t,e,n,r,i,o,a,s,c,l,u){const{fill:f,fillOpacity:h,opacity:d}=i;for(let i=0;i<r;i++){const p=r<=1?1:i/(r-1),g=IU(s,a+s*n,c,0,s/40,t,e),y=u.createElement("path",{style:{d:g,fill:f,opacity:LU(.2,.9,p)*Number(d||h)}});o.appendChild(y);try{if(!1===l)return;const t=[{transform:"translate(0, 0)"},{transform:`translate(${2*c}, 0)`}];y.animate(t,{duration:2*LU(2500,5e3,p),iterations:1/0})}catch(t){console.warn("off-screen group animate error!")}}}(b,x,1-a,g,v,m,t.getBBox().y,2*O,p,!0,c)}const E=c.createElement("path",{style:{d:M,fill:"transparent",lineWidth:f+2*h,stroke:"#fff"}}),S=c.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:M,stroke:l,strokeOpacity:y,lineWidth:f},v),d),{fill:"transparent"})});return m.appendChild(E),m.appendChild(S),m}};FU.props={};var zU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const ZU={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:FU},animate:{enter:{type:"fadeIn"}}},WU={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},$U=t=>{const{data:e={},style:n={},animate:r}=t,i=zU(t,["data","style","animate"]),o=Math.max(0,ze(e)?e:null==e?void 0:e.percent),a=[{percent:o,type:"liquid"}],s=Object.assign(Object.assign({},Rd(n,"text")),Rd(n,"content")),c=Rd(n,"outline"),l=Rd(n,"wave"),u=Rd(n,"background");return[Jh({},ZU,Object.assign({type:"interval",data:a,style:{liquidOptions:{percent:o,liquidShape:null==n?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:c,wave:l,background:u})},animate:r},i)),Jh({},WU,{style:Object.assign({text:`${bg(100*o)} %`},s),animate:r})]};function GU(t){const e=new Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function qU(t,e){return GU(t).map((()=>GU(e)))}function YU(t,e){let n=0;for(let r=0;r<t.length;++r)n+=t[r]*e[r];return n}function HU(t){return Math.sqrt(YU(t,t))}function VU(t,e,n){for(let r=0;r<e.length;++r)t[r]=e[r]*n}function UU(t,e,n,r,i){for(let o=0;o<t.length;++o)t[o]=e*n[o]+r*i[o]}function XU(t,e,n,r,i,o,a){const s=n.fx,c=YU(n.fxprime,e);let l=s,u=s,f=c,h=0;function d(u,h,d){for(let p=0;p<16;++p)if(i=(u+h)/2,UU(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),f=YU(r.fxprime,e),l>s+o*i*c||l>=d)h=i;else{if(Math.abs(f)<=-a*c)return i;f*(h-u)>=0&&(h=u),u=i,d=l}return 0}i=i||1,o=o||1e-6,a=a||.1;for(let p=0;p<10;++p){if(UU(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),f=YU(r.fxprime,e),l>s+o*i*c||p&&l>=u)return d(h,i,u);if(Math.abs(f)<=-a*c)return i;if(f>=0)return d(i,h,l);u=l,h=i,i*=2}return i}function KU(t,e,n){let r={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const o=e.slice();let a,s=1;const c=(n=n||{}).maxIterations||20*e.length;r.fx=t(r.x,r.fxprime);const l=r.fxprime.slice();VU(l,r.fxprime,-1);for(let e=0;e<c;++e){if(s=XU(t,l,r,i,s),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),s){UU(o,1,i.fxprime,-1,r.fxprime);const t=YU(r.fxprime,r.fxprime);UU(l,Math.max(0,YU(o,i.fxprime)/t),l,-1,i.fxprime),a=r,r=i,i=a}else VU(l,r.fxprime,-1);if(HU(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),r}$U.props={};const QU=1e-10;function JU(t,e){const n=function(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=rX(t[n],t[r]);for(let t=0;t<i.length;++t){const o=i[t];o.parentIndex=[n,r],e.push(o)}}return e}(t),r=n.filter((function(e){return function(t,e){for(let n=0;n<e.length;++n)if(eX(t,e[n])>e[n].radius+QU)return!1;return!0}(e,t)}));let i,o=0,a=0;const s=[];if(r.length>1){const e=function(t){const e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}(r);for(i=0;i<r.length;++i){const t=r[i];t.angle=Math.atan2(t.x-e.x,t.y-e.y)}r.sort((function(t,e){return e.angle-t.angle}));let n=r[r.length-1];for(i=0;i<r.length;++i){const e=r[i];a+=(n.x+e.x)*(e.y-n.y);const c={x:(e.x+n.x)/2,y:(e.y+n.y)/2};let l=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.indexOf(e.parentIndex[r])>-1){const i=t[e.parentIndex[r]],o=Math.atan2(e.x-i.x,e.y-i.y),a=Math.atan2(n.x-i.x,n.y-i.y);let s=a-o;s<0&&(s+=2*Math.PI);const u=a-s/2;let f=eX(c,{x:i.x+i.radius*Math.sin(u),y:i.y+i.radius*Math.cos(u)});f>2*i.radius&&(f=2*i.radius),(null===l||l.width>f)&&(l={circle:i,width:f,p1:e,p2:n})}null!==l&&(s.push(l),o+=tX(l.circle.radius,l.width),n=e)}}else{let e=t[0];for(i=1;i<t.length;++i)t[i].radius<e.radius&&(e=t[i]);let n=!1;for(i=0;i<t.length;++i)if(eX(t[i],e)>Math.abs(e.radius-t[i].radius)){n=!0;break}n?o=a=0:(o=e.radius*e.radius*Math.PI,s.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-QU,y:e.y+e.radius},width:2*e.radius}))}return a/=2,e&&(e.area=o+a,e.arcArea=o,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),o+a}function tX(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function eX(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function nX(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=e-(n*n-t*t+e*e)/(2*n);return tX(t,t-(n*n-e*e+t*t)/(2*n))+tX(e,r)}function rX(t,e){const n=eX(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const o=(r*r-i*i+n*n)/(2*n),a=Math.sqrt(r*r-o*o),s=t.x+o*(e.x-t.x)/n,c=t.y+o*(e.y-t.y)/n,l=-(e.y-t.y)*(a/n),u=-(e.x-t.x)*(a/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function iX(t,e){(e=e||{}).maxIterations=e.maxIterations||500;const n=e.initialLayout||sX,r=e.lossFunction||cX;t=function(t){t=t.slice();const e=[],n={};let r,i,o,a;for(r=0;r<t.length;++r){const i=t[r];1==i.sets.length?e.push(i.sets[0]):2==i.sets.length&&(o=i.sets[0],a=i.sets[1],n[[o,a]]=!0,n[[a,o]]=!0)}for(e.sort(((t,e)=>t>e?1:-1)),r=0;r<e.length;++r)for(o=e[r],i=r+1;i<e.length;++i)a=e[i],[o,a]in n||t.push({sets:[o,a],size:0});return t}(t);const i=n(t,e),o=[],a=[];let s;for(s in i)i.hasOwnProperty(s)&&(o.push(i[s].x),o.push(i[s].y),a.push(s));const c=function(t,e,n){const r=(n=n||{}).maxIterations||200*e.length,i=n.nonZeroDelta||1.05,o=n.zeroDelta||.001,a=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=void 0!==n.rho?n.rho:1,l=void 0!==n.chi?n.chi:2,u=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5;let h;const d=e.length,p=new Array(d+1);p[0]=e,p[0].fx=t(e),p[0].id=0;for(let n=0;n<d;++n){const r=e.slice();r[n]=r[n]?r[n]*i:o,p[n+1]=r,p[n+1].fx=t(r),p[n+1].id=n+1}function g(t){for(let e=0;e<t.length;e++)p[d][e]=t[e];p[d].fx=t.fx}const y=(t,e)=>t.fx-e.fx,v=e.slice(),m=e.slice(),b=e.slice(),x=e.slice();for(let e=0;e<r;++e){if(p.sort(y),n.history){const t=p.map((t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e}));t.sort(((t,e)=>t.id-e.id)),n.history.push({x:p[0].slice(),fx:p[0].fx,simplex:t})}h=0;for(let t=0;t<d;++t)h=Math.max(h,Math.abs(p[0][t]-p[1][t]));if(Math.abs(p[0].fx-p[d].fx)<a&&h<s)break;for(let t=0;t<d;++t){v[t]=0;for(let e=0;e<d;++e)v[t]+=p[e][t];v[t]/=d}const e=p[d];if(UU(m,1+c,v,-c,e),m.fx=t(m),m.fx<p[0].fx)UU(x,1+l,v,-l,e),x.fx=t(x),x.fx<m.fx?g(x):g(m);else if(m.fx>=p[d-1].fx){let n=!1;if(m.fx>e.fx?(UU(b,1+u,v,-u,e),b.fx=t(b),b.fx<e.fx?g(b):n=!0):(UU(b,1-u*c,v,u*c,e),b.fx=t(b),b.fx<m.fx?g(b):n=!0),n){if(f>=1)break;for(let e=1;e<p.length;++e)UU(p[e],1-f,p[0],f,p[e]),p[e].fx=t(p[e])}}else g(m)}return p.sort(y),{fx:p[0].fx,x:p[0]}}((function(e){const n={};for(let t=0;t<a.length;++t){const r=a[t];n[r]={x:e[2*t],y:e[2*t+1],radius:i[r].radius}}return r(n,t)}),o,e),l=c.x;for(let t=0;t<a.length;++t)s=a[t],i[s].x=l[2*t],i[s].y=l[2*t+1];return i}const oX=1e-10;function aX(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):function(t,e,n,r){const i=(r=r||{}).maxIterations||100,o=r.tolerance||1e-10,a=t(e),s=t(n);let c=n-e;if(a*s>0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===s)return n;for(let n=0;n<i;++n){c/=2;const n=e+c,r=t(n);if(r*a>=0&&(e=n),Math.abs(c)<o||0===r)return n}return e+c}((function(r){return nX(t,e,r)-n}),0,t+e)}function sX(t,e){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:cX,r={},i={};let o;for(let e=0;e<t.length;++e){const n=t[e];1==n.sets.length&&(o=n.sets[0],r[o]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:n.size,radius:Math.sqrt(n.size/Math.PI)},i[o]=[])}t=t.filter((function(t){return 2==t.sets.length}));for(let e=0;e<t.length;++e){const n=t[e];let o=n.hasOwnProperty("weight")?n.weight:1;const a=n.sets[0],s=n.sets[1];n.size+oX>=Math.min(r[a].size,r[s].size)&&(o=0),i[a].push({set:s,size:n.size,weight:o}),i[s].push({set:a,size:n.size,weight:o})}const a=[];for(o in i)if(i.hasOwnProperty(o)){let t=0;for(let e=0;e<i[o].length;++e)t+=i[o][e].size*i[o][e].weight;a.push({set:o,size:t})}function s(t,e){return e.size-t.size}a.sort(s);const c={};function l(t){return t.set in c}function u(t,e){r[e].x=t.x,r[e].y=t.y,c[e]=!0}u({x:0,y:0},a[0].set);for(let e=1;e<a.length;++e){const c=a[e].set,f=i[c].filter(l);if(o=r[c],f.sort(s),0===f.length)throw"ERROR: missing pairwise overlap information";const h=[];for(let t=0;t<f.length;++t){const e=r[f[t].set],n=aX(o.radius,e.radius,f[t].size);h.push({x:e.x+n,y:e.y}),h.push({x:e.x-n,y:e.y}),h.push({y:e.y+n,x:e.x}),h.push({y:e.y-n,x:e.x});for(let i=t+1;i<f.length;++i){const t=r[f[i].set],a=aX(o.radius,t.radius,f[i].size),s=rX({x:e.x,y:e.y,radius:n},{x:t.x,y:t.y,radius:a});for(let t=0;t<s.length;++t)h.push(s[t])}}let d=1e50,p=h[0];for(let e=0;e<h.length;++e){r[c].x=h[e].x,r[c].y=h[e].y;const i=n(r,t);i<d&&(d=i,p=h[e])}u(p,c)}return r}(t,e);const r=e.lossFunction||cX;if(t.length>=8){const i=function(t,e){e=e||{};const n=e.restarts||10,r=[],i={};let o;for(o=0;o<t.length;++o){const e=t[o];1==e.sets.length&&(i[e.sets[0]]=r.length,r.push(e))}const a=function(t,e,n){const r=qU(e.length,e.length),i=qU(e.length,e.length);return t.filter((function(t){return 2==t.sets.length})).map((function(t){const o=n[t.sets[0]],a=n[t.sets[1]],s=aX(Math.sqrt(e[o].size/Math.PI),Math.sqrt(e[a].size/Math.PI),t.size);r[o][a]=r[a][o]=s;let c=0;t.size+1e-10>=Math.min(e[o].size,e[a].size)?c=1:t.size<=1e-10&&(c=-1),i[o][a]=i[a][o]=c})),{distances:r,constraints:i}}(t,r,i);let s=a.distances;const c=a.constraints,l=HU(s.map(HU))/s.length;s=s.map((function(t){return t.map((function(t){return t/l}))}));const u=function(t,e){return function(t,e,n,r){let i,o=0;for(i=0;i<e.length;++i)e[i]=0;for(i=0;i<n.length;++i){const a=t[2*i],s=t[2*i+1];for(let c=i+1;c<n.length;++c){const l=t[2*c],u=t[2*c+1],f=n[i][c],h=r[i][c],d=(l-a)*(l-a)+(u-s)*(u-s),p=Math.sqrt(d),g=d-f*f;h>0&&p<=f||h<0&&p>=f||(o+=2*g*g,e[2*i]+=4*g*(a-l),e[2*i+1]+=4*g*(s-u),e[2*c]+=4*g*(l-a),e[2*c+1]+=4*g*(u-s))}}return o}(t,e,s,c)};let f,h;for(o=0;o<n;++o){h=KU(u,GU(2*s.length).map(Math.random),e),(!f||h.fx<f.fx)&&(f=h)}const d=f.x,p={};for(o=0;o<r.length;++o){const t=r[o];p[t.sets[0]]={x:d[2*o]*l,y:d[2*o+1]*l,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(o=0;o<e.history.length;++o)VU(e.history[o].x,l);return p}(t,e);r(i,t)+1e-8<r(n,t)&&(n=i)}return n}function cX(t,e){let n=0;for(let r=0;r<e.length;++r){const i=e[r];let o;if(1==i.sets.length)continue;if(2==i.sets.length){const e=t[i.sets[0]],n=t[i.sets[1]];o=nX(e.radius,n.radius,eX(e,n))}else o=JU(i.sets.map((function(e){return t[e]})));n+=(i.hasOwnProperty("weight")?i.weight:1)*(o-i.size)*(o-i.size)}return n}function lX(t){const e=function(e){const n=Math.max.apply(null,t.map((function(t){return t[e]+t.radius}))),r=Math.min.apply(null,t.map((function(t){return t[e]-t.radius})));return{max:n,min:r}};return{xRange:e("x"),yRange:e("y")}}const uX=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[o,a]=r;return t=>{const r=t.map((t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[o]:t.sets.join("&")})));r.sort(((t,e)=>t.sets.length-e.sets.length));const s=iX(r);let c;return r.map((t=>{const n=t[e];return Object.assign(Object.assign({},t),{[a]:({width:t,height:e})=>{c=c||function(t,e,n,r){const i=[],o=[];for(const e in t)t.hasOwnProperty(e)&&(o.push(e),i.push(t[e]));e-=2*r,n-=2*r;const a=lX(i),s=a.xRange,c=a.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=e/(s.max-s.min),u=n/(c.max-c.min),f=Math.min(u,l),h=(e-(s.max-s.min)*f)/2,d=(n-(c.max-c.min)*f)/2,p={};for(let t=0;t<i.length;++t){const e=i[t];p[o[t]]={radius:f*e.radius,x:r+h+(e.x-s.min)*f,y:r+d+(e.y-c.min)*f}}return p}(s,t,e,i);const r=n.map((t=>c[t]));let o=function(t){const e={};JU(t,e);const n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){const t=n[0].circle;return function(t,e,n){const r=[],i=t-n,o=e;return r.push("M",i,o),r.push("A",n,n,0,1,0,i+2*n,o),r.push("A",n,n,0,1,0,i,o),r.join(" ")}(t.x,t.y,t.radius)}{const t=["\nM",n[0].p2.x,n[0].p2.y];for(let e=0;e<n.length;++e){const r=n[e],i=r.circle.radius,o=r.width>i;t.push("\nA",i,i,0,o?1:0,1,r.p1.x,r.p1.y)}return t.join(" ")}}(r);return/[zZ]$/.test(o)||(o+=" Z"),o}})}))}};uX.props={};var fX=function(){return fX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},fX.apply(this,arguments)},hX=function(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}(class extends gj{constructor(t){const{container:e,canvas:n,renderer:r,plugins:i,lib:o,createCanvas:a}=t;super(bj(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=Ih((()=>{this.forceFit()}),300),this._renderer=r||new Rh,this._plugins=i||[],this._container=function(t){if(void 0===t){const t=document.createElement("div");return t[VA]=!0,t}if("string"==typeof t)return document.getElementById(t);return t}(e),this._emitter=new T,this._context={library:Object.assign(Object.assign({},o),mf),emitter:this._emitter,canvas:n,createCanvas:a},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const t=new Promise(((t,e)=>sA(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e)))),[e,n,r]=function(){let t,e;return[new Promise(((n,r)=>{e=n,t=r})),e,t]}();return t.then(n).then((()=>{if(this._trailingClear){const t=this.options();this._trailingClear(),this._trailing&&this.options(t)}})).catch(r).then((()=>{this._trailingClear=null,this._renderTrailing()})),e}options(t){if(0===arguments.length)return QA(this);const{type:e}=t;return e&&(this._previousDefinedType=e),function(t,e,n,r,i){const o=[[null,t,JA(t,e,n,r,i)]];for(;o.length;){const[t,e,n]=o.shift();if(e)if(n){ej(e,n);const{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++){const n=t[i],a=r[i];o.push([e,a,n])}}else"function"==typeof t&&o.push([e,null,t])}else e.remove();else nj(t,n,r,i)}}(this,t,this._previousDefinedType,this._marks,this._compositions),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(t=!0){if(this._rendering)return this._trailingClear=()=>{this.clear(t)},void this._reset();this.options();this.emit(Yd),this._reset(),cA(0,this._context,!1,t),this.emit(Hd)}destroy(){this.options();this.emit(Vd),this._unbindAutoFit(),this._reset(),cA(0,this._context,!0),this._container[VA]&&function(t){const e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(Ud)}forceFit(){this.options.autoFit=!0;const{width:t,height:e}=KA(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(Xd);const n=this.render();return n.then((()=>{this.emit(Kd)})),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(Xd),this.attr("width",t),this.attr("height",e);const n=this.render();return n.then((()=>{this.emit(Kd)})),n}getDataByXY(t,e={}){const{shared:n=!1,series:r,facet:i=!1,startX:o=0,startY:a=0}=e,{canvas:s,views:c}=this._context,{document:l}=s,{x:u,y:f}=t,{coordinate:h,scale:d,markState:p,data:g,key:y}=c[0],v=l.getElementsByClassName(R),m=n?t=>t.__data__.x:t=>t,b=Gh(v,m),x=BO(l.getElementsByClassName(L)[0]),w=t=>Array.from(t.values()).some((t=>{var e,n;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)||(null===(n=t.channels)||void 0===n?void 0:n.some((t=>"series"===t.name&&void 0!==t.values)))})),O=DA(r,w(p)),k=t=>Dh(t,"__data__.data",null);try{if(O&&w(p)&&!i){const{selectedData:t}=zA({root:x,event:{offsetX:u,offsetY:f},elements:v,coordinate:h,scale:d,startX:o,startY:a}),e=g.get(`${y}-0`);return t.map((({index:t})=>e[t]))}const t=FA({root:x,event:{offsetX:u,offsetY:f},elements:v,coordinate:h,scale:d,shared:n});if(kd(t))return Md(t,g.get(y));const e=m(t),r=b.get(e);return r?r.map(k):[]}catch(t){const e=s.document.elementFromPointSync(u,f);return e?k(e):[]}}_create(){const{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter((t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t))];this._marks={};for(const t of e){const e=t.split(".").pop();class n extends vj{constructor(){super({},e)}}this._marks[e]=n,this[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}const n=["composition.view",...Object.keys(t).filter((t=>t.startsWith("composition.")&&"composition.mark"!==t))];this._compositions=Object.fromEntries(n.map((t=>{const e=t.split(".").pop();let n=class extends gj{constructor(){super({},e)}};return n=mj([lj(uj(this._marks))],n),[e,n]})));for(const t of Object.values(this._compositions))lj(uj(this._compositions))(t);for(const t of n){const e=t.split(".").pop();this[e]=function(){const t=this._compositions[e];return this.type=null,this.append(t)}}}_reset(){const t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter((([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||t.includes(e)))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then((()=>{const t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)})).catch((t=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(t)})))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return e=>{this._rendering=!1,t(e)}}_computedOptions(){const t=this.options(),{key:e=xj}=t,{width:n,height:r,depth:i}=KA(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,depth:i})}_createCanvas(){const{width:t,height:e}=KA(this.options(),this._container);this._plugins.push(new Nh),this._plugins.forEach((t=>this._renderer.registerPlugin(t))),this._context.canvas=new $l({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){var t;null===(t=this._trailingResolve)||void 0===t||t.call(this,this),this._trailing=!0;return new Promise(((t,e)=>{this._trailingResolve=t,this._trailingReject=e}))}_bindAutoFit(){const t=this.options(),{autoFit:e}=t;this._hasBindAutoFit?e||this._unbindAutoFit():e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},fX(fX({},Object.assign(Object.assign(Object.assign(Object.assign({},{"composition.geoView":AH,"composition.geoPath":TH}),{"data.arc":rU,"data.cluster":QH,"mark.forceGraph":FH,"mark.tree":iV,"mark.pack":AV,"mark.sankey":XV,"mark.chord":lU,"mark.treemap":pU}),{"data.venn":uX,"mark.boxplot":MU,"mark.gauge":RU,"mark.wordCloud":pL,"mark.liquid":$U}),{"data.fetch":n$,"data.inline":r$,"data.sortBy":i$,"data.sort":o$,"data.filter":s$,"data.pick":c$,"data.rename":l$,"data.fold":u$,"data.slice":f$,"data.custom":h$,"data.map":d$,"data.join":g$,"data.kde":m$,"data.log":b$,"data.wordCloud":G$,"data.ema":q$,"transform.stackY":AZ,"transform.binX":cW,"transform.bin":sW,"transform.dodgeX":uW,"transform.jitter":dW,"transform.jitterX":pW,"transform.jitterY":gW,"transform.symmetryY":vW,"transform.diffY":mW,"transform.stackEnter":bW,"transform.normalizeY":wW,"transform.select":EW,"transform.selectX":AW,"transform.selectY":TW,"transform.groupX":RW,"transform.groupY":LW,"transform.groupColor":NW,"transform.group":CW,"transform.sortX":DW,"transform.sortY":BW,"transform.sortColor":FW,"transform.flexX":zW,"transform.pack":WW,"transform.sample":GW,"transform.filter":qW,"coordinate.cartesian":eT,"coordinate.polar":gg,"coordinate.transpose":nT,"coordinate.theta":rT,"coordinate.parallel":iT,"coordinate.fisheye":oT,"coordinate.radial":vg,"coordinate.radar":aT,"coordinate.helix":sT,"encode.constant":cT,"encode.field":lT,"encode.transform":uT,"encode.column":fT,"mark.interval":JT,"mark.rect":eP,"mark.line":$P,"mark.point":bC,"mark.text":jC,"mark.cell":CC,"mark.area":GC,"mark.link":rR,"mark.image":sR,"mark.polygon":dR,"mark.box":bR,"mark.vector":wR,"mark.lineX":ER,"mark.lineY":jR,"mark.connector":LR,"mark.range":BR,"mark.rangeX":ZR,"mark.rangeY":GR,"mark.path":XR,"mark.shape":tL,"mark.density":iL,"mark.heatmap":fL,"mark.wordCloud":pL,"mark.beeswarm":oN,"palette.category10":aN,"palette.category20":sN,"scale.linear":cN,"scale.ordinal":lN,"scale.band":uN,"scale.identity":hN,"scale.point":pN,"scale.time":pI,"scale.log":wI,"scale.pow":MI,"scale.sqrt":EI,"scale.threshold":SI,"scale.quantile":AI,"scale.quantize":jI,"scale.sequential":RI,"scale.constant":LI,"theme.classic":BI,"theme.classicDark":ZI,"theme.academy":$I,"theme.light":DI,"theme.dark":zI,"component.axisX":GI,"component.axisY":qI,"component.legendCategory":vD,"component.legendContinuous":dx,"component.legends":mD,"component.title":kD,"component.sliderX":QD,"component.sliderY":JD,"component.scrollbarX":rB,"component.scrollbarY":iB,"animation.scaleInX":oB,"animation.scaleOutX":aB,"animation.scaleInY":sB,"animation.scaleOutY":cB,"animation.waveIn":lB,"animation.fadeIn":uB,"animation.fadeOut":fB,"animation.zoomIn":hB,"animation.zoomOut":dB,"animation.pathIn":pB,"animation.morphing":SB,"animation.growInX":AB,"animation.growInY":jB,"interaction.elementHighlight":PB,"interaction.elementHighlightByX":CB,"interaction.elementHighlightByColor":RB,"interaction.elementSelect":IB,"interaction.elementSelectByX":DB,"interaction.elementSelectByColor":BB,"interaction.fisheye":FB,"interaction.chartIndex":WB,"interaction.tooltip":WA,"interaction.legendFilter":tF,"interaction.legendHighlight":eF,"interaction.brushHighlight":fF,"interaction.brushXHighlight":dF,"interaction.brushYHighlight":gF,"interaction.brushAxisHighlight":kF,"interaction.brushFilter":EF,"interaction.brushXFilter":SF,"interaction.brushYFilter":AF,"interaction.sliderFilter":ZF,"interaction.sliderWheel":qF,"interaction.scrollbarFilter":HF,"interaction.poptip":QF,"interaction.treemapDrillDown":Ez,"interaction.elementPointMove":Dz,"composition.spaceLayer":Fz,"composition.spaceFlex":Zz,"composition.facetRect":nZ,"composition.repeatMatrix":lZ,"composition.facetCircle":yZ,"composition.timingKeyframe":mZ,"labelTransform.overlapHide":U$,"labelTransform.overlapDodgeY":J$,"labelTransform.overflowHide":tG,"labelTransform.contrastReverse":aG,"labelTransform.overflowStroke":cG,"labelTransform.exceedAdjust":lG})),{"interaction.drillDown":tT,"mark.sunburst":Xj})),dX=function(){return dX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},dX.apply(this,arguments)},pX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},gX=["renderer","plugins"],yX=["width","height","autoFit","theme","inset","insetLeft","insetRight","insetTop","insetBottom","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","depth","title","clip","children","type","data","direction","plugins"],vX="__transform__",mX=function(t,e){return(0,M.isBoolean)(e)?{type:t,available:e}:dX({type:t},e)},bX={xField:"encode.x",yField:"encode.y",colorField:"encode.color",angleField:"encode.y",keyField:"encode.key",y1Field:"encode.y1",sizeField:"encode.size",setsField:"encode.sets",shapeField:"encode.shape",seriesField:"encode.series",positionField:"encode.position",textField:"encode.text",valueField:"encode.value",binField:"encode.x",srcField:"encode.src",linkColorField:"encode.linkColor",fontSizeField:"encode.fontSize",coordinateType:"coordinate.type",radius:"coordinate.outerRadius",innerRadius:"coordinate.innerRadius",startAngle:"coordinate.startAngle",endAngle:"coordinate.endAngle",focusX:"coordinate.focusX",focusY:"coordinate.focusY",distortionX:"coordinate.distortionX",distortionY:"coordinate.distortionY",visual:"coordinate.visual",stack:{target:"transform",value:function(t){return mX("stackY",t)}},normalize:{target:"transform",value:function(t){return mX("normalizeY",t)}},percent:{target:"transform",value:function(t){return mX("normalizeY",t)}},group:{target:"transform",value:function(t){return mX("dodgeX",t)}},sort:{target:"transform",value:function(t){return mX("sortX",t)}},symmetry:{target:"transform",value:function(t){return mX("symmetryY",t)}},diff:{target:"transform",value:function(t){return mX("diffY",t)}},meta:{target:"scale",value:function(t){return t}},label:{target:"labels",value:function(t){return t}},shape:"style.shape",connectNulls:{target:"style",value:function(t){return(0,M.isBoolean)(t)?{connect:t}:t}},transpose:{target:"transpose",value:function(t){return mX("transpose",t)}}},xX=["xField","yField","seriesField","colorField","shapeField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],wX=[{key:"annotations",extendedProperties:[]},{key:"line",type:"line",extendedProperties:xX},{key:"connector",type:"connector",extendedProperties:[]},{key:"point",type:"point",extendedProperties:xX,defaultShapeConfig:{shapeField:"circle"}},{key:"area",type:"area",extendedProperties:xX}],OX=[{key:"transform",callback:function(t,e,n){var r;t[e]=t[e]||[];var i=n.available,o=void 0===i||i,a=pX(n,["available"]);if(o)t[e].push(dX(((r={})[vX]=!0,r),a));else{var s=t[e].indexOf((function(t){return t.type===n.type}));-1!==s&&t[e].splice(s,1)}}},{key:"labels",callback:function(t,e,n){var r;n&&!(0,M.isArray)(n)?(n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(dX(((r={})[vX]=!0,r),n))):t[e]=n||[]}},{key:"transpose",callback:function(t,e,n){var r;n.available?t.coordinate={transform:[dX((r={},r[vX]=!0,r),n)]}:t.coordinate={}}}],kX=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],MX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_X=function(){return _X=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},_X.apply(this,arguments)},EX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},SX=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=EX(e,["style"]);return t.call(this,_X({style:_X({fill:"#eee"},n)},r))||this}return MX(e,t),e}(kl),AX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jX=function(){return jX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},jX.apply(this,arguments)},TX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},PX=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=TX(e,["style"]);return t.call(this,jX({style:jX({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},n)},r))||this}return AX(e,t),e}(Al),CX=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},RX=function(t,e){if((0,M.isArray)(e))return e},LX=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M.mergeWith.apply(void 0,CX(CX([],t,!1),[RX],!1))},NX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),IX=function(t){function e(e,n,r){var i=t.call(this,{style:LX(r,n)})||this;return i.chart=e,i}return NX(e,t),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},e.prototype.disconnectedCallback=function(){},e.prototype.attributeChangedCallback=function(t){},e.prototype.update=function(t,e){var n;return this.attr(LX({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.getElementsLayout=function(){var t=this.chart.getContext().canvas.document.getElementsByClassName("element"),e=[];return t.forEach((function(t){var n=t.getBBox(),r=n.x,i=n.y,o=n.width,a=n.height,s=t.__data__;e.push({bbox:n,x:r,y:i,width:o,height:a,key:s.key,data:s})})),e},e.prototype.bindEvents=function(t,e){},e}(hl),DX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),BX=function(){return BX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},BX.apply(this,arguments)},FX=function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return DX(e,t),e.prototype.getConversionTagLayout=function(){var t="vertical"===this.direction,e=Array.from(this.getElementsLayout()).sort((function(e,n){return t?e.y-n.y:e.x-n.x})),n=e[0],r=n.x,i=n.y,o=n.height,a=n.width,s=n.data,c=["items",0,"value"],l=(0,M.get)(s,c),u=t?e[1].y-i-o:e[1].x-r-a,f=[],h=this.attributes,d=h.size,p=void 0===d?40:d,g=h.arrowSize,y=void 0===g?20:g,v=h.spacing,m=void 0===v?4:v;return e.forEach((function(e,n){if(n>0){var r=e.x,i=e.y,o=e.height,a=e.width,s=e.data,h=e.key,d=(0,M.get)(s,c),g=p/2;if(t){var v=r+a/2,b=i;f.push({points:[[v+g,b-u+m],[v+g,b-y-m],[v,b-m],[v-g,b-y-m],[v-g,b-u+m]],center:[v,b-u/2],width:u,value:[l,d],key:h})}else{v=r,b=i+o/2;f.push({points:[[r-u+m,b-g],[r-y-m,b-g],[v-m,b],[r-y-m,b+g],[r-u+m,b+g]],center:[v-u/2,b],width:u,value:[l,d],key:h})}l=d}})),f},e.prototype.render=function(){this.setDirection(),this.drawConversionTag()},e.prototype.setDirection=function(){var t=this.chart.getCoordinate(),e=(0,M.get)(t,"options.transformations"),n="horizontal";e.forEach((function(t){t.includes("transpose")&&(n="vertical")})),this.direction=n},e.prototype.drawConversionTag=function(){var t=this,e=this.getConversionTagLayout(),n=this.attributes,r=n.style,i=n.text,o=i.style,a=i.formatter;e.forEach((function(e){var n=e.points,i=e.center,s=e.value,c=e.key,l=s[0],u=s[1],f=i[0],h=i[1],d=new SX({style:BX({points:n,fill:"#eee"},r),id:"polygon-".concat(c)}),p=new PX({style:BX({x:f,y:h,text:(0,M.isFunction)(a)?a(l,u):(u/l*100).toFixed(2)+"%"},o),id:"text-".concat(c)});t.appendChild(d),t.appendChild(p)}))},e.prototype.update=function(){this.clear(),this.drawConversionTag()},e.prototype.destroy=function(){this.clear()},e.tag="ConversionTag",e}(IX),zX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ZX=function(){return ZX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ZX.apply(this,arguments)},WX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},$X=function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return zX(e,t),e.prototype.render=function(){this.drawText()},e.prototype.getBidirectionalBarAxisTextLayout=function(){var t="vertical"===this.attributes.layout,e=this.getElementsLayout(),n=t?(0,M.uniqBy)(e,"x"):(0,M.uniqBy)(e,"y"),r=["title"],i=[],o=this.chart.getContext().views,a=(0,M.get)(o,[0,"layout"]),s=a.width,c=a.height;return n.forEach((function(e){var n=e.x,o=e.y,a=e.height,l=e.width,u=e.data,f=e.key,h=(0,M.get)(u,r);t?i.push({x:n+l/2,y:c,text:h,key:f}):i.push({x:s,y:o+a/2,text:h,key:f})})),(0,M.uniqBy)(i,"text").length!==i.length&&(i=Object.values((0,M.groupBy)(i,"text")).map((function(e){var n,r=e.reduce((function(e,n){return e+(t?n.x:n.y)}),0);return ZX(ZX({},e[0]),((n={})[t?"x":"y"]=r/e.length,n))}))),i},e.prototype.transformLabelStyle=function(t){var e={},n=/^label[A-Z]/;return Object.keys(t).forEach((function(r){n.test(r)&&(e[r.replace("label","").replace(/^[A-Z]/,(function(t){return t.toLowerCase()}))]=t[r])})),e},e.prototype.drawText=function(){var t=this,e=this.getBidirectionalBarAxisTextLayout(),n=this.attributes,r=n.layout,i=n.labelFormatter,o=WX(n,["layout","labelFormatter"]);e.forEach((function(e){var n=e.x,a=e.y,s=e.text,c=e.key,l=new PX({style:ZX({x:n,y:a,text:(0,M.isFunction)(i)?i(s):s,wordWrap:!0,wordWrapWidth:"horizontal"===r?64:120,maxLines:2,textOverflow:"ellipsis"},t.transformLabelStyle(o)),id:"text-".concat(c)});t.appendChild(l)}))},e.prototype.destroy=function(){this.clear()},e.prototype.update=function(){this.destroy(),this.drawText()},e.tag="BidirectionalBarAxisText",e}(IX),GX={ConversionTag:FX,BidirectionalBarAxisText:$X},qX=function(){function t(t,e){this.container=new Map,this.chart=t,this.config=e,this.init()}return t.prototype.init=function(){var t=this;kX.forEach((function(e){var n,r=e.key,i=e.shape,o=t.config[r];if(o){var a=new GX[i](t.chart,o);t.chart.getContext().canvas.appendChild(a),t.container.set(r,a)}else null===(n=t.container.get(r))||void 0===n||n.clear()}))},t.prototype.update=function(){var t=this;this.container.size&&kX.forEach((function(e){var n=e.key,r=t.container.get(n);null==r||r.update()}))},t.prototype.destroy=function(){this.container.forEach((function(t){t.destroy()})),this.container.clear()},t}(),YX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HX=function(){return HX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},HX.apply(this,arguments)},VX="data-chart-source-type",UX=function(t){function e(e,n){var r=t.call(this)||this;return r.eventListeners=[],r.bindedEvents=!1,r.container="string"==typeof e?document.getElementById(e):e,r.options=r.mergeOption(n),r.createG2(),r.bindEvents(),r}return YX(e,t),e.prototype.getChartOptions=function(){return HX(HX({},(0,M.pick)(this.options,gX)),{container:this.container})},e.prototype.getSpecOptions=function(){return"base"===this.type||this.__skipDelCustomKeys__?HX(HX({},this.options),this.getChartOptions()):this.options},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new hX(this.getChartOptions()),this.container.setAttribute(VX,"Ant Design Charts")},e.prototype.bindEvents=function(){var t=this;if(this.chart){var e=function(e){(null==e?void 0:e.type)&&t.emit(e.type,e)};this.chart.on("*",e),this.eventListeners.push((function(){var n;null===(n=t.chart)||void 0===n||n.off("*",e)}))}},e.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},e.prototype.getDefaultOptions=function(){},e.prototype.render=function(){var t=this;"base"!==this.type&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then((function(){t.annotation?t.annotation.update():t.annotation=new qX(t.chart,t.options),t.bindSizeSensor()}))},e.prototype.update=function(t){this.options=this.mergeOption(t)},e.prototype.mergeOption=function(t){return LX({},this.getBaseOptions(),this.getDefaultOptions(),t)},e.prototype.changeData=function(t){this.chart.changeData(t)},e.prototype.changeSize=function(t,e){this.chart.changeSize(t,e)},e.prototype.destroy=function(){this.eventListeners.forEach((function(t){return t()})),this.eventListeners=[],this.annotation&&"function"==typeof this.annotation.destroy&&this.annotation.destroy(),this.annotation=null,this.chart.destroy(),this.off(),this.bindedEvents=!1,this.container.removeAttribute(VX)},e.prototype.execAdaptor=function(){this.getSchemaAdaptor()({chart:this.chart,options:this.options})},e.prototype.triggerResize=function(){this.chart.forceFit()},e.prototype.bindSizeSensor=function(){var t=this;if(!this.bindedEvents){var e=this.options.autoFit;if(void 0===e||e){var n=function(){t.annotation&&t.annotation.update()};this.chart.on(Kd,n),this.eventListeners.push((function(){var e;null===(e=t.chart)||void 0===e||e.off(Kd,n)})),this.bindedEvents=!0}}},e}(T),XX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),KX=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="base",e}return XX(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return function(t){return t}},e}(UX),QX=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},JX=function(){return JX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},JX.apply(this,arguments)},tK=function(t){var e=function(t){var e=t.options,n=e.children;return(void 0===n?[]:n).forEach((function(t){Object.keys(t).forEach((function(e){(0,M.isArray)(t[e])&&"data"!==e&&(t[e]=t[e].filter((function(t){return!t[vX]})))}))})),e}(t),n=e.children,r=void 0===n?[]:n,i=(0,M.omit)(e,[].concat(yX,wX.map((function(t){return t.key})))),o=function(t,e,n){var r=function(t){var e;return null===(e=OX.find((function(e){return e.key===t})))||void 0===e?void 0:e.callback}(e);r?r(t,e,n):t[e]=LX({},t[e],n)},a=function(t){Object.keys(t).forEach((function(e){if(t[e]){var n=wX.find((function(t){return t.key===e}));if(n){var i=n.type,o=n.extendedProperties,a=n.defaultShapeConfig,c=void 0===a?{}:a;if(i){var l=t[e].tooltip;r.push(s(LX({},(0,M.pick)(t,o),c,{type:i},t[e],{tooltip:l||!1})))}else if((0,M.isArray)(t[e])){var u=t[e].some((function(t){return"text"===t.type}));t[e].forEach((function(t){r.push(s(JX(JX(JX({},u?{data:[]}:{}),{tooltip:!1}),t)))}))}}}}))},s=function(t){return a(t),Object.keys(bX).forEach((function(e){var n=bX[e];if(!(0,M.isUndefined)(t[e]))if((0,M.isObject)(n)){var r=n.value,i=n.target,a=r(t[e]);o(t,i,a)}else(0,M.set)(t,n,t[e])})),t};return r.forEach((function(t){var e=LX({},i,t);s(LX(t,e))})),a(e),function(t){var e=t.children,n=void 0===e?[]:e,r=Object.keys(bX).concat(wX.map((function(t){return t.key})));r.forEach((function(e){delete t[e]})),n.forEach((function(t){Object.keys(t).forEach((function(e){r.includes(e)&&delete t[e]}))})),Object.keys(t).forEach((function(e){QX(QX([],yX,!0),kX.map((function(t){return t.key})),!0).includes(e)||delete t[e]}))}(e),t},eK=function(){return eK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},eK.apply(this,arguments)};function nK(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var o=wX.map((function(t){return t.type})).filter((function(t){return!!t})),a=!1;return o.forEach((function(t){e[t]&&(a=!0,(0,M.set)(e,[t,"stack"],eK({y1:"y"},"object"==typeof n?n:{})))})),!a||(0,M.isBoolean)(r)||r||(0,M.set)(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function rK(t){return(0,M.flow)(nK)(t)}function iK(t){return(0,M.flow)(rK,tK)(t)}var oK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}return oK(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"area"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return iK},e}(UX),sK=function(){return sK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},sK.apply(this,arguments)};function cK(t){return(0,M.flow)((function(t){var e=t.options;(0,M.get)(e,"children.length")>1&&(0,M.set)(e,"children",[{type:"interval"}]);var n=e.scale,r=e.markBackground,i=e.data,o=e.children,a=e.yField,s=(0,M.get)(n,"y.domain",[]);if(r&&s.length&&(0,M.isArray)(i)){var c="domainMax",l=i.map((function(t){var e;return sK(sK({originData:sK({},t)},(0,M.omit)(t,a)),((e={})[c]=s[s.length-1],e))}));o.unshift(sK({type:"interval",data:l,yField:c,tooltip:!1,style:{fill:"#eee"},label:!1},r))}return t}),rK,tK)(t)}var lK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();bf("shape.interval.bar25D",(function(t,e){return function(n){var r=t.fill,i=void 0===r?"#2888FF":r,o=t.stroke,a=t.fillOpacity,s=void 0===a?1:a,c=t.strokeOpacity,l=void 0===c?.2:c,u=t.pitch,f=void 0===u?8:u,h=n[0],d=n[1],p=n[2],g=n[3],y=(d[1]-h[1])/2,v=e.document,m=v.createElement("g",{}),b=v.createElement("polygon",{style:{points:[h,[h[0]-f,h[1]+y],[p[0]-f,h[1]+y],g],fill:i,fillOpacity:s,stroke:o,strokeOpacity:l,inset:30}}),x=v.createElement("polygon",{style:{points:[[h[0]-f,h[1]+y],d,p,[p[0]-f,h[1]+y]],fill:i,fillOpacity:s,stroke:o,strokeOpacity:l}}),w=v.createElement("polygon",{style:{points:[h,[h[0]-f,h[1]+y],d,[h[0]+f,h[1]+y]],fill:i,fillOpacity:s-.2}});return m.appendChild(b),m.appendChild(x),m.appendChild(w),m}}));var uK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Bar",e}return lK(e,t),e.getDefaultOptions=function(){return{type:"view",coordinate:{transform:[{type:"transpose"}]},children:[{type:"interval"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0},elementHighlight:{background:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return cK},e}(UX),fK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();bf("shape.interval.column25D",(function(t,e){return function(n){var r=t.fill,i=void 0===r?"#2888FF":r,o=t.stroke,a=t.fillOpacity,s=void 0===a?1:a,c=t.strokeOpacity,l=void 0===c?.2:c,u=t.pitch,f=void 0===u?8:u,h=(n[1][0]-n[0][0])/2+n[0][0],d=e.document,p=d.createElement("g",{}),g=d.createElement("polygon",{style:{points:[[n[0][0],n[0][1]],[h,n[1][1]+f],[h,n[3][1]+f],[n[3][0],n[3][1]]],fill:i,fillOpacity:s,stroke:o,strokeOpacity:l,inset:30}}),y=d.createElement("polygon",{style:{points:[[h,n[1][1]+f],[n[1][0],n[1][1]],[n[2][0],n[2][1]],[h,n[2][1]+f]],fill:i,fillOpacity:s,stroke:o,strokeOpacity:l}}),v=d.createElement("polygon",{style:{points:[[n[0][0],n[0][1]],[h,n[1][1]-f],[n[1][0],n[1][1]],[h,n[1][1]+f]],fill:i,fillOpacity:s-.2}});return p.appendChild(y),p.appendChild(g),p.appendChild(v),p}}));var hK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return fK(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0},elementHighlight:{background:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return cK},e}(UX);function dK(t){return(0,M.flow)((function(t){var e=t.options,n=e.children,r=void 0===n?[]:n;return e.legend?(r.forEach((function(t){if(!(0,M.get)(t,"colorField")){var e=(0,M.get)(t,"yField");(0,M.set)(t,"colorField",(function(){return e}))}})),t):t}),(function(t){var e=t.options,n=e.annotations,r=void 0===n?[]:n,i=e.children,o=void 0===i?[]:i,a=e.scale,s=!1;return(0,M.get)(a,"y.key")||o.forEach((function(t,e){if(!(0,M.get)(t,"scale.y.key")){var n="child".concat(e,"Scale");(0,M.set)(t,"scale.y.key",n);var i=t.annotations,o=void 0===i?[]:i;o.length>0&&((0,M.set)(t,"scale.y.independent",!1),o.forEach((function(t){(0,M.set)(t,"scale.y.key",n)}))),!s&&r.length>0&&void 0===(0,M.get)(t,"scale.y.independent")&&(s=!0,(0,M.set)(t,"scale.y.independent",!1),r.forEach((function(t){(0,M.set)(t,"scale.y.key",n)})))}})),t}),rK,tK)(t)}var pK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="DualAxes",e}return pK(e,t),e.getDefaultOptions=function(){return{type:"view",axis:{y:{title:!1,tick:!1},x:{title:!1}},scale:{y:{independent:!0,nice:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return dK},e}(UX);function yK(t){return(0,M.flow)((function(t){var e=t.options,n=e.xField;return e.colorField||(0,M.set)(e,"colorField",n),t}),(function(t){var e=t.options,n=e.compareField,r=e.transform,i=e.isTransposed,o=void 0===i||i,a=e.coordinate;return r||(n?(0,M.set)(e,"transform",[]):(0,M.set)(e,"transform",[{type:"symmetryY"}])),!a&&o&&(0,M.set)(e,"coordinate",{transform:[{type:"transpose"}]}),t}),(function(t){var e=t.options,n=e.compareField,r=e.seriesField,i=e.data,o=e.children,a=e.yField,s=e.isTransposed,c=void 0===s||s;if(n||r){var l=Object.values((0,M.groupBy)(i,(function(t){return t[n||r]})));o[0].data=l[0],o.push({type:"interval",data:l[1],yField:function(t){return-t[a]}}),delete e.compareField,delete e.data}return r&&((0,M.set)(e,"type","spaceFlex"),(0,M.set)(e,"ratio",[1,1]),(0,M.set)(e,"direction",c?"row":"col"),delete e.seriesField),t}),(function(t){var e=t.options,n=e.tooltip,r=e.xField,i=e.yField;return n||(0,M.set)(e,"tooltip",{title:!1,items:[function(t){return{name:t[r],value:t[i]}}]}),t}),rK,tK)(t)}var vK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return vK(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{x:{padding:0}},animate:{enter:{type:"fadeIn"}},axis:!1,shapeField:"funnel",label:{position:"inside",transform:[{type:"contrastReverse"}]},children:[{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return yK},e}(UX);function bK(t){return(0,M.flow)(rK,tK)(t)}var xK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return xK(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return bK},e}(UX);function OK(t){switch(typeof t){case"function":return t;case"string":return function(e){return(0,M.get)(e,[t])};default:return function(){return t}}}var kK=function(){return kK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},kK.apply(this,arguments)};function MK(t){return(0,M.flow)((function(t){var e=t.options,n=e.angleField,r=e.data,i=e.label,o=e.tooltip,a=e.colorField,s=OK(a);if((0,M.isArray)(r)&&r.length>0){var c=r.reduce((function(t,e){return t+e[n]}),0);if(0===c){var l=r.map((function(t){var e;return kK(kK({},t),((e={})[n]=1,e))}));if((0,M.set)(e,"data",l),i){var u=a===(0,M.get)(i,"text");(0,M.set)(e,"label",kK(kK({},i),u?{}:{formatter:function(){return 0}}))}!1!==o&&((0,M.isFunction)(o)?(0,M.set)(e,"tooltip",(function(t,e,r){var i;return o(kK(kK({},t),((i={})[n]=0,i)),e,r.map((function(t){var e;return kK(kK({},t),((e={})[n]=0,e))})))})):(0,M.set)(e,"tooltip",kK(kK({},o),{items:[function(t,e,n){return{name:s(t,e,n),value:0}}]})))}}return t}),tK)(t)}var _K=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return _K(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"theta"},transform:[{type:"stackY",reverse:!0}],animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return MK},e}(UX);function SK(t){return(0,M.flow)(rK,tK)(t)}var AK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e}return AK(e,t),e.getDefaultOptions=function(){return{axis:{y:{title:!1},x:{title:!1}},legend:{size:!1},children:[{type:"point"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return SK},e}(UX);function TK(t){return(0,M.flow)((function(t){return(0,M.set)(t,"options.coordinate",{type:(0,M.get)(t,"options.coordinateType","polar")}),t}),tK)(t)}var PK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}return PK(e,t),e.getDefaultOptions=function(){return{axis:{x:{grid:!0,line:!0},y:{zIndex:1,title:!1,line:!0,nice:!0}},meta:{x:{padding:.5,align:0}},interaction:{tooltip:{style:{crosshairsLineDash:[4,4]}}},children:[{type:"line"}],coordinateType:"polar"}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return TK},e}(UX);function RK(t){return(0,M.flow)((function(t){var e=t.options,n=e.yField,r=e.children,i=e.style,o=void 0===i?{}:i,a=e.lineStyle,s=void 0===a?{}:a,c=n[0],l=n[1],u=n[2],f=n[3];return(0,M.set)(r,[0,"yField"],[u,f]),(0,M.set)(r,[0,"style"],s),(0,M.set)(r,[1,"yField"],[c,l]),(0,M.set)(r,[1,"style"],o),delete e.yField,delete e.lineStyle,delete e.style,t}),tK)(t)}var LK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NK=["#26a69a","#999999","#ef5350"],IK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stock",e}return LK(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:NK},y:{nice:!0}},children:[{type:"link"},{type:"interval"}],axis:{x:{title:!1,grid:!1},y:{title:!1,grid:!0,gridLineDash:null}},animate:{enter:{type:"scaleInY"}},interaction:{tooltip:{shared:!0,marker:!1,groupName:!1,crosshairs:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return RK},e}(UX);function DK(t){return(0,M.flow)(rK,tK)(t)}var BK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyLine",e}return BK(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return DK},e}(UX);function zK(t){return(0,M.flow)(rK,tK)(t)}var ZK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),WK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyArea",e}return ZK(e,t),e.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zK},e}(UX);function $K(t){return(0,M.flow)(rK,tK)(t)}var GK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyColumn",e}return GK(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $K},e}(UX),YK=function(){return YK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},YK.apply(this,arguments)};function HK(t){return(0,M.flow)((function(t){var e=t.options,n=e.percent,r=e.color,i=void 0===r?[]:r;if(!n)return t;var o={scale:{color:{range:i.length?i:[]}},data:[1,n]};return Object.assign(e,YK({},o)),t}),rK,tK)(t)}var VK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyProgress",e}return VK(e,t),e.getDefaultOptions=function(){return{type:"view",data:[],margin:0,padding:0,tooltip:!1,children:[{interaction:{tooltip:!1},coordinate:{transform:[{type:"transpose"}]},type:"interval",axis:!1,legend:!1,encode:{y:function(t){return t},color:function(t,e){return e}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return HK},e}(UX),XK=function(){return XK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},XK.apply(this,arguments)};function KK(t){return(0,M.flow)((function(t){var e=t.options.radius,n=void 0===e?.8:e;return(0,M.set)(t,"options.coordinate.innerRadius",n),t}),(function(t){var e=t.options,n=e.percent,r=e.color,i=void 0===r?[]:r;if(!n)return t;var o={scale:{color:{range:i.length?i:[]}},data:[1,n]};return Object.assign(e,XK({},o)),t}),rK,tK)(t)}var QK=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),JK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyRing",e}return QK(e,t),e.getDefaultOptions=function(){return{type:"view",data:[],margin:0,padding:0,coordinate:{type:"theta"},animate:{enter:{type:"waveIn"}},interaction:{tooltip:!1},tooltip:!1,children:[{type:"interval",axis:!1,legend:!1,encode:{y:function(t){return t},color:function(t,e){return e}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return KK},e}(UX);function tQ(t){return(0,M.flow)(tK)(t)}var eQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return eQ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"polar"},animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return tQ},e}(UX),rQ="__start__",iQ="__end__",oQ="__waterfall_value__",aQ=function(){return aQ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},aQ.apply(this,arguments)},sQ=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function cQ(t){return(0,M.flow)((function(t){var e=t.options,n=e.data,r=void 0===n?[]:n,i=e.yField;return r.length?(r.reduce((function(t,e,n){var o,a=OK(i),s=a(e,n,r);if(0===n||e.isTotal)e[rQ]=0,e[iQ]=s,e[oQ]=s;else{var c=null!==(o=t[iQ])&&void 0!==o?o:a(t,n,r);e[rQ]=c,e[iQ]=c+s,e[oQ]=t[iQ]}return e}),[]),Object.assign(e,{yField:[rQ,iQ]}),t):t}),(function(t){var e=t.options,n=e.data,r=void 0===n?[]:n,i=e.xField,o=e.children,a=e.linkStyle,s=sQ([],r,!0);return s.reduce((function(t,e,n){return n>0&&(e.x1=t[i],e.x2=e[i],e.y1=t[iQ]),e}),[]),s.shift(),o.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:s,style:aQ({stroke:"#697474"},a),label:!1,tooltip:!1}),t}),rK,(function(t){var e=t.options,n=e.data,r=void 0===n?[]:n,i=e.connector;return i?((0,M.set)(e,"connector",aQ({xField:i.reverse?["x2","x1"]:["x1","x2"],yField:i.reverse?["y2","y1"]:["y1","y2"],data:[{x1:r[0].x,y1:r[0][iQ],x2:r[r.length-1].x,y2:r[r.length-1][iQ]}]},(0,M.isObject)(i)?i:{})),t):t}),tK)(t)}var lQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="waterfall",e}return lQ(e,t),e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:oQ,valueFormatter:"~s",name:"value"},axis:{y:{title:null,labelFormatter:"~s"},x:{title:null}},children:[{type:"interval",interaction:{elementHighlight:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return cQ},e}(UX);function fQ(t){return(0,M.flow)((function(t){var e=t.options,n=e.data,r=e.binNumber,i=e.binWidth,o=e.children,a=e.channel,s=void 0===a?"count":a,c=(0,M.get)(o,"[0].transform[0]",{});return(0,M.isNumber)(i)?((0,M.assign)(c,{thresholds:(0,M.ceil)((0,M.divide)(n.length,i)),y:s}),t):(0,M.isNumber)(r)?((0,M.assign)(c,{thresholds:r,y:s}),t):t}),rK,tK)(t)}var hQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Histogram",e}return hQ(e,t),e.getDefaultOptions=function(){return{type:"view",autoFit:!0,axis:{y:{title:!1},x:{title:!1}},children:[{type:"rect",transform:[{type:"binX",y:"count"}],interaction:{elementHighlight:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return fQ},e}(UX);function pQ(t){return(0,M.flow)((function(t){var e=t.options,n=e.tooltip,r=void 0===n?{}:n,i=e.colorField,o=e.sizeField;return r&&!r.field&&(r.field=i||o),t}),(function(t){var e=t.options,n=e.mark,r=e.children;return n&&(r[0].type=n),t}),rK,tK)(t)}var gQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e}return gQ(e,t),e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{valueFormatter:"~s"},axis:{y:{title:null,grid:!0},x:{title:null,grid:!0}},children:[{type:"point"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return pQ},e}(UX);function vQ(t){return(0,M.flow)((function(t){var e=t.options.boxType,n=void 0===e?"box":e;return t.options.children[0].type=n,t}),rK,tK)(t)}var mQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="box",e}return mQ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"box"}],axis:{y:{title:!1},x:{title:!1}},tooltip:{items:[{name:"min",channel:"y"},{name:"q1",channel:"y1"},{name:"q2",channel:"y2"},{name:"q3",channel:"y3"},{name:"max",channel:"y4"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return vQ},e}(UX),xQ=function(t){var e=t.options,n=e.data;return(0,M.get)(n,"value")||"fetch"!==(0,M.get)(n,"type")&&(0,M.isPlainObject)(n)&&(0,M.set)(e,"data.value",n),t},wQ=function(t){var e=t.options,n=e.data,r=[{type:"custom",callback:function(t){return{links:t}}}];if((0,M.isArray)(n))n.length>0?(0,M.set)(e,"data",{value:n,transform:r}):delete e.children;else if("fetch"===(0,M.get)(n,"type")&&(0,M.get)(n,"value")){var i=(0,M.get)(n,"transform");(0,M.isArray)(i)||(0,M.set)(n,"transform",r)}return t};function OQ(t){return(0,M.flow)(xQ,wQ,rK,tK)(t)}var kQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="sankey",e}return kQ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return OQ},e}(UX);function _Q(t){!function(t){var e=t.options.layout,n=void 0===e?"horizontal":e;t.options.coordinate.transform="horizontal"!==n?void 0:[{type:"transpose"}]}(t);var e=t.options.layout,n=void 0===e?"horizontal":e;return t.options.children.forEach((function(t){var e;(null===(e=null==t?void 0:t.coordinate)||void 0===e?void 0:e.transform)&&(t.coordinate.transform="horizontal"!==n?void 0:[{type:"transpose"}])})),t}var EQ=function(){return EQ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},EQ.apply(this,arguments)},SQ=["#f0efff","#5B8FF9","#3D76DD"];function AQ(t,e,n,r){void 0===r&&(r=!0);var i=0,o=!1,a=(0,M.map)(t,(function(t){var a,s,c=(0,M.get)(t,[e]);if((0,M.isNil)(c))return[];if((0,M.isString)(c)){var l=Number(c);return isNaN(l)?[]:((a={})[n]=t[n],a[e]=l,a)}return(0,M.isArray)(c)?(o=!0,i=Math.max(i,c.length),(0,M.map)(r?c.sort((function(t,e){return e-t})):c,(function(r,i){var o;return(o={})[n]=t[n],o[e]=r,o.index=i,o}))):(i=Math.max(1,i),(s={})[n]=t[n],s[e]=c,s)})).flat();return o?[a.map((function(t){return EQ({index:0},t)})),i]:[a,i]}function jQ(t,e){return new Array(t).fill("").map((function(t,n){return(0,M.isArray)(e)?e[n%e.length]:e}))}function TQ(t){return(0,M.flow)((function(t){var e=t.options,n=e.color,r=e.rangeField,i=void 0===r?"ranges":r,o=e.measureField,a=void 0===o?"measures":o,s=e.targetField,c=void 0===s?"targets":s,l=e.xField,u=void 0===l?"title":l,f=e.mapField,h=e.data,d=AQ(h,i,u),p=d[0],g=d[1],y=AQ(h,a,u,!1),v=y[0],m=y[1],b=AQ(h,c,u,!1),x=b[0],w=b[1],O=(0,M.get)(n,[i],SQ[0]),k=(0,M.get)(n,[a],SQ[1]),_=(0,M.get)(n,[c],SQ[2]),E=[jQ(g,O),jQ(m,k),jQ(w,_)].flat();return e.children=(0,M.map)(e.children,(function(t,e){var n=[p,v,x][e],r=[i,a,c][e];return EQ(EQ({},t),{data:n,encode:EQ(EQ({},t.encode||{}),{x:u,y:r,color:function(t){var e=t.index,n=(0,M.isNumber)(e)?"".concat(r,"_").concat(e):r;return f?(0,M.get)(f,[r,e],n):n}})})})),(0,M.set)(e,"scale.color.range",E),e.legend.color.itemMarker=function(t){return f&&(0,M.includes)(null==f?void 0:f[c],t)||(null==t?void 0:t.replace(/\_\d$/,""))===c?"line":"square"},t}),(function(t){var e=t.options.transpose;return void 0===e||e||(0,M.set)(t,"options.children[2].shapeField","hyphen"),t}),(function(t){var e=t.options,n=e.range,r=void 0===n?{}:n,i=e.measure,o=void 0===i?{}:i,a=e.target,s=void 0===a?{}:a,c=e.children;return e.children=[r,o,s].map((function(t,e){return LX(c[e],t)})),t}),_Q,tK)(t)}var PQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e}return PQ(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{range:SQ}},legend:{color:{itemMarker:function(t){return"targets"===t?"line":"square"}}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval",style:{maxWidth:30,zIndex:-2},axis:{y:{grid:!0,gridLineWidth:2}}},{type:"interval",style:{maxWidth:20,zIndex:-1},transform:[{type:"stackY"}]},{type:"point",encode:{size:8,shape:"line"}}],interaction:{tooltip:{shared:!0}},coordinate:{transform:[{type:"transpose"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return TQ},e}(UX);function RQ(t){return(0,M.flow)((function(t){var e=t.options.data;return t.options.data={value:e},t}),rK,tK)(t)}var LQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Gauge",e}return LQ(e,t),e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return RQ},e}(UX);function IQ(t){return(0,M.flow)((function(t){var e=t.options.percent;return(0,M.isNumber)(e)&&((0,M.set)(t,"options.data",e),delete t.options.percent),t}),rK,tK)(t)}var DQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),BQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Liquid",e}return DQ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return IQ},e}(UX);function FQ(t){return(0,M.flow)(rK,tK)(t)}var zQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ZQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="WordCloud",e}return zQ(e,t),e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return FQ},e}(UX);function WQ(t){return(0,M.flow)(xQ,rK,tK)(t)}var $Q=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),GQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e}return $Q(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return WQ},e}(UX),qQ=function(){return qQ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},qQ.apply(this,arguments)},YQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function HQ(t){return(0,M.flow)((function(t){var e=t.options,n=e.startAngle,r=e.maxAngle,i=e.coordinate,o=(0,M.isNumber)(n)?n/(2*Math.PI)*360:-90,a=(0,M.isNumber)(r)?(Number(r)+o)/180*Math.PI:Math.PI;return(0,M.set)(t,["options","coordinate"],qQ(qQ({},i),{endAngle:a,startAngle:null!=n?n:-Math.PI/2})),t}),(function(t){var e=t.options,n=e.tooltip,r=e.xField,i=e.yField,o=OK(r),a=OK(i);return n||(0,M.set)(e,"tooltip",{title:!1,items:[function(t,e,n){return{name:o(t,e,n),value:a(t,e,n)}}]}),t}),(function(t){var e=t.options,n=e.markBackground,r=e.children,i=e.scale,o=e.coordinate,a=e.xField,s=(0,M.get)(i,"y.domain",[]);if(n){var c=n.style,l=YQ(n,["style"]);r.unshift(qQ({type:"interval",xField:a,yField:s[s.length-1],style:qQ({fillOpacity:.4,fill:"#e0e4ee"},c),coordinate:qQ(qQ({},o),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},l))}return t}),rK,tK)(t)}var VQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial",e}return VQ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"radial",innerRadius:.1,outerRadius:1,endAngle:Math.PI},animate:{enter:{type:"waveIn",duration:800}},axis:{y:{nice:!0,labelAutoHide:!0,labelAutoRotate:!1},x:{title:!1,nice:!0,labelAutoRotate:!1,labelAutoHide:{type:"equidistance",cfg:{minGap:6}}}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return HQ},e}(UX);function XQ(t){return(0,M.flow)(xQ,tK)(t)}var KQ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),QQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="CirclePacking",e}return KQ(e,t),e.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack",encode:{color:"depth"}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return XQ},e}(UX),JQ=function(){return JQ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},JQ.apply(this,arguments)};function tJ(t,e){return t||e}function eJ(t){return(0,M.flow)((function(t){var e=t.options,n=e.xField,r=e.yField,i=e.colorField,o=e.seriesField,a=e.children,s=null==a?void 0:a.map((function(t){return JQ(JQ({},t),{xField:n,yField:r,seriesField:tJ(o,i),colorField:tJ(i,o),data:"density"===t.type?{transform:[{type:"kde",field:r,groupBy:[n,tJ(o,i)]}]}:t.data})})).filter((function(t){return e.box||"density"===t.type}));return(0,M.set)(e,"children",s),delete e.box,t}),rK,tK)(t)}var nJ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rJ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="violin",e}return nJ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"density",sizeField:"size",tooltip:!1},{type:"boxplot",shapeField:"violin",style:{opacity:.5,point:!1}}],animate:{enter:{type:"fadeIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return eJ},e}(UX),iJ=function(){return iJ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},iJ.apply(this,arguments)},oJ=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function aJ(t){return(0,M.flow)((function(t){var e=t.options,n=e.yField;return e.children.forEach((function(t,e){(0,M.set)(t,"yField",n[e])})),t}),(function(t){var e=t.options,n=e.yField,r=e.children,i=e.data;if((0,M.isPlainObject)(i))return t;var o=(0,M.isArray)((0,M.get)(i,[0]))?i:[i,i];return r.forEach((function(t,e){(0,M.set)(t,"data",oJ([],o[e].map((function(t){return iJ({groupKey:n[e]},t)})),!0))})),t}),(function(t){var e=t.options,n=e.yField,r=n[0],i=n[1];return e.tooltip||(0,M.set)(e,"tooltip",{items:[{field:r,value:r},{field:i,value:i}]}),t}),(function(t){var e=t.options,n=e.children,r=e.layout,i=e.coordinate.transform,o=e.paddingBottom,a=void 0===o?48:o,s=e.paddingLeft,c=void 0===s?48:s,l=e.axis;(0,M.set)(e,"axisText",iJ(iJ({},(null==l?void 0:l.x)||{}),{layout:r}));var u=n[0],f=n[1];if("vertical"===r)(0,M.set)(e,"direction","col"),(0,M.set)(e,"paddingLeft",c),(0,M.set)(e,"coordinate.transform",i.filter((function(t){return"transpose"!==t.type}))),(0,M.set)(u,"paddingBottom",16),(0,M.set)(f,"paddingTop",16),(0,M.set)(f,"axis.x.position","top"),(0,M.set)(f,"scale.y.range",[0,1]);else{(0,M.set)(e,"paddingBottom",a),(0,M.set)(u,"scale.y.range",[0,1]);var h=u.paddingRight,d=void 0===h?32:h,p=f.paddingLeft,g=void 0===p?32:p;(0,M.set)(u,"paddingRight",d),(0,M.set)(u,"axis.x.position","right"),(0,M.set)(f,"paddingLeft",g)}return t}),rK,tK)(t)}var sJ,cJ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lJ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="BidirectionalBar",e}return cJ(e,t),e.getDefaultOptions=function(){return{type:"spaceFlex",coordinate:{transform:[{type:"transpose"}]},scale:{y:{nice:!0}},direction:"row",layout:"horizontal",legend:!1,axis:{y:{title:!1},x:{title:!1,label:!1}},children:[{type:"interval"},{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return aJ},e}(UX);function uJ(t){return(0,M.flow)((function(t){var e=t.options,n=e.data,r=e.setsField,i=e.sizeField;return(0,M.isArray)(n)&&((0,M.set)(e,"data",{type:"inline",value:n,transform:[{type:"venn",sets:r,size:i,as:[sJ.color,sJ.d]}]}),(0,M.set)(e,"colorField",sJ.color),(0,M.set)(e,["children","0","encode","d"],sJ.d)),t}),tK)(t)}!function(t){t.color="key",t.d="path"}(sJ||(sJ={}));var fJ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hJ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="venn",e}return fJ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:sJ.color,d:sJ.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return uJ},e}(UX);function dJ(t){return(0,M.flow)(xQ,tK)(t)}var pJ=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gJ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Sunburst",e}return pJ(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return dJ},e}(UX),yJ={Base:KX,Line:wK,Column:hK,Pie:EK,Area:aK,Bar:uK,DualAxes:gK,Funnel:mK,Scatter:jK,Radar:CK,Rose:nQ,Stock:IK,TinyLine:FK,TinyArea:WK,TinyColumn:qK,TinyProgress:UK,TinyRing:JK,Waterfall:uQ,Histogram:dQ,Heatmap:yQ,Box:bQ,Sankey:MQ,Bullet:CQ,Gauge:NQ,Liquid:BQ,WordCloud:ZQ,Treemap:GQ,RadialBar:UQ,CirclePacking:QQ,Violin:rJ,BidirectionalBar:lJ,Venn:hJ,Mix:gK,Sunburst:gJ},vJ=function(){return vJ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},vJ.apply(this,arguments)},mJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},bJ=(0,u.forwardRef)((function(t,e){var n=t.chartType,r=void 0===n?"Base":n,i=mJ(t,["chartType"]),o=i.containerStyle,a=void 0===o?{height:"inherit",flex:1}:o,s=i.containerAttributes,c=void 0===s?{}:s,l=i.className,f=i.loading,h=i.loadingTemplate,d=i.errorTemplate,p=i.onReady,g=mJ(i,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate","onReady"]),y=A(yJ[r],vJ(vJ({},g),{onReady:function(t){e&&("function"==typeof e?e(t):e.current=t),null==p||p(t)}})),v=(y.chart,y.container);return u.createElement(k,{errorTemplate:d},f&&u.createElement(w,{loadingTemplate:h,theme:i.theme,loading:f}),u.createElement("div",vJ({className:l,style:a,ref:v},c)))})),xJ=(0,u.createContext)({});var wJ=function(){return wJ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},wJ.apply(this,arguments)};function OJ(t){var e=t.yField,n=t.data,r=(0,M.isArray)(n)&&n.length>0&&(0,M.isString)(e)&&!(0,M.get)(t,"scale.y.domainMax"),i=Object.isFrozen(t)?wJ({},t):t;return r&&0===n.reduce((function(t,n){return t+n[e]}),0)?(0,M.set)(i,"scale.y.domainMax",1):r&&0!==n.reduce((function(t,n){return t+n[e]}),0)&&(0,M.set)(i,"scale.y.domainMax",void 0),i}var kJ=function(){return kJ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},kJ.apply(this,arguments)};function MJ(t){t.charAt(0).toLowerCase(),t.slice(1);return(0,u.forwardRef)((function(e,n){var r,i,o=(0,u.useContext)(xJ),a=(0,u.useMemo)((function(){return t.charAt(0).toLowerCase()+t.slice(1)}),[t]),s=(0,M.flow)([OJ])(e),c=kJ(kJ({},null!==(r=null==o?void 0:o.common)&&void 0!==r?r:{}),null!==(i=null==o?void 0:o[a])&&void 0!==i?i:{});return u.createElement(bJ,kJ({},c,s,{chartType:t,ref:n}))}))}},78830:function(t,e){!function(t){"use strict";function e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function r(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function i(t){return a(t,"Function")}var o={}.toString,a=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},c=function(t){if("object"!=typeof(e=t)||null===e||!a(t,"Object"))return!1;var e;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},l=function(t){return a(t,"Number")},u=Object.values?function(t){return Object.values(t)}:function(t){var e,n=[],r=t,o=function(e,r){i(t)&&"prototype"===r||n.push(e)};if(r)if(s(r))for(var a=0,c=r.length;a<c&&!1!==o(r[a],a);a++);else if(e=typeof r,null!==r&&"object"==e||"function"==e)for(var l in r)if(r.hasOwnProperty(l)&&!1===o(r[l],l))break;return n},f=5;function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||f,n){var a;n.hasOwnProperty(o)&&(null!==(a=n[o])&&c(a)?(c(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):s(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a))}}(t,e[r]);return t}function d(t){return t}!function(t,e){var n;if(i(t))return(n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o,a=e?e.apply(this,r):r[0],s=n.cache;return s.has(a)?s.get(a):(o=t.apply(this,r),s.set(a,o),o)}).cache=new Map;throw new TypeError("Expected a function")}((function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle;return e=e.fontVariant,(p=p||document.createElement("canvas").getContext("2d")).font=[o,e,i,n+"px",r].join(" "),p.measureText(a(t,"String")?t:"").width}),(function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}([t],u(e=void 0===e?{}:e)).join("")}));var p,g="undefined"!=typeof Float32Array?Float32Array:Array;function y(){var t=new g(9);return g!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var v=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=(e=e[8],n[0]),h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],v=n[6],m=n[7];return n=n[8],t[0]=f*r+h*a+d*l,t[1]=f*i+h*s+d*u,t[2]=f*o+h*c+d*e,t[3]=p*r+g*a+y*l,t[4]=p*i+g*s+y*u,t[5]=p*o+g*c+y*e,t[6]=v*r+m*a+n*l,t[7]=v*i+m*s+n*u,t[8]=v*o+m*c+n*e,t};function m(){var t=new g(16);return g!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}var b=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],v=e[14],m=(e=e[15],n[0]),b=n[1],x=n[2],w=n[3];return t[0]=m*r+b*s+x*f+w*g,t[1]=m*i+b*c+x*h+w*y,t[2]=m*o+b*l+x*d+w*v,t[3]=m*a+b*u+x*p+w*e,m=n[4],b=n[5],x=n[6],w=n[7],t[4]=m*r+b*s+x*f+w*g,t[5]=m*i+b*c+x*h+w*y,t[6]=m*o+b*l+x*d+w*v,t[7]=m*a+b*u+x*p+w*e,m=n[8],b=n[9],x=n[10],w=n[11],t[8]=m*r+b*s+x*f+w*g,t[9]=m*i+b*c+x*h+w*y,t[10]=m*o+b*l+x*d+w*v,t[11]=m*a+b*u+x*p+w*e,m=n[12],b=n[13],x=n[14],w=n[15],t[12]=m*r+b*s+x*f+w*g,t[13]=m*i+b*c+x*h+w*y,t[14]=m*o+b*l+x*d+w*v,t[15]=m*a+b*u+x*p+w*e,t};function x(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce((function(t,e){return function(n){return e(t(n))}}),t):d}function w(t){return t instanceof Float32Array||t instanceof Array}function O(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function k(t,e,r,i,o){var a=(t=n(t,2))[0];return a=[a,t=t[1]],(t=y())[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function M(t,...e){return e.reduce(((t,e)=>n=>t(e(n))),t)}function _(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}L=new g(3),g!=Float32Array&&(L[0]=0,L[1]=0,L[2]=0),L=new g(4),g!=Float32Array&&(L[0]=0,L[1]=0,L[2]=0,L[3]=0);const E=Math.sqrt(50),S=Math.sqrt(10),A=Math.sqrt(2);function j(t,e,n){return n=(e=(e-t)/Math.max(0,n))/10**(t=Math.floor(Math.log(e)/Math.LN10)),0<=t?(n>=E?10:n>=S?5:n>=A?2:1)*10**t:-(10**-t)/(n>=E?10:n>=S?5:n>=A?2:1)}const T=(t,e,n=5)=>{let r,i=0,o=(t=[t,e]).length-1,a=t[i],s=t[o];return s<a&&([a,s]=[s,a],[i,o]=[o,i]),0<(r=j(a,s,n))?(a=Math.floor(a/r)*r,s=Math.ceil(s/r)*r,r=j(a,s,n)):r<0&&(a=Math.ceil(a*r)/r,s=Math.floor(s*r)/r,r=j(a,s,n)),0<r?(t[i]=Math.floor(a/r)*r,t[o]=Math.ceil(s/r)*r):r<0&&(t[i]=Math.ceil(a*r)/r,t[o]=Math.floor(s*r)/r),t};function P(t){return null!=t&&!Number.isNaN(t)}function C(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){var e=this.options.interpolator;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){var r,{domain:i,interpolator:o,round:a}=this.getOptions(),i=e(i.map(t)),a=a?(r=o,t=>(t=r(t),l(t)?Math.round(t):t)):o;this.output=M(a,i,n,t)},n.prototype.invert=void 0}}var R,L={exports:{}},N={exports:{}},I=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))},D=Array.prototype.concat,B=Array.prototype.slice,F=N.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];I(i)?e=D.call(e,B.call(i)):e.push(i)}return e},z=(F.wrap=function(t){return function(){return t(F(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Z=N.exports,W=Object.hasOwnProperty,$=Object.create(null);for(R in z)W.call(z,R)&&($[z[R]]=R);var G=L.exports={to:{},get:{}};function q(t,e,n){return Math.min(Math.max(e,t),n)}function Y(t){return(t=Math.round(t).toString(16).toUpperCase()).length<2?"0"+t:t}G.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=G.get.hsl(t),n="hsl";break;case"hwb":e=G.get.hwb(t),n="hwb";break;default:e=G.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},G.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var o=2*n;i[n]=parseInt(e.slice(o,2+o),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:W.call(z,e[1])?((i=z[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=q(i[n],0,255);return i[3]=q(i[3],0,1),i},G.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,q(parseFloat(t[2]),0,100),q(parseFloat(t[3]),0,100),q(isNaN(e)?1:e,0,1)]):null},G.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,q(parseFloat(t[2]),0,100),q(parseFloat(t[3]),0,100),q(isNaN(e)?1:e,0,1)]):null},G.to.hex=function(){var t=Z(arguments);return"#"+Y(t[0])+Y(t[1])+Y(t[2])+(t[3]<1?Y(Math.round(255*t[3])):"")},G.to.rgb=function(){var t=Z(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},G.to.rgb.percent=function(){var t=Z(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},G.to.hsl=function(){var t=Z(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},G.to.hwb=function(){var t=Z(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},G.to.keyword=function(t){return $[t.slice(0,3)]};var H=L.exports;function V(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function U(t){var e,n,r;return(t=H.get(t))?(({model:t,value:e}=t),"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*V(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*V(n,r,e),255*V(n,r,e-1/3),t]):null):null}const X=(t,e)=>n=>t*(1-n)+e*n,K=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return X(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const i=U(n),o=U(r);return null===i||null===o?i?()=>n:()=>r:t=>{var e=new Array(4);for(let a=0;a<4;a+=1){var n=i[a],r=o[a];e[a]=n*(1-t)+r*t}var[a,s,c,l]=e;return`rgba(${Math.round(a)}, ${Math.round(s)}, ${Math.round(c)}, ${l})`}}},Q=(t,e)=>{const n=X(t,e);return t=>Math.round(n(t))};function J({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function tt(t){return"object"==typeof t?t.valueOf():t}class et extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=tt,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(J({map:this.map,initKey:this.initKey},t))}has(t){return super.has(J({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 nt{constructor(t){this.options=h({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=h({},this.options,t),this.rescale(t)}rescale(t){}}const rt=Symbol("defaultUnknown");function it(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function ot(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let o=r.get(t);if(void 0===o){if(i!==rt)return i;o=e.push(t)-1,r.set(t,o)}return n[o%n.length]}function at(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class st extends nt{getDefaultOptions(){return{domain:[],range:[],unknown:rt}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&it(this.domainIndexMap,this.getDomain(),this.domainKey),ot({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&it(this.rangeIndexMap,this.getRange(),this.rangeKey),ot({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=at(e),this.rangeKey=at(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 st(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 ct(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:s}=t;var c,l=e.length,u=0<(u=(t=l)-(c=o).length)?[...c,...new Array(u).fill(1)]:u<0?c.slice(0,t):c,[t,c]=n;const f=(g=(c-=t)/(2/l*r+1-1/l*i))*i/l;g-=l*f;const h=function(t){const e=Math.min(...t);return t.map((t=>t/e))}(u),d=g/h.reduce(((t,e)=>t+e));u=new et(e.map(((t,e)=>(e=h[e]*d,[t,a?Math.floor(e):e]))));var p=new et(e.map(((t,e)=>(e=h[e]*d+f,[t,a?Math.floor(e):e])))),g=Array.from(p.values()).reduce(((t,e)=>t+e));t+=(c-(g-g/l*i))*s;let y=a?Math.round(t):t;var v=new Array(l);for(let t=0;t<l;t+=1){v[t]=(m=y,Math.round(1e12*m)/1e12);var m=e[t];y+=p.get(m)}return{valueBandWidth:u,valueStep:p,adjustedRange:v}}class lt extends st{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:rt,flex:[]}}constructor(t){super(t)}clone(){return new lt(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t.domain;if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null!=(n=t.flex)&&n.length)return ct(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:o}=t;let a,s,c=n[0];return n=n[1]-c,a=n/Math.max(1,2*t+(e-r)),i&&(a=Math.floor(a)),c+=(n-a*(e-r))*o,s=a*(1-r),i&&(c=Math.round(c),s=Math.round(s)),t=new Array(e).fill(0).map(((t,e)=>c+e*a)),{valueStep:a,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 ut=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0<n)return[o];let s=j(o,a,n);if(0===s||!Number.isFinite(s))return[];if(0<s){o=Math.ceil(o/s),a=Math.floor(a/s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*s}else{s=-s,o=Math.ceil(o*s),a=Math.floor(a*s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/s}return i},ft=(t,e,n)=>{var[t,r]=t,[e,i]=e;let o,a;return M(a=t<r?(o=_(t,r),n(e,i)):(o=_(r,t),n(i,e)),o)},ht=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r);var a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=_(s[t],s[t+1]),o[t]=n(c[t],c[t+1]);return e=>{var n=function(t,e,n,r,i){let o=1,a=r||t.length;for(var s=i||(t=>t);o<a;){var c=Math.floor((o+a)/2);s(t[c])>e?a=c:o=c+1}return o}(t,e,0,r)-1,a=i[n];return M(o[n],a)(e)}},dt=(t,e,n,r)=>(2<Math.min(t.length,e.length)?ht:ft)(t,e,r?Q:n);class pt extends nt{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:X,tickCount:5}}map(t){return P(t)?this.output(t):this.options.unknown}invert(t){return P(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options.tickMethod,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return T}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,n=(t=this.options.domain.map(t),Math.min(t.length,n.length));if(e){e=t[0];const r=(t=t[n-1])<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return d}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:o}=this.options,n=dt(n.map(t),r,o,i);this.output=M(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=dt(i,r.map(t),X);this.input=M(e,n,i)}}class gt extends pt{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:K,tickMethod:ut,tickCount:5}}chooseTransforms(){return[d,d]}clone(){return new gt(this.options)}}class yt extends lt{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:rt,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new yt(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function vt(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}N=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var mt,bt,xt=vt(L=["January","February","March","April","May","June","July","August","September","October","November","December"],3);!function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o,a=i[r];for(o in a)t[o]=a[o]}}({},{dayNamesShort:vt(N,3),dayNames:N,monthNamesShort:xt,monthNames:L,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}});let wt=mt=class extends gt{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:d,tickMethod:ut,tickCount:5}}constructor(t){super(t)}clone(){return new mt(this.options)}};wt=mt=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([C((function(t){return[t(0),t(1)]}),(t=>{var[t,e]=t;return M(X(0,1),_(t,e))}))],wt);let Ot=bt=class extends gt{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:d,tickMethod:ut,tickCount:5}}constructor(t){super(t)}clone(){return new bt(this.options)}};function kt(t,e,r,i,o){var a=new gt({range:[e,e+i]}),s=new gt({range:[r,r+o]});return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[a.map(e),s.map(t)]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[a.invert(e),s.invert(t)]}}}function Mt(t,e,r,i,o){return(0,n(t,1)[0])(e,r,i,o)}function _t(t,e,r,i,o){return n(t,1)[0]}function Et(t,e,r,i,o){var a=(t=n(t,4))[0],s=t[1],c=t[2],l=(t=t[3],new gt({range:[c,t]})),u=new gt({range:[a,s]}),f=1<(c=o/i)?1:c,h=1<c?1/c:1;return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],e=u.map(e),[(t=l.map(t))*Math.cos(e)*f*.5+.5,t*Math.sin(e)*h*.5+.5]},untransform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/h,Math.sqrt(Math.pow(e,2)+Math.pow(t,2)));return t=O(Math.atan2(t,e),a,s),[u.invert(t),l.invert(r)]}}}function St(t,e,r,i,o){return{transform:function(t){var e=(t=n(t,2))[0];return[t[1],e]},untransform:function(t){var e=(t=n(t,2))[0];return[t[1],e]}}}function At(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return Lt.apply(void 0,r([[-1,-1]],n(e),!1))}function jt(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return Lt.apply(void 0,r([[-1,1]],n(e),!1))}function Tt(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return Lt.apply(void 0,r([[1,-1]],n(e),!1))}function Pt(t,e,r,i,o){t=n(t,1)[0];var a,s=y();return a=Math.sin(t),t=Math.cos(t),s[0]=t,s[1]=a,s[2]=0,s[3]=-a,s[4]=t,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s}function Ct(t,e,r,i,o){var a=(t=n(t,4))[0],s=t[1],c=t[2],l=(t[3]-c)/(+s/(2*Math.PI)+1),u=l/(2*Math.PI),f=new gt({range:[c,c+.99*l]}),h=new gt({range:[a,s]}),d=1<(t=o/i)?1:t,p=1<t?1/t:1;return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],e=h.map(e),t=f.map(t),[Math.cos(e)*(u*e+t)*d*.5+.5,Math.sin(e)*(u*e+t)*p*.5+.5]},untransform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],e=2*(e-.5)/d,t=2*(t-.5)/p,Math.sqrt(Math.pow(e,2)+Math.pow(t,2)));return t=O(Math.atan2(t,e)+Math.floor(r/l)*Math.PI*2,a,s),e=r-u*t,[h.invert(t),f.invert(e)]}}}function Rt(t,e,r,i,o){var a=(t=n(t,4))[0],s=t[1],c=t[2],l=(t=t[3],new gt({range:[c,t]}));return{transform:function(t){for(var e=[],n=t.length,r=new yt({domain:new Array(n).fill(0).map((function(t,e){return e})),range:[a,s]}),i=0;i<n;i++){var o=t[i],c=r.map(i);o=l.map(o),e.push(c,o)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(l.invert(r))}return e}}}Ot=bt=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([C((function(t){return[t(0),t(.5),t(1)]}),(t=>{const[e,n,r]=t,i=M(X(0,.5),_(e,n)),o=M(X(.5,1),_(n,r));return t=>(e>r?t<n?o:i:t<n?i:o)(t)}))],Ot);var Lt=function(t,e,r,i,o){var a=(t=n(t,2))[0];return a=[a,t=t[1]],(t=y())[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t};function Nt(t){return 1/Math.tan(t)}function It(t,e,r,i,o){var a=Nt(n(t,1)[0]);return{transform:function(t){return[(t=n(t,2))[0]+(t=t[1])*a,t]},untransform:function(t){return[(t=n(t,2))[0]-(t=t[1])*a,t]}}}function Dt(t,e,r,i,o){var a=Nt(n(t,1)[0]);return{transform:function(t){var e=(t=n(t,2))[0];return[e,t[1]+e*a]},untransform:function(t){var e=(t=n(t,2))[0];return[e,t[1]-e*a]}}}function Bt(t,e,n,r,i){var o=t<e;return i=(o?e-r:i-e)||i-r,(r=o?-1:1)*i*(n+1)/(n+i/((t-e)*r))+e}function Ft(t,e,n,r,i){var o=t<e;return(i=(o?e-r:i-e)||i-r)/(i*(n+1)/(t-e)-n*(o?-1:1))+e}function zt(t,e,n){return n?new gt({range:[0,1],domain:[0,e]}).map(t):t}function Zt(t,e,r,i,o){var a=(t=n(t,3))[0],s=t[1],c=zt(a,i,void 0!==(t=t[2])&&t);return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Bt(e,c,s,0,1),t]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Ft(e,c,s,0,1),t]}}}function Wt(t,e,r,i,o){var a=(t=n(t,3))[0],s=t[1],c=zt(a,o,void 0!==(t=t[2])&&t);return{transform:function(t){return[(t=n(t,2))[0],Bt(t[1],c,s,0,1)]},untransform:function(t){return[(t=n(t,2))[0],Ft(t[1],c,s,0,1)]}}}function $t(t,e,r,i,o){var a=(t=n(t,5))[0],s=t[1],c=t[2],l=t[3],u=zt(a,i,t=void 0!==(t=t[4])&&t),f=zt(s,o,t);return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Bt(e,u,c,0,1),Bt(t,f,l,0,1)]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Ft(e,u,c,0,1),Ft(t,f,l,0,1)]}}}function Gt(t,e,r,i,o){var a=(t=n(t,5))[0],s=t[1],c=t[2],l=t[3],u=(t=void 0!==(t=t[4])&&t,new gt({range:[0,i]})),f=new gt({range:[0,o]}),h=t?a:u.map(a),d=t?s:f.map(s);return{transform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],u.map(e)-h),i=f.map(t)-d,o=Math.sqrt(r*r+i*i);return c<o?[e,t]:(e=Bt(o,0,l,0,c),t=Math.atan2(i,r),o=h+e*Math.cos(t),i=d+e*Math.sin(t),[u.invert(o),f.invert(i)])},untransform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],u.map(e)-h),i=f.map(t)-d,o=Math.sqrt(r*r+i*i);return c<o?[e,t]:(e=Ft(o,0,l,0,c),t=Math.atan2(i,r),o=h+e*Math.cos(t),i=d+e*Math.sin(t),[u.invert(o),f.invert(i)])}}}function qt(t,e,r,i,o,a,s){var c=new gt({range:[e,e+o]}),l=new gt({range:[r,r+a]}),u=new gt({range:[i,i+s]});return{transform:function(t){var e=(t=n(t,3))[0],r=t[1];return t=t[2],[c.map(e),l.map(r),u.map(t)]},untransform:function(t){var e=(t=n(t,3))[0],r=t[1];return t=t[2],[c.invert(e),l.invert(r),u.invert(t)]}}}function Yt(t,e,r,i,o,a,s){var c,l=(t=n(t,3))[0];return l=[l,t[1],t=t[2]],(c=m())[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=l[0],c[13]=l[1],c[14]=l[2],c[15]=1,c}function Ht(t,e,r,i,o,a,s){return{transform:function(t){var e=(t=n(t,3))[0];return[t[1],e,t[2]]},untransform:function(t){var e=(t=n(t,3))[0];return[t[1],e,t[2]]}}}function Vt(t,e,r,i,o,a,s){var c,l=(t=n(t,3))[0];return l=[l,t[1],t=t[2]],(c=m())[0]=l[0],c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=l[1],c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=l[2],c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}function Ut(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:kt,translate:k,custom:Mt,matrix:_t,polar:Et,transpose:St,scale:Lt,"shear.x":It,"shear.y":Dt,reflect:At,"reflect.x":jt,"reflect.y":Tt,rotate:Pt,helix:Ct,parallel:Rt,fisheye:$t,"fisheye.x":Zt,"fisheye.y":Wt,"fisheye.circular":Gt},this.update(t)}function Xt(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:qt,translate3D:Yt,scale3D:Vt,transpose3D:Ht},this.update(t)}Ut.prototype.update=function(t){this.options=h({},this.options,t),this.recoordinate()},Ut.prototype.clone=function(){return new Ut(this.options)},Ut.prototype.getOptions=function(){return this.options},Ut.prototype.clear=function(){this.update({transformations:[]})},Ut.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},Ut.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},Ut.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.options.transformations;return this.update({transformations:r(r([],n(i),!1),[r([],n(t),!1)],!1)}),this},Ut.prototype.map=function(t){return this.output(t)},Ut.prototype.invert=function(t){return this.input(t)},Ut.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Ut.prototype.compose=function(t){function i(t,e){var i;u.push((e=void 0===e||e)?(i=t,function(t){for(var e=[],o=0;o<t.length-1;o+=2){var a=[t[o],t[o+1]];a=i(a),e.push.apply(e,r([],n(a),!1))}return e}):t)}var o,a,s=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,c=t?function(t){return t.untransform}:function(t){return t.transform},l=[],u=[];try{for(var f=e(s),h=f.next();!h.done;h=f.next()){var p,g,y,v,m,b,O=n(h.value),k=O[0],M=O.slice(1),_=this.transformers[k];_&&(g=(p=this.options).x,y=p.y,v=p.width,m=p.height,w(b=_(r([],n(M),!1),g,y,v,m))?l.push(b):(l.length&&(i(this.createMatrixTransform(l,t)),l.splice(0,l.length)),i(c(b)||d,"parallel"!==k)))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}return l.length&&i(this.createMatrixTransform(l,t)),x.apply(void 0,r([],n(u),!1))},Ut.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,s,c,l,u,f,h,d,p=y();return e&&t.reverse(),t.forEach((function(t){return v(p,p,t)})),e&&(e=t=p,(d=new g(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],h=d*(l=(e=e[8])*o-a*c)+n*(u=-e*i+a*s)+r*(f=c*i-o*s))&&(t[0]=l*(h=1/h),t[1]=(-e*n+r*c)*h,t[2]=(a*n-r*o)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-a*d+r*i)*h,t[6]=f*h,t[7]=(-c*d+n*s)*h,t[8]=(o*d-n*i)*h),function(t){var e,n,r,i,o;return t=[t[0],t[1],1],r=p,i=(n=e=t)[0],o=n[1],n=n[2],e[0]=i*r[0]+o*r[3]+n*r[6],e[1]=i*r[1]+o*r[4]+n*r[7],e[2]=i*r[2]+o*r[5]+n*r[8],[t[0],t[1]]}},N=Ut,Xt.prototype.update=function(t){this.options=h({},this.options,t),this.recoordinate()},Xt.prototype.clone=function(){return new Xt(this.options)},Xt.prototype.getOptions=function(){return this.options},Xt.prototype.clear=function(){this.update({transformations:[]})},Xt.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},Xt.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y,r=t.z;return[(2*e+t.width)/2,(2*n+t.height)/2,(2*r+t.depth)/2]},Xt.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.options.transformations;return this.update({transformations:r(r([],n(i),!1),[r([],n(t),!1)],!1)}),this},Xt.prototype.map=function(t){return this.output(t)},Xt.prototype.invert=function(t){return this.input(t)},Xt.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Xt.prototype.compose=function(t){function i(t,e){var i;u.push((e=void 0===e||e)?(i=t,function(t){for(var e=[],o=0;o<t.length-1;o+=3){var a=[t[o],t[o+1],t[o+2]];a=i(a),e.push.apply(e,r([],n(a),!1))}return e}):t)}var o,a,s=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,c=t?function(t){return t.untransform}:function(t){return t.transform},l=[],u=[];try{for(var f=e(s),h=f.next();!h.done;h=f.next()){var p,g,y,v,m,b,O,k,M=n(h.value),_=M[0],E=M.slice(1),S=this.transformers[_];S&&(g=(p=this.options).x,y=p.y,v=p.z,m=p.width,b=p.height,O=p.depth,w(k=S(r([],n(E),!1),g,y,v,m,b,O))?l.push(k):(l.length&&(i(this.createMatrixTransform(l,t)),l.splice(0,l.length)),i(c(k)||d,!0)))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}return l.length&&i(this.createMatrixTransform(l,t)),x.apply(void 0,r([],n(u),!1))},Xt.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,s,c,l,u,f,h,d,p,y,v,x,w,O,k,M,_,E,S,A,j,T,P,C,R=m();return e&&t.reverse(),t.forEach((function(t){return b(R,R,t)})),e&&(e=t=R,(C=new g(16))[0]=e[0],C[1]=e[1],C[2]=e[2],C[3]=e[3],C[4]=e[4],C[5]=e[5],C[6]=e[6],C[7]=e[7],C[8]=e[8],C[9]=e[9],C[10]=e[10],C[11]=e[11],C[12]=e[12],C[13]=e[13],C[14]=e[14],C[15]=e[15],C=(e=C)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],l=e[8],u=e[9],f=e[10],h=e[11],d=e[12],p=e[13],y=e[14],P=(v=C*a-n*o)*(T=f*(e=e[15])-h*y)-(x=C*s-r*o)*(j=u*e-h*p)+(w=C*c-i*o)*(A=u*y-f*p)+(O=n*s-r*a)*(S=l*e-h*d)-(k=n*c-i*a)*(E=l*y-f*d)+(M=r*c-i*s)*(_=l*p-u*d))&&(t[0]=(a*T-s*j+c*A)*(P=1/P),t[1]=(r*j-n*T-i*A)*P,t[2]=(p*M-y*k+e*O)*P,t[3]=(f*k-u*M-h*O)*P,t[4]=(s*S-o*T-c*E)*P,t[5]=(C*T-r*S+i*E)*P,t[6]=(y*w-d*M-e*x)*P,t[7]=(l*M-f*w+h*x)*P,t[8]=(o*j-a*S+c*_)*P,t[9]=(n*S-C*j-i*_)*P,t[10]=(d*k-p*w+e*v)*P,t[11]=(u*w-l*k-h*v)*P,t[12]=(a*E-o*A-s*_)*P,t[13]=(C*A-n*E+r*_)*P,t[14]=(p*x-d*O-y*v)*P,t[15]=(l*O-u*x+f*v)*P),function(t){var e,n,r,i,o,a;return t=[t[0],t[1],t[2],1],r=R,i=(n=e=t)[0],o=n[1],a=n[2],n=n[3],e[0]=r[0]*i+r[4]*o+r[8]*a+r[12]*n,e[1]=r[1]*i+r[5]*o+r[9]*a+r[13]*n,e[2]=r[2]*i+r[6]*o+r[10]*a+r[14]*n,e[3]=r[3]*i+r[7]*o+r[11]*a+r[15]*n,[t[0],t[1],t[2]]}},xt=Xt,t.Coordinate=N,t.Coordinate3D=xt,Object.defineProperty(t,"__esModule",{value:!0})}(e)},61821:function(t){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},7945:function(t,e,n){var r=n(61821),i=n(95657),o=Object.hasOwnProperty,a=Object.create(null);for(var s in r)o.call(r,s)&&(a[r[s]]=s);var c=t.exports={to:{},get:{}};function l(t,e,n){return Math.min(Math.max(e,t),n)}function u(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}c.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=c.get.hsl(t),n="hsl";break;case"hwb":e=c.get.hwb(t),n="hwb";break;default:e=c.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},c.get.rgb=function(t){if(!t)return null;var e,n,i,a=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=e[2],e=e[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(e.slice(s,s+2),16)}i&&(a[3]=parseInt(i,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(i=(e=e[1])[3],n=0;n<3;n++)a[n]=parseInt(e[n]+e[n],16);i&&(a[3]=parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(e[n+1],0);e[4]&&(e[5]?a[3]=.01*parseFloat(e[4]):a[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:o.call(r,e[1])?((a=r[e[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?a[3]=.01*parseFloat(e[4]):a[3]=parseFloat(e[4]))}for(n=0;n<3;n++)a[n]=l(a[n],0,255);return a[3]=l(a[3],0,1),a},c.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var t=i(arguments);return"#"+u(t[0])+u(t[1])+u(t[2])+(t[3]<1?u(Math.round(255*t[3])):"")},c.to.rgb=function(){var t=i(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},c.to.rgb.percent=function(){var t=i(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},c.to.hsl=function(){var t=i(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},c.to.hwb=function(){var t=i(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},c.to.keyword=function(t){return a[t.slice(0,3)]}},60413:function(t){"use strict";var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),c=n?n+e:e;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],s]:t._events[c].push(s):(t._events[c]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var c,l,u=this._events[s],f=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),f){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,r),!0;case 4:return u.fn.call(u.context,e,r,i),!0;case 5:return u.fn.call(u.context,e,r,i,o),!0;case 6:return u.fn.call(u.context,e,r,i,o,a),!0}for(l=1,c=new Array(f-1);l<f;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var h,d=u.length;for(l=0;l<d;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),f){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,r);break;case 4:u[l].fn.call(u[l].context,e,r,i);break;default:if(!c)for(h=1,c=new Array(f-1);h<f;h++)c[h-1]=arguments[h];u[l].fn.apply(u[l].context,c)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==e||i&&!s[c].once||r&&s[c].context!==r)&&l.push(s[c]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s},17592:function(t){t.exports=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},39378:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",c=16,l=32,u=64,f=128,h=256,d=1/0,p=9007199254740991,g=NaN,y=4294967295,v=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",l],["partialRight",u],["rearg",h]],m="[object Arguments]",b="[object Array]",x="[object Boolean]",w="[object Date]",O="[object Error]",k="[object Function]",M="[object GeneratorFunction]",_="[object Map]",E="[object Number]",S="[object Object]",A="[object Promise]",j="[object RegExp]",T="[object Set]",P="[object String]",C="[object Symbol]",R="[object WeakMap]",L="[object ArrayBuffer]",N="[object DataView]",I="[object Float32Array]",D="[object Float64Array]",B="[object Int8Array]",F="[object Int16Array]",z="[object Int32Array]",Z="[object Uint8Array]",W="[object Uint8ClampedArray]",$="[object Uint16Array]",G="[object Uint32Array]",q=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,X=RegExp(V.source),K=RegExp(U.source),Q=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),at=/^\s+/,st=/\s/,ct=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,yt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ot=/($^)/,kt=/['\n\r\u2028\u2029\\]/g,Mt="\\ud800-\\udfff",_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",jt="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pt="['’]",Ct="["+Mt+"]",Rt="["+Tt+"]",Lt="["+_t+"]",Nt="\\d+",It="["+Et+"]",Dt="["+St+"]",Bt="[^"+Mt+Tt+Nt+Et+St+At+"]",Ft="\\ud83c[\\udffb-\\udfff]",zt="[^"+Mt+"]",Zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Wt="[\\ud800-\\udbff][\\udc00-\\udfff]",$t="["+At+"]",Gt="\\u200d",qt="(?:"+Dt+"|"+Bt+")",Yt="(?:"+$t+"|"+Bt+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Lt+"|"+Ft+")"+"?",Xt="["+jt+"]?",Kt=Xt+Ut+("(?:"+Gt+"(?:"+[zt,Zt,Wt].join("|")+")"+Xt+Ut+")*"),Qt="(?:"+[It,Zt,Wt].join("|")+")"+Kt,Jt="(?:"+[zt+Lt+"?",Lt,Zt,Wt,Ct].join("|")+")",te=RegExp(Pt,"g"),ee=RegExp(Lt,"g"),ne=RegExp(Ft+"(?="+Ft+")|"+Jt+Kt,"g"),re=RegExp([$t+"?"+Dt+"+"+Ht+"(?="+[Rt,$t,"$"].join("|")+")",Yt+"+"+Vt+"(?="+[Rt,$t+qt,"$"].join("|")+")",$t+"?"+qt+"+"+Ht,$t+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,Qt].join("|"),"g"),ie=RegExp("["+Gt+Mt+_t+jt+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],se=-1,ce={};ce[I]=ce[D]=ce[B]=ce[F]=ce[z]=ce[Z]=ce[W]=ce[$]=ce[G]=!0,ce[m]=ce[b]=ce[L]=ce[x]=ce[N]=ce[w]=ce[O]=ce[k]=ce[_]=ce[E]=ce[S]=ce[j]=ce[T]=ce[P]=ce[R]=!1;var le={};le[m]=le[b]=le[L]=le[N]=le[x]=le[w]=le[I]=le[D]=le[B]=le[F]=le[z]=le[_]=le[E]=le[S]=le[j]=le[T]=le[P]=le[C]=le[Z]=le[W]=le[$]=le[G]=!0,le[O]=le[k]=le[R]=!1;var ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fe=parseFloat,he=parseInt,de="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pe="object"==typeof self&&self&&self.Object===Object&&self,ge=de||pe||Function("return this")(),ye=e&&!e.nodeType&&e,ve=ye&&t&&!t.nodeType&&t,me=ve&&ve.exports===ye,be=me&&de.process,xe=function(){try{var t=ve&&ve.require&&ve.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),we=xe&&xe.isArrayBuffer,Oe=xe&&xe.isDate,ke=xe&&xe.isMap,Me=xe&&xe.isRegExp,_e=xe&&xe.isSet,Ee=xe&&xe.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function je(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Pe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ce(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Re(t,e){return!!(null==t?0:t.length)&&$e(t,e,0)>-1}function Le(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ne(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Ie(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function De(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Be(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ze=He("length");function Ze(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function We(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function $e(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):We(t,qe,n)}function Ge(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function qe(t){return t!=t}function Ye(t,e){var n=null==t?0:t.length;return n?Xe(t,e)/n:g}function He(t){return function(e){return null==e?i:e[t]}}function Ve(t){return function(e){return null==t?i:t[e]}}function Ue(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Xe(t,e){for(var n,r=-1,o=t.length;++r<o;){var a=e(t[r]);a!==i&&(n=n===i?a:n+a)}return n}function Ke(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Qe(t){return t?t.slice(0,vn(t)+1).replace(at,""):t}function Je(t){return function(e){return t(e)}}function tn(t,e){return Ne(e,(function(e){return t[e]}))}function en(t,e){return t.has(e)}function nn(t,e){for(var n=-1,r=t.length;++n<r&&$e(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length;n--&&$e(e,t[n],0)>-1;);return n}function on(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var an=Ve({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),sn=Ve({"&":"&","<":"<",">":">",'"':""","'":"'"});function cn(t){return"\\"+ue[t]}function ln(t){return ie.test(t)}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function fn(t,e){return function(n){return t(e(n))}}function hn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function dn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function gn(t){return ln(t)?function(t){var e=ne.lastIndex=0;for(;ne.test(t);)++e;return e}(t):ze(t)}function yn(t){return ln(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function vn(t){for(var e=t.length;e--&&st.test(t.charAt(e)););return e}var mn=Ve({"&":"&","<":"<",">":">",""":'"',"'":"'"});var bn=function t(e){var n,r=(e=null==e?ge:bn.defaults(ge.Object(),e,bn.pick(ge,ae))).Array,st=e.Date,Mt=e.Error,_t=e.Function,Et=e.Math,St=e.Object,At=e.RegExp,jt=e.String,Tt=e.TypeError,Pt=r.prototype,Ct=_t.prototype,Rt=St.prototype,Lt=e["__core-js_shared__"],Nt=Ct.toString,It=Rt.hasOwnProperty,Dt=0,Bt=(n=/[^.]+$/.exec(Lt&&Lt.keys&&Lt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ft=Rt.toString,zt=Nt.call(St),Zt=ge._,Wt=At("^"+Nt.call(It).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=me?e.Buffer:i,Gt=e.Symbol,qt=e.Uint8Array,Yt=$t?$t.allocUnsafe:i,Ht=fn(St.getPrototypeOf,St),Vt=St.create,Ut=Rt.propertyIsEnumerable,Xt=Pt.splice,Kt=Gt?Gt.isConcatSpreadable:i,Qt=Gt?Gt.iterator:i,Jt=Gt?Gt.toStringTag:i,ne=function(){try{var t=po(St,"defineProperty");return t({},"",{}),t}catch(t){}}(),ie=e.clearTimeout!==ge.clearTimeout&&e.clearTimeout,ue=st&&st.now!==ge.Date.now&&st.now,de=e.setTimeout!==ge.setTimeout&&e.setTimeout,pe=Et.ceil,ye=Et.floor,ve=St.getOwnPropertySymbols,be=$t?$t.isBuffer:i,xe=e.isFinite,ze=Pt.join,Ve=fn(St.keys,St),xn=Et.max,wn=Et.min,On=st.now,kn=e.parseInt,Mn=Et.random,_n=Pt.reverse,En=po(e,"DataView"),Sn=po(e,"Map"),An=po(e,"Promise"),jn=po(e,"Set"),Tn=po(e,"WeakMap"),Pn=po(St,"create"),Cn=Tn&&new Tn,Rn={},Ln=Zo(En),Nn=Zo(Sn),In=Zo(An),Dn=Zo(jn),Bn=Zo(Tn),Fn=Gt?Gt.prototype:i,zn=Fn?Fn.valueOf:i,Zn=Fn?Fn.toString:i;function Wn(t){if(is(t)&&!Ha(t)&&!(t instanceof Yn)){if(t instanceof qn)return t;if(It.call(t,"__wrapped__"))return Wo(t)}return new qn(t)}var $n=function(){function t(){}return function(e){if(!rs(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Gn(){}function qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Yn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Xn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Un;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Vn(t);this.size=e.size}function Qn(t,e){var n=Ha(t),r=!n&&Ya(t),i=!n&&!r&&Ka(t),o=!n&&!r&&!i&&hs(t),a=n||r||i||o,s=a?Ke(t.length,jt):[],c=s.length;for(var l in t)!e&&!It.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||wo(l,c))||s.push(l);return s}function Jn(t){var e=t.length;return e?t[Xr(0,e-1)]:i}function tr(t,e){return Bo(Pi(t),lr(e,0,t.length))}function er(t){return Bo(Pi(t))}function nr(t,e,n){(n!==i&&!$a(t[e],n)||n===i&&!(e in t))&&sr(t,e,n)}function rr(t,e,n){var r=t[e];It.call(t,e)&&$a(r,n)&&(n!==i||e in t)||sr(t,e,n)}function ir(t,e){for(var n=t.length;n--;)if($a(t[n][0],e))return n;return-1}function or(t,e,n,r){return pr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function ar(t,e){return t&&Ci(e,Ls(e),t)}function sr(t,e,n){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function cr(t,e){for(var n=-1,o=e.length,a=r(o),s=null==t;++n<o;)a[n]=s?i:js(t,e[n]);return a}function lr(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function ur(t,e,n,r,o,a){var s,c=1&e,l=2&e,u=4&e;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!rs(t))return t;var f=Ha(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&It.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!c)return Pi(t,s)}else{var h=vo(t),d=h==k||h==M;if(Ka(t))return _i(t,c);if(h==S||h==m||d&&!o){if(s=l||d?{}:bo(t),!c)return l?function(t,e){return Ci(t,yo(t),e)}(t,function(t,e){return t&&Ci(e,Ns(e),t)}(s,t)):function(t,e){return Ci(t,go(t),e)}(t,ar(s,t))}else{if(!le[h])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case L:return Ei(t);case x:case w:return new r(+t);case N:return function(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case I:case D:case B:case F:case z:case Z:case W:case $:case G:return Si(t,n);case _:return new r;case E:case P:return new r(t);case j:return function(t){var e=new t.constructor(t.source,gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new r;case C:return i=t,zn?St(zn.call(i)):{}}var i}(t,h,c)}}a||(a=new Kn);var p=a.get(t);if(p)return p;a.set(t,s),ls(t)?t.forEach((function(r){s.add(ur(r,e,n,r,t,a))})):os(t)&&t.forEach((function(r,i){s.set(i,ur(r,e,n,i,t,a))}));var g=f?i:(u?l?ao:oo:l?Ns:Ls)(t);return je(g||t,(function(r,i){g&&(r=t[i=r]),rr(s,i,ur(r,e,n,i,t,a))})),s}function fr(t,e,n){var r=n.length;if(null==t)return!r;for(t=St(t);r--;){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function hr(t,e,n){if("function"!=typeof t)throw new Tt(o);return Lo((function(){t.apply(i,n)}),e)}function dr(t,e,n,r){var i=-1,o=Re,a=!0,s=t.length,c=[],l=e.length;if(!s)return c;n&&(e=Ne(e,Je(n))),r?(o=Le,a=!1):e.length>=200&&(o=en,a=!1,e=new Xn(e));t:for(;++i<s;){var u=t[i],f=null==n?u:n(u);if(u=r||0!==u?u:0,a&&f==f){for(var h=l;h--;)if(e[h]===f)continue t;c.push(u)}else o(e,f,r)||c.push(u)}return c}Wn.templateSettings={escape:Q,evaluate:J,interpolate:tt,variable:"",imports:{_:Wn}},Wn.prototype=Gn.prototype,Wn.prototype.constructor=Wn,qn.prototype=$n(Gn.prototype),qn.prototype.constructor=qn,Yn.prototype=$n(Gn.prototype),Yn.prototype.constructor=Yn,Hn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Hn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn.prototype.get=function(t){var e=this.__data__;if(Pn){var n=e[t];return n===a?i:n}return It.call(e,t)?e[t]:i},Hn.prototype.has=function(t){var e=this.__data__;return Pn?e[t]!==i:It.call(e,t)},Hn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Pn&&e===i?a:e,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=ir(e,t);return!(n<0)&&(n==e.length-1?e.pop():Xt.call(e,n,1),--this.size,!0)},Vn.prototype.get=function(t){var e=this.__data__,n=ir(e,t);return n<0?i:e[n][1]},Vn.prototype.has=function(t){return ir(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Un.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Sn||Vn),string:new Hn}},Un.prototype.delete=function(t){var e=fo(this,t).delete(t);return this.size-=e?1:0,e},Un.prototype.get=function(t){return fo(this,t).get(t)},Un.prototype.has=function(t){return fo(this,t).has(t)},Un.prototype.set=function(t,e){var n=fo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Xn.prototype.add=Xn.prototype.push=function(t){return this.__data__.set(t,a),this},Xn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Un(r)}return n.set(t,e),this.size=n.size,this};var pr=Ni(Or),gr=Ni(kr,!0);function yr(t,e){var n=!0;return pr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function vr(t,e,n){for(var r=-1,o=t.length;++r<o;){var a=t[r],s=e(a);if(null!=s&&(c===i?s==s&&!fs(s):n(s,c)))var c=s,l=a}return l}function mr(t,e){var n=[];return pr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function br(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?br(s,e-1,n,r,i):Ie(i,s):r||(i[i.length]=s)}return i}var xr=Ii(),wr=Ii(!0);function Or(t,e){return t&&xr(t,e,Ls)}function kr(t,e){return t&&wr(t,e,Ls)}function Mr(t,e){return Ce(e,(function(e){return ts(t[e])}))}function _r(t,e){for(var n=0,r=(e=wi(e,t)).length;null!=t&&n<r;)t=t[zo(e[n++])];return n&&n==r?t:i}function Er(t,e,n){var r=e(t);return Ha(t)?r:Ie(r,n(t))}function Sr(t){return null==t?t===i?"[object Undefined]":"[object Null]":Jt&&Jt in St(t)?function(t){var e=It.call(t,Jt),n=t[Jt];try{t[Jt]=i;var r=!0}catch(t){}var o=Ft.call(t);r&&(e?t[Jt]=n:delete t[Jt]);return o}(t):function(t){return Ft.call(t)}(t)}function Ar(t,e){return t>e}function jr(t,e){return null!=t&&It.call(t,e)}function Tr(t,e){return null!=t&&e in St(t)}function Pr(t,e,n){for(var o=n?Le:Re,a=t[0].length,s=t.length,c=s,l=r(s),u=1/0,f=[];c--;){var h=t[c];c&&e&&(h=Ne(h,Je(e))),u=wn(h.length,u),l[c]=!n&&(e||a>=120&&h.length>=120)?new Xn(c&&h):i}h=t[0];var d=-1,p=l[0];t:for(;++d<a&&f.length<u;){var g=h[d],y=e?e(g):g;if(g=n||0!==g?g:0,!(p?en(p,y):o(f,y,n))){for(c=s;--c;){var v=l[c];if(!(v?en(v,y):o(t[c],y,n)))continue t}p&&p.push(y),f.push(g)}}return f}function Cr(t,e,n){var r=null==(t=To(t,e=wi(e,t)))?t:t[zo(Jo(e))];return null==r?i:Se(r,t,n)}function Rr(t){return is(t)&&Sr(t)==m}function Lr(t,e,n,r,o){return t===e||(null==t||null==e||!is(t)&&!is(e)?t!=t&&e!=e:function(t,e,n,r,o,a){var s=Ha(t),c=Ha(e),l=s?b:vo(t),u=c?b:vo(e),f=(l=l==m?S:l)==S,h=(u=u==m?S:u)==S,d=l==u;if(d&&Ka(t)){if(!Ka(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Kn),s||hs(t)?ro(t,e,n,r,o,a):function(t,e,n,r,i,o,a){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case L:return!(t.byteLength!=e.byteLength||!o(new qt(t),new qt(e)));case x:case w:case E:return $a(+t,+e);case O:return t.name==e.name&&t.message==e.message;case j:case P:return t==e+"";case _:var s=un;case T:var c=1&r;if(s||(s=dn),t.size!=e.size&&!c)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var u=ro(s(t),s(e),r,i,o,a);return a.delete(t),u;case C:if(zn)return zn.call(t)==zn.call(e)}return!1}(t,e,l,n,r,o,a);if(!(1&n)){var p=f&&It.call(t,"__wrapped__"),g=h&&It.call(e,"__wrapped__");if(p||g){var y=p?t.value():t,v=g?e.value():e;return a||(a=new Kn),o(y,v,n,r,a)}}if(!d)return!1;return a||(a=new Kn),function(t,e,n,r,o,a){var s=1&n,c=oo(t),l=c.length,u=oo(e),f=u.length;if(l!=f&&!s)return!1;var h=l;for(;h--;){var d=c[h];if(!(s?d in e:It.call(e,d)))return!1}var p=a.get(t),g=a.get(e);if(p&&g)return p==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);var v=s;for(;++h<l;){var m=t[d=c[h]],b=e[d];if(r)var x=s?r(b,m,d,e,t,a):r(m,b,d,t,e,a);if(!(x===i?m===b||o(m,b,n,r,a):x)){y=!1;break}v||(v="constructor"==d)}if(y&&!v){var w=t.constructor,O=e.constructor;w==O||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof O&&O instanceof O||(y=!1)}return a.delete(t),a.delete(e),y}(t,e,n,r,o,a)}(t,e,n,r,Lr,o))}function Nr(t,e,n,r){var o=n.length,a=o,s=!r;if(null==t)return!a;for(t=St(t);o--;){var c=n[o];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<a;){var l=(c=n[o])[0],u=t[l],f=c[1];if(s&&c[2]){if(u===i&&!(l in t))return!1}else{var h=new Kn;if(r)var d=r(u,f,l,t,e,h);if(!(d===i?Lr(f,u,3,r,h):d))return!1}}return!0}function Ir(t){return!(!rs(t)||(e=t,Bt&&Bt in e))&&(ts(t)?Wt:mt).test(Zo(t));var e}function Dr(t){return"function"==typeof t?t:null==t?ac:"object"==typeof t?Ha(t)?$r(t[0],t[1]):Wr(t):gc(t)}function Br(t){if(!Eo(t))return Ve(t);var e=[];for(var n in St(t))It.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Fr(t){if(!rs(t))return function(t){var e=[];if(null!=t)for(var n in St(t))e.push(n);return e}(t);var e=Eo(t),n=[];for(var r in t)("constructor"!=r||!e&&It.call(t,r))&&n.push(r);return n}function zr(t,e){return t<e}function Zr(t,e){var n=-1,i=Ua(t)?r(t.length):[];return pr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Wr(t){var e=ho(t);return 1==e.length&&e[0][2]?Ao(e[0][0],e[0][1]):function(n){return n===t||Nr(n,t,e)}}function $r(t,e){return ko(t)&&So(e)?Ao(zo(t),e):function(n){var r=js(n,t);return r===i&&r===e?Ts(n,t):Lr(e,r,3)}}function Gr(t,e,n,r,o){t!==e&&xr(e,(function(a,s){if(o||(o=new Kn),rs(a))!function(t,e,n,r,o,a,s){var c=Co(t,n),l=Co(e,n),u=s.get(l);if(u)return void nr(t,n,u);var f=a?a(c,l,n+"",t,e,s):i,h=f===i;if(h){var d=Ha(l),p=!d&&Ka(l),g=!d&&!p&&hs(l);f=l,d||p||g?Ha(c)?f=c:Xa(c)?f=Pi(c):p?(h=!1,f=_i(l,!0)):g?(h=!1,f=Si(l,!0)):f=[]:ss(l)||Ya(l)?(f=c,Ya(c)?f=xs(c):rs(c)&&!ts(c)||(f=bo(l))):h=!1}h&&(s.set(l,f),o(f,l,r,a,s),s.delete(l));nr(t,n,f)}(t,e,s,n,Gr,r,o);else{var c=r?r(Co(t,s),a,s+"",t,e,o):i;c===i&&(c=a),nr(t,s,c)}}),Ns)}function qr(t,e){var n=t.length;if(n)return wo(e+=e<0?n:0,n)?t[e]:i}function Yr(t,e,n){e=e.length?Ne(e,(function(t){return Ha(t)?function(e){return _r(e,1===t.length?t[0]:t)}:t})):[ac];var r=-1;e=Ne(e,Je(uo()));var i=Zr(t,(function(t,n,i){var o=Ne(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var c=Ai(i[r],o[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Hr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=_r(t,a);n(s,a)&&ei(o,wi(a,t),s)}return o}function Vr(t,e,n,r){var i=r?Ge:$e,o=-1,a=e.length,s=t;for(t===e&&(e=Pi(e)),n&&(s=Ne(t,Je(n)));++o<a;)for(var c=0,l=e[o],u=n?n(l):l;(c=i(s,u,c,r))>-1;)s!==t&&Xt.call(s,c,1),Xt.call(t,c,1);return t}function Ur(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;wo(i)?Xt.call(t,i,1):di(t,i)}}return t}function Xr(t,e){return t+ye(Mn()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>p)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Qr(t,e){return No(jo(t,e,ac),t+"")}function Jr(t){return Jn($s(t))}function ti(t,e){var n=$s(t);return Bo(n,lr(e,0,n.length))}function ei(t,e,n,r){if(!rs(t))return t;for(var o=-1,a=(e=wi(e,t)).length,s=a-1,c=t;null!=c&&++o<a;){var l=zo(e[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(o!=s){var f=c[l];(u=r?r(f,l,c):i)===i&&(u=rs(f)?f:wo(e[o+1])?[]:{})}rr(c,l,u),c=c[l]}return t}var ni=Cn?function(t,e){return Cn.set(t,e),t}:ac,ri=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:rc(e),writable:!0})}:ac;function ii(t){return Bo($s(t))}function oi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function ai(t,e){var n;return pr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function si(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!fs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ci(t,e,ac,n)}function ci(t,e,n,r){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,c=null===e,l=fs(e),u=e===i;o<a;){var f=ye((o+a)/2),h=n(t[f]),d=h!==i,p=null===h,g=h==h,y=fs(h);if(s)var v=r||g;else v=u?g&&(r||d):c?g&&d&&(r||!p):l?g&&d&&!p&&(r||!y):!p&&!y&&(r?h<=e:h<e);v?o=f+1:a=f}return wn(a,4294967294)}function li(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!$a(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function ui(t){return"number"==typeof t?t:fs(t)?g:+t}function fi(t){if("string"==typeof t)return t;if(Ha(t))return Ne(t,fi)+"";if(fs(t))return Zn?Zn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function hi(t,e,n){var r=-1,i=Re,o=t.length,a=!0,s=[],c=s;if(n)a=!1,i=Le;else if(o>=200){var l=e?null:Ki(t);if(l)return dn(l);a=!1,i=en,c=new Xn}else c=e?[]:s;t:for(;++r<o;){var u=t[r],f=e?e(u):u;if(u=n||0!==u?u:0,a&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),s.push(u)}else i(c,f,n)||(c!==s&&c.push(f),s.push(u))}return s}function di(t,e){return null==(t=To(t,e=wi(e,t)))||delete t[zo(Jo(e))]}function pi(t,e,n,r){return ei(t,e,n(_r(t,e)),r)}function gi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?oi(t,r?0:o,r?o+1:i):oi(t,r?o+1:0,r?i:o)}function yi(t,e){var n=t;return n instanceof Yn&&(n=n.value()),De(e,(function(t,e){return e.func.apply(e.thisArg,Ie([t],e.args))}),n)}function vi(t,e,n){var i=t.length;if(i<2)return i?hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=dr(a[o]||s,t[c],e,n));return hi(br(a,1),e,n)}function mi(t,e,n){for(var r=-1,o=t.length,a=e.length,s={};++r<o;){var c=r<a?e[r]:i;n(s,t[r],c)}return s}function bi(t){return Xa(t)?t:[]}function xi(t){return"function"==typeof t?t:ac}function wi(t,e){return Ha(t)?t:ko(t,e)?[t]:Fo(ws(t))}var Oi=Qr;function ki(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:oi(t,e,n)}var Mi=ie||function(t){return ge.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var n=t.length,r=Yt?Yt(n):new t.constructor(n);return t.copy(r),r}function Ei(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Si(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ai(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=fs(t),s=e!==i,c=null===e,l=e==e,u=fs(e);if(!c&&!u&&!a&&t>e||a&&s&&l&&!c&&!u||r&&s&&l||!n&&l||!o)return 1;if(!r&&!a&&!u&&t<e||u&&n&&o&&!r&&!a||c&&n&&o||!s&&o||!l)return-1}return 0}function ji(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,l=e.length,u=xn(a-s,0),f=r(l+u),h=!i;++c<l;)f[c]=e[c];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;u--;)f[c++]=t[o++];return f}function Ti(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,l=-1,u=e.length,f=xn(a-c,0),h=r(f+u),d=!i;++o<f;)h[o]=t[o];for(var p=o;++l<u;)h[p+l]=e[l];for(;++s<c;)(d||o<a)&&(h[p+n[s]]=t[o++]);return h}function Pi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ci(t,e,n,r){var o=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],l=r?r(n[c],t[c],c,n,t):i;l===i&&(l=t[c]),o?sr(n,c,l):rr(n,c,l)}return n}function Ri(t,e){return function(n,r){var i=Ha(n)?Ae:or,o=e?e():{};return i(n,t,uo(r,2),o)}}function Li(t){return Qr((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,s&&Oo(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=St(e);++r<o;){var c=n[r];c&&t(e,c,r,a)}return e}))}function Ni(t,e){return function(n,r){if(null==n)return n;if(!Ua(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=St(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ii(t){return function(e,n,r){for(var i=-1,o=St(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function Di(t){return function(e){var n=ln(e=ws(e))?yn(e):i,r=n?n[0]:e.charAt(0),o=n?ki(n,1).join(""):e.slice(1);return r[t]()+o}}function Bi(t){return function(e){return De(tc(Ys(e).replace(te,"")),t,"")}}function Fi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=$n(t.prototype),r=t.apply(n,e);return rs(r)?r:n}}function zi(t){return function(e,n,r){var o=St(e);if(!Ua(e)){var a=uo(n,3);e=Ls(e),n=function(t){return a(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[a?e[s]:s]:i}}function Zi(t){return io((function(e){var n=e.length,r=n,a=qn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Tt(o);if(a&&!c&&"wrapper"==co(s))var c=new qn([],!0)}for(r=c?r:n;++r<n;){var l=co(s=e[r]),u="wrapper"==l?so(s):i;c=u&&Mo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[co(u[0])].apply(c,u[3]):1==s.length&&Mo(s)?c[l]():c.thru(s)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Ha(r))return c.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Wi(t,e,n,o,a,s,c,l,u,h){var d=e&f,p=1&e,g=2&e,y=24&e,v=512&e,m=g?i:Fi(t);return function i(){for(var f=arguments.length,b=r(f),x=f;x--;)b[x]=arguments[x];if(y)var w=lo(i),O=on(b,w);if(o&&(b=ji(b,o,a,y)),s&&(b=Ti(b,s,c,y)),f-=O,y&&f<h){var k=hn(b,w);return Ui(t,e,Wi,i.placeholder,n,b,k,l,u,h-f)}var M=p?n:this,_=g?M[t]:t;return f=b.length,l?b=Po(b,l):v&&f>1&&b.reverse(),d&&u<f&&(b.length=u),this&&this!==ge&&this instanceof i&&(_=m||Fi(_)),_.apply(M,b)}}function $i(t,e){return function(n,r){return function(t,e,n,r){return Or(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Gi(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=fi(n),r=fi(r)):(n=ui(n),r=ui(r)),o=t(n,r)}return o}}function qi(t){return io((function(e){return e=Ne(e,Je(uo())),Qr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Yi(t,e){var n=(e=e===i?" ":fi(e)).length;if(n<2)return n?Kr(e,t):e;var r=Kr(e,pe(t/gn(e)));return ln(e)?ki(yn(r),0,t).join(""):r.slice(0,t)}function Hi(t){return function(e,n,o){return o&&"number"!=typeof o&&Oo(e,n,o)&&(n=o=i),e=ys(e),n===i?(n=e,e=0):n=ys(n),function(t,e,n,i){for(var o=-1,a=xn(pe((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,o=o===i?e<n?1:-1:ys(o),t)}}function Vi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=bs(e),n=bs(n)),t(e,n)}}function Ui(t,e,n,r,o,a,s,c,f,h){var d=8&e;e|=d?l:u,4&(e&=~(d?u:l))||(e&=-4);var p=[t,e,o,d?a:i,d?s:i,d?i:a,d?i:s,c,f,h],g=n.apply(i,p);return Mo(t)&&Ro(g,p),g.placeholder=r,Io(g,t,e)}function Xi(t){var e=Et[t];return function(t,n){if(t=bs(t),(n=null==n?0:wn(vs(n),292))&&xe(t)){var r=(ws(t)+"e").split("e");return+((r=(ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ki=jn&&1/dn(new jn([,-0]))[1]==d?function(t){return new jn(t)}:fc;function Qi(t){return function(e){var n=vo(e);return n==_?un(e):n==T?pn(e):function(t,e){return Ne(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ji(t,e,n,a,d,p,g,y){var v=2&e;if(!v&&"function"!=typeof t)throw new Tt(o);var m=a?a.length:0;if(m||(e&=-97,a=d=i),g=g===i?g:xn(vs(g),0),y=y===i?y:vs(y),m-=d?d.length:0,e&u){var b=a,x=d;a=d=i}var w=v?i:so(t),O=[t,e,n,a,d,b,x,p,g,y];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var c=e[3];if(c){var l=t[3];t[3]=l?ji(l,c,e[4]):c,t[4]=l?hn(t[3],s):e[4]}(c=e[5])&&(l=t[5],t[5]=l?Ti(l,c,e[6]):c,t[6]=l?hn(t[5],s):e[6]);(c=e[7])&&(t[7]=c);r&f&&(t[8]=null==t[8]?e[8]:wn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(O,w),t=O[0],e=O[1],n=O[2],a=O[3],d=O[4],!(y=O[9]=O[9]===i?v?0:t.length:xn(O[9]-m,0))&&24&e&&(e&=-25),e&&1!=e)k=8==e||e==c?function(t,e,n){var o=Fi(t);return function a(){for(var s=arguments.length,c=r(s),l=s,u=lo(a);l--;)c[l]=arguments[l];var f=s<3&&c[0]!==u&&c[s-1]!==u?[]:hn(c,u);return(s-=f.length)<n?Ui(t,e,Wi,a.placeholder,i,c,f,i,i,n-s):Se(this&&this!==ge&&this instanceof a?o:t,this,c)}}(t,e,y):e!=l&&33!=e||d.length?Wi.apply(i,O):function(t,e,n,i){var o=1&e,a=Fi(t);return function e(){for(var s=-1,c=arguments.length,l=-1,u=i.length,f=r(u+c),h=this&&this!==ge&&this instanceof e?a:t;++l<u;)f[l]=i[l];for(;c--;)f[l++]=arguments[++s];return Se(h,o?n:this,f)}}(t,e,n,a);else var k=function(t,e,n){var r=1&e,i=Fi(t);return function e(){return(this&&this!==ge&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Io((w?ni:Ro)(k,O),t,e)}function to(t,e,n,r){return t===i||$a(t,Rt[n])&&!It.call(r,n)?e:t}function eo(t,e,n,r,o,a){return rs(t)&&rs(e)&&(a.set(e,t),Gr(t,e,i,eo,a),a.delete(e)),t}function no(t){return ss(t)?i:t}function ro(t,e,n,r,o,a){var s=1&n,c=t.length,l=e.length;if(c!=l&&!(s&&l>c))return!1;var u=a.get(t),f=a.get(e);if(u&&f)return u==e&&f==t;var h=-1,d=!0,p=2&n?new Xn:i;for(a.set(t,e),a.set(e,t);++h<c;){var g=t[h],y=e[h];if(r)var v=s?r(y,g,h,e,t,a):r(g,y,h,t,e,a);if(v!==i){if(v)continue;d=!1;break}if(p){if(!Fe(e,(function(t,e){if(!en(p,e)&&(g===t||o(g,t,n,r,a)))return p.push(e)}))){d=!1;break}}else if(g!==y&&!o(g,y,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function io(t){return No(jo(t,i,Vo),t+"")}function oo(t){return Er(t,Ls,go)}function ao(t){return Er(t,Ns,yo)}var so=Cn?function(t){return Cn.get(t)}:fc;function co(t){for(var e=t.name+"",n=Rn[e],r=It.call(Rn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function lo(t){return(It.call(Wn,"placeholder")?Wn:t).placeholder}function uo(){var t=Wn.iteratee||sc;return t=t===sc?Dr:t,arguments.length?t(arguments[0],arguments[1]):t}function fo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ho(t){for(var e=Ls(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,So(i)]}return e}function po(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Ir(n)?n:i}var go=ve?function(t){return null==t?[]:(t=St(t),Ce(ve(t),(function(e){return Ut.call(t,e)})))}:mc,yo=ve?function(t){for(var e=[];t;)Ie(e,go(t)),t=Ht(t);return e}:mc,vo=Sr;function mo(t,e,n){for(var r=-1,i=(e=wi(e,t)).length,o=!1;++r<i;){var a=zo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ns(i)&&wo(a,i)&&(Ha(t)||Ya(t))}function bo(t){return"function"!=typeof t.constructor||Eo(t)?{}:$n(Ht(t))}function xo(t){return Ha(t)||Ya(t)||!!(Kt&&t&&t[Kt])}function wo(t,e){var n=typeof t;return!!(e=null==e?p:e)&&("number"==n||"symbol"!=n&&xt.test(t))&&t>-1&&t%1==0&&t<e}function Oo(t,e,n){if(!rs(n))return!1;var r=typeof e;return!!("number"==r?Ua(n)&&wo(e,n.length):"string"==r&&e in n)&&$a(n[e],t)}function ko(t,e){if(Ha(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!fs(t))||(nt.test(t)||!et.test(t)||null!=e&&t in St(e))}function Mo(t){var e=co(t),n=Wn[e];if("function"!=typeof n||!(e in Yn.prototype))return!1;if(t===n)return!0;var r=so(n);return!!r&&t===r[0]}(En&&vo(new En(new ArrayBuffer(1)))!=N||Sn&&vo(new Sn)!=_||An&&vo(An.resolve())!=A||jn&&vo(new jn)!=T||Tn&&vo(new Tn)!=R)&&(vo=function(t){var e=Sr(t),n=e==S?t.constructor:i,r=n?Zo(n):"";if(r)switch(r){case Ln:return N;case Nn:return _;case In:return A;case Dn:return T;case Bn:return R}return e});var _o=Lt?ts:bc;function Eo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rt)}function So(t){return t==t&&!rs(t)}function Ao(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==i||t in St(n)))}}function jo(t,e,n){return e=xn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),Se(t,this,c)}}function To(t,e){return e.length<2?t:_r(t,oi(e,0,-1))}function Po(t,e){for(var n=t.length,r=wn(e.length,n),o=Pi(t);r--;){var a=e[r];t[r]=wo(a,n)?o[a]:i}return t}function Co(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ro=Do(ni),Lo=de||function(t,e){return ge.setTimeout(t,e)},No=Do(ri);function Io(t,e,n){var r=e+"";return No(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ct,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return je(v,(function(n){var r="_."+n[0];e&n[1]&&!Re(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ut):[]}(r),n)))}function Do(t){var e=0,n=0;return function(){var r=On(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Bo(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var a=Xr(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Fo=function(t){var e=Da(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rt,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function zo(t){if("string"==typeof t||fs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Zo(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Wo(t){if(t instanceof Yn)return t.clone();var e=new qn(t.__wrapped__,t.__chain__);return e.__actions__=Pi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var $o=Qr((function(t,e){return Xa(t)?dr(t,br(e,1,Xa,!0)):[]})),Go=Qr((function(t,e){var n=Jo(e);return Xa(n)&&(n=i),Xa(t)?dr(t,br(e,1,Xa,!0),uo(n,2)):[]})),qo=Qr((function(t,e){var n=Jo(e);return Xa(n)&&(n=i),Xa(t)?dr(t,br(e,1,Xa,!0),i,n):[]}));function Yo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=xn(r+i,0)),We(t,uo(e,3),i)}function Ho(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=vs(n),o=n<0?xn(r+o,0):wn(o,r-1)),We(t,uo(e,3),o,!0)}function Vo(t){return(null==t?0:t.length)?br(t,1):[]}function Uo(t){return t&&t.length?t[0]:i}var Xo=Qr((function(t){var e=Ne(t,bi);return e.length&&e[0]===t[0]?Pr(e):[]})),Ko=Qr((function(t){var e=Jo(t),n=Ne(t,bi);return e===Jo(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Pr(n,uo(e,2)):[]})),Qo=Qr((function(t){var e=Jo(t),n=Ne(t,bi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Pr(n,i,e):[]}));function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var ta=Qr(ea);function ea(t,e){return t&&t.length&&e&&e.length?Vr(t,e):t}var na=io((function(t,e){var n=null==t?0:t.length,r=cr(t,e);return Ur(t,Ne(e,(function(t){return wo(t,n)?+t:t})).sort(Ai)),r}));function ra(t){return null==t?t:_n.call(t)}var ia=Qr((function(t){return hi(br(t,1,Xa,!0))})),oa=Qr((function(t){var e=Jo(t);return Xa(e)&&(e=i),hi(br(t,1,Xa,!0),uo(e,2))})),aa=Qr((function(t){var e=Jo(t);return e="function"==typeof e?e:i,hi(br(t,1,Xa,!0),i,e)}));function sa(t){if(!t||!t.length)return[];var e=0;return t=Ce(t,(function(t){if(Xa(t))return e=xn(t.length,e),!0})),Ke(e,(function(e){return Ne(t,He(e))}))}function ca(t,e){if(!t||!t.length)return[];var n=sa(t);return null==e?n:Ne(n,(function(t){return Se(e,i,t)}))}var la=Qr((function(t,e){return Xa(t)?dr(t,e):[]})),ua=Qr((function(t){return vi(Ce(t,Xa))})),fa=Qr((function(t){var e=Jo(t);return Xa(e)&&(e=i),vi(Ce(t,Xa),uo(e,2))})),ha=Qr((function(t){var e=Jo(t);return e="function"==typeof e?e:i,vi(Ce(t,Xa),i,e)})),da=Qr(sa);var pa=Qr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,ca(t,n)}));function ga(t){var e=Wn(t);return e.__chain__=!0,e}function ya(t,e){return e(t)}var va=io((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return cr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Yn&&wo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ya,args:[o],thisArg:i}),new qn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var ma=Ri((function(t,e,n){It.call(t,n)?++t[n]:sr(t,n,1)}));var ba=zi(Yo),xa=zi(Ho);function wa(t,e){return(Ha(t)?je:pr)(t,uo(e,3))}function Oa(t,e){return(Ha(t)?Te:gr)(t,uo(e,3))}var ka=Ri((function(t,e,n){It.call(t,n)?t[n].push(e):sr(t,n,[e])}));var Ma=Qr((function(t,e,n){var i=-1,o="function"==typeof e,a=Ua(t)?r(t.length):[];return pr(t,(function(t){a[++i]=o?Se(e,t,n):Cr(t,e,n)})),a})),_a=Ri((function(t,e,n){sr(t,n,e)}));function Ea(t,e){return(Ha(t)?Ne:Zr)(t,uo(e,3))}var Sa=Ri((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Aa=Qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Oo(t,e[0],e[1])?e=[]:n>2&&Oo(e[0],e[1],e[2])&&(e=[e[0]]),Yr(t,br(e,1),[])})),ja=ue||function(){return ge.Date.now()};function Ta(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Ji(t,f,i,i,i,i,e)}function Pa(t,e){var n;if("function"!=typeof e)throw new Tt(o);return t=vs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ca=Qr((function(t,e,n){var r=1;if(n.length){var i=hn(n,lo(Ca));r|=l}return Ji(t,r,e,n,i)})),Ra=Qr((function(t,e,n){var r=3;if(n.length){var i=hn(n,lo(Ra));r|=l}return Ji(e,r,t,n,i)}));function La(t,e,n){var r,a,s,c,l,u,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Tt(o);function g(e){var n=r,o=a;return r=a=i,f=e,c=t.apply(o,n)}function y(t){return f=t,l=Lo(m,e),h?g(t):c}function v(t){var n=t-u;return u===i||n>=e||n<0||d&&t-f>=s}function m(){var t=ja();if(v(t))return b(t);l=Lo(m,function(t){var n=e-(t-u);return d?wn(n,s-(t-f)):n}(t))}function b(t){return l=i,p&&r?g(t):(r=a=i,c)}function x(){var t=ja(),n=v(t);if(r=arguments,a=this,u=t,n){if(l===i)return y(u);if(d)return Mi(l),l=Lo(m,e),g(u)}return l===i&&(l=Lo(m,e)),c}return e=bs(e)||0,rs(n)&&(h=!!n.leading,s=(d="maxWait"in n)?xn(bs(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),x.cancel=function(){l!==i&&Mi(l),f=0,r=u=a=l=i},x.flush=function(){return l===i?c:b(ja())},x}var Na=Qr((function(t,e){return hr(t,1,e)})),Ia=Qr((function(t,e,n){return hr(t,bs(e)||0,n)}));function Da(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Tt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Da.Cache||Un),n}function Ba(t){if("function"!=typeof t)throw new Tt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Da.Cache=Un;var Fa=Oi((function(t,e){var n=(e=1==e.length&&Ha(e[0])?Ne(e[0],Je(uo())):Ne(br(e,1),Je(uo()))).length;return Qr((function(r){for(var i=-1,o=wn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),za=Qr((function(t,e){var n=hn(e,lo(za));return Ji(t,l,i,e,n)})),Za=Qr((function(t,e){var n=hn(e,lo(Za));return Ji(t,u,i,e,n)})),Wa=io((function(t,e){return Ji(t,h,i,i,i,e)}));function $a(t,e){return t===e||t!=t&&e!=e}var Ga=Vi(Ar),qa=Vi((function(t,e){return t>=e})),Ya=Rr(function(){return arguments}())?Rr:function(t){return is(t)&&It.call(t,"callee")&&!Ut.call(t,"callee")},Ha=r.isArray,Va=we?Je(we):function(t){return is(t)&&Sr(t)==L};function Ua(t){return null!=t&&ns(t.length)&&!ts(t)}function Xa(t){return is(t)&&Ua(t)}var Ka=be||bc,Qa=Oe?Je(Oe):function(t){return is(t)&&Sr(t)==w};function Ja(t){if(!is(t))return!1;var e=Sr(t);return e==O||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var e=Sr(t);return e==k||e==M||"[object AsyncFunction]"==e||"[object Proxy]"==e}function es(t){return"number"==typeof t&&t==vs(t)}function ns(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function rs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function is(t){return null!=t&&"object"==typeof t}var os=ke?Je(ke):function(t){return is(t)&&vo(t)==_};function as(t){return"number"==typeof t||is(t)&&Sr(t)==E}function ss(t){if(!is(t)||Sr(t)!=S)return!1;var e=Ht(t);if(null===e)return!0;var n=It.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==zt}var cs=Me?Je(Me):function(t){return is(t)&&Sr(t)==j};var ls=_e?Je(_e):function(t){return is(t)&&vo(t)==T};function us(t){return"string"==typeof t||!Ha(t)&&is(t)&&Sr(t)==P}function fs(t){return"symbol"==typeof t||is(t)&&Sr(t)==C}var hs=Ee?Je(Ee):function(t){return is(t)&&ns(t.length)&&!!ce[Sr(t)]};var ds=Vi(zr),ps=Vi((function(t,e){return t<=e}));function gs(t){if(!t)return[];if(Ua(t))return us(t)?yn(t):Pi(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=vo(t);return(e==_?un:e==T?dn:$s)(t)}function ys(t){return t?(t=bs(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function vs(t){var e=ys(t),n=e%1;return e==e?n?e-n:e:0}function ms(t){return t?lr(vs(t),0,y):0}function bs(t){if("number"==typeof t)return t;if(fs(t))return g;if(rs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Qe(t);var n=vt.test(t);return n||bt.test(t)?he(t.slice(2),n?2:8):yt.test(t)?g:+t}function xs(t){return Ci(t,Ns(t))}function ws(t){return null==t?"":fi(t)}var Os=Li((function(t,e){if(Eo(e)||Ua(e))Ci(e,Ls(e),t);else for(var n in e)It.call(e,n)&&rr(t,n,e[n])})),ks=Li((function(t,e){Ci(e,Ns(e),t)})),Ms=Li((function(t,e,n,r){Ci(e,Ns(e),t,r)})),_s=Li((function(t,e,n,r){Ci(e,Ls(e),t,r)})),Es=io(cr);var Ss=Qr((function(t,e){t=St(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&Oo(e[0],e[1],o)&&(r=1);++n<r;)for(var a=e[n],s=Ns(a),c=-1,l=s.length;++c<l;){var u=s[c],f=t[u];(f===i||$a(f,Rt[u])&&!It.call(t,u))&&(t[u]=a[u])}return t})),As=Qr((function(t){return t.push(i,eo),Se(Ds,i,t)}));function js(t,e,n){var r=null==t?i:_r(t,e);return r===i?n:r}function Ts(t,e){return null!=t&&mo(t,e,Tr)}var Ps=$i((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),t[e]=n}),rc(ac)),Cs=$i((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),It.call(t,e)?t[e].push(n):t[e]=[n]}),uo),Rs=Qr(Cr);function Ls(t){return Ua(t)?Qn(t):Br(t)}function Ns(t){return Ua(t)?Qn(t,!0):Fr(t)}var Is=Li((function(t,e,n){Gr(t,e,n)})),Ds=Li((function(t,e,n,r){Gr(t,e,n,r)})),Bs=io((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ne(e,(function(e){return e=wi(e,t),r||(r=e.length>1),e})),Ci(t,ao(t),n),r&&(n=ur(n,7,no));for(var i=e.length;i--;)di(n,e[i]);return n}));var Fs=io((function(t,e){return null==t?{}:function(t,e){return Hr(t,e,(function(e,n){return Ts(t,n)}))}(t,e)}));function zs(t,e){if(null==t)return{};var n=Ne(ao(t),(function(t){return[t]}));return e=uo(e),Hr(t,n,(function(t,n){return e(t,n[0])}))}var Zs=Qi(Ls),Ws=Qi(Ns);function $s(t){return null==t?[]:tn(t,Ls(t))}var Gs=Bi((function(t,e,n){return e=e.toLowerCase(),t+(n?qs(e):e)}));function qs(t){return Js(ws(t).toLowerCase())}function Ys(t){return(t=ws(t))&&t.replace(wt,an).replace(ee,"")}var Hs=Bi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Vs=Bi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Us=Di("toLowerCase");var Xs=Bi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ks=Bi((function(t,e,n){return t+(n?" ":"")+Js(e)}));var Qs=Bi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Js=Di("toUpperCase");function tc(t,e,n){return t=ws(t),(e=n?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(re)||[]}(t):function(t){return t.match(ft)||[]}(t):t.match(e)||[]}var ec=Qr((function(t,e){try{return Se(t,i,e)}catch(t){return Ja(t)?t:new Mt(t)}})),nc=io((function(t,e){return je(e,(function(e){e=zo(e),sr(t,e,Ca(t[e],t))})),t}));function rc(t){return function(){return t}}var ic=Zi(),oc=Zi(!0);function ac(t){return t}function sc(t){return Dr("function"==typeof t?t:ur(t,1))}var cc=Qr((function(t,e){return function(n){return Cr(n,t,e)}})),lc=Qr((function(t,e){return function(n){return Cr(t,n,e)}}));function uc(t,e,n){var r=Ls(e),i=Mr(e,r);null!=n||rs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Mr(e,Ls(e)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=ts(t);return je(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Pi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ie([this.value()],arguments))})})),t}function fc(){}var hc=qi(Ne),dc=qi(Pe),pc=qi(Fe);function gc(t){return ko(t)?He(zo(t)):function(t){return function(e){return _r(e,t)}}(t)}var yc=Hi(),vc=Hi(!0);function mc(){return[]}function bc(){return!1}var xc=Gi((function(t,e){return t+e}),0),wc=Xi("ceil"),Oc=Gi((function(t,e){return t/e}),1),kc=Xi("floor");var Mc,_c=Gi((function(t,e){return t*e}),1),Ec=Xi("round"),Sc=Gi((function(t,e){return t-e}),0);return Wn.after=function(t,e){if("function"!=typeof e)throw new Tt(o);return t=vs(t),function(){if(--t<1)return e.apply(this,arguments)}},Wn.ary=Ta,Wn.assign=Os,Wn.assignIn=ks,Wn.assignInWith=Ms,Wn.assignWith=_s,Wn.at=Es,Wn.before=Pa,Wn.bind=Ca,Wn.bindAll=nc,Wn.bindKey=Ra,Wn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ha(t)?t:[t]},Wn.chain=ga,Wn.chunk=function(t,e,n){e=(n?Oo(t,e,n):e===i)?1:xn(vs(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,s=0,c=r(pe(o/e));a<o;)c[s++]=oi(t,a,a+=e);return c},Wn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Wn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Ie(Ha(n)?Pi(n):[n],br(e,1))},Wn.cond=function(t){var e=null==t?0:t.length,n=uo();return t=e?Ne(t,(function(t){if("function"!=typeof t[1])throw new Tt(o);return[n(t[0]),t[1]]})):[],Qr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},Wn.conforms=function(t){return function(t){var e=Ls(t);return function(n){return fr(n,t,e)}}(ur(t,1))},Wn.constant=rc,Wn.countBy=ma,Wn.create=function(t,e){var n=$n(t);return null==e?n:ar(n,e)},Wn.curry=function t(e,n,r){var o=Ji(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Wn.curryRight=function t(e,n,r){var o=Ji(e,c,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Wn.debounce=La,Wn.defaults=Ss,Wn.defaultsDeep=As,Wn.defer=Na,Wn.delay=Ia,Wn.difference=$o,Wn.differenceBy=Go,Wn.differenceWith=qo,Wn.drop=function(t,e,n){var r=null==t?0:t.length;return r?oi(t,(e=n||e===i?1:vs(e))<0?0:e,r):[]},Wn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?oi(t,0,(e=r-(e=n||e===i?1:vs(e)))<0?0:e):[]},Wn.dropRightWhile=function(t,e){return t&&t.length?gi(t,uo(e,3),!0,!0):[]},Wn.dropWhile=function(t,e){return t&&t.length?gi(t,uo(e,3),!0):[]},Wn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Oo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=vs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:vs(r))<0&&(r+=o),r=n>r?0:ms(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Wn.filter=function(t,e){return(Ha(t)?Ce:mr)(t,uo(e,3))},Wn.flatMap=function(t,e){return br(Ea(t,e),1)},Wn.flatMapDeep=function(t,e){return br(Ea(t,e),d)},Wn.flatMapDepth=function(t,e,n){return n=n===i?1:vs(n),br(Ea(t,e),n)},Wn.flatten=Vo,Wn.flattenDeep=function(t){return(null==t?0:t.length)?br(t,d):[]},Wn.flattenDepth=function(t,e){return(null==t?0:t.length)?br(t,e=e===i?1:vs(e)):[]},Wn.flip=function(t){return Ji(t,512)},Wn.flow=ic,Wn.flowRight=oc,Wn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Wn.functions=function(t){return null==t?[]:Mr(t,Ls(t))},Wn.functionsIn=function(t){return null==t?[]:Mr(t,Ns(t))},Wn.groupBy=ka,Wn.initial=function(t){return(null==t?0:t.length)?oi(t,0,-1):[]},Wn.intersection=Xo,Wn.intersectionBy=Ko,Wn.intersectionWith=Qo,Wn.invert=Ps,Wn.invertBy=Cs,Wn.invokeMap=Ma,Wn.iteratee=sc,Wn.keyBy=_a,Wn.keys=Ls,Wn.keysIn=Ns,Wn.map=Ea,Wn.mapKeys=function(t,e){var n={};return e=uo(e,3),Or(t,(function(t,r,i){sr(n,e(t,r,i),t)})),n},Wn.mapValues=function(t,e){var n={};return e=uo(e,3),Or(t,(function(t,r,i){sr(n,r,e(t,r,i))})),n},Wn.matches=function(t){return Wr(ur(t,1))},Wn.matchesProperty=function(t,e){return $r(t,ur(e,1))},Wn.memoize=Da,Wn.merge=Is,Wn.mergeWith=Ds,Wn.method=cc,Wn.methodOf=lc,Wn.mixin=uc,Wn.negate=Ba,Wn.nthArg=function(t){return t=vs(t),Qr((function(e){return qr(e,t)}))},Wn.omit=Bs,Wn.omitBy=function(t,e){return zs(t,Ba(uo(e)))},Wn.once=function(t){return Pa(2,t)},Wn.orderBy=function(t,e,n,r){return null==t?[]:(Ha(e)||(e=null==e?[]:[e]),Ha(n=r?i:n)||(n=null==n?[]:[n]),Yr(t,e,n))},Wn.over=hc,Wn.overArgs=Fa,Wn.overEvery=dc,Wn.overSome=pc,Wn.partial=za,Wn.partialRight=Za,Wn.partition=Sa,Wn.pick=Fs,Wn.pickBy=zs,Wn.property=gc,Wn.propertyOf=function(t){return function(e){return null==t?i:_r(t,e)}},Wn.pull=ta,Wn.pullAll=ea,Wn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,uo(n,2)):t},Wn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,i,n):t},Wn.pullAt=na,Wn.range=yc,Wn.rangeRight=vc,Wn.rearg=Wa,Wn.reject=function(t,e){return(Ha(t)?Ce:mr)(t,Ba(uo(e,3)))},Wn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Ur(t,i),n},Wn.rest=function(t,e){if("function"!=typeof t)throw new Tt(o);return Qr(t,e=e===i?e:vs(e))},Wn.reverse=ra,Wn.sampleSize=function(t,e,n){return e=(n?Oo(t,e,n):e===i)?1:vs(e),(Ha(t)?tr:ti)(t,e)},Wn.set=function(t,e,n){return null==t?t:ei(t,e,n)},Wn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ei(t,e,n,r)},Wn.shuffle=function(t){return(Ha(t)?er:ii)(t)},Wn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Oo(t,e,n)?(e=0,n=r):(e=null==e?0:vs(e),n=n===i?r:vs(n)),oi(t,e,n)):[]},Wn.sortBy=Aa,Wn.sortedUniq=function(t){return t&&t.length?li(t):[]},Wn.sortedUniqBy=function(t,e){return t&&t.length?li(t,uo(e,2)):[]},Wn.split=function(t,e,n){return n&&"number"!=typeof n&&Oo(t,e,n)&&(e=n=i),(n=n===i?y:n>>>0)?(t=ws(t))&&("string"==typeof e||null!=e&&!cs(e))&&!(e=fi(e))&&ln(t)?ki(yn(t),0,n):t.split(e,n):[]},Wn.spread=function(t,e){if("function"!=typeof t)throw new Tt(o);return e=null==e?0:xn(vs(e),0),Qr((function(n){var r=n[e],i=ki(n,0,e);return r&&Ie(i,r),Se(t,this,i)}))},Wn.tail=function(t){var e=null==t?0:t.length;return e?oi(t,1,e):[]},Wn.take=function(t,e,n){return t&&t.length?oi(t,0,(e=n||e===i?1:vs(e))<0?0:e):[]},Wn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?oi(t,(e=r-(e=n||e===i?1:vs(e)))<0?0:e,r):[]},Wn.takeRightWhile=function(t,e){return t&&t.length?gi(t,uo(e,3),!1,!0):[]},Wn.takeWhile=function(t,e){return t&&t.length?gi(t,uo(e,3)):[]},Wn.tap=function(t,e){return e(t),t},Wn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Tt(o);return rs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),La(t,e,{leading:r,maxWait:e,trailing:i})},Wn.thru=ya,Wn.toArray=gs,Wn.toPairs=Zs,Wn.toPairsIn=Ws,Wn.toPath=function(t){return Ha(t)?Ne(t,zo):fs(t)?[t]:Pi(Fo(ws(t)))},Wn.toPlainObject=xs,Wn.transform=function(t,e,n){var r=Ha(t),i=r||Ka(t)||hs(t);if(e=uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:rs(t)&&ts(o)?$n(Ht(t)):{}}return(i?je:Or)(t,(function(t,r,i){return e(n,t,r,i)})),n},Wn.unary=function(t){return Ta(t,1)},Wn.union=ia,Wn.unionBy=oa,Wn.unionWith=aa,Wn.uniq=function(t){return t&&t.length?hi(t):[]},Wn.uniqBy=function(t,e){return t&&t.length?hi(t,uo(e,2)):[]},Wn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?hi(t,i,e):[]},Wn.unset=function(t,e){return null==t||di(t,e)},Wn.unzip=sa,Wn.unzipWith=ca,Wn.update=function(t,e,n){return null==t?t:pi(t,e,xi(n))},Wn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:pi(t,e,xi(n),r)},Wn.values=$s,Wn.valuesIn=function(t){return null==t?[]:tn(t,Ns(t))},Wn.without=la,Wn.words=tc,Wn.wrap=function(t,e){return za(xi(e),t)},Wn.xor=ua,Wn.xorBy=fa,Wn.xorWith=ha,Wn.zip=da,Wn.zipObject=function(t,e){return mi(t||[],e||[],rr)},Wn.zipObjectDeep=function(t,e){return mi(t||[],e||[],ei)},Wn.zipWith=pa,Wn.entries=Zs,Wn.entriesIn=Ws,Wn.extend=ks,Wn.extendWith=Ms,uc(Wn,Wn),Wn.add=xc,Wn.attempt=ec,Wn.camelCase=Gs,Wn.capitalize=qs,Wn.ceil=wc,Wn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=bs(n))==n?n:0),e!==i&&(e=(e=bs(e))==e?e:0),lr(bs(t),e,n)},Wn.clone=function(t){return ur(t,4)},Wn.cloneDeep=function(t){return ur(t,5)},Wn.cloneDeepWith=function(t,e){return ur(t,5,e="function"==typeof e?e:i)},Wn.cloneWith=function(t,e){return ur(t,4,e="function"==typeof e?e:i)},Wn.conformsTo=function(t,e){return null==e||fr(t,e,Ls(e))},Wn.deburr=Ys,Wn.defaultTo=function(t,e){return null==t||t!=t?e:t},Wn.divide=Oc,Wn.endsWith=function(t,e,n){t=ws(t),e=fi(e);var r=t.length,o=n=n===i?r:lr(vs(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Wn.eq=$a,Wn.escape=function(t){return(t=ws(t))&&K.test(t)?t.replace(U,sn):t},Wn.escapeRegExp=function(t){return(t=ws(t))&&ot.test(t)?t.replace(it,"\\$&"):t},Wn.every=function(t,e,n){var r=Ha(t)?Pe:yr;return n&&Oo(t,e,n)&&(e=i),r(t,uo(e,3))},Wn.find=ba,Wn.findIndex=Yo,Wn.findKey=function(t,e){return Ze(t,uo(e,3),Or)},Wn.findLast=xa,Wn.findLastIndex=Ho,Wn.findLastKey=function(t,e){return Ze(t,uo(e,3),kr)},Wn.floor=kc,Wn.forEach=wa,Wn.forEachRight=Oa,Wn.forIn=function(t,e){return null==t?t:xr(t,uo(e,3),Ns)},Wn.forInRight=function(t,e){return null==t?t:wr(t,uo(e,3),Ns)},Wn.forOwn=function(t,e){return t&&Or(t,uo(e,3))},Wn.forOwnRight=function(t,e){return t&&kr(t,uo(e,3))},Wn.get=js,Wn.gt=Ga,Wn.gte=qa,Wn.has=function(t,e){return null!=t&&mo(t,e,jr)},Wn.hasIn=Ts,Wn.head=Uo,Wn.identity=ac,Wn.includes=function(t,e,n,r){t=Ua(t)?t:$s(t),n=n&&!r?vs(n):0;var i=t.length;return n<0&&(n=xn(i+n,0)),us(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&$e(t,e,n)>-1},Wn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=xn(r+i,0)),$e(t,e,i)},Wn.inRange=function(t,e,n){return e=ys(e),n===i?(n=e,e=0):n=ys(n),function(t,e,n){return t>=wn(e,n)&&t<xn(e,n)}(t=bs(t),e,n)},Wn.invoke=Rs,Wn.isArguments=Ya,Wn.isArray=Ha,Wn.isArrayBuffer=Va,Wn.isArrayLike=Ua,Wn.isArrayLikeObject=Xa,Wn.isBoolean=function(t){return!0===t||!1===t||is(t)&&Sr(t)==x},Wn.isBuffer=Ka,Wn.isDate=Qa,Wn.isElement=function(t){return is(t)&&1===t.nodeType&&!ss(t)},Wn.isEmpty=function(t){if(null==t)return!0;if(Ua(t)&&(Ha(t)||"string"==typeof t||"function"==typeof t.splice||Ka(t)||hs(t)||Ya(t)))return!t.length;var e=vo(t);if(e==_||e==T)return!t.size;if(Eo(t))return!Br(t).length;for(var n in t)if(It.call(t,n))return!1;return!0},Wn.isEqual=function(t,e){return Lr(t,e)},Wn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Lr(t,e,i,n):!!r},Wn.isError=Ja,Wn.isFinite=function(t){return"number"==typeof t&&xe(t)},Wn.isFunction=ts,Wn.isInteger=es,Wn.isLength=ns,Wn.isMap=os,Wn.isMatch=function(t,e){return t===e||Nr(t,e,ho(e))},Wn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Nr(t,e,ho(e),n)},Wn.isNaN=function(t){return as(t)&&t!=+t},Wn.isNative=function(t){if(_o(t))throw new Mt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(t)},Wn.isNil=function(t){return null==t},Wn.isNull=function(t){return null===t},Wn.isNumber=as,Wn.isObject=rs,Wn.isObjectLike=is,Wn.isPlainObject=ss,Wn.isRegExp=cs,Wn.isSafeInteger=function(t){return es(t)&&t>=-9007199254740991&&t<=p},Wn.isSet=ls,Wn.isString=us,Wn.isSymbol=fs,Wn.isTypedArray=hs,Wn.isUndefined=function(t){return t===i},Wn.isWeakMap=function(t){return is(t)&&vo(t)==R},Wn.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==Sr(t)},Wn.join=function(t,e){return null==t?"":ze.call(t,e)},Wn.kebabCase=Hs,Wn.last=Jo,Wn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=vs(n))<0?xn(r+o,0):wn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):We(t,qe,o,!0)},Wn.lowerCase=Vs,Wn.lowerFirst=Us,Wn.lt=ds,Wn.lte=ps,Wn.max=function(t){return t&&t.length?vr(t,ac,Ar):i},Wn.maxBy=function(t,e){return t&&t.length?vr(t,uo(e,2),Ar):i},Wn.mean=function(t){return Ye(t,ac)},Wn.meanBy=function(t,e){return Ye(t,uo(e,2))},Wn.min=function(t){return t&&t.length?vr(t,ac,zr):i},Wn.minBy=function(t,e){return t&&t.length?vr(t,uo(e,2),zr):i},Wn.stubArray=mc,Wn.stubFalse=bc,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=_c,Wn.nth=function(t,e){return t&&t.length?qr(t,vs(e)):i},Wn.noConflict=function(){return ge._===this&&(ge._=Zt),this},Wn.noop=fc,Wn.now=ja,Wn.pad=function(t,e,n){t=ws(t);var r=(e=vs(e))?gn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Yi(ye(i),n)+t+Yi(pe(i),n)},Wn.padEnd=function(t,e,n){t=ws(t);var r=(e=vs(e))?gn(t):0;return e&&r<e?t+Yi(e-r,n):t},Wn.padStart=function(t,e,n){t=ws(t);var r=(e=vs(e))?gn(t):0;return e&&r<e?Yi(e-r,n)+t:t},Wn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),kn(ws(t).replace(at,""),e||0)},Wn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Oo(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=ys(t),e===i?(e=t,t=0):e=ys(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=Mn();return wn(t+o*(e-t+fe("1e-"+((o+"").length-1))),e)}return Xr(t,e)},Wn.reduce=function(t,e,n){var r=Ha(t)?De:Ue,i=arguments.length<3;return r(t,uo(e,4),n,i,pr)},Wn.reduceRight=function(t,e,n){var r=Ha(t)?Be:Ue,i=arguments.length<3;return r(t,uo(e,4),n,i,gr)},Wn.repeat=function(t,e,n){return e=(n?Oo(t,e,n):e===i)?1:vs(e),Kr(ws(t),e)},Wn.replace=function(){var t=arguments,e=ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Wn.result=function(t,e,n){var r=-1,o=(e=wi(e,t)).length;for(o||(o=1,t=i);++r<o;){var a=null==t?i:t[zo(e[r])];a===i&&(r=o,a=n),t=ts(a)?a.call(t):a}return t},Wn.round=Ec,Wn.runInContext=t,Wn.sample=function(t){return(Ha(t)?Jn:Jr)(t)},Wn.size=function(t){if(null==t)return 0;if(Ua(t))return us(t)?gn(t):t.length;var e=vo(t);return e==_||e==T?t.size:Br(t).length},Wn.snakeCase=Xs,Wn.some=function(t,e,n){var r=Ha(t)?Fe:ai;return n&&Oo(t,e,n)&&(e=i),r(t,uo(e,3))},Wn.sortedIndex=function(t,e){return si(t,e)},Wn.sortedIndexBy=function(t,e,n){return ci(t,e,uo(n,2))},Wn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=si(t,e);if(r<n&&$a(t[r],e))return r}return-1},Wn.sortedLastIndex=function(t,e){return si(t,e,!0)},Wn.sortedLastIndexBy=function(t,e,n){return ci(t,e,uo(n,2),!0)},Wn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=si(t,e,!0)-1;if($a(t[n],e))return n}return-1},Wn.startCase=Ks,Wn.startsWith=function(t,e,n){return t=ws(t),n=null==n?0:lr(vs(n),0,t.length),e=fi(e),t.slice(n,n+e.length)==e},Wn.subtract=Sc,Wn.sum=function(t){return t&&t.length?Xe(t,ac):0},Wn.sumBy=function(t,e){return t&&t.length?Xe(t,uo(e,2)):0},Wn.template=function(t,e,n){var r=Wn.templateSettings;n&&Oo(t,e,n)&&(e=i),t=ws(t),e=Ms({},e,r,to);var o,a,s=Ms({},e.imports,r.imports,to),c=Ls(s),l=tn(s,c),u=0,f=e.interpolate||Ot,h="__p += '",d=At((e.escape||Ot).source+"|"+f.source+"|"+(f===tt?pt:Ot).source+"|"+(e.evaluate||Ot).source+"|$","g"),p="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++se+"]")+"\n";t.replace(d,(function(e,n,r,i,s,c){return r||(r=i),h+=t.slice(u,c).replace(kt,cn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=c+e.length,e})),h+="';\n";var g=It.call(e,"variable")&&e.variable;if(g){if(ht.test(g))throw new Mt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(q,""):h).replace(Y,"$1").replace(H,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=ec((function(){return _t(c,p+"return "+h).apply(i,l)}));if(y.source=h,Ja(y))throw y;return y},Wn.times=function(t,e){if((t=vs(t))<1||t>p)return[];var n=y,r=wn(t,y);e=uo(e),t-=y;for(var i=Ke(r,e);++n<t;)e(n);return i},Wn.toFinite=ys,Wn.toInteger=vs,Wn.toLength=ms,Wn.toLower=function(t){return ws(t).toLowerCase()},Wn.toNumber=bs,Wn.toSafeInteger=function(t){return t?lr(vs(t),-9007199254740991,p):0===t?t:0},Wn.toString=ws,Wn.toUpper=function(t){return ws(t).toUpperCase()},Wn.trim=function(t,e,n){if((t=ws(t))&&(n||e===i))return Qe(t);if(!t||!(e=fi(e)))return t;var r=yn(t),o=yn(e);return ki(r,nn(r,o),rn(r,o)+1).join("")},Wn.trimEnd=function(t,e,n){if((t=ws(t))&&(n||e===i))return t.slice(0,vn(t)+1);if(!t||!(e=fi(e)))return t;var r=yn(t);return ki(r,0,rn(r,yn(e))+1).join("")},Wn.trimStart=function(t,e,n){if((t=ws(t))&&(n||e===i))return t.replace(at,"");if(!t||!(e=fi(e)))return t;var r=yn(t);return ki(r,nn(r,yn(e))).join("")},Wn.truncate=function(t,e){var n=30,r="...";if(rs(e)){var o="separator"in e?e.separator:o;n="length"in e?vs(e.length):n,r="omission"in e?fi(e.omission):r}var a=(t=ws(t)).length;if(ln(t)){var s=yn(t);a=s.length}if(n>=a)return t;var c=n-gn(r);if(c<1)return r;var l=s?ki(s,0,c).join(""):t.slice(0,c);if(o===i)return l+r;if(s&&(c+=l.length-c),cs(o)){if(t.slice(c).search(o)){var u,f=l;for(o.global||(o=At(o.source,ws(gt.exec(o))+"g")),o.lastIndex=0;u=o.exec(f);)var h=u.index;l=l.slice(0,h===i?c:h)}}else if(t.indexOf(fi(o),c)!=c){var d=l.lastIndexOf(o);d>-1&&(l=l.slice(0,d))}return l+r},Wn.unescape=function(t){return(t=ws(t))&&X.test(t)?t.replace(V,mn):t},Wn.uniqueId=function(t){var e=++Dt;return ws(t)+e},Wn.upperCase=Qs,Wn.upperFirst=Js,Wn.each=wa,Wn.eachRight=Oa,Wn.first=Uo,uc(Wn,(Mc={},Or(Wn,(function(t,e){It.call(Wn.prototype,e)||(Mc[e]=t)})),Mc),{chain:!1}),Wn.VERSION="4.17.21",je(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Wn[t].placeholder=Wn})),je(["drop","take"],(function(t,e){Yn.prototype[t]=function(n){n=n===i?1:xn(vs(n),0);var r=this.__filtered__&&!e?new Yn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(n,r.__takeCount__):r.__views__.push({size:wn(n,y),type:t+(r.__dir__<0?"Right":"")}),r},Yn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),je(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Yn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),je(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Yn.prototype[t]=function(){return this[n](1).value()[0]}})),je(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Yn.prototype[t]=function(){return this.__filtered__?new Yn(this):this[n](1)}})),Yn.prototype.compact=function(){return this.filter(ac)},Yn.prototype.find=function(t){return this.filter(t).head()},Yn.prototype.findLast=function(t){return this.reverse().find(t)},Yn.prototype.invokeMap=Qr((function(t,e){return"function"==typeof t?new Yn(this):this.map((function(n){return Cr(n,t,e)}))})),Yn.prototype.reject=function(t){return this.filter(Ba(uo(t)))},Yn.prototype.slice=function(t,e){t=vs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Yn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=vs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Yn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Yn.prototype.toArray=function(){return this.take(y)},Or(Yn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Wn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(Wn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof Yn,l=s[0],u=c||Ha(e),f=function(t){var e=o.apply(Wn,Ie([t],s));return r&&h?e[0]:e};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,g=c&&!d;if(!a&&u){e=g?e:new Yn(this);var y=t.apply(e,s);return y.__actions__.push({func:ya,args:[f],thisArg:i}),new qn(y,h)}return p&&g?t.apply(this,s):(y=this.thru(f),p?r?y.value()[0]:y.value():y)})})),je(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Wn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ha(i)?i:[],t)}return this[n]((function(n){return e.apply(Ha(n)?n:[],t)}))}})),Or(Yn.prototype,(function(t,e){var n=Wn[e];if(n){var r=n.name+"";It.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:e,func:n})}})),Rn[Wi(i,2).name]=[{name:"wrapper",func:i}],Yn.prototype.clone=function(){var t=new Yn(this.__wrapped__);return t.__actions__=Pi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Pi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Pi(this.__views__),t},Yn.prototype.reverse=function(){if(this.__filtered__){var t=new Yn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Yn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ha(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=wn(e,t+a);break;case"takeRight":t=xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,l=r?s:a-1,u=this.__iteratees__,f=u.length,h=0,d=wn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return yi(t,this.__actions__);var p=[];t:for(;c--&&h<d;){for(var g=-1,y=t[l+=e];++g<f;){var v=u[g],m=v.iteratee,b=v.type,x=m(y);if(2==b)y=x;else if(!x){if(1==b)continue t;break t}}p[h++]=y}return p},Wn.prototype.at=va,Wn.prototype.chain=function(){return ga(this)},Wn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Wn.prototype.next=function(){this.__values__===i&&(this.__values__=gs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Wn.prototype.plant=function(t){for(var e,n=this;n instanceof Gn;){var r=Wo(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Wn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Yn){var e=t;return this.__actions__.length&&(e=new Yn(this)),(e=e.reverse()).__actions__.push({func:ya,args:[ra],thisArg:i}),new qn(e,this.__chain__)}return this.thru(ra)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return yi(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,Qt&&(Wn.prototype[Qt]=function(){return this}),Wn}();ge._=bn,(r=function(){return bn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},60635:function(t){"use strict";var e=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},t.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},t.exports.findMinMulti=function(t){for(var n=e.findMin(t[0]),r=1;r<t.length;r++)n=Math.min(n,e.findMin(t[r]));return n},t.exports.findMaxMulti=function(t){for(var n=e.findMax(t[0]),r=1;r<t.length;r++)n=Math.max(n,e.findMax(t[r]));return n},t.exports.inside=function(t,e,n){return t<=n&&n<=e}},86311:function(t,e,n){"use strict";var r=Math.log(2),i=t.exports,o=n(60635);function a(t){return 1-Math.abs(t)}t.exports.getUnifiedMinMax=function(t,e){return i.getUnifiedMinMaxMulti([t],e)},t.exports.getUnifiedMinMaxMulti=function(t,e){e=e||{};var n=!1,r=!1,i=o.isNumber(e.width)?e.width:2,a=o.isNumber(e.size)?e.size:50,s=o.isNumber(e.min)?e.min:(n=!0,o.findMinMulti(t)),c=o.isNumber(e.max)?e.max:(r=!0,o.findMaxMulti(t)),l=(c-s)/(a-1);return n&&(s-=2*i*l),r&&(c+=2*i*l),{min:s,max:c}},t.exports.create=function(t,e){if(e=e||{},!t||0===t.length)return[];var n=o.isNumber(e.size)?e.size:50,r=o.isNumber(e.width)?e.width:2,s=i.getUnifiedMinMax(t,{size:n,width:r,min:e.min,max:e.max}),c=s.min,l=s.max-c,u=l/(n-1);if(0===l)return[{x:c,y:1}];for(var f=[],h=0;h<n;h++)f.push({x:c+h*u,y:0});var d=function(t,e){for(var n={},r=0,i=-e;i<=e;i++)r+=t(i/e),n[i]=r;return n}(a,r),p=d[r],g=d[r-1]-d[r-2],y=0;t.forEach((function(t){var e=function(t){return Math.floor((t-c)/u)}(t);if(!(e+r<0||e-r>=f.length)){var n=Math.max(e-r,0),i=e,a=Math.min(e+r,f.length-1),s=n-(e-r),l=e+r-a,h=d[-r-1+s]||0,v=d[-r-1+l]||0,m=p/(p-h-v);s>0&&(y+=m*(s-1)*g);var b=Math.max(0,e-r+1);o.inside(0,f.length-1,b)&&(f[b].y+=1*m*g),o.inside(0,f.length-1,i+1)&&(f[i+1].y-=2*m*g),o.inside(0,f.length-1,a+1)&&(f[a+1].y+=1*m*g)}}));var v=y,m=0,b=0;return f.forEach((function(t){m+=t.y,v+=m,t.y=v,b+=v})),b>0&&f.forEach((function(t){t.y/=b})),f},t.exports.getExpectedValueFromPdf=function(t){if(t&&0!==t.length){var e=0;return t.forEach((function(t){e+=t.x*t.y})),e}},t.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,r=0,i=0;i<t.length&&(r=i,!((n+=t[i].y)>=e));i++);return t[r].x}},t.exports.getPerplexity=function(t){if(t&&0!==t.length){var e=0;return t.forEach((function(t){var n=Math.log(t.y);isFinite(n)&&(e+=t.y*n)})),e=-e/r,Math.pow(2,e)}}},95657:function(t,e,n){"use strict";var r=n(17592),i=Array.prototype.concat,o=Array.prototype.slice,a=t.exports=function(t){for(var e=[],n=0,a=t.length;n<a;n++){var s=t[n];r(s)?e=i.call(e,o.call(s)):e.push(s)}return e};a.wrap=function(t){return function(){return t(a(arguments))}}}}]); |