You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
259 lines
1.4 MiB
259 lines
1.4 MiB
!(function(){var oa=Math.pow;(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[983],{92296:function(jn,Kn,Y){"use strict";Y.d(Kn,{Z:function(){return fpe}});var se={};Y.r(se),Y.d(se,{add:function(){return Z8},adjoint:function(){return Mv},clone:function(){return bc},copy:function(){return Jo},create:function(){return cr},determinant:function(){return Mh},equals:function(){return H8},exactEquals:function(){return G8},frob:function(){return z8},fromQuat:function(){return Lx},fromQuat2:function(){return I8},fromRotation:function(){return Zs},fromRotationTranslation:function(){return TC},fromRotationTranslationScale:function(){return L8},fromRotationTranslationScaleOrigin:function(){return Ph},fromScaling:function(){return vo},fromTranslation:function(){return Xr},fromValues:function(){return Rx},fromXRotation:function(){return Qo},fromYRotation:function(){return A8},fromZRotation:function(){return R8},frustum:function(){return N8},getRotation:function(){return Tv},getScaling:function(){return Nf},getTranslation:function(){return Pv},identity:function(){return ms},invert:function(){return No},lookAt:function(){return NC},mul:function(){return Y8},multiply:function(){return ya},multiplyScalar:function(){return $8},multiplyScalarAndAdd:function(){return W8},ortho:function(){return IC},orthoNO:function(){return RC},orthoZO:function(){return LC},perspective:function(){return k8},perspectiveFromFieldOfView:function(){return D8},perspectiveNO:function(){return AC},perspectiveZO:function(){return j8},rotate:function(){return Ix},rotateX:function(){return $t},rotateY:function(){return Ut},rotateZ:function(){return or},scale:function(){return Lf},set:function(){return Eh},str:function(){return B8},sub:function(){return V8},subtract:function(){return kC},targetTo:function(){return F8},translate:function(){return zs},transpose:function(){return Ev}});var me={};Y.r(me),Y.d(me,{area:function(){return lY},bottom:function(){return Yl},bottomLeft:function(){return Yl},bottomRight:function(){return Yl},inside:function(){return Yl},left:function(){return Yl},outside:function(){return fY},right:function(){return Yl},spider:function(){return hY},surround:function(){return vY},top:function(){return Yl},topLeft:function(){return Yl},topRight:function(){return Yl}});var wt={};Y.r(wt),Y.d(wt,{interpolateBlues:function(){return zV},interpolateBrBG:function(){return bV},interpolateBuGn:function(){return PV},interpolateBuPu:function(){return TV},interpolateCividis:function(){return YV},interpolateCool:function(){return JV},interpolateCubehelixDefault:function(){return KV},interpolateGnBu:function(){return AV},interpolateGreens:function(){return ZV},interpolateGreys:function(){return $V},interpolateInferno:function(){return oU},interpolateMagma:function(){return aU},interpolateOrRd:function(){return RV},interpolateOranges:function(){return HV},interpolatePRGn:function(){return xV},interpolatePiYG:function(){return _V},interpolatePlasma:function(){return sU},interpolatePuBu:function(){return LV},interpolatePuBuGn:function(){return IV},interpolatePuOr:function(){return wV},interpolatePuRd:function(){return NV},interpolatePurples:function(){return WV},interpolateRainbow:function(){return QV},interpolateRdBu:function(){return SV},interpolateRdGy:function(){return OV},interpolateRdPu:function(){return kV},interpolateRdYlBu:function(){return CV},interpolateRdYlGn:function(){return EV},interpolateReds:function(){return GV},interpolateSinebow:function(){return nU},interpolateSpectral:function(){return MV},interpolateTurbo:function(){return rU},interpolateViridis:function(){return iU},interpolateWarm:function(){return qV},interpolateYlGn:function(){return DV},interpolateYlGnBu:function(){return jV},interpolateYlOrBr:function(){return FV},interpolateYlOrRd:function(){return BV},schemeAccent:function(){return rV},schemeBlues:function(){return p3},schemeBrBG:function(){return VA},schemeBuGn:function(){return n3},schemeBuPu:function(){return r3},schemeCategory10:function(){return nV},schemeDark2:function(){return iV},schemeGnBu:function(){return i3},schemeGreens:function(){return v3},schemeGreys:function(){return g3},schemeObservable10:function(){return aV},schemeOrRd:function(){return a3},schemeOranges:function(){return b3},schemePRGn:function(){return UA},schemePaired:function(){return oV},schemePastel1:function(){return sV},schemePastel2:function(){return lV},schemePiYG:function(){return XA},schemePuBu:function(){return s3},schemePuBuGn:function(){return o3},schemePuOr:function(){return KA},schemePuRd:function(){return l3},schemePurples:function(){return m3},schemeRdBu:function(){return qA},schemeRdGy:function(){return JA},schemeRdPu:function(){return c3},schemeRdYlBu:function(){return QA},schemeRdYlGn:function(){return e3},schemeReds:function(){return y3},schemeSet1:function(){return cV},schemeSet2:function(){return uV},schemeSet3:function(){return fV},schemeSpectral:function(){return t3},schemeTableau10:function(){return dV},schemeYlGn:function(){return f3},schemeYlGnBu:function(){return u3},schemeYlOrBr:function(){return d3},schemeYlOrRd:function(){return h3}});var _t={};Y.r(_t),Y.d(_t,{geoAlbers:function(){return Mj},geoAlbersUsa:function(){return bie},geoAzimuthalEqualArea:function(){return xie},geoAzimuthalEqualAreaRaw:function(){return vO},geoAzimuthalEquidistant:function(){return _ie},geoAzimuthalEquidistantRaw:function(){return gO},geoConicConformal:function(){return Sie},geoConicConformalRaw:function(){return Aj},geoConicEqualArea:function(){return by},geoConicEqualAreaRaw:function(){return Ej},geoConicEquidistant:function(){return Cie},geoConicEquidistantRaw:function(){return Rj},geoEqualEarth:function(){return Mie},geoEqualEarthRaw:function(){return mO},geoEquirectangular:function(){return Oie},geoEquirectangularRaw:function(){return o0},geoGnomonic:function(){return Pie},geoGnomonicRaw:function(){return yO},geoIdentity:function(){return Tie},geoMercator:function(){return wie},geoMercatorRaw:function(){return a0},geoNaturalEarth1:function(){return Aie},geoNaturalEarth1Raw:function(){return bO},geoOrthographic:function(){return Rie},geoOrthographicRaw:function(){return xO},geoProjection:function(){return xl},geoProjectionMutator:function(){return hO},geoStereographic:function(){return Iie},geoStereographicRaw:function(){return _O},geoTransverseMercator:function(){return Lie},geoTransverseMercatorRaw:function(){return wO}});var ne={};Y.r(ne),Y.d(ne,{frequency:function(){return Loe},id:function(){return Noe},name:function(){return koe},weight:function(){return Ioe}});var Qe=Y(67294),j=Y(73935),Xe=Y.t(j,2),we=function(){return we=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},we.apply(this,arguments)},D=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},gt=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},St=we({},Xe),Fe=St.version,Ne=St.render,Be=St.unmountComponentAtNode,Re;try{var rt=Number((Fe||"").split(".")[0]);rt>=18&&(Re=St.createRoot)}catch(e){}function Xt(e){var t=St.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&typeof t=="object"&&(t.usingClientEntryPoint=e)}var ln="__rc_react_root__";function rr(e,t){Xt(!0);var n=t[ln]||Re(t);Xt(!1),n.render(e),t[ln]=n}function Zn(e,t){Ne(e,t)}function qn(e,t){}function cn(e,t){if(Re){rr(e,t);return}Zn(e,t)}function In(e){return D(this,void 0,void 0,function(){return gt(this,function(t){return[2,Promise.resolve().then(function(){var n;(n=e[ln])===null||n===void 0||n.unmount(),delete e[ln]})]})})}function ir(e){Be(e)}function dr(e){}function Vt(e){return D(this,void 0,void 0,function(){return gt(this,function(t){return Re!==void 0?[2,In(e)]:(ir(e),[2])})})}var Kt=new Map;Kt.set("tooltip",document.createElement("div"));var Hr=function(e,t){t===void 0&&(t=!1);var n=null;if(t)n=Kt.get("tooltip");else if(n=document.createElement("div"),e!=null&&e.key){var r=Kt.get(e.key);r?n=r:Kt.set(e.key,n)}return cn(e,n),n},er=function(e){var t=e.attachShadow({mode:"open"}),n=document.createElement("div"),r=document.createElement("style");r.innerHTML=`.loading {
|
|
display: inline-block;
|
|
position: relative;
|
|
width: 80px;
|
|
height: 80px;
|
|
}
|
|
.loading div {
|
|
position: absolute;
|
|
top: 33px;
|
|
width: 13px;
|
|
height: 13px;
|
|
border-radius: 50%;
|
|
background: #ccc;
|
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
}
|
|
.loading div:nth-child(1) {
|
|
left: 8px;
|
|
animation: loading1 0.6s infinite;
|
|
}
|
|
.loading div:nth-child(2) {
|
|
left: 8px;
|
|
animation: loading2 0.6s infinite;
|
|
}
|
|
.loading div:nth-child(3) {
|
|
left: 32px;
|
|
animation: loading2 0.6s infinite;
|
|
}
|
|
.loading div:nth-child(4) {
|
|
left: 56px;
|
|
animation: loading3 0.6s infinite;
|
|
}
|
|
@keyframes loading1 {
|
|
0% {
|
|
transform: scale(0);
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
@keyframes loading3 {
|
|
0% {
|
|
transform: scale(1);
|
|
}
|
|
100% {
|
|
transform: scale(0);
|
|
}
|
|
}
|
|
@keyframes loading2 {
|
|
0% {
|
|
transform: translate(0, 0);
|
|
}
|
|
100% {
|
|
transform: translate(24px, 0);
|
|
}
|
|
}
|
|
`,n.classList.add("loading"),n.innerHTML="<div></div><div></div><div></div><div></div>",t.appendChild(r),t.appendChild(n)},Oi=function(e){var t=e.loadingTemplate,n=e.theme,r=n===void 0?"light":n,i=Qe.useRef(null);Qe.useEffect(function(){!t&&i.current&&er(i.current)},[]);var a=function(){return t||Qe.createElement("div",{ref:i})};return Qe.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:r==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},a())},$n=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ii=function(e){$n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={hasError:!1},n.renderError=function(r){var i=n.props.errorTemplate;switch(r){default:return typeof i=="function"?i(r):i||Qe.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",r.message)}},n}return t.getDerivedStateFromError=function(n){return{hasError:!0,error:n}},t.getDerivedStateFromProps=function(n,r){return r.children!==n.children?{children:n.children,hasError:!1,error:void 0}:null},t.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):Qe.createElement(Qe.Fragment,null,this.props.children)},t}(Qe.Component),Ui=typeof global=="object"&&global&&global.Object===Object&&global,Ha=Ui,ao=typeof self=="object"&&self&&self.Object===Object&&self,So=Ha||ao||Function("return this")(),pi=So,_a=pi.Symbol,un=_a,It=Object.prototype,wn=It.hasOwnProperty,Wn=It.toString,Fr=un?un.toStringTag:void 0;function vi(e){var t=wn.call(e,Fr),n=e[Fr];try{e[Fr]=void 0;var r=!0}catch(a){}var i=Wn.call(e);return r&&(t?e[Fr]=n:delete e[Fr]),i}var Xi=vi,oo=Object.prototype,Fi=oo.toString;function so(e){return Fi.call(e)}var lo=so,Oo="[object Null]",Pi="[object Undefined]",da=un?un.toStringTag:void 0;function Co(e){return e==null?e===void 0?Pi:Oo:da&&da in Object(e)?Xi(e):lo(e)}var Rr=Co;function wa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gr=wa,cs="[object AsyncFunction]",ha="[object Function]",Ho="[object GeneratorFunction]",Yo="[object Proxy]";function Sa(e){if(!gr(e))return!1;var t=Rr(e);return t==ha||t==Ho||t==cs||t==Yo}var Na=Sa,pa=function(e){var t=/react|\.jsx|children:\[\(|return\s+[A-Za-z0-9].createElement\((?!['"][g|circle|ellipse|image|rect|line|polyline|polygon|text|path|html|mesh]['"])([^\)])*,/i;return t.test(e)},ka=Array.isArray,Dn=ka;function hr(){this.__data__=[],this.size=0}var Ci=hr;function Eo(e,t){return e===t||e!==e&&t!==t}var sa=Eo;function Oa(e,t){for(var n=e.length;n--;)if(sa(e[n][0],t))return n;return-1}var Ir=Oa,Ei=Array.prototype,Vo=Ei.splice;function Ca(e){var t=this.__data__,n=Ir(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Vo.call(t,n,1),--this.size,!0}var Gn=Ca;function pr(e){var t=this.__data__,n=Ir(t,e);return n<0?void 0:t[n][1]}var gi=pr;function ai(e){return Ir(this.__data__,e)>-1}var Ln=ai;function lr(e,t){var n=this.__data__,r=Ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Mr=lr;function Rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Rt.prototype.clear=Ci,Rt.prototype.delete=Gn,Rt.prototype.get=gi,Rt.prototype.has=Ln,Rt.prototype.set=Mr;var Mo=Rt;function Q(){this.__data__=new Mo,this.size=0}var Uo=Q;function Ya(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var ja=Ya;function Ki(e){return this.__data__.get(e)}var Hn=Ki;function nu(e){return this.__data__.has(e)}var Is=nu,Ls=pi["__core-js_shared__"],us=Ls,nc=function(){var e=/[^.]+$/.exec(us&&us.keys&&us.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xs(e){return!!nc&&nc in e}var fs=Xs,ru=Function.prototype,iu=ru.toString;function af(e){if(e!=null){try{return iu.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var ds=af,rc=/[\\^$.*+?()[\]{}|]/g,la=/^\[object .+?Constructor\]$/,qi=Function.prototype,B=Object.prototype,$=qi.toString,K=B.hasOwnProperty,te=RegExp("^"+$.call(K).replace(rc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ge(e){if(!gr(e)||fs(e))return!1;var t=Na(e)?te:la;return t.test(ds(e))}var be=ge;function ae(e,t){return e==null?void 0:e[t]}var oe=ae;function Ce(e,t){var n=oe(e,t);return be(n)?n:void 0}var Ee=Ce,Ot=Ee(pi,"Map"),Et=Ot,Ht=Ee(Object,"create"),mt=Ht;function Lt(){this.__data__=mt?mt(null):{},this.size=0}var Dt=Lt;function ht(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Jt=ht,Ft="__lodash_hash_undefined__",tn=Object.prototype,yt=tn.hasOwnProperty;function qt(e){var t=this.__data__;if(mt){var n=t[e];return n===Ft?void 0:n}return yt.call(t,e)?t[e]:void 0}var Nn=qt,va=Object.prototype,Ea=va.hasOwnProperty;function Bi(e){var t=this.__data__;return mt?t[e]!==void 0:Ea.call(t,e)}var ca=Bi,mi="__lodash_hash_undefined__";function zr(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=mt&&t===void 0?mi:t,this}var vr=zr;function Da(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Da.prototype.clear=Dt,Da.prototype.delete=Jt,Da.prototype.get=Nn,Da.prototype.has=ca,Da.prototype.set=vr;var _l=Da;function Va(){this.size=0,this.__data__={hash:new _l,map:new(Et||Mo),string:new _l}}var Fa=Va;function zi(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Po=zi;function To(e,t){var n=e.__data__;return Po(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Ao=To;function co(e){var t=Ao(this,e).delete(e);return this.size-=t?1:0,t}var Wd=co;function Gd(e){return Ao(this,e).get(e)}var au=Gd;function Hd(e){return Ao(this,e).has(e)}var Yd=Hd;function of(e,t){var n=Ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Vd=of;function Ns(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ns.prototype.clear=Fa,Ns.prototype.delete=Wd,Ns.prototype.get=au,Ns.prototype.has=Yd,Ns.prototype.set=Vd;var ou=Ns,Ud=200;function sf(e,t){var n=this.__data__;if(n instanceof Mo){var r=n.__data__;if(!Et||r.length<Ud-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ou(r)}return n.set(e,t),this.size=n.size,this}var lf=sf;function Ks(e){var t=this.__data__=new Mo(e);this.size=t.size}Ks.prototype.clear=Uo,Ks.prototype.delete=ja,Ks.prototype.get=Hn,Ks.prototype.has=Is,Ks.prototype.set=lf;var qs=Ks,Ji="__lodash_hash_undefined__";function su(e){return this.__data__.set(e,Ji),this}var Yr=su;function pe(e){return this.__data__.has(e)}var X=pe;function Me(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ou;++t<n;)this.add(e[t])}Me.prototype.add=Me.prototype.push=Yr,Me.prototype.has=X;var ze=Me;function Nt(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var nn=Nt;function Sn(e,t){return e.has(t)}var rn=Sn,bn=1,dn=2;function Fn(e,t,n,r,i,a){var o=n&bn,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,h=n&dn?new ze:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var p=e[f],v=t[f];if(r)var g=o?r(v,p,f,t,e,a):r(p,v,f,e,t,a);if(g!==void 0){if(g)continue;d=!1;break}if(h){if(!nn(t,function(m,b){if(!rn(h,b)&&(p===m||i(p,m,n,r,a)))return h.push(b)})){d=!1;break}}else if(!(p===v||i(p,v,n,r,a))){d=!1;break}}return a.delete(e),a.delete(t),d}var fn=Fn,kn=pi.Uint8Array,Lr=kn;function Qi(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var Ba=Qi;function yi(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var mr=yi,Ma=1,ea=2,Zi="[object Boolean]",ga="[object Date]",za="[object Error]",wl="[object Map]",ks="[object Number]",Js="[object RegExp]",hs="[object Set]",js="[object String]",Ro="[object Symbol]",Sl="[object ArrayBuffer]",lu="[object DataView]",ic=un?un.prototype:void 0,uo=ic?ic.valueOf:void 0;function cf(e,t,n,r,i,a,o){switch(n){case lu:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Sl:return!(e.byteLength!=t.byteLength||!a(new Lr(e),new Lr(t)));case Zi:case ga:case ks:return sa(+e,+t);case za:return e.name==t.name&&e.message==t.message;case Js:case js:return e==t+"";case wl:var s=Ba;case hs:var l=r&Ma;if(s||(s=mr),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=ea,o.set(e,t);var u=fn(s(e),s(t),r,i,a,o);return o.delete(e),u;case Ro:if(uo)return uo.call(e)==uo.call(t)}return!1}var Ol=cf;function uf(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ac=uf;function Xd(e,t,n){var r=t(e);return Dn(e)?r:ac(r,n(e))}var ff=Xd;function Kd(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var oc=Kd;function ps(){return[]}var Ua=ps,Qs=Object.prototype,df=Qs.propertyIsEnumerable,cu=Object.getOwnPropertySymbols,sc=cu?function(e){return e==null?[]:(e=Object(e),oc(cu(e),function(t){return df.call(e,t)}))}:Ua,uu=sc;function hf(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Cl=hf;function Io(e){return e!=null&&typeof e=="object"}var $i=Io,lc="[object Arguments]";function qd(e){return $i(e)&&Rr(e)==lc}var Ds=qd,El=Object.prototype,xr=El.hasOwnProperty,pf=El.propertyIsEnumerable,vf=Ds(function(){return arguments}())?Ds:function(e){return $i(e)&&xr.call(e,"callee")&&!pf.call(e,"callee")},Xa=vf;function Jd(){return!1}var gf=Jd,cc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,uc=cc&&typeof module=="object"&&module&&!module.nodeType&&module,fu=uc&&uc.exports===cc,fc=fu?pi.Buffer:void 0,Qd=fc?fc.isBuffer:void 0,eh=Qd||gf,Ml=eh,th=9007199254740991,mf=/^(?:0|[1-9]\d*)$/;function dc(e,t){var n=typeof e;return t=t==null?th:t,!!t&&(n=="number"||n!="symbol"&&mf.test(e))&&e>-1&&e%1==0&&e<t}var Wi=dc,bi=9007199254740991;function Ti(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=bi}var Xo=Ti,Pa="[object Arguments]",Lo="[object Array]",Pl="[object Boolean]",Tl="[object Date]",yf="[object Error]",Vy="[object Function]",O0="[object Map]",Uy="[object Number]",C0="[object Object]",Xy="[object RegExp]",E0="[object Set]",Ky="[object String]",qy="[object WeakMap]",Ko="[object ArrayBuffer]",nh="[object DataView]",Jy="[object Float32Array]",hC="[object Float64Array]",Qy="[object Int8Array]",pC="[object Int16Array]",e1="[object Int32Array]",vC="[object Uint8Array]",t1="[object Uint8ClampedArray]",gC="[object Uint16Array]",n1="[object Uint32Array]",oi={};oi[Jy]=oi[hC]=oi[Qy]=oi[pC]=oi[e1]=oi[vC]=oi[t1]=oi[gC]=oi[n1]=!0,oi[Pa]=oi[Lo]=oi[Ko]=oi[Pl]=oi[nh]=oi[Tl]=oi[yf]=oi[Vy]=oi[O0]=oi[Uy]=oi[C0]=oi[Xy]=oi[E0]=oi[Ky]=oi[qy]=!1;function r1(e){return $i(e)&&Xo(e.length)&&!!oi[Rr(e)]}var mC=r1;function i1(e){return function(t){return e(t)}}var M0=i1,P0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bf=P0&&typeof module=="object"&&module&&!module.nodeType&&module,a1=bf&&bf.exports===P0,T0=a1&&Ha.process,o1=function(){try{var e=bf&&bf.require&&bf.require("util").types;return e||T0&&T0.binding&&T0.binding("util")}catch(t){}}(),qo=o1,du=qo&&qo.isTypedArray,s1=du?M0(du):mC,rh=s1,l1=Object.prototype,c1=l1.hasOwnProperty;function u1(e,t){var n=Dn(e),r=!n&&Xa(e),i=!n&&!r&&Ml(e),a=!n&&!r&&!i&&rh(e),o=n||r||i||a,s=o?Cl(e.length,String):[],l=s.length;for(var c in e)(t||c1.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Wi(c,l)))&&s.push(c);return s}var A0=u1,f1=Object.prototype;function d1(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||f1;return e===n}var hu=d1;function R0(e,t){return function(n){return e(t(n))}}var I0=R0,h1=I0(Object.keys,Object),p1=h1,v1=Object.prototype,g1=v1.hasOwnProperty;function m1(e){if(!hu(e))return p1(e);var t=[];for(var n in Object(e))g1.call(e,n)&&n!="constructor"&&t.push(n);return t}var L0=m1;function y1(e){return e!=null&&Xo(e.length)&&!Na(e)}var Fs=y1;function b1(e){return Fs(e)?A0(e):L0(e)}var vs=b1;function x1(e){return ff(e,vs,uu)}var ih=x1,_1=1,w1=Object.prototype,S1=w1.hasOwnProperty;function N0(e,t,n,r,i,a){var o=n&_1,s=ih(e),l=s.length,c=ih(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:S1.call(t,d)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var v=!0;a.set(e,t),a.set(t,e);for(var g=o;++f<l;){d=s[f];var m=e[d],b=t[d];if(r)var _=o?r(b,m,d,t,e,a):r(m,b,d,e,t,a);if(!(_===void 0?m===b||i(m,b,n,r,a):_)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var S=e.constructor,O=t.constructor;S!=O&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof O=="function"&&O instanceof O)&&(v=!1)}return a.delete(e),a.delete(t),v}var O1=N0,C1=Ee(pi,"DataView"),ah=C1,xf=Ee(pi,"Promise"),oh=xf,E1=Ee(pi,"Set"),hc=E1,k0=Ee(pi,"WeakMap"),pu=k0,j0="[object Map]",M1="[object Object]",D0="[object Promise]",F0="[object Set]",B0="[object WeakMap]",z0="[object DataView]",P1=ds(ah),T1=ds(Et),A1=ds(oh),R1=ds(hc),I1=ds(pu),Al=Rr;(ah&&Al(new ah(new ArrayBuffer(1)))!=z0||Et&&Al(new Et)!=j0||oh&&Al(oh.resolve())!=D0||hc&&Al(new hc)!=F0||pu&&Al(new pu)!=B0)&&(Al=function(e){var t=Rr(e),n=t==M1?e.constructor:void 0,r=n?ds(n):"";if(r)switch(r){case P1:return z0;case T1:return j0;case A1:return D0;case R1:return F0;case I1:return B0}return t});var pc=Al,L1=1,Z0="[object Arguments]",$0="[object Array]",_f="[object Object]",W0=Object.prototype,G0=W0.hasOwnProperty;function N1(e,t,n,r,i,a){var o=Dn(e),s=Dn(t),l=o?$0:pc(e),c=s?$0:pc(t);l=l==Z0?_f:l,c=c==Z0?_f:c;var u=l==_f,f=c==_f,d=l==c;if(d&&Ml(e)){if(!Ml(t))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new qs),o||rh(e)?fn(e,t,n,r,i,a):Ol(e,t,l,n,r,i,a);if(!(n&L1)){var h=u&&G0.call(e,"__wrapped__"),p=f&&G0.call(t,"__wrapped__");if(h||p){var v=h?e.value():e,g=p?t.value():t;return a||(a=new qs),i(v,g,n,r,a)}}return d?(a||(a=new qs),O1(e,t,n,r,i,a)):!1}var k1=N1;function H0(e,t,n,r,i){return e===t?!0:e==null||t==null||!$i(e)&&!$i(t)?e!==e&&t!==t:k1(e,t,n,r,H0,i)}var sh=H0;function j1(e,t){return sh(e,t)}var Y0=j1;function D1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var F1=D1,B1=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),wf=B1;function z1(e,t,n){t=="__proto__"&&wf?wf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Sf=z1,Z1=Object.prototype,$1=Z1.hasOwnProperty;function W1(e,t,n){var r=e[t];(!($1.call(e,t)&&sa(r,n))||n===void 0&&!(t in e))&&Sf(e,t,n)}var Of=W1;function G1(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?Sf(n,s,l):Of(n,s,l)}return n}var Rl=G1;function H1(e,t){return e&&Rl(t,vs(t),e)}var Y1=H1;function V1(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var U1=V1,X1=Object.prototype,K1=X1.hasOwnProperty;function q1(e){if(!gr(e))return U1(e);var t=hu(e),n=[];for(var r in e)r=="constructor"&&(t||!K1.call(e,r))||n.push(r);return n}var J1=q1;function Q1(e){return Fs(e)?A0(e,!0):J1(e)}var vu=Q1;function eb(e,t){return e&&Rl(t,vu(t),e)}var lh=eb,V0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,U0=V0&&typeof module=="object"&&module&&!module.nodeType&&module,tb=U0&&U0.exports===V0,X0=tb?pi.Buffer:void 0,ch=X0?X0.allocUnsafe:void 0;function Cf(e,t){if(t)return e.slice();var n=e.length,r=ch?ch(n):new e.constructor(n);return e.copy(r),r}var uh=Cf;function K0(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var fh=K0;function nb(e,t){return Rl(e,uu(e),t)}var yC=nb,q0=I0(Object.getPrototypeOf,Object),dh=q0,rb=Object.getOwnPropertySymbols,ib=rb?function(e){for(var t=[];e;)ac(t,uu(e)),e=dh(e);return t}:Ua,J0=ib;function ab(e,t){return Rl(e,J0(e),t)}var Q0=ab;function ob(e){return ff(e,vu,J0)}var ev=ob,sb=Object.prototype,lb=sb.hasOwnProperty;function cb(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&lb.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ub=cb;function fb(e){var t=new e.constructor(e.byteLength);return new Lr(t).set(new Lr(e)),t}var hh=fb;function db(e,t){var n=t?hh(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var hb=db,tv=/\w*$/;function bC(e){var t=new e.constructor(e.source,tv.exec(e));return t.lastIndex=e.lastIndex,t}var pb=bC,Ef=un?un.prototype:void 0,vb=Ef?Ef.valueOf:void 0;function gb(e){return vb?Object(vb.call(e)):{}}var mb=gb;function xC(e,t){var n=t?hh(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ph=xC,yb="[object Boolean]",bb="[object Date]",xb="[object Map]",nv="[object Number]",Mf="[object RegExp]",_b="[object Set]",rv="[object String]",iv="[object Symbol]",wb="[object ArrayBuffer]",av="[object DataView]",vh="[object Float32Array]",gh="[object Float64Array]",mh="[object Int8Array]",ov="[object Int16Array]",sv="[object Int32Array]",Sb="[object Uint8Array]",_C="[object Uint8ClampedArray]",Ob="[object Uint16Array]",Cb="[object Uint32Array]";function Eb(e,t,n){var r=e.constructor;switch(t){case wb:return hh(e);case yb:case bb:return new r(+e);case av:return hb(e,n);case vh:case gh:case mh:case ov:case sv:case Sb:case _C:case Ob:case Cb:return ph(e,n);case xb:return new r;case nv:case rv:return new r(e);case Mf:return pb(e);case _b:return new r;case iv:return mb(e)}}var Mb=Eb,Pb=Object.create,Pf=function(){function e(){}return function(t){if(!gr(t))return{};if(Pb)return Pb(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),yh=Pf;function wC(e){return typeof e.constructor=="function"&&!hu(e)?yh(dh(e)):{}}var lv=wC,SC="[object Map]";function Tb(e){return $i(e)&&pc(e)==SC}var Ab=Tb,cv=qo&&qo.isMap,Rb=cv?M0(cv):Ab,Ib=Rb,Lb="[object Set]";function OC(e){return $i(e)&&pc(e)==Lb}var Nb=OC,vc=qo&&qo.isSet,uv=vc?M0(vc):Nb,kb=uv,jb=1,Db=2,Fb=4,fv="[object Arguments]",bh="[object Array]",Bb="[object Boolean]",xh="[object Date]",zb="[object Error]",dv="[object Function]",Zb="[object GeneratorFunction]",$b="[object Map]",Wb="[object Number]",hv="[object Object]",Gb="[object RegExp]",pv="[object Set]",vv="[object String]",Hb="[object Symbol]",Yb="[object WeakMap]",Vb="[object ArrayBuffer]",Ub="[object DataView]",Xb="[object Float32Array]",Kb="[object Float64Array]",qb="[object Int8Array]",Jb="[object Int16Array]",Qb="[object Int32Array]",ex="[object Uint8Array]",tx="[object Uint8ClampedArray]",nx="[object Uint16Array]",rx="[object Uint32Array]",Vr={};Vr[fv]=Vr[bh]=Vr[Vb]=Vr[Ub]=Vr[Bb]=Vr[xh]=Vr[Xb]=Vr[Kb]=Vr[qb]=Vr[Jb]=Vr[Qb]=Vr[$b]=Vr[Wb]=Vr[hv]=Vr[Gb]=Vr[pv]=Vr[vv]=Vr[Hb]=Vr[ex]=Vr[tx]=Vr[nx]=Vr[rx]=!0,Vr[zb]=Vr[dv]=Vr[Yb]=!1;function Tf(e,t,n,r,i,a){var o,s=t&jb,l=t&Db,c=t&Fb;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!gr(e))return e;var u=Dn(e);if(u){if(o=ub(e),!s)return fh(e,o)}else{var f=pc(e),d=f==dv||f==Zb;if(Ml(e))return uh(e,s);if(f==hv||f==fv||d&&!i){if(o=l||d?{}:lv(e),!s)return l?Q0(e,lh(o,e)):yC(e,Y1(o,e))}else{if(!Vr[f])return i?e:{};o=Mb(e,f,s)}}a||(a=new qs);var h=a.get(e);if(h)return h;a.set(e,o),kb(e)?e.forEach(function(g){o.add(Tf(g,t,n,g,e,a))}):Ib(e)&&e.forEach(function(g,m){o.set(m,Tf(g,t,n,m,e,a))});var p=c?l?ev:ih:l?vu:vs,v=u?void 0:p(e);return F1(v||e,function(g,m){v&&(m=g,g=e[m]),Of(o,m,Tf(g,t,n,m,e,a))}),o}var gv=Tf,ix=1,ax=4;function ox(e){return gv(e,ix|ax)}var mv=ox,sx="[object Symbol]";function lx(e){return typeof e=="symbol"||$i(e)&&Rr(e)==sx}var gu=lx,cx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yv=/^\w*$/;function ux(e,t){if(Dn(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||gu(e)?!0:yv.test(e)||!cx.test(e)||t!=null&&e in Object(t)}var _h=ux,fx="Expected a function";function wh(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(fx);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(wh.Cache||ou),n}wh.Cache=ou;var dx=wh,hx=500;function px(e){var t=dx(e,function(r){return n.size===hx&&n.clear(),r}),n=t.cache;return t}var vx=px,gx=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mx=/\\(\\)?/g,yx=vx(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gx,function(n,r,i,a){t.push(i?a.replace(mx,"$1"):r||n)}),t}),bx=yx;function xx(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Af=xx,_x=1/0,bv=un?un.prototype:void 0,xv=bv?bv.toString:void 0;function _v(e){if(typeof e=="string")return e;if(Dn(e))return Af(e,_v)+"";if(gu(e))return xv?xv.call(e):"";var t=e+"";return t=="0"&&1/e==-_x?"-0":t}var Sh=_v;function wx(e){return e==null?"":Sh(e)}var Oh=wx;function Sx(e,t){return Dn(e)?e:_h(e,t)?[e]:bx(Oh(e))}var gc=Sx,Ox=1/0;function Cx(e){if(typeof e=="string"||gu(e))return e;var t=e+"";return t=="0"&&1/e==-Ox?"-0":t}var mc=Cx;function wv(e,t){t=gc(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[mc(t[n++])];return n&&n==r?e:void 0}var Rf=wv;function Ex(e,t,n){var r=e==null?void 0:Rf(e,t);return r===void 0?n:r}var Zr=Ex,mu=function(){return mu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},mu.apply(this,arguments)},Sv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Mx(e,t){var n=(0,Qe.useRef)(),r=(0,Qe.useRef)(),i=(0,Qe.useRef)(null),a=t.onReady,o=t.onEvent,s=function(u,f){var d;u===void 0&&(u="image/png");var h=(d=i.current)===null||d===void 0?void 0:d.getElementsByTagName("canvas")[0];return h==null?void 0:h.toDataURL(u,f)},l=function(u,f,d){u===void 0&&(u="download"),f===void 0&&(f="image/png");var h=u;u.indexOf(".")===-1&&(h="".concat(u,".").concat(f.split("/")[1]));var p=s(f,d),v=document.createElement("a");return v.href=p,v.download=h,document.body.appendChild(v),v.click(),document.body.removeChild(v),v=null,h},c=function(u,f){f===void 0&&(f=!1);var d=Object.keys(u),h=f;d.forEach(function(p){var v=u[p];p==="tooltip"&&(h=!0),Na(v)&&pa("".concat(v))?u[p]=function(){for(var g=[],m=0;m<arguments.length;m++)g[m]=arguments[m];return Hr(v.apply(void 0,g),h)}:Dn(v)?v.forEach(function(g){c(g,h)}):gr(v)?c(v,h):h=f})};return(0,Qe.useEffect)(function(){if(n.current&&!Y0(r.current,t)){var u=!1;if(r.current){var f=r.current,d=f.data,h=Sv(f,["data"]),p=t.data,v=Sv(t,["data"]);u=Y0(h,v)}r.current=mv(t),u?n.current.changeData(Zr(t,"data")):(c(t),n.current.update(t),n.current.render())}},[t]),(0,Qe.useEffect)(function(){if(!i.current)return function(){return null};r.current||(r.current=mv(t)),c(t);var u=new e(i.current,mu({},t));u.toDataURL=s,u.downloadImage=l,u.render(),n.current=u,a&&a(u);var f=function(d){o&&o(u,d)};return u.on("*",f),function(){n.current&&(n.current.destroy(),n.current.off("*",f),n.current=void 0)}},[]),{chart:n,container:i}}var Ov="*",Px=function(){function e(){this._events={}}return e.prototype.on=function(t,n,r){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:n,once:!!r}),this},e.prototype.once=function(t,n){return this.on(t,n,!0)},e.prototype.emit=function(t){for(var n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var a=this._events[t]||[],o=this._events[Ov]||[],s=function(l){for(var c=l.length,u=0;u<c;u++)if(l[u]){var f=l[u],d=f.callback,h=f.once;h&&(l.splice(u,1),l.length===0&&delete n._events[t],c--,u--),d.apply(n,r)}};s(a),s(o)},e.prototype.off=function(t,n){if(!t)this._events={};else if(!n)delete this._events[t];else{for(var r=this._events[t]||[],i=r.length,a=0;a<i;a++)r[a].callback===n&&(r.splice(a,1),i--,a--);r.length===0&&delete this._events[t]}return this},e.prototype.getEvents=function(){return this._events},e}(),If=Px,Ch=function(e,t){return Ch=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ch(e,t)};function zt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ch(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ie=function(){return Ie=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ie.apply(this,arguments)};function Sr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Tx(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function Cv(e,t){return function(n,r){t(n,r,e)}}function CC(e,t,n,r,i,a){function o(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var s=r.kind,l=s==="getter"?"get":s==="setter"?"set":"value",c=!t&&e?r.static?e:e.prototype:null,u=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f,d=!1,h=n.length-1;h>=0;h--){var p={};for(var v in r)p[v]=v==="access"?{}:r[v];for(var v in r.access)p.access[v]=r.access[v];p.addInitializer=function(m){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(m||null))};var g=(0,n[h])(s==="accessor"?{get:u.get,set:u.set}:u[l],p);if(s==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(f=o(g.get))&&(u.get=f),(f=o(g.set))&&(u.set=f),(f=o(g.init))&&i.unshift(f)}else(f=o(g))&&(s==="field"?i.unshift(f):u[l]=f)}c&&Object.defineProperty(c,r.name,u),d=!0}function EC(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function MC(e){return typeof e=="symbol"?e:"".concat(e)}function PC(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function Ax(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function el(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function Il(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var x=Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function y(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&x(t,e,n)}function M(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function k(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(w(arguments[t]));return e}function U(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function N(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function V(e){return this instanceof V?(this.v=e,this):new V(e)}function q(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(d){r[d]&&(i[d]=function(h){return new Promise(function(p,v){a.push([d,h,p,v])>1||s(d,h)})})}function s(d,h){try{l(r[d](h))}catch(p){f(a[0][3],p)}}function l(d){d.value instanceof V?Promise.resolve(d.value.v).then(c,u):f(a[0][2],d)}function c(d){s("next",d)}function u(d){s("throw",d)}function f(d,h){d(h),a.shift(),a.length&&s(a[0][0],a[0][1])}}function ee(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:V(e[i](o)),done:!1}:a?a(o):o}:a}}function ie(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof M=="function"?M(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(s,l){o=e[a](o),i(s,l,o.done,o.value)})}}function i(a,o,s,l){Promise.resolve(l).then(function(c){a({value:c,done:s})},o)}}function fe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var ve=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function Se(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&x(t,e,n);return ve(t,e),t}function ue(e){return e&&e.__esModule?e:{default:e}}function de(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function ye(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function _e(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function xe(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var Ue=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Ye(e){function t(r){e.error=e.hasError?new Ue(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return t(a),n()})}catch(a){t(a)}}if(e.hasError)throw e.error}return n()}var ft={__extends:zt,__assign:Ie,__rest:Sr,__decorate:Tx,__param:Cv,__metadata:Ax,__awaiter:el,__generator:Il,__createBinding:x,__exportStar:y,__values:M,__read:w,__spread:k,__spreadArrays:U,__spreadArray:N,__await:V,__asyncGenerator:q,__asyncDelegator:ee,__asyncValues:ie,__makeTemplateObject:fe,__importStar:Se,__importDefault:ue,__classPrivateFieldGet:de,__classPrivateFieldSet:ye,__classPrivateFieldIn:_e,__addDisposableResource:xe,__disposeResources:Ye},at=Y(38554),Le=at,je=1e-6,Pe=typeof Float32Array!="undefined"?Float32Array:Array,Te=Math.random;function Oe(e){Pe=e}var Ve=Math.PI/180;function Mt(e){return e*Ve}function it(e,t){return Math.abs(e-t)<=je*Math.max(1,Math.abs(e),Math.abs(t))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});function le(){var e=new Pe(3);return Pe!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Ze(e){var t=new Pe(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ke(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function nt(e,t,n){var r=new Pe(3);return r[0]=e,r[1]=t,r[2]=n,r}function Ge(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Ae(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function $e(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function st(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function ut(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function Pt(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function lt(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function dt(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function tt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function ct(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function Zt(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function Wt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function Rn(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function ar(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.hypot(n,r,i)}function hn(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function Yn(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function Or(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function Ai(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function Yt(e,t){var n=t[0],r=t[1],i=t[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function qe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function pt(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],l=n[2];return e[0]=i*l-a*s,e[1]=a*o-r*l,e[2]=r*s-i*o,e}function bt(e,t,n,r){var i=t[0],a=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e}function yn(e,t,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,c=o*(a-1),u=o*(3-2*a);return e[0]=t[0]*s+n[0]*l+r[0]*c+i[0]*u,e[1]=t[1]*s+n[1]*l+r[1]*c+i[1]*u,e[2]=t[2]*s+n[2]*l+r[2]*c+i[2]*u,e}function On(e,t,n,r,i,a){var o=1-a,s=o*o,l=a*a,c=s*o,u=3*a*s,f=3*l*o,d=l*a;return e[0]=t[0]*c+n[0]*u+r[0]*f+i[0]*d,e[1]=t[1]*c+n[1]*u+r[1]*f+i[1]*d,e[2]=t[2]*c+n[2]*u+r[2]*f+i[2]*d,e}function pn(e,t){t=t||1;var n=glMatrix.RANDOM()*2*Math.PI,r=glMatrix.RANDOM()*2-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}function tr(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,e[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,e[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,e}function Ur(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=r*n[0]+i*n[3]+a*n[6],e[1]=r*n[1]+i*n[4]+a*n[7],e[2]=r*n[2]+i*n[5]+a*n[8],e}function fo(e,t,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=t[0],l=t[1],c=t[2],u=i*c-a*l,f=a*s-r*c,d=r*l-i*s,h=i*d-a*f,p=a*u-r*d,v=r*f-i*u,g=o*2;return u*=g,f*=g,d*=g,h*=2,p*=2,v*=2,e[0]=s+u+h,e[1]=l+f+p,e[2]=c+d+v,e}function Za(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function yc(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function Ll(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function Nl(e,t){var n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],s=t[2],l=Math.sqrt(n*n+r*r+i*i),c=Math.sqrt(a*a+o*o+s*s),u=l*c,f=u&&qe(e,t)/u;return Math.acos(Math.min(Math.max(f,-1),1))}function ho(e){return e[0]=0,e[1]=0,e[2]=0,e}function kl(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function yu(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function po(e,t){var n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],s=t[2];return Math.abs(n-a)<=je*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=je*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=je*Math.max(1,Math.abs(i),Math.abs(s))}var Bs=null,ta=null,si=null,vt=ar,xn=null,mn=Ke,ma=null,gs=function(){var e=le();return function(t,n,r,i,a,o){var s,l;for(n||(n=3),r||(r=0),i?l=Math.min(i*n+r,t.length):l=t.length,s=r;s<l;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}}();function cr(){var e=new Pe(16);return Pe!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function bc(e){var t=new Pe(16);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 Jo(e,t){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 Rx(e,t,n,r,i,a,o,s,l,c,u,f,d,h,p,v){var g=new Pe(16);return g[0]=e,g[1]=t,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=f,g[12]=d,g[13]=h,g[14]=p,g[15]=v,g}function Eh(e,t,n,r,i,a,o,s,l,c,u,f,d,h,p,v,g){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=l,e[8]=c,e[9]=u,e[10]=f,e[11]=d,e[12]=h,e[13]=p,e[14]=v,e[15]=g,e}function ms(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ev(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function No(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],m=t[15],b=n*s-r*o,_=n*l-i*o,S=n*c-a*o,O=r*l-i*s,C=r*c-a*s,E=i*c-a*l,P=u*v-f*p,T=u*g-d*p,A=u*m-h*p,R=f*g-d*v,z=f*m-h*v,I=d*m-h*g,L=b*I-_*z+S*R+O*A-C*T+E*P;return L?(L=1/L,e[0]=(s*I-l*z+c*R)*L,e[1]=(i*z-r*I-a*R)*L,e[2]=(v*E-g*C+m*O)*L,e[3]=(d*C-f*E-h*O)*L,e[4]=(l*A-o*I-c*T)*L,e[5]=(n*I-i*A+a*T)*L,e[6]=(g*S-p*E-m*_)*L,e[7]=(u*E-d*S+h*_)*L,e[8]=(o*z-s*A+c*P)*L,e[9]=(r*A-n*z-a*P)*L,e[10]=(p*C-v*S+m*b)*L,e[11]=(f*S-u*C-h*b)*L,e[12]=(s*T-o*R-l*P)*L,e[13]=(n*R-r*T+i*P)*L,e[14]=(v*_-p*O-g*b)*L,e[15]=(u*O-f*_+d*b)*L,e):null}function Mv(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],m=t[15];return e[0]=s*(d*m-h*g)-f*(l*m-c*g)+v*(l*h-c*d),e[1]=-(r*(d*m-h*g)-f*(i*m-a*g)+v*(i*h-a*d)),e[2]=r*(l*m-c*g)-s*(i*m-a*g)+v*(i*c-a*l),e[3]=-(r*(l*h-c*d)-s*(i*h-a*d)+f*(i*c-a*l)),e[4]=-(o*(d*m-h*g)-u*(l*m-c*g)+p*(l*h-c*d)),e[5]=n*(d*m-h*g)-u*(i*m-a*g)+p*(i*h-a*d),e[6]=-(n*(l*m-c*g)-o*(i*m-a*g)+p*(i*c-a*l)),e[7]=n*(l*h-c*d)-o*(i*h-a*d)+u*(i*c-a*l),e[8]=o*(f*m-h*v)-u*(s*m-c*v)+p*(s*h-c*f),e[9]=-(n*(f*m-h*v)-u*(r*m-a*v)+p*(r*h-a*f)),e[10]=n*(s*m-c*v)-o*(r*m-a*v)+p*(r*c-a*s),e[11]=-(n*(s*h-c*f)-o*(r*h-a*f)+u*(r*c-a*s)),e[12]=-(o*(f*g-d*v)-u*(s*g-l*v)+p*(s*d-l*f)),e[13]=n*(f*g-d*v)-u*(r*g-i*v)+p*(r*d-i*f),e[14]=-(n*(s*g-l*v)-o*(r*g-i*v)+p*(r*l-i*s)),e[15]=n*(s*d-l*f)-o*(r*d-i*f)+u*(r*l-i*s),e}function Mh(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],d=e[11],h=e[12],p=e[13],v=e[14],g=e[15],m=t*o-n*a,b=t*s-r*a,_=t*l-i*a,S=n*s-r*o,O=n*l-i*o,C=r*l-i*s,E=c*p-u*h,P=c*v-f*h,T=c*g-d*h,A=u*v-f*p,R=u*g-d*p,z=f*g-d*v;return m*z-b*R+_*A+S*T-O*P+C*E}function ya(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],d=t[9],h=t[10],p=t[11],v=t[12],g=t[13],m=t[14],b=t[15],_=n[0],S=n[1],O=n[2],C=n[3];return e[0]=_*r+S*s+O*f+C*v,e[1]=_*i+S*l+O*d+C*g,e[2]=_*a+S*c+O*h+C*m,e[3]=_*o+S*u+O*p+C*b,_=n[4],S=n[5],O=n[6],C=n[7],e[4]=_*r+S*s+O*f+C*v,e[5]=_*i+S*l+O*d+C*g,e[6]=_*a+S*c+O*h+C*m,e[7]=_*o+S*u+O*p+C*b,_=n[8],S=n[9],O=n[10],C=n[11],e[8]=_*r+S*s+O*f+C*v,e[9]=_*i+S*l+O*d+C*g,e[10]=_*a+S*c+O*h+C*m,e[11]=_*o+S*u+O*p+C*b,_=n[12],S=n[13],O=n[14],C=n[15],e[12]=_*r+S*s+O*f+C*v,e[13]=_*i+S*l+O*d+C*g,e[14]=_*a+S*c+O*h+C*m,e[15]=_*o+S*u+O*p+C*b,e}function zs(e,t,n){var r=n[0],i=n[1],a=n[2],o,s,l,c,u,f,d,h,p,v,g,m;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*a+t[12],e[13]=t[1]*r+t[5]*i+t[9]*a+t[13],e[14]=t[2]*r+t[6]*i+t[10]*a+t[14],e[15]=t[3]*r+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],c=t[3],u=t[4],f=t[5],d=t[6],h=t[7],p=t[8],v=t[9],g=t[10],m=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=c,e[4]=u,e[5]=f,e[6]=d,e[7]=h,e[8]=p,e[9]=v,e[10]=g,e[11]=m,e[12]=o*r+u*i+p*a+t[12],e[13]=s*r+f*i+v*a+t[13],e[14]=l*r+d*i+g*a+t[14],e[15]=c*r+h*i+m*a+t[15]),e}function Lf(e,t,n){var r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Ix(e,t,n,r){var i=r[0],a=r[1],o=r[2],s=Math.hypot(i,a,o),l,c,u,f,d,h,p,v,g,m,b,_,S,O,C,E,P,T,A,R,z,I,L,F;return s<je?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(n),c=Math.cos(n),u=1-c,f=t[0],d=t[1],h=t[2],p=t[3],v=t[4],g=t[5],m=t[6],b=t[7],_=t[8],S=t[9],O=t[10],C=t[11],E=i*i*u+c,P=a*i*u+o*l,T=o*i*u-a*l,A=i*a*u-o*l,R=a*a*u+c,z=o*a*u+i*l,I=i*o*u+a*l,L=a*o*u-i*l,F=o*o*u+c,e[0]=f*E+v*P+_*T,e[1]=d*E+g*P+S*T,e[2]=h*E+m*P+O*T,e[3]=p*E+b*P+C*T,e[4]=f*A+v*R+_*z,e[5]=d*A+g*R+S*z,e[6]=h*A+m*R+O*z,e[7]=p*A+b*R+C*z,e[8]=f*I+v*L+_*F,e[9]=d*I+g*L+S*F,e[10]=h*I+m*L+O*F,e[11]=p*I+b*L+C*F,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function $t(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*r,e[5]=o*i+u*r,e[6]=s*i+f*r,e[7]=l*i+d*r,e[8]=c*i-a*r,e[9]=u*i-o*r,e[10]=f*i-s*r,e[11]=d*i-l*r,e}function Ut(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],f=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*r,e[1]=o*i-u*r,e[2]=s*i-f*r,e[3]=l*i-d*r,e[8]=a*r+c*i,e[9]=o*r+u*i,e[10]=s*r+f*i,e[11]=l*r+d*i,e}function or(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],f=t[6],d=t[7];return t!==e&&(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[0]=a*i+c*r,e[1]=o*i+u*r,e[2]=s*i+f*r,e[3]=l*i+d*r,e[4]=c*i-a*r,e[5]=u*i-o*r,e[6]=f*i-s*r,e[7]=d*i-l*r,e}function Xr(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function vo(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Zs(e,t,n){var r=n[0],i=n[1],a=n[2],o=Math.hypot(r,i,a),s,l,c;return o<je?null:(o=1/o,r*=o,i*=o,a*=o,s=Math.sin(t),l=Math.cos(t),c=1-l,e[0]=r*r*c+l,e[1]=i*r*c+a*s,e[2]=a*r*c-i*s,e[3]=0,e[4]=r*i*c-a*s,e[5]=i*i*c+l,e[6]=a*i*c+r*s,e[7]=0,e[8]=r*a*c+i*s,e[9]=i*a*c-r*s,e[10]=a*a*c+l,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function Qo(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function A8(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function R8(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function TC(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=r+r,l=i+i,c=a+a,u=r*s,f=r*l,d=r*c,h=i*l,p=i*c,v=a*c,g=o*s,m=o*l,b=o*c;return e[0]=1-(h+v),e[1]=f+b,e[2]=d-m,e[3]=0,e[4]=f-b,e[5]=1-(u+v),e[6]=p+g,e[7]=0,e[8]=d+m,e[9]=p-g,e[10]=1-(u+h),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function I8(e,t){var n=new Pe(3),r=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=r*r+i*i+a*a+o*o;return f>0?(n[0]=(s*o+u*r+l*a-c*i)*2/f,n[1]=(l*o+u*i+c*r-s*a)*2/f,n[2]=(c*o+u*a+s*i-l*r)*2/f):(n[0]=(s*o+u*r+l*a-c*i)*2,n[1]=(l*o+u*i+c*r-s*a)*2,n[2]=(c*o+u*a+s*i-l*r)*2),TC(e,t,n),e}function Pv(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Nf(e,t){var n=t[0],r=t[1],i=t[2],a=t[4],o=t[5],s=t[6],l=t[8],c=t[9],u=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(a,o,s),e[2]=Math.hypot(l,c,u),e}function Tv(e,t){var n=new Pe(3);Nf(n,t);var r=1/n[0],i=1/n[1],a=1/n[2],o=t[0]*r,s=t[1]*i,l=t[2]*a,c=t[4]*r,u=t[5]*i,f=t[6]*a,d=t[8]*r,h=t[9]*i,p=t[10]*a,v=o+u+p,g=0;return v>0?(g=Math.sqrt(v+1)*2,e[3]=.25*g,e[0]=(f-h)/g,e[1]=(d-l)/g,e[2]=(s-c)/g):o>u&&o>p?(g=Math.sqrt(1+o-u-p)*2,e[3]=(f-h)/g,e[0]=.25*g,e[1]=(s+c)/g,e[2]=(d+l)/g):u>p?(g=Math.sqrt(1+u-o-p)*2,e[3]=(d-l)/g,e[0]=(s+c)/g,e[1]=.25*g,e[2]=(f+h)/g):(g=Math.sqrt(1+p-o-u)*2,e[3]=(s-c)/g,e[0]=(d+l)/g,e[1]=(f+h)/g,e[2]=.25*g),e}function L8(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3],l=i+i,c=a+a,u=o+o,f=i*l,d=i*c,h=i*u,p=a*c,v=a*u,g=o*u,m=s*l,b=s*c,_=s*u,S=r[0],O=r[1],C=r[2];return e[0]=(1-(p+g))*S,e[1]=(d+_)*S,e[2]=(h-b)*S,e[3]=0,e[4]=(d-_)*O,e[5]=(1-(f+g))*O,e[6]=(v+m)*O,e[7]=0,e[8]=(h+b)*C,e[9]=(v-m)*C,e[10]=(1-(f+p))*C,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function Ph(e,t,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],c=a+a,u=o+o,f=s+s,d=a*c,h=a*u,p=a*f,v=o*u,g=o*f,m=s*f,b=l*c,_=l*u,S=l*f,O=r[0],C=r[1],E=r[2],P=i[0],T=i[1],A=i[2],R=(1-(v+m))*O,z=(h+S)*O,I=(p-_)*O,L=(h-S)*C,F=(1-(d+m))*C,Z=(g+b)*C,H=(p+_)*E,W=(g-b)*E,G=(1-(d+v))*E;return e[0]=R,e[1]=z,e[2]=I,e[3]=0,e[4]=L,e[5]=F,e[6]=Z,e[7]=0,e[8]=H,e[9]=W,e[10]=G,e[11]=0,e[12]=n[0]+P-(R*P+L*T+H*A),e[13]=n[1]+T-(z*P+F*T+W*A),e[14]=n[2]+A-(I*P+Z*T+G*A),e[15]=1,e}function Lx(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,l=i+i,c=n*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*l,v=a*o,g=a*s,m=a*l;return e[0]=1-f-p,e[1]=u+m,e[2]=d-g,e[3]=0,e[4]=u-m,e[5]=1-c-p,e[6]=h+v,e[7]=0,e[8]=d+g,e[9]=h-v,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function N8(e,t,n,r,i,a,o){var s=1/(n-t),l=1/(i-r),c=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}function AC(e,t,n,r,i){var a=1/Math.tan(t/2),o;return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e}var k8=AC;function j8(e,t,n,r,i){var a=1/Math.tan(t/2),o;return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0?(o=1/(r-i),e[10]=i*o,e[14]=i*r*o):(e[10]=-1,e[14]=-r),e}function D8(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}function RC(e,t,n,r,i,a,o){var s=1/(t-n),l=1/(r-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(o+a)*c,e[15]=1,e}var IC=RC;function LC(e,t,n,r,i,a,o){var s=1/(t-n),l=1/(r-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=a*c,e[15]=1,e}function NC(e,t,n,r){var i,a,o,s,l,c,u,f,d,h,p=t[0],v=t[1],g=t[2],m=r[0],b=r[1],_=r[2],S=n[0],O=n[1],C=n[2];return Math.abs(p-S)<je&&Math.abs(v-O)<je&&Math.abs(g-C)<je?ms(e):(u=p-S,f=v-O,d=g-C,h=1/Math.hypot(u,f,d),u*=h,f*=h,d*=h,i=b*d-_*f,a=_*u-m*d,o=m*f-b*u,h=Math.hypot(i,a,o),h?(h=1/h,i*=h,a*=h,o*=h):(i=0,a=0,o=0),s=f*o-d*a,l=d*i-u*o,c=u*a-f*i,h=Math.hypot(s,l,c),h?(h=1/h,s*=h,l*=h,c*=h):(s=0,l=0,c=0),e[0]=i,e[1]=s,e[2]=u,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=c,e[10]=d,e[11]=0,e[12]=-(i*p+a*v+o*g),e[13]=-(s*p+l*v+c*g),e[14]=-(u*p+f*v+d*g),e[15]=1,e)}function F8(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=r[0],l=r[1],c=r[2],u=i-n[0],f=a-n[1],d=o-n[2],h=u*u+f*f+d*d;h>0&&(h=1/Math.sqrt(h),u*=h,f*=h,d*=h);var p=l*d-c*f,v=c*u-s*d,g=s*f-l*u;return h=p*p+v*v+g*g,h>0&&(h=1/Math.sqrt(h),p*=h,v*=h,g*=h),e[0]=p,e[1]=v,e[2]=g,e[3]=0,e[4]=f*g-d*v,e[5]=d*p-u*g,e[6]=u*v-f*p,e[7]=0,e[8]=u,e[9]=f,e[10]=d,e[11]=0,e[12]=i,e[13]=a,e[14]=o,e[15]=1,e}function B8(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function z8(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function Z8(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function kC(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function $8(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e}function W8(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e}function G8(e,t){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]}function H8(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=t[0],_=t[1],S=t[2],O=t[3],C=t[4],E=t[5],P=t[6],T=t[7],A=t[8],R=t[9],z=t[10],I=t[11],L=t[12],F=t[13],Z=t[14],H=t[15];return Math.abs(n-b)<=je*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-_)<=je*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(i-S)<=je*Math.max(1,Math.abs(i),Math.abs(S))&&Math.abs(a-O)<=je*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(o-C)<=je*Math.max(1,Math.abs(o),Math.abs(C))&&Math.abs(s-E)<=je*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(l-P)<=je*Math.max(1,Math.abs(l),Math.abs(P))&&Math.abs(c-T)<=je*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(u-A)<=je*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(f-R)<=je*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(d-z)<=je*Math.max(1,Math.abs(d),Math.abs(z))&&Math.abs(h-I)<=je*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(p-L)<=je*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(v-F)<=je*Math.max(1,Math.abs(v),Math.abs(F))&&Math.abs(g-Z)<=je*Math.max(1,Math.abs(g),Math.abs(Z))&&Math.abs(m-H)<=je*Math.max(1,Math.abs(m),Math.abs(H))}var Y8=ya,V8=kC;function jC(){var e=new Pe(9);return Pe!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function U8(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function vpe(e){var t=new glMatrix.ARRAY_TYPE(9);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}function gpe(e,t){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}function X8(e,t,n,r,i,a,o,s,l){var c=new Pe(9);return c[0]=e,c[1]=t,c[2]=n,c[3]=r,c[4]=i,c[5]=a,c[6]=o,c[7]=s,c[8]=l,c}function mpe(e,t,n,r,i,a,o,s,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=l,e[8]=c,e}function ype(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function bpe(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function xpe(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=u*o-s*c,d=-u*a+s*l,h=c*a-o*l,p=n*f+r*d+i*h;return p?(p=1/p,e[0]=f*p,e[1]=(-u*r+i*c)*p,e[2]=(s*r-i*o)*p,e[3]=d*p,e[4]=(u*n-i*l)*p,e[5]=(-s*n+i*a)*p,e[6]=h*p,e[7]=(-c*n+r*l)*p,e[8]=(o*n-r*a)*p,e):null}function _pe(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8];return e[0]=o*u-s*c,e[1]=i*c-r*u,e[2]=r*s-i*o,e[3]=s*l-a*u,e[4]=n*u-i*l,e[5]=i*a-n*s,e[6]=a*c-o*l,e[7]=r*l-n*c,e[8]=n*o-r*a,e}function wpe(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8];return t*(c*a-o*l)+n*(-c*i+o*s)+r*(l*i-a*s)}function Spe(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],d=n[0],h=n[1],p=n[2],v=n[3],g=n[4],m=n[5],b=n[6],_=n[7],S=n[8];return e[0]=d*r+h*o+p*c,e[1]=d*i+h*s+p*u,e[2]=d*a+h*l+p*f,e[3]=v*r+g*o+m*c,e[4]=v*i+g*s+m*u,e[5]=v*a+g*l+m*f,e[6]=b*r+_*o+S*c,e[7]=b*i+_*s+S*u,e[8]=b*a+_*l+S*f,e}function Ope(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],d=n[0],h=n[1];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=d*r+h*o+c,e[7]=d*i+h*s+u,e[8]=d*a+h*l+f,e}function Cpe(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],d=Math.sin(n),h=Math.cos(n);return e[0]=h*r+d*o,e[1]=h*i+d*s,e[2]=h*a+d*l,e[3]=h*o-d*r,e[4]=h*s-d*i,e[5]=h*l-d*a,e[6]=c,e[7]=u,e[8]=f,e}function Epe(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Mpe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Ppe(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Tpe(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ape(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Rpe(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,l=i+i,c=n*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*l,v=a*o,g=a*s,m=a*l;return e[0]=1-f-p,e[3]=u-m,e[6]=d+g,e[1]=u+m,e[4]=1-c-p,e[7]=h-v,e[2]=d-g,e[5]=h+v,e[8]=1-c-f,e}function Ipe(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],m=t[15],b=n*s-r*o,_=n*l-i*o,S=n*c-a*o,O=r*l-i*s,C=r*c-a*s,E=i*c-a*l,P=u*v-f*p,T=u*g-d*p,A=u*m-h*p,R=f*g-d*v,z=f*m-h*v,I=d*m-h*g,L=b*I-_*z+S*R+O*A-C*T+E*P;return L?(L=1/L,e[0]=(s*I-l*z+c*R)*L,e[1]=(l*A-o*I-c*T)*L,e[2]=(o*z-s*A+c*P)*L,e[3]=(i*z-r*I-a*R)*L,e[4]=(n*I-i*A+a*T)*L,e[5]=(r*A-n*z-a*P)*L,e[6]=(v*E-g*C+m*O)*L,e[7]=(g*S-p*E-m*_)*L,e[8]=(p*C-v*S+m*b)*L,e):null}function Lpe(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Npe(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function kpe(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function jpe(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e}function Dpe(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}function Fpe(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e}function Bpe(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e}function zpe(e,t){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]}function Zpe(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=t[0],d=t[1],h=t[2],p=t[3],v=t[4],g=t[5],m=t[6],b=t[7],_=t[8];return Math.abs(n-f)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-d)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(i-h)<=glMatrix.EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-p)<=glMatrix.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(o-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(s-g)<=glMatrix.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-m)<=glMatrix.EPSILON*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(c-b)<=glMatrix.EPSILON*Math.max(1,Math.abs(c),Math.abs(b))&&Math.abs(u-_)<=glMatrix.EPSILON*Math.max(1,Math.abs(u),Math.abs(_))}var $pe=null,Wpe=null;function kf(){var e=new Pe(4);return Pe!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function K8(e){var t=new Pe(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function q8(e,t,n,r){var i=new Pe(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function J8(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Q8(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function eD(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function Gpe(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function Hpe(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function Ype(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function Vpe(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function Upe(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function Xpe(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}function Kpe(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}function qpe(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function tD(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function Jpe(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}function Qpe(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.hypot(n,r,i,a)}function e0e(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return n*n+r*r+i*i+a*a}function nD(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.hypot(t,n,r,i)}function rD(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function t0e(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function n0e(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function iD(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=a*o,e}function aD(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function r0e(e,t,n,r){var i=n[0]*r[1]-n[1]*r[0],a=n[0]*r[2]-n[2]*r[0],o=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],l=n[1]*r[3]-n[3]*r[1],c=n[2]*r[3]-n[3]*r[2],u=t[0],f=t[1],d=t[2],h=t[3];return e[0]=f*c-d*l+h*s,e[1]=-(u*c)+d*o-h*a,e[2]=u*l-f*o+h*i,e[3]=-(u*s)+f*a-d*i,e}function oD(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e[3]=s+r*(n[3]-s),e}function i0e(e,t){t=t||1;var n,r,i,a,o,s;do n=glMatrix.RANDOM()*2-1,r=glMatrix.RANDOM()*2-1,o=n*n+r*r;while(o>=1);do i=glMatrix.RANDOM()*2-1,a=glMatrix.RANDOM()*2-1,s=i*i+a*a;while(s>=1);var l=Math.sqrt((1-o)/s);return e[0]=t*n,e[1]=t*r,e[2]=t*i*l,e[3]=t*a*l,e}function Th(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}function a0e(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],l=n[2],c=n[3],u=c*r+s*a-l*i,f=c*i+l*r-o*a,d=c*a+o*i-s*r,h=-o*r-s*i-l*a;return e[0]=u*c+h*-o+f*-l-d*-s,e[1]=f*c+h*-s+d*-o-u*-l,e[2]=d*c+h*-l+u*-s-f*-o,e[3]=t[3],e}function o0e(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function s0e(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function sD(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function lD(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],c=t[3];return Math.abs(n-o)<=je*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=je*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-l)<=je*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(a-c)<=je*Math.max(1,Math.abs(a),Math.abs(c))}var l0e=null,c0e=null,u0e=null,f0e=null,d0e=null,h0e=null,p0e=null,v0e=function(){var e=kf();return function(t,n,r,i,a,o){var s,l;for(n||(n=4),r||(r=0),i?l=Math.min(i*n+r,t.length):l=t.length,s=r;s<l;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}();function na(){var e=new Pe(4);return Pe!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function g0e(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function xc(e,t,n){n=n*.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function m0e(e,t){var n=Math.acos(t[3])*2,r=Math.sin(n/2);return r>glMatrix.EPSILON?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}function y0e(e,t){var n=hD(e,t);return Math.acos(2*n*n-1)}function _c(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=n[0],l=n[1],c=n[2],u=n[3];return e[0]=r*u+o*s+i*c-a*l,e[1]=i*u+o*l+a*s-r*c,e[2]=a*u+o*c+r*l-i*s,e[3]=o*u-r*s-i*l-a*c,e}function b0e(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*s,e[1]=i*l+a*s,e[2]=a*l-i*s,e[3]=o*l-r*s,e}function x0e(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),l=Math.cos(n);return e[0]=r*l-a*s,e[1]=i*l+o*s,e[2]=a*l+r*s,e[3]=o*l-i*s,e}function _0e(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),l=Math.cos(n);return e[0]=r*l+i*s,e[1]=i*l-r*s,e[2]=a*l+o*s,e[3]=o*l-a*s,e}function w0e(e,t){var n=t[0],r=t[1],i=t[2];return e[0]=n,e[1]=r,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),e}function cD(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=Math.sqrt(n*n+r*r+i*i),s=Math.exp(a),l=o>0?s*Math.sin(o)/o:0;return e[0]=n*l,e[1]=r*l,e[2]=i*l,e[3]=s*Math.cos(o),e}function uD(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=Math.sqrt(n*n+r*r+i*i),s=o>0?Math.atan2(o,a)/o:0;return e[0]=n*s,e[1]=r*s,e[2]=i*s,e[3]=.5*Math.log(n*n+r*r+i*i+a*a),e}function S0e(e,t,n){return uD(e,t),dD(e,e,n),cD(e,e),e}function Nx(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3],l=n[0],c=n[1],u=n[2],f=n[3],d,h,p,v,g;return h=i*l+a*c+o*u+s*f,h<0&&(h=-h,l=-l,c=-c,u=-u,f=-f),1-h>je?(d=Math.acos(h),p=Math.sin(d),v=Math.sin((1-r)*d)/p,g=Math.sin(r*d)/p):(v=1-r,g=r),e[0]=v*i+g*l,e[1]=v*a+g*c,e[2]=v*o+g*u,e[3]=v*s+g*f,e}function O0e(e){var t=glMatrix.RANDOM(),n=glMatrix.RANDOM(),r=glMatrix.RANDOM(),i=Math.sqrt(1-t),a=Math.sqrt(t);return e[0]=i*Math.sin(2*Math.PI*n),e[1]=i*Math.cos(2*Math.PI*n),e[2]=a*Math.sin(2*Math.PI*r),e[3]=a*Math.cos(2*Math.PI*r),e}function kx(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=a*s,e}function C0e(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function fD(e,t){var n=t[0]+t[4]+t[8],r;if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[i*3+i]-t[a*3+a]-t[o*3+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[a*3+o]-t[o*3+a])*r,e[a]=(t[a*3+i]+t[i*3+a])*r,e[o]=(t[o*3+i]+t[i*3+o])*r}return e}function Av(e,t,n,r){var i=.5*Math.PI/180;t*=i,n*=i,r*=i;var a=Math.sin(t),o=Math.cos(t),s=Math.sin(n),l=Math.cos(n),c=Math.sin(r),u=Math.cos(r);return e[0]=a*l*u-o*s*c,e[1]=o*s*u+a*l*c,e[2]=o*l*c-a*s*u,e[3]=o*l*u+a*s*c,e}function E0e(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var M0e=K8,jx=q8,Rv=J8,P0e=Q8,T0e=eD,DC=_c,dD=tD,hD=aD,A0e=oD,R0e=nD,I0e=null,L0e=rD,N0e=null,Iv=iD,k0e=sD,j0e=lD,D0e=function(){var e=le(),t=nt(1,0,0),n=nt(0,1,0);return function(r,i,a){var o=qe(i,a);return o<-.999999?(pt(e,t,i),mn(e)<1e-6&&pt(e,n,i),Yt(e,e),xc(r,e,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(pt(e,i,a),r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1+o,Iv(r,r))}}(),F0e=function(){var e=na(),t=na();return function(n,r,i,a,o,s){return Nx(e,r,o,s),Nx(t,i,a,s),Nx(n,e,t,2*s*(1-s)),n}}(),B0e=function(){var e=jC();return function(t,n,r,i){return e[0]=r[0],e[3]=r[1],e[6]=r[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-n[0],e[5]=-n[1],e[8]=-n[2],Iv(t,fD(t,e))}}();function pD(){var e=new Pe(2);return Pe!=Float32Array&&(e[0]=0,e[1]=0),e}function z0e(e){var t=new glMatrix.ARRAY_TYPE(2);return t[0]=e[0],t[1]=e[1],t}function vD(e,t){var n=new Pe(2);return n[0]=e,n[1]=t,n}function gD(e,t){return e[0]=t[0],e[1]=t[1],e}function Z0e(e,t,n){return e[0]=t,e[1]=n,e}function $0e(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function W0e(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function G0e(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function H0e(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Y0e(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function V0e(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function U0e(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function X0e(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}function K0e(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function q0e(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function J0e(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function Q0e(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.hypot(n,r)}function eve(e,t){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function tve(e){var t=e[0],n=e[1];return Math.hypot(t,n)}function nve(e){var t=e[0],n=e[1];return t*t+n*n}function rve(e,t){return e[0]=-t[0],e[1]=-t[1],e}function ive(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function mD(e,t){var n=t[0],r=t[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function yD(e,t){return e[0]*t[0]+e[1]*t[1]}function ave(e,t,n){var r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e}function ove(e,t,n,r){var i=t[0],a=t[1];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e}function sve(e,t){t=t||1;var n=glMatrix.RANDOM()*2*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e}function lve(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e}function cve(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function uve(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function fve(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}function dve(e,t,n,r){var i=t[0]-n[0],a=t[1]-n[1],o=Math.sin(r),s=Math.cos(r);return e[0]=i*s-a*o+n[0],e[1]=i*o+a*s+n[1],e}function hve(e,t){var n=e[0],r=e[1],i=t[0],a=t[1],o=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+a*a),s=o&&(n*i+r*a)/o;return Math.acos(Math.min(Math.max(s,-1),1))}function pve(e){return e[0]=0,e[1]=0,e}function vve(e){return"vec2("+e[0]+", "+e[1]+")"}function bD(e,t){return e[0]===t[0]&&e[1]===t[1]}function gve(e,t){var n=e[0],r=e[1],i=t[0],a=t[1];return Math.abs(n-i)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))}var mve=null,yve=null,bve=null,xve=null,_ve=null,wve=null,Sve=null,Ove=function(){var e=pD();return function(t,n,r,i,a,o){var s,l;for(n||(n=2),r||(r=0),i?l=Math.min(i*n+r,t.length):l=t.length,s=r;s<l;s+=n)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}}(),xD={}.toString,_D=function(e,t){return xD.call(e)==="[object "+t+"]"},Ah=_D,wD=function(e){return Ah(e,"Number")},Gi=wD;function ko(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var SD=function(e){return e==null},Bt=SD,xi=function(e){return Ah(e,"String")},OD=function(e,t,n){return e<t?t:e>n?n:e},Ri=OD,Rh={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function FC(e){return Array.isArray(e)&&e.every(function(t){var n=t[0].toLowerCase();return Rh[n]===t.length-1&&"achlmqstvz".includes(n)})}function BC(e){return FC(e)&&e.every(function(t){var n=t[0];return n===n.toUpperCase()})}function zC(e){return BC(e)&&e.every(function(t){var n=t[0];return"ACLMQZ".includes(n)})}var ZC={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function $C(e){for(var t=e.pathValue[e.segmentStart],n=t.toLowerCase(),r=e.data;r.length>=Rh[n]&&(n==="m"&&r.length>2?(e.segments.push([t].concat(r.splice(0,2))),n="l",t=t==="m"?"l":"L"):e.segments.push([t].concat(r.splice(0,Rh[n]))),!!Rh[n]););}function CD(e){var t=e.index,n=e.pathValue,r=n.charCodeAt(t);if(r===48){e.param=0,e.index+=1;return}if(r===49){e.param=1,e.index+=1;return}e.err='[path-util]: invalid Arc flag "'+n[t]+'", expecting 0 or 1 at index '+t}function ED(e){return e>=48&&e<=57||e===43||e===45||e===46}function jf(e){return e>=48&&e<=57}function MD(e){var t=e.max,n=e.pathValue,r=e.index,i=r,a=!1,o=!1,s=!1,l=!1,c;if(i>=t){e.err="[path-util]: Invalid path value at index "+i+', "pathValue" is missing param';return}if(c=n.charCodeAt(i),(c===43||c===45)&&(i+=1,c=n.charCodeAt(i)),!jf(c)&&c!==46){e.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" is not a number';return}if(c!==46){if(a=c===48,i+=1,c=n.charCodeAt(i),a&&i<t&&c&&jf(c)){e.err="[path-util]: Invalid path value at index "+r+', "'+n[r]+'" illegal number';return}for(;i<t&&jf(n.charCodeAt(i));)i+=1,o=!0;c=n.charCodeAt(i)}if(c===46){for(l=!0,i+=1;jf(n.charCodeAt(i));)i+=1,s=!0;c=n.charCodeAt(i)}if(c===101||c===69){if(l&&!o&&!s){e.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid float exponent';return}if(i+=1,c=n.charCodeAt(i),(c===43||c===45)&&(i+=1),i<t&&jf(n.charCodeAt(i)))for(;i<t&&jf(n.charCodeAt(i));)i+=1;else{e.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid integer exponent';return}}e.index=i,e.param=+e.pathValue.slice(r,i)}function PD(e){var t=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&t.includes(e)}function Lv(e){for(var t=e.pathValue,n=e.max;e.index<n&&PD(t.charCodeAt(e.index));)e.index+=1}function TD(e){switch(e|32){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}}function AD(e){return(e|32)===97}function RD(e){var t=e.max,n=e.pathValue,r=e.index,i=n.charCodeAt(r),a=Rh[n[r].toLowerCase()];if(e.segmentStart=r,!TD(i)){e.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(e.index+=1,Lv(e),e.data=[],!a){$C(e);return}for(;;){for(var o=a;o>0;o-=1){if(AD(i)&&(o===3||o===4)?CD(e):MD(e),e.err.length)return;e.data.push(e.param),Lv(e),e.index<t&&n.charCodeAt(e.index)===44&&(e.index+=1,Lv(e))}if(e.index>=e.max||!ED(n.charCodeAt(e.index)))break}$C(e)}var ID=function(){function e(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return e}();function LD(e){if(FC(e))return[].concat(e);var t=new ID(e);for(Lv(t);t.index<t.max&&!t.err.length;)RD(t);return t.err?t.err:t.segments}function ND(e){if(BC(e))return[].concat(e);var t=LD(e),n=0,r=0,i=0,a=0;return t.map(function(o){var s=o.slice(1).map(Number),l=o[0],c=l.toUpperCase();if(l==="M")return n=s[0],r=s[1],i=n,a=r,["M",n,r];var u;if(l!==c)switch(c){case"A":u=[c,s[0],s[1],s[2],s[3],s[4],s[5]+n,s[6]+r];break;case"V":u=[c,s[0]+r];break;case"H":u=[c,s[0]+n];break;default:{var f=s.map(function(h,p){return h+(p%2?r:n)});u=[c].concat(f)}}else u=[c].concat(s);var d=u.length;switch(c){case"Z":n=i,r=a;break;case"H":n=u[1];break;case"V":r=u[1];break;default:n=u[d-2],r=u[d-1],c==="M"&&(i=n,a=r)}return u})}function kD(e,t){var n=e[0],r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=e.slice(1).map(Number),l=e;if("TQ".includes(n)||(t.qx=null,t.qy=null),n==="H")l=["L",e[1],i];else if(n==="V")l=["L",r,e[1]];else if(n==="S"){var c=r*2-a,u=i*2-o;t.x1=c,t.y1=u,l=["C",c,u].concat(s)}else if(n==="T"){var f=r*2-t.qx,d=i*2-t.qy;t.qx=f,t.qy=d,l=["Q",f,d].concat(s)}else if(n==="Q"){var h=s[0],p=s[1];t.qx=h,t.qy=p}return l}function Nv(e){if(zC(e))return[].concat(e);for(var t=ND(e),n=Ie({},ZC),r=0;r<t.length;r+=1){t[r]=kD(t[r],n);var i=t[r],a=i.length;n.x1=+i[a-2],n.y1=+i[a-1],n.x2=+i[a-4]||n.x1,n.y2=+i[a-3]||n.y1}return t}function wc(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return[r+(a-r)*n,i+(o-i)*n]}function Dx(e,t,n,r,i){var a=ko([e,t],[n,r]),o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:e,y:t};else if(i>=a)o={x:n,y:r};else{var s=wc([e,t],[n,r],i/a),l=s[0],c=s[1];o={x:l,y:c}}return{length:a,point:o,min:{x:Math.min(e,n),y:Math.min(t,r)},max:{x:Math.max(e,n),y:Math.max(t,r)}}}function WC(e,t){var n=e.x,r=e.y,i=t.x,a=t.y,o=n*i+r*a,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),l=n*a-r*i<0?-1:1,c=l*Math.acos(o/s);return c}function jD(e,t,n,r,i,a,o,s,l,c){var u=Math.abs,f=Math.sin,d=Math.cos,h=Math.sqrt,p=Math.PI,v=u(n),g=u(r),m=(i%360+360)%360,b=m*(p/180);if(e===s&&t===l)return{x:e,y:t};if(v===0||g===0)return Dx(e,t,s,l,c).point;var _=(e-s)/2,S=(t-l)/2,O={x:d(b)*_+f(b)*S,y:-f(b)*_+d(b)*S},C=Math.pow(O.x,2)/Math.pow(v,2)+Math.pow(O.y,2)/Math.pow(g,2);C>1&&(v*=h(C),g*=h(C));var E=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2),P=Math.pow(v,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2),T=E/P;T=T<0?0:T;var A=(a!==o?1:-1)*h(T),R={x:A*(v*O.y/g),y:A*(-(g*O.x)/v)},z={x:d(b)*R.x-f(b)*R.y+(e+s)/2,y:f(b)*R.x+d(b)*R.y+(t+l)/2},I={x:(O.x-R.x)/v,y:(O.y-R.y)/g},L=WC({x:1,y:0},I),F={x:(-O.x-R.x)/v,y:(-O.y-R.y)/g},Z=WC(I,F);!o&&Z>0?Z-=2*p:o&&Z<0&&(Z+=2*p),Z%=2*p;var H=L+Z*c,W=v*d(H),G=g*f(H),J={x:d(b)*W-f(b)*G+z.x,y:f(b)*W+d(b)*G+z.y};return J}function DD(e,t,n,r,i,a,o,s,l,c,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,v=p===void 0?!0:p,g=u.sampleSize,m=g===void 0?30:g,b=typeof c=="number",_=e,S=t,O=0,C=[_,S,O],E=[_,S],P=0,T={x:0,y:0},A=[{x:_,y:S}];b&&c<=0&&(T={x:_,y:S});for(var R=0;R<=m;R+=1){if(P=R/m,f=jD(e,t,n,r,i,a,o,s,l,P),_=f.x,S=f.y,h&&A.push({x:_,y:S}),v&&(O+=ko(E,[_,S])),E=[_,S],b&&O>=c&&c>C[2]){var z=(O-c)/(O-C[2]);T={x:E[0]*(1-z)+C[0]*z,y:E[1]*(1-z)+C[1]*z}}C=[_,S,O]}return b&&c>=O&&(T={x:s,y:l}),{length:O,point:T,min:{x:Math.min.apply(null,A.map(function(I){return I.x})),y:Math.min.apply(null,A.map(function(I){return I.y}))},max:{x:Math.max.apply(null,A.map(function(I){return I.x})),y:Math.max.apply(null,A.map(function(I){return I.y}))}}}function FD(e,t,n,r,i,a,o,s,l){var c=1-l;return{x:Math.pow(c,3)*e+3*Math.pow(c,2)*l*n+3*c*Math.pow(l,2)*i+Math.pow(l,3)*o,y:Math.pow(c,3)*t+3*Math.pow(c,2)*l*r+3*c*Math.pow(l,2)*a+Math.pow(l,3)*s}}function GC(e,t,n,r,i,a,o,s,l,c){var u,f=c.bbox,d=f===void 0?!0:f,h=c.length,p=h===void 0?!0:h,v=c.sampleSize,g=v===void 0?10:v,m=typeof l=="number",b=e,_=t,S=0,O=[b,_,S],C=[b,_],E=0,P={x:0,y:0},T=[{x:b,y:_}];m&&l<=0&&(P={x:b,y:_});for(var A=0;A<=g;A+=1){if(E=A/g,u=FD(e,t,n,r,i,a,o,s,E),b=u.x,_=u.y,d&&T.push({x:b,y:_}),p&&(S+=ko(C,[b,_])),C=[b,_],m&&S>=l&&l>O[2]){var R=(S-l)/(S-O[2]);P={x:C[0]*(1-R)+O[0]*R,y:C[1]*(1-R)+O[1]*R}}O=[b,_,S]}return m&&l>=S&&(P={x:o,y:s}),{length:S,point:P,min:{x:Math.min.apply(null,T.map(function(z){return z.x})),y:Math.min.apply(null,T.map(function(z){return z.y}))},max:{x:Math.max.apply(null,T.map(function(z){return z.x})),y:Math.max.apply(null,T.map(function(z){return z.y}))}}}function BD(e,t,n,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*e+2*s*o*n+Math.pow(o,2)*i,y:Math.pow(s,2)*t+2*s*o*r+Math.pow(o,2)*a}}function zD(e,t,n,r,i,a,o,s){var l,c=s.bbox,u=c===void 0?!0:c,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,v=typeof o=="number",g=e,m=t,b=0,_=[g,m,b],S=[g,m],O=0,C={x:0,y:0},E=[{x:g,y:m}];v&&o<=0&&(C={x:g,y:m});for(var P=0;P<=p;P+=1){if(O=P/p,l=BD(e,t,n,r,i,a,O),g=l.x,m=l.y,u&&E.push({x:g,y:m}),d&&(b+=ko(S,[g,m])),S=[g,m],v&&b>=o&&o>_[2]){var T=(b-o)/(b-_[2]);C={x:S[0]*(1-T)+_[0]*T,y:S[1]*(1-T)+_[1]*T}}_=[g,m,b]}return v&&o>=b&&(C={x:i,y:a}),{length:b,point:C,min:{x:Math.min.apply(null,E.map(function(A){return A.x})),y:Math.min.apply(null,E.map(function(A){return A.y}))},max:{x:Math.max.apply(null,E.map(function(A){return A.x})),y:Math.max.apply(null,E.map(function(A){return A.y}))}}}function HC(e,t,n){for(var r,i,a,o,s,l,c=Nv(e),u=typeof t=="number",f,d=[],h,p=0,v=0,g=0,m=0,b,_=[],S=[],O=0,C={x:0,y:0},E=C,P=C,T=C,A=0,R=0,z=c.length;R<z;R+=1)b=c[R],h=b[0],f=h==="M",d=f?d:[p,v].concat(b.slice(1)),f?(g=b[1],m=b[2],C={x:g,y:m},E=C,O=0,u&&t<.001&&(T=C)):h==="L"?(r=Dx(d[0],d[1],d[2],d[3],(t||0)-A),O=r.length,C=r.min,E=r.max,P=r.point):h==="A"?(i=DD(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(t||0)-A,n||{}),O=i.length,C=i.min,E=i.max,P=i.point):h==="C"?(a=GC(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(t||0)-A,n||{}),O=a.length,C=a.min,E=a.max,P=a.point):h==="Q"?(o=zD(d[0],d[1],d[2],d[3],d[4],d[5],(t||0)-A,n||{}),O=o.length,C=o.min,E=o.max,P=o.point):h==="Z"&&(d=[p,v,g,m],s=Dx(d[0],d[1],d[2],d[3],(t||0)-A),O=s.length,C=s.min,E=s.max,P=s.point),u&&A<t&&A+O>=t&&(T=P),S.push(E),_.push(C),A+=O,l=h!=="Z"?b.slice(-2):[g,m],p=l[0],v=l[1];return u&&t>=A&&(T={x:p,y:v}),{length:A,point:T,min:{x:Math.min.apply(null,_.map(function(I){return I.x})),y:Math.min.apply(null,_.map(function(I){return I.y}))},max:{x:Math.max.apply(null,S.map(function(I){return I.x})),y:Math.max.apply(null,S.map(function(I){return I.y}))}}}function ZD(e,t){return HC(e,void 0,Ie(Ie({},t),{bbox:!1,length:!0})).length}var ua=function(e){return Array.isArray?Array.isArray(e):Ah(e,"Array")},kv=function(e){if(ua(e))return e.reduce(function(t,n){return Math.min(t,n)},e[0])},jv=function(e){if(ua(e))return e.reduce(function(t,n){return Math.max(t,n)},e[0])},$D=1e-5;function Ih(e,t,n){return n===void 0&&(n=$D),Math.abs(e-t)<n}var WD=function(e,t){return(e%t+t)%t},YC=WD;function GD(e,t,n){if(e[n].length>7){e[n].shift();for(var r=e[n],i=n;r.length;)t[n]="A",e.splice(i+=1,0,["C"].concat(r.splice(0,6)));e.splice(n,1)}}function HD(e){return zC(e)&&e.every(function(t){var n=t[0];return"MC".includes(n)})}function Dv(e,t,n){var r=e*Math.cos(n)-t*Math.sin(n),i=e*Math.sin(n)+t*Math.cos(n);return{x:r,y:i}}function Fx(e,t,n,r,i,a,o,s,l,c){var u=e,f=t,d=n,h=r,p=s,v=l,g=Math.PI*120/180,m=Math.PI/180*(+i||0),b=[],_,S,O,C,E;if(c)S=c[0],O=c[1],C=c[2],E=c[3];else{_=Dv(u,f,-m),u=_.x,f=_.y,_=Dv(p,v,-m),p=_.x,v=_.y;var P=(u-p)/2,T=(f-v)/2,A=P*P/(d*d)+T*T/(h*h);A>1&&(A=Math.sqrt(A),d*=A,h*=A);var R=d*d,z=h*h,I=(a===o?-1:1)*Math.sqrt(Math.abs((R*z-R*T*T-z*P*P)/(R*T*T+z*P*P)));C=I*d*T/h+(u+p)/2,E=I*-h*P/d+(f+v)/2,S=Math.asin(((f-E)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),O=Math.asin(((v-E)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),S=u<C?Math.PI-S:S,O=p<C?Math.PI-O:O,S<0&&(S=Math.PI*2+S),O<0&&(O=Math.PI*2+O),o&&S>O&&(S-=Math.PI*2),!o&&O>S&&(O-=Math.PI*2)}var L=O-S;if(Math.abs(L)>g){var F=O,Z=p,H=v;O=S+g*(o&&O>S?1:-1),p=C+d*Math.cos(O),v=E+h*Math.sin(O),b=Fx(p,v,d,h,i,0,o,Z,H,[O,F,C,E])}L=O-S;var W=Math.cos(S),G=Math.sin(S),J=Math.cos(O),re=Math.sin(O),he=Math.tan(L/4),ce=4/3*d*he,ke=4/3*h*he,ot=[u,f],xt=[u+ce*G,f-ke*W],et=[p+ce*re,v-ke*J],He=[p,v];if(xt[0]=2*ot[0]-xt[0],xt[1]=2*ot[1]-xt[1],c)return xt.concat(et,He,b);b=xt.concat(et,He,b);for(var jt=[],Ct=0,Gt=b.length;Ct<Gt;Ct+=1)jt[Ct]=Ct%2?Dv(b[Ct-1],b[Ct],m).y:Dv(b[Ct],b[Ct+1],m).x;return jt}function YD(e,t,n,r,i,a){var o=.3333333333333333,s=2/3;return[o*e+s*n,o*t+s*r,o*i+s*n,o*a+s*r,i,a]}var VC=function(e,t,n,r){var i=.5,a=wc([e,t],[n,r],i);return N(N([],a,!0),[n,r,n,r],!1)};function VD(e,t){var n=e[0],r=e.slice(1).map(Number),i=r[0],a=r[1],o,s=t.x1,l=t.y1,c=t.x,u=t.y;switch("TQ".includes(n)||(t.qx=null,t.qy=null),n){case"M":return t.x=i,t.y=a,e;case"A":return o=[s,l].concat(r),["C"].concat(Fx(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return t.qx=i,t.qy=a,o=[s,l].concat(r),["C"].concat(YD(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(VC(s,l,i,a));case"Z":return s===c&&l===u?["C",s,l,c,u,c,u]:["C"].concat(VC(s,l,c,u));default:}return e}function Bx(e,t){if(t===void 0&&(t=!1),HD(e)){var n=[].concat(e);return t?[n,[]]:n}for(var r=Nv(e),i=Ie({},ZC),a=[],o="",s=r.length,l,c,u=[],f=0;f<s;f+=1){r[f]&&(o=r[f][0]),a[f]=o;var d=VD(r[f],i);r[f]=d,GD(r,a,f),s=r.length,o==="Z"&&u.push(f),l=r[f],c=l.length,i.x1=+l[c-2],i.y1=+l[c-1],i.x2=+l[c-4]||i.x1,i.y2=+l[c-3]||i.y1}return t?[r,u]:r}function UD(e,t){t===void 0&&(t=.5);var n=e.slice(0,2),r=e.slice(2,4),i=e.slice(4,6),a=e.slice(6,8),o=wc(n,r,t),s=wc(r,i,t),l=wc(i,a,t),c=wc(o,s,t),u=wc(s,l,t),f=wc(c,u,t);return[["C"].concat(o,c,f),["C"].concat(u,l,a)]}function UC(e){return e.map(function(t,n,r){var i=n&&r[n-1].slice(-2).concat(t.slice(1)),a=n?GC(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,o;return n?o=a?UD(i):[t,t]:o=[t],{s:t,ss:o,l:a}})}function XC(e,t,n){var r=UC(e),i=UC(t),a=r.length,o=i.length,s=r.filter(function(g){return g.l}).length,l=i.filter(function(g){return g.l}).length,c=r.filter(function(g){return g.l}).reduce(function(g,m){var b=m.l;return g+b},0)/s||0,u=i.filter(function(g){return g.l}).reduce(function(g,m){var b=m.l;return g+b},0)/l||0,f=n||Math.max(a,o),d=[c,u],h=[f-a,f-o],p=0,v=[r,i].map(function(g,m){return g.l===f?g.map(function(b){return b.s}):g.map(function(b,_){return p=_&&h[m]&&b.l>=d[m],h[m]-=p?1:0,p?b.ss:[b.s]}).flat()});return v[0].length===v[1].length?v:XC(v[0],v[1],f)}function XD(e,t,n,r,i,a,o,s){return 3*((s-t)*(n+i)-(o-e)*(r+a)+r*(e-i)-n*(t-a)+s*(i+e/3)-o*(a+t/3))/20}function KD(e){var t=0,n=0,r=0;return Bx(e).map(function(i){var a;switch(i[0]){case"M":return t=i[1],n=i[2],0;default:var o=i.slice(1),s=o[0],l=o[1],c=o[2],u=o[3],f=o[4],d=o[5];return r=XD(t,n,s,l,c,u,f,d),a=i.slice(-2),t=a[0],n=a[1],r}}).reduce(function(i,a){return i+a},0)}function KC(e){return KD(e)>=0}function qD(e){var t=e.slice(1).map(function(n,r,i){return r?i[r-1].slice(-2).concat(n.slice(1)):e[0].slice(1).concat(n.slice(1))}).map(function(n){return n.map(function(r,i){return n[n.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(t[0].slice(0,2))].concat(t.map(function(n){return["C"].concat(n.slice(2))}))}function JD(e){return e.map(function(t){return Array.isArray(t)?[].concat(t):t})}function QD(e){var t=e.length,n=t-1;return e.map(function(r,i){return e.map(function(a,o){var s=i+o,l;return o===0||e[s]&&e[s][0]==="M"?(l=e[s],["M"].concat(l.slice(-2))):(s>=t&&(s-=n),e[s])})})}function eF(e,t){var n=e.length-1,r=[],i=0,a=0,o=QD(e);return o.forEach(function(s,l){e.slice(1).forEach(function(c,u){a+=ko(e[(l+u)%n].slice(-2),t[u%n].slice(-2))}),r[l]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),o[i]}var tF=function(e){return Ah(e,"Boolean")},qC=tF,bu=function(e){var t=typeof e;return e!==null&&t==="object"||t==="function"},nF=function(e){return e===void 0},li=nF;function rF(e,t,n){return HC(e,t,Ie(Ie({},n),{bbox:!1,length:!0})).point}function Fv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function zx(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Df(){}var xu=.7,Ff=1/xu,Bf="\\s*([+-]?\\d+)\\s*",Lh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",tl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iF=/^#([0-9a-f]{3,8})$/,aF=new RegExp("^rgb\\("+[Bf,Bf,Bf]+"\\)$"),oF=new RegExp("^rgb\\("+[tl,tl,tl]+"\\)$"),sF=new RegExp("^rgba\\("+[Bf,Bf,Bf,Lh]+"\\)$"),lF=new RegExp("^rgba\\("+[tl,tl,tl,Lh]+"\\)$"),cF=new RegExp("^hsl\\("+[Lh,tl,tl]+"\\)$"),uF=new RegExp("^hsla\\("+[Lh,tl,tl,Lh]+"\\)$"),JC={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};Fv(Df,Bv,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:QC,formatHex:QC,formatHsl:fF,formatRgb:eE,toString:eE});function QC(){return this.rgb().formatHex()}function fF(){return oE(this).formatHsl()}function eE(){return this.rgb().formatRgb()}function Bv(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tE(t):n===3?new go(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?zv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?zv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=aF.exec(e))?new go(t[1],t[2],t[3],1):(t=oF.exec(e))?new go(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sF.exec(e))?zv(t[1],t[2],t[3],t[4]):(t=lF.exec(e))?zv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cF.exec(e))?aE(t[1],t[2]/100,t[3]/100,1):(t=uF.exec(e))?aE(t[1],t[2]/100,t[3]/100,t[4]):JC.hasOwnProperty(e)?tE(JC[e]):e==="transparent"?new go(NaN,NaN,NaN,0):null}function tE(e){return new go(e>>16&255,e>>8&255,e&255,1)}function zv(e,t,n,r){return r<=0&&(e=t=n=NaN),new go(e,t,n,r)}function nE(e){return e instanceof Df||(e=Bv(e)),e?(e=e.rgb(),new go(e.r,e.g,e.b,e.opacity)):new go}function Nh(e,t,n,r){return arguments.length===1?nE(e):new go(e,t,n,r==null?1:r)}function go(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fv(go,Nh,zx(Df,{brighter:function(e){return e=e==null?Ff:Math.pow(Ff,e),new go(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?xu:Math.pow(xu,e),new go(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},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:rE,formatHex:rE,formatRgb:iE,toString:iE}));function rE(){return"#"+Zx(this.r)+Zx(this.g)+Zx(this.b)}function iE(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function Zx(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function aE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new nl(e,t,n,r)}function oE(e){if(e instanceof nl)return new nl(e.h,e.s,e.l,e.opacity);if(e instanceof Df||(e=Bv(e)),!e)return new nl;if(e instanceof nl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new nl(o,s,l,e.opacity)}function dF(e,t,n,r){return arguments.length===1?oE(e):new nl(e,t,n,r==null?1:r)}function nl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fv(nl,dF,zx(Df,{brighter:function(e){return e=e==null?Ff:Math.pow(Ff,e),new nl(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?xu:Math.pow(xu,e),new nl(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new go($x(e>=240?e-240:e+120,i,r),$x(e,i,r),$x(e<120?e+240:e-120,i,r),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 e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function $x(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Ka(e,t,n,r){var i=e-n,a=t-r;return Math.sqrt(i*i+a*a)}function Zv(e,t){var n=Math.min.apply(Math,N([],w(e),!1)),r=Math.min.apply(Math,N([],w(t),!1)),i=Math.max.apply(Math,N([],w(e),!1)),a=Math.max.apply(Math,N([],w(t),!1));return{x:n,y:r,width:i-n,height:a-r}}function sE(e){return(e+Math.PI*2)%(Math.PI*2)}function lE(e,t){var n=Math.abs(e);return t>0?n:n*-1}function hF(e,t,n,r,i,a){var o=n,s=r;if(o===0||s===0)return{x:e,y:t};for(var l=i-e,c=a-t,u=Math.abs(l),f=Math.abs(c),d=o*o,h=s*s,p=Math.PI/4,v=0,g=0,m=0;m<4;m++){v=o*Math.cos(p),g=s*Math.sin(p);var b=(d-h)*Math.pow(Math.cos(p),3)/o,_=(h-d)*Math.pow(Math.sin(p),3)/s,S=v-b,O=g-_,C=u-b,E=f-_,P=Math.hypot(O,S),T=Math.hypot(E,C),A=P*Math.asin((S*E-O*C)/(P*T)),R=A/Math.sqrt(d+h-v*v-g*g);p+=R,p=Math.min(Math.PI/2,Math.max(0,p))}return{x:e+lE(v,l),y:t+lE(g,c)}}function pF(e,t,n,r,i,a,o,s){return-1*n*Math.cos(i)*Math.sin(s)-r*Math.sin(i)*Math.cos(s)}function vF(e,t,n,r,i,a,o,s){return-1*n*Math.sin(i)*Math.sin(s)+r*Math.cos(i)*Math.cos(s)}function gF(e,t,n){return Math.atan(-t/e*Math.tan(n))}function mF(e,t,n){return Math.atan(t/(e*Math.tan(n)))}function yF(e,t,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+e}function bF(e,t,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+t}function xF(e,t,n,r){var i=Math.atan2(r*e,n*t);return(i+Math.PI*2)%(Math.PI*2)}function cE(e,t,n){return{x:e*Math.cos(n),y:t*Math.sin(n)}}function uE(e,t,n){var r=Math.cos(n),i=Math.sin(n);return[e*r-t*i,e*i+t*r]}function _F(e,t,n,r,i,a,o){for(var s=gF(n,r,i),l=1/0,c=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var f=0;f<u.length;f++){var h=yF(e,t,n,r,i,u[f]);h<l&&(l=h),h>c&&(c=h)}for(var p=mF(n,r,i),v=1/0,g=-1/0,m=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var b=p+f;a<o?a<b&&b<o&&m.push(b):o<b&&b<a&&m.push(b)}for(var f=0;f<m.length;f++){var _=bF(e,t,n,r,i,m[f]);_<v&&(v=_),_>g&&(g=_)}return{x:l,y:v,width:c-l,height:g-v}}function Cve(e,t,n,r,i,a,o,s,l){var c=uE(s-e,l-t,-i),u=__read(c,2),f=u[0],d=u[1],h=hF(0,0,n,r,f,d),p=xF(n,r,h.x,h.y);p<a?h=cE(n,r,a):p>o&&(h=cE(n,r,o));var v=uE(h.x,h.y,i);return{x:v[0]+e,y:v[1]+t}}function Eve(e,t,n,r,i,a,o,s){var l=(o-a)*s+a,c=pF(e,t,n,r,i,a,o,l),u=vF(e,t,n,r,i,a,o,l);return sE(Math.atan2(u,c))}var wF=1e-4;function fE(e,t,n,r,i,a){var o=-1,s=1/0,l=[n,r],c=20;a&&a>200&&(c=a/10);for(var u=1/c,f=u/10,d=0;d<=c;d++){var h=d*u,p=[i.apply(void 0,N([],w(e.concat([h])),!1)),i.apply(void 0,N([],w(t.concat([h])),!1))],v=Ka(l[0],l[1],p[0],p[1]);v<s&&(o=h,s=v)}if(o===0)return{x:e[0],y:t[0]};if(o===1){var g=e.length;return{x:e[g-1],y:t[g-1]}}s=1/0;for(var d=0;d<32&&!(f<wF);d++){var m=o-f,b=o+f,p=[i.apply(void 0,N([],w(e.concat([m])),!1)),i.apply(void 0,N([],w(t.concat([m])),!1))],v=Ka(l[0],l[1],p[0],p[1]);if(m>=0&&v<s)o=m,s=v;else{var _=[i.apply(void 0,N([],w(e.concat([b])),!1)),i.apply(void 0,N([],w(t.concat([b])),!1))],S=Ka(l[0],l[1],_[0],_[1]);b<=1&&S<s?(o=b,s=S):f*=.5}}return{x:i.apply(void 0,N([],w(e.concat([o])),!1)),y:i.apply(void 0,N([],w(t.concat([o])),!1))}}function SF(e,t){for(var n=0,r=e.length,i=0;i<r;i++){var a=e[i],o=t[i],s=e[(i+1)%r],l=t[(i+1)%r];n+=Ka(a,o,s,l)}return n/2}function Mve(e,t,n,r){return Zv([e,n],[t,r])}function dE(e,t,n,r){return Ka(e,t,n,r)}function rl(e,t,n,r,i){return{x:(1-i)*e+i*n,y:(1-i)*t+i*r}}function OF(e,t,n,r,i,a){var o=(n-e)*(i-e)+(r-t)*(a-t);if(o<0)return Ka(e,t,i,a);var s=(n-e)*(n-e)+(r-t)*(r-t);return o>s?Ka(n,r,i,a):hE(e,t,n,r,i,a)}function hE(e,t,n,r,i,a){var o=[n-e,r-t];if(bD(o,[0,0]))return Math.sqrt((i-e)*(i-e)+(a-t)*(a-t));var s=[-o[1],o[0]];mD(s,s);var l=[i-e,a-t];return Math.abs(yD(l,s))}function Pve(e,t,n,r){return Math.atan2(r-t,n-e)}function _u(e,t,n,r,i){var a=1-i;return a*a*a*e+3*t*i*a*a+3*n*i*i*a+r*i*i*i}function pE(e,t,n,r,i){var a=1-i;return 3*(a*a*(t-e)+2*a*i*(n-t)+i*i*(r-n))}function vE(e,t,n,r){var i=-3*e+9*t-9*n+3*r,a=6*e-12*t+6*n,o=3*t-3*e,s=[],l,c,u;if(Ih(i,0))Ih(a,0)||(l=-o/a,l>=0&&l<=1&&s.push(l));else{var f=a*a-4*i*o;Ih(f,0)?s.push(-a/(2*i)):f>0&&(u=Math.sqrt(f),l=(-a+u)/(2*i),c=(-a-u)/(2*i),l>=0&&l<=1&&s.push(l),c>=0&&c<=1&&s.push(c))}return s}function CF(e,t,n,r,i,a,o,s,l){var c=_u(e,n,i,o,l),u=_u(t,r,a,s,l),f=rl(e,t,n,r,l),d=rl(n,r,i,a,l),h=rl(i,a,o,s,l),p=rl(f.x,f.y,d.x,d.y,l),v=rl(d.x,d.y,h.x,h.y,l);return[[e,t,f.x,f.y,p.x,p.y,c,u],[c,u,v.x,v.y,h.x,h.y,o,s]]}function Wx(e,t,n,r,i,a,o,s,l){if(l===0)return SF([e,n,i,o],[t,r,a,s]);var c=CF(e,t,n,r,i,a,o,s,.5),u=__spreadArray(__spreadArray([],__read(c[0]),!1),[l-1],!1),f=__spreadArray(__spreadArray([],__read(c[1]),!1),[l-1],!1);return Wx.apply(void 0,__spreadArray([],__read(u),!1))+Wx.apply(void 0,__spreadArray([],__read(f),!1))}function EF(e,t,n,r,i,a,o,s){for(var l=[e,o],c=[t,s],u=vE(e,n,i,o),f=vE(t,r,a,s),d=0;d<u.length;d++)l.push(_u(e,n,i,o,u[d]));for(var d=0;d<f.length;d++)c.push(_u(t,r,a,s,f[d]));return Zv(l,c)}function Tve(e,t,n,r,i,a,o,s){return Wx(e,t,n,r,i,a,o,s,3)}function MF(e,t,n,r,i,a,o,s,l,c,u){return fE([e,n,i,o],[t,r,a,s],l,c,_u,u)}function gE(e,t,n,r,i,a,o,s,l,c,u){var f=MF(e,t,n,r,i,a,o,s,l,c,u);return Ka(f.x,f.y,l,c)}function Ave(e,t,n,r,i,a,o,s,l){return{x:_u(e,n,i,o,l),y:_u(t,r,a,s,l)}}function Rve(e,t,n,r,i,a,o,s,l){var c=pE(e,n,i,o,l),u=pE(t,r,a,s,l);return sE(Math.atan2(u,c))}function mE(e){for(var t=0,n=[],r=0;r<e.length-1;r++){var i=e[r],a=e[r+1],o=Ka(i[0],i[1],a[0],a[1]),s={from:i,to:a,length:o};n.push(s),t+=o}return{segments:n,totalLength:t}}function yE(e){if(e.length<2)return 0;for(var t=0,n=0;n<e.length-1;n++){var r=e[n],i=e[n+1];t+=Ka(r[0],r[1],i[0],i[1])}return t}function bE(e,t){if(t>1||t<0||e.length<2)return null;var n=mE(e),r=n.segments,i=n.totalLength;if(i===0)return{x:e[0][0],y:e[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,f=l.length/i;if(t>=a&&t<=a+f){var d=(t-a)/f;o=rl(c[0],c[1],u[0],u[1],d);break}a+=f}return o}function xE(e,t){if(t>1||t<0||e.length<2)return 0;for(var n=mE(e),r=n.segments,i=n.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,f=l.length/i;if(t>=a&&t<=a+f){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=f}return o}function _E(e,t,n){for(var r=1/0,i=0;i<e.length-1;i++){var a=e[i],o=e[i+1],s=OF(a[0],a[1],o[0],o[1],t,n);s<r&&(r=s)}return r}function PF(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];t.push(i[0]),n.push(i[1])}return Zv(t,n)}function TF(e){return yE(e)}function Ive(e,t){return bE(e,t)}function Lve(e,t,n){return _E(e,t,n)}function Nve(e,t){return xE(e,t)}function $v(e){var t=e.slice(0);return e.length&&t.push(e[0]),t}function kve(e){return PF(e)}function jve(e){return yE($v(e))}function Dve(e,t){return bE($v(e),t)}function Fve(e,t,n){return _E($v(e),t,n)}function Bve(e,t){return xE($v(e),t)}function kh(e,t,n,r){var i=1-r;return i*i*e+2*r*i*t+r*r*n}function wE(e,t,n){var r=e+n-2*t;if(Ih(r,0))return[.5];var i=(e-t)/r;return i<=1&&i>=0?[i]:[]}function AF(e,t,n,r,i,a,o){var s=kh(e,n,i,o),l=kh(t,r,a,o),c=rl(e,t,n,r,o),u=rl(n,r,i,a,o);return[[e,t,c.x,c.y,s,l],[s,l,u.x,u.y,i,a]]}function Gx(e,t,n,r,i,a,o){if(o===0)return(Ka(e,t,n,r)+Ka(n,r,i,a)+Ka(e,t,i,a))/2;var s=AF(e,t,n,r,i,a,.5),l=s[0],c=s[1];return l.push(o-1),c.push(o-1),Gx.apply(void 0,__spreadArray([],__read(l),!1))+Gx.apply(void 0,__spreadArray([],__read(c),!1))}function RF(e,t,n,r,i,a){var o=wE(e,n,i)[0],s=wE(t,r,a)[0],l=[e,i],c=[t,a];return o!==void 0&&l.push(kh(e,n,i,o)),s!==void 0&&c.push(kh(t,r,a,s)),Zv(l,c)}function zve(e,t,n,r,i,a){return Gx(e,t,n,r,i,a,3)}function IF(e,t,n,r,i,a,o,s){return fE([e,n,i],[t,r,a],o,s,kh)}function LF(e,t,n,r,i,a,o,s){var l=IF(e,t,n,r,i,a,o,s);return Ka(l.x,l.y,o,s)}var NF=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:typeof self!="undefined"?self:{},SE={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(NF,function(){function n(O,C,E,P,T){r(O,C,E||0,P||O.length-1,T||a)}function r(O,C,E,P,T){for(;P>E;){if(P-E>600){var A=P-E+1,R=C-E+1,z=Math.log(A),I=.5*Math.exp(2*z/3),L=.5*Math.sqrt(z*I*(A-I)/A)*(R-A/2<0?-1:1),F=Math.max(E,Math.floor(C-R*I/A+L)),Z=Math.min(P,Math.floor(C+(A-R)*I/A+L));r(O,C,F,Z,T)}var H=O[C],W=E,G=P;for(i(O,E,C),T(O[P],H)>0&&i(O,E,P);W<G;){for(i(O,W,G),W++,G--;T(O[W],H)<0;)W++;for(;T(O[G],H)>0;)G--}T(O[E],H)===0?i(O,E,G):(G++,i(O,G,P)),G<=C&&(E=G+1),C<=G&&(P=G-1)}}function i(O,C,E){var P=O[C];O[C]=O[E],O[E]=P}function a(O,C){return O<C?-1:O>C?1:0}var o=function(C){C===void 0&&(C=9),this._maxEntries=Math.max(4,C),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(C){var E=this.data,P=[];if(!b(C,E))return P;for(var T=this.toBBox,A=[];E;){for(var R=0;R<E.children.length;R++){var z=E.children[R],I=E.leaf?T(z):z;b(C,I)&&(E.leaf?P.push(z):m(C,I)?this._all(z,P):A.push(z))}E=A.pop()}return P},o.prototype.collides=function(C){var E=this.data;if(!b(C,E))return!1;for(var P=[];E;){for(var T=0;T<E.children.length;T++){var A=E.children[T],R=E.leaf?this.toBBox(A):A;if(b(C,R)){if(E.leaf||m(C,R))return!0;P.push(A)}}E=P.pop()}return!1},o.prototype.load=function(C){if(!(C&&C.length))return this;if(C.length<this._minEntries){for(var E=0;E<C.length;E++)this.insert(C[E]);return this}var P=this._build(C.slice(),0,C.length-1,0);if(!this.data.children.length)this.data=P;else if(this.data.height===P.height)this._splitRoot(this.data,P);else{if(this.data.height<P.height){var T=this.data;this.data=P,P=T}this._insert(P,this.data.height-P.height-1,!0)}return this},o.prototype.insert=function(C){return C&&this._insert(C,this.data.height-1),this},o.prototype.clear=function(){return this.data=_([]),this},o.prototype.remove=function(C,E){if(!C)return this;for(var P=this.data,T=this.toBBox(C),A=[],R=[],z,I,L;P||A.length;){if(P||(P=A.pop(),I=A[A.length-1],z=R.pop(),L=!0),P.leaf){var F=s(C,P.children,E);if(F!==-1)return P.children.splice(F,1),A.push(P),this._condense(A),this}!L&&!P.leaf&&m(P,T)?(A.push(P),R.push(z),z=0,I=P,P=P.children[0]):I?(z++,P=I.children[z],L=!1):P=null}return this},o.prototype.toBBox=function(C){return C},o.prototype.compareMinX=function(C,E){return C.minX-E.minX},o.prototype.compareMinY=function(C,E){return C.minY-E.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(C){return this.data=C,this},o.prototype._all=function(C,E){for(var P=[];C;)C.leaf?E.push.apply(E,C.children):P.push.apply(P,C.children),C=P.pop();return E},o.prototype._build=function(C,E,P,T){var A=P-E+1,R=this._maxEntries,z;if(A<=R)return z=_(C.slice(E,P+1)),l(z,this.toBBox),z;T||(T=Math.ceil(Math.log(A)/Math.log(R)),R=Math.ceil(A/Math.pow(R,T-1))),z=_([]),z.leaf=!1,z.height=T;var I=Math.ceil(A/R),L=I*Math.ceil(Math.sqrt(R));S(C,E,P,L,this.compareMinX);for(var F=E;F<=P;F+=L){var Z=Math.min(F+L-1,P);S(C,F,Z,I,this.compareMinY);for(var H=F;H<=Z;H+=I){var W=Math.min(H+I-1,Z);z.children.push(this._build(C,H,W,T-1))}}return l(z,this.toBBox),z},o.prototype._chooseSubtree=function(C,E,P,T){for(;T.push(E),!(E.leaf||T.length-1===P);){for(var A=1/0,R=1/0,z=void 0,I=0;I<E.children.length;I++){var L=E.children[I],F=h(L),Z=v(C,L)-F;Z<R?(R=Z,A=F<A?F:A,z=L):Z===R&&F<A&&(A=F,z=L)}E=z||E.children[0]}return E},o.prototype._insert=function(C,E,P){var T=P?C:this.toBBox(C),A=[],R=this._chooseSubtree(T,this.data,E,A);for(R.children.push(C),u(R,T);E>=0&&A[E].children.length>this._maxEntries;)this._split(A,E),E--;this._adjustParentBBoxes(T,A,E)},o.prototype._split=function(C,E){var P=C[E],T=P.children.length,A=this._minEntries;this._chooseSplitAxis(P,A,T);var R=this._chooseSplitIndex(P,A,T),z=_(P.children.splice(R,P.children.length-R));z.height=P.height,z.leaf=P.leaf,l(P,this.toBBox),l(z,this.toBBox),E?C[E-1].children.push(z):this._splitRoot(P,z)},o.prototype._splitRoot=function(C,E){this.data=_([C,E]),this.data.height=C.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(C,E,P){for(var T,A=1/0,R=1/0,z=E;z<=P-E;z++){var I=c(C,0,z,this.toBBox),L=c(C,z,P,this.toBBox),F=g(I,L),Z=h(I)+h(L);F<A?(A=F,T=z,R=Z<R?Z:R):F===A&&Z<R&&(R=Z,T=z)}return T||P-E},o.prototype._chooseSplitAxis=function(C,E,P){var T=C.leaf?this.compareMinX:f,A=C.leaf?this.compareMinY:d,R=this._allDistMargin(C,E,P,T),z=this._allDistMargin(C,E,P,A);R<z&&C.children.sort(T)},o.prototype._allDistMargin=function(C,E,P,T){C.children.sort(T);for(var A=this.toBBox,R=c(C,0,E,A),z=c(C,P-E,P,A),I=p(R)+p(z),L=E;L<P-E;L++){var F=C.children[L];u(R,C.leaf?A(F):F),I+=p(R)}for(var Z=P-E-1;Z>=E;Z--){var H=C.children[Z];u(z,C.leaf?A(H):H),I+=p(z)}return I},o.prototype._adjustParentBBoxes=function(C,E,P){for(var T=P;T>=0;T--)u(E[T],C)},o.prototype._condense=function(C){for(var E=C.length-1,P=void 0;E>=0;E--)C[E].children.length===0?E>0?(P=C[E-1].children,P.splice(P.indexOf(C[E]),1)):this.clear():l(C[E],this.toBBox)};function s(O,C,E){if(!E)return C.indexOf(O);for(var P=0;P<C.length;P++)if(E(O,C[P]))return P;return-1}function l(O,C){c(O,0,O.children.length,C,O)}function c(O,C,E,P,T){T||(T=_(null)),T.minX=1/0,T.minY=1/0,T.maxX=-1/0,T.maxY=-1/0;for(var A=C;A<E;A++){var R=O.children[A];u(T,O.leaf?P(R):R)}return T}function u(O,C){return O.minX=Math.min(O.minX,C.minX),O.minY=Math.min(O.minY,C.minY),O.maxX=Math.max(O.maxX,C.maxX),O.maxY=Math.max(O.maxY,C.maxY),O}function f(O,C){return O.minX-C.minX}function d(O,C){return O.minY-C.minY}function h(O){return(O.maxX-O.minX)*(O.maxY-O.minY)}function p(O){return O.maxX-O.minX+(O.maxY-O.minY)}function v(O,C){return(Math.max(C.maxX,O.maxX)-Math.min(C.minX,O.minX))*(Math.max(C.maxY,O.maxY)-Math.min(C.minY,O.minY))}function g(O,C){var E=Math.max(O.minX,C.minX),P=Math.max(O.minY,C.minY),T=Math.min(O.maxX,C.maxX),A=Math.min(O.maxY,C.maxY);return Math.max(0,T-E)*Math.max(0,A-P)}function m(O,C){return O.minX<=C.minX&&O.minY<=C.minY&&C.maxX<=O.maxX&&C.maxY<=O.maxY}function b(O,C){return C.minX<=O.maxX&&C.minY<=O.maxY&&C.maxX>=O.minX&&C.maxY>=O.minY}function _(O){return{children:O,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function S(O,C,E,P,T){for(var A=[C,E];A.length;)if(E=A.pop(),C=A.pop(),!(E-C<=P)){var R=C+Math.ceil((E-C)/P/2)*P;n(O,R,C,E,T),A.push(C,R,R,E)}}return o})})(SE);var kF=SE.exports,De;(function(e){e.GROUP="g",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh"})(De||(De={}));var zf;(function(e){e[e.ZERO=0]="ZERO",e[e.NEGATIVE_ONE=1]="NEGATIVE_ONE"})(zf||(zf={}));var Sc=function(){function e(){this.plugins=[]}return e.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(n){var r=t.context.renderingPlugins.indexOf(n);r>=0&&t.context.renderingPlugins.splice(r,1)})},e}(),jF=function(){function e(t){this.clipSpaceNearZ=zf.NEGATIVE_ONE,this.plugins=[],this.config=Ie({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return e.prototype.registerPlugin=function(t){var n=this.plugins.findIndex(function(r){return r===t});n===-1&&this.plugins.push(t)},e.prototype.unregisterPlugin=function(t){var n=this.plugins.findIndex(function(r){return r===t});n>-1&&this.plugins.splice(n,1)},e.prototype.getPlugins=function(){return this.plugins},e.prototype.getPlugin=function(t){return this.plugins.find(function(n){return n.name===t})},e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(t){Object.assign(this.config,t)},e}();function Zf(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Hx(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function Wv(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function OE(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function DF(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function FF(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function $f(e){return e===void 0?0:e>360||e<-360?e%360:e}function mo(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=0),Array.isArray(e)&&e.length===3?Ze(e):Gi(e)?nt(e,t,n):nt(e[0],e[1]||t,e[2]||n)}function Mi(e){return e*(Math.PI/180)}function ys(e){return e*(180/Math.PI)}function Zve(e){return e=e%400,e<0&&(e+=400),e/400*360}function $ve(e){return e/360}function BF(e){return 360*e}function zF(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n,s=r*r,l=i*i,c=a*a,u=o+s+l+c,f=n*a-r*i;return f>.499995*u?(e[0]=Math.PI/2,e[1]=2*Math.atan2(r,n),e[2]=0):f<-.499995*u?(e[0]=-Math.PI/2,e[1]=2*Math.atan2(r,n),e[2]=0):(e[0]=Math.asin(2*(n*i-a*r)),e[1]=Math.atan2(2*(n*a+r*i),1-2*(l+c)),e[2]=Math.atan2(2*(n*r+i*a),1-2*(s+l))),e}function ZF(e,t){var n,r,i=Math.PI*.5,a=w(Nf(le(),t),3),o=a[0],s=a[1],l=a[2],c=Math.asin(-t[2]/o);return c<i?c>-i?(n=Math.atan2(t[6]/s,t[10]/l),r=Math.atan2(t[1]/o,t[0]/o)):(r=0,n=-Math.atan2(t[4]/s,t[5]/s)):(r=0,n=Math.atan2(t[4]/s,t[5]/s)),e[0]=n,e[1]=c,e[2]=r,e}function Yx(e,t){return t.length===16?ZF(e,t):zF(e,t)}function $F(e,t,n,r,i){var a=Math.cos(e),o=Math.sin(e);return X8(r*a,i*o,0,-r*o,i*a,0,t,n,1)}function WF(e,t,n,r,i,a,o,s){s===void 0&&(s=!1);var l=2*a/(n-t),c=2*a/(r-i),u=(n+t)/(n-t),f=(r+i)/(r-i),d,h;return s?(d=-o/(o-a),h=-o*a/(o-a)):(d=-(o+a)/(o-a),h=-2*o*a/(o-a)),e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=u,e[9]=f,e[10]=d,e[11]=-1,e[12]=0,e[13]=0,e[14]=h,e[15]=0,e}function CE(e){var t=e[0],n=e[1],r=e[3],i=e[4],a=Math.sqrt(t*t+n*n),o=Math.sqrt(r*r+i*i),s=t*i-n*r;s<0&&(t<i?a=-a:o=-o),a&&(t*=1/a,n*=1/a),o&&(r*=1/o,i*=1/o);var l=Math.atan2(n,t),c=ys(l);return[e[6],e[7],a,o,c]}var il=cr(),$s=cr(),jh=kf(),Cn=[le(),le(),le()],EE=le();function GF(e,t,n,r,i,a){if(!HF(il,e)||(Jo($s,il),$s[3]=0,$s[7]=0,$s[11]=0,$s[15]=1,Math.abs(Mh($s))<1e-8))return!1;var o=il[3],s=il[7],l=il[11],c=il[12],u=il[13],f=il[14],d=il[15];if(o!==0||s!==0||l!==0){jh[0]=o,jh[1]=s,jh[2]=l,jh[3]=d;var h=No($s,$s);if(!h)return!1;Ev($s,$s),Th(i,jh,$s)}else i[0]=i[1]=i[2]=0,i[3]=1;if(t[0]=c,t[1]=u,t[2]=f,YF(Cn,il),n[0]=Ke(Cn[0]),Yt(Cn[0],Cn[0]),r[0]=qe(Cn[0],Cn[1]),Vx(Cn[1],Cn[1],Cn[0],1,-r[0]),n[1]=Ke(Cn[1]),Yt(Cn[1],Cn[1]),r[0]/=n[1],r[1]=qe(Cn[0],Cn[2]),Vx(Cn[2],Cn[2],Cn[0],1,-r[1]),r[2]=qe(Cn[1],Cn[2]),Vx(Cn[2],Cn[2],Cn[1],1,-r[2]),n[2]=Ke(Cn[2]),Yt(Cn[2],Cn[2]),r[1]/=n[2],r[2]/=n[2],pt(EE,Cn[1],Cn[2]),qe(Cn[0],EE)<0)for(var p=0;p<3;p++)n[p]*=-1,Cn[p][0]*=-1,Cn[p][1]*=-1,Cn[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Cn[0][0]-Cn[1][1]-Cn[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Cn[0][0]+Cn[1][1]-Cn[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Cn[0][0]-Cn[1][1]+Cn[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Cn[0][0]+Cn[1][1]+Cn[2][2],0)),Cn[2][1]>Cn[1][2]&&(a[0]=-a[0]),Cn[0][2]>Cn[2][0]&&(a[1]=-a[1]),Cn[1][0]>Cn[0][1]&&(a[2]=-a[2]),!0}function HF(e,t){var n=t[15];if(n===0)return!1;for(var r=1/n,i=0;i<16;i++)e[i]=t[i]*r;return!0}function YF(e,t){e[0][0]=t[0],e[0][1]=t[1],e[0][2]=t[2],e[1][0]=t[4],e[1][1]=t[5],e[1][2]=t[6],e[2][0]=t[8],e[2][1]=t[9],e[2][2]=t[10]}function Vx(e,t,n,r,i){e[0]=t[0]*r+n[0]*i,e[1]=t[1]*r+n[1]*i,e[2]=t[2]*r+n[2]*i}var ra=function(){function e(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return e.isEmpty=function(t){return!t||t.halfExtents[0]===0&&t.halfExtents[1]===0&&t.halfExtents[2]===0},e.prototype.update=function(t,n){Zf(this.center,t),Zf(this.halfExtents,n),Hx(this.min,this.center,this.halfExtents),Wv(this.max,this.center,this.halfExtents)},e.prototype.setMinMax=function(t,n){Wv(this.center,n,t),OE(this.center,this.center,.5),Hx(this.halfExtents,n,t),OE(this.halfExtents,this.halfExtents,.5),Zf(this.min,t),Zf(this.max,n)},e.prototype.getMin=function(){return this.min},e.prototype.getMax=function(){return this.max},e.prototype.add=function(t){if(!e.isEmpty(t)){if(e.isEmpty(this)){this.setMinMax(t.getMin(),t.getMax());return}var n=this.center,r=n[0],i=n[1],a=n[2],o=this.halfExtents,s=o[0],l=o[1],c=o[2],u=r-s,f=r+s,d=i-l,h=i+l,p=a-c,v=a+c,g=t.center,m=g[0],b=g[1],_=g[2],S=t.halfExtents,O=S[0],C=S[1],E=S[2],P=m-O,T=m+O,A=b-C,R=b+C,z=_-E,I=_+E;P<u&&(u=P),T>f&&(f=T),A<d&&(d=A),R>h&&(h=R),z<p&&(p=z),I>v&&(v=I),n[0]=(u+f)*.5,n[1]=(d+h)*.5,n[2]=(p+v)*.5,o[0]=(f-u)*.5,o[1]=(h-d)*.5,o[2]=(v-p)*.5,this.min[0]=u,this.min[1]=d,this.min[2]=p,this.max[0]=f,this.max[1]=h,this.max[2]=v}},e.prototype.setFromTransformedAABB=function(t,n){var r=this.center,i=this.halfExtents,a=t.center,o=t.halfExtents,s=n[0],l=n[4],c=n[8],u=n[1],f=n[5],d=n[9],h=n[2],p=n[6],v=n[10],g=Math.abs(s),m=Math.abs(l),b=Math.abs(c),_=Math.abs(u),S=Math.abs(f),O=Math.abs(d),C=Math.abs(h),E=Math.abs(p),P=Math.abs(v);r[0]=n[12]+s*a[0]+l*a[1]+c*a[2],r[1]=n[13]+u*a[0]+f*a[1]+d*a[2],r[2]=n[14]+h*a[0]+p*a[1]+v*a[2],i[0]=g*o[0]+m*o[1]+b*o[2],i[1]=_*o[0]+S*o[1]+O*o[2],i[2]=C*o[0]+E*o[1]+P*o[2],Hx(this.min,r,i),Wv(this.max,r,i)},e.prototype.intersects=function(t){var n=this.getMax(),r=this.getMin(),i=t.getMax(),a=t.getMin();return r[0]<=i[0]&&n[0]>=a[0]&&r[1]<=i[1]&&n[1]>=a[1]&&r[2]<=i[2]&&n[2]>=a[2]},e.prototype.intersection=function(t){if(!this.intersects(t))return null;var n=new e,r=DF([0,0,0],this.getMin(),t.getMin()),i=FF([0,0,0],this.getMax(),t.getMax());return n.setMinMax(r,i),n},e.prototype.getNegativeFarPoint=function(t){return t.pnVertexFlag===273?Zf([0,0,0],this.min):t.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:t.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:t.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:t.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:t.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:t.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},e.prototype.getPositiveFarPoint=function(t){return t.pnVertexFlag===273?Zf([0,0,0],this.max):t.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:t.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:t.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:t.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:t.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:t.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},e}(),VF=function(){function e(t,n){this.distance=t||0,this.normal=n||nt(0,1,0),this.updatePNVertexFlag()}return e.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)},e.prototype.distanceToPoint=function(t){return qe(t,this.normal)-this.distance},e.prototype.normalize=function(){var t=1/mn(this.normal);Wt(this.normal,this.normal,t),this.distance*=t},e.prototype.intersectsLine=function(t,n,r){var i=this.distanceToPoint(t),a=this.distanceToPoint(n),o=i/(i-a),s=o>=0&&o<=1;return s&&r&&bt(r,t,n,o),s},e}(),Oc;(function(e){e[e.OUTSIDE=4294967295]="OUTSIDE",e[e.INSIDE=0]="INSIDE",e[e.INDETERMINATE=2147483647]="INDETERMINATE"})(Oc||(Oc={}));var UF=function(){function e(t){if(this.planes=[],t)this.planes=t;else for(var n=0;n<6;n++)this.planes.push(new VF)}return e.prototype.extractFromVPMatrix=function(t){var n=w(t,16),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6],u=n[7],f=n[8],d=n[9],h=n[10],p=n[11],v=n[12],g=n[13],m=n[14],b=n[15];Ae(this.planes[0].normal,o-r,u-s,p-f),this.planes[0].distance=b-v,Ae(this.planes[1].normal,o+r,u+s,p+f),this.planes[1].distance=b+v,Ae(this.planes[2].normal,o+i,u+l,p+d),this.planes[2].distance=b+g,Ae(this.planes[3].normal,o-i,u-l,p-d),this.planes[3].distance=b-g,Ae(this.planes[4].normal,o-a,u-c,p-h),this.planes[4].distance=b-m,Ae(this.planes[5].normal,o+a,u+c,p+h),this.planes[5].distance=b+m,this.planes.forEach(function(_){_.normalize(),_.updatePNVertexFlag()})},e}(),Ta=function(){function e(t,n){t===void 0&&(t=0),n===void 0&&(n=0),this.x=0,this.y=0,this.x=t,this.y=n}return e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},e}(),wu=function(){function e(t,n,r,i){this.x=t,this.y=n,this.width=r,this.height=i,this.left=t,this.right=t+r,this.top=n,this.bottom=n+i}return e.prototype.toJSON=function(){},e}(),$r="Method not implemented.",Wf="Use document.documentElement instead.",XF="Cannot append a destroyed element.",Nr;(function(e){e[e.ORBITING=0]="ORBITING",e[e.EXPLORING=1]="EXPLORING",e[e.TRACKING=2]="TRACKING"})(Nr||(Nr={}));var Dh;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ROTATIONAL=1]="ROTATIONAL",e[e.TRANSLATIONAL=2]="TRANSLATIONAL",e[e.CINEMATIC=3]="CINEMATIC"})(Dh||(Dh={}));var jo;(function(e){e[e.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",e[e.PERSPECTIVE=1]="PERSPECTIVE"})(jo||(jo={}));var ME={UPDATED:"updated"},PE=2e-4,TE=function(){function e(){this.clipSpaceNearZ=zf.NEGATIVE_ONE,this.eventEmitter=new Le,this.matrix=cr(),this.right=nt(1,0,0),this.up=nt(0,1,0),this.forward=nt(0,0,1),this.position=nt(0,0,1),this.focalPoint=nt(0,0,0),this.distanceVector=nt(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=cr(),this.projectionMatrixInverse=cr(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Nr.EXPLORING,this.trackingMode=Dh.DEFAULT,this.projectionMode=jo.PERSPECTIVE,this.frustum=new UF,this.orthoMatrix=cr()}return e.prototype.isOrtho=function(){return this.projectionMode===jo.ORTHOGRAPHIC},e.prototype.getProjectionMode=function(){return this.projectionMode},e.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.prototype.getFrustum=function(){return this.frustum},e.prototype.getPosition=function(){return this.position},e.prototype.getFocalPoint=function(){return this.focalPoint},e.prototype.getDollyingStep=function(){return this.dollyingStep},e.prototype.getNear=function(){return this.near},e.prototype.getFar=function(){return this.far},e.prototype.getZoom=function(){return this.zoom},e.prototype.getOrthoMatrix=function(){return this.orthoMatrix},e.prototype.getView=function(){return this.view},e.prototype.setEnableUpdate=function(t){this.enableUpdate=t},e.prototype.setType=function(t,n){return this.type=t,this.type===Nr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Nr.TRACKING&&n!==void 0&&this.setTrackingMode(n),this},e.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},e.prototype.setTrackingMode=function(t){if(this.type!==Nr.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.prototype.getViewTransform=function(){return No(cr(),this.matrix)},e.prototype.getWorldTransform=function(){return this.matrix},e.prototype.jitterProjectionMatrix=function(t,n){var r=Xr(cr(),[t,n,0]);this.jitteredProjectionMatrix=ya(cr(),r,this.projectionMatrix)},e.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},e.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.prototype.setNear=function(t){return this.projectionMode===jo.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.prototype.setFar=function(t){return this.projectionMode===jo.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.prototype.setViewOffset=function(t,n,r,i,a,o){return this.aspect=t/n,this.view===void 0&&(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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=a,this.view.height=o,this.projectionMode===jo.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},e.prototype.clearViewOffset=function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===jo.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},e.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===jo.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===jo.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.prototype.setZoomByViewportPoint=function(t,n){var r=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),i=r.x,a=r.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(i,a),this.setFocalPoint(i,a),this.setZoom(t),this.rotate(0,0,o);var s=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),l=s.x,c=s.y,u=nt(l-i,c-a,0),f=qe(u,this.right)/Ke(this.right),d=qe(u,this.up)/Ke(this.up);return this.pan(-f,-d),this},e.prototype.setPerspective=function(t,n,r,i){var a;this.projectionMode=jo.PERSPECTIVE,this.fov=r,this.near=t,this.far=n,this.aspect=i;var o=this.near*Math.tan(Mi(.5*this.fov))/this.zoom,s=2*o,l=this.aspect*s,c=-.5*l;if(!((a=this.view)===null||a===void 0)&&a.enabled){var u=this.view.fullWidth,f=this.view.fullHeight;c+=this.view.offsetX*l/u,o-=this.view.offsetY*s/f,l*=this.view.width/u,s*=this.view.height/f}return WF(this.projectionMatrix,c,c+l,o,o-s,t,this.far,this.clipSpaceNearZ===zf.ZERO),Lf(this.projectionMatrix,this.projectionMatrix,nt(1,-1,1)),No(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.prototype.setOrthographic=function(t,n,r,i,a,o){var s;this.projectionMode=jo.ORTHOGRAPHIC,this.rright=n,this.left=t,this.top=r,this.bottom=i,this.near=a,this.far=o;var l=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,f=(this.top+this.bottom)/2,d=u-l,h=u+l,p=f+c,v=f-c;if(!((s=this.view)===null||s===void 0)&&s.enabled){var g=(this.rright-this.left)/this.view.fullWidth/this.zoom,m=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d+=g*this.view.offsetX,h=d+g*this.view.width,p-=m*this.view.offsetY,v=p-m*this.view.height}return this.clipSpaceNearZ===zf.NEGATIVE_ONE?IC(this.projectionMatrix,d,h,v,p,a,o):LC(this.projectionMatrix,d,h,v,p,a,o),Lf(this.projectionMatrix,this.projectionMatrix,nt(1,-1,1)),No(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.prototype.setPosition=function(t,n,r){n===void 0&&(n=this.position[1]),r===void 0&&(r=this.position[2]);var i=mo(t,n,r);return this._setPosition(i),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.prototype.setFocalPoint=function(t,n,r){n===void 0&&(n=this.focalPoint[1]),r===void 0&&(r=this.focalPoint[2]);var i=nt(0,1,0);if(this.focalPoint=mo(t,n,r),this.trackingMode===Dh.CINEMATIC){var a=st(le(),this.focalPoint,this.position);t=a[0],n=a[1],r=a[2];var o=Ke(a),s=ys(Math.asin(n/o)),l=90+ys(Math.atan2(r,t)),c=cr();Ut(c,c,Mi(l)),$t(c,c,Mi(s)),i=tr(le(),[0,1,0],c)}return No(this.matrix,NC(cr(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.prototype.getDistance=function(){return this.distance},e.prototype.getDistanceVector=function(){return this.distanceVector},e.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<PE&&(this.distance=PE),this.dollyingStep=this.distance/100;var n=le();t=this.distance;var r=this.forward,i=this.focalPoint;return n[0]=t*r[0]+i[0],n[1]=t*r[1]+i[1],n[2]=t*r[2]+i[2],this._setPosition(n),this.triggerUpdate(),this},e.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},e.prototype.setMinDistance=function(t){return this.minDistance=t,this},e.prototype.setAzimuth=function(t){return this.azimuth=$f(t),this.computeMatrix(),this._getAxes(),this.type===Nr.ORBITING||this.type===Nr.EXPLORING?this._getPosition():this.type===Nr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getAzimuth=function(){return this.azimuth},e.prototype.setElevation=function(t){return this.elevation=$f(t),this.computeMatrix(),this._getAxes(),this.type===Nr.ORBITING||this.type===Nr.EXPLORING?this._getPosition():this.type===Nr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getElevation=function(){return this.elevation},e.prototype.setRoll=function(t){return this.roll=$f(t),this.computeMatrix(),this._getAxes(),this.type===Nr.ORBITING||this.type===Nr.EXPLORING?this._getPosition():this.type===Nr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.prototype.getRoll=function(){return this.roll},e.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.prototype.computeMatrix=function(){var t=xc(na(),[0,0,1],Mi(this.roll));ms(this.matrix);var n=xc(na(),[1,0,0],Mi((this.rotateWorld&&this.type!==Nr.TRACKING||this.type===Nr.TRACKING?1:-1)*this.elevation)),r=xc(na(),[0,1,0],Mi((this.rotateWorld&&this.type!==Nr.TRACKING||this.type===Nr.TRACKING?1:-1)*this.azimuth)),i=_c(na(),r,n);i=_c(na(),i,t);var a=Lx(cr(),i);this.type===Nr.ORBITING||this.type===Nr.EXPLORING?(zs(this.matrix,this.matrix,this.focalPoint),ya(this.matrix,this.matrix,a),zs(this.matrix,this.matrix,[0,0,this.distance])):this.type===Nr.TRACKING&&(zs(this.matrix,this.matrix,this.position),ya(this.matrix,this.matrix,a))},e.prototype._setPosition=function(t,n,r){this.position=mo(t,n,r);var i=this.matrix;i[12]=this.position[0],i[13]=this.position[1],i[14]=this.position[2],i[15]=1,this._getOrthoMatrix()},e.prototype._getAxes=function(){Ge(this.right,mo(Th(kf(),[1,0,0,0],this.matrix))),Ge(this.up,mo(Th(kf(),[0,1,0,0],this.matrix))),Ge(this.forward,mo(Th(kf(),[0,0,1,0],this.matrix))),Yt(this.right,this.right),Yt(this.up,this.up),Yt(this.forward,this.forward)},e.prototype._getAngles=function(){var t=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=Ke(this.distanceVector);if(i===0){this.elevation=0,this.azimuth=0;return}this.type===Nr.TRACKING?(this.elevation=ys(Math.asin(n/i)),this.azimuth=ys(Math.atan2(-t,-r))):this.rotateWorld?(this.elevation=ys(Math.asin(n/i)),this.azimuth=ys(Math.atan2(-t,-r))):(this.elevation=-ys(Math.asin(n/i)),this.azimuth=-ys(Math.atan2(-t,-r)))},e.prototype._getPosition=function(){Ge(this.position,mo(Th(kf(),[0,0,0,1],this.matrix))),this._getDistance()},e.prototype._getFocalPoint=function(){Ur(this.distanceVector,[0,0,-this.distance],U8(jC(),this.matrix)),$e(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e.prototype._getDistance=function(){this.distanceVector=st(le(),this.focalPoint,this.position),this.distance=Ke(this.distanceVector),this.dollyingStep=this.distance/100},e.prototype._getOrthoMatrix=function(){if(this.projectionMode===jo.ORTHOGRAPHIC){var t=this.position,n=xc(na(),[0,0,1],-this.roll*Math.PI/180);Ph(this.orthoMatrix,n,nt((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),nt(this.zoom,this.zoom,1),t)}},e.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),n=ya(cr(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(ME.UPDATED)}},e.prototype.rotate=function(t,n,r){throw new Error($r)},e.prototype.pan=function(t,n){throw new Error($r)},e.prototype.dolly=function(t){throw new Error($r)},e.prototype.createLandmark=function(t,n){throw new Error($r)},e.prototype.gotoLandmark=function(t,n){throw new Error($r)},e.prototype.cancelLandmarkAnimation=function(){throw new Error($r)},e}();function $a(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s)||o,s};return n.cache=new($a.Cache||Map),n}$a.Cache=Map;var At;(function(e){e[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger"})(At||(At={}));var es;(function(e){e[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther"})(es||(es={}));var AE;(function(e){e[e.kAll=0]="kAll",e[e.kNonNegative=1]="kNonNegative",e[e.kInteger=2]="kInteger",e[e.kNonNegativeInteger=3]="kNonNegativeInteger",e[e.kPositiveInteger=4]="kPositiveInteger"})(AE||(AE={}));var Ux;(function(e){e[e.kYes=0]="kYes",e[e.kNo=1]="kNo"})(Ux||(Ux={}));var Xx;(function(e){e[e.kYes=0]="kYes",e[e.kNo=1]="kNo"})(Xx||(Xx={}));var KF=[{name:"em",unit_type:At.kEms},{name:"px",unit_type:At.kPixels},{name:"deg",unit_type:At.kDegrees},{name:"rad",unit_type:At.kRadians},{name:"grad",unit_type:At.kGradians},{name:"ms",unit_type:At.kMilliseconds},{name:"s",unit_type:At.kSeconds},{name:"rem",unit_type:At.kRems},{name:"turn",unit_type:At.kTurns}],Cc;(function(e){e[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType"})(Cc||(Cc={}));var qF=function(e){return KF.find(function(t){return t.name===e}).unit_type},JF=function(e){return e?e==="number"?At.kNumber:e==="percent"||e==="%"?At.kPercentage:qF(e):At.kUnknown},QF=function(e){switch(e){case At.kNumber:case At.kInteger:return es.kUNumber;case At.kPercentage:return es.kUPercent;case At.kPixels:return es.kULength;case At.kMilliseconds:case At.kSeconds:return es.kUTime;case At.kDegrees:case At.kRadians:case At.kGradians:case At.kTurns:return es.kUAngle;default:return es.kUOther}},eB=function(e){switch(e){case es.kUNumber:return At.kNumber;case es.kULength:return At.kPixels;case es.kUPercent:return At.kPercentage;case es.kUTime:return At.kSeconds;case es.kUAngle:return At.kDegrees;default:return At.kUnknown}},RE=function(e){var t=1;switch(e){case At.kPixels:case At.kDegrees:case At.kSeconds:break;case At.kMilliseconds:t=.001;break;case At.kRadians:t=180/Math.PI;break;case At.kGradians:t=.9;break;case At.kTurns:t=360;break}return t},Kx=function(e){switch(e){case At.kNumber:case At.kInteger:return"";case At.kPercentage:return"%";case At.kEms:return"em";case At.kRems:return"rem";case At.kPixels:return"px";case At.kDegrees:return"deg";case At.kRadians:return"rad";case At.kGradians:return"grad";case At.kMilliseconds:return"ms";case At.kSeconds:return"s";case At.kTurns:return"turn"}return""},Gv=function(){function e(){}return e.isAngle=function(t){return t===At.kDegrees||t===At.kRadians||t===At.kGradians||t===At.kTurns},e.isLength=function(t){return t>=At.kEms&&t<At.kDegrees},e.isRelativeUnit=function(t){return t===At.kPercentage||t===At.kEms||t===At.kRems},e.isTime=function(t){return t===At.kSeconds||t===At.kMilliseconds},e.prototype.toString=function(){return this.buildCSSText(Ux.kNo,Xx.kNo,"")},e.prototype.isNumericValue=function(){return this.getType()>=Cc.kUnitType&&this.getType()<=Cc.kClampType},e}(),tB=function(e){zt(t,e);function t(n){var r=e.call(this)||this;return r.colorSpace=n,r}return t.prototype.getType=function(){return Cc.kColorType},t.prototype.to=function(n){return this},t}(Gv),al;(function(e){e[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient"})(al||(al={}));var Hv=function(e){zt(t,e);function t(n,r){var i=e.call(this)||this;return i.type=n,i.value=r,i}return t.prototype.clone=function(){return new t(this.type,this.value)},t.prototype.buildCSSText=function(n,r,i){return i},t.prototype.getType=function(){return Cc.kColorType},t}(Gv),Do=function(e){zt(t,e);function t(n){var r=e.call(this)||this;return r.value=n,r}return t.prototype.clone=function(){return new t(this.value)},t.prototype.getType=function(){return Cc.kKeywordType},t.prototype.buildCSSText=function(n,r,i){return i+this.value},t}(Gv),nB=$a(function(e){return e===void 0&&(e=""),e.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),IE=function(e){return e.split("").map(function(t,n){return t.toUpperCase()===t?"".concat(n!==0?"-":"").concat(t.toLowerCase()):t}).join("")};function rB(e){if(!e)throw new Error}function Gf(e){return typeof e=="function"}function iB(e){return typeof e=="symbol"}var Wve=function(e){return Object.fromEntries(Object.entries(e).filter(function(t){var n=__read(t,2),r=n[1];return r!==void 0}))},aB={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},qx=$a(function(e){var t=nB(e),n=aB[t];return t=(n==null?void 0:n.alias)||t,t}),oB=function(e,t){t===void 0&&(t="");var n="";return Number.isFinite(e)?(rB(Number.isNaN(e)),n="NaN"):e>0?n="infinity":n="-infinity",n+=t},Jx=function(e){return eB(QF(e))},Wr=function(e){zt(t,e);function t(n,r){r===void 0&&(r=At.kNumber);var i=e.call(this)||this,a;return typeof r=="string"?a=JF(r):a=r,i.unit=a,i.value=n,i}return t.prototype.clone=function(){return new t(this.value,this.unit)},t.prototype.equals=function(n){var r=n;return this.value===r.value&&this.unit===r.unit},t.prototype.getType=function(){return Cc.kUnitType},t.prototype.convertTo=function(n){if(this.unit===n)return new t(this.value,this.unit);var r=Jx(this.unit);if(r!==Jx(n)||r===At.kUnknown)return null;var i=RE(this.unit)/RE(n);return new t(this.value*i,n)},t.prototype.buildCSSText=function(n,r,i){var a;switch(this.unit){case At.kUnknown:break;case At.kInteger:a=Number(this.value).toFixed(0);break;case At.kNumber:case At.kPercentage:case At.kEms:case At.kRems:case At.kPixels:case At.kDegrees:case At.kRadians:case At.kGradians:case At.kMilliseconds:case At.kSeconds:case At.kTurns:{var o=-999999,s=999999,l=this.value,c=Kx(this.unit);if(l<o||l>s){var u=Kx(this.unit);!Number.isFinite(l)||Number.isNaN(l)?a=oB(l,u):a=l+(u||"")}else a="".concat(l).concat(c)}}return i+=a,i},t}(Gv),ba=new Wr(0,"px");new Wr(1,"px");var Ws=new Wr(0,"deg"),Qx=function(e){zt(t,e);function t(n,r,i,a,o){a===void 0&&(a=1),o===void 0&&(o=!1);var s=e.call(this,"rgb")||this;return s.r=n,s.g=r,s.b=i,s.alpha=a,s.isNone=o,s}return t.prototype.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},t.prototype.buildCSSText=function(n,r,i){return i+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},t}(tB),Qr=new Do("unset"),sB=new Do("initial"),lB=new Do("inherit"),e2={"":Qr,unset:Qr,initial:sB,inherit:lB},t2=function(e){return e2[e]||(e2[e]=new Do(e)),e2[e]},n2=new Qx(0,0,0,0,!0),LE=new Qx(0,0,0,0),cB=$a(function(e,t,n,r){return new Qx(e,t,n,r)},function(e,t,n,r){return"rgba(".concat(e,",").concat(t,",").concat(n,",").concat(r,")")}),Kr=function(e,t){return t===void 0&&(t=At.kNumber),new Wr(e,t)},Yv=new Wr(50,"%"),r2;(function(e){e[e.Standard=0]="Standard"})(r2||(r2={}));var Hf;(function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED"})(Hf||(Hf={}));var NE={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new wu(0,0,0,0)},kt;(function(e){e.COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>"})(kt||(kt={}));function uB(e){var t=e.type,n=e.value;return t==="hex"?"#".concat(n):t==="literal"?n:t==="rgb"?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")")}var fB=function(){var e={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(H){throw new Error(t+": "+H)}function r(){var H=i();return t.length>0&&n("Invalid input not EOF"),H}function i(){return _(a)}function a(){return o("linear-gradient",e.linearGradient,l)||o("repeating-linear-gradient",e.repeatingLinearGradient,l)||o("radial-gradient",e.radialGradient,f)||o("repeating-radial-gradient",e.repeatingRadialGradient,f)||o("conic-gradient",e.conicGradient,f)}function o(H,W,G){return s(W,function(J){var re=G();return re&&(F(e.comma)||n("Missing comma before color stops")),{type:H,orientation:re,colorStops:_(S)}})}function s(H,W){var G=F(H);if(G){F(e.startCall)||n("Missing (");var J=W(G);return F(e.endCall)||n("Missing )"),J}}function l(){return c()||u()}function c(){return L("directional",e.sideOrCorner,1)}function u(){return L("angular",e.angleValue,1)}function f(){var H,W=d(),G;return W&&(H=[],H.push(W),G=t,F(e.comma)&&(W=d(),W?H.push(W):t=G)),H}function d(){var H=h()||p();if(H)H.at=g();else{var W=v();if(W){H=W;var G=g();G&&(H.at=G)}else{var J=m();J&&(H={type:"default-radial",at:J})}}return H}function h(){var H=L("shape",/^(circle)/i,0);return H&&(H.style=I()||v()),H}function p(){var H=L("shape",/^(ellipse)/i,0);return H&&(H.style=R()||v()),H}function v(){return L("extent-keyword",e.extentKeywords,1)}function g(){if(L("position",/^at/,0)){var H=m();return H||n("Missing positioning value"),H}}function m(){var H=b();if(H.x||H.y)return{type:"position",value:H}}function b(){return{x:R(),y:R()}}function _(H){var W=H(),G=[];if(W)for(G.push(W);F(e.comma);)W=H(),W?G.push(W):n("One extra comma");return G}function S(){var H=O();return H||n("Expected color definition"),H.length=R(),H}function O(){return E()||T()||P()||C()}function C(){return L("literal",e.literalColor,0)}function E(){return L("hex",e.hexColor,1)}function P(){return s(e.rgbColor,function(){return{type:"rgb",value:_(A)}})}function T(){return s(e.rgbaColor,function(){return{type:"rgba",value:_(A)}})}function A(){return F(e.number)[1]}function R(){return L("%",e.percentageValue,1)||z()||I()}function z(){return L("position-keyword",e.positionKeywords,1)}function I(){return L("px",e.pixelValue,1)||L("em",e.emValue,1)}function L(H,W,G){var J=F(W);if(J)return{type:H,value:J[G]}}function F(H){var W=/^[\n\r\t\s]+/.exec(t);W&&Z(W[0].length);var G=H.exec(t);return G&&Z(G[0].length),G}function Z(H){t=t.substring(H)}return function(H){return t=H,r()}}();function dB(e,t,n){var r=Mi(n.value),i=0,a=0,o=i+e/2,s=a+t/2,l=Math.abs(e*Math.cos(r))+Math.abs(t*Math.sin(r)),c=o-Math.cos(r)*l/2,u=s-Math.sin(r)*l/2,f=o+Math.cos(r)*l/2,d=s+Math.sin(r)*l/2;return{x1:c,y1:u,x2:f,y2:d}}function hB(e,t,n,r,i){var a=n.value,o=r.value;n.unit===At.kPercentage&&(a=n.value/100*e),r.unit===At.kPercentage&&(o=r.value/100*t);var s=Math.max(ko([0,0],[a,o]),ko([0,t],[a,o]),ko([e,t],[a,o]),ko([e,0],[a,o]));return i&&(i instanceof Wr?s=i.value:i instanceof Do&&(i.value==="closest-side"?s=Math.min(a,e-a,o,t-o):i.value==="farthest-side"?s=Math.max(a,e-a,o,t-o):i.value==="closest-corner"&&(s=Math.min(ko([0,0],[a,o]),ko([0,t],[a,o]),ko([e,t],[a,o]),ko([e,0],[a,o]))))),{x:a,y:o,r:s}}var pB=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,vB=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,gB=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,kE=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function mB(e){var t,n,r,i=e.length;e[i-1].length=(t=e[i-1].length)!==null&&t!==void 0?t:{type:"%",value:"100"},i>1&&(e[0].length=(n=e[0].length)!==null&&n!==void 0?n:{type:"%",value:"0"});for(var a=0,o=Number(e[0].length.value),s=1;s<i;s++){var l=(r=e[s].length)===null||r===void 0?void 0:r.value;if(!Bt(l)&&!Bt(o)){for(var c=1;c<s-a;c++)e[a+c].length={type:"%",value:"".concat(o+(Number(l)-o)*c/(s-a))};a=s,o=Number(l)}}}var yB={left:270-90,top:0-90,bottom:180-90,right:90-90,"left top":315-90,"top left":315-90,"left bottom":225-90,"bottom left":225-90,"right top":45-90,"top right":45-90,"right bottom":135-90,"bottom right":135-90},bB=$a(function(e){var t;return e.type==="angular"?t=Number(e.value):t=yB[e.value]||0,Kr(t,"deg")}),xB=$a(function(e){var t=50,n=50,r="%",i="%";if((e==null?void 0:e.type)==="position"){var a=e.value,o=a.x,s=a.y;(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?t=0:o.value==="center"?t=50:o.value==="right"?t=100:o.value==="top"?n=0:o.value==="bottom"&&(n=100)),(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?t=0:s.value==="center"?n=50:s.value==="right"?t=100:s.value==="top"?n=0:s.value==="bottom"&&(n=100)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(r=o==null?void 0:o.type,t=Number(o.value)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(i=s==null?void 0:s.type,n=Number(s.value))}return{cx:Kr(t,r),cy:Kr(n,i)}}),_B=$a(function(e){var t;if(e.indexOf("linear")>-1||e.indexOf("radial")>-1){var n=fB(e);return n.map(function(s){var l=s.type,c=s.orientation,u=s.colorStops;mB(u);var f=u.map(function(_){return{offset:Kr(Number(_.length.value),"%"),color:uB(_)}});if(l==="linear-gradient")return new Hv(al.LinearGradient,{angle:c?bB(c):Ws,steps:f});if(l==="radial-gradient"&&(c||(c=[{type:"shape",value:"circle"}]),c[0].type==="shape"&&c[0].value==="circle")){var d=xB(c[0].at),h=d.cx,p=d.cy,v=void 0;if(c[0].style){var g=c[0].style,m=g.type,b=g.value;m==="extent-keyword"?v=t2(b):v=Kr(b,m)}return new Hv(al.RadialGradient,{cx:h,cy:p,size:v,steps:f})}})}var r=e[0];if(e[1]==="("||e[2]==="("){if(r==="l"){var i=pB.exec(e);if(i){var a=((t=i[2].match(kE))===null||t===void 0?void 0:t.map(function(s){return s.split(":")}))||[];return[new Hv(al.LinearGradient,{angle:Kr(parseFloat(i[1]),"deg"),steps:a.map(function(s){var l=w(s,2),c=l[0],u=l[1];return{offset:Kr(Number(c)*100,"%"),color:u}})})]}}else if(r==="r"){var o=wB(e);if(o)if(xi(o))e=o;else return[new Hv(al.RadialGradient,o)]}else if(r==="p")return SB(e)}});function wB(e){var t,n=vB.exec(e);if(n){var r=((t=n[4].match(kE))===null||t===void 0?void 0:t.map(function(i){return i.split(":")}))||[];return{cx:Kr(50,"%"),cy:Kr(50,"%"),steps:r.map(function(i){var a=w(i,2),o=a[0],s=a[1];return{offset:Kr(Number(o)*100,"%"),color:s}})}}return null}function SB(e){var t=gB.exec(e);if(t){var n=t[1],r=t[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}function Gve(e){return!!e.type&&!!e.value}function Fh(e){return e&&!!e.image}function Vv(e){return e&&!Bt(e.r)&&!Bt(e.g)&&!Bt(e.b)}var jl=$a(function(e){if(Fh(e))return Ie({repetition:"repeat"},e);if(Bt(e)&&(e=""),e==="transparent")return LE;e==="currentColor"&&(e="black");var t=_B(e);if(t)return t;var n=Bv(e),r=[0,0,0,0];return n!==null&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),cB.apply(void 0,N([],w(r),!1))});function OB(e,t){if(!(!Vv(e)||!Vv(t)))return[[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(n){var r=n.slice();if(r[3])for(var i=0;i<3;i++)r[i]=Math.round(Ri(r[i],0,255));return r[3]=Ri(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function Bh(e,t){if(Bt(t))return Kr(0,"px");if(t="".concat(t).trim().toLowerCase(),isFinite(Number(t))){if("px".search(e)>=0)return Kr(Number(t),"px");if("deg".search(e)>=0)return Kr(Number(t),"deg")}var n=[];t=t.replace(e,function(i){return n.push(i),"U"+i});var r="U("+e.source+")";return n.map(function(i){return Kr(Number(t.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var jE=function(e){return Bh(new RegExp("px","g"),e)},CB=$a(jE),EB=function(e){return Bh(new RegExp("%","g"),e)};$a(EB);var zh=function(e){return Gi(e)||isFinite(Number(e))?Kr(Number(e)||0,"px"):Bh(new RegExp("px|%|em|rem","g"),e)},Yf=$a(zh),i2=function(e){return Bh(new RegExp("deg|rad|grad|turn","g"),e)},DE=$a(i2);function MB(e,t,n,r,i){i===void 0&&(i=0);var a="",o=e.value||0,s=t.value||0,l=Jx(e.unit),c=e.convertTo(l),u=t.convertTo(l);return c&&u?(o=c.value,s=u.value,a=Kx(e.unit)):(Wr.isLength(e.unit)||Wr.isLength(t.unit))&&(o=ns(e,i,n),s=ns(t,i,n),a="px"),[o,s,function(f){return r&&(f=Math.max(f,0)),f+a}]}function ts(e){var t=0;return e.unit===At.kDegrees?t=e.value:e.unit===At.kRadians?t=ys(Number(e.value)):e.unit===At.kTurns&&(t=BF(Number(e.value))),t}function a2(e,t){var n;return Array.isArray(e)?n=e.map(function(r){return Number(r)}):xi(e)?n=e.split(" ").map(function(r){return Number(r)}):Gi(e)&&(n=[e]),t===2?n.length===1?[n[0],n[0]]:[n[0],n[1]]:n.length===1?[n[0],n[0],n[0],n[0]]:n.length===2?[n[0],n[1],n[0],n[1]]:n.length===3?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function FE(e){return xi(e)?e.split(" ").map(function(t){return Yf(t)}):e.map(function(t){return Yf(t.toString())})}function ns(e,t,n){if(e.value===0)return 0;if(e.unit===At.kPixels)return Number(e.value);if(e.unit===At.kPercentage&&n){var r=n.nodeName===De.GROUP?n.getLocalBounds():n.geometry.contentBounds;return e.value/100*r.halfExtents[t]*2}return 0}var PB=function(e){return Bh(/deg|rad|grad|turn|px|%/g,e)},TB=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function BE(e){if(e===void 0&&(e=""),e=e.toLowerCase().trim(),e==="none")return[];for(var t=/\s*([\w-]+)\(([^)]*)\)/g,n=[],r,i=0;r=t.exec(e);){if(r.index!==i)return[];if(i=r.index+r[0].length,TB.indexOf(r[1])>-1&&n.push({name:r[1],params:r[2].split(" ").map(function(a){return PB(a)||jl(a)})}),t.lastIndex===e.length)return n}return[]}function zE(e){return e.toString()}var Vf=function(e){return typeof e=="number"?Kr(e):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e)?Kr(Number(e)):Kr(0)},Su=$a(Vf);$a(function(e){return xi(e)?e.split(" ").map(Su):e.map(Su)});function o2(e,t){return[e,t,zE]}function s2(e,t){return function(n,r){return[n,r,function(i){return zE(Ri(i,e,t))}]}}function ZE(e,t){if(e.length===t.length)return[e,t,function(n){return n}]}function l2(e){return e.parsedStyle.path.totalLength===0&&(e.parsedStyle.path.totalLength=ZD(e.parsedStyle.path.absolutePath)),e.parsedStyle.path.totalLength}function AB(e){for(var t=0;t<e.length;t++){var n=e[t-1],r=e[t],i=r[0];if(i==="M"&&n){var a=n[0],o=[r[1],r[2]],s=void 0;a==="L"||a==="M"?s=[n[1],n[2]]:(a==="C"||a==="A"||a==="Q")&&(s=[n[n.length-2],n[n.length-1]]),s&&Uv(o,s)&&(e.splice(t,1),t--)}}}function RB(e){for(var t=!1,n=e.length,r=0;r<n;r++){var i=e[r],a=i[0];if(a==="C"||a==="A"||a==="Q"){t=!0;break}}return t}function IB(e){for(var t=[],n=[],r=[],i=0;i<e.length;i++){var a=e[i],o=a[0];o==="M"?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):o==="Z"?r.length&&(t.push(r),r=[]):r.push([a[1],a[2]])}return r.length>0&&n.push(r),{polygons:t,polylines:n}}function Uv(e,t){return e[0]===t[0]&&e[1]===t[1]}function LB(e,t){for(var n=[],r=[],i=[],a=0;a<e.length;a++){var o=e[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=RF(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=EF(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=_F(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1]);break}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),t&&(o.command==="L"||o.command==="M")&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(m){return!Number.isNaN(m)&&m!==1/0&&m!==-1/0}),r=r.filter(function(m){return!Number.isNaN(m)&&m!==1/0&&m!==-1/0});var d=kv(n),h=kv(r),p=jv(n),v=jv(r);if(i.length===0)return{x:d,y:h,width:p-d,height:v-h};for(var a=0;a<i.length;a++){var o=i[a],s=o.currentPoint,g=void 0;s[0]===d?(g=Xv(o,t),d=d-g.xExtra):s[0]===p&&(g=Xv(o,t),p=p+g.xExtra),s[1]===h?(g=Xv(o,t),h=h-g.yExtra):s[1]===v&&(g=Xv(o,t),v=v+g.yExtra)}return{x:d,y:h,width:p-d,height:v-h}}function Xv(e,t){var n=e.prePoint,r=e.currentPoint,i=e.nextPoint,a=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),o=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),l=Math.acos((a+o-s)/(2*Math.sqrt(a)*Math.sqrt(o)));if(!l||Math.sin(l)===0||Ih(l,0))return{xExtra:0,yExtra:0};var c=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]));c=c>Math.PI/2?Math.PI-c:c,u=u>Math.PI/2?Math.PI-u:u;var f={xExtra:Math.cos(l/2-c)*(t/2*(1/Math.sin(l/2)))-t/2||0,yExtra:Math.cos(u-l/2)*(t/2*(1/Math.sin(l/2)))-t/2||0};return f}function $E(e,t){return[t[0]+(t[0]-e[0]),t[1]+(t[1]-e[1])]}var WE=function(e,t){var n=e.x*t.x+e.y*t.y,r=Math.sqrt((Math.pow(e.x,2)+Math.pow(e.y,2))*(Math.pow(t.x,2)+Math.pow(t.y,2))),i=e.x*t.y-e.y*t.x<0?-1:1,a=i*Math.acos(n/r);return a},GE=function(e,t,n,r,i,a,o,s){t=Math.abs(t),n=Math.abs(n),r=YC(r,360);var l=Mi(r);if(e.x===o.x&&e.y===o.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(t===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(e.x-o.x)/2,u=(e.y-o.y)/2,f={x:Math.cos(l)*c+Math.sin(l)*u,y:-Math.sin(l)*c+Math.cos(l)*u},d=Math.pow(f.x,2)/Math.pow(t,2)+Math.pow(f.y,2)/Math.pow(n,2);d>1&&(t=Math.sqrt(d)*t,n=Math.sqrt(d)*n);var h=Math.pow(t,2)*Math.pow(n,2)-Math.pow(t,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2),p=Math.pow(t,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2),v=h/p;v=v<0?0:v;var g=(i!==a?1:-1)*Math.sqrt(v),m={x:g*(t*f.y/n),y:g*(-(n*f.x)/t)},b={x:Math.cos(l)*m.x-Math.sin(l)*m.y+(e.x+o.x)/2,y:Math.sin(l)*m.x+Math.cos(l)*m.y+(e.y+o.y)/2},_={x:(f.x-m.x)/t,y:(f.y-m.y)/n},S=WE({x:1,y:0},_),O={x:(-f.x-m.x)/t,y:(-f.y-m.y)/n},C=WE(_,O);!a&&C>0?C-=2*Math.PI:a&&C<0&&(C+=2*Math.PI),C%=2*Math.PI;var E=S+C*s,P=t*Math.cos(E),T=n*Math.sin(E),A={x:Math.cos(l)*P-Math.sin(l)*T+b.x,y:Math.sin(l)*P+Math.cos(l)*T+b.y,ellipticalArcStartAngle:S,ellipticalArcEndAngle:S+C,ellipticalArcAngle:E,ellipticalArcCenter:b,resultantRx:t,resultantRy:n};return A};function NB(e){for(var t=[],n=null,r=null,i=null,a=0,o=e.length,s=0;s<o;s++){var l=e[s];r=e[s+1];var c=l[0],u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=kB(n,l);u.arcParams=f;break}if(c==="Z")n=i,r=e[a+1];else{var d=l.length;n=[l[d-2],l[d-1]]}r&&r[0]==="Z"&&(r=e[a],t[a]&&(t[a].prePoint=n)),u.currentPoint=n,t[a]&&Uv(n,t[a].currentPoint)&&(t[a].prePoint=u.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;u.nextPoint=h;var p=u.prePoint;if(["L","H","V"].includes(c))u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]];else if(c==="Q"){var v=[l[1],l[2]];u.startTangent=[p[0]-v[0],p[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]}else if(c==="T"){var g=t[s-1],v=$E(g.currentPoint,p);g.command==="Q"?(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==="C"){var m=[l[1],l[2]],b=[l[3],l[4]];u.startTangent=[p[0]-m[0],p[1]-m[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]],u.startTangent[0]===0&&u.startTangent[1]===0&&(u.startTangent=[m[0]-b[0],m[1]-b[1]]),u.endTangent[0]===0&&u.endTangent[1]===0&&(u.endTangent=[b[0]-m[0],b[1]-m[1]])}else if(c==="S"){var g=t[s-1],m=$E(g.currentPoint,p),b=[l[1],l[2]];g.command==="C"?(u.command="C",u.startTangent=[p[0]-m[0],p[1]-m[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):(u.command="SQ",u.startTangent=[p[0]-b[0],p[1]-b[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])}else if(c==="A"){var _=HE(u,0),S=_.x,O=_.y,C=HE(u,1,!1),E=C.x,P=C.y;u.startTangent=[S,O],u.endTangent=[E,P]}t.push(u)}return t}function HE(e,t,n){n===void 0&&(n=!0);var r=e.arcParams,i=r.rx,a=i===void 0?0:i,o=r.ry,s=o===void 0?0:o,l=r.xRotation,c=r.arcFlag,u=r.sweepFlag,f=GE({x:e.prePoint[0],y:e.prePoint[1]},a,s,l,!!c,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},t),d=GE({x:e.prePoint[0],y:e.prePoint[1]},a,s,l,!!c,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},n?t+.005:t-.005),h=d.x-f.x,p=d.y-f.y,v=Math.sqrt(h*h+p*p);return{x:-h/v,y:-p/v}}function Kv(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function c2(e,t){return Kv(e)*Kv(t)?(e[0]*t[0]+e[1]*t[1])/(Kv(e)*Kv(t)):1}function YE(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(c2(e,t))}function kB(e,t){var n=t[1],r=t[2],i=YC(Mi(t[3]),Math.PI*2),a=t[4],o=t[5],s=e[0],l=e[1],c=t[6],u=t[7],f=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-u)/2,d=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-u)/2,h=f*f/(n*n)+d*d/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var p=n*n*(d*d)+r*r*(f*f),v=p?Math.sqrt((n*n*(r*r)-p)/p):1;a===o&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*n*d/r:0,m=n?v*-r*f/n:0,b=(s+c)/2+Math.cos(i)*g-Math.sin(i)*m,_=(l+u)/2+Math.sin(i)*g+Math.cos(i)*m,S=[(f-g)/n,(d-m)/r],O=[(-1*f-g)/n,(-1*d-m)/r],C=YE([1,0],S),E=YE(S,O);return c2(S,O)<=-1&&(E=Math.PI),c2(S,O)>=1&&(E=0),o===0&&E>0&&(E=E-2*Math.PI),o===1&&E<0&&(E=E+2*Math.PI),{cx:b,cy:_,rx:Uv(e,[c,u])?0:n,ry:Uv(e,[c,u])?0:r,startAngle:C,endAngle:C+E,xRotation:i,arcFlag:a,sweepFlag:o}}function jB(e,t,n){var r=t.parsedStyle,i=r.defX,a=i===void 0?0:i,o=r.defY,s=o===void 0?0:o;return e.reduce(function(l,c){var u="";if(c[0]==="M"||c[0]==="L"){var f=nt(c[1]-a,c[2]-s,0);n&&tr(f,f,n),u="".concat(c[0]).concat(f[0],",").concat(f[1])}else if(c[0]==="Z")u=c[0];else if(c[0]==="C"){var d=nt(c[1]-a,c[2]-s,0),h=nt(c[3]-a,c[4]-s,0),p=nt(c[5]-a,c[6]-s,0);n&&(tr(d,d,n),tr(h,h,n),tr(p,p,n)),u="".concat(c[0]).concat(d[0],",").concat(d[1],",").concat(h[0],",").concat(h[1],",").concat(p[0],",").concat(p[1])}else if(c[0]==="A"){var v=nt(c[6]-a,c[7]-s,0);n&&tr(v,v,n),u="".concat(c[0]).concat(c[1],",").concat(c[2],",").concat(c[3],",").concat(c[4],",").concat(c[5],",").concat(v[0],",").concat(v[1])}else if(c[0]==="Q"){var d=nt(c[1]-a,c[2]-s,0),h=nt(c[3]-a,c[4]-s,0);n&&(tr(d,d,n),tr(h,h,n)),u="".concat(c[0]).concat(c[1],",").concat(c[2],",").concat(c[3],",").concat(c[4],"}")}return l+=u},"")}function DB(e,t,n,r){return[["M",e,t],["L",n,r]]}function VE(e,t,n,r){var i=(-1+Math.sqrt(2))/3*4,a=e*i,o=t*i,s=n-e,l=n+e,c=r-t,u=r+t;return[["M",s,r],["C",s,r-o,n-a,c,n,c],["C",n+a,c,l,r-o,l,r],["C",l,r+o,n+a,u,n,u],["C",n-a,u,s,r+o,s,r],["Z"]]}function FB(e,t){var n=e.map(function(r,i){return[i===0?"M":"L",r[0],r[1]]});return t&&n.push(["Z"]),n}function BB(e,t,n,r,i){if(i){var a=w(i,4),o=a[0],s=a[1],l=a[2],c=a[3],u=e>0?1:-1,f=t>0?1:-1,d=u+f!==0?1:0;return[["M",u*o+n,r],["L",e-u*s+n,r],s?["A",s,s,0,0,d,e+n,f*s+r]:null,["L",e+n,t-f*l+r],l?["A",l,l,0,0,d,e+n-u*l,t+r]:null,["L",n+u*c,t+r],c?["A",c,c,0,0,d,n,t+r-f*c]:null,["L",n,f*o+r],o?["A",o,o,0,0,d,u*o+n,r]:null,["Z"]].filter(function(h){return h})}return[["M",n,r],["L",n+e,r],["L",n+e,r+t],["L",n,r+t],["Z"]]}function u2(e,t){t===void 0&&(t=e.getLocalTransform());var n=[];switch(e.nodeName){case De.LINE:var r=e.parsedStyle,i=r.x1,a=i===void 0?0:i,o=r.y1,s=o===void 0?0:o,l=r.x2,c=l===void 0?0:l,u=r.y2,f=u===void 0?0:u;n=DB(a,s,c,f);break;case De.CIRCLE:{var d=e.parsedStyle,h=d.r,p=h===void 0?0:h,v=d.cx,g=v===void 0?0:v,m=d.cy,b=m===void 0?0:m;n=VE(p,p,g,b);break}case De.ELLIPSE:{var _=e.parsedStyle,S=_.rx,O=S===void 0?0:S,C=_.ry,E=C===void 0?0:C,P=_.cx,g=P===void 0?0:P,T=_.cy,b=T===void 0?0:T;n=VE(O,E,g,b);break}case De.POLYLINE:case De.POLYGON:var A=e.parsedStyle.points;n=FB(A.points,e.nodeName===De.POLYGON);break;case De.RECT:var R=e.parsedStyle,z=R.width,I=z===void 0?0:z,L=R.height,F=L===void 0?0:L,Z=R.x,H=Z===void 0?0:Z,W=R.y,G=W===void 0?0:W,J=R.radius,re=J&&J.some(function(ce){return ce!==0});n=BB(I,F,H,G,re&&J.map(function(ce){return Ri(ce,0,Math.min(Math.abs(I)/2,Math.abs(F)/2))}));break;case De.PATH:var he=e.parsedStyle.path.absolutePath;n=N([],w(he),!1);break}if(n.length)return jB(n,e,t)}function Hve(e,t,n,r,i,a,o){r===void 0&&(r=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0);var s=e.map(function(l,c){var u=l[0],f=e[c+1],d=c===0&&(r!==0||i!==0),h=(c===e.length-1||f&&(f[0]==="M"||f[0]==="Z"))&&a!==0&&o!==0;switch(u){case"M":return d?"M ".concat(l[1]-t+r,",").concat(l[2]-n+i," L ").concat(l[1]-t,",").concat(l[2]-n):"M ".concat(l[1]-t,",").concat(l[2]-n);case"L":return"L ".concat(l[1]-t+(h?a:0),",").concat(l[2]-n+(h?o:0));case"Q":return"Q ".concat(l[1]-t," ").concat(l[2]-n,",").concat(l[3]-t," ").concat(l[4]-n)+(h?" L ".concat(l[3]-t+a,",").concat(l[4]-n+o):"");case"C":return"C ".concat(l[1]-t," ").concat(l[2]-n,",").concat(l[3]-t," ").concat(l[4]-n,",").concat(l[5]-t," ").concat(l[6]-n)+(h?" L ".concat(l[5]-t+a,",").concat(l[6]-n+o):"");case"A":return"A ".concat(l[1]," ").concat(l[2]," ").concat(l[3]," ").concat(l[4]," ").concat(l[5]," ").concat(l[6]-t," ").concat(l[7]-n)+(h?" L ".concat(l[6]-t+a,",").concat(l[7]-n+o):"");case"Z":return"Z"}}).join(" ");return~s.indexOf("NaN")?"":s}var UE=function(e){if(e===""||Array.isArray(e)&&e.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var t;try{t=Nv(e)}catch(d){t=Nv(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}AB(t);var n=RB(t),r=IB(t),i=r.polygons,a=r.polylines,o=NB(t),s=LB(o,0),l=s.x,c=s.y,u=s.width,f=s.height;return{absolutePath:t,hasArc:n,segments:o,polygons:i,polylines:a,totalLength:0,rect:{x:Number.isFinite(l)?l:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(u)?u:0,height:Number.isFinite(f)?f:0}}},zB=$a(UE);function f2(e){return xi(e)?zB(e):UE(e)}function ZB(e,t,n){var r=e.curve,i=t.curve;(!r||r.length===0)&&(r=Bx(e.absolutePath,!1),e.curve=r),(!i||i.length===0)&&(i=Bx(t.absolutePath,!1),t.curve=i);var a=[r,i];r.length!==i.length&&(a=XC(r,i));var o=KC(a[0])!==KC(a[1])?qD(a[0]):JD(a[0]);return[o,eF(a[1],o),function(s){return s}]}function XE(e,t){var n;xi(e)?n=e.split(" ").map(function(u){var f=w(u.split(","),2),d=f[0],h=f[1];return[Number(d),Number(h)]}):n=e;var r=[],i=0,a,o,s=TF(n);n.forEach(function(u,f){n[f+1]&&(a=[0,0],a[0]=i/s,o=dE(u[0],u[1],n[f+1][0],n[f+1][1]),i+=o,a[1]=i/s,r.push(a))});var l=Math.min.apply(Math,N([],w(n.map(function(u){return u[0]})),!1)),c=Math.min.apply(Math,N([],w(n.map(function(u){return u[1]})),!1));return t&&(t.parsedStyle.defX=l,t.parsedStyle.defY=c),{points:n,totalLength:s,segments:r}}function $B(e,t){return[e.points,t.points,function(n){return n}]}var Ii=null;function Fo(e){return function(t){var n=0;return e.map(function(r){return r===Ii?t[n++]:r})}}function Ou(e){return e}var qv={matrix:["NNNNNN",[Ii,Ii,0,0,Ii,Ii,0,0,0,0,1,0,Ii,Ii,0,1],Ou],matrix3d:["NNNNNNNNNNNNNNNN",Ou],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Fo([Ii,Ii,new Wr(1)]),Ou],scalex:["N",Fo([Ii,new Wr(1),new Wr(1)]),Fo([Ii,new Wr(1)])],scaley:["N",Fo([new Wr(1),Ii,new Wr(1)]),Fo([new Wr(1),Ii])],scalez:["N",Fo([new Wr(1),new Wr(1),Ii])],scale3d:["NNN",Ou],skew:["Aa",null,Ou],skewx:["A",null,Fo([Ii,Ws])],skewy:["A",null,Fo([Ws,Ii])],translate:["Tt",Fo([Ii,Ii,ba]),Ou],translatex:["T",Fo([Ii,ba,ba]),Fo([Ii,ba])],translatey:["T",Fo([ba,Ii,ba]),Fo([ba,Ii])],translatez:["L",Fo([ba,ba,Ii])],translate3d:["TTL",Ou]};function d2(e){if(e=(e||"none").toLowerCase().trim(),e==="none")return[];for(var t=/\s*(\w+)\(([^)]*)\)/g,n=[],r,i=0;r=t.exec(e);){if(r.index!==i)return[];i=r.index+r[0].length;var a=r[1],o=qv[a];if(!o)return[];var s=r[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],d=l[u],h=void 0;if(f?h={A:function(p){return p.trim()==="0"?Ws:DE(p)},N:Su,T:Yf,L:CB}[d.toUpperCase()](f):h={a:Ws,n:c[0],t:ba}[d],h===void 0)return[];c.push(h)}if(n.push({t:a,d:c}),t.lastIndex===e.length)return n}return[]}function KE(e){if(e=(e||"none").toLowerCase().trim(),e==="none")return[];for(var t=/\s*(\w+)\(([^)]*)\)/g,n=[],r,i=0;r=t.exec(e);){if(r.index!==i)return[];i=r.index+r[0].length;var a=r[1],o=qv[a];if(!o)return[];var s=r[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],d=l[u],h=void 0;if(f?h={A:function(p){return p.trim()==="0"?Ws:i2(p)},N:Vf,T:zh,L:jE}[d.toUpperCase()](f):h={a:Ws,n:c[0],t:ba}[d],h===void 0)return[];c.push(h)}if(n.push({t:a,d:c}),t.lastIndex===e.length)return n}return[]}function WB(e){var t,n,r,i;switch(e.t){case"rotatex":return i=Mi(ts(e.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=Mi(ts(e.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=Mi(ts(e.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":t=e.d[0].value,n=e.d[1].value,r=e.d[2].value,i=Mi(ts(e.d[3]));var a=t*t+n*n+r*r;if(a===0)t=1,n=0,r=0;else if(a!==1){var o=Math.sqrt(a);t/=o,n/=o,r/=o}var s=Math.sin(i/2),l=s*Math.cos(i/2),c=s*s;return[1-2*(n*n+r*r)*c,2*(t*n*c+r*l),2*(t*r*c-n*l),0,2*(t*n*c-r*l),1-2*(t*t+r*r)*c,2*(n*r*c+t*l),0,2*(t*r*c+n*l),2*(n*r*c-t*l),1-2*(t*t+n*n)*c,0,0,0,0,1];case"scale":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[e.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,e.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,e.d[0].value,0,0,0,0,1];case"scale3d":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,e.d[2].value,0,0,0,0,1];case"skew":var u=Mi(ts(e.d[0])),f=Mi(ts(e.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=Mi(ts(e.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Mi(ts(e.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return t=ns(e.d[0],0,null)||0,n=ns(e.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,n,0,1];case"translatex":return t=ns(e.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,0,0,1];case"translatey":return n=ns(e.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,n,0,1];case"translatez":return r=ns(e.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r,1];case"translate3d":return t=ns(e.d[0],0,null)||0,n=ns(e.d[1],0,null)||0,r=ns(e.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,n,r,1];case"perspective":var d=ns(e.d[0],0,null)||0,h=d?-1/d:0;return[1,0,0,0,0,1,0,0,0,0,1,h,0,0,0,1];case"matrix":return[e.d[0].value,e.d[1].value,0,0,e.d[2].value,e.d[3].value,0,0,0,0,1,0,e.d[4].value,e.d[5].value,0,1];case"matrix3d":return e.d.map(function(p){return p.value})}}function GB(e,t){return[e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],e[0]*t[4]+e[4]*t[5]+e[8]*t[6]+e[12]*t[7],e[1]*t[4]+e[5]*t[5]+e[9]*t[6]+e[13]*t[7],e[2]*t[4]+e[6]*t[5]+e[10]*t[6]+e[14]*t[7],e[3]*t[4]+e[7]*t[5]+e[11]*t[6]+e[15]*t[7],e[0]*t[8]+e[4]*t[9]+e[8]*t[10]+e[12]*t[11],e[1]*t[8]+e[5]*t[9]+e[9]*t[10]+e[13]*t[11],e[2]*t[8]+e[6]*t[9]+e[10]*t[10]+e[14]*t[11],e[3]*t[8]+e[7]*t[9]+e[11]*t[10]+e[15]*t[11],e[0]*t[12]+e[4]*t[13]+e[8]*t[14]+e[12]*t[15],e[1]*t[12]+e[5]*t[13]+e[9]*t[14]+e[13]*t[15],e[2]*t[12]+e[6]*t[13]+e[10]*t[14]+e[14]*t[15],e[3]*t[12]+e[7]*t[13]+e[11]*t[14]+e[15]*t[15]]}function HB(e){return e.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(WB).reduce(GB)}function qE(e){var t=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return GF(HB(e),t,n,r,i,a),[[t,n,r,a,i]]}var YB=function(){function e(r,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],o=0;o<4;o++)for(var s=0;s<4;s++)for(var l=0;l<4;l++)a[o][s]+=i[o][l]*r[l][s];return a}function t(r){return r[0][2]==0&&r[0][3]==0&&r[1][2]==0&&r[1][3]==0&&r[2][0]==0&&r[2][1]==0&&r[2][2]==1&&r[2][3]==0&&r[3][2]==0&&r[3][3]==1}function n(r,i,a,o,s){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],c=0;c<4;c++)l[c][3]=s[c];for(var c=0;c<3;c++)for(var u=0;u<3;u++)l[3][c]+=r[u]*l[u][c];var f=o[0],d=o[1],h=o[2],p=o[3],v=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];v[0][0]=1-2*(d*d+h*h),v[0][1]=2*(f*d-h*p),v[0][2]=2*(f*h+d*p),v[1][0]=2*(f*d+h*p),v[1][1]=1-2*(f*f+h*h),v[1][2]=2*(d*h-f*p),v[2][0]=2*(f*h-d*p),v[2][1]=2*(d*h+f*p),v[2][2]=1-2*(f*f+d*d),l=e(l,v);var g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(g[2][1]=a[2],l=e(l,g)),a[1]&&(g[2][1]=0,g[2][0]=a[0],l=e(l,g)),a[0]&&(g[2][0]=0,g[1][0]=a[0],l=e(l,g));for(var c=0;c<3;c++)for(var u=0;u<3;u++)l[c][u]*=i[c];return t(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return n}();function VB(e){return e.toFixed(6).replace(".000000","")}function h2(e,t){var n,r;return e.decompositionPair!==t&&(e.decompositionPair=t,n=qE(e)),t.decompositionPair!==e&&(t.decompositionPair=e,r=qE(t)),n[0]===null||r[0]===null?[[!1],[!0],function(i){return i?t[0].d:e[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(i){var a=XB(n[0][3],r[0][3],i[5]),o=YB(i[0],i[1],i[2],a,i[4]),s=o.map(VB).join(",");return s}])}function UB(e,t){for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function XB(e,t,n){var r=UB(e,t);r=Ri(r,-1,1);var i=[];if(r===1)i=e;else for(var a=Math.acos(r),o=Math.sin(n*a)*1/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(e[s]*(Math.cos(n*a)-r*o)+t[s]*o);return i}function p2(e){return e.replace(/[xy]/,"")}function v2(e){return e.replace(/(x|y|z|3d)?$/,"3d")}var KB=function(e,t){return e==="perspective"&&t==="perspective"||(e==="matrix"||e==="matrix3d")&&(t==="matrix"||t==="matrix3d")};function qB(e,t,n){var r=!1;if(!e.length||!t.length){e.length||(r=!0,e=t,t=[]);for(var i=function(C){var E=e[C],P=E.t,T=E.d,A=P.substring(0,5)==="scale"?1:0;t.push({t:P,d:T.map(function(R){return typeof R=="number"?Kr(A):Kr(A,R.unit)})})},a=0;a<e.length;a++)i(a)}var o=[],s=[],l=[];if(e.length!==t.length){var c=h2(e,t);o=[c[0]],s=[c[1]],l=[["matrix",[c[2]]]]}else for(var a=0;a<e.length;a++){var u=e[a].t,f=t[a].t,d=e[a].d,h=t[a].d,p=qv[u],v=qv[f],g=void 0;if(KB(u,f)){var c=h2([e[a]],[t[a]]);o.push(c[0]),s.push(c[1]),l.push(["matrix",[c[2]]]);continue}else if(u===f)g=u;else if(p[2]&&v[2]&&p2(u)===p2(f))g=p2(u),d=p[2](d),h=v[2](h);else if(p[1]&&v[1]&&v2(u)===v2(f))g=v2(u),d=p[1](d),h=v[1](h);else{var c=h2(e,t);o=[c[0]],s=[c[1]],l=[["matrix",[c[2]]]];break}for(var m=[],b=[],_=[],S=0;S<d.length;S++){var c=MB(d[S],h[S],n,!1,S);m[S]=c[0],b[S]=c[1],_.push(c[2])}o.push(m),s.push(b),l.push([g,_])}if(r){var O=o;o=s,s=O}return[o,s,function(C){return C.map(function(E,P){var T=E.map(function(A,R){return l[P][1][R](A)}).join(",");return l[P][0]==="matrix"&&T.split(",").length===16&&(l[P][0]="matrix3d"),l[P][0]==="matrix3d"&&T.split(",").length===6&&(l[P][0]="matrix"),l[P][0]+"("+T+")"}).join(" ")}]}var JE=$a(function(e){if(xi(e)){if(e==="text-anchor")return[Kr(0,"px"),Kr(0,"px")];var t=e.split(" ");return t.length===1&&(t[0]==="top"||t[0]==="bottom"?(t[1]=t[0],t[0]="center"):t[1]="center"),t.length!==2?null:[Yf(Jv(t[0])),Yf(Jv(t[1]))]}else return[Kr(e[0]||0,"px"),Kr(e[1]||0,"px")]}),JB=function(e){if(xi(e)){if(e==="text-anchor")return[Kr(0,"px"),Kr(0,"px")];var t=e.split(" ");return t.length===1&&(t[0]==="top"||t[0]==="bottom"?(t[1]=t[0],t[0]="center"):t[1]="center"),t.length!==2?null:[zh(Jv(t[0])),zh(Jv(t[1]))]}else return[Kr(e[0]||0,"px"),Kr(e[1]||0,"px")]};function Jv(e){return e==="center"?"50%":e==="left"||e==="top"?"0":e==="right"||e==="bottom"?"100%":e}var g2=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:kt.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:kt.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:kt.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:kt.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:kt.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:kt.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:kt.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:kt.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:kt.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:kt.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:kt.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:kt.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:kt.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:kt.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:kt.FILTER},{n:"clipPath",syntax:kt.DEFINED_PATH},{n:"textPath",syntax:kt.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:kt.TRANSFORM},{n:"transformOrigin",p:100,d:function(e){return e===De.CIRCLE||e===De.ELLIPSE?"center":e===De.TEXT?"text-anchor":"left top"},l:!0,syntax:kt.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(e){return e===De.CIRCLE||e===De.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:kt.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:kt.COORDINATE},{n:"cy",int:!0,d:"0",syntax:kt.COORDINATE},{n:"cz",int:!0,d:"0",syntax:kt.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:kt.COORDINATE},{n:"y",int:!0,d:"0",syntax:kt.COORDINATE},{n:"z",int:!0,d:"0",syntax:kt.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:kt.COORDINATE},{n:"y1",int:!0,l:!0,syntax:kt.COORDINATE},{n:"z1",int:!0,l:!0,syntax:kt.COORDINATE},{n:"x2",int:!0,l:!0,syntax:kt.COORDINATE},{n:"y2",int:!0,l:!0,syntax:kt.COORDINATE},{n:"z2",int:!0,l:!0,syntax:kt.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:kt.PATH,p:50},{n:"points",int:!0,l:!0,syntax:kt.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:kt.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:kt.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:kt.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:kt.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:kt.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:kt.NUMBER,d:function(e){return e===De.PATH||e===De.POLYGON||e===De.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:kt.MARKER},{n:"markerEnd",syntax:kt.MARKER},{n:"markerMid",syntax:kt.MARKER},{n:"markerStartOffset",syntax:kt.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:kt.LENGTH,l:!0,int:!0,d:"0"}],QE=g2.filter(function(e){return!!e.l}).map(function(e){return e.n}),Ec={},Uf=new WeakMap,QB=function(e,t){var n=Uf.get(e);return!n||n.length===0?!0:n.includes(t)},e9=function(){function e(t){var n=this;this.runtime=t,g2.forEach(function(r){n.registerMetadata(r)})}return e.prototype.registerMetadata=function(t){N([t.n],w(t.a||[]),!1).forEach(function(n){Ec[n]=t})},e.prototype.unregisterMetadata=function(t){delete Ec[t]},e.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},e.prototype.processProperties=function(t,n,r){var i=this;if(r===void 0&&(r={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,n);var a=Object.keys(n),o=t.parsedStyle.clipPath,s=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,n);var l=!!r.forceUpdateGeometry;if(!l){for(var c=0;c<QE.length;c++)if(QE[c]in n){l=!0;break}}n.fill&&(t.parsedStyle.fill=jl(n.fill)),n.stroke&&(t.parsedStyle.stroke=jl(n.stroke)),n.shadowColor&&(t.parsedStyle.shadowColor=jl(n.shadowColor)),n.filter&&(t.parsedStyle.filter=BE(n.filter)),Bt(n.radius)||(t.parsedStyle.radius=a2(n.radius,4)),Bt(n.lineDash)||(t.parsedStyle.lineDash=a2(n.lineDash,2)),n.points&&(t.parsedStyle.points=XE(n.points,t)),n.path===""&&(t.parsedStyle.path=Ie({},NE)),n.path&&(t.parsedStyle.path=f2(n.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),n.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:n.textTransform},t,null),n.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,n.clipPath,t,this.runtime),n.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",s,n.offsetPath,t,this.runtime),n.anchor&&(t.parsedStyle.anchor=a2(n.anchor,2)),n.transform&&(t.parsedStyle.transform=d2(n.transform)),n.transformOrigin&&(t.parsedStyle.transformOrigin=JE(n.transformOrigin)),n.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,n.markerStart,n.markerStart,null,null)),n.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,n.markerEnd,n.markerEnd,null,null)),n.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",n.markerMid,n.markerMid,null,null)),((t.nodeName===De.CIRCLE||t.nodeName===De.ELLIPSE)&&(!Bt(n.cx)||!Bt(n.cy))||(t.nodeName===De.RECT||t.nodeName===De.IMAGE||t.nodeName===De.GROUP||t.nodeName===De.HTML||t.nodeName===De.TEXT||t.nodeName===De.MESH)&&(!Bt(n.x)||!Bt(n.y)||!Bt(n.z))||t.nodeName===De.LINE&&(!Bt(n.x1)||!Bt(n.y1)||!Bt(n.z1)||!Bt(n.x2)||!Bt(n.y2)||!Bt(n.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,a),Bt(n.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,a),n.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,a),n.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,a),Bt(n.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,a),n.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,a),l&&this.updateGeometry(t);return}var u=r.skipUpdateAttribute,f=r.skipParse,d=r.forceUpdateGeometry,h=r.usedAttributes,p=r.memoize,v=d,g=Object.keys(n);g.forEach(function(m){var b;u||(t.attributes[m]=n[m]),!v&&(!((b=Ec[m])===null||b===void 0)&&b.l)&&(v=!0)}),f||g.forEach(function(m){t.computedStyle[m]=i.parseProperty(m,t.attributes[m],t,p)}),h!=null&&h.length&&(g=Array.from(new Set(g.concat(h)))),g.forEach(function(m){m in t.computedStyle&&(t.parsedStyle[m]=i.computeProperty(m,t.computedStyle[m],t,p))}),v&&this.updateGeometry(t),g.forEach(function(m){m in t.parsedStyle&&i.postProcessProperty(m,t,g)}),this.runtime.enableCSSParsing&&t.children.length&&g.forEach(function(m){m in t.parsedStyle&&i.isPropertyInheritable(m)&&t.children.forEach(function(b){b.internalSetAttribute(m,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.prototype.parseProperty=function(t,n,r,i){var a=Ec[t],o=n;if((n===""||Bt(n))&&(n="unset"),n==="unset"||n==="initial"||n==="inherit")o=t2(n);else if(a){var s=a.k,l=a.syntax,c=l&&this.getPropertySyntax(l);s&&s.indexOf(n)>-1?o=t2(n):c&&(!i&&c.parserUnmemoize?o=c.parserUnmemoize(n,r):c.parser&&(o=c.parser(n,r)))}return o},e.prototype.computeProperty=function(t,n,r,i){var a=Ec[t],o=r.id==="g-root",s=n;if(a){var l=a.syntax,c=a.inh,u=a.d;if(n instanceof Do){var f=n.value;if(f==="unset"&&(c&&!o?f="inherit":f="initial"),f==="initial")Bt(u)||(n=this.parseProperty(t,Gf(u)?u(r.nodeName):u,r,i));else if(f==="inherit"){var d=this.tryToResolveProperty(r,t,{inherited:!0});if(Bt(d)){this.addUnresolveProperty(r,t);return}else return d}}var h=l&&this.getPropertySyntax(l);if(h&&h.calculator){var p=r.parsedStyle[t];s=h.calculator(t,p,n,r,this.runtime)}else n instanceof Do?s=n.value:s=n}return s},e.prototype.postProcessProperty=function(t,n,r){var i=Ec[t];if(i&&i.syntax){var a=i.syntax&&this.getPropertySyntax(i.syntax),o=a;o&&o.postProcessor&&o.postProcessor(n,r)}},e.prototype.addUnresolveProperty=function(t,n){var r=Uf.get(t);r||(Uf.set(t,[]),r=Uf.get(t)),r.indexOf(n)===-1&&r.push(n)},e.prototype.tryToResolveProperty=function(t,n,r){r===void 0&&(r={});var i=r.inherited;if(i&&t.parentElement&&QB(t.parentElement,n)){var a=t.parentElement.parsedStyle[n];return a==="unset"||a==="initial"||a==="inherit"?void 0:a}},e.prototype.recalc=function(t){var n=Uf.get(t);if(n&&n.length){var r={};n.forEach(function(i){r[i]=t.attributes[i]}),this.processProperties(t,r),Uf.delete(t)}},e.prototype.updateGeometry=function(t){var n=t.nodeName,r=this.runtime.geometryUpdaterFactory[n];if(r){var i=t.geometry;i.contentBounds||(i.contentBounds=new ra),i.renderBounds||(i.renderBounds=new ra);var a=t.parsedStyle,o=r.update(a,t),s=o.width,l=o.height,c=o.depth,u=c===void 0?0:c,f=o.offsetX,d=f===void 0?0:f,h=o.offsetY,p=h===void 0?0:h,v=o.offsetZ,g=v===void 0?0:v,m=[Math.abs(s)/2,Math.abs(l)/2,u/2],b=a,_=b.stroke,S=b.lineWidth,O=b.increasedLineWidthForHitTesting,C=b.shadowType,E=b.shadowColor,P=b.filter,T=P===void 0?[]:P,A=b.transformOrigin,R=a.anchor;n===De.TEXT?delete a.anchor:n===De.MESH&&(a.anchor[2]=.5);var z=[(1-(R&&R[0]||0)*2)*s/2+d,(1-(R&&R[1]||0)*2)*l/2+p,(1-(R&&R[2]||0)*2)*m[2]+g];i.contentBounds.update(z,m);var I=n===De.POLYLINE||n===De.POLYGON||n===De.PATH?Math.SQRT2:.5,L=_&&!_.isNone;if(L){var F=((S||0)+(O||0))*I;m[0]+=F,m[1]+=F}if(i.renderBounds.update(z,m),E&&C&&C!=="inner"){var Z=i.renderBounds,H=Z.min,W=Z.max,G=a,J=G.shadowBlur,re=G.shadowOffsetX,he=G.shadowOffsetY,ce=J||0,ke=re||0,ot=he||0,xt=H[0]-ce+ke,et=W[0]+ce+ke,He=H[1]-ce+ot,jt=W[1]+ce+ot;H[0]=Math.min(H[0],xt),W[0]=Math.max(W[0],et),H[1]=Math.min(H[1],He),W[1]=Math.max(W[1],jt),i.renderBounds.setMinMax(H,W)}T.forEach(function(sn){var An=sn.name,yr=sn.params;if(An==="blur"){var En=yr[0].value;i.renderBounds.update(i.renderBounds.center,Wv(i.renderBounds.halfExtents,i.renderBounds.halfExtents,[En,En,0]))}else if(An==="drop-shadow"){var zn=yr[0].value,ni=yr[1].value,Vi=yr[2].value,Go=i.renderBounds,ri=Go.min,Di=Go.max,Mn=ri[0]-Vi+zn,Un=Di[0]+Vi+zn,Xn=ri[1]-Vi+ni,Pn=Di[1]+Vi+ni;ri[0]=Math.min(ri[0],Mn),Di[0]=Math.max(Di[0],Un),ri[1]=Math.min(ri[1],Xn),Di[1]=Math.max(Di[1],Pn),i.renderBounds.setMinMax(ri,Di)}}),R=a.anchor;var Ct=s<0,Gt=l<0,en=(Ct?-1:1)*(A?ns(A[0],0,t):0),an=(Gt?-1:1)*(A?ns(A[1],1,t):0);en=en-(Ct?-1:1)*(R&&R[0]||0)*i.contentBounds.halfExtents[0]*2,an=an-(Gt?-1:1)*(R&&R[1]||0)*i.contentBounds.halfExtents[1]*2,t.setOrigin(en,an),this.runtime.sceneGraphService.dirtifyToRoot(t)}},e.prototype.updateSizeAttenuation=function(t,n){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/n,t.nodeName===De.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=t.style.rawR/n)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===De.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},e.prototype.isPropertyInheritable=function(t){var n=Ec[t];return n?n.inh:!1},e}(),t9=function(){function e(){this.parser=DE,this.parserUnmemoize=i2,this.parserWithCSSDisabled=null,this.mixer=o2}return e.prototype.calculator=function(t,n,r,i){return ts(r)},e}(),n9=function(){function e(){}return e.prototype.calculator=function(t,n,r,i,a){return r instanceof Do&&(r=null),a.sceneGraphService.updateDisplayObjectDependency(t,n,r,i),t==="clipPath"&&i.forEach(function(o){o.childNodes.length===0&&a.sceneGraphService.dirtifyToRoot(o)}),r},e}(),r9=function(){function e(){this.parser=jl,this.parserWithCSSDisabled=jl,this.mixer=OB}return e.prototype.calculator=function(t,n,r,i){return r instanceof Do?r.value==="none"?n2:LE:r},e}(),i9=function(){function e(){this.parser=BE}return e.prototype.calculator=function(t,n,r){return r instanceof Do?[]:r},e}();function eM(e){var t=e.parsedStyle.fontSize;return Bt(t)?null:t}var m2=function(){function e(){this.parser=Yf,this.parserUnmemoize=zh,this.parserWithCSSDisabled=null,this.mixer=o2}return e.prototype.calculator=function(t,n,r,i,a){var o;if(Gi(r))return r;if(Wr.isRelativeUnit(r.unit)){var s=a.styleValueRegistry;if(r.unit===At.kPercentage)return 0;if(r.unit===At.kEms){if(i.parentNode){var l=eM(i.parentNode);if(l)return l*=r.value,l;s.addUnresolveProperty(i,t)}else s.addUnresolveProperty(i,t);return 0}else if(r.unit===At.kRems){if(!((o=i==null?void 0:i.ownerDocument)===null||o===void 0)&&o.documentElement){var l=eM(i.ownerDocument.documentElement);if(l)return l*=r.value,l;s.addUnresolveProperty(i,t)}else s.addUnresolveProperty(i,t);return 0}}else return r.value},e}(),a9=function(){function e(){this.mixer=ZE}return e.prototype.parser=function(t){var n=FE(Gi(t)?[t]:t),r;return n.length===1?r=[n[0],n[0]]:r=[n[0],n[1]],r},e.prototype.calculator=function(t,n,r){return r.map(function(i){return i.value})},e}(),o9=function(){function e(){this.mixer=ZE}return e.prototype.parser=function(t){var n=FE(Gi(t)?[t]:t),r;return n.length===1?r=[n[0],n[0],n[0],n[0]]:n.length===2?r=[n[0],n[1],n[0],n[1]]:n.length===3?r=[n[0],n[1],n[2],n[1]]:r=[n[0],n[1],n[2],n[3]],r},e.prototype.calculator=function(t,n,r){return r.map(function(i){return i.value})},e}(),Zh=cr();function y2(e,t){var n=t.parsedStyle.defX||0,r=t.parsedStyle.defY||0;return t.resetLocalTransform(),t.setLocalPosition(n,r),e.forEach(function(i){var a=i.t,o=i.d;if(a==="scale"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1,1];t.scaleLocal(s[0],s[1],1)}else if(a==="scalex"){var s=(o==null?void 0:o.map(function(_){return _.value}))||[1];t.scaleLocal(s[0],1,1)}else if(a==="scaley"){var s=(o==null?void 0:o.map(function(_){return _.value}))||[1];t.scaleLocal(1,s[0],1)}else if(a==="scalez"){var s=(o==null?void 0:o.map(function(_){return _.value}))||[1];t.scaleLocal(1,1,s[0])}else if(a==="scale3d"){var s=(o==null?void 0:o.map(function(_){return _.value}))||[1,1,1];t.scaleLocal(s[0],s[1],s[2])}else if(a==="translate"){var l=o||[ba,ba];t.translateLocal(l[0].value,l[1].value,0)}else if(a==="translatex"){var l=o||[ba];t.translateLocal(l[0].value,0,0)}else if(a==="translatey"){var l=o||[ba];t.translateLocal(0,l[0].value,0)}else if(a==="translatez"){var l=o||[ba];t.translateLocal(0,0,l[0].value)}else if(a==="translate3d"){var l=o||[ba,ba,ba];t.translateLocal(l[0].value,l[1].value,l[2].value)}else if(a==="rotate"){var c=o||[Ws];t.rotateLocal(0,0,ts(c[0]))}else if(a==="rotatex"){var c=o||[Ws];t.rotateLocal(ts(c[0]),0,0)}else if(a==="rotatey"){var c=o||[Ws];t.rotateLocal(0,ts(c[0]),0)}else if(a==="rotatez"){var c=o||[Ws];t.rotateLocal(0,0,ts(c[0]))}else if(a!=="rotate3d")if(a==="skew"){var u=(o==null?void 0:o.map(function(b){return b.value}))||[0,0];t.setLocalSkew(Mi(u[0]),Mi(u[1]))}else if(a==="skewx"){var u=(o==null?void 0:o.map(function(_){return _.value}))||[0];t.setLocalSkew(Mi(u[0]),t.getLocalSkew()[1])}else if(a==="skewy"){var u=(o==null?void 0:o.map(function(_){return _.value}))||[0];t.setLocalSkew(t.getLocalSkew()[0],Mi(u[0]))}else if(a==="matrix"){var f=w(o.map(function(b){return b.value}),6),d=f[0],h=f[1],p=f[2],v=f[3],g=f[4],m=f[5];t.setLocalTransform(Eh(Zh,d,h,0,0,p,v,0,0,0,0,1,0,g+n,m+r,0,1))}else a==="matrix3d"&&(Eh.apply(se,N([Zh],w(o.map(function(b){return b.value})),!1)),Zh[12]+=n,Zh[13]+=r,t.setLocalTransform(Zh))}),t.getLocalTransform()}var s9=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.postProcessor=function(n,r){var i,a,o;switch(n.nodeName){case De.CIRCLE:case De.ELLIPSE:var s=n.parsedStyle,l=s.cx,c=s.cy,u=s.cz;Bt(l)||(i=l),Bt(c)||(a=c),Bt(u)||(o=u);break;case De.LINE:var f=n.parsedStyle,d=f.x1,h=f.x2,p=f.y1,v=f.y2,g=Math.min(d,h),m=Math.min(p,v);i=g,a=m,o=0;break;case De.RECT:case De.IMAGE:case De.GROUP:case De.HTML:case De.TEXT:case De.MESH:Bt(n.parsedStyle.x)||(i=n.parsedStyle.x),Bt(n.parsedStyle.y)||(a=n.parsedStyle.y),Bt(n.parsedStyle.z)||(o=n.parsedStyle.z);break}n.nodeName!==De.PATH&&n.nodeName!==De.POLYLINE&&n.nodeName!==De.POLYGON&&(n.parsedStyle.defX=i||0,n.parsedStyle.defY=a||0);var b=!Bt(i)||!Bt(a)||!Bt(o);if(b&&r.indexOf("transform")===-1){var _=n.parsedStyle.transform;if(_&&_.length)y2(_,n);else{var S=w(n.getLocalPosition(),3),O=S[0],C=S[1],E=S[2];n.setLocalPosition(Bt(i)?O:i,Bt(a)?C:a,Bt(o)?E:o)}}},t}(m2),l9=function(){function e(){}return e.prototype.calculator=function(t,n,r,i){r instanceof Do&&(r=null);var a=r==null?void 0:r.cloneNode(!0);return a&&(a.style.isMarker=!0),a},e}(),c9=function(){function e(){this.mixer=o2,this.parser=Su,this.parserUnmemoize=Vf,this.parserWithCSSDisabled=null}return e.prototype.calculator=function(t,n,r){return r.value},e}(),u9=function(){function e(){this.parser=Su,this.parserUnmemoize=Vf,this.parserWithCSSDisabled=null,this.mixer=s2(0,1)}return e.prototype.calculator=function(t,n,r){return r.value},e.prototype.postProcessor=function(t){var n=t.parsedStyle,r=n.offsetPath,i=n.offsetDistance;if(r){var a=r.nodeName;if(a===De.LINE||a===De.PATH||a===De.POLYLINE){var o=r.getPoint(i);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},e}(),f9=function(){function e(){this.parser=Su,this.parserUnmemoize=Vf,this.parserWithCSSDisabled=null,this.mixer=s2(0,1)}return e.prototype.calculator=function(t,n,r){return r.value},e}(),d9=function(){function e(){this.parser=f2,this.parserWithCSSDisabled=f2,this.mixer=ZB}return e.prototype.calculator=function(t,n,r){return r instanceof Do&&r.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new wu(0,0,0,0)}:r},e.prototype.postProcessor=function(t,n){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===De.PATH&&n.indexOf("transform")===-1){var r=t.parsedStyle,i=r.defX,a=i===void 0?0:i,o=r.defY,s=o===void 0?0:o;t.setLocalPosition(a,s)}},e}(),h9=function(){function e(){this.parser=XE,this.mixer=$B}return e.prototype.postProcessor=function(t,n){if((t.nodeName===De.POLYGON||t.nodeName===De.POLYLINE)&&n.indexOf("transform")===-1){var r=t.parsedStyle,i=r.defX,a=r.defY;t.setLocalPosition(i,a)}},e}(),p9=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.mixer=s2(0,1/0),n}return t}(m2),v9=function(){function e(){}return e.prototype.calculator=function(t,n,r,i){return r instanceof Do?r.value==="unset"?"":r.value:"".concat(r)},e.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},e}(),g9=function(){function e(){}return e.prototype.calculator=function(t,n,r,i){var a=i.getAttribute("text");if(a){var o=a;r.value==="capitalize"?o=a.charAt(0).toUpperCase()+a.slice(1):r.value==="lowercase"?o=a.toLowerCase():r.value==="uppercase"&&(o=a.toUpperCase()),i.parsedStyle.text=o}return r.value},e}(),b2={},m9=0;function y9(e,t){if(e){var n=typeof e=="string"?e:e.id||m9++;b2[n]&&b2[n].destroy(),b2[n]=t}}var $h=typeof window!="undefined"&&typeof window.document!="undefined";function b9(e){return!!e.getAttribute}function x9(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>>1;tM(e[i],t)<0?n=i+1:r=i}return n}function tM(e,t){var n=Number(e.parsedStyle.zIndex),r=Number(t.parsedStyle.zIndex);if(n===r){var i=e.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(e)-a.indexOf(t)}}return n-r}function nM(e){var t,n=e;do{var r=(t=n.parsedStyle)===null||t===void 0?void 0:t.clipPath;if(r)return n;n=n.parentElement}while(n!==null);return null}var rM="px";function _9(e,t,n){$h&&e.style&&(e.style.width=t+rM,e.style.height=n+rM)}function iM(e,t){if($h)return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function w9(e){var t=iM(e,"width");return t==="auto"?e.offsetWidth:parseFloat(t)}function S9(e){var t=iM(e,"height");return t==="auto"?e.offsetHeight:parseFloat(t)}var O9=1,C9={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},x2=typeof performance=="object"&&performance.now?performance:Date;function Cu(e,t,n){var r=!1,i=!1,a=!!t&&!t.isNone,o=!!n&&!n.isNone;return e==="visiblepainted"||e==="painted"||e==="auto"?(r=a,i=o):e==="visiblefill"||e==="fill"?r=!0:e==="visiblestroke"||e==="stroke"?i=!0:(e==="visible"||e==="all")&&(r=!0,i=!0),[r,i]}var E9=1,M9=function(){return E9++},ol=typeof self=="object"&&self.self==self?self:typeof Y.g=="object"&&Y.g.global==Y.g?Y.g:{},P9=Date.now(),T9=function(){return ol.performance&&typeof ol.performance.now=="function"?ol.performance.now():Date.now()-P9},Wh={},aM=Date.now(),A9=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");var t=Date.now(),n=t-aM,r=n>16?0:16-n,i=M9();return Wh[i]=e,Object.keys(Wh).length>1||setTimeout(function(){aM=t;var a=Wh;Wh={},Object.keys(a).forEach(function(o){return a[o](T9())})},r),i},R9=function(e){delete Wh[e]},I9=["","webkit","moz","ms","o"],oM=function(e){return typeof e!="string"?A9:e===""?ol.requestAnimationFrame:ol[e+"RequestAnimationFrame"]},L9=function(e){return typeof e!="string"?R9:e===""?ol.cancelAnimationFrame:ol[e+"CancelAnimationFrame"]||ol[e+"CancelRequestAnimationFrame"]},N9=function(e,t){for(var n=0;e[n]!==void 0;){if(t(e[n]))return e[n];n=n+1}},sM=N9(I9,function(e){return!!oM(e)}),lM=oM(sM),cM=L9(sM);ol.requestAnimationFrame=lM,ol.cancelAnimationFrame=cM;var k9=function(){function e(){this.callbacks=[]}return e.prototype.getCallbacksNum=function(){return this.callbacks.length},e.prototype.tapPromise=function(t,n){this.callbacks.push(n)},e.prototype.promise=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Promise.all(this.callbacks.map(function(r){return r.apply(void 0,N([],w(t),!1))}))},e}(),j9=function(){function e(){this.callbacks=[]}return e.prototype.tapPromise=function(t,n){this.callbacks.push(n)},e.prototype.promise=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return el(this,void 0,void 0,function(){var r,i,a,o;return Il(this,function(s){switch(s.label){case 0:return this.callbacks.length?[4,(o=this.callbacks)[0].apply(o,N([],w(t),!1))]:[3,6];case 1:r=s.sent(),i=0,s.label=2;case 2:return i<this.callbacks.length-1?(a=this.callbacks[i],[4,a(r)]):[3,5];case 3:r=s.sent(),s.label=4;case 4:return i++,[3,2];case 5:return[2,r];case 6:return[2,null]}})})},e}(),yo=function(){function e(){this.callbacks=[]}return e.prototype.tap=function(t,n){this.callbacks.push(n)},e.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(n){n.apply(void 0,t)})},e}(),_2=function(){function e(){this.callbacks=[]}return e.prototype.tap=function(t,n){this.callbacks.push(n)},e.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,n=this.callbacks[0].apply(void 0,t),r=0;r<this.callbacks.length-1;r++){var i=this.callbacks[r];n=i(n)}return n}return null},e}(),D9=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],F9=/([\"\'])[^\'\"]+\1/;function B9(e){for(var t=e.fontSize,n=e.fontFamily,r=e.fontStyle,i=e.fontVariant,a=e.fontWeight,o=Gi(t)&&"".concat(t,"px")||"16px",s=n.split(","),l=s.length-1;l>=0;l--){var c=s[l].trim();!F9.test(c)&&D9.indexOf(c)<0&&(c='"'.concat(c,'"')),s[l]=c}return"".concat(r," ").concat(i," ").concat(a," ").concat(o," ").concat(s.join(","))}var z9=function(){function e(){this.parser=d2,this.parserUnmemoize=KE,this.parserWithCSSDisabled=KE,this.mixer=qB}return e.prototype.calculator=function(t,n,r,i){return r instanceof Do?[]:r},e.prototype.postProcessor=function(t){var n=t.parsedStyle.transform;y2(n,t)},e}(),Z9=function(){function e(){this.parser=JE,this.parserUnmemoize=JB}return e}(),$9=function(){function e(){this.parser=Su,this.parserUnmemoize=Vf}return e.prototype.calculator=function(t,n,r,i){return r.value},e.prototype.postProcessor=function(t){if(t.parentNode){var n=t.parentNode,r=n.renderable,i=n.sortable;r&&(r.dirty=!0),i&&(i.dirty=!0,i.dirtyReason=Hf.Z_INDEX_CHANGED)}},e}(),W9=function(){function e(){}return e.prototype.update=function(t,n){var r=t.r,i=r*2,a=r*2;return{width:i,height:a}},e}(),G9=function(){function e(){}return e.prototype.update=function(t,n){var r=t.rx,i=t.ry,a=r*2,o=i*2;return{width:a,height:o}},e}(),H9=function(){function e(){}return e.prototype.update=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=Math.min(n,i),s=Math.max(n,i),l=Math.min(r,a),c=Math.max(r,a),u=s-o,f=c-l;return{width:u,height:f}},e}(),Y9=function(){function e(){}return e.prototype.update=function(t){var n=t.path,r=n.rect,i=r.width,a=r.height;return{width:i,height:a}},e}(),V9=function(){function e(){}return e.prototype.update=function(t){if(t.points&&ua(t.points.points)){var n=t.points.points,r=Math.min.apply(Math,N([],w(n.map(function(c){return c[0]})),!1)),i=Math.max.apply(Math,N([],w(n.map(function(c){return c[0]})),!1)),a=Math.min.apply(Math,N([],w(n.map(function(c){return c[1]})),!1)),o=Math.max.apply(Math,N([],w(n.map(function(c){return c[1]})),!1)),s=i-r,l=o-a;return{width:s,height:l}}return{width:0,height:0}},e}(),U9=function(){function e(){}return e.prototype.update=function(t,n){var r=t.img,i=t.width,a=i===void 0?0:i,o=t.height,s=o===void 0?0:o,l=a,c=s;return r&&!xi(r)&&(l||(l=r.width,t.width=l),c||(c=r.height,t.height=c)),{width:l,height:c}},e}(),X9=function(){function e(t){this.globalRuntime=t}return e.prototype.isReadyToMeasure=function(t,n){var r=t.text,i=t.textAlign,a=t.textBaseline,o=t.fontSize,s=t.fontStyle,l=t.fontWeight,c=t.fontVariant,u=t.lineWidth;return r&&o&&s&&l&&c&&i&&a&&!Bt(u)},e.prototype.update=function(t,n){var r,i,a=t.text,o=t.textAlign,s=t.lineWidth,l=t.textBaseline,c=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,n))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var f=(((i=(r=n==null?void 0:n.ownerDocument)===null||r===void 0?void 0:r.defaultView)===null||i===void 0?void 0:i.getConfig())||{}).offscreenCanvas,d=this.globalRuntime.textService.measureText(a,t,f);t.metrics=d;var h=d.width,p=d.height,v=d.lineHeight,g=d.fontProperties,m=[h/2,p/2,0],b=[0,1],_=0;o==="center"||o==="middle"?(_=s/2,b=[.5,1]):(o==="right"||o==="end")&&(_=s,b=[1,1]);var S=0;return l==="middle"?S=m[1]:l==="top"||l==="hanging"?S=m[1]*2:l==="alphabetic"?S=this.globalRuntime.enableCSSParsing?v-g.ascent:0:(l==="bottom"||l==="ideographic")&&(S=0),c&&(_+=c),u&&(S+=u),t.anchor=[b[0],b[1],0],{width:m[0]*2,height:m[1]*2,offsetX:_,offsetY:S}},e}();function K9(e){return!!e.type}var Qv=function(){function e(t){this.eventPhase=e.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Ta,this.page=new Ta,this.canvas=new Ta,this.viewport=new Ta,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),e.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(e.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},e.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.initEvent=function(){},e.prototype.initUIEvent=function(){},e.prototype.clone=function(){throw new Error($r)},e}(),uM=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.client=new Ta,n.movement=new Ta,n.offset=new Ta,n.global=new Ta,n.screen=new Ta,n}return Object.defineProperty(t.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),t.prototype.getModifierState=function(n){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(n)},t.prototype.initMouseEvent=function(){throw new Error($r)},t}(Qv),w2=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.width=0,n.height=0,n.isPrimary=!1,n}return t.prototype.getCoalescedEvents=function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]},t.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},t.prototype.clone=function(){return this.manager.clonePointerEvent(this)},t}(uM),S2=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(uM),Gr=function(e){zt(t,e);function t(n,r){var i=e.call(this,null)||this;return i.type=n,i.detail=r,Object.assign(i,r),i}return t}(Qv),fM=":",dM=function(){function e(){this.emitter=new Le}return e.prototype.on=function(t,n,r){return this.addEventListener(t,n,r),this},e.prototype.addEventListener=function(t,n,r){var i=qC(r)&&r||bu(r)&&r.capture,a=bu(r)&&r.once,o=Gf(n)?void 0:n,s=!1,l="";if(t.indexOf(fM)>-1){var c=w(t.split(fM),2),u=c[0],f=c[1];t=f,l=u,s=!0}if(t=i?"".concat(t,"capture"):t,n=Gf(n)?n:n.handleEvent,s){var d=n;n=function(){for(var h,p=[],v=0;v<arguments.length;v++)p[v]=arguments[v];((h=p[0].target)===null||h===void 0?void 0:h.name)===l&&d.apply(void 0,N([],w(p),!1))}}return a?this.emitter.once(t,n,o):this.emitter.on(t,n,o),this},e.prototype.off=function(t,n,r){return t?this.removeEventListener(t,n,r):this.removeAllEventListeners(),this},e.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.prototype.removeEventListener=function(t,n,r){var i=qC(r)&&r||bu(r)&&r.capture,a=Gf(n)?void 0:n;return t=i?"".concat(t,"capture"):t,n=Gf(n)?n:n==null?void 0:n.handleEvent,this.emitter.off(t,n,a),this},e.prototype.emit=function(t,n){this.dispatchEvent(new Gr(t,n))},e.prototype.dispatchEvent=function(t,n){var r,i;if(n===void 0&&(n=!1),!K9(t))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var a;if(this.document?a=this:this.defaultView?a=this.defaultView:a=(r=this.ownerDocument)===null||r===void 0?void 0:r.defaultView,a){if(t.manager=a.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],n||(t.target=this),(i=t.manager)===null||i===void 0||i.dispatchEvent(t,t.type,n)}return!t.defaultPrevented},e}(),Aa=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.shadow=!1,n.ownerDocument=null,n.isConnected=!1,n.baseURI="",n.childNodes=[],n.nodeType=0,n.nodeName="",n.nodeValue=null,n.parentNode=null,n}return t.isNode=function(n){return!!n.childNodes},Object.defineProperty(t.prototype,"textContent",{get:function(){var n,r,i="";this.nodeName===De.TEXT&&(i+=this.style.text);try{for(var a=M(this.childNodes),o=a.next();!o.done;o=a.next()){var s=o.value;s.nodeName===De.TEXT?i+=s.nodeValue:i+=s.textContent}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},set:function(n){var r=this;this.childNodes.slice().forEach(function(i){r.removeChild(i)}),this.nodeName===De.TEXT&&(this.style.text="".concat(n))},enumerable:!1,configurable:!0}),t.prototype.getRootNode=function(n){return n===void 0&&(n={}),this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this},t.prototype.hasChildNodes=function(){return this.childNodes.length>0},t.prototype.isDefaultNamespace=function(n){throw new Error($r)},t.prototype.lookupNamespaceURI=function(n){throw new Error($r)},t.prototype.lookupPrefix=function(n){throw new Error($r)},t.prototype.normalize=function(){throw new Error($r)},t.prototype.isEqualNode=function(n){return this===n},t.prototype.isSameNode=function(n){return this.isEqualNode(n)},Object.defineProperty(t.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),t.prototype.compareDocumentPosition=function(n){var r;if(n===this)return 0;for(var i=n,a=this,o=[i],s=[a];(r=i.parentNode)!==null&&r!==void 0?r:a.parentNode;)i=i.parentNode?(o.push(i.parentNode),i.parentNode):i,a=a.parentNode?(s.push(a.parentNode),a.parentNode):a;if(i!==a)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var l=o.length>s.length?o:s,c=l===o?s:o;if(l[l.length-c.length]===c[0])return l===o?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-c.length,f=c.length-1;f>=0;f--){var d=c[f],h=l[u+f];if(h!==d){var p=d.parentNode.childNodes;return p.indexOf(d)<p.indexOf(h)?c===o?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING:l===o?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}}return t.DOCUMENT_POSITION_FOLLOWING},t.prototype.contain=function(n){return this.contains(n)},t.prototype.contains=function(n){for(var r=n;r&&this!==r;)r=r.parentNode;return!!r},t.prototype.getAncestor=function(n){for(var r=this;n>0&&r;)r=r.parentNode,n--;return r},t.prototype.forEach=function(n,r){r===void 0&&(r=!1),n(this)||(r?this.childNodes.slice():this.childNodes).forEach(function(i){i.forEach(n)})},t.DOCUMENT_POSITION_DISCONNECTED=1,t.DOCUMENT_POSITION_PRECEDING=2,t.DOCUMENT_POSITION_FOLLOWING=4,t.DOCUMENT_POSITION_CONTAINS=8,t.DOCUMENT_POSITION_CONTAINED_BY=16,t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,t}(dM),q9=2048,J9=function(){function e(t,n){var r=this;this.globalRuntime=t,this.context=n,this.emitter=new Le,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=cr(),this.tmpVec3=le(),this.onPointerDown=function(i){var a=r.createPointerEvent(i);if(r.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")r.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var o=a.button===2;r.dispatchEvent(a,o?"rightdown":"mousedown")}var s=r.trackingData(i.pointerId);s.pressTargetsByButton[i.button]=a.composedPath(),r.freeEvent(a)},this.onPointerUp=function(i){var a,o=x2.now(),s=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(s,"pointerup"),s.pointerType==="touch")r.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var l=s.button===2;r.dispatchEvent(s,l?"rightup":"mouseup")}var c=r.trackingData(i.pointerId),u=r.findMountedTarget(c.pressTargetsByButton[i.button]),f=u;if(u&&!s.composedPath().includes(u)){for(var d=u;d&&!s.composedPath().includes(d);){if(s.currentTarget=d,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")r.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var l=s.button===2;r.notifyTarget(s,l?"rightupoutside":"mouseupoutside")}Aa.isNode(d)&&(d=d.parentNode)}delete c.pressTargetsByButton[i.button],f=d}if(f){var h=r.clonePointerEvent(s,"click");h.target=f,h.path=[],c.clicksByButton[i.button]||(c.clicksByButton[i.button]={clickCount:0,target:h.target,timeStamp:o});var p=c.clicksByButton[i.button];p.target===h.target&&o-p.timeStamp<200?++p.clickCount:p.clickCount=1,p.target=h.target,p.timeStamp=o,h.detail=p.clickCount,!((a=s.detail)===null||a===void 0)&&a.preventClick||(!r.context.config.useNativeClickEvent&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r.dispatchEvent(h,"click"),r.dispatchEvent(h,"pointertap")),r.freeEvent(h)}r.freeEvent(s)},this.onPointerMove=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),o=a.pointerType==="mouse"||a.pointerType==="pen",s=r.trackingData(i.pointerId),l=r.findMountedTarget(s.overTargets);if(s.overTargets&&l!==a.target){var c=i.type==="mousemove"?"mouseout":"pointerout",u=r.createPointerEvent(i,c,l||void 0);if(r.dispatchEvent(u,"pointerout"),o&&r.dispatchEvent(u,"mouseout"),!a.composedPath().includes(l)){var f=r.createPointerEvent(i,"pointerleave",l||void 0);for(f.eventPhase=f.AT_TARGET;f.target&&!a.composedPath().includes(f.target);)f.currentTarget=f.target,r.notifyTarget(f),o&&r.notifyTarget(f,"mouseleave"),Aa.isNode(f.target)&&(f.target=f.target.parentNode);r.freeEvent(f)}r.freeEvent(u)}if(l!==a.target){var d=i.type==="mousemove"?"mouseover":"pointerover",h=r.clonePointerEvent(a,d);r.dispatchEvent(h,"pointerover"),o&&r.dispatchEvent(h,"mouseover");for(var p=l&&Aa.isNode(l)&&l.parentNode;p&&p!==(Aa.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var v=!p||p===(Aa.isNode(r.rootTarget)&&r.rootTarget.parentNode);if(v){var g=r.clonePointerEvent(a,"pointerenter");for(g.eventPhase=g.AT_TARGET;g.target&&g.target!==l&&g.target!==(Aa.isNode(r.rootTarget)&&r.rootTarget.parentNode);)g.currentTarget=g.target,r.notifyTarget(g),o&&r.notifyTarget(g,"mouseenter"),Aa.isNode(g.target)&&(g.target=g.target.parentNode);r.freeEvent(g)}r.freeEvent(h)}r.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&r.dispatchEvent(a,"touchmove"),o&&(r.dispatchEvent(a,"mousemove"),r.cursor=r.getCursor(a.target)),s.overTargets=a.composedPath(),r.freeEvent(a)},this.onPointerOut=function(i){var a=r.trackingData(i.pointerId);if(a.overTargets){var o=i.pointerType==="mouse"||i.pointerType==="pen",s=r.findMountedTarget(a.overTargets),l=r.createPointerEvent(i,"pointerout",s||void 0);r.dispatchEvent(l),o&&r.dispatchEvent(l,"mouseout");var c=r.createPointerEvent(i,"pointerleave",s||void 0);for(c.eventPhase=c.AT_TARGET;c.target&&c.target!==(Aa.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),o&&r.notifyTarget(c,"mouseleave"),Aa.isNode(c.target)&&(c.target=c.target.parentNode);a.overTargets=null,r.freeEvent(l),r.freeEvent(c)}r.cursor=null},this.onPointerOver=function(i){var a=r.trackingData(i.pointerId),o=r.createPointerEvent(i),s=o.pointerType==="mouse"||o.pointerType==="pen";r.dispatchEvent(o,"pointerover"),s&&r.dispatchEvent(o,"mouseover"),o.pointerType==="mouse"&&(r.cursor=r.getCursor(o.target));var l=r.clonePointerEvent(o,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(Aa.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),s&&r.notifyTarget(l,"mouseenter"),Aa.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=o.composedPath(),r.freeEvent(o),r.freeEvent(l)},this.onPointerUpOutside=function(i){var a=r.trackingData(i.pointerId),o=r.findMountedTarget(a.pressTargetsByButton[i.button]),s=r.createPointerEvent(i);if(o){for(var l=o;l;)s.currentTarget=l,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"||(s.pointerType==="mouse"||s.pointerType==="pen")&&r.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),Aa.isNode(l)&&(l=l.parentNode);delete a.pressTargetsByButton[i.button]}r.freeEvent(s)},this.onWheel=function(i){var a=r.createWheelEvent(i);r.dispatchEvent(a),r.freeEvent(a)},this.onClick=function(i){if(r.context.config.useNativeClickEvent){var a=r.createPointerEvent(i);r.dispatchEvent(a),r.freeEvent(a)}},this.onPointerCancel=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(a),r.freeEvent(a)}}return e.prototype.init=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)},e.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},e.prototype.client2Viewport=function(t){var n=this.context.contextService.getBoundingClientRect();return new Ta(t.x-((n==null?void 0:n.left)||0),t.y-((n==null?void 0:n.top)||0))},e.prototype.viewport2Client=function(t){var n=this.context.contextService.getBoundingClientRect();return new Ta(t.x+((n==null?void 0:n.left)||0),t.y+((n==null?void 0:n.top)||0))},e.prototype.viewport2Canvas=function(t){var n=t.x,r=t.y,i=this.rootTarget.defaultView,a=i.getCamera(),o=this.context.config,s=o.width,l=o.height,c=a.getPerspectiveInverse(),u=a.getWorldTransform(),f=ya(this.tmpMatrix,u,c),d=Ae(this.tmpVec3,n/s*2-1,(1-r/l)*2-1,0);return tr(d,d,f),new Ta(d[0],d[1])},e.prototype.canvas2Viewport=function(t){var n=this.rootTarget.defaultView,r=n.getCamera(),i=r.getPerspective(),a=r.getViewTransform(),o=ya(this.tmpMatrix,i,a),s=Ae(this.tmpVec3,t.x,t.y,0);tr(this.tmpVec3,this.tmpVec3,o);var l=this.context.config,c=l.width,u=l.height;return new Ta((s[0]+1)/2*c,(1-(s[1]+1)/2)*u)},e.prototype.setPickHandler=function(t){this.pickHandler=t},e.prototype.addEventMapping=function(t,n){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:n,priority:0}),this.mappingTable[t].sort(function(r,i){return r.priority-i.priority})},e.prototype.mapEvent=function(t){if(this.rootTarget){var n=this.mappingTable[t.type];if(n)for(var r=0,i=n.length;r<i;r++)n[r].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},e.prototype.dispatchEvent=function(t,n,r){if(!r)t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n);else{t.eventPhase=t.AT_TARGET;var i=this.rootTarget.defaultView||null;t.currentTarget=i,this.notifyListeners(t,n)}this.emitter.emit(n||t.type,t)},e.prototype.propagate=function(t,n){if(t.target){var r=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var i=r.length-1;i>=1;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,n),!(t.propagationStopped||t.propagationImmediatelyStopped)){var a=r.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var i=a+1;i<r.length;i++)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.prototype.propagationPath=function(t){var n=[t],r=this.rootTarget.defaultView||null;if(r&&r===t)return n.unshift(r.document),n;for(var i=0;i<q9&&t!==this.rootTarget;i++)Aa.isNode(t)&&t.parentNode&&(n.push(t.parentNode),t=t.parentNode);return r&&n.push(r),n},e.prototype.hitTest=function(t){var n=t.viewportX,r=t.viewportY,i=this.context.config,a=i.width,o=i.height,s=i.disableHitTesting;return n<0||r<0||n>a||r>o?null:!s&&this.pickHandler(t)||this.rootTarget||null},e.prototype.isNativeEventFromCanvas=function(t,n){var r=n==null?void 0:n.target;if(r!=null&&r.shadowRoot&&(r=n.composedPath()[0]),r){if(r===t)return!0;if(t&&t.contains)return t.contains(r)}return n!=null&&n.composedPath?n.composedPath().indexOf(t)>-1:!1},e.prototype.getExistedHTML=function(t){var n,r;if(t.nativeEvent.composedPath)try{for(var i=M(t.nativeEvent.composedPath()),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.nativeHTMLMap.get(o);if(s)return s}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return null},e.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},e.prototype.createPointerEvent=function(t,n,r,i){var a=this.allocateEvent(w2);this.copyPointerData(t,a),this.copyMouseData(t,a),this.copyData(t,a),a.nativeEvent=t.nativeEvent,a.originalEvent=t;var o=this.getExistedHTML(a),s=this.context.contextService.getDomElement();return a.target=r!=null?r:o||this.isNativeEventFromCanvas(s,a.nativeEvent)&&this.pickTarget(a)||i,typeof n=="string"&&(a.type=n),a},e.prototype.createWheelEvent=function(t){var n=this.allocateEvent(S2);this.copyWheelData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.nativeEvent=t.nativeEvent,n.originalEvent=t;var r=this.getExistedHTML(n),i=this.context.contextService.getDomElement();return n.target=r||this.isNativeEventFromCanvas(i,n.nativeEvent)&&this.pickTarget(n),n},e.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.prototype.cloneWheelEvent=function(t){var n=this.allocateEvent(S2);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyWheelData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=t.type,n},e.prototype.clonePointerEvent=function(t,n){var r=this.allocateEvent(w2);return r.nativeEvent=t.nativeEvent,r.originalEvent=t.originalEvent,this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.target=t.target,r.path=t.composedPath().slice(),r.type=n!=null?n:r.type,r},e.prototype.copyPointerData=function(t,n){n.pointerId=t.pointerId,n.width=t.width,n.height=t.height,n.isPrimary=t.isPrimary,n.pointerType=t.pointerType,n.pressure=t.pressure,n.tangentialPressure=t.tangentialPressure,n.tiltX=t.tiltX,n.tiltY=t.tiltY,n.twist=t.twist},e.prototype.copyMouseData=function(t,n){n.altKey=t.altKey,n.button=t.button,n.buttons=t.buttons,n.ctrlKey=t.ctrlKey,n.metaKey=t.metaKey,n.shiftKey=t.shiftKey,n.client.copyFrom(t.client),n.movement.copyFrom(t.movement),n.canvas.copyFrom(t.canvas),n.screen.copyFrom(t.screen),n.global.copyFrom(t.global),n.offset.copyFrom(t.offset)},e.prototype.copyWheelData=function(t,n){n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ},e.prototype.copyData=function(t,n){n.isTrusted=t.isTrusted,n.timeStamp=x2.now(),n.type=t.type,n.detail=t.detail,n.view=t.view,n.page.copyFrom(t.page),n.viewport.copyFrom(t.viewport)},e.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var n=this.eventPool.get(t).pop()||new t(this);return n.eventPhase=n.NONE,n.currentTarget=null,n.path=[],n.target=null,n},e.prototype.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var n=t.constructor;this.eventPool.has(n)||this.eventPool.set(n,[]),this.eventPool.get(n).push(t)},e.prototype.notifyTarget=function(t,n){n=n!=null?n:t.type;var r=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(n,"capture"):n;this.notifyListeners(t,r),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,n)},e.prototype.notifyListeners=function(t,n){var r=t.currentTarget.emitter,i=r._events[n];if(i)if("fn"in i)i.once&&r.removeListener(n,i.fn,void 0,!0),i.fn.call(t.currentTarget||i.context,t);else for(var a=0;a<i.length&&!t.propagationImmediatelyStopped;a++)i[a].once&&r.removeListener(n,i[a].fn,void 0,!0),i[a].fn.call(t.currentTarget||i[a].context,t)},e.prototype.findMountedTarget=function(t){if(!t)return null;for(var n=t[t.length-1],r=t.length-2;r>=0;r--){var i=t[r];if(i===this.rootTarget||Aa.isNode(i)&&i.parentNode===n)n=t[r];else break}return n},e.prototype.getCursor=function(t){for(var n=t;n;){var r=b9(n)&&n.getAttribute("cursor");if(r)return r;n=Aa.isNode(n)&&n.parentNode}},e}(),Q9=function(){function e(){}return e.prototype.getOrCreateCanvas=function(t,n){if(this.canvas)return this.canvas;if(t||We.offscreenCanvas)this.canvas=t||We.offscreenCanvas,this.context=this.canvas.getContext("2d",Ie({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",Ie({willReadFrequently:!0},n)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",Ie({willReadFrequently:!0},n))}return this.canvas.width=10,this.canvas.height=10,this.canvas},e.prototype.getOrCreateContext=function(t,n){return this.context?this.context:(this.getOrCreateCanvas(t,n),this.context)},e}(),Mc;(function(e){e[e.CAMERA_CHANGED=0]="CAMERA_CHANGED",e[e.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",e[e.NONE=2]="NONE"})(Mc||(Mc={}));var e7=function(){function e(t,n){this.globalRuntime=t,this.context=n,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new yo,initAsync:new k9,dirtycheck:new _2,cull:new _2,beginFrame:new yo,beforeRender:new yo,render:new yo,afterRender:new yo,endFrame:new yo,destroy:new yo,pick:new j9,pickSync:new _2,pointerDown:new yo,pointerUp:new yo,pointerMove:new yo,pointerOut:new yo,pointerOver:new yo,pointerWheel:new yo,pointerCancel:new yo,click:new yo}}return e.prototype.init=function(t){var n=this,r=Ie(Ie({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(i){i.apply(r,n.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){n.inited=!0,t()})},e.prototype.getStats=function(){return this.stats},e.prototype.disableDirtyRectangleRendering=function(){var t=this.context.config.renderer,n=t.getConfig().enableDirtyRectangleRendering;return!n||this.context.renderingContext.renderReasons.has(Mc.CAMERA_CHANGED)},e.prototype.render=function(t,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 a=i.renderReasons.size===1&&i.renderReasons.has(Mc.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&a);o&&this.renderDisplayObject(i.root,t,i),this.hooks.beginFrame.call(),o&&i.renderListCurrentFrame.forEach(function(s){r.hooks.beforeRender.call(s),r.hooks.render.call(s),r.hooks.afterRender.call(s)}),this.hooks.endFrame.call(),i.renderListCurrentFrame=[],i.renderReasons.clear(),n()}},e.prototype.renderDisplayObject=function(t,n,r){var i=this,a=n.renderer.getConfig(),o=a.enableDirtyCheck,s=a.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,c=o?l.dirty||r.dirtyRectangleRenderingDisabled?t:null:t;if(c){var u=s?this.hooks.cull.call(c,this.context.camera):c;u&&(this.stats.rendered++,r.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var f=t.sortable;f.dirty&&(this.sort(t,f),f.dirty=!1,f.dirtyChildren=[],f.dirtyReason=void 0),(f.sorted||t.childNodes).forEach(function(d){i.renderDisplayObject(d,n,r)})},e.prototype.sort=function(t,n){n.sorted&&n.dirtyReason!==Hf.Z_INDEX_CHANGED?n.dirtyChildren.forEach(function(r){var i=t.childNodes.indexOf(r);if(i===-1){var a=n.sorted.indexOf(r);a>=0&&n.sorted.splice(a,1)}else if(n.sorted.length===0)n.sorted.push(r);else{var o=x9(n.sorted,r);n.sorted.splice(o,0,r)}}):n.sorted=t.childNodes.slice().sort(tM)},e.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},e.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(Mc.DISPLAY_OBJECT_CHANGED)},e}(),t7=/\[\s*(.*)=(.*)\s*\]/,n7=function(){function e(){}return e.prototype.selectOne=function(t,n){var r=this;if(t.startsWith("."))return n.find(function(s){return((s==null?void 0:s.classList)||[]).indexOf(r.getIdOrClassname(t))>-1});if(t.startsWith("#"))return n.find(function(s){return s.id===r.getIdOrClassname(t)});if(t.startsWith("[")){var i=this.getAttribute(t),a=i.name,o=i.value;return a?n.find(function(s){return n!==s&&(a==="name"?s.name===o:r.attributeToString(s,a)===o)}):null}else return n.find(function(s){return n!==s&&s.nodeName===t})},e.prototype.selectAll=function(t,n){var r=this;if(t.startsWith("."))return n.findAll(function(s){return n!==s&&((s==null?void 0:s.classList)||[]).indexOf(r.getIdOrClassname(t))>-1});if(t.startsWith("#"))return n.findAll(function(s){return n!==s&&s.id===r.getIdOrClassname(t)});if(t.startsWith("[")){var i=this.getAttribute(t),a=i.name,o=i.value;return a?n.findAll(function(s){return n!==s&&(a==="name"?s.name===o:r.attributeToString(s,a)===o)}):[]}else return n.findAll(function(s){return n!==s&&s.nodeName===t})},e.prototype.is=function(t,n){if(t.startsWith("."))return n.className===this.getIdOrClassname(t);if(t.startsWith("#"))return n.id===this.getIdOrClassname(t);if(t.startsWith("[")){var r=this.getAttribute(t),i=r.name,a=r.value;return i==="name"?n.name===a:this.attributeToString(n,i)===a}else return n.nodeName===t},e.prototype.getIdOrClassname=function(t){return t.substring(1)},e.prototype.getAttribute=function(t){var n=t.match(t7),r="",i="";return n&&n.length>2&&(r=n[1].replace(/"/g,""),i=n[2].replace(/"/g,"")),{name:r,value:i}},e.prototype.attributeToString=function(t,n){if(!t.getAttribute)return"";var r=t.getAttribute(n);return Bt(r)?"":r.toString?r.toString():""},e}(),Pc=function(e){zt(t,e);function t(n,r,i,a,o,s,l,c){var u=e.call(this,null)||this;return u.relatedNode=r,u.prevValue=i,u.newValue=a,u.attrName=o,u.attrChange=s,u.prevParsedValue=l,u.newParsedValue=c,u.type=n,u}return t.ADDITION=2,t.MODIFICATION=1,t.REMOVAL=3,t}(Qv),vn;(function(e){e.REPARENT="reparent",e.DESTROY="destroy",e.ATTR_MODIFIED="DOMAttrModified",e.INSERTED="DOMNodeInserted",e.REMOVED="removed",e.MOUNTED="DOMNodeInsertedIntoDocument",e.UNMOUNTED="DOMNodeRemovedFromDocument",e.BOUNDS_CHANGED="bounds-changed",e.CULLED="culled"})(vn||(vn={}));function hM(e){var t=e.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var r7=new Pc(vn.REPARENT,null,"","","",0,"",""),i7=function(){function e(t){var n=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new Gr(vn.BOUNDS_CHANGED),this.rotate=function(){var r=na();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=nt(a,o,s));var l=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.rotateLocal(i,a);else{var c=na();Av(c,a[0],a[1],a[2]);var u=n.getRotation(i),f=n.getRotation(i.parentNode);Rv(r,f),kx(r,r),_c(c,r,c),_c(l.localRotation,c,u),Iv(l.localRotation,l.localRotation),n.dirtifyLocal(i,l)}}}(),this.rotateLocal=function(){var r=na();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=nt(a,o,s));var l=i.transformable;Av(r,a[0],a[1],a[2]),DC(l.localRotation,l.localRotation,r),n.dirtifyLocal(i,l)}}(),this.setEulerAngles=function(){var r=na();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=nt(a,o,s));var l=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.setLocalEulerAngles(i,a);else{Av(l.localRotation,a[0],a[1],a[2]);var c=n.getRotation(i.parentNode);Rv(r,kx(na(),c)),DC(l.localRotation,l.localRotation,r),n.dirtifyLocal(i,l)}}}(),this.translateLocal=function(){return function(r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=0),typeof i=="number"&&(i=nt(i,a,o));var s=r.transformable;po(i,le())||(fo(i,i,s.localRotation),$e(s.localPosition,s.localPosition,i),n.dirtifyLocal(r,s))}}(),this.setPosition=function(){var r=cr(),i=le();return function(a,o){var s=a.transformable;if(i[0]=o[0],i[1]=o[1],i[2]=o[2]||0,!po(n.getPosition(a),i)){if(Ge(s.position,i),a.parentNode===null||!a.parentNode.transformable)Ge(s.localPosition,i);else{var l=a.parentNode.transformable;Jo(r,l.worldTransform),No(r,r),tr(s.localPosition,i,r)}n.dirtifyLocal(a,s)}}}(),this.setLocalPosition=function(){var r=le();return function(i,a){var o=i.transformable;r[0]=a[0],r[1]=a[1],r[2]=a[2]||0,!po(o.localPosition,r)&&(Ge(o.localPosition,r),n.dirtifyLocal(i,o))}}(),this.translate=function(){var r=le(),i=le(),a=le();return function(o,s,l,c){l===void 0&&(l=0),c===void 0&&(c=0),typeof s=="number"&&(s=Ae(i,s,l,c)),!po(s,r)&&($e(a,n.getPosition(o),s),n.setPosition(o,a))}}(),this.setRotation=function(){var r=na();return function(i,a,o,s,l){var c=i.transformable;if(typeof a=="number"&&(a=jx(a,o,s,l)),i.parentNode===null||!i.parentNode.transformable)n.setLocalRotation(i,a);else{var u=n.getRotation(i.parentNode);Rv(r,u),kx(r,r),_c(c.localRotation,r,a),Iv(c.localRotation,c.localRotation),n.dirtifyLocal(i,c)}}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=function(){var r=cr(),i=le(),a=jx(0,0,0,1);return function(o){var s=o.localSkew[0]!==0||o.localSkew[1]!==0;if(s){if(Ph(o.localTransform,o.localRotation,o.localPosition,nt(1,1,1),o.origin),o.localSkew[0]!==0||o.localSkew[1]!==0){var l=ms(r);l[4]=Math.tan(o.localSkew[0]),l[1]=Math.tan(o.localSkew[1]),ya(o.localTransform,o.localTransform,l)}var c=Ph(r,a,i,o.localScale,o.origin);ya(o.localTransform,o.localTransform,c)}else Ph(o.localTransform,o.localRotation,o.localPosition,o.localScale,o.origin)}}()}return e.prototype.matches=function(t,n){return this.runtime.sceneGraphSelector.is(t,n)},e.prototype.querySelector=function(t,n){return this.runtime.sceneGraphSelector.selectOne(t,n)},e.prototype.querySelectorAll=function(t,n){return this.runtime.sceneGraphSelector.selectAll(t,n)},e.prototype.attach=function(t,n,r){var i,a,o=!1;t.parentNode&&(o=t.parentNode!==n,this.detach(t)),t.parentNode=n,Bt(r)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(r,0,t);var s=n.sortable;(!((i=s==null?void 0:s.sorted)===null||i===void 0)&&i.length||!((a=t.style)===null||a===void 0)&&a.zIndex)&&(s.dirtyChildren.indexOf(t)===-1&&s.dirtyChildren.push(t),s.dirty=!0,s.dirtyReason=Hf.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(r7)},e.prototype.detach=function(t){var n,r;if(t.parentNode){var i=t.transformable,a=t.parentNode.sortable;(!((n=a==null?void 0:a.sorted)===null||n===void 0)&&n.length||!((r=t.style)===null||r===void 0)&&r.zIndex)&&(a.dirtyChildren.indexOf(t)===-1&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=Hf.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),i&&this.dirtifyWorld(t,i),t.parentNode=null}},e.prototype.getOrigin=function(t){return t.transformable.origin},e.prototype.setOrigin=function(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),typeof n=="number"&&(n=[n,r,i]);var a=t.transformable;if(!(n[0]===a.origin[0]&&n[1]===a.origin[1]&&n[2]===a.origin[2])){var o=a.origin;o[0]=n[0],o[1]=n[1],o[2]=n[2]||0,this.dirtifyLocal(t,a)}},e.prototype.setLocalEulerAngles=function(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),typeof n=="number"&&(n=nt(n,r,i));var a=t.transformable;Av(a.localRotation,n[0],n[1],n[2]),this.dirtifyLocal(t,a)},e.prototype.scaleLocal=function(t,n){var r=t.transformable;ut(r.localScale,r.localScale,nt(n[0],n[1],n[2]||1)),this.dirtifyLocal(t,r)},e.prototype.setLocalScale=function(t,n){var r=t.transformable,i=nt(n[0],n[1],n[2]||r.localScale[2]);po(i,r.localScale)||(Ge(r.localScale,i),this.dirtifyLocal(t,r))},e.prototype.setLocalRotation=function(t,n,r,i,a){typeof n=="number"&&(n=jx(n,r,i,a));var o=t.transformable;Rv(o.localRotation,n),this.dirtifyLocal(t,o)},e.prototype.setLocalSkew=function(t,n,r){typeof n=="number"&&(n=vD(n,r));var i=t.transformable;gD(i.localSkew,n),this.dirtifyLocal(t,i)},e.prototype.dirtifyLocal=function(t,n){n.localDirtyFlag||(n.localDirtyFlag=!0,n.dirtyFlag||this.dirtifyWorld(t,n))},e.prototype.dirtifyWorld=function(t,n){n.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,n),this.dirtifyToRoot(t,!0)},e.prototype.triggerPendingEvents=function(){var t=this,n=new Set,r=function(i,a){i.isConnected&&!n.has(i.entity)&&(t.boundsChangedEvent.detail=a,t.boundsChangedEvent.target=i,i.isMutationObserved?i.dispatchEvent(t.boundsChangedEvent):i.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),n.add(i.entity))};this.pendingEvents.forEach(function(i){var a=w(i,2),o=a[0],s=a[1];s.affectChildren?o.forEach(function(l){r(l,s)}):r(o,s)}),this.clearPendingEvents(),n.clear()},e.prototype.clearPendingEvents=function(){this.pendingEvents=[]},e.prototype.dirtifyToRoot=function(t,n){n===void 0&&(n=!1);var r=t;for(r.renderable&&(r.renderable.dirty=!0);r;)hM(r),r=r.parentNode;n&&t.forEach(function(i){hM(i)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:n}])},e.prototype.updateDisplayObjectDependency=function(t,n,r,i){if(n&&n!==r){var a=this.displayObjectDependencyMap.get(n);if(a&&a[t]){var o=a[t].indexOf(i);a[t].splice(o,1)}}if(r){var s=this.displayObjectDependencyMap.get(r);s||(this.displayObjectDependencyMap.set(r,{}),s=this.displayObjectDependencyMap.get(r)),s[t]||(s[t]=[]),s[t].push(i)}},e.prototype.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(i){r[i].forEach(function(a){n.dirtifyToRoot(a,!0),a.dispatchEvent(new Pc(vn.ATTR_MODIFIED,a,n,n,i,Pc.MODIFICATION,n,n)),a.isCustomElement&&a.isConnected&&a.attributeChangedCallback&&a.attributeChangedCallback(i,n,n)})})},e.prototype.getPosition=function(t){var n=t.transformable;return Pv(n.position,this.getWorldTransform(t,n))},e.prototype.getRotation=function(t){var n=t.transformable;return Tv(n.rotation,this.getWorldTransform(t,n))},e.prototype.getScale=function(t){var n=t.transformable;return Nf(n.scaling,this.getWorldTransform(t,n))},e.prototype.getWorldTransform=function(t,n){return n===void 0&&(n=t.transformable),!n.localDirtyFlag&&!n.dirtyFlag||(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,n)),n.worldTransform},e.prototype.getLocalPosition=function(t){return t.transformable.localPosition},e.prototype.getLocalRotation=function(t){return t.transformable.localRotation},e.prototype.getLocalScale=function(t){return t.transformable.localScale},e.prototype.getLocalSkew=function(t){return t.transformable.localSkew},e.prototype.getLocalTransform=function(t){var n=t.transformable;return n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.localTransform},e.prototype.setLocalTransform=function(t,n){var r=Pv(le(),n),i=Tv(na(),n),a=Nf(le(),n);this.setLocalScale(t,a),this.setLocalPosition(t,r),this.setLocalRotation(t,i)},e.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.prototype.getTransformedGeometryBounds=function(t,n,r){n===void 0&&(n=!1);var i=this.getGeometryBounds(t,n);if(ra.isEmpty(i))return null;var a=r||new ra;return a.setFromTransformedAABB(i,this.getWorldTransform(t)),a},e.prototype.getGeometryBounds=function(t,n){n===void 0&&(n=!1);var r=t.geometry,i=n?r.renderBounds:r.contentBounds||null;return i||new ra},e.prototype.getBounds=function(t,n){var r=this;n===void 0&&(n=!1);var i=t.renderable;if(!i.boundsDirty&&!n&&i.bounds)return i.bounds;if(!i.renderBoundsDirty&&n&&i.renderBounds)return i.renderBounds;var a=n?i.renderBounds:i.bounds,o=this.getTransformedGeometryBounds(t,n,a),s=t.childNodes;if(s.forEach(function(u){var f=r.getBounds(u,n);f&&(o?o.add(f):(o=a||new ra,o.update(f.center,f.halfExtents)))}),o||(o=new ra),n){var l=nM(t);if(l){var c=l.parsedStyle.clipPath.getBounds(n);o?c&&(o=c.intersection(o)):o.update(c.center,c.halfExtents)}}return n?(i.renderBounds=o,i.renderBoundsDirty=!1):(i.bounds=o,i.boundsDirty=!1),o},e.prototype.getLocalBounds=function(t){if(t.parentNode){var n=cr();t.parentNode.transformable&&(n=No(cr(),this.getWorldTransform(t.parentNode)));var r=this.getBounds(t);if(!ra.isEmpty(r)){var i=new ra;return i.setFromTransformedAABB(r,n),i}}return this.getBounds(t)},e.prototype.getBoundingClientRect=function(t){var n,r,i,a=this.getGeometryBounds(t);ra.isEmpty(a)||(i=new ra,i.setFromTransformedAABB(a,this.getWorldTransform(t)));var o=(r=(n=t.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect();if(i){var s=w(i.getMin(),2),l=s[0],c=s[1],u=w(i.getMax(),2),f=u[0],d=u[1];return new wu(l+((o==null?void 0:o.left)||0),c+((o==null?void 0:o.top)||0),f-l,d-c)}return new wu((o==null?void 0:o.left)||0,(o==null?void 0:o.top)||0,0,0)},e.prototype.dirtifyWorldInternal=function(t,n){var r=this;if(!n.dirtyFlag){n.dirtyFlag=!0,n.frozen=!1,t.childNodes.forEach(function(a){var o=a.transformable;o.dirtyFlag||r.dirtifyWorldInternal(a,o)});var i=t.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0)}},e.prototype.syncHierarchy=function(t){var n=t.transformable;if(!n.frozen){n.frozen=!0,(n.localDirtyFlag||n.dirtyFlag)&&this.sync(t,n);for(var r=t.childNodes,i=0;i<r.length;i++)this.syncHierarchy(r[i])}},e.prototype.sync=function(t,n){if(n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.dirtyFlag){var r=t.parentNode,i=r&&r.transformable;r===null||!i?Jo(n.worldTransform,n.localTransform):ya(n.worldTransform,i.worldTransform,n.localTransform),n.dirtyFlag=!1}},e.prototype.unfreezeParentToRoot=function(t){for(var n=t.parentNode;n;){var r=n.transformable;r&&(r.frozen=!1),n=n.parentNode}},e}(),Eu={MetricsString:"|\xC9q\xC5",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]},pM=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,a7=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,o7=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,s7=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,l7=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,c7=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,u7=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,f7=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,d7=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,h7=new RegExp("".concat(a7.source,"|").concat(s7.source,"|").concat(c7.source,"|").concat(f7.source)),p7=new RegExp("".concat(o7.source,"|").concat(l7.source,"|").concat(u7.source,"|").concat(d7.source)),v7=function(){function e(t){var n=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return n.isBreakingSpace(i)?!1:!!(r&&(p7.exec(i)||h7.exec(r)))},this.trimByKinsokuShorui=function(r){var i=N([],w(r),!1),a=i[i.length-2];if(!a)return r;var o=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=o+i[i.length-1],i}}return e.prototype.measureFont=function(t,n){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var r={ascent:0,descent:0,fontSize:0},i=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(n),a=this.runtime.offscreenCanvasCreator.getOrCreateContext(n,{willReadFrequently:!0});a.font=t;var o=Eu.MetricsString+Eu.BaselineSymbol,s=Math.ceil(a.measureText(o).width),l=Math.ceil(a.measureText(Eu.BaselineSymbol).width),c=Eu.HeightMultiplier*l;l=l*Eu.BaselineMultiplier|0,i.width=s,i.height=c,a.fillStyle="#f00",a.fillRect(0,0,s,c),a.font=t,a.textBaseline="alphabetic",a.fillStyle="#000",a.fillText(o,0,l);var u=a.getImageData(0,0,s||1,c||1).data,f=u.length,d=s*4,h=0,p=0,v=!1;for(h=0;h<l;++h){for(var g=0;g<d;g+=4)if(u[p+g]!==255){v=!0;break}if(!v)p+=d;else break}for(r.ascent=l-h,p=f-d,v=!1,h=c;h>l;--h){for(var g=0;g<d;g+=4)if(u[p+g]!==255){v=!0;break}if(!v)p-=d;else break}return r.descent=h-l,r.fontSize=r.ascent+r.descent,this.fontMetricsCache[t]=r,r},e.prototype.measureText=function(t,n,r){var i=n.fontSize,a=n.wordWrap,o=n.lineHeight,s=n.lineWidth,l=n.textBaseline,c=n.textAlign,u=n.letterSpacing,f=n.textPath;n.textPathSide,n.textPathStartOffset;var d=n.leading,h=d===void 0?0:d,p=B9(n),v=this.measureFont(p,r);v.fontSize===0&&(v.fontSize=i,v.ascent=i);var g=this.runtime.offscreenCanvasCreator.getOrCreateContext(r);g.font=p,n.isOverflowing=!1;var m=a?this.wordWrap(t,n,r):t,b=m.split(/(?:\r\n|\r|\n)/),_=new Array(b.length),S=0;if(f){f.getTotalLength();for(var O=0;O<b.length;O++)var C=g.measureText(b[O]).width+(b[O].length-1)*u}else{for(var O=0;O<b.length;O++){var E=g.measureText(b[O]).width+(b[O].length-1)*u;_[O]=E,S=Math.max(S,E)}var C=S+s,P=o||v.fontSize+s,T=Math.max(P,v.fontSize+s)+(b.length-1)*(P+h);P+=h;var A=0;return l==="middle"?A=-T/2:l==="bottom"||l==="alphabetic"||l==="ideographic"?A=-T:(l==="top"||l==="hanging")&&(A=0),{font:p,width:C,height:T,lines:b,lineWidths:_,lineHeight:P,maxLineWidth:S,fontProperties:v,lineMetrics:_.map(function(z,I){var L=0;return c==="center"||c==="middle"?L-=z/2:(c==="right"||c==="end")&&(L-=z),new wu(L-s/2,A+I*P,z+s,P)})}}},e.prototype.setGraphemeOnPath=function(){},e.prototype.wordWrap=function(t,n,r){var i=this,a=n.wordWrapWidth,o=a===void 0?0:a,s=n.letterSpacing,l=n.maxLines,c=l===void 0?1/0:l,u=n.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(r),d=o+s,h="";u==="ellipsis"?h="...":u&&u!=="clip"&&(h=u);for(var p=[],v=0,g=0,m={},b=function(F){return i.getFromCache(F,s,m,f)},_=Array.from(h).reduce(function(F,Z){return F+b(Z)},0),S=Array.from(t),O=0;O<S.length;O++){var C=S[O],E=t[O-1],P=t[O+1],T=b(C);if(this.isNewline(C)){if(v++,v>=c){n.isOverflowing=!0;break}g=0,p[v]="";continue}if(g>0&&g+T>d){if(v+1>=c){if(n.isOverflowing=!0,_>0&&_<=d){for(var A=p[v].length,R=0,z=A,I=0;I<A;I++){var L=b(p[v][I]);if(R+L+_>d){z=I;break}R+=L}p[v]=(p[v]||"").slice(0,z)+h}break}if(v++,g=0,p[v]="",this.isBreakingSpace(C))continue;this.canBreakInLastChar(C)||(p=this.trimToBreakable(p),g=this.sumTextWidthByCache(p[v]||"",m)),this.shouldBreakByKinsokuShorui(C,P)&&(p=this.trimByKinsokuShorui(p),g+=b(E||""))}g+=T,p[v]=(p[v]||"")+C}return p.join(`
|
|
`)},e.prototype.isBreakingSpace=function(t){return typeof t!="string"?!1:Eu.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},e.prototype.isNewline=function(t){return typeof t!="string"?!1:Eu.Newlines.indexOf(t.charCodeAt(0))>=0},e.prototype.trimToBreakable=function(t){var n=N([],w(t),!1),r=n[n.length-2],i=this.findBreakableIndex(r);if(i===-1||!r)return n;var a=r.slice(i,i+1),o=this.isBreakingSpace(a),s=i+1,l=i+(o?0:1);return n[n.length-1]+=r.slice(s,r.length),n[n.length-2]=r.slice(0,l),n},e.prototype.canBreakInLastChar=function(t){return!(t&&pM.test(t))},e.prototype.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(r,i){if(!n[i])throw Error("cannot count the word without cache");return r+n[i]},0)},e.prototype.findBreakableIndex=function(t){for(var n=t.length-1;n>=0;n--)if(!pM.test(t[n]))return n;return-1},e.prototype.getFromCache=function(t,n,r,i){var a=r[t];if(typeof a!="number"){var o=t.length*n;a=i.measureText(t).width+o,r[t]=a}return a},e}(),We={},g7=function(){var e,t=new U9,n=new V9;return e={},e[De.CIRCLE]=new W9,e[De.ELLIPSE]=new G9,e[De.RECT]=t,e[De.IMAGE]=t,e[De.GROUP]=t,e[De.LINE]=new H9,e[De.TEXT]=new X9(We),e[De.POLYLINE]=n,e[De.POLYGON]=n,e[De.PATH]=new Y9,e[De.HTML]=null,e[De.MESH]=null,e}(),m7=function(){var e,t=new r9,n=new m2;return e={},e[kt.PERCENTAGE]=null,e[kt.NUMBER]=new c9,e[kt.ANGLE]=new t9,e[kt.DEFINED_PATH]=new n9,e[kt.PAINT]=t,e[kt.COLOR]=t,e[kt.FILTER]=new i9,e[kt.LENGTH]=n,e[kt.LENGTH_PERCENTAGE]=n,e[kt.LENGTH_PERCENTAGE_12]=new a9,e[kt.LENGTH_PERCENTAGE_14]=new o9,e[kt.COORDINATE]=new s9,e[kt.OFFSET_DISTANCE]=new u9,e[kt.OPACITY_VALUE]=new f9,e[kt.PATH]=new d9,e[kt.LIST_OF_POINTS]=new h9,e[kt.SHADOW_BLUR]=new p9,e[kt.TEXT]=new v9,e[kt.TEXT_TRANSFORM]=new g9,e[kt.TRANSFORM]=new z9,e[kt.TRANSFORM_ORIGIN]=new Z9,e[kt.Z_INDEX]=new $9,e[kt.MARKER]=new l9,e}(),y7=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:{}};We.CameraContribution=TE,We.AnimationTimeline=null,We.EasingFunction=null,We.offscreenCanvasCreator=new Q9,We.sceneGraphSelector=new n7,We.sceneGraphService=new i7(We),We.textService=new v7(We),We.geometryUpdaterFactory=g7,We.CSSPropertySyntaxFactory=m7,We.styleValueRegistry=new e9(We),We.layoutRegistry=null,We.globalThis=y7(),We.enableCSSParsing=!0,We.enableDataset=!1,We.enableStyleSyntax=!0,We.enableSizeAttenuation=!1;var vM=0;function Yve(){vM=0}var gM=new Pc(vn.INSERTED,null,"","","",0,"",""),mM=new Pc(vn.REMOVED,null,"","","",0,"",""),b7=new Gr(vn.DESTROY),x7=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.entity=vM++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},n.cullable={strategy:r2.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},n.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!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]},n.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},n.geometry={contentBounds:void 0,renderBounds:void 0},n.rBushNode={aabb:void 0},n.namespaceURI="g",n.scrollLeft=0,n.scrollTop=0,n.clientTop=0,n.clientLeft=0,n.destroyed=!1,n.style={},n.computedStyle=We.enableCSSParsing?{anchor:Qr,opacity:Qr,fillOpacity:Qr,strokeOpacity:Qr,fill:Qr,stroke:Qr,transform:Qr,transformOrigin:Qr,visibility:Qr,pointerEvents:Qr,lineWidth:Qr,lineCap:Qr,lineJoin:Qr,increasedLineWidthForHitTesting:Qr,fontSize:Qr,fontFamily:Qr,fontStyle:Qr,fontWeight:Qr,fontVariant:Qr,textAlign:Qr,textBaseline:Qr,textTransform:Qr,zIndex:Qr,filter:Qr,shadowType:Qr}:null,n.parsedStyle={},n.attributes={},n}return Object.defineProperty(t.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(n){this.setAttribute("class",n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(n){return n!==""})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n-1]||null}return null},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(n){throw new Error($r)},t.prototype.appendChild=function(n,r){var i;if(n.destroyed)throw new Error(XF);return We.sceneGraphService.attach(n,this,r),!((i=this.ownerDocument)===null||i===void 0)&&i.defaultView&&this.ownerDocument.defaultView.mountChildren(n),gM.relatedNode=this,n.dispatchEvent(gM),n},t.prototype.insertBefore=function(n,r){if(!r)this.appendChild(n);else{n.parentElement&&n.parentElement.removeChild(n);var i=this.childNodes.indexOf(r);i===-1?this.appendChild(n):this.appendChild(n,i)}return n},t.prototype.replaceChild=function(n,r){var i=this.childNodes.indexOf(r);return this.removeChild(r),this.appendChild(n,i),r},t.prototype.removeChild=function(n){var r;return mM.relatedNode=this,n.dispatchEvent(mM),!((r=n.ownerDocument)===null||r===void 0)&&r.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),We.sceneGraphService.detach(n),n},t.prototype.removeChildren=function(){for(var n=this.childNodes.length-1;n>=0;n--){var r=this.childNodes[n];this.removeChild(r)}},t.prototype.destroyChildren=function(){for(var n=this.childNodes.length-1;n>=0;n--){var r=this.childNodes[n];r.childNodes.length&&r.destroyChildren(),r.destroy()}},t.prototype.matches=function(n){return We.sceneGraphService.matches(n,this)},t.prototype.getElementById=function(n){return We.sceneGraphService.querySelector("#".concat(n),this)},t.prototype.getElementsByName=function(n){return We.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)},t.prototype.getElementsByClassName=function(n){return We.sceneGraphService.querySelectorAll(".".concat(n),this)},t.prototype.getElementsByTagName=function(n){return We.sceneGraphService.querySelectorAll(n,this)},t.prototype.querySelector=function(n){return We.sceneGraphService.querySelector(n,this)},t.prototype.querySelectorAll=function(n){return We.sceneGraphService.querySelectorAll(n,this)},t.prototype.closest=function(n){var r=this;do{if(We.sceneGraphService.matches(n,r))return r;r=r.parentElement}while(r!==null);return null},t.prototype.find=function(n){var r=this,i=null;return this.forEach(function(a){return a!==r&&n(a)?(i=a,!0):!1}),i},t.prototype.findAll=function(n){var r=this,i=[];return this.forEach(function(a){a!==r&&n(a)&&i.push(a)}),i},t.prototype.after=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(this.parentNode){var a=this.parentNode.childNodes.indexOf(this);r.forEach(function(o,s){var l;return(l=n.parentNode)===null||l===void 0?void 0:l.appendChild(o,a+s+1)})}},t.prototype.before=function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(this.parentNode){var a=this.parentNode.childNodes.indexOf(this),o=w(r),s=o[0],l=o.slice(1);this.parentNode.appendChild(s,a),(n=s).after.apply(n,N([],w(l),!1))}},t.prototype.replaceWith=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.after.apply(this,N([],w(n),!1)),this.remove()},t.prototype.append=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(a){return n.appendChild(a)})},t.prototype.prepend=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(a,o){return n.appendChild(a,o)})},t.prototype.replaceChildren=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,N([],w(n),!1))},t.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},t.prototype.destroy=function(){this.dispatchEvent(b7),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},t.prototype.getGeometryBounds=function(){return We.sceneGraphService.getGeometryBounds(this)},t.prototype.getRenderBounds=function(){return We.sceneGraphService.getBounds(this,!0)},t.prototype.getBounds=function(){return We.sceneGraphService.getBounds(this)},t.prototype.getLocalBounds=function(){return We.sceneGraphService.getLocalBounds(this)},t.prototype.getBoundingClientRect=function(){return We.sceneGraphService.getBoundingClientRect(this)},t.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},t.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},t.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},t.prototype.getAttribute=function(n){if(iB(n))return We.enableCSSParsing?null:void 0;var r=this.attributes[n];if(r===void 0){var i=qx(n);return r=this.attributes[i],We.enableCSSParsing&&Bt(r)?null:r}else return r},t.prototype.hasAttribute=function(n){return this.getAttributeNames().includes(n)},t.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},t.prototype.removeAttribute=function(n){this.setAttribute(n,null),delete this.attributes[n]},t.prototype.setAttribute=function(n,r,i){this.attributes[n]=r},t.prototype.getAttributeNS=function(n,r){throw new Error($r)},t.prototype.getAttributeNode=function(n){throw new Error($r)},t.prototype.getAttributeNodeNS=function(n,r){throw new Error($r)},t.prototype.hasAttributeNS=function(n,r){throw new Error($r)},t.prototype.removeAttributeNS=function(n,r){throw new Error($r)},t.prototype.removeAttributeNode=function(n){throw new Error($r)},t.prototype.setAttributeNS=function(n,r,i){throw new Error($r)},t.prototype.setAttributeNode=function(n){throw new Error($r)},t.prototype.setAttributeNodeNS=function(n){throw new Error($r)},t.prototype.toggleAttribute=function(n,r){throw new Error($r)},t}(Aa);function _r(e){return!!(e!=null&&e.nodeName)}var Dl=new Pc(vn.ATTR_MODIFIED,null,null,null,null,Pc.MODIFICATION,null,null),_7={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},yM={anchor:[0,0],fill:n2,stroke:n2,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},w7=Ie(Ie({},yM),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),S7=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],O7=N(N([],w(S7),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),bM="data-",qa=function(e){zt(t,e);function t(n){var r,i=e.call(this)||this;i.isCustomElement=!1,i.isMutationObserved=!1,i.activeAnimations=[],i.getClip=function(){return this.style.clipPath||null},i.config=n,i.config.interactive=(r=i.config.capture)!==null&&r!==void 0?r:i.config.interactive,i.id=i.config.id||"",i.name=i.config.name||"",(i.config.className||i.config.class)&&(i.className=i.config.className||i.config.class),i.nodeName=i.config.type||De.GROUP,i.config.style=i.config.style||i.config.attrs||{},Object.assign(i.config.style,i.config.attrs),i.config.visible!=null&&(i.config.style.visibility=i.config.visible===!1?"hidden":"visible"),i.config.interactive!=null&&(i.config.style.pointerEvents=i.config.interactive===!1?"none":"auto"),Object.assign(i.parsedStyle,We.enableCSSParsing?yM:w7,i.config.initialParsedStyle),We.enableCSSParsing&&Object.assign(i.attributes,_7),i.initAttributes(i.config.style);var a=We.globalThis.Proxy?We.globalThis.Proxy:function(){};return We.enableDataset&&(i.dataset=new a({},{get:function(o,s){var l="".concat(bM).concat(IE(s));return o[l]!==void 0?o[l]:i.getAttribute(l)},set:function(o,s,l){return i.setAttribute("".concat(bM).concat(IE(s)),l),!0}})),We.enableStyleSyntax&&(i.style=new a({setProperty:function(o,s){i.setAttribute(o,s)},getPropertyValue:function(o){return i.getAttribute(o)},removeProperty:function(o){i.removeAttribute(o)},item:function(){return""}},{get:function(o,s){return o[s]!==void 0?o[s]:i.getAttribute(s)},set:function(o,s,l){return i.setAttribute(s,l),!0}})),i}return t.prototype.destroy=function(){e.prototype.destroy.call(this),this.getAnimations().forEach(function(n){n.cancel()})},t.prototype.cloneNode=function(n,r){var i=Ie({},this.attributes);for(var a in i){var o=i[a];_r(o)&&a!=="clipPath"&&a!=="offsetPath"&&a!=="textPath"&&(i[a]=o.cloneNode(n)),r&&(i[a]=r(a,o))}var s=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return s.setLocalTransform(this.getLocalTransform()),n&&this.children.forEach(function(l){if(!l.style.isMarker){var c=l.cloneNode(n);s.appendChild(c)}}),s},t.prototype.initAttributes=function(n){n===void 0&&(n={});var r=this.renderable,i={forceUpdateGeometry:!0};We.enableCSSParsing&&(i.usedAttributes=O7);var a={};for(var o in n){var s=qx(o);a[s]=n[o]}We.styleValueRegistry.processProperties(this,a,i),r.dirty=!0},t.prototype.setAttribute=function(n,r,i,a){i===void 0&&(i=!1),a===void 0&&(a=!0);var o=qx(n);li(r)||(i||r!==this.attributes[o])&&(this.internalSetAttribute(o,r,{memoize:a}),e.prototype.setAttribute.call(this,o,r))},t.prototype.internalSetAttribute=function(n,r,i){var a;i===void 0&&(i={});var o=this.renderable,s=this.attributes[n],l=this.parsedStyle[n];We.styleValueRegistry.processProperties(this,(a={},a[n]=r,a),i),o.dirty=!0;var c=this.parsedStyle[n];this.isConnected&&(Dl.relatedNode=this,Dl.prevValue=s,Dl.newValue=r,Dl.attrName=n,Dl.prevParsedValue=l,Dl.newParsedValue=c,this.isMutationObserved?this.dispatchEvent(Dl):(Dl.target=this,this.ownerDocument.defaultView.dispatchEvent(Dl,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(n,s,r,l,c)},t.prototype.getBBox=function(){var n=this.getBounds(),r=w(n.getMin(),2),i=r[0],a=r[1],o=w(n.getMax(),2),s=o[0],l=o[1];return new wu(i,a,s-i,l-a)},t.prototype.setOrigin=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),We.sceneGraphService.setOrigin(this,mo(n,r,i)),this},t.prototype.getOrigin=function(){return We.sceneGraphService.getOrigin(this)},t.prototype.setPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),We.sceneGraphService.setPosition(this,mo(n,r,i)),this},t.prototype.setLocalPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),We.sceneGraphService.setLocalPosition(this,mo(n,r,i)),this},t.prototype.translate=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),We.sceneGraphService.translate(this,mo(n,r,i)),this},t.prototype.translateLocal=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),We.sceneGraphService.translateLocal(this,mo(n,r,i)),this},t.prototype.getPosition=function(){return We.sceneGraphService.getPosition(this)},t.prototype.getLocalPosition=function(){return We.sceneGraphService.getLocalPosition(this)},t.prototype.scale=function(n,r,i){return this.scaleLocal(n,r,i)},t.prototype.scaleLocal=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=mo(n,r,i)),We.sceneGraphService.scaleLocal(this,n),this},t.prototype.setLocalScale=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=mo(n,r,i)),We.sceneGraphService.setLocalScale(this,n),this},t.prototype.getLocalScale=function(){return We.sceneGraphService.getLocalScale(this)},t.prototype.getScale=function(){return We.sceneGraphService.getScale(this)},t.prototype.getEulerAngles=function(){var n=w(Yx(le(),We.sceneGraphService.getWorldTransform(this)),3),r=n[2];return ys(r)},t.prototype.getLocalEulerAngles=function(){var n=w(Yx(le(),We.sceneGraphService.getLocalRotation(this)),3),r=n[2];return ys(r)},t.prototype.setEulerAngles=function(n){return We.sceneGraphService.setEulerAngles(this,0,0,n),this},t.prototype.setLocalEulerAngles=function(n){return We.sceneGraphService.setLocalEulerAngles(this,0,0,n),this},t.prototype.rotateLocal=function(n,r,i){return Bt(r)&&Bt(i)?We.sceneGraphService.rotateLocal(this,0,0,n):We.sceneGraphService.rotateLocal(this,n,r,i),this},t.prototype.rotate=function(n,r,i){return Bt(r)&&Bt(i)?We.sceneGraphService.rotate(this,0,0,n):We.sceneGraphService.rotate(this,n,r,i),this},t.prototype.setRotation=function(n,r,i,a){return We.sceneGraphService.setRotation(this,n,r,i,a),this},t.prototype.setLocalRotation=function(n,r,i,a){return We.sceneGraphService.setLocalRotation(this,n,r,i,a),this},t.prototype.setLocalSkew=function(n,r){return We.sceneGraphService.setLocalSkew(this,n,r),this},t.prototype.getRotation=function(){return We.sceneGraphService.getRotation(this)},t.prototype.getLocalRotation=function(){return We.sceneGraphService.getLocalRotation(this)},t.prototype.getLocalSkew=function(){return We.sceneGraphService.getLocalSkew(this)},t.prototype.getLocalTransform=function(){return We.sceneGraphService.getLocalTransform(this)},t.prototype.getWorldTransform=function(){return We.sceneGraphService.getWorldTransform(this)},t.prototype.setLocalTransform=function(n){return We.sceneGraphService.setLocalTransform(this,n),this},t.prototype.resetLocalTransform=function(){We.sceneGraphService.resetLocalTransform(this)},t.prototype.getAnimations=function(){return this.activeAnimations},t.prototype.animate=function(n,r){var i,a=(i=this.ownerDocument)===null||i===void 0?void 0:i.timeline;return a?a.play(this,n,r):null},t.prototype.isVisible=function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)==="visible"},Object.defineProperty(t.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(n){this.style.pointerEvents=n?"auto":"none"},enumerable:!1,configurable:!0}),t.prototype.isInteractive=function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.pointerEvents)!=="none"},t.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},t.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,N([],w(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})),!1))+1),this},t.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,N([],w(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})),!1))-1),this},t.prototype.getConfig=function(){return this.config},t.prototype.attr=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=w(r,2),o=a[0],s=a[1];return o?bu(o)?(Object.keys(o).forEach(function(l){n.setAttribute(l,o[l])}),this):r.length===2?(this.setAttribute(o,s),this):this.attributes[o]:this.attributes},t.prototype.getMatrix=function(n){var r=n||this.getWorldTransform(),i=w(Pv(le(),r),2),a=i[0],o=i[1],s=w(Nf(le(),r),2),l=s[0],c=s[1],u=Tv(na(),r),f=w(Yx(le(),u),3),d=f[0],h=f[2];return $F(d||h,a,o,l,c)},t.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.prototype.setMatrix=function(n){var r=w(CE(n),5),i=r[0],a=r[1],o=r[2],s=r[3],l=r[4];this.setEulerAngles(l).setPosition(i,a).setLocalScale(o,s)},t.prototype.setLocalMatrix=function(n){var r=w(CE(n),5),i=r[0],a=r[1],o=r[2],s=r[3],l=r[4];this.setLocalEulerAngles(l).setLocalPosition(i,a).setLocalScale(o,s)},t.prototype.show=function(){We.enableCSSParsing?this.style.visibility="visible":this.forEach(function(n){n.style.visibility="visible"})},t.prototype.hide=function(){We.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(n){n.style.visibility="hidden"})},t.prototype.getCount=function(){return this.childElementCount},t.prototype.getParent=function(){return this.parentElement},t.prototype.getChildren=function(){return this.children},t.prototype.getFirst=function(){return this.firstElementChild},t.prototype.getLast=function(){return this.lastElementChild},t.prototype.getChildByIndex=function(n){return this.children[n]||null},t.prototype.add=function(n,r){return this.appendChild(n,r)},t.prototype.setClip=function(n){this.style.clipPath=n},t.prototype.set=function(n,r){this.config[n]=r},t.prototype.get=function(n){return this.config[n]},t.prototype.moveTo=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),this.setPosition(n,r,i),this},t.prototype.move=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),this.setPosition(n,r,i),this},t.prototype.setZIndex=function(n){return this.style.zIndex=n,this},t}(x7),xM={number:function(e){return new Wr(e)},percent:function(e){return new Wr(e,"%")},px:function(e){return new Wr(e,"px")},em:function(e){return new Wr(e,"em")},rem:function(e){return new Wr(e,"rem")},deg:function(e){return new Wr(e,"deg")},grad:function(e){return new Wr(e,"grad")},rad:function(e){return new Wr(e,"rad")},turn:function(e){return new Wr(e,"turn")},s:function(e){return new Wr(e,"s")},ms:function(e){return new Wr(e,"ms")},registerProperty:function(e){var t=e.name,n=e.inherits,r=e.interpolable,i=e.initialValue,a=e.syntax;We.styleValueRegistry.registerMetadata({n:t,inh:n,int:r,d:i,syntax:a})},registerLayout:function(e,t){We.layoutRegistry.registerLayout(e,t)}},Mu=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({type:De.CIRCLE,style:We.enableCSSParsing?Ie({cx:"",cy:"",r:""},r):Ie({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:We.enableCSSParsing?null:[Yv,Yv]}},i))||this}return t}(qa),eg=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=this,i=n.style,a=Sr(n,["style"]);return r=e.call(this,Ie({style:We.enableCSSParsing?Ie({x:"",y:""},i):Ie({},i)},a))||this,r.isCustomElement=!0,r}return t}(qa),O2=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({type:De.ELLIPSE,style:We.enableCSSParsing?Ie({cx:"",cy:"",rx:"",ry:""},r):Ie({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:We.enableCSSParsing?null:[Yv,Yv]}},i))||this}return t}(qa),xa=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({type:De.GROUP,style:We.enableCSSParsing?Ie({x:"",y:"",width:"",height:""},r):Ie({},r)},i))||this}return t}(qa),tg=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=this,i=n.style,a=Sr(n,["style"]);return r=e.call(this,Ie({type:De.HTML,style:We.enableCSSParsing?Ie({x:"",y:"",width:"auto",height:"auto",innerHTML:""},i):Ie({},i)},a))||this,r.cullable.enable=!1,r}return t.prototype.getDomElement=function(){return this.parsedStyle.$el},t.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var n=this.parsedStyle,r=n.x,i=n.y,a=n.width,o=n.height;return new wu(r,i,a,o)},t.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},t.prototype.getBounds=function(){var n,r,i=this.getBoundingClientRect(),a=(r=(n=this.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect(),o=new ra,s=i.left-((a==null?void 0:a.left)||0),l=i.top-((a==null?void 0:a.top)||0);return o.setMinMax([s,l,0],[s+i.width,l+i.height,0]),o},t.prototype.getLocalBounds=function(){if(this.parentNode){var n=No(cr(),this.parentNode.getWorldTransform()),r=this.getBounds();if(!ra.isEmpty(r)){var i=new ra;return i.setFromTransformedAABB(r,n),i}}return this.getBounds()},t}(qa),C2=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({type:De.IMAGE,style:We.enableCSSParsing?Ie({x:"",y:"",img:"",width:"",height:""},r):Ie({},r)},i))||this}return t}(qa),Gh=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=this,i=n.style,a=Sr(n,["style"]);r=e.call(this,Ie({type:De.LINE,style:Ie({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a))||this,r.markerStartAngle=0,r.markerEndAngle=0;var o=r.parsedStyle,s=o.markerStart,l=o.markerEnd;return s&&_r(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&_r(l)&&(r.markerEndAngle=l.getLocalEulerAngles(),r.appendChild(l)),r.transformMarker(!0),r.transformMarker(!1),r}return t.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="x1"||n==="y1"||n==="x2"||n==="y2"||n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&_r(a)&&(this.markerStartAngle=0,a.remove()),o&&_r(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(a&&_r(a)&&(this.markerEndAngle=0,a.remove()),o&&_r(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))},t.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,l=r.x1,c=r.x2,u=r.y1,f=r.y2,d=r.defX,h=r.defY,p=n?i:a;if(!(!p||!_r(p))){var v=0,g,m,b,_,S,O;n?(b=l-d,_=u-h,g=c-l,m=f-u,S=o||0,O=this.markerStartAngle):(b=c-d,_=f-h,g=l-c,m=u-f,S=s||0,O=this.markerEndAngle),v=Math.atan2(m,g),p.setLocalEulerAngles(v*180/Math.PI+O),p.setLocalPosition(b+Math.cos(v)*S,_+Math.sin(v)*S)}},t.prototype.getPoint=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.x1,o=i.y1,s=i.x2,l=i.y2,c=i.defX,u=i.defY,f=rl(a,o,s,l,n),d=f.x,h=f.y,p=tr(le(),nt(d-c,h-u,0),r?this.getWorldTransform():this.getLocalTransform());return new Ta(p[0],p[1])},t.prototype.getPointAtLength=function(n,r){return r===void 0&&(r=!1),this.getPoint(n/this.getTotalLength(),r)},t.prototype.getTotalLength=function(){var n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2;return dE(r,i,a,o)},t}(qa),Ja=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=this,i=n.style,a=Sr(n,["style"]);r=e.call(this,Ie({type:De.PATH,style:We.enableCSSParsing?Ie({path:"",miterLimit:""},i):Ie({},i),initialParsedStyle:We.enableCSSParsing?null:{miterLimit:4,path:Ie({},NE)}},a))||this,r.markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var o=r.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerMid;return s&&_r(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),c&&_r(c)&&r.placeMarkerMid(c),l&&_r(l)&&(r.markerEndAngle=l.getLocalEulerAngles(),r.appendChild(l)),r.transformMarker(!0),r.transformMarker(!1),r}return t.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="path"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&_r(a)&&(this.markerStartAngle=0,a.remove()),o&&_r(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&_r(a)&&(this.markerEndAngle=0,a.remove()),o&&_r(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)},t.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,l=r.defX,c=r.defY,u=n?i:a;if(!(!u||!_r(u))){var f=0,d,h,p,v,g,m;if(n){var b=w(this.getStartTangent(),2),_=b[0],S=b[1];p=S[0]-l,v=S[1]-c,d=_[0]-S[0],h=_[1]-S[1],g=o||0,m=this.markerStartAngle}else{var O=w(this.getEndTangent(),2),_=O[0],S=O[1];p=S[0]-l,v=S[1]-c,d=_[0]-S[0],h=_[1]-S[1],g=s||0,m=this.markerEndAngle}f=Math.atan2(h,d),u.setLocalEulerAngles(f*180/Math.PI+m),u.setLocalPosition(p+Math.cos(f)*g,v+Math.sin(f)*g)}},t.prototype.placeMarkerMid=function(n){var r=this.parsedStyle,i=r.path.segments,a=r.defX,o=r.defY;if(this.markerMidList.forEach(function(d){d.remove()}),n&&_r(n))for(var s=1;s<i.length-1;s++){var l=w(i[s].currentPoint,2),c=l[0],u=l[1],f=s===1?n:n.cloneNode(!0);this.markerMidList.push(f),this.appendChild(f),f.setLocalPosition(c-a,u-o)}},t.prototype.getTotalLength=function(){return l2(this)},t.prototype.getPointAtLength=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.defX,o=i.defY,s=i.path.absolutePath,l=rF(s,n),c=l.x,u=l.y,f=tr(le(),nt(c-a,u-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Ta(f[0],f[1])},t.prototype.getPoint=function(n,r){return r===void 0&&(r=!1),this.getPointAtLength(n*l2(this),r)},t.prototype.getStartTangent=function(){var n=this.parsedStyle.path.segments,r=[];if(n.length>1){var i=n[0].currentPoint,a=n[1].currentPoint,o=n[1].startTangent;r=[],o?(r.push([i[0]-o[0],i[1]-o[1]]),r.push([i[0],i[1]])):(r.push([a[0],a[1]]),r.push([i[0],i[1]]))}return r},t.prototype.getEndTangent=function(){var n=this.parsedStyle.path.segments,r=n.length,i=[];if(r>1){var a=n[r-2].currentPoint,o=n[r-1].currentPoint,s=n[r-1].endTangent;i=[],s?(i.push([o[0]-s[0],o[1]-s[1]]),i.push([o[0],o[1]])):(i.push([a[0],a[1]]),i.push([o[0],o[1]]))}return i},t}(qa),Hh=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=this,i=n.style,a=Sr(n,["style"]);r=e.call(this,Ie({type:De.POLYGON,style:We.enableCSSParsing?Ie({points:"",miterLimit:"",isClosed:!0},i):Ie({},i),initialParsedStyle:We.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a))||this,r.markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var o=r.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerMid;return s&&_r(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),c&&_r(c)&&r.placeMarkerMid(c),l&&_r(l)&&(r.markerEndAngle=l.getLocalEulerAngles(),r.appendChild(l)),r.transformMarker(!0),r.transformMarker(!1),r}return t.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&_r(a)&&(this.markerStartAngle=0,a.remove()),o&&_r(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&_r(a)&&(this.markerEndAngle=0,a.remove()),o&&_r(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)},t.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,l=r.points,c=r.defX,u=r.defY,f=(l||{}).points,d=n?i:a;if(!(!d||!_r(d)||!f)){var h=0,p,v,g,m,b,_;if(g=f[0][0]-c,m=f[0][1]-u,n)p=f[1][0]-f[0][0],v=f[1][1]-f[0][1],b=o||0,_=this.markerStartAngle;else{var S=f.length;this.parsedStyle.isClosed?(p=f[S-1][0]-f[0][0],v=f[S-1][1]-f[0][1]):(g=f[S-1][0]-c,m=f[S-1][1]-u,p=f[S-2][0]-f[S-1][0],v=f[S-2][1]-f[S-1][1]),b=s||0,_=this.markerEndAngle}h=Math.atan2(v,p),d.setLocalEulerAngles(h*180/Math.PI+_),d.setLocalPosition(g+Math.cos(h)*b,m+Math.sin(h)*b)}},t.prototype.placeMarkerMid=function(n){var r=this.parsedStyle,i=r.points,a=r.defX,o=r.defY,s=(i||{}).points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],n&&_r(n)&&s)for(var l=1;l<(this.parsedStyle.isClosed?s.length:s.length-1);l++){var c=s[l][0]-a,u=s[l][1]-o,f=l===1?n:n.cloneNode(!0);this.markerMidList.push(f),this.appendChild(f),f.setLocalPosition(c,u)}},t}(qa),E2=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({type:De.POLYLINE,style:We.enableCSSParsing?Ie({points:"",miterLimit:"",isClosed:!1},r):Ie({},r),initialParsedStyle:We.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i))||this}return t.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},t.prototype.getPointAtLength=function(n,r){return r===void 0&&(r=!1),this.getPoint(n/this.getTotalLength(),r)},t.prototype.getPoint=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.defX,o=i.defY,s=i.points,l=s.points,c=s.segments,u=0,f=0;c.forEach(function(g,m){n>=g[0]&&n<=g[1]&&(u=(n-g[0])/(g[1]-g[0]),f=m)});var d=rl(l[f][0],l[f][1],l[f+1][0],l[f+1][1],u),h=d.x,p=d.y,v=tr(le(),nt(h-a,p-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Ta(v[0],v[1])},t.prototype.getStartTangent=function(){var n=this.parsedStyle.points.points,r=[];return r.push([n[1][0],n[1][1]]),r.push([n[0][0],n[0][1]]),r},t.prototype.getEndTangent=function(){var n=this.parsedStyle.points.points,r=n.length-1,i=[];return i.push([n[r-1][0],n[r-1][1]]),i.push([n[r][0],n[r][1]]),i},t}(Hh),Pu=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({type:De.RECT,style:We.enableCSSParsing?Ie({x:"",y:"",width:"",height:"",radius:""},r):Ie({},r)},i))||this}return t}(qa),rs=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({type:De.TEXT,style:We.enableCSSParsing?Ie({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},r):Ie({fill:"black"},r),initialParsedStyle:We.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},i))||this}return t.prototype.getComputedTextLength=function(){var n;return((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0},t.prototype.getLineBoundingRects=function(){var n;return((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]},t.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(qa),C7=function(){function e(){this.registry={},this.define(De.CIRCLE,Mu),this.define(De.ELLIPSE,O2),this.define(De.RECT,Pu),this.define(De.IMAGE,C2),this.define(De.LINE,Gh),this.define(De.GROUP,xa),this.define(De.PATH,Ja),this.define(De.POLYGON,Hh),this.define(De.POLYLINE,E2),this.define(De.TEXT,rs),this.define(De.HTML,tg)}return e.prototype.define=function(t,n){this.registry[t]=n},e.prototype.get=function(t){return this.registry[t]},e}(),E7=function(e){zt(t,e);function t(){var n=e.call(this)||this;n.defaultView=null,n.ownerDocument=null,n.nodeName="document";try{n.timeline=new We.AnimationTimeline(n)}catch(i){}var r={};return g2.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=Gf(s)?s(De.GROUP):s)}),n.documentElement=new xa({id:"g-root",style:r}),n.documentElement.ownerDocument=n,n.documentElement.parentNode=n,n.childNodes=[n.documentElement],n}return Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),t.prototype.createElement=function(n,r){if(n==="svg")return this.documentElement;var i=this.defaultView.customElements.get(n);i||(console.warn("Unsupported tagName: ",n),i=n==="tspan"?rs:xa);var a=new i(r);return a.ownerDocument=this,a},t.prototype.createElementNS=function(n,r,i){return this.createElement(r,i)},t.prototype.cloneNode=function(n){throw new Error($r)},t.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(n){}},t.prototype.elementsFromBBox=function(n,r,i,a){var o=this.defaultView.context.rBushRoot,s=o.search({minX:n,minY:r,maxX:i,maxY:a}),l=[];return s.forEach(function(c){var u=c.displayObject,f=u.parsedStyle.pointerEvents,d=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(f);(!d||d&&u.isVisible())&&!u.isCulled()&&u.isInteractive()&&l.push(u)}),l.sort(function(c,u){return u.sortable.renderOrder-c.sortable.renderOrder}),l},t.prototype.elementFromPointSync=function(n,r){var i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),l=s.width,c=s.height;if(a<0||o<0||a>l||o>c)return null;var u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]}).picked;return h&&h[0]||this.documentElement},t.prototype.elementFromPoint=function(n,r){return el(this,void 0,void 0,function(){var i,a,o,s,l,c,u,f,d,h;return Il(this,function(p){switch(p.label){case 0:return i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),l=s.width,c=s.height,a<0||o<0||a>l||o>c?[2,null]:(u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]})]);case 1:return h=p.sent().picked,[2,h&&h[0]||this.documentElement]}})})},t.prototype.elementsFromPointSync=function(n,r){var i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),l=s.width,c=s.height;if(a<0||o<0||a>l||o>c)return[];var u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]}).picked;return h[h.length-1]!==this.documentElement&&h.push(this.documentElement),h},t.prototype.elementsFromPoint=function(n,r){return el(this,void 0,void 0,function(){var i,a,o,s,l,c,u,f,d,h;return Il(this,function(p){switch(p.label){case 0:return i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),l=s.width,c=s.height,a<0||o<0||a>l||o>c?[2,[]]:(u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]})]);case 1:return h=p.sent().picked,h[h.length-1]!==this.documentElement&&h.push(this.documentElement),[2,h]}})})},t.prototype.appendChild=function(n,r){throw new Error(Wf)},t.prototype.insertBefore=function(n,r){throw new Error(Wf)},t.prototype.removeChild=function(n,r){throw new Error(Wf)},t.prototype.replaceChild=function(n,r,i){throw new Error(Wf)},t.prototype.append=function(){throw new Error(Wf)},t.prototype.prepend=function(){throw new Error(Wf)},t.prototype.getElementById=function(n){return this.documentElement.getElementById(n)},t.prototype.getElementsByName=function(n){return this.documentElement.getElementsByName(n)},t.prototype.getElementsByTagName=function(n){return this.documentElement.getElementsByTagName(n)},t.prototype.getElementsByClassName=function(n){return this.documentElement.getElementsByClassName(n)},t.prototype.querySelector=function(n){return this.documentElement.querySelector(n)},t.prototype.querySelectorAll=function(n){return this.documentElement.querySelectorAll(n)},t.prototype.find=function(n){return this.documentElement.find(n)},t.prototype.findAll=function(n){return this.documentElement.findAll(n)},t}(Aa),M7=function(){function e(t){this.strategies=t}return e.prototype.apply=function(t){var n=t.camera,r=t.renderingService,i=t.renderingContext,a=this.strategies;r.hooks.cull.tap(e.tag,function(o){if(o){var s=o.cullable;return a.length===0?s.visible=i.unculledEntities.indexOf(o.entity)>-1:s.visible=a.every(function(l){return l.isVisible(n,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Gr(vn.CULLED)),null)}return o}),r.hooks.afterRender.tap(e.tag,function(o){o.cullable.visibilityPlaneMask=-1})},e.tag="Culling",e}(),P7=function(){function e(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new w2(null),this.rootWheelEvent=new S2(null),this.onPointerMove=function(n){var r,i,a,o,s=(o=(a=t.context.renderingContext.root)===null||a===void 0?void 0:a.ownerDocument)===null||o===void 0?void 0:o.defaultView;if(!(s.supportsTouchEvents&&n.pointerType==="touch")){var l=t.normalizeToPointerEvent(n,s);try{for(var c=M(l),u=c.next();!u.done;u=c.next()){var f=u.value,d=t.bootstrapEvent(t.rootPointerEvent,f,s,n);t.context.eventService.mapEvent(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(n){var r,i,a,o,s=(o=(a=t.context.renderingContext.root)===null||a===void 0?void 0:a.ownerDocument)===null||o===void 0?void 0:o.defaultView,l=t.normalizeToPointerEvent(n,s);try{for(var c=M(l),u=c.next();!u.done;u=c.next()){var f=u.value,d=t.bootstrapEvent(t.rootPointerEvent,f,s,n);t.context.eventService.mapEvent(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}t.setCursor(t.context.eventService.cursor)}}return e.prototype.apply=function(t){var n=this;this.context=t;var r=t.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(a){var o=n.context.renderingService.hooks.pickSync.call({position:a,picked:[],topmost:!0}).picked;return o[0]||null}),r.hooks.pointerWheel.tap(e.tag,function(a){var o=n.normalizeWheelEvent(a);n.context.eventService.mapEvent(o)}),r.hooks.pointerDown.tap(e.tag,function(a){var o,s;if(!(i.supportsTouchEvents&&a.pointerType==="touch")){var l=n.normalizeToPointerEvent(a,i);if(n.autoPreventDefault&&l[0].isNormalized){var c=a.cancelable||!("cancelable"in a);c&&a.preventDefault()}try{for(var u=M(l),f=u.next();!f.done;f=u.next()){var d=f.value,h=n.bootstrapEvent(n.rootPointerEvent,d,i,a);n.context.eventService.mapEvent(h)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(e.tag,function(a){var o,s;if(!(i.supportsTouchEvents&&a.pointerType==="touch")){var l=n.context.contextService.getDomElement(),c=n.context.eventService.isNativeEventFromCanvas(l,a),u=c?"":"outside",f=n.normalizeToPointerEvent(a,i);try{for(var d=M(f),h=d.next();!h.done;h=d.next()){var p=h.value,v=n.bootstrapEvent(n.rootPointerEvent,p,i,a);v.type+=u,n.context.eventService.mapEvent(v)}}catch(g){o={error:g}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(e.tag,this.onPointerMove),r.hooks.pointerOver.tap(e.tag,this.onPointerMove),r.hooks.pointerOut.tap(e.tag,this.onPointerMove),r.hooks.click.tap(e.tag,this.onClick),r.hooks.pointerCancel.tap(e.tag,function(a){var o,s,l=n.normalizeToPointerEvent(a,i);try{for(var c=M(l),u=c.next();!u.done;u=c.next()){var f=u.value,d=n.bootstrapEvent(n.rootPointerEvent,f,i,a);n.context.eventService.mapEvent(d)}}catch(h){o={error:h}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)})},e.prototype.getViewportXY=function(t){var n,r,i=t.offsetX,a=t.offsetY,o=t.clientX,s=t.clientY;if(this.context.config.supportsCSSTransform&&!Bt(i)&&!Bt(a))n=i,r=a;else{var l=this.context.eventService.client2Viewport(new Ta(o,s));n=l.x,r=l.y}return{x:n,y:r}},e.prototype.bootstrapEvent=function(t,n,r,i){t.view=r,t.originalEvent=null,t.nativeEvent=i,t.pointerId=n.pointerId,t.width=n.width,t.height=n.height,t.isPrimary=n.isPrimary,t.pointerType=n.pointerType,t.pressure=n.pressure,t.tangentialPressure=n.tangentialPressure,t.tiltX=n.tiltX,t.tiltY=n.tiltY,t.twist=n.twist,this.transferMouseData(t,n);var a=this.getViewportXY(n),o=a.x,s=a.y;t.viewport.x=o,t.viewport.y=s;var l=this.context.eventService.viewport2Canvas(t.viewport),c=l.x,u=l.y;return t.canvas.x=c,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=i.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=C9[t.type]||t.type),t},e.prototype.normalizeWheelEvent=function(t){var n=this.rootWheelEvent;this.transferMouseData(n,t),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ;var r=this.getViewportXY(t),i=r.x,a=r.y;n.viewport.x=i,n.viewport.y=a;var o=this.context.eventService.viewport2Canvas(n.viewport),s=o.x,l=o.y;return n.canvas.x=s,n.canvas.y=l,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.nativeEvent=t,n.type=t.type,n},e.prototype.transferMouseData=function(t,n){t.isTrusted=n.isTrusted,t.srcElement=n.srcElement,t.timeStamp=x2.now(),t.type=n.type,t.altKey=n.altKey,t.metaKey=n.metaKey,t.shiftKey=n.shiftKey,t.ctrlKey=n.ctrlKey,t.button=n.button,t.buttons=n.buttons,t.client.x=n.clientX,t.client.y=n.clientY,t.movement.x=n.movementX,t.movement.y=n.movementY,t.page.x=n.pageX,t.page.y=n.pageY,t.screen.x=n.screenX,t.screen.y=n.screenY,t.relatedTarget=null},e.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},e.prototype.normalizeToPointerEvent=function(t,n){var r=[];if(n.isTouchEvent(t))for(var i=0;i<t.changedTouches.length;i++){var a=t.changedTouches[i];li(a.button)&&(a.button=0),li(a.buttons)&&(a.buttons=1),li(a.isPrimary)&&(a.isPrimary=t.touches.length===1&&t.type==="touchstart"),li(a.width)&&(a.width=a.radiusX||1),li(a.height)&&(a.height=a.radiusY||1),li(a.tiltX)&&(a.tiltX=0),li(a.tiltY)&&(a.tiltY=0),li(a.pointerType)&&(a.pointerType="touch"),li(a.pointerId)&&(a.pointerId=a.identifier||0),li(a.pressure)&&(a.pressure=a.force||.5),li(a.twist)&&(a.twist=0),li(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=t.type,r.push(a)}else if(n.isMouseEvent(t)){var o=t;li(o.isPrimary)&&(o.isPrimary=!0),li(o.width)&&(o.width=1),li(o.height)&&(o.height=1),li(o.tiltX)&&(o.tiltX=0),li(o.tiltY)&&(o.tiltY=0),li(o.pointerType)&&(o.pointerType="mouse"),li(o.pointerId)&&(o.pointerId=O9),li(o.pressure)&&(o.pressure=.5),li(o.twist)&&(o.twist=0),li(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,r.push(o)}else r.push(t);return r},e.tag="Event",e}(),T7=[De.CIRCLE,De.ELLIPSE,De.IMAGE,De.RECT,De.LINE,De.POLYLINE,De.POLYGON,De.TEXT,De.PATH,De.HTML],A7=function(){function e(){}return e.prototype.isVisible=function(t,n){var r,i,a=n.cullable;if(!a.enable)return!0;var o=n.getRenderBounds();if(ra.isEmpty(o))return!1;var s=t.getFrustum(),l=(i=(r=n.parentNode)===null||r===void 0?void 0:r.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(n,o,l||Oc.INDETERMINATE,s.planes),a.visible=a.visibilityPlaneMask!==Oc.OUTSIDE,a.visible},e.prototype.computeVisibilityWithPlaneMask=function(t,n,r,i){if(r===Oc.OUTSIDE||r===Oc.INSIDE)return r;for(var a=Oc.INSIDE,o=T7.indexOf(t.nodeName)>-1,s=0,l=i.length;s<l;++s){var c=1<<s;if(r&c&&!(o&&(s===4||s===5))){var u=i[s],f=u.normal,d=u.distance;if(qe(f,n.getPositiveFarPoint(i[s]))+d<0)return Oc.OUTSIDE;qe(f,n.getNegativeFarPoint(i[s]))+d<0&&(a|=c)}}return a},e}(),R7=function(){function e(){this.toSync=new Set}return e.prototype.apply=function(t){var n=this,r=t.renderingService,i=t.renderingContext,a=t.rBushRoot,o=i.root.ownerDocument.defaultView;this.rBush=a;var s=function(f){var d=f.target;d.renderable.dirty=!0,r.dirtify()},l=function(f){var d=f.detail.affectChildren,h=f.target;d&&h.forEach(function(v){n.toSync.add(v)});for(var p=h;p;)p.renderable&&n.toSync.add(p),p=p.parentElement;r.dirtify()},c=function(f){var d=f.target;We.enableSizeAttenuation&&We.styleValueRegistry.updateSizeAttenuation(d,o.getCamera().getZoom()),We.enableCSSParsing&&We.styleValueRegistry.recalc(d),We.sceneGraphService.dirtifyToRoot(d),r.dirtify()},u=function(f){var d=f.target,h=d.rBushNode;h.aabb&&n.rBush.remove(h.aabb),n.toSync.delete(d),We.sceneGraphService.dirtifyToRoot(d),r.dirtify()};r.hooks.init.tap(e.tag,function(){o.addEventListener(vn.MOUNTED,c),o.addEventListener(vn.UNMOUNTED,u),o.addEventListener(vn.ATTR_MODIFIED,s),o.addEventListener(vn.BOUNDS_CHANGED,l)}),r.hooks.destroy.tap(e.tag,function(){o.removeEventListener(vn.MOUNTED,c),o.removeEventListener(vn.UNMOUNTED,u),o.removeEventListener(vn.ATTR_MODIFIED,s),o.removeEventListener(vn.BOUNDS_CHANGED,l),n.toSync.clear()}),r.hooks.endFrame.tap(e.tag,function(){n.syncRTree()})},e.prototype.syncRTree=function(){var t=this,n=[];Array.from(this.toSync).filter(function(r){return r.isConnected}).forEach(function(r){var i=r.rBushNode;i&&i.aabb&&t.rBush.remove(i.aabb);var a=r.getRenderBounds();if(a){var o=w(a.getMin(),2),s=o[0],l=o[1],c=w(a.getMax(),2),u=c[0],f=c[1];i.aabb||(i.aabb={}),i.aabb.displayObject=r,i.aabb.minX=s,i.aabb.minY=l,i.aabb.maxX=u,i.aabb.maxY=f}i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY)&&n.push(i.aabb)}),this.rBush.load(n),n.length=0,this.toSync.clear()},e.tag="Prepare",e}();function Vve(e){return!!e.document}var Bo;(function(e){e.READY="ready",e.BEFORE_RENDER="beforerender",e.RERENDER="rerender",e.AFTER_RENDER="afterrender",e.BEFORE_DESTROY="beforedestroy",e.AFTER_DESTROY="afterdestroy",e.RESIZE="resize",e.DIRTY_RECTANGLE="dirtyrectangle",e.RENDERER_CHANGED="rendererchanged"})(Bo||(Bo={}));var _M=500,I7=.1,L7=1e3,M2=new Gr(vn.MOUNTED),P2=new Gr(vn.UNMOUNTED),N7=new Gr(Bo.BEFORE_RENDER),k7=new Gr(Bo.RERENDER),j7=new Gr(Bo.AFTER_RENDER),wM=function(e){zt(t,e);function t(n){var r=e.call(this)||this;r.Element=qa,r.inited=!1,r.context={},r.document=new E7,r.document.defaultView=r,r.customElements=new C7;var i=n.container,a=n.canvas,o=n.offscreenCanvas,s=n.width,l=n.height,c=n.devicePixelRatio,u=n.renderer,f=n.background,d=n.cursor,h=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,g=n.createImage,m=n.supportsPointerEvents,b=n.supportsTouchEvents,_=n.supportsCSSTransform,S=n.supportsMutipleCanvasesInOneContainer,O=n.useNativeClickEvent,C=n.alwaysTriggerPointerEventOnCanvas,E=n.isTouchEvent,P=n.isMouseEvent;S||y9(i,r);var T=s,A=l,R=c;return a&&(R=c||$h&&window.devicePixelRatio||1,R=R>=1?Math.ceil(R):1,T=s||w9(a)||a.width/R,A=l||S9(a)||a.height/R),o&&(We.offscreenCanvas=o),r.devicePixelRatio=R,r.requestAnimationFrame=p!=null?p:lM.bind(We.globalThis),r.cancelAnimationFrame=v!=null?v:cM.bind(We.globalThis),r.supportsTouchEvents=b!=null?b:"ontouchstart"in We.globalThis,r.supportsPointerEvents=m!=null?m:!!We.globalThis.PointerEvent,r.isTouchEvent=E!=null?E:function(z){return r.supportsTouchEvents&&z instanceof We.globalThis.TouchEvent},r.isMouseEvent=P!=null?P:function(z){return!We.globalThis.MouseEvent||z instanceof We.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(z instanceof We.globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:a,width:T,height:A,renderer:u,offscreenCanvas:o,devicePixelRatio:R,cursor:d||"default",background:f||"transparent",createImage:g,document:h,supportsCSSTransform:_,useNativeClickEvent:O,alwaysTriggerPointerEventOnCanvas:C}),r.initDefaultCamera(T,A,u.clipSpaceNearZ),r.initRenderer(u,!0),r}return t.prototype.initRenderingContext=function(n){this.context.config=n,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},t.prototype.initDefaultCamera=function(n,r,i){var a=this,o=new We.CameraContribution;o.clipSpaceNearZ=i,o.setType(Nr.EXPLORING,Dh.DEFAULT).setPosition(n/2,r/2,_M).setFocalPoint(n/2,r/2,0).setOrthographic(n/-2,n/2,r/2,r/-2,I7,L7),o.canvas=this,o.eventEmitter.on(ME.UPDATED,function(){a.context.renderingContext.renderReasons.add(Mc.CAMERA_CHANGED),We.enableSizeAttenuation&&a.getConfig().renderer.getConfig().enableSizeAttenuation&&a.updateSizeAttenuation()}),this.context.camera=o},t.prototype.updateSizeAttenuation=function(){var n=this.getCamera().getZoom();this.document.documentElement.forEach(function(r){We.styleValueRegistry.updateSizeAttenuation(r,n)})},t.prototype.getConfig=function(){return this.context.config},t.prototype.getRoot=function(){return this.document.documentElement},t.prototype.getCamera=function(){return this.context.camera},t.prototype.getContextService=function(){return this.context.contextService},t.prototype.getEventService=function(){return this.context.eventService},t.prototype.getRenderingService=function(){return this.context.renderingService},t.prototype.getRenderingContext=function(){return this.context.renderingContext},t.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(t.prototype,"ready",{get:function(){var n=this;return this.readyPromise||(this.readyPromise=new Promise(function(r){n.resolveReadyPromise=function(){r(n)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),t.prototype.destroy=function(n,r){if(n===void 0&&(n=!0),r===void 0&&(r=!1),r||this.dispatchEvent(new Gr(Bo.BEFORE_DESTROY)),this.frameId){var i=this.getConfig().cancelAnimationFrame||cancelAnimationFrame;i(this.frameId)}var a=this.getRoot();this.unmountChildren(a),n&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),n&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),r||this.dispatchEvent(new Gr(Bo.AFTER_DESTROY))},t.prototype.changeSize=function(n,r){this.resize(n,r)},t.prototype.resize=function(n,r){var i=this.context.config;i.width=n,i.height=r,this.getContextService().resize(n,r);var a=this.context.camera,o=a.getProjectionMode();a.setPosition(n/2,r/2,_M).setFocalPoint(n/2,r/2,0),o===jo.ORTHOGRAPHIC?a.setOrthographic(n/-2,n/2,r/2,r/-2,a.getNear(),a.getFar()):a.setAspect(n/r),this.dispatchEvent(new Gr(Bo.RESIZE,{width:n,height:r}))},t.prototype.appendChild=function(n,r){return this.document.documentElement.appendChild(n,r)},t.prototype.insertBefore=function(n,r){return this.document.documentElement.insertBefore(n,r)},t.prototype.removeChild=function(n){return this.document.documentElement.removeChild(n)},t.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},t.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},t.prototype.render=function(){var n=this;this.dispatchEvent(N7);var r=this.getRenderingService();r.render(this.getConfig(),function(){n.dispatchEvent(k7)}),this.dispatchEvent(j7)},t.prototype.run=function(){var n=this,r=function(){n.render(),n.frameId=n.requestAnimationFrame(r)};r()},t.prototype.initRenderer=function(n,r){var i=this;if(r===void 0&&(r=!1),!n)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new kF,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new P7,new R7,new M7([new A7])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService(Ie(Ie({},We),this.context)),this.context.renderingService=new e7(We,this.context),this.context.eventService=new J9(We,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(n,r,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(n,r)})},t.prototype.initRenderingService=function(n,r,i){var a=this;r===void 0&&(r=!1),i===void 0&&(i=!1),this.context.renderingService.init(function(){a.inited=!0,r?(i?a.requestAnimationFrame(function(){a.dispatchEvent(new Gr(Bo.READY))}):a.dispatchEvent(new Gr(Bo.READY)),a.readyPromise&&a.resolveReadyPromise()):a.dispatchEvent(new Gr(Bo.RENDERER_CHANGED)),r||a.getRoot().forEach(function(o){var s=o.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}),a.mountChildren(a.getRoot()),n.getConfig().enableAutoRendering&&a.run()})},t.prototype.loadRendererContainerModule=function(n){var r=this,i=n.getPlugins();i.forEach(function(a){a.context=r.context,a.init(We)})},t.prototype.setRenderer=function(n){var r=this.getConfig();if(r.renderer!==n){var i=r.renderer;r.renderer=n,this.destroy(!1,!0),N([],w(i==null?void 0:i.getPlugins()),!1).reverse().forEach(function(a){a.destroy(We)}),this.initRenderer(n)}},t.prototype.setCursor=function(n){var r=this.getConfig();r.cursor=n,this.getContextService().applyCursorStyle(n)},t.prototype.unmountChildren=function(n){var r=this;n.childNodes.forEach(function(i){r.unmountChildren(i)}),this.inited&&(n.isMutationObserved?n.dispatchEvent(P2):(P2.target=n,this.dispatchEvent(P2,!0)),n!==this.document.documentElement&&(n.ownerDocument=null),n.isConnected=!1),n.isCustomElement&&n.disconnectedCallback&&n.disconnectedCallback()},t.prototype.mountChildren=function(n){var r=this;this.inited?n.isConnected||(n.ownerDocument=this.document,n.isConnected=!0,n.isMutationObserved?n.dispatchEvent(M2):(M2.target=n,this.dispatchEvent(M2,!0))):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: ",n.nodeName),n.childNodes.forEach(function(i){r.mountChildren(i)}),n.isCustomElement&&n.connectedCallback&&n.connectedCallback()},t.prototype.client2Viewport=function(n){return this.getEventService().client2Viewport(n)},t.prototype.viewport2Client=function(n){return this.getEventService().viewport2Client(n)},t.prototype.viewport2Canvas=function(n){return this.getEventService().viewport2Canvas(n)},t.prototype.canvas2Viewport=function(n){return this.getEventService().canvas2Viewport(n)},t.prototype.getPointByClient=function(n,r){return this.client2Viewport({x:n,y:r})},t.prototype.getClientByPoint=function(n,r){return this.viewport2Client({x:n,y:r})},t}(dM),D7=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.landmarks=[],n}return t.prototype.rotate=function(n,r,i){if(this.relElevation=$f(r),this.relAzimuth=$f(n),this.relRoll=$f(i),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Nr.EXPLORING){var a=xc(na(),[1,0,0],Mi((this.rotateWorld?1:-1)*this.relElevation)),o=xc(na(),[0,1,0],Mi((this.rotateWorld?1:-1)*this.relAzimuth)),s=xc(na(),[0,0,1],Mi(this.relRoll)),l=_c(na(),o,a);l=_c(na(),l,s);var c=Lx(cr(),l);zs(this.matrix,this.matrix,[0,0,-this.distance]),ya(this.matrix,this.matrix,c),zs(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===Nr.ORBITING||this.type===Nr.EXPLORING?this._getPosition():this.type===Nr.TRACKING&&this._getFocalPoint(),this._update(),this},t.prototype.pan=function(n,r){var i=mo(n,r,0),a=Ze(this.position);return $e(a,a,Wt(le(),this.right,i[0])),$e(a,a,Wt(le(),this.up,i[1])),this._setPosition(a),this.triggerUpdate(),this},t.prototype.dolly=function(n){var r=this.forward,i=Ze(this.position),a=n*this.dollyingStep,o=this.distance+n*this.dollyingStep;return a=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,i[0]+=a*r[0],i[1]+=a*r[1],i[2]+=a*r[2],this._setPosition(i),this.type===Nr.ORBITING||this.type===Nr.EXPLORING?this._getDistance():this.type===Nr.TRACKING&&$e(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},t.prototype.cancelLandmarkAnimation=function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},t.prototype.createLandmark=function(n,r){var i,a,o,s;r===void 0&&(r={});var l=r.position,c=l===void 0?this.position:l,u=r.focalPoint,f=u===void 0?this.focalPoint:u,d=r.roll,h=r.zoom,p=new We.CameraContribution;p.setType(this.type,void 0),p.setPosition(c[0],(i=c[1])!==null&&i!==void 0?i:this.position[1],(a=c[2])!==null&&a!==void 0?a:this.position[2]),p.setFocalPoint(f[0],(o=f[1])!==null&&o!==void 0?o:this.focalPoint[1],(s=f[2])!==null&&s!==void 0?s:this.focalPoint[2]),p.setRoll(d!=null?d:this.roll),p.setZoom(h!=null?h:this.zoom);var v={name:n,matrix:bc(p.getWorldTransform()),right:Ze(p.right),up:Ze(p.up),forward:Ze(p.forward),position:Ze(p.getPosition()),focalPoint:Ze(p.getFocalPoint()),distanceVector:Ze(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(v),v},t.prototype.gotoLandmark=function(n,r){var i=this;r===void 0&&(r={});var a=xi(n)?this.landmarks.find(function(A){return A.name===n}):n;if(a){var o=Gi(r)?{duration:r}:r,s=o.easing,l=s===void 0?"linear":s,c=o.duration,u=c===void 0?100:c,f=o.easingFunction,d=f===void 0?void 0:f,h=o.onfinish,p=h===void 0?void 0:h,v=o.onframe,g=v===void 0?void 0:v,m=.01;if(u===0){this.syncFromLandmark(a),p&&p();return}this.cancelLandmarkAnimation();var b=a.position,_=a.focalPoint,S=a.zoom,O=a.roll,C=d||We.EasingFunction(l),E,P=function(){i.setFocalPoint(_),i.setPosition(b),i.setRoll(O),i.setZoom(S),i.computeMatrix(),i.triggerUpdate(),p&&p()},T=function(A){E===void 0&&(E=A);var R=A-E;if(R>u){P();return}var z=C(R/u),I=le(),L=le(),F=1,Z=0;bt(I,i.focalPoint,_,z),bt(L,i.position,b,z),Z=i.roll*(1-z)+O*z,F=i.zoom*(1-z)+S*z,i.setFocalPoint(I),i.setPosition(L),i.setRoll(Z),i.setZoom(F);var H=vt(I,_)+vt(L,b);if(H<=m&&S==null&&O==null){P();return}i.computeMatrix(),i.triggerUpdate(),R<u&&(g&&g(z),i.landmarkAnimationID=i.canvas.requestAnimationFrame(T))};this.canvas.requestAnimationFrame(T)}},t.prototype.syncFromLandmark=function(n){this.matrix=Jo(this.matrix,n.matrix),this.right=Ge(this.right,n.right),this.up=Ge(this.up,n.up),this.forward=Ge(this.forward,n.forward),this.position=Ge(this.position,n.position),this.focalPoint=Ge(this.focalPoint,n.focalPoint),this.distanceVector=Ge(this.distanceVector,n.distanceVector),this.azimuth=n.azimuth,this.elevation=n.elevation,this.roll=n.roll,this.relAzimuth=n.relAzimuth,this.relElevation=n.relElevation,this.relRoll=n.relRoll,this.dollyingStep=n.dollyingStep,this.distance=n.distance,this.zoom=n.zoom},t}(TE);We.CameraContribution=D7;var SM=function(){function e(t,n){this.type=t,this.target=n,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return e.copy=function(t){var n=new e(t.type,t.target);return n.addedNodes=t.addedNodes.slice(),n.removedNodes=t.removedNodes.slice(),n.previousSibling=t.previousSibling,n.nextSibling=t.nextSibling,n.attributeName=t.attributeName,n.attributeNamespace=t.attributeNamespace,n.oldValue=t.oldValue,n},e}(),F7=0,Xf=new WeakMap,B7=function(){function e(t,n,r){this.observer=t,this.target=n,this.options=r,this.transientObservedNodes=[]}return e.prototype.enqueue=function(t){var n=this.observer.records,r=n.length;if(n.length>0){var i=n[r-1],a=W7(i,t);if(a){n[r-1]=a;return}}else H7(this.observer);n[r]=t},e.prototype.addListeners=function(){this.addListeners_(this.target)},e.prototype.addListeners_=function(t){var n=this.options;n.attributes&&t.addEventListener(vn.ATTR_MODIFIED,this,!0),n.childList&&t.addEventListener(vn.INSERTED,this,!0),(n.childList||n.subtree)&&t.addEventListener(vn.REMOVED,this,!0)},e.prototype.removeListeners=function(){this.removeListeners_(this.target)},e.prototype.removeListeners_=function(t){var n=this.options;n.attributes&&t.removeEventListener(vn.ATTR_MODIFIED,this,!0),n.childList&&t.removeEventListener(vn.INSERTED,this,!0),(n.childList||n.subtree)&&t.removeEventListener(vn.REMOVED,this,!0)},e.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(n){this.removeListeners_(n);for(var r=Xf.get(n),i=0;i<r.length;i++)if(r[i]===this){r.splice(i,1);break}},this)},e.prototype.handleEvent=function(t){t.stopImmediatePropagation();var n,r;switch(t.type){case vn.ATTR_MODIFIED:var i=t.attrName,a=t.relatedNode.namespaceURI;r=t.target,n=OM("attributes",r),n.attributeName=i,n.attributeNamespace=a;var o=t.attrChange===Pc.ADDITION?null:t.prevValue;CM(r,function(d){if(d.attributes&&!(d.attributeFilter&&d.attributeFilter.length&&d.attributeFilter.indexOf(i)===-1&&d.attributeFilter.indexOf(a)===-1))return d.attributeOldValue?z7(o):n});break;case vn.REMOVED:case vn.INSERTED:r=t.relatedNode;var s=t.target,l=void 0,c=void 0;t.type===vn.INSERTED?(l=[s],c=[]):(l=[],c=[s]);var u=s.previousSibling,f=s.nextSibling;n=OM("childList",r),n.addedNodes=l,n.removedNodes=c,n.previousSibling=u,n.nextSibling=f,CM(r,function(d){if(d.childList)return n})}Z7()},e}(),Uve=function(){function e(t){this.callback=t,this.nodes=[],this.records=[],this.uid=F7++}return e.prototype.observe=function(t,n){if(!n.childList&&!n.attributes&&!n.characterData||n.attributeOldValue&&!n.attributes||n.attributeFilter&&n.attributeFilter.length&&!n.attributes||n.characterDataOldValue&&!n.characterData)throw new SyntaxError;var r=Xf.get(t);r||Xf.set(t,r=[]);for(var i,a=0;a<r.length;a++)if(r[a].observer===this){i=r[a],i.removeListeners(),i.options=n;break}i||(i=new B7(this,t,n),r.push(i),this.nodes.push(t)),i.addListeners()},e.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(n){for(var r=Xf.get(n),i=0;i<r.length;i++){var a=r[i];if(a.observer===t){a.removeListeners(),r.splice(i,1);break}}},this),this.records=[]},e.prototype.takeRecords=function(){var t=this.records;return this.records=[],t},e}(),ng,Fl;function OM(e,t){return ng=new SM(e,t)}function z7(e){return Fl||(Fl=SM.copy(ng),Fl.oldValue=e,Fl)}function Z7(){ng=Fl=void 0}function $7(e){return e===Fl||e===ng}function W7(e,t){return e===t?e:Fl&&$7(e)?Fl:null}function G7(e){e.nodes.forEach(function(t){var n=Xf.get(t);n&&n.forEach(function(r){r.observer===e&&r.removeTransientObservers()})})}function CM(e,t){for(var n=e;n;n=n.parentNode){var r=Xf.get(n);if(r)for(var i=0;i<r.length;i++){var a=r[i],o=a.options;if(!(n!==e&&!o.subtree)){var s=t(o);s&&a.enqueue(s)}}}}var T2=!1,A2=[];function H7(e){A2.push(e),T2||(T2=!0,typeof We.globalThis!="undefined"?We.globalThis.setTimeout(R2):R2())}function R2(){T2=!1;var e=A2;A2=[],e.sort(function(n,r){return n.uid-r.uid});var t=!1;e.forEach(function(n){var r=n.takeRecords();G7(n),r.length&&(n.callback(r,n),t=!0)}),t&&R2()}var I2=function(e){zt(t,e);function t(n,r,i,a){var o=e.call(this,n)||this;return o.currentTime=i,o.timelineTime=a,o.target=r,o.type="finish",o.bubbles=!1,o.currentTarget=r,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=i,o.timelineTime=a,o}return t}(Qv),Y7=0,V7=function(){function e(t,n){var r;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=n,this.id="".concat(Y7++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((r=this.effect)===null||r===void 0?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(e.prototype,"pending",{get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(n,r){t.resolveReadyPromise=function(){n(t)},t.rejectReadyPromise=function(){r(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(n,r){t.resolveFinishedPromise=function(){n(t)},t.rejectFinishedPromise=function(){r(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var n;t=Number(t),!isNaN(t)&&(this.timeline.restart(),!this._paused&&this._startTime!==null&&(this._startTime=Number((n=this.timeline)===null||n===void 0?void 0:n.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)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(t!==null){if(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var n=this.currentTime;this._playbackRate=t,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),n!==null&&(this.currentTime=n),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_needsTick",{get:function(){return this.pending||this.playState==="running"||!this._finishedFlag},enumerable:!1,configurable:!0}),e.prototype.updatePromises=function(){var t=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==t&&(n==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):t==="pending"?this.resolveReadyPromise():n==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&n!==t&&(n==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):n==="finished"?this.resolveFinishedPromise():t==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=n,this.readyPromise||this.finishedPromise},e.prototype.play=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),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()},e.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()},e.prototype.finish=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())},e.prototype.cancel=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 n=new I2(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(n)})}},e.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),t!==null&&(this.currentTime=t),this.updatePromises()},e.prototype.updatePlaybackRate=function(t){this.playbackRate=t},e.prototype.targetAnimations=function(){var t,n=(t=this.effect)===null||t===void 0?void 0:t.target;return n.getAnimations()},e.prototype.markTarget=function(){var t=this.targetAnimations();t.indexOf(this)===-1&&t.push(this)},e.prototype.unmarkTarget=function(){var t=this.targetAnimations(),n=t.indexOf(this);n!==-1&&t.splice(n,1)},e.prototype.tick=function(t,n){!this._idle&&!this._paused&&(this._startTime===null?n&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),n&&(this.currentTimePending=!1,this.fireEvents(t))},e.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")},e.prototype.persist=function(){throw new Error($r)},e.prototype.addEventListener=function(t,n,r){throw new Error($r)},e.prototype.removeEventListener=function(t,n,r){throw new Error($r)},e.prototype.dispatchEvent=function(t){throw new Error($r)},e.prototype.commitStyles=function(){throw new Error($r)},e.prototype.ensureAlive=function(){var t,n;this.playbackRate<0&&this.currentTime===0?this._inEffect=!!(!((t=this.effect)===null||t===void 0)&&t.update(-1)):this._inEffect=!!(!((n=this.effect)===null||n===void 0)&&n.update(this.currentTime)),!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))},e.prototype.tickCurrentTime=function(t,n){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!n&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},e.prototype.fireEvents=function(t){var n=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var r=new I2(null,this,this.currentTime,t);setTimeout(function(){n.onfinish&&n.onfinish(r)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var i=new I2(null,this,this.currentTime,t);this.onframe(i)}this._finishedFlag=!1}},e}(),U7=4,X7=.001,K7=1e-7,q7=10,Yh=11,rg=1/(Yh-1),J7=typeof Float32Array=="function",EM=function(e,t){return 1-3*t+3*e},MM=function(e,t){return 3*t-6*e},PM=function(e){return 3*e},ig=function(e,t,n){return((EM(t,n)*e+MM(t,n))*e+PM(t))*e},TM=function(e,t,n){return 3*EM(t,n)*e*e+2*MM(t,n)*e+PM(t)},Q7=function(e,t,n,r,i){var a,o,s=0;do o=t+(n-t)/2,a=ig(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>K7&&++s<q7);return o},ez=function(e,t,n,r){for(var i=0;i<U7;++i){var a=TM(t,n,r);if(a===0)return t;var o=ig(t,n,r)-e;t-=o/a}return t},L2=function(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&n===r)return function(s){return s};for(var i=J7?new Float32Array(Yh):new Array(Yh),a=0;a<Yh;++a)i[a]=ig(a*rg,e,n);var o=function(s){for(var l=0,c=1,u=Yh-1;c!==u&&i[c]<=s;++c)l+=rg;--c;var f=(s-i[c])/(i[c+1]-i[c]),d=l+f*rg,h=TM(d,e,n);return h>=X7?ez(s,d,e,n):h===0?d:Q7(s,l,l+rg,e,n)};return function(s){return s===0||s===1?s:ig(o(s),t,r)}},tz=function(e){return e=e.replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())}),e.charAt(0)==="-"?e.substring(1):e},ag=function(e){return Math.pow(e,2)},og=function(e){return Math.pow(e,3)},sg=function(e){return Math.pow(e,4)},lg=function(e){return Math.pow(e,5)},cg=function(e){return Math.pow(e,6)},ug=function(e){return 1-Math.cos(e*Math.PI/2)},fg=function(e){return 1-Math.sqrt(1-e*e)},dg=function(e){return e*e*(3*e-2)},hg=function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)},pg=function(e,t){t===void 0&&(t=[]);var n=w(t,2),r=n[0],i=r===void 0?1:r,a=n[1],o=a===void 0?.5:a,s=Ri(Number(i),1,10),l=Ri(Number(o),.1,2);return e===0||e===1?e:-s*Math.pow(2,10*(e-1))*Math.sin((e-1-l/(Math.PI*2)*Math.asin(1/s))*(Math.PI*2)/l)},Vh=function(e,t,n){t===void 0&&(t=[]);var r=w(t,4),i=r[0],a=i===void 0?1:i,o=r[1],s=o===void 0?100:o,l=r[2],c=l===void 0?10:l,u=r[3],f=u===void 0?0:u;a=Ri(a,.1,1e3),s=Ri(s,.1,1e3),c=Ri(c,.1,1e3),f=Ri(f,.1,1e3);var d=Math.sqrt(s/a),h=c/(2*Math.sqrt(s*a)),p=h<1?d*Math.sqrt(1-h*h):0,v=1,g=h<1?(h*d+-f)/p:-f+d,m=n?n*e/1e3:e;return h<1?m=Math.exp(-m*h*d)*(v*Math.cos(p*m)+g*Math.sin(p*m)):m=(v+g*m)*Math.exp(-m*d),e===0||e===1?e:1-m},N2=function(e,t){t===void 0&&(t=[]);var n=w(t,2),r=n[0],i=r===void 0?10:r,a=n[1],o=a=="start"?Math.ceil:Math.floor;return o(Ri(e,0,1)*i)/i},AM=function(e,t){t===void 0&&(t=[]);var n=w(t,4),r=n[0],i=n[1],a=n[2],o=n[3];return L2(r,i,a,o)(e)},vg=L2(.42,0,1,1),bs=function(e){return function(t,n,r){return n===void 0&&(n=[]),1-e(1-t,n,r)}},xs=function(e){return function(t,n,r){return n===void 0&&(n=[]),t<.5?e(t*2,n,r)/2:1-e(t*-2+2,n,r)/2}},_s=function(e){return function(t,n,r){return n===void 0&&(n=[]),t<.5?(1-e(1-t*2,n,r))/2:(e(t*2-1,n,r)+1)/2}},RM={steps:N2,"step-start":function(e){return N2(e,[1,"start"])},"step-end":function(e){return N2(e,[1,"end"])},linear:function(e){return e},"cubic-bezier":AM,ease:function(e){return AM(e,[.25,.1,.25,1])},in:vg,out:bs(vg),"in-out":xs(vg),"out-in":_s(vg),"in-quad":ag,"out-quad":bs(ag),"in-out-quad":xs(ag),"out-in-quad":_s(ag),"in-cubic":og,"out-cubic":bs(og),"in-out-cubic":xs(og),"out-in-cubic":_s(og),"in-quart":sg,"out-quart":bs(sg),"in-out-quart":xs(sg),"out-in-quart":_s(sg),"in-quint":lg,"out-quint":bs(lg),"in-out-quint":xs(lg),"out-in-quint":_s(lg),"in-expo":cg,"out-expo":bs(cg),"in-out-expo":xs(cg),"out-in-expo":_s(cg),"in-sine":ug,"out-sine":bs(ug),"in-out-sine":xs(ug),"out-in-sine":_s(ug),"in-circ":fg,"out-circ":bs(fg),"in-out-circ":xs(fg),"out-in-circ":_s(fg),"in-back":dg,"out-back":bs(dg),"in-out-back":xs(dg),"out-in-back":_s(dg),"in-bounce":hg,"out-bounce":bs(hg),"in-out-bounce":xs(hg),"out-in-bounce":_s(hg),"in-elastic":pg,"out-elastic":bs(pg),"in-out-elastic":xs(pg),"out-in-elastic":_s(pg),spring:Vh,"spring-in":Vh,"spring-out":bs(Vh),"spring-in-out":xs(Vh),"spring-out-in":_s(Vh)},nz=function(e){return tz(e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},rz=function(e){return RM[nz(e)]||RM.linear},iz=function(e){return e},az=1,oz=.5,IM=0;function LM(e,t){return function(n){if(n>=1)return 1;var r=1/e;return n+=t*r,n-n%r}}var gg="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",sz=new RegExp("cubic-bezier\\("+gg+","+gg+","+gg+","+gg+"\\)"),lz=/steps\(\s*(\d+)\s*\)/,cz=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function k2(e){var t=sz.exec(e);if(t)return L2.apply(void 0,N([],w(t.slice(1).map(Number)),!1));var n=lz.exec(e);if(n)return LM(Number(n[1]),IM);var r=cz.exec(e);return r?LM(Number(r[1]),{start:az,middle:oz,end:IM}[r[2]]):rz(e)}function uz(e){return Math.abs(fz(e)/(e.playbackRate||1))}function fz(e){var t;return e.duration===0||e.iterations===0?0:(e.duration==="auto"?0:Number(e.duration))*((t=e.iterations)!==null&&t!==void 0?t:1)}var NM=0,j2=1,mg=2,kM=3;function dz(e,t,n){if(t===null)return NM;var r=n.endTime;return t<Math.min(n.delay,r)?j2:t>=Math.min(n.delay+e+n.endDelay,r)?mg:kM}function hz(e,t,n,r,i){switch(r){case j2:return t==="backwards"||t==="both"?0:null;case kM:return n-i;case mg:return t==="forwards"||t==="both"?e:null;case NM:return null}}function pz(e,t,n,r,i){var a=i;return e===0?t!==j2&&(a+=n):a+=r/e,a}function vz(e,t,n,r,i,a){var o=e===1/0?t%1:e%1;return o===0&&n===mg&&r!==0&&(i!==0||a===0)&&(o=1),o}function gz(e,t,n,r){return e===mg&&t===1/0?1/0:n===1?Math.floor(r)-1:Math.floor(r)}function mz(e,t,n){var r=e;if(e!=="normal"&&e!=="reverse"){var i=t;e==="alternate-reverse"&&(i+=1),r="normal",i!==1/0&&i%2!==0&&(r="reverse")}return r==="normal"?n:1-n}function yz(e,t,n){var r=dz(e,t,n),i=hz(e,n.fill,t,r,n.delay);if(i===null)return null;var a=n.duration==="auto"?0:n.duration,o=pz(a,r,n.iterations,i,n.iterationStart),s=vz(o,n.iterationStart,r,n.iterations,i,a),l=gz(r,n.iterations,s,o),c=mz(n.direction,l,s);return n.currentIteration=l,n.progress=c,n.easingFunction(c)}function bz(e,t,n){var r=xz(e,t),i=_z(r,n);return function(a,o){if(o!==null)i.filter(function(l){return o>=l.applyFrom&&o<l.applyTo}).forEach(function(l){var c=o-l.startOffset,u=l.endOffset-l.startOffset,f=u===0?0:l.easingFunction(c/u);a.setAttribute(l.property,l.interpolation(f),!1,!1)});else for(var s in r)jM(s)&&a.setAttribute(s,null)}}function jM(e){return e!=="offset"&&e!=="easing"&&e!=="composite"&&e!=="computedOffset"}function xz(e,t){for(var n={},r=0;r<e.length;r++)for(var i in e[r])if(jM(i)){var a={offset:e[r].offset,computedOffset:e[r].computedOffset,easing:e[r].easing,easingFunction:k2(e[r].easing)||t.easingFunction,value:e[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}function _z(e,t){var n=[];for(var r in e)for(var i=e[r],a=0;a<i.length-1;a++){var o=a,s=a+1,l=i[o].computedOffset,c=i[s].computedOffset,u=l,f=c;a===0&&(u=-1/0,c===0&&(s=o)),a===i.length-2&&(f=1/0,l===1&&(o=s)),n.push({applyFrom:u,applyTo:f,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:r,interpolation:wz(r,i[o].value,i[s].value,t)})}return n.sort(function(d,h){return d.startOffset-h.startOffset}),n}var DM=function(e,t,n){return function(r){var i=FM(e,t,r);return!We.enableCSSParsing&&Gi(i)?i:n(i)}};function wz(e,t,n,r){var i=Ec[e];if(i&&i.syntax&&i.int){var a=We.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=void 0,s=void 0;if(We.enableCSSParsing){var l=We.styleValueRegistry.parseProperty(e,t,r,!1),c=We.styleValueRegistry.parseProperty(e,n,r,!1);o=We.styleValueRegistry.computeProperty(e,l,r,!1),s=We.styleValueRegistry.computeProperty(e,c,r,!1)}else{var u=a.parserWithCSSDisabled;o=u?u(t,r):t,s=u?u(n,r):n}var f=a.mixer(o,s,r);if(f){var d=DM.apply(void 0,N([],w(f),!1));return function(h){return h===0?t:h===1?n:d(h)}}}}return DM(!1,!0,function(h){return h?n:t})}function FM(e,t,n){if(typeof e=="number"&&typeof t=="number")return e*(1-n)+t*n;if(typeof e=="boolean"&&typeof t=="boolean"||typeof e=="string"&&typeof t=="string")return n<.5?e:t;if(Array.isArray(e)&&Array.isArray(t)){for(var r=e.length,i=t.length,a=Math.max(r,i),o=[],s=0;s<a;s++)o.push(FM(e[s<r?s:r-1],t[s<i?s:i-1],n));return o}throw new Error("Mismatched interpolation arguments "+e+":"+t)}var Sz=function(){function e(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=iz,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(e.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=k2(t),this._easing=t},enumerable:!1,configurable:!0}),e}();function Oz(e){var t=[];for(var n in e)if(!(n in["easing","offset","composite"])){var r=e[n];Array.isArray(r)||(r=[r]);for(var i=r.length,a=0;a<i;a++){if(!t[a]){var o={};"offset"in e&&(o.offset=Number(e.offset)),"easing"in e&&(o.easing=e.easing),"composite"in e&&(o.composite=e.composite),t[a]=o}r[a]!==void 0&&r[a]!==null&&(t[a][n]=r[a])}}return t.sort(function(s,l){return(s.computedOffset||0)-(l.computedOffset||0)}),t}function BM(e,t){if(e===null)return[];Array.isArray(e)||(e=Oz(e));for(var n=e.map(function(l){var c={};t!=null&&t.composite&&(c.composite="auto");for(var u in l){var f=l[u];if(u==="offset"){if(f!==null){if(f=Number(f),!isFinite(f))throw new Error("Keyframe offsets must be numbers.");if(f<0||f>1)throw new Error("Keyframe offsets must be between 0 and 1.");c.computedOffset=f}}else if(u==="composite"&&["replace","add","accumulate","auto"].indexOf(f)===-1)throw new Error("".concat(f," compositing is not supported"));c[u]=f}return c.offset===void 0&&(c.offset=null),c.easing===void 0&&(c.easing=(t==null?void 0:t.easing)||"linear"),c.composite===void 0&&(c.composite="auto"),c}),r=!0,i=-1/0,a=0;a<n.length;a++){var o=n[a].offset;if(Bt(o))r=!1;else{if(o<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=o}}n=n.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function s(){var l,c,u=n.length;n[u-1].computedOffset=Number((l=n[u-1].offset)!==null&&l!==void 0?l:1),u>1&&(n[0].computedOffset=Number((c=n[0].offset)!==null&&c!==void 0?c:0));for(var f=0,d=Number(n[0].computedOffset),h=1;h<u;h++){var p=n[h].computedOffset;if(!Bt(p)&&!Bt(d)){for(var v=1;v<h-f;v++)n[f+v].computedOffset=d+(Number(p)-d)*v/(h-f);f=h,d=Number(p)}}}return r||s(),n}var Cz="backwards|forwards|both|none".split("|"),Ez="reverse|alternate|alternate-reverse".split("|");function Mz(e,t){var n=new Sz;return t&&(n.fill="both",n.duration="auto"),typeof e=="number"&&!isNaN(e)?n.duration=e:e!==void 0&&Object.keys(e).forEach(function(r){if(e[r]!==void 0&&e[r]!==null&&e[r]!=="auto"){if((typeof n[r]=="number"||r==="duration")&&(typeof e[r]!="number"||isNaN(e[r]))||r==="fill"&&Cz.indexOf(e[r])===-1||r==="direction"&&Ez.indexOf(e[r])===-1)return;n[r]=e[r]}}),n}function Pz(e,t){return e=Tz(e!=null?e:{duration:"auto"}),Mz(e,t)}function Tz(e){return typeof e=="number"&&(isNaN(e)?e={duration:"auto"}:e={duration:e}),e}var Az=function(){function e(t,n,r){var i=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=Pz(r,!1),this.timing.effect=this,this.timing.activeDuration=uz(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=BM(n,this.timing),this.interpolations=bz(this.normalizedKeyframes,this.timing,this.target);var a=We.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,s){return s==="duration"?o.duration==="auto"?0:o.duration:s==="fill"?o.fill==="auto"?"none":o.fill:s==="localTime"?i.animation&&i.animation.currentTime||null:s==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:s==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[s]},set:function(){return!0}}):this.timing}return e.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.prototype.update=function(t){return t===null?!1:(this.timeFraction=yz(this.timing.activeDuration,t,this.timing),this.timeFraction!==null)},e.prototype.getKeyframes=function(){return this.normalizedKeyframes},e.prototype.setKeyframes=function(t){this.normalizedKeyframes=BM(t)},e.prototype.getComputedTiming=function(){return this.computedTiming},e.prototype.getTiming=function(){return this.timing},e.prototype.updateTiming=function(t){var n=this;Object.keys(t||{}).forEach(function(r){n.timing[r]=t[r]})},e}();function zM(e,t){return Number(e.id)-Number(t.id)}var Rz=function(){function e(t){var n=this;this.document=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(r){n.currentTime=r,n.discardAnimations(),n.animations.length===0?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(r){var i=n.rafCallbacks;n.rafCallbacks=[],r<Number(n.currentTime)&&(r=Number(n.currentTime)),n.animations.sort(zM),n.animations=n.tick(r,!0,n.animations)[0],i.forEach(function(a){a[1](r)}),n.applyPendingEffects()}}return e.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.prototype.isTicking=function(){return this.inTick},e.prototype.play=function(t,n,r){var i=new Az(t,n,r),a=new V7(i,this);return this.animations.push(a),this.restartWebAnimationsNextTick(),a.updatePromises(),a.play(),a.updatePromises(),a},e.prototype.applyDirtiedAnimation=function(t){var n=this;if(!this.inTick){t.markTarget();var r=t.targetAnimations();r.sort(zM);var i=this.tick(Number(this.currentTime),!1,r.slice())[1];i.forEach(function(a){var o=n.animations.indexOf(a);o!==-1&&n.animations.splice(o,1)}),this.applyPendingEffects()}},e.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){t==null||t.applyInterpolations()}),this.pendingEffects=[]},e.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return t.playState!=="finished"&&t.playState!=="idle"})},e.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.prototype.rAF=function(t){var n=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([n,t]),n},e.prototype.requestAnimationFrame=function(t){var n=this;return this.rAF(function(r){n.updateAnimationsPromises(),t(r),n.updateAnimationsPromises()})},e.prototype.tick=function(t,n,r){var i,a,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var s=[],l=[],c=[],u=[];return r.forEach(function(f){f.tick(t,n),f._inEffect?(l.push(f.effect),f.markTarget()):(s.push(f.effect),f.unmarkTarget()),f._needsTick&&(o.ticking=!0);var d=f._inEffect||f._needsTick;f._inTimeline=d,d?c.push(f):u.push(f)}),(i=this.pendingEffects).push.apply(i,N([],w(s),!1)),(a=this.pendingEffects).push.apply(a,N([],w(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[c,u]},e}();We.EasingFunction=k2,We.AnimationTimeline=Rz;const ZM="main-layer",D2="label-layer",Bl="element",F2="view",Uh="plot",$M="component",B2="label",WM="area",Xve="mask",GM={};function HM(e,t){Object.assign(GM,{[e]:t})}function Iz(e,t){var n=t.r;e.arc(n,n,n,0,Math.PI*2,!1)}function Lz(e,t){var n=t.rx,r=t.ry,i=n,a=r;if(e.ellipse)e.ellipse(i,a,i,a,0,0,Math.PI*2,!1);else{var o=i>a?i:a,s=i>a?1:i/a,l=i>a?a/i:1;e.save(),e.scale(s,l),e.arc(o,o,o,0,Math.PI*2)}}function Nz(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.defX,s=o===void 0?0:o,l=t.defY,c=l===void 0?0:l,u=t.markerStart,f=t.markerEnd,d=t.markerStartOffset,h=t.markerEndOffset,p=0,v=0,g=0,m=0,b=0,_,S;u&&_r(u)&&d&&(_=i-n,S=a-r,b=Math.atan2(S,_),p=Math.cos(b)*(d||0),v=Math.sin(b)*(d||0)),f&&_r(f)&&h&&(_=n-i,S=r-a,b=Math.atan2(S,_),g=Math.cos(b)*(h||0),m=Math.sin(b)*(h||0)),e.moveTo(n-s+p,r-c+v),e.lineTo(i-s+g,a-c+m)}function kz(e,t){var n=t.defX,r=n===void 0?0:n,i=t.defY,a=i===void 0?0:i,o=t.markerStart,s=t.markerEnd,l=t.markerStartOffset,c=t.markerEndOffset,u=t.path,f=u.absolutePath,d=u.segments,h=0,p=0,v=0,g=0,m=0,b,_;if(o&&_r(o)&&l){var S=w(o.parentNode.getStartTangent(),2),O=S[0],C=S[1];b=O[0]-C[0],_=O[1]-C[1],m=Math.atan2(_,b),h=Math.cos(m)*(l||0),p=Math.sin(m)*(l||0)}if(s&&_r(s)&&c){var E=w(s.parentNode.getEndTangent(),2),O=E[0],C=E[1];b=O[0]-C[0],_=O[1]-C[1],m=Math.atan2(_,b),v=Math.cos(m)*(c||0),g=Math.sin(m)*(c||0)}for(var P=0;P<f.length;P++){var T=f[P],A=T[0],R=f[P+1],z=P===0&&(h!==0||p!==0),I=(P===f.length-1||R&&(R[0]==="M"||R[0]==="Z"))&&v!==0&&g!==0;switch(A){case"M":z?(e.moveTo(T[1]-r+h,T[2]-a+p),e.lineTo(T[1]-r,T[2]-a)):e.moveTo(T[1]-r,T[2]-a);break;case"L":I?e.lineTo(T[1]-r+v,T[2]-a+g):e.lineTo(T[1]-r,T[2]-a);break;case"Q":e.quadraticCurveTo(T[1]-r,T[2]-a,T[3]-r,T[4]-a),I&&e.lineTo(T[3]-r+v,T[4]-a+g);break;case"C":e.bezierCurveTo(T[1]-r,T[2]-a,T[3]-r,T[4]-a,T[5]-r,T[6]-a),I&&e.lineTo(T[5]-r+v,T[6]-a+g);break;case"A":{var L=d[P].arcParams,F=L.cx,Z=L.cy,H=L.rx,W=L.ry,G=L.startAngle,J=L.endAngle,re=L.xRotation,he=L.sweepFlag;if(e.ellipse)e.ellipse(F-r,Z-a,H,W,re,G,J,!!(1-he));else{var ce=H>W?H:W,ke=H>W?1:H/W,ot=H>W?W/H:1;e.translate(F-r,Z-a),e.rotate(re),e.scale(ke,ot),e.arc(0,0,ce,G,J,!!(1-he)),e.scale(1/ke,1/ot),e.rotate(-re),e.translate(-(F-r),-(Z-a))}I&&e.lineTo(T[6]-r+v,T[7]-a+g);break}case"Z":e.closePath();break}}}function jz(e,t){var n=t.defX,r=n===void 0?0:n,i=t.defY,a=i===void 0?0:i,o=t.markerStart,s=t.markerEnd,l=t.markerStartOffset,c=t.markerEndOffset,u=t.points.points,f=u.length,d=u[0][0]-r,h=u[0][1]-a,p=u[f-1][0]-r,v=u[f-1][1]-a,g=0,m=0,b=0,_=0,S=0,O,C;o&&_r(o)&&l&&(O=u[1][0]-u[0][0],C=u[1][1]-u[0][1],S=Math.atan2(C,O),g=Math.cos(S)*(l||0),m=Math.sin(S)*(l||0)),s&&_r(s)&&c&&(O=u[f-1][0]-u[0][0],C=u[f-1][1]-u[0][1],S=Math.atan2(C,O),b=Math.cos(S)*(c||0),_=Math.sin(S)*(c||0)),e.moveTo(d+(g||b),h+(m||_));for(var E=1;E<f-1;E++){var P=u[E];e.lineTo(P[0]-r,P[1]-a)}e.lineTo(p,v)}function Dz(e,t){var n=t.defX,r=n===void 0?0:n,i=t.defY,a=i===void 0?0:i,o=t.markerStart,s=t.markerEnd,l=t.markerStartOffset,c=t.markerEndOffset,u=t.points.points,f=u.length,d=u[0][0]-r,h=u[0][1]-a,p=u[f-1][0]-r,v=u[f-1][1]-a,g=0,m=0,b=0,_=0,S=0,O,C;o&&_r(o)&&l&&(O=u[1][0]-u[0][0],C=u[1][1]-u[0][1],S=Math.atan2(C,O),g=Math.cos(S)*(l||0),m=Math.sin(S)*(l||0)),s&&_r(s)&&c&&(O=u[f-2][0]-u[f-1][0],C=u[f-2][1]-u[f-1][1],S=Math.atan2(C,O),b=Math.cos(S)*(c||0),_=Math.sin(S)*(c||0)),e.moveTo(d+g,h+m);for(var E=1;E<f-1;E++){var P=u[E];e.lineTo(P[0]-r,P[1]-a)}e.lineTo(p+b,v+_)}function Fz(e,t){var n=t.radius,r=t.width,i=t.height,a=r,o=i,s=n&&n.some(function(g){return g!==0});if(!s)e.rect(0,0,a,o);else{var l=r>0?1:-1,c=i>0?1:-1,u=l+c===0,f=w(n.map(function(g){return Ri(g,0,Math.min(Math.abs(a)/2,Math.abs(o)/2))}),4),d=f[0],h=f[1],p=f[2],v=f[3];e.moveTo(l*d,0),e.lineTo(a-l*h,0),h!==0&&e.arc(a-l*h,c*h,h,-c*Math.PI/2,l>0?0:Math.PI,u),e.lineTo(a,o-c*p),p!==0&&e.arc(a-l*p,o-c*p,p,l>0?0:Math.PI,c>0?Math.PI/2:1.5*Math.PI,u),e.lineTo(l*v,o),v!==0&&e.arc(l*v,o-c*v,v,c>0?Math.PI/2:-Math.PI/2,l>0?Math.PI:0,u),e.lineTo(0,c*d),d!==0&&e.arc(l*d,c*d,d,l>0?Math.PI:0,c>0?Math.PI*1.5:Math.PI/2,u)}}var Bz=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.name="canvas-path-generator",n}return t.prototype.init=function(){var n,r=(n={},n[De.CIRCLE]=Iz,n[De.ELLIPSE]=Lz,n[De.RECT]=Fz,n[De.LINE]=Nz,n[De.POLYLINE]=Dz,n[De.POLYGON]=jz,n[De.PATH]=kz,n[De.TEXT]=void 0,n[De.GROUP]=void 0,n[De.IMAGE]=void 0,n[De.HTML]=void 0,n[De.MESH]=void 0,n);this.context.pathGeneratorFactory=r},t.prototype.destroy=function(){delete this.context.pathGeneratorFactory},t}(Sc),zz=le(),Zz=le(),$z=le(),Wz=cr(),Gz=function(){function e(){var t=this;this.isHit=function(n,r,i,a){var o=t.context.pointInPathPickerFactory[n.nodeName];if(o){var s=No(Wz,i),l=tr(Zz,Ae($z,r[0],r[1],0),s),c=n.getGeometryBounds().halfExtents,u=n.parsedStyle.anchor;if(l[0]+=(u&&u[0]||0)*c[0]*2,l[1]+=(u&&u[1]||0)*c[1]*2,o(n,new Ta(l[0],l[1]),a,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(n,r){var i=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),a=t.context.pathGeneratorFactory[n.nodeName];return a&&(i.beginPath(),a(i,n.parsedStyle),i.closePath()),i.isPointInPath(r.x,r.y)}}return e.prototype.apply=function(t,n){var r=this,i,a=t.renderingService,o=t.renderingContext;this.context=t,this.runtime=n;var s=(i=o.root)===null||i===void 0?void 0:i.ownerDocument;a.hooks.pick.tapPromise(e.tag,function(l){return el(r,void 0,void 0,function(){return Il(this,function(c){return[2,this.pick(s,l)]})})}),a.hooks.pickSync.tap(e.tag,function(l){return r.pick(s,l)})},e.prototype.pick=function(t,n){var r,i,a=n.topmost,o=n.position,s=o.x,l=o.y,c=Ae(zz,s,l,0),u=t.elementsFromBBox(c[0],c[1],c[0],c[1]),f=[];try{for(var d=M(u),h=d.next();!h.done;h=d.next()){var p=h.value,v=p.getWorldTransform(),g=this.isHit(p,c,v,!1);if(g){var m=nM(p);if(m){var b=m.parsedStyle.clipPath,_=this.isHit(b,c,b.getWorldTransform(),!0);if(_){if(a)return n.picked=[p],n;f.push(p)}}else{if(a)return n.picked=[p],n;f.push(p)}}}}catch(S){r={error:S}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}return n.picked=f,n},e.tag="CanvasPicker",e}();function Hz(e,t,n){var r=e.parsedStyle,i=r.r,a=r.fill,o=r.stroke,s=r.lineWidth,l=r.increasedLineWidthForHitTesting,c=r.pointerEvents,u=((s||0)+(l||0))/2,f=Ka(i,i,t.x,t.y),d=w(Cu(c,a,o),2),h=d[0],p=d[1];return h&&p||n?f<=i+u:h?f<=i:p?f>=i-u&&f<=i+u:!1}function yg(e,t,n,r){return e/(n*n)+t/(r*r)}function Yz(e,t,n){var r=e.parsedStyle,i=r.rx,a=r.ry,o=r.fill,s=r.stroke,l=r.lineWidth,c=r.increasedLineWidthForHitTesting,u=r.pointerEvents,f=t.x,d=t.y,h=w(Cu(u,o,s),2),p=h[0],v=h[1],g=((l||0)+(c||0))/2,m=(f-i)*(f-i),b=(d-a)*(d-a);return p&&v||n?yg(m,b,i+g,a+g)<=1:p?yg(m,b,i,a)<=1:v?yg(m,b,i-g,a-g)>=1&&yg(m,b,i+g,a+g)<=1:!1}function Tu(e,t,n,r,i,a){return i>=e&&i<=e+n&&a>=t&&a<=t+r}function Vz(e,t,n,r,i,a,o){var s=i/2;return Tu(e-s,t-s,n,i,a,o)||Tu(e+n-s,t-s,i,r,a,o)||Tu(e+s,t+r-s,n,i,a,o)||Tu(e-s,t+s,i,r,a,o)}function bg(e,t,n,r,i,a,o,s){var l=(Math.atan2(s-t,o-e)+Math.PI*2)%(Math.PI*2),c={x:e+n*Math.cos(l),y:t+n*Math.sin(l)};return Ka(c.x,c.y,o,s)<=a/2}function Tc(e,t,n,r,i,a,o){var s=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),u=Math.max(t,r),f=i/2;return a>=s-f&&a<=l+f&&o>=c-f&&o<=u+f?hE(e,t,n,r,a,o)<=i/2:!1}function YM(e,t,n,r,i){var a=e.length;if(a<2)return!1;for(var o=0;o<a-1;o++){var s=e[o][0],l=e[o][1],c=e[o+1][0],u=e[o+1][1];if(Tc(s,l,c,u,t,n,r))return!0}if(i){var f=e[0],d=e[a-1];if(Tc(f[0],f[1],d[0],d[1],t,n,r))return!0}return!1}var Uz=1e-6;function z2(e){return Math.abs(e)<Uz?0:e<0?-1:1}function Xz(e,t,n){return(n[0]-e[0])*(t[1]-e[1])===(t[0]-e[0])*(n[1]-e[1])&&Math.min(e[0],t[0])<=n[0]&&n[0]<=Math.max(e[0],t[0])&&Math.min(e[1],t[1])<=n[1]&&n[1]<=Math.max(e[1],t[1])}function VM(e,t,n){var r=!1,i=e.length;if(i<=2)return!1;for(var a=0;a<i;a++){var o=e[a],s=e[(a+1)%i];if(Xz(o,s,[t,n]))return!0;z2(o[1]-n)>0!=z2(s[1]-n)>0&&z2(t-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function UM(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];if(r=VM(a,t,n),r)break}return r}function Kz(e,t,n){var r=e.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2,l=r.lineWidth,c=r.increasedLineWidthForHitTesting,u=r.defX,f=u===void 0?0:u,d=r.defY,h=d===void 0?0:d,p=r.pointerEvents,v=r.fill,g=r.stroke,m=w(Cu(p,v,g),2),b=m[1];return!b&&!n||!l?!1:Tc(i,a,o,s,(l||0)+(c||0),t.x+f,t.y+h)}function qz(e,t,n,r,i){for(var a=!1,o=t/2,s=0;s<e.length;s++){var l=e[s],c=l.currentPoint,u=l.params,f=l.prePoint,d=l.box;if(!(d&&!Tu(d.x-o,d.y-o,d.width+t,d.height+t,n,r)))switch(l.command){case"L":case"Z":if(a=Tc(f[0],f[1],c[0],c[1],t,n,r),a)return!0;break;case"Q":var h=LF(f[0],f[1],u[1],u[2],u[3],u[4],n,r);if(a=h<=t/2,a)return!0;break;case"C":var p=gE(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i);if(a=p<=t/2,a)return!0;break;case"A":l.cubicParams||(l.cubicParams=Fx(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var v=l.cubicParams,g=f,m=0;m<v.length;m+=6){var b=gE(g[0],g[1],v[m],v[m+1],v[m+2],v[m+3],v[m+4],v[m+5],n,r,i);if(g=[v[m+4],v[m+5]],a=b<=t/2,a)return!0}break}}return a}function Jz(e,t,n,r,i,a){var o=e.parsedStyle,s=o.lineWidth,l=o.increasedLineWidthForHitTesting,c=o.stroke,u=o.fill,f=o.defX,d=f===void 0?0:f,h=o.defY,p=h===void 0?0:h,v=o.path,g=o.pointerEvents,m=v.segments,b=v.hasArc,_=v.polylines,S=v.polygons,O=w(Cu(g,(S==null?void 0:S.length)&&u,c),2),C=O[0],E=O[1],P=l2(e),T=!1;return C||n?(b?T=r(e,t):T=UM(S,t.x+d,t.y+p)||UM(_,t.x+d,t.y+p),T):((E||n)&&(T=qz(m,(s||0)+(l||0),t.x+d,t.y+p,P)),T)}function Qz(e,t,n){var r=e.parsedStyle,i=r.stroke,a=r.fill,o=r.lineWidth,s=r.increasedLineWidthForHitTesting,l=r.points,c=r.defX,u=c===void 0?0:c,f=r.defY,d=f===void 0?0:f,h=r.pointerEvents,p=w(Cu(h,a,i),2),v=p[0],g=p[1],m=!1;return(g||n)&&(m=YM(l.points,(o||0)+(s||0),t.x+u,t.y+d,!0)),!m&&(v||n)&&(m=VM(l.points,t.x+u,t.y+d)),m}function eZ(e,t,n){var r=e.parsedStyle,i=r.lineWidth,a=r.increasedLineWidthForHitTesting,o=r.points,s=r.defX,l=s===void 0?0:s,c=r.defY,u=c===void 0?0:c,f=r.pointerEvents,d=r.fill,h=r.stroke,p=w(Cu(f,d,h),2),v=p[1];return!v&&!n||!i?!1:YM(o.points,(i||0)+(a||0),t.x+l,t.y+u,!1)}function tZ(e,t,n,r,i){var a=e.parsedStyle,o=a.radius,s=a.fill,l=a.stroke,c=a.lineWidth,u=a.increasedLineWidthForHitTesting,f=a.width,d=a.height,h=a.pointerEvents,p=w(Cu(h,s,l),2),v=p[0],g=p[1],m=o&&o.some(function(O){return O!==0}),b=(c||0)+(u||0);if(m){var S=!1;return(g||n)&&(S=nZ(0,0,f,d,o.map(function(O){return Ri(O,0,Math.min(Math.abs(f)/2,Math.abs(d)/2))}),b,t.x,t.y)),!S&&(v||n)&&(S=r(e,t)),S}else{var _=b/2;if(v&&g||n)return Tu(0-_,0-_,f+_,d+_,t.x,t.y);if(v)return Tu(0,0,f,d,t.x,t.y);if(g)return Vz(0,0,f,d,b,t.x,t.y)}return!1}function nZ(e,t,n,r,i,a,o,s){var l=w(i,4),c=l[0],u=l[1],f=l[2],d=l[3];return Tc(e+c,t,e+n-u,t,a,o,s)||Tc(e+n,t+u,e+n,t+r-f,a,o,s)||Tc(e+n-f,t+r,e+d,t+r,a,o,s)||Tc(e,t+r-d,e,t+c,a,o,s)||bg(e+n-u,t+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||bg(e+n-f,t+r-f,f,0,.5*Math.PI,a,o,s)||bg(e+d,t+r-d,d,.5*Math.PI,Math.PI,a,o,s)||bg(e+c,t+c,c,Math.PI,1.5*Math.PI,a,o,s)}function rZ(e,t,n,r,i,a){var o=e.parsedStyle,s=o.pointerEvents,l=o.width,c=o.height;if(s==="non-transparent-pixel"){var u=i.config.offscreenCanvas,f=a.offscreenCanvasCreator.getOrCreateCanvas(u),d=a.offscreenCanvasCreator.getOrCreateContext(u,{willReadFrequently:!0});f.width=l,f.height=c,i.defaultStyleRendererFactory[De.IMAGE].render(d,e.parsedStyle,e,void 0,void 0,void 0);var h=d.getImageData(t.x,t.y,1,1).data;return h.every(function(p){return p!==0})}return!0}var iZ=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.name="canvas-picker",n}return t.prototype.init=function(){var n,r=function(){return!0},i=(n={},n[De.CIRCLE]=Hz,n[De.ELLIPSE]=Yz,n[De.RECT]=tZ,n[De.LINE]=Kz,n[De.POLYLINE]=eZ,n[De.POLYGON]=Qz,n[De.PATH]=Jz,n[De.TEXT]=r,n[De.GROUP]=null,n[De.IMAGE]=rZ,n[De.HTML]=null,n[De.MESH]=null,n);this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new Gz)},t.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},t}(Sc),aZ=function(){function e(t){this.canvasRendererPluginOptions=t,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=cr(),this.dprMatrix=cr(),this.tmpMat4=cr(),this.vec3a=le(),this.vec3b=le(),this.vec3c=le(),this.vec3d=le()}return e.prototype.apply=function(t,n){var r=this;this.context=t;var i=t.config,a=t.camera,o=t.renderingService,s=t.renderingContext,l=t.rBushRoot,c=t.pathGeneratorFactory;this.rBush=l,this.pathGeneratorFactory=c;var u=t.contextService,f=s.root.ownerDocument.defaultView,d=function(v){var g=v.target,m=g.rBushNode;m.aabb&&r.removedRBushNodeAABBs.push(m.aabb)},h=function(v){var g=v.target,m=g.rBushNode;m.aabb&&r.removedRBushNodeAABBs.push(m.aabb)};o.hooks.init.tap(e.tag,function(){f.addEventListener(vn.UNMOUNTED,d),f.addEventListener(vn.CULLED,h);var v=u.getDPR(),g=i.width,m=i.height,b=u.getContext();r.clearRect(b,0,0,g*v,m*v,i.background)}),o.hooks.destroy.tap(e.tag,function(){f.removeEventListener(vn.UNMOUNTED,d),f.removeEventListener(vn.CULLED,h),r.renderQueue=[],r.removedRBushNodeAABBs=[],r.restoreStack=[]}),o.hooks.beginFrame.tap(e.tag,function(){var v=u.getContext(),g=u.getDPR(),m=i.width,b=i.height,_=r.canvasRendererPluginOptions,S=_.dirtyObjectNumThreshold,O=_.dirtyObjectRatioThreshold,C=o.getStats(),E=C.total,P=C.rendered,T=P/E;r.clearFullScreen=o.disableDirtyRectangleRendering()||P>S&&T>O,v&&(v.resetTransform?v.resetTransform():v.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(v,0,0,m*g,b*g,i.background))});var p=function(v,g){v.isVisible()&&!v.isCulled()&&(r.renderDisplayObject(v,g,r.context,r.restoreStack,n),r.saveDirtyAABB(v));var m=v.sortable.sorted||v.childNodes;m.forEach(function(b){p(b,g)})};o.hooks.endFrame.tap(e.tag,function(){var v=u.getContext(),g=u.getDPR();if(vo(r.dprMatrix,[g,g,1]),ya(r.vpMatrix,r.dprMatrix,a.getOrthoMatrix()),r.clearFullScreen)p(s.root,v);else{var m=r.safeMergeAABB.apply(r,N([r.mergeDirtyAABBs(r.renderQueue)],w(r.removedRBushNodeAABBs.map(function(re){var he=re.minX,ce=re.minY,ke=re.maxX,ot=re.maxY,xt=new ra;return xt.setMinMax([he,ce,0],[ke,ot,0]),xt})),!1));if(r.removedRBushNodeAABBs=[],ra.isEmpty(m)){r.renderQueue=[];return}var b=r.convertAABB2Rect(m),_=b.x,S=b.y,O=b.width,C=b.height,E=tr(r.vec3a,[_,S,0],r.vpMatrix),P=tr(r.vec3b,[_+O,S,0],r.vpMatrix),T=tr(r.vec3c,[_,S+C,0],r.vpMatrix),A=tr(r.vec3d,[_+O,S+C,0],r.vpMatrix),R=Math.min(E[0],P[0],A[0],T[0]),z=Math.min(E[1],P[1],A[1],T[1]),I=Math.max(E[0],P[0],A[0],T[0]),L=Math.max(E[1],P[1],A[1],T[1]),F=Math.floor(R),Z=Math.floor(z),H=Math.ceil(I-R),W=Math.ceil(L-z);v.save(),r.clearRect(v,F,Z,H,W,i.background),v.beginPath(),v.rect(F,Z,H,W),v.clip(),v.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]);var G=i.renderer.getConfig().enableDirtyRectangleRenderingDebug;G&&f.dispatchEvent(new Gr(Bo.DIRTY_RECTANGLE,{dirtyRect:{x:F,y:Z,width:H,height:W}}));var J=r.searchDirtyObjects(m);J.sort(function(re,he){return re.sortable.renderOrder-he.sortable.renderOrder}).forEach(function(re){re&&re.isVisible()&&!re.isCulled()&&r.renderDisplayObject(re,v,r.context,r.restoreStack,n)}),v.restore(),r.renderQueue.forEach(function(re){r.saveDirtyAABB(re)}),r.renderQueue=[]}r.restoreStack.forEach(function(){v.restore()}),r.restoreStack=[]}),o.hooks.render.tap(e.tag,function(v){r.clearFullScreen||r.renderQueue.push(v)})},e.prototype.clearRect=function(t,n,r,i,a,o){t.clearRect(n,r,i,a),o&&(t.fillStyle=o,t.fillRect(n,r,i,a))},e.prototype.renderDisplayObject=function(t,n,r,i,a){var o=t.nodeName,s=i[i.length-1];s&&!(t.compareDocumentPosition(s)&Aa.DOCUMENT_POSITION_CONTAINS)&&(n.restore(),i.pop());var l=this.context.styleRendererFactory[o],c=this.pathGeneratorFactory[o],u=t.parsedStyle.clipPath;if(u){this.applyWorldTransform(n,u);var f=this.pathGeneratorFactory[u.nodeName];f&&(n.save(),i.push(t),n.beginPath(),f(n,u.parsedStyle),n.closePath(),n.clip())}l&&(this.applyWorldTransform(n,t),n.save(),this.applyAttributesToContext(n,t)),c&&(n.beginPath(),c(n,t.parsedStyle),t.nodeName!==De.LINE&&t.nodeName!==De.PATH&&t.nodeName!==De.POLYLINE&&n.closePath()),l&&(l.render(n,t.parsedStyle,t,r,this,a),n.restore()),t.renderable.dirty=!1},e.prototype.convertAABB2Rect=function(t){var n=t.getMin(),r=t.getMax(),i=Math.floor(n[0]),a=Math.floor(n[1]),o=Math.ceil(r[0]),s=Math.ceil(r[1]),l=o-i,c=s-a;return{x:i,y:a,width:l,height:c}},e.prototype.mergeDirtyAABBs=function(t){var n=new ra;return t.forEach(function(r){var i=r.getRenderBounds();n.add(i);var a=r.renderable.dirtyRenderBounds;a&&n.add(a)}),n},e.prototype.searchDirtyObjects=function(t){var n=w(t.getMin(),2),r=n[0],i=n[1],a=w(t.getMax(),2),o=a[0],s=a[1],l=this.rBush.search({minX:r,minY:i,maxX:o,maxY:s});return l.map(function(c){var u=c.displayObject;return u})},e.prototype.saveDirtyAABB=function(t){var n=t.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new ra);var r=t.getRenderBounds();r&&n.dirtyRenderBounds.update(r.center,r.halfExtents)},e.prototype.applyAttributesToContext=function(t,n){var r=n.parsedStyle,i=r.stroke,a=r.fill,o=r.opacity,s=r.lineDash,l=r.lineDashOffset;s&&t.setLineDash(s),Bt(l)||(t.lineDashOffset=l),Bt(o)||(t.globalAlpha*=o),!Bt(i)&&!Array.isArray(i)&&!i.isNone&&(t.strokeStyle=n.attributes.stroke),!Bt(a)&&!Array.isArray(a)&&!a.isNone&&(t.fillStyle=n.attributes.fill)},e.prototype.applyWorldTransform=function(t,n,r){var i=0,a=0,o=(n.parsedStyle||{}).anchor,s=o&&o[0]||0,l=o&&o[1]||0;if(s!==0||l!==0){var c=n.geometry.contentBounds,u=c&&c.halfExtents[0]*2||0,f=c&&c.halfExtents[1]*2||0;i=-(s*u),a=-(l*f)}r?(Jo(this.tmpMat4,n.getLocalTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,zs(this.tmpMat4,this.tmpMat4,this.vec3a),ya(this.tmpMat4,r,this.tmpMat4),ya(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Jo(this.tmpMat4,n.getWorldTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,zs(this.tmpMat4,this.tmpMat4,this.vec3a),ya(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])},e.prototype.safeMergeAABB=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new ra;return t.forEach(function(i){r.add(i)}),r},e.tag="CanvasRenderer",e}(),Ac=function(){function e(t){this.imagePool=t}return e.prototype.render=function(t,n,r,i,a,o){var s=n.fill,l=n.fillRule,c=n.opacity,u=n.fillOpacity,f=n.stroke,d=n.strokeOpacity,h=n.lineWidth,p=n.lineCap,v=n.lineJoin,g=n.shadowType,m=n.shadowColor,b=n.shadowBlur,_=n.filter,S=n.miterLimit,O=!Bt(s)&&!s.isNone,C=!Bt(f)&&!f.isNone&&h>0,E=s.alpha===0,P=!!(_&&_.length),T=!Bt(m)&&b>0,A=r.nodeName,R=g==="inner",z=C&&T&&(A===De.PATH||A===De.LINE||A===De.POLYLINE||E||R);O&&(t.globalAlpha=c*u,z||xg(r,t,T),this.fill(t,r,s,l,i,a,o),z||this.clearShadowAndFilter(t,P,T)),C&&(t.globalAlpha=c*d,t.lineWidth=h,Bt(S)||(t.miterLimit=S),Bt(p)||(t.lineCap=p),Bt(v)||(t.lineJoin=v),z&&(R&&(t.globalCompositeOperation="source-atop"),xg(r,t,!0),R&&(this.stroke(t,r,f,i,a,o),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,P,!0))),this.stroke(t,r,f,i,a,o))},e.prototype.clearShadowAndFilter=function(t,n,r){if(r&&(t.shadowColor="transparent",t.shadowBlur=0),n){var i=t.filter;!Bt(i)&&i.indexOf("drop-shadow")>-1&&(t.filter=i.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},e.prototype.fill=function(t,n,r,i,a,o,s){var l=this;Array.isArray(r)?r.forEach(function(c){t.fillStyle=l.getColor(c,n,t),i?t.fill(i):t.fill()}):(Fh(r)&&(t.fillStyle=this.getPattern(r,n,t,a,o,s)),i?t.fill(i):t.fill())},e.prototype.stroke=function(t,n,r,i,a,o){var s=this;Array.isArray(r)?r.forEach(function(l){t.strokeStyle=s.getColor(l,n,t),t.stroke()}):(Fh(r)&&(t.strokeStyle=this.getPattern(r,n,t,i,a,o)),t.stroke())},e.prototype.getPattern=function(t,n,r,i,a,o){var s,l;if(t.image.nodeName==="rect"){var c=t.image.parsedStyle,u=c.width,f=c.height;l=i.contextService.getDPR();var d=i.config.offscreenCanvas;s=o.offscreenCanvasCreator.getOrCreateCanvas(d),s.width=u*l,s.height=f*l;var h=o.offscreenCanvasCreator.getOrCreateContext(d),p=[];t.image.forEach(function(g){a.renderDisplayObject(g,h,i,p,o)}),p.forEach(function(){h.restore()})}var v=this.imagePool.getOrCreatePatternSync(t,r,s,l,function(){n.renderable.dirty=!0,i.renderingService.dirtify()});return v},e.prototype.getColor=function(t,n,r){var i;if(t.type===al.LinearGradient||t.type===al.RadialGradient){var a=n.getGeometryBounds(),o=a&&a.halfExtents[0]*2||1,s=a&&a.halfExtents[1]*2||1;i=this.imagePool.getOrCreateGradient(Ie(Ie({type:t.type},t.value),{width:o,height:s}),r)}return i},e}();function xg(e,t,n){var r=e.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,l=r.shadowOffsetY;i&&i.length&&(t.filter=e.style.filter),n&&(t.shadowColor=a.toString(),t.shadowBlur=o||0,t.shadowOffsetX=s||0,t.shadowOffsetY=l||0)}var oZ=function(){function e(t){this.imagePool=t}return e.prototype.render=function(t,n,r){var i=n.width,a=n.height,o=n.img,s=n.shadowColor,l=n.shadowBlur,c,u=i,f=a;if(xi(o)?c=this.imagePool.getImageSync(o):(u||(u=o.width),f||(f=o.height),c=o),c){var d=!Bt(s)&&l>0;xg(r,t,d);try{t.drawImage(c,0,0,u,f)}catch(h){}}},e}(),sZ=function(){function e(){}return e.prototype.render=function(t,n,r,i,a,o){var s=n,l=s.lineWidth,c=s.textAlign,u=s.textBaseline,f=s.lineJoin,d=s.miterLimit,h=s.letterSpacing,p=s.stroke,v=s.fill,g=s.fillOpacity,m=s.strokeOpacity,b=s.opacity,_=s.metrics,S=s.dx,O=s.dy,C=s.shadowColor,E=s.shadowBlur,P=_.font,T=_.lines,A=_.height,R=_.lineHeight,z=_.lineMetrics;t.font=P,t.lineWidth=l,t.textAlign=c==="middle"?"center":c;var I=u;!o.enableCSSParsing&&I==="alphabetic"&&(I="bottom"),t.lineJoin=f,Bt(d)||(t.miterLimit=d);var L=0;u==="middle"?L=-A/2-R/2:u==="bottom"||u==="alphabetic"||u==="ideographic"?L=-A:(u==="top"||u==="hanging")&&(L=-R);var F=S||0;L+=O||0,T.length===1&&(I==="bottom"?(I="middle",L-=.5*A):I==="top"&&(I="middle",L+=.5*A)),t.textBaseline=I;var Z=!Bt(C)&&E>0;xg(r,t,Z);for(var H=0;H<T.length;H++){var W=l/2+F;L+=R,!Bt(p)&&!p.isNone&&l&&this.drawLetterSpacing(t,T[H],z[H],c,W,L,h,g,m,b,!0),Bt(v)||this.drawLetterSpacing(t,T[H],z[H],c,W,L,h,g,m,b)}},e.prototype.drawLetterSpacing=function(t,n,r,i,a,o,s,l,c,u,f){if(f===void 0&&(f=!1),s===0){f?this.strokeText(t,n,a,o,c):this.fillText(t,n,a,o,l,u);return}var d=t.textAlign;t.textAlign="left";var h=a;i==="center"||i==="middle"?h=a-r.width/2:(i==="right"||i==="end")&&(h=a-r.width);for(var p=Array.from(n),v=t.measureText(n).width,g=0,m=0;m<p.length;++m){var b=p[m];f?this.strokeText(t,b,h,o,c):this.fillText(t,b,h,o,l,u),g=t.measureText(n.substring(m+1)).width,h+=v-g+s,v=g}t.textAlign=d},e.prototype.fillText=function(t,n,r,i,a,o){var s,l=!Bt(a)&&a!==1;l&&(s=t.globalAlpha,t.globalAlpha=a*o),t.fillText(n,r,i),l&&(t.globalAlpha=s)},e.prototype.strokeText=function(t,n,r,i,a){var o,s=!Bt(a)&&a!==1;s&&(o=t.globalAlpha,t.globalAlpha=a),t.strokeText(n,r,i),s&&(t.globalAlpha=o)},e}(),Kve=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),qve=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),Jve=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),Qve=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),ege=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),tge=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),nge=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),lZ=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=e.call(this)||this;return r.options=n,r.name="canvas-renderer",r}return t.prototype.init=function(){var n,r=Ie({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),i=this.context.imagePool,a=new Ac(i),o=(n={},n[De.CIRCLE]=a,n[De.ELLIPSE]=a,n[De.RECT]=a,n[De.IMAGE]=new oZ(i),n[De.TEXT]=new sZ,n[De.LINE]=a,n[De.POLYLINE]=a,n[De.POLYGON]=a,n[De.PATH]=a,n[De.GROUP]=void 0,n[De.HTML]=void 0,n[De.MESH]=void 0,n);this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new aZ(r))},t.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},t}(Sc),cZ=function(){function e(){}return e.prototype.apply=function(t,n){var r=this,i=t.renderingService,a=t.renderingContext,o=t.config;this.context=t;var s=a.root.ownerDocument.defaultView,l=function(C){i.hooks.pointerMove.call(C)},c=function(C){i.hooks.pointerUp.call(C)},u=function(C){i.hooks.pointerDown.call(C)},f=function(C){i.hooks.pointerOver.call(C)},d=function(C){i.hooks.pointerOut.call(C)},h=function(C){i.hooks.pointerCancel.call(C)},p=function(C){i.hooks.pointerWheel.call(C)},v=function(C){i.hooks.click.call(C)},g=function(C){n.globalThis.document.addEventListener("pointermove",l,!0),C.addEventListener("pointerdown",u,!0),C.addEventListener("pointerleave",d,!0),C.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",c,!0),n.globalThis.addEventListener("pointercancel",h,!0)},m=function(C){C.addEventListener("touchstart",u,!0),C.addEventListener("touchend",c,!0),C.addEventListener("touchmove",l,!0),C.addEventListener("touchcancel",h,!0)},b=function(C){n.globalThis.document.addEventListener("mousemove",l,!0),C.addEventListener("mousedown",u,!0),C.addEventListener("mouseout",d,!0),C.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",c,!0)},_=function(C){n.globalThis.document.removeEventListener("pointermove",l,!0),C.removeEventListener("pointerdown",u,!0),C.removeEventListener("pointerleave",d,!0),C.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",c,!0)},S=function(C){C.removeEventListener("touchstart",u,!0),C.removeEventListener("touchend",c,!0),C.removeEventListener("touchmove",l,!0),C.removeEventListener("touchcancel",h,!0)},O=function(C){n.globalThis.document.removeEventListener("mousemove",l,!0),C.removeEventListener("mousedown",u,!0),C.removeEventListener("mouseout",d,!0),C.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",c,!0)};i.hooks.init.tap(e.tag,function(){var C=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(C.style.msContentZooming="none",C.style.msTouchAction="none"):s.supportsPointerEvents&&(C.style.touchAction="none"),s.supportsPointerEvents?g(C):b(C),s.supportsTouchEvents&&m(C),o.useNativeClickEvent&&C.addEventListener("click",v,!0),C.addEventListener("wheel",p,{passive:!0,capture:!0})}),i.hooks.destroy.tap(e.tag,function(){var C=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(C.style.msContentZooming="",C.style.msTouchAction=""):s.supportsPointerEvents&&(C.style.touchAction=""),s.supportsPointerEvents?_(C):O(C),s.supportsTouchEvents&&S(C),o.useNativeClickEvent&&C.removeEventListener("click",v,!0),C.removeEventListener("wheel",p,!0)})},e.tag="DOMInteraction",e}(),uZ=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.name="dom-interaction",n}return t.prototype.init=function(){this.addRenderingPlugin(new cZ)},t.prototype.destroy=function(){this.removeAllRenderingPlugins()},t}(Sc),fZ="g-canvas-camera",dZ=function(){function e(){this.displayObjectHTMLElementMap=new WeakMap}return e.prototype.joinTransformMatrix=function(t){return"matrix(".concat([t[0],t[1],t[4],t[5],t[12],t[13]].join(","),")")},e.prototype.apply=function(t,n){var r=this,i=t.camera,a=t.renderingContext,o=t.renderingService;this.context=t;var s=a.root.ownerDocument.defaultView,l=s.context.eventService.nativeHTMLMap,c=function(v,g){g.style.transform=r.joinTransformMatrix(v.getWorldTransform())},u=function(v){var g=v.target;if(g.nodeName===De.HTML){r.$camera||(r.$camera=r.createCamera(i));var m=r.getOrCreateEl(g);if(r.$camera.appendChild(m),n.enableCSSParsing){var b=g.ownerDocument.documentElement.attributes;Object.keys(b).forEach(function(_){m.style[_]=b[_]})}Object.keys(g.attributes).forEach(function(_){r.updateAttribute(_,g)}),c(g,m),l.set(m,g)}},f=function(v){var g=v.target;if(g.nodeName===De.HTML&&r.$camera){var m=r.getOrCreateEl(g);m&&(m.remove(),l.delete(m))}},d=function(v){var g=v.target;if(g.nodeName===De.HTML){var m=v.attrName;r.updateAttribute(m,g)}},h=function(v){var g=v.target;if(g.nodeName===De.HTML){var m=r.getOrCreateEl(g);c(g,m)}},p=function(){if(r.$camera){var v=r.context.config,g=v.width,m=v.height;r.$camera.style.width="".concat(g||0,"px"),r.$camera.style.height="".concat(m||0,"px")}};o.hooks.init.tap(e.tag,function(){s.addEventListener(Bo.RESIZE,p),s.addEventListener(vn.MOUNTED,u),s.addEventListener(vn.UNMOUNTED,f),s.addEventListener(vn.ATTR_MODIFIED,d),s.addEventListener(vn.BOUNDS_CHANGED,h)}),o.hooks.endFrame.tap(e.tag,function(){r.$camera&&a.renderReasons.has(Mc.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),o.hooks.destroy.tap(e.tag,function(){r.$camera&&r.$camera.remove(),s.removeEventListener(Bo.RESIZE,p),s.removeEventListener(vn.MOUNTED,u),s.removeEventListener(vn.UNMOUNTED,f),s.removeEventListener(vn.ATTR_MODIFIED,d),s.removeEventListener(vn.BOUNDS_CHANGED,h)})},e.prototype.createCamera=function(t){var n=this.context.config,r=n.document,i=n.width,a=n.height,o=this.context.contextService.getDomElement(),s=o.parentNode;if(s){var l=fZ,c=s.querySelector("#"+l);if(!c){var u=(r||document).createElement("div");c=u,u.id=l,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.overflow="hidden",u.style.pointerEvents="none",u.style.width="".concat(i||0,"px"),u.style.height="".concat(a||0,"px"),s.appendChild(u)}return c}return null},e.prototype.getOrCreateEl=function(t){var n=this.context.config.document,r=this.displayObjectHTMLElementMap.get(t);return r||(r=(n||document).createElement("div"),t.parsedStyle.$el=r,this.displayObjectHTMLElementMap.set(t,r),t.id&&(r.id=t.id),t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r},e.prototype.updateAttribute=function(t,n){var r=this.getOrCreateEl(n);switch(t){case"innerHTML":var i=n.parsedStyle.innerHTML;xi(i)?r.innerHTML=i:(r.innerHTML="",r.appendChild(i));break;case"transformOrigin":var a=n.parsedStyle.transformOrigin;r.style["transform-origin"]="".concat(a[0].value," ").concat(a[1].value);break;case"width":if(this.context.enableCSSParsing){var o=n.computedStyleMap().get("width");r.style.width=o.toString()}else{var o=n.parsedStyle.width;r.style.width=Gi(o)?"".concat(o,"px"):o.toString()}break;case"height":if(this.context.enableCSSParsing){var s=n.computedStyleMap().get("height");r.style.height=s.toString()}else{var s=n.parsedStyle.height;r.style.height=Gi(s)?"".concat(s,"px"):s.toString()}break;case"zIndex":var l=n.parsedStyle.zIndex;r.style["z-index"]="".concat(l);break;case"visibility":var c=n.parsedStyle.visibility;r.style.visibility=c;break;case"pointerEvents":var u=n.parsedStyle.pointerEvents;r.style.pointerEvents=u;break;case"opacity":var f=n.parsedStyle.opacity;r.style.opacity="".concat(f);break;case"fill":var d=n.parsedStyle.fill,h="";Vv(d)?d.isNone?h="transparent":h=n.getAttribute("fill"):Array.isArray(d)?h=n.getAttribute("fill"):Fh(d),r.style.background=h;break;case"stroke":var p=n.parsedStyle.stroke,v="";Vv(p)?p.isNone?v="transparent":v=n.getAttribute("stroke"):Array.isArray(p)?v=n.getAttribute("stroke"):Fh(p),r.style["border-color"]=v,r.style["border-style"]="solid";break;case"lineWidth":var g=n.parsedStyle.lineWidth;r.style["border-width"]="".concat(g||0,"px");break;case"lineDash":r.style["border-style"]="dashed";break;case"filter":var m=n.style.filter;r.style.filter=m;break;default:t!=="x"&&t!=="y"&&!Bt(n.style[t])&&n.style[t]!==""&&(r.style[t]=n.style[t])}},e.tag="HTMLRendering",e}(),hZ=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.name="html-renderer",n}return t.prototype.init=function(){this.addRenderingPlugin(new dZ)},t.prototype.destroy=function(){this.removeAllRenderingPlugins()},t}(Sc),pZ=function(){function e(t){this.canvasConfig=t,this.imageCache={},this.gradientCache={},this.patternCache={}}return e.prototype.getImageSync=function(t,n){return this.imageCache[t]?n&&n(this.imageCache[t]):this.getOrCreateImage(t).then(function(r){n&&n(r)}),this.imageCache[t]},e.prototype.getOrCreateImage=function(t){var n=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var r=this.canvasConfig.createImage;return new Promise(function(i,a){var o;r?o=r(t):$h&&(o=new window.Image),o&&(o.onload=function(){n.imageCache[t]=o,i(o)},o.onerror=function(s){a(s)},o.crossOrigin="Anonymous",o.src=t)})},e.prototype.getOrCreatePatternSync=function(t,n,r,i,a){var o=this.generatePatternKey(t);if(o&&this.patternCache[o])return this.patternCache[o];var s=t.image,l=t.repetition,c=t.transform,u,f=!1;xi(s)?u=this.getImageSync(s,a):r?(u=r,f=!0):u=s;var d=u&&n.createPattern(u,l);if(d){var h=void 0;c?h=y2(d2(c),new qa({})):h=ms(cr()),f&&Lf(h,h,[1/i,1/i,1]),d.setTransform({a:h[0],b:h[1],c:h[4],d:h[5],e:h[12],f:h[13]})}return o&&d&&(this.patternCache[o]=d),d},e.prototype.getOrCreateGradient=function(t,n){var r=this.generateGradientKey(t),i=t.type,a=t.steps,o=t.width,s=t.height,l=t.angle,c=t.cx,u=t.cy,f=t.size;if(this.gradientCache[r])return this.gradientCache[r];var d=null;if(i===al.LinearGradient){var h=dB(o,s,l),p=h.x1,v=h.y1,g=h.x2,m=h.y2;d=n.createLinearGradient(p,v,g,m)}else if(i===al.RadialGradient){var b=hB(o,s,c,u,f),_=b.x,S=b.y,O=b.r;d=n.createRadialGradient(_,S,0,_,S,O)}return d&&(a.forEach(function(C){var E=C.offset,P=C.color;E.unit===At.kPercentage&&(d==null||d.addColorStop(E.value/100,P.toString()))}),this.gradientCache[r]=d),this.gradientCache[r]},e.prototype.generateGradientKey=function(t){var n=t.type,r=t.width,i=t.height,a=t.steps,o=t.angle,s=t.cx,l=t.cy,c=t.size;return"gradient-".concat(n,"-").concat((o==null?void 0:o.toString())||0,"-").concat((s==null?void 0:s.toString())||0,"-").concat((l==null?void 0:l.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat(r,"-").concat(i,"-").concat(a.map(function(u){var f=u.offset,d=u.color;return"".concat(f).concat(d)}).join("-"))},e.prototype.generatePatternKey=function(t){var n=t.image,r=t.repetition;if(xi(n))return"pattern-".concat(n,"-").concat(r);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(r)},e}(),vZ=function(){function e(){}return e.prototype.apply=function(t){var n=t.renderingService,r=t.renderingContext,i=t.imagePool,a=r.root.ownerDocument.defaultView,o=function(c,u,f){var d=c.parsedStyle,h=d.width,p=d.height;h&&!p?c.setAttribute("height",f/u*h):!h&&p&&c.setAttribute("width",u/f*p)},s=function(c){var u=c.target,f=u.nodeName,d=u.attributes;if(f===De.IMAGE){var h=d.img,p=d.keepAspectRatio;xi(h)&&i.getImageSync(h,function(v){var g=v.width,m=v.height;p&&o(u,g,m),u.renderable.dirty=!0,n.dirtify()})}},l=function(c){var u=c.target,f=c.attrName,d=c.newValue;u.nodeName===De.IMAGE&&f==="img"&&xi(d)&&i.getOrCreateImage(d).then(function(h){var p=h.width,v=h.height;u.attributes.keepAspectRatio&&o(u,p,v),u.renderable.dirty=!0,n.dirtify()})};n.hooks.init.tap(e.tag,function(){a.addEventListener(vn.MOUNTED,s),a.addEventListener(vn.ATTR_MODIFIED,l)}),n.hooks.destroy.tap(e.tag,function(){a.removeEventListener(vn.MOUNTED,s),a.removeEventListener(vn.ATTR_MODIFIED,l)})},e.tag="LoadImage",e}(),gZ=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.name="image-loader",n}return t.prototype.init=function(){this.context.imagePool=new pZ(this.context.config),this.addRenderingPlugin(new vZ)},t.prototype.destroy=function(){this.removeAllRenderingPlugins()},t}(Sc),mZ=function(){function e(t){this.renderingContext=t.renderingContext,this.canvasConfig=t.config}return e.prototype.init=function(){var t=this.canvasConfig,n=t.container,r=t.canvas;if(r)this.$canvas=r,n&&r.parentElement!==n&&n.appendChild(r),this.$container=r.parentElement,this.canvasConfig.container=this.$container;else if(n&&(this.$container=xi(n)?document.getElementById(n):n,this.$container)){var i=document.createElement("canvas");this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)},e.prototype.getContext=function(){return this.context},e.prototype.getDomElement=function(){return this.$canvas},e.prototype.getDPR=function(){return this.dpr},e.prototype.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.prototype.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.prototype.resize=function(t,n){var r=this.canvasConfig.devicePixelRatio,i=r||$h&&window.devicePixelRatio||1;i=i>=1?Math.ceil(i):1,this.dpr=i,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*n,_9(this.$canvas,t,n)),this.renderingContext.renderReasons.add(Mc.CAMERA_CHANGED)},e.prototype.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.prototype.toDataURL=function(t){return t===void 0&&(t={}),el(this,void 0,void 0,function(){var n,r;return Il(this,function(i){return n=t.type,r=t.encoderOptions,[2,this.context.canvas.toDataURL(n,r)]})})},e}(),yZ=function(e){zt(t,e);function t(){var n=e.apply(this,N([],w(arguments),!1))||this;return n.name="canvas-context-register",n}return t.prototype.init=function(){this.context.ContextService=mZ},t.prototype.destroy=function(){delete this.context.ContextService},t}(Sc),XM=function(e){zt(t,e);function t(n){var r=e.call(this,n)||this;return r.registerPlugin(new yZ),r.registerPlugin(new gZ),r.registerPlugin(new Bz),r.registerPlugin(new lZ),r.registerPlugin(new uZ),r.registerPlugin(new iZ),r.registerPlugin(new hZ),r}return t}(jF),bZ=function(){function e(t){this.dragndropPluginOptions=t}return e.prototype.apply=function(t){var n=this,r=t.renderingService,i=t.renderingContext,a=i.root.ownerDocument,o=a.defaultView,s=function(l){var c=l.target,u=c===a,f=u&&n.dragndropPluginOptions.isDocumentDraggable?a:c.closest&&c.closest("[draggable=true]");if(f){var d=!1,h=l.timeStamp,p=[l.clientX,l.clientY],v=null,g=[l.clientX,l.clientY],m=function(_){return el(n,void 0,void 0,function(){var S,O,C,E,P,T;return Il(this,function(A){switch(A.label){case 0:if(!d){if(S=_.timeStamp-h,O=ko([_.clientX,_.clientY],p),S<=this.dragndropPluginOptions.dragstartTimeThreshold||O<=this.dragndropPluginOptions.dragstartDistanceThreshold)return[2];_.type="dragstart",f.dispatchEvent(_),d=!0}return _.type="drag",_.dx=_.clientX-g[0],_.dy=_.clientY-g[1],f.dispatchEvent(_),g=[_.clientX,_.clientY],u?[3,2]:(C=this.dragndropPluginOptions.overlap==="pointer"?[_.canvasX,_.canvasY]:c.getBounds().center,[4,a.elementsFromPoint(C[0],C[1])]);case 1:E=A.sent(),P=E[E.indexOf(c)+1],T=(P==null?void 0:P.closest("[droppable=true]"))||(this.dragndropPluginOptions.isDocumentDroppable?a:null),v!==T&&(v&&(_.type="dragleave",_.target=v,v.dispatchEvent(_)),T&&(_.type="dragenter",_.target=T,T.dispatchEvent(_)),v=T,v&&(_.type="dragover",_.target=v,v.dispatchEvent(_))),A.label=2;case 2:return[2]}})})};o.addEventListener("pointermove",m);var b=function(_){if(d){_.detail={preventClick:!0};var S=_.clone();v&&(S.type="drop",S.target=v,v.dispatchEvent(S)),S.type="dragend",f.dispatchEvent(S),d=!1}o.removeEventListener("pointermove",m)};c.addEventListener("pointerup",b,{once:!0}),c.addEventListener("pointerupoutside",b,{once:!0})}};r.hooks.init.tap(e.tag,function(){o.addEventListener("pointerdown",s)}),r.hooks.destroy.tap(e.tag,function(){o.removeEventListener("pointerdown",s)})},e.tag="Dragndrop",e}(),KM=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=e.call(this)||this;return r.options=n,r.name="dragndrop",r}return t.prototype.init=function(){this.addRenderingPlugin(new bZ(Ie({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},t.prototype.destroy=function(){this.removeAllRenderingPlugins()},t.prototype.setOptions=function(n){Object.assign(this.plugins[0].dragndropPluginOptions,n)},t}(Sc);function xZ(e,t,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}var qM=xZ,_Z=function(e){return typeof e=="object"&&e!==null},Z2=_Z,wZ=function(e){if(!Z2(e)||!Ah(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},zl=wZ,SZ=5;function OZ(e,t){if(Object.hasOwn)return Object.hasOwn(e,t);if(e==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}function JM(e,t,n,r){n=n||0,r=r||SZ;for(var i in t)if(OZ(t,i)){var a=t[i];a!==null&&zl(a)?(zl(e[i])||(e[i]={}),n<r?JM(e[i],a,n+1,r):e[i]=t[i]):ua(a)?(e[i]=[],e[i]=e[i].concat(a)):a!==void 0&&(e[i]=a)}}var CZ=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r+=1)JM(e,t[r]);return e},Je=CZ;class EZ extends Map{constructor(t,n=tP){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get($2(this,t))}has(t){return super.has($2(this,t))}set(t,n){return super.set(QM(this,t),n)}delete(t){return super.delete(eP(this,t))}}class rge extends null{constructor(t,n=tP){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const r of t)this.add(r)}has(t){return super.has($2(this,t))}add(t){return super.add(QM(this,t))}delete(t){return super.delete(eP(this,t))}}function $2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function QM({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function eP({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function tP(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Xh(e){return e}function _i(e,...t){return Kf(e,Xh,Xh,t)}function _g(e,...t){return Kf(e,Array.from,Xh,t)}function nP(e,t){for(let n=1,r=t.length;n<r;++n)e=e.flatMap(i=>i.pop().map(([a,o])=>[...i,a,o]));return e}function ige(e,...t){return nP(_g(e,...t),t)}function age(e,t,...n){return nP(G2(e,t,...n),n)}function W2(e,t,...n){return Kf(e,Xh,t,n)}function G2(e,t,...n){return Kf(e,Array.from,t,n)}function oge(e,...t){return Kf(e,identity,rP,t)}function sge(e,...t){return Kf(e,Array.from,rP,t)}function rP(e){if(e.length!==1)throw new Error("duplicate key");return e[0]}function Kf(e,t,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new EZ,l=r[o++];let c=-1;for(const u of a){const f=l(u,++c,a),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,o));return t(s)}(e,0)}var iP=function(e){return Bt(e)?"":e.toString()},MZ=function(e){var t=iP(e);return t.charAt(0).toLowerCase()+t.substring(1)},aP=MZ,PZ=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};function Au(e){return e}function H2(e){return e.reduce((t,n)=>(r,...i)=>n(t(r,...i),...i),Au)}function TZ(e){return e.reduce((t,n)=>r=>PZ(this,void 0,void 0,function*(){const i=yield t(r);return n(i)}),Au)}function Y2(e){return e.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function qf(e=""){throw new Error(e)}function V2(e,t){const{attributes:n}=t,r=new Set(["id","className"]);for(const[i,a]of Object.entries(n))r.has(i)||(i==="transform"&&e.attr(i,""),e.attr(i,a))}function qr(e){return e!=null&&!Number.isNaN(e)}function lge(e,t){return e+(t-e)*Math.random()}function AZ(e){const t=new Map;return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}function RZ(e,t){const{transform:n}=e.style,i=(a=>a==="none"||a===void 0)(n)?"":n;e.style.transform=`${i} ${t}`.trimStart()}function Tt(e,t){return oP(e,t)||{}}function oP(e,t){const n=Object.entries(e||{}).filter(([r])=>r.startsWith(t)).map(([r,i])=>[aP(r.replace(t,"").trim()),i]).filter(([r])=>!!r);return n.length===0?null:Object.fromEntries(n)}function cge(e,t){return Object.fromEntries(Object.entries(e).map(([n,r])=>[`${t}${upperFirst(n)}`,r]))}function IZ(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t.find(r=>n.startsWith(r))))}function U2(e,...t){return Object.fromEntries(Object.entries(e).filter(([n])=>t.every(r=>!n.startsWith(r))))}function sP(e,t){if(e===void 0)return null;if(typeof e=="number")return e;const n=+e.replace("%","");return Number.isNaN(n)?null:n/100*t}function Kh(e){return typeof e=="object"&&!(e instanceof Date)&&e!==null&&!Array.isArray(e)}function Zl(e){return e===null||e===!1}function lP(e,t,n=5,r=0){if(!(r>=n)){for(const i of Object.keys(t)){const a=t[i];!zl(a)||!zl(e[i])?e[i]=a:lP(e[i],a,n,r+1)}return e}}function gn(e){return new ia([e],null,e,e.ownerDocument)}class ia{constructor(t=null,n=null,r=null,i=null,a=[null,null,null,null,null],o=[],s=[]){this._elements=Array.from(t),this._data=n,this._parent=r,this._document=i,this._enter=a[0],this._update=a[1],this._exit=a[2],this._merge=a[3],this._split=a[4],this._transitions=o,this._facetElements=s}selectAll(t){const n=typeof t=="string"?this._parent.querySelectorAll(t):t;return new ia(n,null,this._elements[0],this._document)}selectFacetAll(t){const n=typeof t=="string"?this._parent.querySelectorAll(t):t;return new ia(this._elements,null,this._parent,this._document,void 0,void 0,n)}select(t){const n=typeof t=="string"?this._parent.querySelectorAll(t)[0]||null:t;return new ia([n],null,n,this._document)}append(t){const n=typeof t=="function"?t:()=>this.createElement(t),r=[];if(this._data!==null){for(let i=0;i<this._data.length;i++){const a=this._data[i],[o,s]=Array.isArray(a)?a:[a,null],l=n(o,i);l.__data__=o,s!==null&&(l.__fromElements__=s),this._parent.appendChild(l),r.push(l)}return new ia(r,null,this._parent,this._document)}else{for(let i=0;i<this._elements.length;i++){const a=this._elements[i],o=a.__data__,s=n(o,i);a.appendChild(s),r.push(s)}return new ia(r,null,r[0],this._document)}}maybeAppend(t,n,r){const i=this._elements[0],a=i.getElementById(t);if(a)return new ia([a],null,this._parent,this._document);const o=typeof n=="string"?this.createElement(n):n();return o.id=t,r&&(o.className=r),i.appendChild(o),new ia([o],null,this._parent,this._document)}data(t,n=i=>i,r=()=>null){const i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((h,p)=>[n(h.__data__,p),h])),u=new Map(this._facetElements.map((h,p)=>[n(h.__data__,p),h])),f=_i(this._elements,h=>r(h.__data__));for(let h=0;h<t.length;h++){const p=t[h],v=n(p,h),g=r(p,h);if(c.has(v)){const m=c.get(v);m.__data__=p,m.__facet__=!1,a.push(m),o.delete(m),c.delete(v)}else if(u.has(v)){const m=u.get(v);m.__data__=p,m.__facet__=!0,a.push(m),u.delete(v)}else if(f.has(v)){const m=f.get(v);s.push([p,m]);for(const b of m)o.delete(b);f.delete(v)}else if(c.has(g)){const m=c.get(g);m.__toData__?m.__toData__.push(p):m.__toData__=[p],l.add(m),o.delete(m)}else i.push(p)}const d=[new ia([],i,this._parent,this._document),new ia(a,null,this._parent,this._document),new ia(o,null,this._parent,this._document),new ia([],s,this._parent,this._document),new ia(l,null,this._parent,this._document)];return new ia(this._elements,null,this._parent,this._document,d)}merge(t){const n=[...this._elements,...t._elements],r=[...this._transitions,...t._transitions];return new ia(n,null,this._parent,this._document,void 0,r)}createElement(t){if(this._document)return this._document.createElement(t,{});const n=ia.registry[t];return n?new n:qf(`Unknown node type: ${t}`)}join(t=o=>o,n=o=>o,r=o=>o.remove(),i=o=>o,a=o=>o.remove()){const o=t(this._enter),s=n(this._update),l=r(this._exit),c=i(this._merge),u=a(this._split);return s.merge(o).merge(l).merge(c).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._transitions[t];if(n){const r=Array.isArray(n)?n:[n];Promise.all(r.map(i=>i.finished)).then(()=>{this._elements[t].remove()})}else this._elements[t].remove()}return new ia([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let n=0;n<this._elements.length;n++){const r=this._elements[n],i=r.__data__;t(i,n,r)}return this}attr(t,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o[t]=r(i,a,o))})}style(t,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o.style[t]=r(i,a,o))})}transition(t){const n=typeof t!="function"?()=>t:t,{_transitions:r}=this;return this.each(function(i,a,o){r[a]=n(i,a,o)})}on(t,n){return this.each(function(r,i,a){a.addEventListener(t,n)}),this}call(t,...n){return t(this,...n),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}ia.registry={g:xa,rect:Pu,circle:Mu,path:Ja,text:rs,ellipse:O2,image:C2,line:Gh,polygon:Hh,polyline:E2,html:tg};const kr={BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CHANGE_DATA:"beforechangedata",AFTER_CHANGE_DATA:"afterchangedata",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"};var LZ=function(e){var t=iP(e);return t.charAt(0).toUpperCase()+t.substring(1)},Rc=LZ;function NZ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function wg(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function kZ(e){return e=wg(Math.abs(e)),e?e[1]:NaN}function jZ(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function DZ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var FZ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function X2(e){if(!(t=FZ.exec(e)))throw new Error("invalid format: "+e);var t;return new K2({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}X2.prototype=K2.prototype;function K2(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}K2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function BZ(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var cP;function zZ(e,t){var n=wg(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(cP=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+wg(e,Math.max(0,t+a-1))[0]}function uP(e,t){var n=wg(e,t);if(!n)return e+"";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")}var fP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:NZ,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>uP(e*100,t),r:uP,s:zZ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dP(e){return e}var hP=Array.prototype.map,pP=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function ZZ(e){var t=e.grouping===void 0||e.thousands===void 0?dP:jZ(hP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?dP:DZ(hP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=X2(f);var d=f.fill,h=f.align,p=f.sign,v=f.symbol,g=f.zero,m=f.width,b=f.comma,_=f.precision,S=f.trim,O=f.type;O==="n"?(b=!0,O="g"):fP[O]||(_===void 0&&(_=12),S=!0,O="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",E=v==="$"?r:/[%p]/.test(O)?o:"",P=fP[O],T=/[defgprs%]/.test(O);_=_===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function A(R){var z=C,I=E,L,F,Z;if(O==="c")I=P(R)+I,R="";else{R=+R;var H=R<0||1/R<0;if(R=isNaN(R)?l:P(Math.abs(R),_),S&&(R=BZ(R)),H&&+R==0&&p!=="+"&&(H=!1),z=(H?p==="("?p:s:p==="-"||p==="("?"":p)+z,I=(O==="s"?pP[8+cP/3]:"")+I+(H&&p==="("?")":""),T){for(L=-1,F=R.length;++L<F;)if(Z=R.charCodeAt(L),48>Z||Z>57){I=(Z===46?i+R.slice(L+1):R.slice(L))+I,R=R.slice(0,L);break}}}b&&!g&&(R=t(R,1/0));var W=z.length+R.length+I.length,G=W<m?new Array(m-W+1).join(d):"";switch(b&&g&&(R=t(G+R,G.length?m-I.length:1/0),G=""),h){case"<":R=z+R+I+G;break;case"=":R=z+G+R+I;break;case"^":R=G.slice(0,W=G.length>>1)+z+R+I+G.slice(W);break;default:R=G+z+R+I;break}return a(R)}return A.toString=function(){return f+""},A}function u(f,d){var h=c((f=X2(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(kZ(d)/3)))*3,v=Math.pow(10,-p),g=pP[8+p/3];return function(m){return h(v*m)+g}}return{format:c,formatPrefix:u}}var Sg,Ic,$Z;WZ({thousands:",",grouping:[3],currency:["$",""]});function WZ(e){return Sg=ZZ(e),Ic=Sg.format,$Z=Sg.formatPrefix,Sg}function Lc(e,t){return Object.entries(e).reduce((n,[r,i])=>(n[r]=t(i,r,e),n),{})}function Ru(e){return e.map((t,n)=>n)}function uge(e){const t=e.length,n=e[0].length,r=new Array(n).fill(0).map(()=>new Array(t));for(let i=0;i<n;i++)for(let a=0;a<t;a++)r[i][a]=e[a][i];return r}function GZ(e){return e[0]}function vP(e){return e[e.length-1]}function fge(e){return!e.some(Array.isArray)}function HZ(e){return Array.from(new Set(e))}function gP(e,t){const n=[[],[]];return e.forEach(r=>{n[t(r)?0:1].push(r)}),n}function mP(e,t=e.length){if(t===1)return e.map(r=>[r]);const n=[];for(let r=0;r<e.length;r++){const i=e.slice(r+1);mP(i,t-1).forEach(o=>{n.push([e[r],...o])})}return n}function YZ(e){if(e.length===1)return[e];const t=[];for(let n=1;n<=e.length;n++)t.push(...mP(e,n));return t}var VZ=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)},qh=VZ,q2=function(e,t){if(e===t)return!0;if(!e||!t||xi(e)||xi(t))return!1;if(qh(e)||qh(t)){if(e.length!==t.length)return!1;for(var n=!0,r=0;r<e.length&&(n=q2(e[r],t[r]),!!n);r++);return n}if(Z2(e)||Z2(t)){var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=q2(e[i[r]],t[i[r]]),!!n);r++);return n}return!1},yP=q2;function ws(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function jr(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function dge(e){return e*Math.PI/180}function hge(e){return e*180/Math.PI}function UZ(e,t){return e=e%(2*Math.PI),t=t%(2*Math.PI),e<0&&(e=2*Math.PI+e),t<0&&(t=2*Math.PI+t),e>=t&&(t=t+2*Math.PI),{startAngle:e,endAngle:t}}const bP=(e={})=>{const t={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},t),e);return Object.assign(Object.assign({},n),UZ(n.startAngle,n.endAngle))},Jh=e=>{const{startAngle:t,endAngle:n,innerRadius:r,outerRadius:i}=bP(e);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,n,r,i]]};Jh.props={};const xP=(e={})=>{const t={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},t),e)},J2=e=>{const{startAngle:t,endAngle:n,innerRadius:r,outerRadius:i}=xP(e);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Jh({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i})]};J2.props={};function Og(e,t,n){return Math.max(t,Math.min(e,n))}function Cg(e,t=10){return typeof e!="number"||Math.abs(e)<1e-15?e:parseFloat(e.toFixed(t))}const XZ=[["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"]]]]];var _P=Y(17816);function ci(e){const{transformations:t}=e.getOptions();return t.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function Jr(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="polar")}function Qh(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="reflect")&&t.some(([n])=>n.startsWith("transpose"))}function wP(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="helix")}function ep(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="parallel")}function SP(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="fisheye")}function KZ(e){return ep(e)&&Jr(e)}function Jf(e){return wP(e)||Jr(e)}function OP(e){return Jr(e)&&ci(e)}function pge(e){return Jr(e)||ep(e)||Qh(e)||OP(e)}function qZ(e){if(Jf(e)){const[t,n]=e.getSize(),r=e.getOptions().transformations.find(i=>i[0]==="polar");if(r)return Math.max(t,n)/2*r[4]}return 0}function Eg(e){const{transformations:t}=e.getOptions(),[,,,n,r]=t.find(i=>i[0]==="polar");return[+n,+r]}function Q2(e,t=!0){const{transformations:n}=e.getOptions(),[,r,i]=n.find(a=>a[0]==="polar");return t?[+r*180/Math.PI,+i*180/Math.PI]:[r,i]}function JZ(e,t){const{transformations:n}=e.getOptions(),[,...r]=n.find(i=>i[0]===t);return r}function CP(e,t){t(e),e.children&&e.children.forEach(function(n){n&&CP(n,t)})}function tp(e){Mg(e,!0)}function Nc(e){Mg(e,!1)}function Mg(e,t){var n=t?"visible":"hidden";CP(e,function(r){r.attr("visibility",n)})}function QZ(e){return typeof e=="boolean"?!1:"enter"in e&&"update"in e&&"exit"in e}function EP(e){if(!e)return{enter:!1,update:!1,exit:!1};var t=["enter","update","exit"],n=Object.fromEntries(Object.entries(e).filter(function(r){var i=w(r,1),a=i[0];return!t.includes(a)}));return Object.fromEntries(t.map(function(r){return QZ(e)?e[r]===!1?[r,!1]:[r,Ie(Ie({},e[r]),n)]:[r,n]}))}function Qf(e,t){e?e.finished.then(t):t()}function e$(e,t){e.length===0?t():Promise.all(e.map(function(n){return n==null?void 0:n.finished})).then(t)}function MP(e,t){"update"in e?e.update(t):e.attr(t)}function PP(e,t,n){if(t.length===0)return null;if(!n){var r=t.slice(-1)[0];return MP(e,{style:r}),null}return e.animate(t,n)}function t$(e,t){return!(e.nodeName!=="text"||t.nodeName!=="text"||e.attributes.text!==t.attributes.text)}function n$(e,t,n,r){if(r===void 0&&(r="destroy"),t$(e,t))return e.remove(),[null];var i=function(){r==="destroy"?e.destroy():r==="hide"&&Nc(e),t.isVisible()&&tp(t)};if(!n)return i(),[null];var a=n.duration,o=a===void 0?0:a,s=n.delay,l=s===void 0?0:s,c=Math.ceil(+o/2),u=+o/4,f=function(R){if(R.nodeName==="circle"){var z=w(R.getLocalPosition(),2),I=z[0],L=z[1],F=R.attr("r");return[I-F,L-F]}return R.getLocalPosition()},d=w(f(e),2),h=d[0],p=d[1],v=w(f(t),2),g=v[0],m=v[1],b=w([(h+g)/2-h,(p+m)/2-p],2),_=b[0],S=b[1],O=e.style.opacity,C=O===void 0?1:O,E=t.style.opacity,P=E===void 0?1:E,T=e.animate([{opacity:C,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(_,", ").concat(S,")")}],Ie(Ie({fill:"both"},n),{duration:l+c+u})),A=t.animate([{opacity:0,transform:"translate(".concat(-_,", ").concat(-S,")"),offset:.01},{opacity:P,transform:"translate(0, 0)"}],Ie(Ie({fill:"both"},n),{duration:c+u,delay:l+c-u}));return Qf(A,i),[T,A]}function Gs(e,t,n){var r={},i={};return Object.entries(t).forEach(function(a){var o=w(a,2),s=o[0],l=o[1];if(!Bt(l)){var c=e.style[s]||e.parsedStyle[s]||0;c!==l&&(r[s]=c,i[s]=l)}}),n?PP(e,[r,i],Ie({fill:"both"},n)):(MP(e,i),null)}var r$=5,TP=function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=r$),Object.entries(t).forEach(function(i){var a=w(i,2),o=a[0],s=a[1],l=e;Object.prototype.hasOwnProperty.call(t,o)&&(s?zl(s)?(zl(e[o])||(l[o]={}),n<r?TP(e[o],s,n+1,r):l[o]=t[o]):ua(s)?(l[o]=[],l[o]=l[o].concat(s)):l[o]=s:l[o]=s)})},$l=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r+=1)TP(e,t[r]);return e},i$=function(e){zt(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,N([],w(n),!1))||this;return i.addEventListener(vn.INSERTED,function(){Nc(i)}),i}return t}(xa);function AP(e){var t=e.appendChild(new i$({class:"offscreen"}));return Nc(t),t}function a$(e){for(var t=e;t;){if(t.className==="offscreen")return!0;t=t.parent}return!1}function o$(){Mg(this,this.attributes.visibility!=="hidden")}var Ra=function(e){zt(t,e);function t(n,r){r===void 0&&(r={});var i=e.call(this,$l({},{style:r},n))||this;return i.initialized=!1,i._defaultOptions=r,i}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=AP(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),t.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},t.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},t.prototype.attributeChangedCallback=function(n){n==="visibility"&&o$.call(this)},t.prototype.update=function(n,r){var i;return this.attr($l({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},t.prototype.clear=function(){this.removeChildren()},t.prototype.bindEvents=function(n,r){},t.prototype.getSubShapeStyle=function(n){var r=n.x,i=n.y,a=n.transform,o=n.transformOrigin,s=n.class,l=n.className,c=n.zIndex,u=Sr(n,["x","y","transform","transformOrigin","class","className","zIndex"]);return u},t}(eg);function zo(e,t,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),e?n(t):(r&&i(t),null)}function s$(e,t){if(e.length<=t)return e;for(var n=Math.floor(e.length/t),r=[],i=0;i<e.length;i+=n)r.push(e[i]);return r}var e_=function(e){zt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sr(n,["style"]);return e.call(this,Ie({style:Ie({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},r)},i))||this}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=AP(this)),this._offscreen},enumerable:!1,configurable:!0}),t.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},t}(rs);function l$(e,t){var n=new Map;return e.forEach(function(r){var i=t(r);n.has(i)||n.set(i,[]),n.get(i).push(r)}),n}function c$(e){throw new Error(e)}var u$=function(){function e(i,a,o,s,l,c,u){i===void 0&&(i=null),a===void 0&&(a=null),o===void 0&&(o=null),s===void 0&&(s=null),l===void 0&&(l=[null,null,null,null,null]),c===void 0&&(c=[]),u===void 0&&(u=[]),t.add(this),this._elements=Array.from(i),this._data=a,this._parent=o,this._document=s,this._enter=l[0],this._update=l[1],this._exit=l[2],this._merge=l[3],this._split=l[4],this._transitions=c,this._facetElements=u}e.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(a,null,this._elements[0],this._document)},e.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(this._elements,null,this._parent,this._document,void 0,void 0,a)},e.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new n([a],null,a,this._document)},e.prototype.append=function(i){var a=this,o=typeof i=="function"?i:function(){return a.createElement(i)},s=[];if(this._data!==null){for(var l=0;l<this._data.length;l++){var c=this._data[l],u=w(Array.isArray(c)?c:[c,null],2),f=u[0],d=u[1],h=o(f,l);h.__data__=f,d!==null&&(h.__fromElements__=d),this._parent.appendChild(h),s.push(h)}return new n(s,null,this._parent,this._document)}for(var l=0;l<this._elements.length;l++){var p=this._elements[l],f=p.__data__,h=o(f,l);p.appendChild(h),s.push(h)}return new n(s,null,s[0],this._document)},e.prototype.maybeAppend=function(i,a){var o=de(this,t,"m",r).call(this,i[0]==="#"?i:"#".concat(i),a);return o.attr("id",i),o},e.prototype.maybeAppendByClassName=function(i,a){var o=i.toString(),s=de(this,t,"m",r).call(this,o[0]==="."?o:".".concat(o),a);return s.attr("className",o),s},e.prototype.maybeAppendByName=function(i,a){var o=de(this,t,"m",r).call(this,'[name="'.concat(i,'"]'),a);return o.attr("name",i),o},e.prototype.data=function(i,a,o){var s,l;a===void 0&&(a=function(A){return A}),o===void 0&&(o=function(){return null});for(var c=[],u=[],f=new Set(this._elements),d=[],h=new Set,p=new Map(this._elements.map(function(A,R){return[a(A.__data__,R),A]})),v=new Map(this._facetElements.map(function(A,R){return[a(A.__data__,R),A]})),g=l$(this._elements,function(A){return o(A.__data__)}),m=0;m<i.length;m++){var b=i[m],_=a(b,m),S=o(b,m);if(p.has(_)){var O=p.get(_);O.__data__=b,O.__facet__=!1,u.push(O),f.delete(O),p.delete(_)}else if(v.has(_)){var O=v.get(_);O.__data__=b,O.__facet__=!0,u.push(O),v.delete(_)}else if(g.has(_)){var C=g.get(_);d.push([b,C]);try{for(var E=(s=void 0,M(C)),P=E.next();!P.done;P=E.next()){var O=P.value;f.delete(O)}}catch(A){s={error:A}}finally{try{P&&!P.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}g.delete(_)}else if(p.has(S)){var O=p.get(S);O.__toData__?O.__toData__.push(b):O.__toData__=[b],h.add(O),f.delete(O)}else c.push(b)}var T=[new n([],c,this._parent,this._document),new n(u,null,this._parent,this._document),new n(f,null,this._parent,this._document),new n([],d,this._parent,this._document),new n(h,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,T)},e.prototype.merge=function(i){var a=N(N([],w(this._elements),!1),w(i._elements),!1),o=N(N([],w(this._transitions),!1),w(i._transitions),!1);return new n(a,null,this._parent,this._document,void 0,o)},e.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=n.registry[i];return a?new a:c$("Unknown node type: ".concat(i))},e.prototype.join=function(i,a,o,s,l){i===void 0&&(i=function(p){return p}),a===void 0&&(a=function(p){return p}),o===void 0&&(o=function(p){return p.remove()}),s===void 0&&(s=function(p){return p}),l===void 0&&(l=function(p){return p.remove()});var c=i(this._enter),u=a(this._update),f=o(this._exit),d=s(this._merge),h=l(this._split);return u.merge(c).merge(f).merge(d).merge(h)},e.prototype.remove=function(){for(var i=function(s){var l=a._elements[s],c=a._transitions[s];c?c.then(function(){return l.remove()}):l.remove()},a=this,o=0;o<this._elements.length;o++)i(o);return new n([],null,this._parent,this._document,void 0,this._transitions)},e.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var o=this._elements[a],s=o.__data__;i.call(o,s,a)}return this},e.prototype.attr=function(i,a){var o=typeof a!="function"?function(){return a}:a;return this.each(function(s,l){a!==void 0&&(this[i]=o.call(this,s,l))})},e.prototype.style=function(i,a,o){o===void 0&&(o=!0);var s=typeof a!="function"||!o?function(){return a}:a;return this.each(function(l,c){a!==void 0&&(this.style[i]=s.call(this,l,c))})},e.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(o,s){var l=this;Object.entries(i).forEach(function(c){var u=w(c,2),f=u[0],d=u[1],h=typeof d!="function"||!a?function(){return d}:d;d!==void 0&&l.attr(f,h.call(l,o,s))})})},e.prototype.update=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,l){i&&this.update&&this.update(o.call(this,s,l))})},e.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,l){i&&this.update&&this.update(o.call(this,s,l))})},e.prototype.transition=function(i){var a=this._transitions;return this.each(function(o,s){a[s]=i.call(this,o,s)})},e.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},e.prototype.call=function(i){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];return i.call.apply(i,N([this._parent,this],w(a),!1)),this},e.prototype.node=function(){return this._elements[0]},e.prototype.nodes=function(){return this._elements},e.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},e.prototype.parent=function(){return this._parent};var t,n,r;return n=e,t=new WeakSet,r=function(a,o){var s=this._elements[0],l=s.querySelector(a);if(l)return new n([l],null,this._parent,this._document);var c=typeof o=="string"?this.createElement(o):o();return s.appendChild(c),new n([c],null,this._parent,this._document)},e.registry={g:xa,rect:Pu,circle:Mu,path:Ja,text:e_,ellipse:O2,image:C2,line:Gh,polygon:Hh,polyline:E2,html:tg},e}();function Tn(e){return new u$([e],null,e,e.ownerDocument)}function f$(e,t,n){return e.querySelector(t)?Tn(e).select(t):Tn(e).append(n)}var Ss=function(e,t){var n=function(i){return"".concat(t,"-").concat(i)},r=Object.fromEntries(Object.entries(e).map(function(i){var a=w(i,2),o=a[0],s=a[1],l=n(s);return[o,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(r,{prefix:n}),r},t_={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 Ja({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",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:[]},vge=Je({},t_,{style:{type:"arc"}}),gge=Je({},t_,{style:{}}),Br=Ss({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"),bo=function(e){return typeof e=="function"};function Wl(e,t){return[e[0]*t,e[1]*t]}function np(e,t){return[e[0]+t[0],e[1]+t[1]]}function n_(e,t){return[e[0]-t[0],e[1]-t[1]]}function Iu(e,t){return[Math.min(e[0],t[0]),Math.min(e[1],t[1])]}function Lu(e,t){return[Math.max(e[0],t[0]),Math.max(e[1],t[1])]}function rp(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function RP(e){if(e[0]===0&&e[1]===0)return[0,0];var t=Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2));return[e[0]/t,e[1]/t]}function mge(e,t,n){var r=__read(e,2),i=r[0],a=r[1],o=__read(t,2),s=o[0],l=o[1],c=i-s,u=a-l,f=Math.sin(n),d=Math.cos(n);return[c*d-u*f+s,c*f+u*d+l]}function d$(e,t){return t?[e[1],-e[0]]:[-e[1],e[0]]}function ed(e){return e*Math.PI/180}function IP(e){return Number((e*180/Math.PI).toPrecision(5))}function r_(e){return e.toString().charAt(0).toUpperCase()+e.toString().slice(1)}function h$(e){return e.toString().charAt(0).toLowerCase()+e.toString().slice(1)}function p$(e,t){return"".concat(t).concat(r_(e))}function LP(e,t,n){var r;n===void 0&&(n=!0);var i=t||((r=e.match(/^([a-z][a-z0-9]+)/))===null||r===void 0?void 0:r[0])||"",a=e.replace(new RegExp("^(".concat(i,")")),"");return n?h$(a):a}function v$(e,t){Object.entries(t).forEach(function(n){var r=w(n,2),i=r[0],a=r[1];N([e],w(e.querySelectorAll(i)),!1).filter(function(o){return o.matches(i)}).forEach(function(o){if(o){var s=o;s.style.cssText+=Object.entries(a).reduce(function(l,c){return"".concat(l).concat(c.join(":"),";")},"")}})})}var Pg=function(e,t){if(!(e!=null&&e.startsWith(t)))return!1;var n=e[t.length];return n>="A"&&n<="Z"};function Jn(e,t,n){n===void 0&&(n=!1);var r={};return Object.entries(e).forEach(function(i){var a=w(i,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(Pg(o,"show")&&Pg(LP(o,"show"),t)!==n)o===p$(t,"show")?r[o]=s:r[o.replace(new RegExp(r_(t)),"")]=s;else if(!Pg(o,"show")&&Pg(o,t)!==n){var l=LP(o,t);l==="filter"&&typeof s=="function"||(r[l]=s)}}}),r}function sl(e,t){return Object.entries(e).reduce(function(n,r){var i=w(r,2),a=i[0],o=i[1];return a.startsWith("show")?n["show".concat(t).concat(a.slice(4))]=o:n["".concat(t).concat(r_(a))]=o,n},{})}function Gl(e,t){t===void 0&&(t=["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(e).forEach(function(a){var o=w(a,2),s=o[0],l=o[1];t.includes(s)||(n.indexOf(s)!==-1?i[s]=l:r[s]=l)}),[r,i]}function Os(e,t){return bo(e)?e.apply(void 0,N([],w(t),!1)):e}function Tg(e,t){return e.style.opacity||(e.style.opacity=1),Gs(e,{opacity:0},t)}var g$=["$el","anchor","cx","cy","d","defX","defY","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 m$(e){return g$.includes(e)}function NP(e){var t={};for(var n in e)m$(n)&&(t[n]=e[n]);return t}var td=Ss({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function kP(e){return e.reduce(function(t,n,r){return t.push(N([r===0?"M":"L"],w(n),!1)),t},[])}function y$(e,t,n){var r=t.connect,i=r===void 0?"line":r,a=t.center;if(i==="line")return kP(e);if(!a)return[];var o=rp(e[0],a),s=n?0:1;return e.reduce(function(l,c,u){return u===0?l.push(N(["M"],w(c),!1)):l.push(N(["A",o,o,0,0,s],w(c),!1)),l},[])}function i_(e,t,n){return t.type==="surround"?y$(e,t,n):kP(e)}function b$(e,t,n){var r=n.type,i=n.connect,a=n.center,o=n.closed,s=o?[["Z"]]:[],l=w([i_(e,n),i_(t.slice().reverse(),n,!0)],2),c=l[0],u=l[1],f=w([e[0],t.slice(-1)[0]],2),d=f[0],h=f[1],p=function(b,_){return[c,b,u,_,s].flat()};if(i==="line"||r==="surround")return p([N(["L"],w(h),!1)],[N(["L"],w(d),!1)]);if(!a)throw new Error("Arc grid need to specified center");var v=w([rp(h,a),rp(d,a)],2),g=v[0],m=v[1];return p([N(["A",g,g,0,0,1],w(h),!1),N(["L"],w(h),!1)],[N(["A",m,m,0,0,0],w(d),!1),N(["L"],w(d),!1)])}function x$(e,t,n,r){var i=n.animate,a=n.isBillboard,o=t.map(function(s,l){return{id:s.id||"grid-line-".concat(l),path:i_(s.points,n)}});return e.selectAll(td.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(l,c){var u=Os(NP(Ie({path:l.path},r)),[l,c,o]);this.attr(Ie({class:td.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},u))})},function(s){return s.transition(function(l,c){var u=Os(NP(Ie({path:l.path},r)),[l,c,o]);return Gs(this,u,i.update)})},function(s){return s.transition(function(){var l=this,c=Tg(this,i.exit);return Qf(c,function(){return l.remove()}),c})}).transitions()}function _$(e,t,n){var r=n.animate,i=n.connect,a=n.areaFill;if(t.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=function(p){return o[p%o.length]},l=[],c=0;c<t.length-1;c++){var u=w([t[c].points,t[c+1].points],2),f=u[0],d=u[1],h=b$(f,d,n);l.push({path:h,fill:s(c)})}return e.selectAll(td.region.class).data(l,function(p,v){return v}).join(function(p){return p.append("path").each(function(v,g){var m=Os(v,[v,g,l]);this.attr(m)}).attr("className",td.region.name)},function(p){return p.transition(function(v,g){var m=Os(v,[v,g,l]);return Gs(this,m,r.update)})},function(p){return p.transition(function(){var v=this,g=Tg(this,r.exit);return Qf(g,function(){return v.remove()}),g})}).transitions()}function w$(e){var t=e.data,n=t===void 0?[]:t,r=e.closed;return r?n.map(function(i){var a=i.points,o=w(a,1),s=o[0];return Ie(Ie({},i),{points:N(N([],w(a),!1),[s],!1)})}):n}var S$=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r){var i=n.type,a=n.center,o=n.areaFill,s=n.closed,l=Sr(n,["type","center","areaFill","closed"]),c=w$(n),u=Tn(r).maybeAppendByClassName(td.lineGroup,"g"),f=Tn(r).maybeAppendByClassName(td.regionGroup,"g"),d=x$(u,c,n,l),h=_$(f,c,n);return N(N([],w(d),!1),w(h),!1)},t}(Ra),wr=function(e,t,n){for(var r=0,i=xi(t)?t.split("."):t;e&&r<i.length;)e=e[i[r++]];return e===void 0||r<i.length?n:e},O$=function(e,t){return function(n){return e*(1-n)+t*n}};function C$(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0;return function(i){var a=new Array(r),o=new Array(n),s=0;for(s=0;s<r;++s)a[s]=a_(e[s],t[s]);for(;s<n;++s)o[s]=t[s];for(s=0;s<r;++s)o[s]=a[s](i);return o}}function E$(e,t){e===void 0&&(e={}),t===void 0&&(t={});var n={},r={};return Object.entries(t).forEach(function(i){var a=w(i,2),o=a[0],s=a[1];o in e?n[o]=a_(e[o],s):r[o]=s}),function(i){return Object.entries(n).forEach(function(a){var o=w(a,2),s=o[0],l=o[1];return r[s]=l(i)}),r}}function a_(e,t){return typeof e=="number"&&typeof t=="number"?O$(e,t):Array.isArray(e)&&Array.isArray(t)?C$(e,t):typeof e=="object"&&typeof t=="object"?E$(e,t):function(n){return e}}function M$(e,t,n,r){if(!r)return e.attr("__keyframe_data__",n),null;var i=r.duration,a=i===void 0?0:i,o=a_(t,n),s=Math.ceil(+a/16),l=new Array(s).fill(0).map(function(c,u,f){return{__keyframe_data__:o(u/(f.length-1))}});return e.animate(l,Ie({fill:"both"},r))}function Nu(e){return typeof e=="function"?e():xi(e)||Gi(e)?new e_({style:{text:String(e)}}):e}function o_(e,t,n){n===void 0&&(n=!1);var r=e.getBBox(),i=r.width,a=r.height,o=t/Math.max(i,a);return n&&e.scale(o),o}function jP(e,t){var n={},r=Array.isArray(t)?t:[t];for(var i in e)r.includes(i)||(n[i]=e[i]);return n}function DP(e,t){return Object.fromEntries(Object.entries(e).map(function(n){var r=w(n,2),i=r[0],a=r[1];return[i,Os(a,t)]}))}function yge(e){if(e.type==="linear"){var t=e.startPos,n=e.endPos;return __spreadArray(__spreadArray([],__read(t),!1),__read(n),!1)}var r=e.startAngle,i=e.endAngle,a=e.center,o=e.radius;return __spreadArray(__spreadArray([r,i],__read(a),!1),[o],!1)}function s_(e,t){return t&&bo(t)?e.filter(t):e}function FP(e,t){var n=t.startAngle,r=t.endAngle;return(r-n)*e+n}function Ag(e,t){if(t.type==="linear"){var n=w(t.startPos,2),r=n[0],i=n[1],a=w(t.endPos,2),o=a[0],s=a[1],l=w([o-r,s-i],2),c=l[0],u=l[1];return RP([c,u])}var f=ed(FP(e,t));return[-Math.sin(f),Math.cos(f)]}function l_(e,t,n){var r=Ag(e,n);return d$(r,t!=="positive")}function ip(e,t){return l_(e,t.labelDirection,t)}function P$(e,t){var n=w(t.startPos,2),r=n[0],i=n[1],a=w(t.endPos,2),o=a[0],s=a[1],l=w([o-r,s-i],2),c=l[0],u=l[1];return[r+c*e,i+u*e]}function T$(e,t){var n=t.radius,r=w(t.center,2),i=r[0],a=r[1],o=ed(FP(e,t));return[i+n*Math.cos(o),a+n*Math.sin(o)]}function Rg(e,t){return t.type==="linear"?P$(e,t):T$(e,t)}function BP(e){return Ag(0,e)[1]===0}function zP(e){return Ag(0,e)[0]===0}function ZP(e,t){return t-e===360}function $P(e,t,n,r,i){var a=t-e,o=w([i,i],2),s=o[0],l=o[1],c=w([ed(e),ed(t)],2),u=c[0],f=c[1],d=function(A){return[n+i*Math.cos(A),r+i*Math.sin(A)]},h=w(d(u),2),p=h[0],v=h[1],g=w(d(f),2),m=g[0],b=g[1];if(ZP(e,t)){var _=(f+u)/2,S=w(d(_),2),O=S[0],C=S[1];return[["M",p,v],["A",s,l,0,1,0,O,C],["A",s,l,0,1,0,m,b]]}var E=a>180?1:0,P=e>t?0:1,T=!1;return T?"M".concat(n,",").concat(r,",L").concat(p,",").concat(v,",A").concat(s,",").concat(l,",0,").concat(E,",").concat(P,",").concat(m,",").concat(b,",L").concat(n,",").concat(r):"M".concat(p,",").concat(v,",A").concat(s,",").concat(l,",0,").concat(E,",").concat(P,",").concat(m,",").concat(b)}function A$(e){var t=e.attributes,n=t.startAngle,r=t.endAngle,i=t.center,a=t.radius;return N(N([n,r],w(i),!1),[a],!1)}function R$(e,t,n,r){var i=t.startAngle,a=t.endAngle,o=t.center,s=t.radius;return e.selectAll(Br.line.class).data([{path:$P.apply(void 0,N(N([i,a],w(o),!1),[s],!1))}],function(l,c){return c}).join(function(l){return l.append("path").attr("className",Br.line.name).styles(t).styles({path:function(c){return c.path}})},function(l){return l.transition(function(){var c=this,u=M$(this,A$(this),N(N([i,a],w(o),!1),[s],!1),r.update);if(u){var f=function(){var d=wr(c.attributes,"__keyframe_data__");c.style.path=$P.apply(void 0,N([],w(d),!1))};u.onframe=f,u.onfinish=f}return u}).styles(t)},function(l){return l.remove()}).styles(n).transitions()}function I$(e,t){var n=t.truncRange,r=t.truncShape,i=t.lineExtension}function L$(e,t,n){n===void 0&&(n=[0,0]);var r=w([e,t,n],3),i=w(r[0],2),a=i[0],o=i[1],s=w(r[1],2),l=s[0],c=s[1],u=w(r[2],2),f=u[0],d=u[1],h=w([l-a,c-o],2),p=h[0],v=h[1],g=Math.sqrt(Math.pow(p,2)+Math.pow(v,2)),m=w([-f/g,d/g],2),b=m[0],_=m[1];return[b*p,b*v,_*p,_*v]}function WP(e){var t=w(e,2),n=w(t[0],2),r=n[0],i=n[1],a=w(t[1],2),o=a[0],s=a[1];return{x1:r,y1:i,x2:o,y2:s}}function N$(e,t,n,r){var i=t.showTrunc,a=t.startPos,o=t.endPos,s=t.truncRange,l=t.lineExtension,c=w([a,o],2),u=w(c[0],2),f=u[0],d=u[1],h=w(c[1],2),p=h[0],v=h[1],g=w(l?L$(a,o,l):new Array(4).fill(0),4),m=g[0],b=g[1],_=g[2],S=g[3],O=function(W){return e.selectAll(Br.line.class).data(W,function(G,J){return J}).join(function(G){return G.append("line").attr("className",function(J){return"".concat(Br.line.name," ").concat(J.className)}).styles(n).transition(function(J){return Gs(this,WP(J.line),!1)})},function(G){return G.styles(n).transition(function(J){var re=J.line;return Gs(this,WP(re),r.update)})},function(G){return G.remove()}).transitions()};if(!i||!s)return O([{line:[[f+m,d+b],[p+_,v+S]],className:Br.line.name}]);var C=w(s,2),E=C[0],P=C[1],T=p-f,A=v-d,R=w([f+T*E,d+A*E],2),z=R[0],I=R[1],L=w([f+T*P,d+A*P],2),F=L[0],Z=L[1],H=O([{line:[[f+m,d+b],[z,I]],className:Br.lineFirst.name},{line:[[F,Z],[p+_,v+S]],className:Br.lineSecond.name}]);return I$(e,t),H}function k$(e,t,n,r){var i=n.showArrow,a=n.showTrunc,o=n.lineArrow,s=n.lineArrowOffset,l=n.lineArrowSize,c;if(t==="arc"?c=e.select(Br.line.class):a?c=e.select(Br.lineSecond.class):c=e.select(Br.line.class),!i||!o||n.type==="arc"&&ZP(n.startAngle,n.endAngle)){var u=c.node();u&&(u.style.markerEnd=void 0);return}var f=Nu(o);f.attr(r),o_(f,l,!0),c.style("markerEnd",f).style("markerEndOffset",-s)}function j$(e,t,n){var r=t.type,i,a=Jn(t,"line");return r==="linear"?i=N$(e,t,jP(a,"arrow"),n):i=R$(e,t,jP(a,"arrow"),n),k$(e,r,t,a),i}function D$(e,t){return l_(e,t.gridDirection,t)}function GP(e){var t=e.type,n=e.gridCenter;return t==="linear"?n:n||e.center}function F$(e,t){var n=t.gridLength;return e.map(function(r,i){var a=r.value,o=w(Rg(a,t),2),s=o[0],l=o[1],c=w(Wl(D$(a,t),n),2),u=c[0],f=c[1];return{id:i,points:[[s,l],[s+u,l+f]]}})}function B$(e,t){var n=t.gridControlAngles,r=GP(t);if(!r)throw new Error("grid center is not provide");if(e.length<2)throw new Error("Invalid grid data");if(!n||n.length===0)throw new Error("Invalid gridControlAngles");var i=w(r,2),a=i[0],o=i[1];return e.map(function(s,l){var c=s.value,u=w(Rg(c,t),2),f=u[0],d=u[1],h=w([f-a,d-o],2),p=h[0],v=h[1],g=[];return n.forEach(function(m){var b=ed(m),_=w([Math.cos(b),Math.sin(b)],2),S=_[0],O=_[1],C=p*S-v*O+a,E=p*O+v*S+o;g.push([C,E])}),{points:g,id:l}})}function z$(e,t,n,r){var i=Jn(n,"grid"),a=i.type,o=i.areaFill,s=GP(n),l=s_(t,n.gridFilter),c=a==="segment"?F$(l,n):B$(l,n),u=Ie(Ie({},i),{center:s,areaFill:bo(o)?l.map(function(f,d){return Os(o,[f,d,l])}):o,animate:r,data:c});return e.selectAll(Br.grid.class).data([1]).join(function(f){return f.append(function(){return new S$({style:u})}).attr("className",Br.grid.name)},function(f){return f.transition(function(){return this.update(u)})},function(f){return f.remove()}).transitions()}function Wa(e,t,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=!1),r&&e===t||i&&e===n?!0:e>t&&e<n}function Z$(e){var t,n,r,i=e||1;function a(s,l){++t>i&&(r=n,o(1),++t),n[s]=l}function o(s){t=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set:function(s,l){n[s]!==void 0?n[s]=l:a(s,l)}}}var $$=function(e,t,n){if(n===void 0&&(n=128),!bo(e))throw new TypeError("Expected a function");var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);var l=e.apply(this,i);return s.set(o,l),l};return r.cache=Z$(n),r},Ig,c_;function bge(e){c_=e}var W$=$$(function(e,t){var n=t.fontSize,r=t.fontFamily,i=t.fontWeight,a=t.fontStyle,o=t.fontVariant;return c_?c_(e,n):(Ig||(Ig=We.offscreenCanvasCreator.getOrCreateContext(void 0)),Ig.font=[a,o,i,"".concat(n,"px"),r].join(" "),Ig.measureText(e).width)},function(e,t){return[e,Object.values(t||HP(e)).join()].join("")},4096),HP=function(e){var t=e.style.fontFamily||"sans-serif",n=e.style.fontWeight||"normal",r=e.style.fontStyle||"normal",i=e.style.fontVariant,a=e.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:t,fontWeight:n,fontStyle:r,fontVariant:i}};function YP(e){return e.nodeName==="text"?e:e.nodeName==="g"&&e.children.length===1&&e.children[0].nodeName==="text"?e.children[0]:null}function VP(e,t){var n=YP(e);n&&n.attr(t)}function u_(e,t,n){n===void 0&&(n="..."),VP(e,{wordWrap:!0,wordWrapWidth:t,maxLines:1,textOverflow:n})}function G$(e,t,n,r){n===void 0&&(n=2),r===void 0&&(r="top"),VP(e,{wordWrap:!0,wordWrapWidth:t,maxLines:n,textBaseline:r})}function H$(e,t,n){var r=e.getBBox(),i=r.width,a=r.height,o=w([t,n].map(function(c,u){var f;return c.includes("%")?parseFloat(((f=c.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||f===void 0?void 0:f[0])||"0")/100*(u===0?i:a):c}),2),s=o[0],l=o[1];return[s,l]}function Lg(e,t){if(t)try{var n=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=t.replace(n,function(i,a,o){return"translate(".concat(H$(e,a,o),")")});e.attr("transform",r)}catch(i){}}var UP=function(e){return e!==void 0&&e!=null&&!Number.isNaN(e)};function Ga(e){if(Gi(e))return[e,e,e,e];if(ua(e)){var t=e.length;if(t===1)return[e[0],e[0],e[0],e[0]];if(t===2)return[e[0],e[1],e[0],e[1]];if(t===3)return[e[0],e[1],e[2],e[1]];if(t===4)return e}return[0,0,0,0]}var f_=function(){function e(t,n,r,i){this.set(t,n,r,i)}return Object.defineProperty(e.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),e.prototype.rotatedPoints=function(t,n,r){var i=this,a=i.x1,o=i.y1,s=i.x2,l=i.y2,c=Math.cos(t),u=Math.sin(t),f=n-n*c+r*u,d=r-n*u-r*c,h=[[c*a-u*l+f,u*a+c*l+d],[c*s-u*l+f,u*s+c*l+d],[c*a-u*o+f,u*a+c*o+d],[c*s-u*o+f,u*s+c*o+d]];return h},e.prototype.set=function(t,n,r,i){return r<t?(this.x2=t,this.x1=r):(this.x1=t,this.x2=r),i<n?(this.y2=n,this.y1=i):(this.y1=n,this.y2=i),this},e.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},e}();function Ng(e,t){var n=e.getEulerAngles()||0;e.setEulerAngles(0);var r=e.getLocalBounds(),i=w(r.min,2),a=i[0],o=i[1],s=w(r.max,2),l=s[0],c=s[1],u=d_(e),f=u.width,d=u.height,h=d,p=0,v=0,g=a,m=o,b=YP(e);if(b){h-=1.5;var _=b.style.textAlign,S=b.style.textBaseline;_==="center"?g=(a+l)/2:(_==="right"||_==="end")&&(g=l),S==="middle"?m=(o+c)/2:S==="bottom"&&(m=c)}var O=w(Ga(t),4),C=O[0],E=C===void 0?0:C,P=O[1],T=P===void 0?0:P,A=O[2],R=A===void 0?E:A,z=O[3],I=z===void 0?T:z,L=new f_((p+=a)-I,(v+=o)-E,p+f+T,v+h+R);return e.setEulerAngles(n),L.rotatedPoints(ed(n),g,m)}function d_(e){return e.__bbox__?e.__bbox__:e.getBBox()}function ap(e,t){return t[0]<=Math.max(e[0][0],e[1][0])&&t[0]<=Math.min(e[0][0],e[1][0])&&t[1]<=Math.max(e[0][1],e[1][1])&&t[1]<=Math.min(e[0][1],e[1][1])}function op(e,t,n){var r=(t[1]-e[1])*(n[0]-t[0])-(t[0]-e[0])*(n[1]-t[1]);return r===0?0:r<0?2:1}function Y$(e,t){var n=op(e[0],e[1],t[0]),r=op(e[0],e[1],t[1]),i=op(t[0],t[1],e[0]),a=op(t[0],t[1],e[1]);return!!(n!==r&&i!==a||n===0&&ap(e,t[0])||r===0&&ap(e,t[1])||i===0&&ap(t,e[0])||a===0&&ap(t,e[1]))}function V$(e,t){var n=e.length;if(n<3)return!1;var r=[t,[9999,t[1]]],i=0,a=0;do{var o=[e[a],e[(a+1)%n]];if(Y$(o,r)){if(op(o[0],t,o[1])===0)return ap(o,t);i++}a=(a+1)%n}while(a!==0);return!!(i&1)}function U$(e,t){return t.every(function(n){return V$(e,n)})}function X$(e,t,n){var r=e.x1,i=e.x2,a=e.y1,o=e.y2,s=[[r,a],[i,a],[i,o],[r,o]],l=Ng(t,n);return U$(s,l)}function XP(e,t){var n=w(e,4),r=n[0],i=n[1],a=n[2],o=n[3],s=w(t,4),l=s[0],c=s[1],u=s[2],f=s[3],d=a-r,h=o-i,p=u-l,v=f-c,g=d*v-p*h;if(g===0)return!1;var m=g>0,b=r-l,_=i-c,S=d*_-h*b;if(S<0===m)return!1;var O=p*_-v*b;return!(O<0===m||S>g===m||O>g===m)}function KP(e,t){var n=[[e[0],e[1],e[2],e[3]],[e[2],e[3],e[4],e[5]],[e[4],e[5],e[6],e[7]],[e[6],e[7],e[0],e[1]]];return n.some(function(r){return XP(t,r)})}var xge={lineToLine:XP,intersectBoxLine:KP,getBounds:Ng};function K$(e,t,n){var r,i,a=Ng(e,n).flat(1),o=Ng(t,n).flat(1),s=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var l=M(s),c=l.next();!c.done;c=l.next()){var u=c.value;if(KP(o,u))return!0}}catch(f){r={error:f}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return!1}function q$(e,t){var n=e.type,r=e.labelDirection,i=e.crossSize;if(!i)return!1;if(n==="arc"){var a=e.center,o=e.radius,s=w(a,2),l=s[0],c=s[1],u=r==="negative"?0:i,f=-o-u,d=o+u,h=w(Ga(t),4),p=h[0],v=h[1],g=h[2],m=h[3];return new f_(l+f-m,c+f-p,l+d+v,c+d+g)}var b=w(e.startPos,2),_=b[0],S=b[1],O=w(e.endPos,2),C=O[0],E=O[1],P=w(zP(e)?[-t,0,t,0]:[0,t,0,-t],4),T=P[0],A=P[1],R=P[2],z=P[3],I=ip(0,e),L=Wl(I,i),F=new f_(_,S,C,E);return F.x1+=z,F.y1+=T,F.x2+=A+L[0],F.y2+=R+L[1],F}function kg(e,t,n){var r,i,a=t.crossPadding,o=new Set,s=null,l=q$(t,a),c=function(p){return l?X$(l,p):!0},u=function(p,v){return p?!K$(p,v,Ga(n)):!0};try{for(var f=M(e),d=f.next();!d.done;d=f.next()){var h=d.value;c(h)?!s||u(s,h)?s=h:(o.add(s),o.add(h)):o.add(h)}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return Array.from(o)}function h_(e,t){return t===void 0&&(t={}),Bt(e)?0:typeof e=="number"?e:Math.floor(W$(e,t))}function J$(e,t,n,r){if(!(e.length<=1)){var i=t.suffix,a=i===void 0?"...":i,o=t.minLength,s=t.maxLength,l=s===void 0?1/0:s,c=t.step,u=c===void 0?" ":c,f=t.margin,d=f===void 0?[0,0,0,0]:f,h=HP(r.getTextShape(e[0])),p=h_(u,h),v=o?h_(o,h):p,g=h_(l,h);(Bt(g)||g===1/0)&&(g=Math.max.apply(null,e.map(function(L){return d_(L).width})));for(var m=e.slice(),b=w(d,4),_=b[0],S=_===void 0?0:_,O=b[1],C=O===void 0?0:O,E=b[2],P=E===void 0?S:E,T=b[3],A=T===void 0?C:T,R=function(L){if(m.forEach(function(F){r.ellipsis(r.getTextShape(F),L,a)}),m=kg(e,n,d),m.length<1)return{value:void 0}},z=g;z>v+p;z-=p){var I=R(z);if(typeof I=="object")return I.value}}}function _ge(e){var t=e&&e.getRenderBounds();if(!t)return{width:0,height:0};var n=t.getMax(),r=t.getMin();return{width:n[0]-r[0],height:n[1]-r[1]}}function qP(e){var t=e.getLocalBounds(),n=t.min,r=t.max,i=w([n,r],2),a=w(i[0],2),o=a[0],s=a[1],l=w(i[1],2),c=l[0],u=l[1];return{x:o,y:s,width:c-o,height:u-s,left:o,bottom:u,top:s,right:c}}function wge(e,t){var n=select(e).append("text").node();return n.attr(__assign(__assign({},t),{visibility:"hidden"})),n}function Q$(e,t){var n=w(e,2),r=n[0],i=n[1],a=w(t,2),o=a[0],s=a[1];return r!==o&&i===s}function Sge(e,t){var n=__read(e,2),r=n[0],i=n[1],a=__read(t,2),o=a[0],s=a[1];return r===o&&i!==s}function eW(e,t){var n,r,i=t.attributes;try{for(var a=M(Object.entries(i)),o=a.next();!o.done;o=a.next()){var s=w(o.value,2),l=s[0],c=s[1];l!=="id"&&l!=="className"&&e.attr(l,c)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}var tW={parity:function(e,t){var n=t.seq,r=n===void 0?2:n;return e.filter(function(i,a){return a%r?(Nc(i),!1):!0})}},nW=function(e){return e.filter(UP)};function rW(e,t,n,r){var i=e.length,a=t.keepHeader,o=t.keepTail;if(!(i<=1||i===2&&a&&o)){var s=tW.parity,l=function(_){return _.forEach(r.show),_},c=2,u=e.slice(),f=e.slice(),d=Math.min.apply(Math,N([1],w(e.map(function(_){return d_(_).width})),!1));if(n.type==="linear"&&(BP(n)||zP(n))){var h=qP(e[0]).left,p=qP(e[i-1]).right,v=Math.abs(p-h)||1;c=Math.max(Math.floor(i*d/v),c)}var g,m;for(a&&(g=u.splice(0,1)[0]),o&&(m=u.splice(-1,1)[0],u.reverse()),l(u);c<e.length&&kg(nW(m?N(N([m],w(f),!1),[g],!1):N([g],w(f),!1)),n,t==null?void 0:t.margin).length;){if(m&&!g&&c%2===0){var b=u.splice(0,1);b.forEach(r.hide)}else if(m&&g){var b=u.splice(0,1);b.forEach(r.hide)}f=s(l(u),{seq:c}),c++}}}function iW(e,t,n,r){var i,a,o=t.optionalAngles,s=o===void 0?[0,45,90]:o,l=t.margin,c=t.recoverWhenFailed,u=c===void 0?!0:c,f=e.map(function(m){return m.getLocalEulerAngles()}),d=function(){return kg(e,n,l).length<1},h=function(m){return e.forEach(function(b,_){var S=Array.isArray(m)?m[_]:m;r.rotate(b,+S)})};try{for(var p=M(s),v=p.next();!v.done;v=p.next()){var g=v.value;if(h(g),d())return}}catch(m){i={error:m}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}u&&h(f)}function aW(e){var t=e.type,n=e.labelDirection;return t==="linear"&&BP(e)?n==="negative"?"bottom":"top":"middle"}function oW(e,t,n,r){var i=t.wordWrapWidth,a=i===void 0?50:i,o=t.maxLines,s=o===void 0?3:o,l=t.recoverWhenFailed,c=l===void 0?!0:l,u=t.margin,f=u===void 0?[0,0,0,0]:u,d=e.map(function(b){return b.attr("maxLines")||1}),h=Math.min.apply(Math,N([],w(d),!1)),p=function(){return kg(e,n,f).length<1},v=aW(n),g=function(b){return e.forEach(function(_,S){var O=Array.isArray(b)?b[S]:b;r.wrap(_,a,O,v)})};if(!(h>s)){for(var m=h;m<=s;m++)if(g(m),p())return;c&&g(d)}}var sW=new Map([["hide",rW],["rotate",iW],["ellipsis",J$],["wrap",oW]]);function lW(e,t,n){return t.labelOverlap.length<1?!1:n==="hide"?!a$(e[0]):n==="rotate"?!e.some(function(r){var i;return!!(!((i=r.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):n==="ellipsis"||n==="wrap"?e.filter(function(r){return r.querySelector("text")}).length>1:!0}function cW(e,t,n){var r=t.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var o=a.type,s=sW.get(o);lW(e,t,o)&&(s==null||s(e,a,t,n))})}function uW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(r){return r==="positive"?-1:1};return e.reduce(function(r,i){return r*n(i)},1)}function JP(e){for(var t=e;t<0;)t+=360;return Math.round(t%360)}function p_(e,t){var n=w(e,2),r=n[0],i=n[1],a=w(t,2),o=a[0],s=a[1],l=w([r*o+i*s,r*s-i*o],2),c=l[0],u=l[1];return Math.atan2(u,c)}function fW(e){var t=(e+360)%180;return Wa(t,-90,90)||(t+=180),t}function dW(e,t,n){var r,i=n.labelAlign,a=(r=t.style.transform)===null||r===void 0?void 0:r.includes("rotate");if(a)return t.getLocalEulerAngles();var o=0,s=ip(e.value,n),l=Ag(e.value,n);return i==="horizontal"?0:(i==="perpendicular"?o=p_([1,0],s):o=p_([l[0]<0?-1:1,0],l),fW(IP(o)))}function QP(e,t,n){var r=n.type,i=n.labelAlign,a=ip(e,n),o=JP(t),s=JP(IP(p_([1,0],a))),l="center",c="middle";return r==="linear"?[90,270].includes(s)&&o===0?(l="center",c=a[1]===1?"top":"bottom"):!(s%180)&&[90,270].includes(o)?l="center":s===0?(Wa(o,0,90,!1,!0)||Wa(o,0,90)||Wa(o,270,360))&&(l="start"):s===90?Wa(o,0,90,!1,!0)?l="start":(Wa(o,90,180)||Wa(o,270,360))&&(l="end"):s===270?Wa(o,0,90,!1,!0)?l="end":(Wa(o,90,180)||Wa(o,270,360))&&(l="start"):s===180&&(o===90?l="start":(Wa(o,0,90)||Wa(o,270,360))&&(l="end")):i==="parallel"?Wa(s,0,180,!0)?c="top":c="bottom":i==="horizontal"?Wa(s,90,270,!1)?l="end":(Wa(s,270,360,!1)||Wa(s,0,90))&&(l="start"):i==="perpendicular"&&(Wa(s,90,270)?l="end":l="start"),{textAlign:l,textBaseline:c}}function hW(e,t,n){t.setLocalEulerAngles(e);var r=t.__data__.value,i=QP(r,e,n),a=t.querySelector(Br.labelItem.class);a&&tT(a,i)}function eT(e,t,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=t.indexOf(e),c=Os(s,[e,l,t]),u=w([ip(e.value,n),uW(o,a)],2),f=u[0],d=u[1],h=d===1?Os(r?i:0,[e,l,t]):0,p=w(np(Wl(f,c+h),Rg(e.value,n)),2),v=p[0],g=p[1];return{x:v,y:g}}function pW(e,t,n,r){var i=r.labelFormatter,a=bo(i)?function(){return Nu(Os(i,[e,t,n,ip(e.value,r)]))}:function(){return Nu(e.label||"")};return a}function tT(e,t){e.nodeName==="text"&&e.attr(t)}function nT(e){cW(this.node().childNodes,e,{hide:Nc,show:tp,rotate:function(t,n){hW(+n,t,e)},ellipsis:function(t,n,r){t&&u_(t,n||1/0,r)},wrap:function(t,n,r){t&&G$(t,n,r)},getTextShape:function(t){return t.querySelector("text")}})}function rT(e,t,n,r,i){var a=n.indexOf(t),o=Tn(e).append(pW(t,a,n,i)).attr("className",Br.labelItem.name).node(),s=w(Gl(DP(r,[t,a,n])),2),l=s[0],c=s[1],u=c.transform,f=Sr(c,["transform"]);Lg(e,u);var d=dW(t,e,i);return e.setLocalEulerAngles(+d),tT(o,Ie(Ie({},QP(t.value,d,i)),l)),Lg(e,u),e.attr(f),o}function vW(e,t,n,r){var i=s_(t,n.labelFilter),a=Jn(n,"label");return e.selectAll(Br.label.class).data(i,function(o,s){return s}).join(function(o){return o.append("g").attr("className",Br.label.name).transition(function(s){return rT(this,s,t,a,n),this.attr(eT(s,t,n)),this.__bbox__=s.bbox,null}).call(function(){return nT.call(e,n)})},function(o){return o.transition(function(s){var l=this.querySelector(Br.labelItem.class),c=rT(this,s,t,a,n),u=n$(l,c,r.update),f=Gs(this,eT(s,t,n),r.update);return this.__bbox__=s.bbox,N(N([],w(u),!1),[f],!1)}).call(function(s){var l=wr(s,"_transitions").flat().filter(UP);e$(l,function(){return nT.call(e,n)})})},function(o){return o.transition(function(){var s=this,l=Tg(this.childNodes[0],r.exit);return Qf(l,function(){return Tn(s).remove()}),l})}).transitions()}function iT(e,t){return l_(e,t.tickDirection,t)}function gW(e,t){var n=w(e,2),r=n[0],i=n[1];return[[0,0],[r*t,i*t]]}function mW(e,t,n,r,i){var a=i.tickLength,o=w(gW(r,Os(a,[e,t,n])),2),s=w(o[0],2),l=s[0],c=s[1],u=w(o[1],2),f=u[0],d=u[1];return{x1:l,x2:f,y1:c,y2:d}}function yW(e,t,n,r,i){var a=i.tickFormatter,o=iT(t.value,i),s="line";return bo(a)&&(s=function(){return Os(a,[t,n,r,o])}),e.append(s).attr("className",Br.tickItem.name)}function bW(e,t,n,r,i,a,o){var s=iT(e.value,a),l=mW(e,t,n,s,a),c=l.x1,u=l.x2,f=l.y1,d=l.y2,h=w(Gl(DP(o,[e,t,n,s])),2),p=h[0],v=h[1];r.node().nodeName==="line"&&r.styles(Ie({x1:c,x2:u,y1:f,y2:d},p)),i.attr(v),r.styles(p)}function aT(e,t,n,r,i,a){var o=yW(Tn(this),e,t,n,r);bW(e,t,n,o,this,r,i);var s=w(Rg(e.value,r),2),l=s[0],c=s[1];return Gs(this,{x:l,y:c},a)}function xW(e,t,n,r){var i=s_(t,n.tickFilter),a=Jn(n,"tick");return e.selectAll(Br.tick.class).data(i,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",Br.tick.name).transition(function(s,l){return aT.call(this,s,l,i,n,a,!1)})},function(o){return o.transition(function(s,l){return this.removeChildren(),aT.call(this,s,l,i,n,a,r.update)})},function(o){return o.transition(function(){var s=this,l=Tg(this.childNodes[0],r.exit);return Qf(l,function(){return s.remove()}),l})}).transitions()}var ui=function(){function e(t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=n,this.width=r,this.height=i}return Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e.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}},e.prototype.isPointIn=function(t,n){return t>=this.left&&t<=this.right&&n>=this.top&&n<=this.bottom},e}();function Oge(e){var t=e.getRenderBounds(),n=__read(t.min,2),r=n[0],i=n[1],a=__read(t.max,2),o=a[0],s=a[1],l=o-r,c=s-i;return new ui(r,i,l,c)}var oT=Ss({text:"text"},"title");function jg(e){return/\S+-\S+/g.test(e)?e.split("-").map(function(t){return t[0]}):e.length>2?[e[0]]:e.split("")}function _W(e,t){var n=e.attributes,r=n.position,i=n.spacing,a=n.inset,o=n.text,s=e.getBBox(),l=t.getBBox(),c=jg(r),u=w(Ga(o?i:0),4),f=u[0],d=u[1],h=u[2],p=u[3],v=w(Ga(a),4),g=v[0],m=v[1],b=v[2],_=v[3],S=w([p+d,f+h],2),O=S[0],C=S[1],E=w([_+m,g+b],2),P=E[0],T=E[1];if(c[0]==="l")return new ui(s.x,s.y,l.width+s.width+O+P,Math.max(l.height+T,s.height));if(c[0]==="t")return new ui(s.x,s.y,Math.max(l.width+P,s.width),l.height+s.height+C+T);var A=w([t.attributes.width||l.width,t.attributes.height||l.height],2),R=A[0],z=A[1];return new ui(l.x,l.y,R+s.width+O+P,z+s.height+C+T)}function wW(e,t){var n=Object.entries(t).reduce(function(r,i){var a=w(i,2),o=a[0],s=a[1],l=e.node().attr(o);return l||(r[o]=s),r},{});e.styles(n)}function SW(e){var t,n,r,i,a=e,o=a.width,s=a.height,l=a.position,c=w([+o/2,+s/2],2),u=c[0],f=c[1],d=w([+u,+f,"center","middle"],4),h=d[0],p=d[1],v=d[2],g=d[3],m=jg(l);return m.includes("l")&&(t=w([0,"start"],2),h=t[0],v=t[1]),m.includes("r")&&(n=w([+o,"end"],2),h=n[0],v=n[1]),m.includes("t")&&(r=w([0,"top"],2),p=r[0],g=r[1]),m.includes("b")&&(i=w([+s,"bottom"],2),p=i[0],g=i[1]),{x:h,y:p,textAlign:v,textBaseline:g}}var sT=function(e){zt(t,e);function t(n){return e.call(this,n,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return t.prototype.getAvailableSpace=function(){var n=this,r=this.attributes,i=r.width,a=r.height,o=r.position,s=r.spacing,l=r.inset,c=n.querySelector(oT.text.class);if(!c)return new ui(0,0,+i,+a);var u=c.getBBox(),f=u.width,d=u.height,h=w(Ga(s),4),p=h[0],v=h[1],g=h[2],m=h[3],b=w([0,0,+i,+a],4),_=b[0],S=b[1],O=b[2],C=b[3],E=jg(o);if(E.includes("i"))return new ui(_,S,O,C);E.forEach(function(Z,H){var W,G,J,re;Z==="t"&&(W=w(H===0?[d+g,+a-d-g]:[0,+a],2),S=W[0],C=W[1]),Z==="r"&&(G=w([+i-f-m],1),O=G[0]),Z==="b"&&(J=w([+a-d-p],1),C=J[0]),Z==="l"&&(re=w(H===0?[f+v,+i-f-v]:[0,+i],2),_=re[0],O=re[1])});var P=w(Ga(l),4),T=P[0],A=P[1],R=P[2],z=P[3],I=w([z+A,T+R],2),L=I[0],F=I[1];return new ui(_+z,S+T,O-L,C-F)},t.prototype.getBBox=function(){return this.title?this.title.getBBox():new ui(0,0,0,0)},t.prototype.render=function(n,r){var i=this,a=n.width,o=n.height,s=n.position,l=n.spacing,c=Sr(n,["width","height","position","spacing"]),u=w(Gl(c),1),f=u[0],d=SW(n),h=d.x,p=d.y,v=d.textAlign,g=d.textBaseline;zo(!!c.text,Tn(r),function(m){i.title=m.maybeAppendByClassName(oT.text,"text").styles(f).call(wW,{x:h,y:p,textAlign:v,textBaseline:g}).node()})},t}(Ra);function OW(e,t,n){var r=n.titlePosition,i=r===void 0?"lb":r,a=n.titleSpacing,o=jg(i),s=e.node().getLocalBounds(),l=w(s.min,2),c=l[0],u=l[1],f=w(s.halfExtents,2),d=f[0],h=f[1],p=w(t.node().getLocalBounds().halfExtents,2),v=p[0],g=p[1],m=w([c+d,u+h],2),b=m[0],_=m[1],S=w(Ga(a),4),O=S[0],C=S[1],E=S[2],P=S[3];if(["start","end"].includes(i)&&n.type==="linear"){var T=n.startPos,A=n.endPos,R=w(i==="start"?[T,A]:[A,T],2),z=R[0],I=R[1],L=RP([-I[0]+z[0],-I[1]+z[1]]),F=w(Wl(L,O),2),Z=F[0],H=F[1];return{x:z[0]+Z,y:z[1]+H}}return o.includes("t")&&(_-=h+g+O),o.includes("r")&&(b+=d+v+C),o.includes("l")&&(b-=d+v*2+P),o.includes("b")&&(_+=h+g*2+E),{x:b,y:_}}function CW(e,t,n){var r=e.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if(t==="vertical"){if(n==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(n==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function lT(e,t,n,r,i){var a=Jn(r,"title"),o=w(Gl(a),2),s=o[0],l=o[1],c=l.transform,u=Sr(l,["transform"]);e.styles(s),t.styles(u);var f=c||CW(e.node(),s.direction,s.position);Lg(e.node(),f);var d=OW(Tn(n._offscreen||n.querySelector(Br.mainGroup.class)),t,r),h=d.x,p=d.y,v=Gs(t.node(),{x:h,y:p},i);return Lg(e.node(),f),v}function EW(e,t,n,r){var i=n.titleText;return e.selectAll(Br.title.class).data([{title:i}].filter(function(a){return!!a.title}),function(a,o){return a.title}).join(function(a){return a.append(function(){return Nu(i)}).attr("className",Br.title.name).transition(function(){return lT(Tn(this),e,t,n,r.enter)})},function(a){return a.transition(function(){return lT(Tn(this),e,t,n,r.update)})},function(a){return a.remove()}).transitions()}function cT(e,t,n,r){var i=e.showLine,a=e.showTick,o=e.showLabel,s=t.maybeAppendByClassName(Br.lineGroup,"g"),l=zo(i,s,function(h){return j$(h,e,r)})||[],c=t.maybeAppendByClassName(Br.tickGroup,"g"),u=zo(a,c,function(h){return xW(h,n,e,r)})||[],f=t.maybeAppendByClassName(Br.labelGroup,"g"),d=zo(o,f,function(h){return vW(h,n,e,r)})||[];return N(N(N([],w(l),!1),w(u),!1),w(d),!1).filter(function(h){return!!h})}var v_=function(e){zt(t,e);function t(n){return e.call(this,n,t_)||this}return t.prototype.render=function(n,r,i){var a=this,o=n.titleText,s=n.data,l=n.animate,c=n.showTitle,u=n.showGrid,f=n.dataThreshold,d=n.truncRange,h=s$(s,f).filter(function(O){var C=O.value;return!(d&&C>d[0]&&C<d[1])}),p=EP(i===void 0?l:i),v=Tn(r).maybeAppendByClassName(Br.gridGroup,"g"),g=zo(u,v,function(O){return z$(O,h,n,p)})||[],m=Tn(r).maybeAppendByClassName(Br.mainGroup,"g");o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&cT(n,Tn(this.offscreenGroup),h,EP(!1));var b=cT(n,Tn(m.node()),h,p),_=Tn(r).maybeAppendByClassName(Br.titleGroup,"g"),S=zo(c,_,function(O){return EW(O,a,n,p)})||[];return N(N(N([],w(g),!1),w(b),!1),w(S),!1).flat().filter(function(O){return!!O})},t}(Ra),MW={}.toString,PW=function(e,t){return MW.call(e)==="[object "+t+"]"},sp=PW,g_=function(e){return sp(e,"Function")},uT=function(e){return Array.isArray?Array.isArray(e):sp(e,"Array")},TW=function(e){var t=typeof e;return e!==null&&t==="object"||t==="function"};function AW(e,t){if(e){var n;if(uT(e))for(var r=0,i=e.length;r<i&&(n=t(e[r],r),n!==!1);r++);else if(TW(e)){for(var a in e)if(e.hasOwnProperty(a)&&(n=t(e[a],a),n===!1))break}}}var fT=AW,Cge=Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];return fT(e,function(n,r){g_(e)&&r==="prototype"||t.push(r)}),t},Ege=null;function Mge(e,t){var n=keys(t),r=n.length;if(isNil(e))return!r;for(var i=0;i<r;i+=1){var a=n[i];if(t[a]!==e[a]||!(a in e))return!1}return!0}var Pge=null,RW=function(e){return typeof e=="object"&&e!==null},IW=RW,LW=function(e){if(!IW(e)||!sp(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},dT=LW;function Tge(e,t){if(!isArray(e))return null;var n;if(isFunction(t)&&(n=t),isPlainObject(t)&&(n=function(i){return isMatch(i,t)}),n){for(var r=0;r<e.length;r+=1)if(n(e[r]))return e[r]}return null}var Age=null,Rge=function(e,t){for(var n=null,r=0;r<e.length;r++){var i=e[r],a=i[t];if(!isNil(a)){isArray(a)?n=a[0]:n=a;break}}return n},Ige=null,Lge=function(e){if(!isArray(e))return[];for(var t=[],n=0;n<e.length;n++)t=t.concat(e[n]);return t},Nge=null,NW=function(e,t){if(t===void 0&&(t=[]),!isArray(e))t.push(e);else for(var n=0;n<e.length;n+=1)NW(e[n],t);return t},kge=null,jge=function(e){if(isArray(e))return e.reduce(function(t,n){return Math.max(t,n)},e[0])},Dge=function(e){if(isArray(e))return e.reduce(function(t,n){return Math.min(t,n)},e[0])},Fge=function(e){var t=e.filter(function(o){return!isNaN(o)});if(!t.length)return{min:0,max:0};if(isArray(e[0])){for(var n=[],r=0;r<e.length;r++)n=n.concat(e[r]);t=n}var i=getMax(t),a=getMin(t);return{min:a,max:i}},Bge=null,hT=Array.prototype,kW=hT.splice,jW=hT.indexOf,zge=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)for(var i=t[r],a=-1;(a=jW.call(e,i))>-1;)kW.call(e,a,1);return e},Zge=null,DW=Array.prototype.splice,$ge=function(t,n){if(!isArrayLike(t))return[];for(var r=t?n.length:0,i=r-1;r--;){var a=void 0,o=n[r];(r===i||o!==a)&&(a=o,DW.call(t,o,1))}return t},Wge=null,Gge=function(e,t,n){if(!isArray(e)&&!isPlainObject(e))return e;var r=n;return each(e,function(i,a){r=t(r,i,a)}),r},Hge=null,Yge=function(e,t){var n=[];if(!isArrayLike(e))return n;for(var r=-1,i=[],a=e.length;++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return pullAt(e,i),n},Vge=null,FW=function(e){return sp(e,"String")};function Uge(e,t){var n;if(isFunction(t))n=function(i,a){return t(i)-t(a)};else{var r=[];isString(t)?r.push(t):isArray(t)&&(r=t),n=function(i,a){for(var o=0;o<r.length;o+=1){var s=r[o];if(i[s]>a[s])return 1;if(i[s]<a[s])return-1}return 0}}return e.sort(n),e}var Xge=null,Kge=function(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=a[t];if(!isNil(o)){isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var l=o[s];r[l]||(n.push(l),r[l]=!0)}}}return n};function qge(e,t){return isArray(e)||isString(e)?e[0]===t:!1}var Jge=null;function Qge(e,t){return isArray(e)||isString(e)?e[e.length-1]===t:!1}var eme=null,BW=Object.prototype.hasOwnProperty;function tme(e,t){if(!t||!isArray(e))return{};for(var n={},r=isFunction(t)?t:function(s){return s[t]},i,a=0;a<e.length;a++){var o=e[a];i=r(o),BW.call(n,i)?n[i].push(o):n[i]=[o]}return n}var nme=null;function rme(e,t){if(!t)return{0:e};if(!isFunction(t)){var n=isArray(t)?t:t.replace(/\s+/g,"").split("*");t=function(r){for(var i="_",a=0,o=n.length;a<o;a++)i+=r[n[a]]&&r[n[a]].toString();return i}}return groupBy(e,t)}var ime=function(e,t){if(!t)return[e];var n=groupToMap(e,t),r=[];for(var i in n)r.push(n[i]);return r},pT={};function ame(e){var t=pT[e];if(!t){for(var n=e.toString(16),r=n.length;r<6;r++)n="0"+n;t="#"+n,pT[e]=t}return t}var ome=null;function sme(e){var t=0,n=0,r=0,i=0;return isArray(e)?e.length===1?t=n=r=i=e[0]:e.length===2?(t=r=e[0],n=i=e[1]):e.length===3?(t=e[0],n=i=e[1],r=e[2]):(t=e[0],n=e[1],r=e[2],i=e[3]):t=n=r=i=e,{r1:t,r2:n,r3:r,r4:i}}var lme=null,zW=function(e){return sp(e,"Number")},nd=zW,cme=function(e){return isNumber(e)&&e%1!==0},ume=null,fme=function(e){return isNumber(e)&&e%2===0},dme=null,hme=Number.isInteger?Number.isInteger:function(e){return nd(e)&&e%1===0},pme=null,vme=function(e){return isNumber(e)&&e<0},gme=null,mme=function(e){return isNumber(e)&&e%2!==0},yme=null,bme=function(e){return isNumber(e)&&e>0},xme=null,_me=function(e,t){if(isArray(e)){for(var n,r=-1/0,i=0;i<e.length;i++){var a=e[i],o=isFunction(t)?t(a):a[t];o>r&&(n=a,r=o)}return n}},wme=function(e,t){if(isArray(e)){for(var n,r=1/0,i=0;i<e.length;i++){var a=e[i],o=isFunction(t)?t(a):a[t];o<r&&(n=a,r=o)}return n}},ZW=180/Math.PI,Sme=function(e){return ZW*e},Ome=null,$W=Math.PI/180,Cme=function(e){return $W*e},Eme=null,Mme=null,WW=Object.values?function(e){return Object.values(e)}:function(e){var t=[];return fT(e,function(n,r){g_(e)&&r==="prototype"||t.push(n)}),t},GW=WW,Pme=function(e,t){return contains(values(e),t)},HW={}.toString,Tme=function(e){return HW.call(e).replace(/^\[object /,"").replace(/]$/,"")},Ame=null,Rme=function(e){return isType(e,"Arguments")},Ime=null,Lme=function(e){return isType(e,"Boolean")},Nme=null,kme=function(e){return isType(e,"Date")},jme=null,Dme=function(e){return isType(e,"Error")},Fme=null;function Bme(e){return isNumber(e)&&isFinite(e)}var YW=function(e){return e===null},VW=YW,UW=Object.prototype,zme=function(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||UW;return e===n},Zme=null,$me=function(e){return isType(e,"RegExp")},Wme=null,XW=function(e){return e===void 0},KW=XW,Gme=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=1;r<e.length;r++){var i=e[r];isFunction(i)&&(i=i.prototype),mix(n.prototype,i)}},Hme=null,vT=function(e){if(typeof e!="object"||e===null)return e;var t;if(isArray(e)){t=[];for(var n=0,r=e.length;n<r;n++)typeof e[n]=="object"&&e[n]!=null?t[n]=vT(e[n]):t[n]=e[n]}else{t={};for(var i in e)typeof e[i]=="object"&&e[i]!=null?t[i]=vT(e[i]):t[i]=e[i]}return t},Yme=null,qW=function(e,t){if(!g_(e))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return o.set(a,s),s};return n.cache=new Map,n},JW=5;function gT(e,t,n,r){n=n||0,r=r||JW;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];a!==null&&dT(a)?(dT(e[i])||(e[i]={}),n<r?gT(e[i],a,n+1,r):e[i]=t[i]):uT(a)?(e[i]=[],e[i]=e[i].concat(a)):a!==void 0&&(e[i]=a)}}var QW=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r+=1)gT(e,t[r]);return e},mT=QW,Vme=function(e,t,n,r){isFunction(t)||(n=t,t=e,e=function(){});var i=Object.create?function(o,s){return Object.create(o,{constructor:{value:s}})}:function(o,s){function l(){}l.prototype=o;var c=new l;return c.constructor=s,c},a=i(t.prototype,e);return e.prototype=mix(a,e.prototype),e.superclass=i(t.prototype,t),mix(a,n),mix(e,r),e},Ume=null,eG=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)},yT=eG,tG=function(e,t){if(!yT(e))return-1;var n=Array.prototype.indexOf;if(n)return n.call(e,t);for(var r=-1,i=0;i<e.length;i++)if(e[i]===t){r=i;break}return r},bT=tG,nG=Object.prototype.hasOwnProperty;function Xme(e){if(isNil(e))return!0;if(isArrayLike(e))return!e.length;var t=getType(e);if(t==="Map"||t==="Set")return!e.size;if(isPrototype(e))return!Object.keys(e).length;for(var n in e)if(nG.call(e,n))return!1;return!0}var Kme=null,xT=function(e,t){if(e===t)return!0;if(!e||!t||isString(e)||isString(t))return!1;if(isArrayLike(e)||isArrayLike(t)){if(e.length!==t.length)return!1;for(var n=!0,r=0;r<e.length&&(n=xT(e[r],t[r]),!!n);r++);return n}if(isObjectLike(e)||isObjectLike(t)){var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=xT(e[i[r]],t[i[r]]),!!n);r++);return n}return!1},qme=null,Jme=function(e,t,n){return isFunction(n)?!!n(e,t):isEqual(e,t)},Qme=function(e,t,n){for(var r=0,i=isString(t)?t.split("."):t;e&&r<i.length;)e=e[i[r++]];return e===void 0||r<i.length?n:e},eye=function(e,t,n){var r=e,i=isString(t)?t.split("."):t;return i.forEach(function(a,o){o<i.length-1?(isObject(r[a])||(r[a]=isNumber(i[o+1])?[]:{}),r=r[a]):r[a]=n}),e},rG=Object.prototype.hasOwnProperty,tye=function(e,t){if(e===null||!isPlainObject(e))return{};var n={};return each(t,function(r){rG.call(e,r)&&(n[r]=e[r])}),n},nye=function(e,t){return reduce(e,function(n,r,i){return t.includes(i)||(n[i]=r),n},{})},Dg={},rye=function(e){return e=e||"g",Dg[e]?Dg[e]+=1:Dg[e]=1,e+Dg[e]},ku=function(e){return e},iG=function(e){return e==null},aG=iG;function _T(e){return aG(e)?0:yT(e)?e.length:Object.keys(e).length}var Fg,iye=qW(function(e,t){t===void 0&&(t={});var n=t.fontSize,r=t.fontFamily,i=t.fontWeight,a=t.fontStyle,o=t.fontVariant;return Fg||(Fg=document.createElement("canvas").getContext("2d")),Fg.font=[a,o,i,n+"px",r].join(" "),Fg.measureText(FW(e)?e:"").width},function(e,t){return t===void 0&&(t={}),U([e],GW(t)).join("")}),aye=function(e,t,n,r){r===void 0&&(r="...");var i=16,a=measureTextWidth(r,n),o=isString(e)?e:toString(e),s=t,l=[],c,u;if(measureTextWidth(e,n)<=t)return e;for(;c=o.substr(0,i),u=measureTextWidth(c,n),!(u+a>s&&u>s);)if(l.push(c),s-=u,o=o.substr(i),!o)return l.join("");for(;c=o.substr(0,1),u=measureTextWidth(c,n),!(u+a>s);)if(l.push(c),s-=u,o=o.substr(1),!o)return l.join("");return""+l.join("")+r},oye=function(){function e(){this.map={}}return e.prototype.has=function(t){return this.map[t]!==void 0},e.prototype.get=function(t,n){var r=this.map[t];return r===void 0?n:r},e.prototype.set=function(t,n){this.map[t]=n},e.prototype.clear=function(){this.map={}},e.prototype.delete=function(t){delete this.map[t]},e.prototype.size=function(){return Object.keys(this.map).length},e}(),sye=null;class lp{constructor(t){this.options=mT({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=mT({},this.options,t),this.rescale(t)}rescale(t){}}function Bg(e,t){return t-e?n=>(n-e)/(t-e):n=>.5}function rd(e,...t){return t.reduce((n,r)=>i=>n(r(i)),e)}function m_(e,t,n,r,i){let a=n||0,o=r||e.length;const s=i||(l=>l);for(;a<o;){const l=Math.floor((a+o)/2);s(e[l])>t?o=l:a=l+1}return a}var oG=Y(19818),sG=Y.n(oG);function y_(e,t,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function lG(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100,i=e[3];if(n===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+n):r+n-r*n,o=2*r-a,s=y_(o,a,t+1/3),l=y_(o,a,t),c=y_(o,a,t-1/3);return[s*255,l*255,c*255,i]}function wT(e){const t=sG().get(e);if(!t)return null;const{model:n,value:r}=t;return n==="rgb"?r:n==="hsl"?lG(r):null}const id=(e,t)=>n=>e*(1-n)+t*n,cG=(e,t)=>{const n=wT(e),r=wT(t);return n===null||r===null?n?()=>e:()=>t:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=n[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,l,c]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(l)}, ${c})`}},cp=(e,t)=>typeof e=="number"&&typeof t=="number"?id(e,t):typeof e=="string"&&typeof t=="string"?cG(e,t):()=>e,uG=(e,t)=>{const n=id(e,t);return r=>Math.round(n(r))};function zg(e){return!KW(e)&&!VW(e)&&!Number.isNaN(e)}const b_=Math.sqrt(50),x_=Math.sqrt(10),__=Math.sqrt(2);function Zg(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/oa(10,i);return i>=0?(a>=b_?10:a>=x_?5:a>=__?2:1)*oa(10,i):-oa(10,-i)/(a>=b_?10:a>=x_?5:a>=__?2:1)}function ST(e,t,n){const r=Math.abs(t-e)/Math.max(0,n);let i=oa(10,Math.floor(Math.log(r)/Math.LN10));const a=r/i;return a>=b_?i*=10:a>=x_?i*=5:a>=__&&(i*=2),t<e?-i:i}const OT=(e,t,n=5)=>{const r=[e,t];let i=0,a=r.length-1,o=r[i],s=r[a],l;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),l=Zg(o,s,n),l>0?(o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l,l=Zg(o,s,n)):l<0&&(o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l,l=Zg(o,s,n)),l>0?(r[i]=Math.floor(o/l)*l,r[a]=Math.ceil(s/l)*l):l<0&&(r[i]=Math.ceil(o*l)/l,r[a]=Math.floor(s*l)/l),r};function fG(e,t){const n=t<e?t:e,r=e>t?e:t;return i=>Math.min(Math.max(n,i),r)}const dG=(e,t,n)=>{const[r,i]=e,[a,o]=t;let s,l;return r<i?(s=Bg(r,i),l=n(a,o)):(s=Bg(i,r),l=n(o,a)),rd(l,s)},hG=(e,t,n)=>{const r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=e[0]>e[r],s=o?[...e].reverse():e,l=o?[...t].reverse():t;for(let c=0;c<r;c+=1)i[c]=Bg(s[c],s[c+1]),a[c]=n(l[c],l[c+1]);return c=>{const u=m_(e,c,1,r)-1,f=i[u],d=a[u];return rd(d,f)(c)}},CT=(e,t,n,r)=>(Math.min(e.length,t.length)>2?hG:dG)(e,t,r?uG:n);class $g extends lp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:id,tickCount:5}}map(t){return zg(t)?this.output(t):this.options.unknown}invert(t){return zg(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,n,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,n,r,...i)}getTicks(){const{tickMethod:t}=this.options,[n,r,i,...a]=this.getTickMethodOptions();return t(n,r,i,...a)}getTickMethodOptions(){const{domain:t,tickCount:n}=this.options,r=t[0],i=t[t.length-1];return[r,i,n]}chooseNice(){return OT}rescale(){this.nice();const[t,n]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,n,this.chooseClamp(n))}chooseClamp(t){const{clamp:n,range:r}=this.options,i=this.options.domain.map(t),a=Math.min(i.length,r.length);return n?fG(i[0],i[a-1]):ku}composeOutput(t,n){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=CT(r.map(t),i,o,a);this.output=rd(s,n,t)}composeInput(t,n,r){const{domain:i,range:a}=this.options,o=CT(a,i.map(t),id);this.input=rd(n,r,o)}}const ju=(e,t,n)=>{let r,i,a=e,o=t;if(a===o&&n>0)return[a];let s=Zg(a,o,n);if(s===0||!Number.isFinite(s))return[];if(s>0){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)/s}return i};class Qa extends $g{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:cp,tickMethod:ju,tickCount:5}}chooseTransforms(){return[ku,ku]}clone(){return new Qa(this.options)}}function pG(e,t){if(e){var n;if(ua(e))for(var r=0,i=e.length;r<i&&(n=t(e[r],r),n!==!1);r++);else if(bu(e)){for(var a in e)if(e.hasOwnProperty(a)&&(n=t(e[a],a),n===!1))break}}}var w_=pG,vG=function(e,t,n){if(!ua(e)&&!zl(e))return e;var r=n;return w_(e,function(i,a){r=t(r,i,a)}),r},ET=vG,S_=function(e,t){return ET(e,function(n,r,i){return t.includes(i)||(n[i]=r),n},{})};function Hl(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}function MT(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<e.length;a++){var o=e[a],s=o.x,l=o.y,c=o.width,u=o.height,f=w([s+c,l+u],2),d=f[0],h=f[1];s<t&&(t=s),l<n&&(n=l),d>r&&(r=d),h>i&&(i=h)}return new ui(t,n,r-t,i-n)}var gG=function(e,t,n){var r=e.width,i=e.height,a=n.flexDirection,o=a===void 0?"row":a,s=n.flexWrap,l=s===void 0?"nowrap":s,c=n.justifyContent,u=c===void 0?"flex-start":c,f=n.alignContent,d=f===void 0?"flex-start":f,h=n.alignItems,p=h===void 0?"flex-start":h,v=o==="row",g=o==="row"||o==="column",m=v?g?[1,0]:[-1,0]:g?[0,1]:[0,-1],b=w([0,0],2),_=b[0],S=b[1],O=t.map(function(I){var L,F=I.width,Z=I.height,H=w([_,S],2),W=H[0],G=H[1];return L=w([_+F*m[0],S+Z*m[1]],2),_=L[0],S=L[1],new ui(W,G,F,Z)}),C=MT(O),E={"flex-start":0,"flex-end":v?r-C.width:i-C.height,center:v?(r-C.width)/2:(i-C.height)/2},P=O.map(function(I){var L=I.x,F=I.y,Z=ui.fromRect(I);return Z.x=v?L+E[u]:L,Z.y=v?F:F+E[u],Z}),T=MT(P),A=function(I){var L=w(v?["height",i]:["width",r],2),F=L[0],Z=L[1];switch(p){case"flex-start":return 0;case"flex-end":return Z-I[F];case"center":return Z/2-I[F]/2;default:return 0}},R=P.map(function(I){var L=I.x,F=I.y,Z=ui.fromRect(I);return Z.x=v?L:L+A(Z),Z.y=v?F+A(Z):F,Z}),z=R.map(function(I){var L,F,Z=ui.fromRect(I);return Z.x+=(L=e.x)!==null&&L!==void 0?L:0,Z.y+=(F=e.y)!==null&&F!==void 0?F:0,Z});return z},mG=function(e,t,n){return[]},yG=function(e,t,n){if(t.length===0)return[];var r={flex:gG,grid:mG},i=n.display in r?r[n.display]:null;return(i==null?void 0:i.call(null,e,t,n))||[]},bG=function(e){zt(t,e);function t(n){var r=e.call(this,n)||this;r.layoutEvents=[vn.BOUNDS_CHANGED,vn.INSERTED,vn.REMOVED],r.$margin=Ga(0),r.$padding=Ga(0);var i=n.style||{},a=i.margin,o=a===void 0?0:a,s=i.padding,l=s===void 0?0:s;return r.margin=o,r.padding=l,r.isMutationObserved=!0,r.bindEvents(),r}return Object.defineProperty(t.prototype,"margin",{get:function(){return this.$margin},set:function(n){this.$margin=Ga(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this.$padding},set:function(n){this.$padding=Ga(n)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n=this.attributes,r=n.x,i=r===void 0?0:r,a=n.y,o=a===void 0?0:a,s=n.width,l=n.height,c=w(this.$margin,4),u=c[0],f=c[1],d=c[2],h=c[3];return new ui(i-h,o-u,s+h+f,l+u+d)},t.prototype.appendChild=function(n,r){return n.isMutationObserved=!0,e.prototype.appendChild.call(this,n,r),n},t.prototype.getAvailableSpace=function(){var n=this.attributes,r=n.width,i=n.height,a=w(this.$padding,4),o=a[0],s=a[1],l=a[2],c=a[3],u=w(this.$margin,4),f=u[0],d=u[3];return new ui(c+d,o+f,r-c-s,i-o-l)},t.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(r){return!r.isConnected}))try{var n=yG(this.getAvailableSpace(),this.children.map(function(r){return r.getBBox()}),this.attributes);this.children.forEach(function(r,i){var a=n[i],o=a.x,s=a.y;r.attr({x:o,y:s})})}catch(r){}},t.prototype.bindEvents=function(){var n=this;this.layoutEvents.forEach(function(r){n.addEventListener(r,function(i){i.target.isMutationObserved=!0,n.layout()})})},t.prototype.attributeChangedCallback=function(n,r,i){n==="margin"?this.margin=i:n==="padding"&&(this.padding=i),this.layout()},t}(xa),xG=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function _G(e){return class extends eg{constructor(t){super(t),this.descriptor=e}connectedCallback(){var t,n;(n=(t=this.descriptor).render)===null||n===void 0||n.call(t,this.attributes,this)}update(t={}){var n,r;this.attr(Je({},this.attributes,t)),(r=(n=this.descriptor).render)===null||r===void 0||r.call(n,this.attributes,this)}}}function PT(e,t,n){return e.querySelector(t)?gn(e).select(t):gn(e).append(n)}function Wg(e){return Array.isArray(e)?e.join(", "):`${e||""}`}function TT(e,t){const n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};let{flexDirection:r,justifyContent:i,alignItems:a}=n;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 e in o&&([r,i,a]=o[e]),Object.assign({display:"flex",flexDirection:r,justifyContent:i,alignItems:a},t)}class AT extends bG{get child(){var t;return(t=this.children)===null||t===void 0?void 0:t[0]}update(t){var n;this.attr(t);const{subOptions:r}=t;(n=this.child)===null||n===void 0||n.update(r)}}class wG extends AT{update(t){var n;const{subOptions:r}=t;this.attr(t),(n=this.child)===null||n===void 0||n.update(r)}}function ll(e,t){var n;return(n=e.filter(r=>r.getOptions().name===t))===null||n===void 0?void 0:n[0]}function SG(e){return e==="horizontal"||e===0}function OG(e){return e==="vertical"||e===-Math.PI/2}function RT(e,t,n){const{bbox:r}=e,{position:i="top",size:a,length:o}=t,s=["top","bottom","center"].includes(i),[l,c]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=n.props,d=a||u||l,h=o||f||c,p=s?"horizontal":"vertical",[v,g]=s?[h,d]:[d,h];return{orientation:p,width:v,height:g,size:d,length:h}}function CG(e){return e.find(t=>t.getOptions().domain.length>0).getOptions().domain}function Gg(e){const t=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=e,r=xG(e,["style"]),i={};return Object.entries(r).forEach(([a,o])=>{t.includes(a)?i[`show${Rc(a)}`]=o:i[a]=o}),Object.assign(Object.assign({},i),n)}var IT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function LT(e,t){const{eulerAngles:n,origin:r}=t;r&&e.setOrigin(r),n&&e.rotate(n[0],n[1],n[2])}function NT(e){const{innerWidth:t,innerHeight:n,depth:r}=e.getOptions();return[t,n,r]}function EG(e,t){const{width:n,height:r}=t.getOptions();return i=>{if(!SP(t))return i;const a=e==="bottom"?[i,1]:[0,i],o=t.map(a);if(e==="bottom"){const s=o[0];return new Qa({domain:[0,n],range:[0,1]}).map(s)}else if(e==="left"){const s=o[1];return new Qa({domain:[0,r],range:[0,1]}).map(s)}return i}}function MG(e,t,n){if(e.getTicks)return e.getTicks();if(!n)return t;const[r,i]=Hl(t,o=>+o),{tickCount:a}=e.getOptions();return n(r,i,a)}function PG(e,t){if(Jr(t))return h=>h;const n=t.getOptions(),{innerWidth:r,innerHeight:i,insetTop:a,insetBottom:o,insetLeft:s,insetRight:l}=n,[c,u,f]=e==="left"||e==="right"?[a,o,i]:[s,l,r],d=new Qa({domain:[0,1],range:[c/f,1-u/f]});return h=>d.map(h)}function kT(e,t,n,r,i,a,o,s){var l;(n!==void 0||a!==void 0)&&e.update(Object.assign(Object.assign({},n&&{tickCount:n}),a&&{tickMethod:a}));const c=MG(e,t,a),u=i?c.filter(i):c,f=m=>m instanceof Date?String(m):typeof m=="object"&&m?m:String(m),d=r||((l=e.getFormatter)===null||l===void 0?void 0:l.call(e))||f,h=PG(o,s),p=EG(o,s),v=m=>["top","bottom","center","outer"].includes(m),g=m=>["left","right"].includes(m);return Jr(s)||ci(s)?u.map((m,b,_)=>{var S,O;const C=((S=e.getBandWidth)===null||S===void 0?void 0:S.call(e,m))/2||0,E=h(e.map(m)+C);return{value:Qh(s)&&o==="center"||ci(s)&&((O=e.getTicks)===null||O===void 0?void 0:O.call(e))&&v(o)||ci(s)&&g(o)?1-E:E,label:f(d(Cg(m),b,_)),id:String(b)}}):u.map((m,b,_)=>{var S;const O=((S=e.getBandWidth)===null||S===void 0?void 0:S.call(e,m))/2||0,C=p(h(e.map(m)+O));return{value:g(o)?1-C:C,label:f(d(Cg(m),b,_)),id:String(b)}})}function TG(e,t,n="xy"){const[r,i,a]=NT(t);return n==="xy"?e.includes("bottom")||e.includes("top")?i:r:n==="xz"?e.includes("bottom")||e.includes("top")?a:r:e.includes("bottom")||e.includes("top")?i:a}function AG(e=[],t){if(e.length>0)return e;const{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:a}=t,o=[],s=(l,c)=>{c&&o.push(Object.assign(Object.assign({},l),c))};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},a),o}function RG(e,t,n,r,i){const{x:a,y:o,width:s,height:l}=t,c=[a+s/2,o+l/2],u=Math.min(s,l)/2,[f,d]=Q2(i),[h,p]=NT(i),v=Math.min(h,p)/2,g={center:c,radius:u,startAngle:f,endAngle:d,gridLength:(r-n)*v};if(e==="inner"){const{insetLeft:m,insetTop:b}=i.getOptions();return Object.assign(Object.assign({},g),{center:[c[0]-m,c[1]-b],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},g),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}function IG(e,t,n){return OP(t)||ep(t)?!1:e===void 0?!!n.getTicks:e}function LG(e){const{depth:t}=e.getOptions();return t?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function NG(e,t,n,r,i){const{x:a,y:o,width:s,height:l}=n;if(e==="bottom")return{startPos:[a,o],endPos:[a+s,o]};if(e==="left")return{startPos:[a+s,o+l],endPos:[a+s,o]};if(e==="right")return{startPos:[a,o+l],endPos:[a,o]};if(e==="top")return{startPos:[a,o+l],endPos:[a+s,o+l]};if(e==="center"){if(t==="vertical")return{startPos:[a,o],endPos:[a,o+l]};if(t==="horizontal")return{startPos:[a,o],endPos:[a+s,o]};if(typeof t=="number"){const[c,u]=r.getCenter(),[f,d]=Eg(r),[h,p]=Q2(r),v=Math.min(s,l)/2,{insetLeft:g,insetTop:m}=r.getOptions(),b=f*v,_=d*v,[S,O]=[c+a-g,u+o-m],[C,E]=[Math.cos(t),Math.sin(t)],P=[S+_*C,O+_*E],T=[S+b*C,O+b*E],A=()=>{const{domain:z}=i.getOptions();return z.length},R=Jr(r)&&i?A():3;return{startPos:P,endPos:T,gridClosed:Math.abs(p-h-360)<1e-6,gridCenter:[S,O],gridControlAngles:new Array(R).fill(0).map((z,I,L)=>(p-h)/R*I)}}}return{}}const kG=e=>{const{order:t,size:n,position:r,orientation:i,labelFormatter:a,tickFilter:o,tickCount:s,tickMethod:l,important:c={},style:u={},indexBBox:f,title:d,grid:h=!1}=e,p=IT(e,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[v],value:g,coordinate:m,theme:b})=>{const{bbox:_}=g,{domain:S}=v.getOptions(),O=kT(v,S,s,a,o,l,r,m),C=f?O.map((I,L)=>{const F=f.get(L);return!F||F[0]!==I.label?I:Object.assign(Object.assign({},I),{bbox:F[1]})}):O,[E,P]=Eg(m),T=RG(r,_,E,P,m),{axis:A,axisArc:R={}}=b,z=Gg(Je({},A,R,T,Object.assign(Object.assign({type:"arc",data:C,titleText:Wg(d),grid:h},p),c)));return new v_({style:S_(z,["transform"])})}};function jG(e,t,n,r,i,a){const o=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${Y2(i)}`]:n.axisLinear,l=e.getOptions().name,c=n[`axis${Rc(l)}`]||{};return Object.assign({},o,s,c)}function DG(e,t,n,r,i,a){const o=jG(e,t,n,r,i,a);return i==="center"?Object.assign(Object.assign(Object.assign(Object.assign({},o),{labelDirection:r==="right"?"negative":"positive"}),r==="center"?{labelTransform:"translate(50%,0)"}:null),{tickDirection:r==="right"?"negative":"positive",labelSpacing:r==="center"?0:4,titleSpacing:OG(a)?10:0,tick:r==="center"?!1:void 0}):o}const FG=e=>{const{direction:t="left",important:n={},labelFormatter:r,order:i,orientation:a,actualPosition:o,position:s,size:l,style:c={},title:u,tickCount:f,tickFilter:d,tickMethod:h,transform:p,indexBBox:v}=e,g=IT(e,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:m,value:b,coordinate:_,theme:S})=>{const{bbox:O}=b,[C]=m,{domain:E,xScale:P}=C.getOptions(),T=DG(C,_,S,t,s,a),A=Object.assign(Object.assign(Object.assign({},T),c),g),R=TG(o||s,_,e.plane),z=NG(s,a,O,_,P),I=LG(_),L=kT(C,E,f,r,d,h,s,_),F=v?L.map((W,G)=>{const J=v.get(G);return!J||J[0]!==W.label?W:Object.assign(Object.assign({},W),{bbox:J[1]})}):L,Z=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A),{type:"linear",data:F,crossSize:l,titleText:Wg(u),labelOverlap:AG(p,A),grid:IG(A.grid,_,C),gridLength:R,line:!0,indexBBox:v}),A.line?null:{lineOpacity:0}),z),I),n);return Z.labelOverlap.find(W=>W.type==="hide")&&(Z.crossSize=!1),new v_({className:"axis",style:Gg(Z)})}},jT=e=>t=>{const{labelFormatter:n,labelFilter:r=()=>!0}=t;return i=>{var a;const{scales:[o]}=i,s=((a=o.getTicks)===null||a===void 0?void 0:a.call(o))||o.getOptions().domain,l=typeof n=="string"?Ic(n):n,c=(f,d,h)=>r(s[d],d,s),u=Object.assign(Object.assign({},t),{labelFormatter:l,labelFilter:c,scale:o});return e(u)(i)}},kc=jT(FG),DT=jT(kG);kc.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},DT.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var BG=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function zG(e){const t=e%(Math.PI*2);return t===Math.PI/2?{titleTransform:"translate(0, 50%)"}:t>-Math.PI/2&&t<Math.PI/2?{titleTransform:"translate(50%, 0)"}:t>Math.PI/2&&t<Math.PI*3/2?{titleTransform:"translate(-50%, 0)"}:{}}function ZG(e,t,n,r){const{radar:i}=e,[a]=r,o=a.getOptions().name,[s,l]=Q2(n),{axisRadar:c={}}=t;return Object.assign(Object.assign({},c),{grid:o==="position",gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((u,f)=>(l-s)/i.count*f)})}const FT=e=>{const{important:t={}}=e,n=BG(e,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return kc(Object.assign(Object.assign(Object.assign({},n),zG(e.orientation)),{important:Object.assign(Object.assign({},ZG(e,i,a,o)),t)}))(r)}};FT.props=Object.assign(Object.assign({},kc.props),{defaultPosition:"center"});function Hg(e,t){return+e.toPrecision(t)}function lye(e){return e.toLocaleString()}function cye(e){return e.toExponential()}function uye(e,t){return t===void 0&&(t=0),Math.abs(e)<1e3?String(e):"".concat(Hg(e/1e3,t).toLocaleString(),"K")}var fye=function(e,t,n){return e<0&&Number.isFinite(e)?t:n},dye=function(e,t,n){return e>0&&Number.isFinite(e)?t:n},hye=function(e,t){return e*t},pye=function(e,t){return e/2+(t||0)/2};function Yg(e){var t=e.canvas,n=e.touches,r=e.offsetX,i=e.offsetY;if(t){var a=t.x,o=t.y;return[a,o]}if(n){var s=n[0],l=s.clientX,c=s.clientY;return[l,c]}return r&&i?[r,i]:[0,0]}var $G={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(e){return e.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},O_=Ss({background:"background",labelGroup:"label-group",label:"label"},"indicator"),WG=function(e){zt(t,e);function t(n){var r=e.call(this,n,$G)||this;return r.point=[0,0],r.group=r.appendChild(new xa({})),r.isMutationObserved=!0,r}return t.prototype.renderBackground=function(){if(this.label){var n=this.attributes,r=n.position,i=n.padding,a=w(Ga(i),4),o=a[0],s=a[1],l=a[2],c=a[3],u=this.label.node().getLocalBounds(),f=u.min,d=u.max,h=new ui(f[0]-c,f[1]-o,d[0]+s-f[0]+c,d[1]+l-f[1]+o),p=this.getPath(r,h),v=Jn(this.attributes,"background");this.background=Tn(this.group).maybeAppendByClassName(O_.background,"path").styles(Ie(Ie({},v),{path:p})),this.group.appendChild(this.label.node())}},t.prototype.renderLabel=function(){var n=this.attributes,r=n.formatter,i=n.labelText,a=Jn(this.attributes,"label"),o=w(Gl(a),2),s=o[0],l=o[1],c=s.text,u=Sr(s,["text"]);if(this.label=Tn(this.group).maybeAppendByClassName(O_.labelGroup,"g").styles(l),!!i){var f=this.label.maybeAppendByClassName(O_.label,function(){return Nu(r(i))}).style("text",r(i).toString());f.selectAll("text").styles(u)}},t.prototype.adjustLayout=function(){var n=w(this.point,2),r=n[0],i=n[1];this.group.attr("x",-r).attr("y",-i)},t.prototype.getPath=function(n,r){var i=this.attributes.radius,a=r.x,o=r.y,s=r.width,l=r.height,c=[["M",a+i,o],["L",a+s-i,o],["A",i,i,0,0,1,a+s,o+i],["L",a+s,o+l-i],["A",i,i,0,0,1,a+s-i,o+l],["L",a+i,o+l],["A",i,i,0,0,1,a,o+l-i],["L",a,o+i],["A",i,i,0,0,1,a+i,o],["Z"]],u={top:4,right:6,bottom:0,left:2},f=u[n],d=this.createCorner([c[f].slice(-2),c[f+1].slice(-2)]);return c.splice.apply(c,N([f+1,1],w(d),!1)),c[0][0]="M",c},t.prototype.createCorner=function(n,r){r===void 0&&(r=10);var i=.8,a=Q$.apply(void 0,N([],w(n),!1)),o=w(n,2),s=w(o[0],2),l=s[0],c=s[1],u=w(o[1],2),f=u[0],d=u[1],h=w(a?[f-l,[l,f]]:[d-c,[c,d]],2),p=h[0],v=w(h[1],2),g=v[0],m=v[1],b=p/2,_=p/Math.abs(p),S=r*_,O=S/2,C=S*Math.sqrt(3)/2*i,E=w([g,g+b-O,g+b,g+b+O,m],5),P=E[0],T=E[1],A=E[2],R=E[3],z=E[4];return a?(this.point=[A,c-C],[["L",P,c],["L",T,c],["L",A,c-C],["L",R,c],["L",z,c]]):(this.point=[l+C,A],[["L",l,P],["L",l,T],["L",l+C,A],["L",l,R],["L",l,z]])},t.prototype.applyVisibility=function(){var n=this.attributes.visibility;n==="hidden"?Nc(this):tp(this)},t.prototype.bindEvents=function(){this.label.on(vn.BOUNDS_CHANGED,this.renderBackground)},t.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},t}(Ra),BT={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},zT={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},ZT={orientation:"horizontal",showLabel:!0,type:"start"},cl=Ss({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),jc=Ss({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),GG=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r){var i=n.size,a=i===void 0?10:i,o=n.radius,s=o===void 0?a/4:o,l=n.orientation,c=Sr(n,["size","radius","orientation"]),u=a,f=u*2.4,d=Tn(r).maybeAppendByClassName(jc.iconRect,"rect").styles(Ie(Ie({},c),{width:u,height:f,radius:s,x:-u/2,y:-f/2})),h=1/3*u,p=2/3*u,v=1/4*f,g=3/4*f;d.maybeAppendByClassName("".concat(jc.iconLine,"-1"),"line").styles(Ie({x1:h,x2:h,y1:v,y2:g},c)),d.maybeAppendByClassName("".concat(jc.iconLine,"-2"),"line").styles(Ie({x1:p,x2:p,y1:v,y2:g},c)),d.node().setOrigin(u/2,f/2),l==="vertical"?r.setLocalEulerAngles(90):r.setLocalEulerAngles(0)},t}(Ra),$T=function(e){zt(t,e);function t(n){return e.call(this,n,ZT)||this}return t.prototype.renderLabel=function(n){var r=this,i=this.attributes.showLabel,a=Jn(this.attributes,"label"),o=a.transform,s=Sr(a,["transform"]),l=w(Gl(s,[]),2),c=l[0],u=l[1],f=Tn(n).maybeAppendByClassName(jc.labelGroup,"g").styles(u),d=Ie(Ie({},zT),c),h=d.text,p=Sr(d,["text"]);zo(!!i,f,function(v){r.label=v.maybeAppendByClassName(jc.label,"text").styles(Ie(Ie({},p),{transform:o,text:"".concat(h)})),r.label.on("mousedown",function(g){g.stopPropagation()}),r.label.on("touchstart",function(g){g.stopPropagation()})})},t.prototype.renderIcon=function(n){var r=this.attributes,i=r.orientation,a=r.type,o=Ie(Ie({orientation:i},BT),Jn(this.attributes,"icon")),s=this.attributes.iconShape,l=s===void 0?function(){return new GG({style:o})}:s,c=Tn(n).maybeAppendByClassName(jc.iconGroup,"g");c.selectAll(jc.icon.class).data([l]).join(function(u){return u.append(typeof l=="string"?l:function(){return l(a)}).attr("className",jc.icon.name)},function(u){return u.update(o)},function(u){return u.remove()})},t.prototype.render=function(n,r){this.renderIcon(r),this.renderLabel(r)},t}(Ra),WT=function(e,t,n){return[["M",e-n,t],["A",n,n,0,1,0,e+n,t],["A",n,n,0,1,0,e-n,t],["Z"]]},HG=WT,YG=function(e,t,n){return[["M",e-n,t-n],["L",e+n,t-n],["L",e+n,t+n],["L",e-n,t+n],["Z"]]},VG=function(e,t,n){return[["M",e-n,t],["L",e,t-n],["L",e+n,t],["L",e,t+n],["Z"]]},UG=function(e,t,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t+r],["L",e,t-r],["L",e+n,t+r],["Z"]]},XG=function(e,t,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t-r],["L",e+n,t-r],["L",e,t+r],["Z"]]},KG=function(e,t,n){var r=n/2*Math.sqrt(3);return[["M",e,t-n],["L",e+r,t-n/2],["L",e+r,t+n/2],["L",e,t+n],["L",e-r,t+n/2],["L",e-r,t-n/2],["Z"]]},qG=function(e,t,n){var r=n-1.5;return[["M",e-n,t-r],["L",e+n,t+r],["L",e+n,t-r],["L",e-n,t+r],["Z"]]},GT=function(e,t,n){return[["M",e,t+n],["L",e,t-n]]},JG=function(e,t,n){return[["M",e-n,t-n],["L",e+n,t+n],["M",e+n,t-n],["L",e-n,t+n]]},QG=function(e,t,n){return[["M",e-n/2,t-n],["L",e+n/2,t-n],["M",e,t-n],["L",e,t+n],["M",e-n/2,t+n],["L",e+n/2,t+n]]},eH=function(e,t,n){return[["M",e-n,t],["L",e+n,t],["M",e,t-n],["L",e,t+n]]},tH=function(e,t,n){return[["M",e-n,t],["L",e+n,t]]},HT=function(e,t,n){return[["M",e-n,t],["L",e+n,t]]},nH=HT,rH=function(e,t,n){return[["M",e-n,t],["A",n/2,n/2,0,1,1,e,t],["A",n/2,n/2,0,1,0,e+n,t]]},iH=function(e,t,n){return[["M",e-n-1,t-2.5],["L",e,t-2.5],["L",e,t+2.5],["L",e+n+1,t+2.5]]},aH=function(e,t,n){return[["M",e-n-1,t+2.5],["L",e,t+2.5],["L",e,t-2.5],["L",e+n+1,t-2.5]]},oH=function(e,t,n){return[["M",e-(n+1),t+2.5],["L",e-n/2,t+2.5],["L",e-n/2,t-2.5],["L",e+n/2,t-2.5],["L",e+n/2,t+2.5],["L",e+n+1,t+2.5]]};function sH(e,t){return[["M",e-5,t+2.5],["L",e-5,t],["L",e,t],["L",e,t-3],["L",e,t+3],["L",e+6.5,t+3]]}var lH=function(e,t,n){return[["M",e-n,t-n],["L",e+n,t],["L",e-n,t+n],["Z"]]};function cH(e){var t="default";if(bu(e)&&e instanceof Image)t="image";else if(bo(e))t="symbol";else if(xi(e)){var n=new RegExp("data:(image|text)");e.match(n)?t="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?t="url":t="symbol"}return t}function uH(e){var t=cH(e);return["base64","url","image"].includes(t)?"image":e&&t==="symbol"?"path":null}var Pr=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r){var i=this.getSubShapeStyle(n),a=i.symbol,o=i.size,s=o===void 0?16:o,l=Sr(i,["symbol","size"]),c=uH(a);zo(!!c,Tn(r),function(u){u.maybeAppendByClassName("marker",c).attr("className","marker ".concat(c,"-marker")).call(function(f){if(c==="image"){var d=s*2;f.styles({img:a,width:d,height:d,x:-s,y:-s})}else{var d=s/2,h=bo(a)?a:t.getSymbol(a);f.styles(Ie({path:h==null?void 0:h(0,0,d)},l))}})})},t.MARKER_SYMBOL_MAP=new Map,t.registerSymbol=function(n,r){t.MARKER_SYMBOL_MAP.set(n,r)},t.getSymbol=function(n){return t.MARKER_SYMBOL_MAP.get(n)},t.getSymbols=function(){return Array.from(t.MARKER_SYMBOL_MAP.keys())},t}(Ra);Pr.registerSymbol("cross",JG),Pr.registerSymbol("hyphen",tH),Pr.registerSymbol("line",GT),Pr.registerSymbol("plus",eH),Pr.registerSymbol("tick",QG),Pr.registerSymbol("circle",WT),Pr.registerSymbol("point",HG),Pr.registerSymbol("bowtie",qG),Pr.registerSymbol("hexagon",KG),Pr.registerSymbol("square",YG),Pr.registerSymbol("diamond",VG),Pr.registerSymbol("triangle",UG),Pr.registerSymbol("triangle-down",XG),Pr.registerSymbol("line",GT),Pr.registerSymbol("dot",HT),Pr.registerSymbol("dash",nH),Pr.registerSymbol("smooth",rH),Pr.registerSymbol("hv",iH),Pr.registerSymbol("vh",aH),Pr.registerSymbol("hvh",oH),Pr.registerSymbol("vhv",sH);function fH(e,t,n){var r=Math.round((e-n)/t);return n+r*t}function dH(e,t,n){var r=1.4,i=r*n;return[["M",e-n,t-i],["L",e+n,t-i],["L",e+n,t+i],["L",e-n,t+i],["Z"]]}var YT=1.4,VT=.4;function hH(e,t,n){var r=n,i=r*YT,a=r/2,o=r/6,s=e+i*VT;return[["M",e,t],["L",s,t+a],["L",e+i,t+a],["L",e+i,t-a],["L",s,t-a],["Z"],["M",s,t+o],["L",e+i-2,t+o],["M",s,t-o],["L",e+i-2,t-o]]}function pH(e,t,n){var r=n,i=r*YT,a=r/2,o=r/6,s=t+i*VT;return[["M",e,t],["L",e-a,s],["L",e-a,t+i],["L",e+a,t+i],["L",e+a,s],["Z"],["M",e-o,s],["L",e-o,t+i-2],["M",e+o,s],["L",e+o,t+i-2]]}Pr.registerSymbol("hiddenHandle",dH),Pr.registerSymbol("verticalHandle",hH),Pr.registerSymbol("horizontalHandle",pH);var vye=function(e,t,n){return e===void 0&&(e="horizontal"),e==="horizontal"?t:n};function vH(e,t,n,r){var i;r===void 0&&(r=4);var a=w(e,2),o=a[0],s=a[1],l=w(t,2),c=l[0],u=l[1],f=w(n,2),d=f[0],h=f[1],p=w([c,u],2),v=p[0],g=p[1],m=g-v;return v>g&&(i=w([g,v],2),v=i[0],g=i[1]),m>s-o?[o,s]:v<o?d===o&&h===g?[o,g]:[o,m+o]:g>s?h===s&&d===v?[v,s]:[s-m,s]:[v,g]}function ul(e,t,n){return e===void 0&&(e="horizontal"),e==="horizontal"?t:n}var up=Ss({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),UT={showLabel:!0,formatter:function(e){return e.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},gH=function(e){zt(t,e);function t(n){return e.call(this,n,UT)||this}return t.prototype.render=function(n,r){var i=Tn(r).maybeAppendByClassName(up.markerGroup,"g");this.renderMarker(i);var a=Tn(r).maybeAppendByClassName(up.labelGroup,"g");this.renderLabel(a)},t.prototype.renderMarker=function(n){var r=this,i=this.attributes,a=i.orientation,o=i.markerSymbol,s=o===void 0?ul(a,"horizontalHandle","verticalHandle"):o;zo(!!s,n,function(l){var c=Jn(r.attributes,"marker"),u=Ie({symbol:s},c);r.marker=l.maybeAppendByClassName(up.marker,function(){return new Pr({style:u})}).update(u)})},t.prototype.renderLabel=function(n){var r=this,i=this.attributes,a=i.showLabel,o=i.orientation,s=i.spacing,l=s===void 0?0:s,c=i.formatter;zo(a,n,function(u){var f,d=Jn(r.attributes,"label"),h=d.text,p=Sr(d,["text"]),v=((f=u.select(up.marker.class))===null||f===void 0?void 0:f.node().getBBox())||{},g=v.width,m=g===void 0?0:g,b=v.height,_=b===void 0?0:b,S=w(ul(o,[0,_+l,"center","top"],[m+l,0,"start","middle"]),4),O=S[0],C=S[1],E=S[2],P=S[3];u.maybeAppendByClassName(up.label,"text").styles(Ie(Ie({},p),{x:O,y:C,text:c(h).toString(),textAlign:E,textBaseline:P}))})},t}(Ra),XT={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},mH=$l({},XT,{}),yH=$l({},XT,sl(UT,"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"}),bH=.01,gye=.5,Ia=Ss({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 xH(e,t){for(var n=1;n<e.length;n+=1){var r=e[n-1],i=e[n];if(t>=r&&t<=i)return[r,i]}return[t,t]}function _H(e,t,n){var r=Array.from(t),i=e.length;return new Array(i).fill(0).reduce(function(a,o,s){var l=r[s%r.length];return a+=" ".concat(e[s],":").concat(l).concat(s<i-1?" ".concat(e[s+1],":").concat(l):"")},"l(".concat(n==="horizontal"?"0":"270",")"))}function KT(e,t){var n=w(xH(e,t),2),r=n[0],i=n[1];return{tick:t>(r+i)/2?i:r,range:[r,i]}}var fp=Ss({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function qT(e){var t=e.orientation,n=e.size,r=e.length;return ul(t,[r,n],[n,r])}function JT(e){var t=e.type,n=w(qT(e),2),r=n[0],i=n[1];return t==="size"?[["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 wH(e){return JT(e)}function SH(e){var t=e.orientation,n=e.color,r=e.block,i=e.partition,a;if(bo(n)){var o=20;a=new Array(o).fill(0).map(function(c,u,f){return n(u/(f.length-1))})}else a=n;var s=a.length,l=a.map(function(c){return jl(c).toString()});return s?s===1?l[0]:r?_H(i,l,t):l.reduce(function(c,u,f){return c+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(ul(t,"0","270"),")")):""}function OH(e){var t=e.orientation,n=e.range;if(!n)return[];var r=w(qT(e),2),i=r[0],a=r[1],o=w(n,2),s=o[0],l=o[1],c=ul(t,s*i,0),u=ul(t,0,s*a),f=ul(t,l*i,i),d=ul(t,a,l*a);return[["M",c,u],["L",c,d],["L",f,d],["L",f,u],["Z"]]}function CH(e,t){var n=Jn(t,"track");e.maybeAppendByClassName(fp.track,"path").styles(Ie({path:JT(t)},n))}function EH(e,t){var n=Jn(t,"selection"),r=SH(t),i=e.maybeAppendByClassName(fp.selection,"path").styles(Ie({path:wH(t),fill:r},n)),a=i.maybeAppendByClassName(fp.clipPath,"path").styles({path:OH(t)}).node();i.style("clip-path",a)}var MH=function(e){zt(t,e);function t(n){return e.call(this,n,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return t.prototype.render=function(n,r){var i=Tn(r).maybeAppendByClassName(fp.trackGroup,"g");CH(i,n);var a=Tn(r).maybeAppendByClassName(fp.selectionGroup,"g");EH(a,n)},t}(Ra);function PH(e){return{min:Math.min.apply(Math,N([],w(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,N([],w(e.map(function(t){return t.value})),!1))}}var TH=function(e){zt(t,e);function t(n){var r=e.call(this,n,yH)||this;return r.eventToOffsetScale=new Qa({}),r.innerRibbonScale=new Qa({}),r.cacheLabelBBox=null,r.cacheHandleBBox=null,r.onHovering=function(i){var a=r.attributes,o=a.data,s=a.block;i.stopPropagation();var l=r.getValueByCanvasPoint(i);if(s){var c=KT(o.map(function(f){var d=f.value;return d}),l).range;r.showIndicator((c[0]+c[1])/2,"".concat(c[0],"-").concat(c[1])),r.dispatchIndicated(l,c)}else{var u=r.getTickValue(l);r.showIndicator(u),r.dispatchIndicated(u)}},r.onDragStart=function(i){return function(a){a.stopPropagation(),r.attributes.slidable&&(r.target=i,r.prevValue=r.getTickValue(r.getValueByCanvasPoint(a)),document.addEventListener("mousemove",r.onDragging),document.addEventListener("touchmove",r.onDragging),document.addEventListener("mouseleave",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("touchend",r.onDragEnd))}},r.onDragging=function(i){var a=r.target;r.updateMouse();var o=w(r.selection,2),s=o[0],l=o[1],c=r.getTickValue(r.getValueByCanvasPoint(i)),u=c-r.prevValue;a==="start"?s!==c&&r.updateSelection(c,l):a==="end"?l!==c&&r.updateSelection(s,c):a==="ribbon"&&u!==0&&(r.prevValue=c,r.updateSelection(u,u,!0))},r.onDragEnd=function(){r.style.cursor="pointer",document.removeEventListener("mousemove",r.onDragging),document.removeEventListener("touchmove",r.onDragging),document.removeEventListener("mouseup",r.onDragEnd),document.removeEventListener("touchend",r.onDragEnd)},r}return Object.defineProperty(t.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n=this.attributes,r=n.width,i=n.height;return new ui(0,0,r,i)},t.prototype.render=function(n,r){var i=this,a=n.showLabel;this.renderTitle(Tn(r));var o=this.availableSpace,s=o.x,l=o.y,c=Tn(r).maybeAppendByClassName(Ia.contentGroup,"g").styles({x:s,y:l}),u=c.maybeAppendByClassName(Ia.labelGroup,"g").styles({zIndex:1});zo(!!a,u,function(d){i.renderLabel(d)});var f=c.maybeAppendByClassName(Ia.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=c.maybeAppendByClassName(Ia.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(f),this.renderIndicator(c),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(t.prototype,"range",{get:function(){var n=this.attributes,r=n.data,i=n.domain;return i?{min:i[0],max:i[1]}:PH(r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonScale",{get:function(){var n=this.range,r=n.min,i=n.max;return this.innerRibbonScale.update({domain:[r,i],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonRange",{get:function(){var n=w(this.selection,2),r=n[0],i=n[1],a=this.ribbonScale;return[a.map(r),a.map(i)]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selection",{get:function(){var n=this.range,r=n.min,i=n.max,a=this.attributes.defaultValue,o=a===void 0?[r,i]:a,s=w(o,2),l=s[0],c=s[1];return[l,c]},enumerable:!1,configurable:!0}),t.prototype.ifHorizontal=function(n,r){return ul(this.attributes.orientation,typeof n=="function"?n():n,typeof r=="function"?r():r)},t.prototype.renderTitle=function(n){var r=this.attributes,i=r.showTitle,a=r.titleText,o=r.width,s=r.height,l=Jn(this.attributes,"title"),c=Ie(Ie({},l),{width:o,height:s,text:a}),u=this;n.selectAll(Ia.title.class).data(i?[a]:[]).join(function(f){return f.append(function(){return new sT({style:c})}).attr("className",Ia.title.name).each(function(){u.title=this})},function(f){return f.update(c)},function(f){return f.each(function(){u.title=void 0}).remove()})},Object.defineProperty(t.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var n=this.attributes,r=n.width,i=n.height;return new ui(0,0,r,i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelFixedSpacing",{get:function(){var n=this.attributes.showTick;return n?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelPosition",{get:function(){var n=this.attributes,r=n.orientation,i=n.labelDirection,a={vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}};return a[r][i]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelBBox",{get:function(){var n,r=this.attributes.showLabel;if(!r)return new ui(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((n=this.label.querySelector(Br.labelGroup.class))===null||n===void 0?void 0:n.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new ui(0,0,a,o),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelShape",{get:function(){var n=this.attributes,r=n.showLabel,i=n.labelSpacing,a=i===void 0?0:i;if(!r)return{width:0,height:0,size:0,length:0};var o=this.labelBBox,s=o.width,l=o.height,c=this.ifHorizontal(l,s)+a+this.labelFixedSpacing,u=this.ifHorizontal(s,l);return{width:s,height:l,size:c,length:u}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonBBox",{get:function(){var n=this.attributes,r=n.showHandle,i=n.ribbonSize,a=this.availableSpace,o=a.width,s=a.height,l=this.labelShape,c=l.size,u=l.length,f=w(this.ifHorizontal([s,o],[o,s]),2),d=f[0],h=f[1],p=r?this.handleShape:{size:0,length:0},v=p.size,g=p.length,m=this.handleOffsetRatio,b=0,_=this.labelPosition;i?b=i:["bottom","right"].includes(_)?b=Math.min(d-c,(d-v)/m):d*(1-m)>v?b=Math.max(d-c,0):b=Math.max((d-c-v)/m,0);var S=Math.max(g,u),O=h-S,C=w(this.ifHorizontal([O,b],[b,O]),2),E=C[0],P=C[1],T=["top","left"].includes(_)?c:0,A=w(this.ifHorizontal([S/2,T],[T,S/2]),2),R=A[0],z=A[1];return new ui(R,z,E,P)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonShape",{get:function(){var n=this.ribbonBBox,r=n.width,i=n.height;return this.ifHorizontal({size:i,length:r},{size:r,length:i})},enumerable:!1,configurable:!0}),t.prototype.renderRibbon=function(n){var r=this.attributes,i=r.data,a=r.type,o=r.orientation,s=r.color,l=r.block,c=Jn(this.attributes,"ribbon"),u=this.range,f=u.min,d=u.max,h=this.ribbonBBox,p=h.x,v=h.y,g=this.ribbonShape,m=g.length,b=g.size,_=$l({x:p,y:v,length:m,size:b,type:a,orientation:o,color:s,block:l,partition:i.map(function(S){return(S.value-f)/(d-f)}),range:this.ribbonRange},c);this.ribbon=n.maybeAppendByClassName(Ia.ribbon,function(){return new MH({style:_})}).update(_)},t.prototype.getHandleClassName=function(n){return"".concat(Ia.prefix("".concat(n,"-handle")))},t.prototype.renderHandles=function(){var n=this.attributes,r=n.showHandle,i=n.orientation,a=Jn(this.attributes,"handle"),o=w(this.selection,2),s=o[0],l=o[1],c=Ie(Ie({},a),{orientation:i}),u=a.shape,f=u===void 0?"slider":u,d=f==="basic"?gH:$T,h=this;this.handlesGroup.selectAll(Ia.handle.class).data(r?[{value:s,type:"start"},{value:l,type:"end"}]:[],function(p){return p.type}).join(function(p){return p.append(function(){return new d({style:c})}).attr("className",function(v){var g=v.type;return"".concat(Ia.handle," ").concat(h.getHandleClassName(g))}).each(function(v){var g=v.type,m=v.value;this.update({labelText:m});var b="".concat(g,"Handle");h[b]=this,this.addEventListener("pointerdown",h.onDragStart(g))})},function(p){return p.update(c).each(function(v){var g=v.value;this.update({labelText:g})})},function(p){return p.each(function(v){var g=v.type,m="".concat(g,"Handle");h[m]=void 0}).remove()})},t.prototype.adjustHandles=function(){var n=w(this.selection,2),r=n[0],i=n[1];this.setHandlePosition("start",r),this.setHandlePosition("end",i)},t.prototype.adjustTitle=function(){var n=this.attributes,r=n.titlePosition,i=n.orientation,a=w(this.getElementsByClassName(Ia.title.name),1),o=a[0],s=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(!(!o||!s)&&!(r!=="top-left"||i!=="horizontal")){var l=w(s.getLocalBounds().min,1),c=l[0],u=w(o.getLocalBounds().min,1),f=u[0],d=c-f;o.style.x=+(this.style.x||0)+d}},Object.defineProperty(t.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new ui(0,0,0,0);var n=this.startHandle.getBBox(),r=n.width,i=n.height,a=this.endHandle.getBBox(),o=a.width,s=a.height,l=w([Math.max(r,o),Math.max(i,s)],2),c=l[0],u=l[1];return this.cacheHandleBBox=new ui(0,0,c,u),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handleShape",{get:function(){var n=this.handleBBox,r=n.width,i=n.height,a=w(this.ifHorizontal([i,r],[r,i]),2),o=a[0],s=a[1];return{width:r,height:i,size:o,length:s}},enumerable:!1,configurable:!0}),t.prototype.setHandlePosition=function(n,r){var i=this.attributes.handleFormatter,a=this.ribbonBBox,o=a.x,s=a.y,l=this.ribbonShape.size,c=this.getOffset(r),u=w(this.ifHorizontal([o+c,s+l*this.handleOffsetRatio],[o+l*this.handleOffsetRatio,s+c]),2),f=u[0],d=u[1],h=this.handlesGroup.select(".".concat(this.getHandleClassName(n))).node();h==null||h.update({x:f,y:d,formatter:i})},t.prototype.renderIndicator=function(n){var r=Jn(this.attributes,"indicator");this.indicator=n.maybeAppendByClassName(Ia.indicator,function(){return new WG({})}).update(r)},Object.defineProperty(t.prototype,"labelData",{get:function(){var n=this,r=this.attributes.data;return r.reduce(function(i,a,o,s){var l,c,u=(l=a==null?void 0:a.id)!==null&&l!==void 0?l:o.toString();if(i.push(Ie(Ie({},a),{id:u,index:o,type:"value",label:(c=a==null?void 0:a.label)!==null&&c!==void 0?c:a.value.toString(),value:n.ribbonScale.map(a.value)})),o<s.length-1){var f=s[o+1],d=w([a.value,f.value],2),h=d[0],p=d[1],v=(h+p)/2;i.push(Ie(Ie({},a),{id:u,index:o,type:"range",range:[h,p],label:[h,p].join("~"),value:n.ribbonScale.map(v)}))}return i},[])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelStyle",{get:function(){var n=w(["center","middle"],2),r=n[0],i=n[1],a=this.labelPosition;return a==="top"?i="bottom":a==="bottom"?i="top":a==="left"?r="end":a==="right"&&(r="start"),{labelTextAlign:r,labelTextBaseline:i}},enumerable:!1,configurable:!0}),t.prototype.renderLabel=function(n){var r=this.attributes,i=r.showTick,a=i===void 0?!1:i,o=r.labelFilter,s=r.labelFormatter,l=Jn(this.attributes,"tick"),c=Jn(this.attributes,"label"),u=c.align,f=$l(Ie({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),sl(l,"tick"),sl(c,"label"),{data:this.labelData}),d={tickFilter:function(p,v,g){return(p==null?void 0:p.type)!=="value"?!1:o?o(p,p.index,g.filter(function(m){return m.type!=="value"})):!0},labelFilter:function(p,v,g){return(p==null?void 0:p.type)!==u?!1:o?o(p,p.index,g.filter(function(m){return m.type===u})):!0},labelFormatter:s},h=Ie(Ie(Ie({},f),d),{labelOverlap:[{type:"hide"}]});this.label=n.maybeAppendByClassName(Ia.label,function(){return new v_({style:h})}).node(),this.label.update(h,!1)},Object.defineProperty(t.prototype,"labelAxisStyle",{get:function(){var n=this.attributes,r=n.showTick,i=n.labelDirection,a=n.labelSpacing,o=n.tickLength,s=this.ribbonShape.size,l=this.labelPosition,c=this.labelFixedSpacing,u=w([0,0,0],3),f=u[0],d=u[1],h=u[2],p=o!=null?o:s;return r?(h=p,d=c,i==="positive"?l==="right"?(f=p,h=p):l==="bottom"&&(f=h):i==="negative"&&(l==="top"||l==="left")&&(f=s)):i==="positive"?l==="right"?d=p:l==="bottom"&&(f=s+c,d=a):i==="negative"&&(l==="left"||l==="top")&&(d=a),{offset:f,spacing:a,tickLength:h}},enumerable:!1,configurable:!0}),t.prototype.adjustLabel=function(){var n=this.attributes.showLabel;if(n){var r=this.ribbonBBox,i=r.x,a=r.y,o=r.width,s=r.height,l=this.labelAxisStyle,c=l.offset,u=l.spacing,f=l.tickLength,d=w(this.ifHorizontal([[i,a+c],[i+o,a+c]],[[i+c,a+s],[i+c,a]]),2),h=d[0],p=d[1];this.label.update({startPos:h,endPos:p,tickLength:f,labelSpacing:u},!1)}},t.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)},t.prototype.showIndicator=function(n,r){r===void 0&&(r="".concat(n));var i=this.attributes.showIndicator;if(!i||typeof n!="number"){this.hideIndicator();return}var a=this.range,o=a.min,s=a.max,l=this.ribbonBBox,c=l.x,u=l.y,f=Ri(n,o,s),d=this.getOffset(f),h=this.ifHorizontal([d+c,u],[c,d+u]);this.indicator.update({x:h[0],y:h[1],position:this.ifHorizontal("top","left"),labelText:r}),tp(this.indicator.node())},t.prototype.hideIndicator=function(){Nc(this.indicator.node())},t.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},t.prototype.setSelection=function(n,r){this.updateSelection(n,r)},t.prototype.updateSelection=function(n,r,i){var a;i===void 0&&(i=!1);var o=w(this.selection,2),s=o[0],l=o[1],c=w([n,r],2),u=c[0],f=c[1];i&&(u+=s,f+=l);var d=this.range,h=d.min,p=d.max;a=w(vH([h,p],[u,f],this.selection),2),u=a[0],f=a[1],this.update({defaultValue:[u,f]}),this.dispatchSelection()},Object.defineProperty(t.prototype,"step",{get:function(){var n=this.attributes.step,r=n===void 0?1:n,i=this.range,a=i.min,o=i.max;return li(r)?Hg((o-a)*bH,0):r},enumerable:!1,configurable:!0}),t.prototype.getTickValue=function(n){var r=this.attributes,i=r.data,a=r.block,o=this.range.min;return a?KT(i.map(function(s){var l=s.value;return l}),n).tick:fH(n,this.step,o)},t.prototype.getValueByCanvasPoint=function(n,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=w(this.ribbon.node().getPosition(),2),l=s[0],c=s[1],u=this.ifHorizontal(l,c),f=this.ifHorizontal.apply(this,N([],w(Yg(n)),!1)),d=f-u,h=Ri(this.getOffset(d,!0),a,o);return h},t.prototype.getOffset=function(n,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=this.ribbonShape.length,l=this.eventToOffsetScale;return l.update({domain:[a,o],range:[0,s]}),r?l.invert(n):l.map(n)},t.prototype.dispatchSelection=function(){var n=new Gr("valuechange",{detail:{value:this.selection}});this.dispatchEvent(n)},t.prototype.dispatchIndicated=function(n,r){var i=new Gr("indicate",{detail:{value:n,range:r}});this.dispatchEvent(i)},t}(Ra);class dp extends lp{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:ju}}map(t){const[n]=this.options.range;return n!==void 0?n:this.options.unknown}invert(t){const[n]=this.options.range;return t===n&&n!==void 0?this.options.domain:[]}getTicks(){const{tickMethod:t,domain:n,tickCount:r}=this.options,[i,a]=n;return!nd(i)||!nd(a)?[]:t(i,a,r)}clone(){return new dp(this.options)}}class ad extends lp{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!zg(t))return this.options.unknown;const n=m_(this.thresholds,t,0,this.n);return this.options.range[n]}invert(t){const{range:n}=this.options,r=n.indexOf(t),i=this.thresholds;return[i[r-1],i[r]]}clone(){return new ad(this.options)}rescale(){const{domain:t,range:n}=this.options;this.n=Math.min(t.length,n.length-1),this.thresholds=t}}function hp(e){return Math.abs(e)<1e-14?e:parseFloat(e.toFixed(14))}const AH=[1,5,2,2.5,4,3],mye=null,QT=Number.EPSILON*100;function RH(e,t){return(e%t+t)%t}function IH(e){return Math.round(e*1e12)/1e12}function LH(e,t,n,r,i,a){const o=_T(t),s=bT(t,e);let l=0;const c=RH(r,a);return(c<QT||a-c<QT)&&r<=0&&i>=0&&(l=1),1-s/(o-1)-n+l}function NH(e,t,n){const r=_T(t),i=bT(t,e),a=1;return 1-i/(r-1)-n+a}function kH(e,t,n,r,i,a){const o=(e-1)/(a-i),s=(t-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/s,s/o)}function jH(e,t){return e>=t?2-(e-1)/(t-1):1}function DH(e,t,n,r){const i=t-e;return 1-.5*(oa(t-r,2)+oa(e-n,2))/oa(.1*i,2)}function FH(e,t,n){const r=t-e;if(n>r){const i=(n-r)/2;return 1-oa(i,2)/oa(.1*r,2)}return 1}function BH(){return 1}const C_=(e,t,n=5,r=!0,i=AH,a=[.25,.2,.5,.05])=>{const o=n<0?0:Math.round(n);if(Number.isNaN(e)||Number.isNaN(t)||typeof e!="number"||typeof t!="number"||!o)return[];if(t-e<1e-15||o===1)return[e];const s={score:-2,lmin:0,lmax:0,lstep:0};let l=1;for(;l<1/0;){for(let p=0;p<i.length;p+=1){const v=i[p],g=NH(v,i,l);if(a[0]*g+a[1]+a[2]+a[3]<s.score){l=1/0;break}let m=2;for(;m<1/0;){const b=jH(m,o);if(a[0]*g+a[1]+a[2]*b+a[3]<s.score)break;const _=(t-e)/(m+1)/l/v;let S=Math.ceil(Math.log10(_));for(;S<1/0;){const O=l*v*oa(10,S),C=FH(e,t,O*(m-1));if(a[0]*g+a[1]*C+a[2]*b+a[3]<s.score)break;const E=Math.floor(t/O)*l-(m-1)*l,P=Math.ceil(e/O)*l;if(E<=P){const T=P-E;for(let A=0;A<=T;A+=1){const z=(E+A)*(O/l),I=z+O*(m-1),L=O,F=LH(v,i,l,z,I,L),Z=DH(e,t,z,I),H=kH(m,o,e,t,z,I),W=BH(),G=a[0]*F+a[1]*Z+a[2]*H+a[3]*W;G>s.score&&(!r||z<=e&&I>=t)&&(s.lmin=z,s.lmax=I,s.lstep=L,s.score=G)}}S+=1}m+=1}}l+=1}const c=hp(s.lmax),u=hp(s.lmin),f=hp(s.lstep),d=Math.floor(IH((c-u)/f))+1,h=new Array(d);h[0]=hp(u);for(let p=1;p<d;p+=1)h[p]=hp(h[p-1]+f);return h};class Vg extends ad{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:C_}}constructor(t){super(t)}nice(){const{nice:t}=this.options;if(t){const[n,r,i]=this.getTickMethodOptions();this.options.domain=OT(n,r,i)}}getTicks(){const{tickMethod:t}=this.options,[n,r,i]=this.getTickMethodOptions();return t(n,r,i)}getTickMethodOptions(){const{domain:t,tickCount:n}=this.options,r=t[0],i=t[t.length-1];return[r,i,n]}rescale(){this.nice();const{range:t,domain:n}=this.options,[r,i]=n;this.n=t.length-1,this.thresholds=new Array(this.n);for(let a=0;a<this.n;a+=1)this.thresholds[a]=((a+1)*i-(a-this.n)*r)/(this.n+1)}invert(t){const[n,r]=super.invert(t),[i,a]=this.options.domain;return n===void 0&&r===void 0?[n,r]:[n||i,r||a]}getThresholds(){return this.thresholds}clone(){return new Vg(this.options)}}function zH(e,t){const n=e.length;if(!n)return;if(n<2)return e[n-1];const r=(n-1)*t,i=Math.floor(r),a=e[i],o=e[i+1];return a+(o-a)*(r-i)}function ZH(e,t,n=!1){const r=e;n||r.sort((a,o)=>a-o);const i=[];for(let a=1;a<t;a+=1)i.push(zH(r,a/t));return i}class Ug extends ad{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:C_}}constructor(t){super(t)}rescale(){const{domain:t,range:n}=this.options;this.n=n.length-1,this.thresholds=ZH(t,this.n+1,!1)}invert(t){const[n,r]=super.invert(t),{domain:i}=this.options,a=i[0],o=i[i.length-1];return n===void 0&&r===void 0?[n,r]:[n||a,r||o]}getThresholds(){return this.thresholds}clone(){return new Ug(this.options)}getTicks(){const{tickCount:t,domain:n,tickMethod:r}=this.options,i=n.length-1,a=n[0],o=n[i];return r(a,o,t)}}var $H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function WH(e,t,n){return e.size=t,SG(n)?e.height=t:e.width=t,e}function GH(e,t,n){const{size:r}=t,i=RT(e,t,n);return WH(i,r,i.orientation)}function HH(e){return t=>({value:t/e,label:String(t)})}function YH(e,t,n,r,i){const a=t.thresholds,o=HH(r);return Object.assign(Object.assign({},e),{color:i,data:[n,...a,r].map(o)})}function VH(e,t,n){const i=[-1/0,...t.thresholds,1/0].map((a,o)=>({value:o,label:a}));return Object.assign(Object.assign({},e),{data:i,color:n,labelFilter:(a,o)=>o>0&&o<i.length-1})}function E_(e){const{domain:t}=e.getOptions(),[n,r]=[t[0],vP(t)];return[n,r]}function UH(e,t){const n=e.getOptions(),r=e.clone();return r.update(Object.assign(Object.assign({},n),{range:[jl(t).toString()]})),r}function XH(e,t,n,r,i,a){const{length:o}=e,s=n||r,l=i.color?a.legendContinuous.ribbonFill||"black":a.color,c=t||UH(s,l),[u,f]=E_(c),[d,h]=E_([t,n,r].filter(p=>p!==void 0).find(p=>!(p instanceof dp)));return Object.assign(Object.assign({},e),{domain:[d,h],data:c.getTicks().map(p=>({value:p})),color:new Array(Math.floor(o)).fill(0).map((p,v)=>{const g=(f-u)/(o-1)*v+u,m=c.map(g)||l,b=r?r.map(g):1;return m.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(_,S,O,C)=>`rgba(${S}, ${O}, ${C}, ${b})`)})})}function KH(e,t,n,r,i,a){const o=ll(e,"color"),s=GH(n,r,i);if(o instanceof ad){const{range:u}=o.getOptions(),[f,d]=E_(o);return o instanceof Vg||o instanceof Ug?YH(s,o,f,d,u):VH(s,o,u)}const l=ll(e,"size"),c=ll(e,"opacity");return XH(s,o,l,c,t,a)}const Dc=e=>{const{labelFormatter:t,layout:n,order:r,orientation:i,position:a,size:o,title:s,style:l,crossPadding:c,padding:u}=e,f=$H(e,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:d,value:h,theme:p,scale:v})=>{const{bbox:g}=h,{x:m,y:b,width:_,height:S}=g,O=TT(a,n),{legendContinuous:C={}}=p,E=Gg(Object.assign({},C,Object.assign(Object.assign({titleText:Wg(s),labelAlign:"value",labelFormatter:typeof t=="string"?T=>Ic(t)(T.label):t},KH(d,v,h,e,Dc,p)),l),f)),P=new AT({style:Object.assign(Object.assign({x:m,y:b,width:_,height:S},O),{subOptions:E})});return P.appendChild(new TH({className:"legend-continuous",style:E})),P}};Dc.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const eA=e=>(...t)=>Dc(Object.assign({},{block:!0},e))(...t);eA.props=Object.assign(Object.assign({},Dc.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const M_=e=>t=>{const{scales:n}=t,r=ll(n,"size");return Dc(Object.assign({},{type:"size",data:r.getTicks().map((i,a)=>({value:i,label:String(i)}))},e))(t)};M_.props=Object.assign(Object.assign({},Dc.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const tA=e=>M_(Object.assign({},{block:!0},e));tA.props=Object.assign(Object.assign({},Dc.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var qH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const nA=({static:e=!1}={})=>t=>{const{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:l,padding:c,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,margin:v,marginLeft:g,marginBottom:m,marginTop:b,marginRight:_,data:S,coordinate:O,theme:C,component:E,interaction:P,x:T,y:A,z:R,key:z,frame:I,labelTransform:L,parentKey:F,clip:Z,viewStyle:H,title:W}=t,G=qH(t,["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:T,y:A,z:R,key:z,width:n,height:r,depth:i,padding:c,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,paddingBottom:l,theme:C,coordinate:O,component:E,interaction:P,frame:I,labelTransform:L,margin:v,marginLeft:g,marginBottom:m,marginTop:b,marginRight:_,parentKey:F,clip:Z,style:H},!e&&{title:W}),{marks:[Object.assign(Object.assign(Object.assign({},G),{key:`${z}-0`,data:S}),e&&{title:W})]})]};nA.props={};var JH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function od(e){return(t,...n)=>Je({},e(t,...n),t)}function sd(e){return(t,...n)=>Je({},t,e(t,...n))}function P_(e,t){if(!e)return t;if(Array.isArray(e))return e;const{value:n=t}=e,r=JH(e,["value"]);return Object.assign(Object.assign({},r),{value:n})}var T_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const rA=()=>e=>{const{children:t}=e,n=T_(e,["children"]);if(!Array.isArray(t))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:l=[]}=n,c=T_(n,["data","scale","axis","legend","encode","transform"]),u=t.map(f=>{var{data:d,scale:h={},axis:p={},legend:v={},encode:g={},transform:m=[]}=f,b=T_(f,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:P_(d,r),scale:Je({},i,h),encode:Je({},s,g),transform:[...l,...m],axis:p&&a?Je({},a,p):!1,legend:v&&o?Je({},o,v):!1},b)});return[Object.assign(Object.assign({},c),{marks:u,type:"standardView"})]};rA.props={};function Li([e,t],[n,r]){return[e-n,t-r]}function Xg([e,t],[n,r]){return[e+n,t+r]}function wi([e,t],[n,r]){return Math.sqrt(Math.pow(e-n,2)+Math.pow(t-r,2))}function Cs([e,t]){return Math.atan2(t,e)}function ld([e,t]){return Cs([e,t])+Math.PI/2}function iA(e,t){const n=Cs(e),r=Cs(t);return n<r?r-n:Math.PI*2-(n-r)}function A_(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(const[s,l]of e)t=Math.min(s,t),n=Math.max(s,n),r=Math.min(l,r),i=Math.max(l,i);const a=n-t,o=i-r;return[t,r,a,o]}function aA([e,t],[n,r]){return[(e+n)/2,(t+r)/2]}function Qt(e,t){for(const[n,r]of Object.entries(t))e.style(n,r)}function QH(e,t){return t.forEach((n,r)=>r===0?e.moveTo(n[0],n[1]):e.lineTo(n[0],n[1])),e.closePath(),e}function eY(e,t,n){const{arrowSize:r}=n,i=typeof r=="string"?+parseFloat(r)/100*wi(e,t):r,a=Math.PI/6,o=Math.atan2(t[1]-e[1],t[0]-e[0]),s=Math.PI/2-o-a,l=[t[0]-i*Math.sin(s),t[1]-i*Math.cos(s)],c=o-a,u=[t[0]-i*Math.cos(c),t[1]-i*Math.sin(c)];return[l,u]}function pp(e,t,n,r,i){const a=Cs(Li(r,t))+Math.PI,o=Cs(Li(r,n))+Math.PI;return e.arc(r[0],r[1],i,a,o,o-a<0),e}function oA(e,t,n,r="y",i="between",a=!1){const o=(g,m)=>g==="y"||g===!0?m?180:90:m?90:0,s=r==="y"||r===!0?n:t,l=o(r,a),c=Ru(s),[u,f]=Hl(c,g=>s[g]),d=new Qa({domain:[u,f],range:[0,100]}),h=g=>Gi(s[g])&&!Number.isNaN(s[g])?d.map(s[g]):0,p={between:g=>`${e[g]} ${h(g)}%`,start:g=>g===0?`${e[g]} ${h(g)}%`:`${e[g-1]} ${h(g)}%, ${e[g]} ${h(g)}%`,end:g=>g===e.length-1?`${e[g]} ${h(g)}%`:`${e[g]} ${h(g)}%, ${e[g+1]} ${h(g)}%`},v=c.sort((g,m)=>h(g)-h(m)).map(p[i]||p.between).join(",");return`linear-gradient(${l}deg, ${v})`}function Kg(e){const[t,n,r,i]=e;return[i,t,n,r]}function Du(e,t,n){const[r,i,,a]=ci(e)?Kg(t):t,[o,s]=n,l=e.getCenter(),c=ld(Li(r,l)),u=ld(Li(i,l)),f=u===c&&o!==s?u+Math.PI*2:u;return{startAngle:c,endAngle:f-c>=0?f:Math.PI*2+f,innerRadius:wi(a,l),outerRadius:wi(r,l)}}function yye(e){const t="connect";return Object.fromEntries(Object.entries(e).filter(([n])=>n.startsWith(t)).map(([n,r])=>[lowerFirst(n.replace(t,"").trim()),r]).filter(([n])=>n!==void 0))}function sA(e){const{colorAttribute:t,opacityAttribute:n=t}=e;return`${n}Opacity`}function lA(e,t){if(!Jr(e))return"";const n=e.getCenter(),{transform:r}=t;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function cA(e){if(e.length===1)return e[0];const[[t,n,r=0],[i,a,o=0]]=e;return[(t+i)/2,(n+a)/2,(r+o)/2]}function uA(e){return e.replace(/-(\w)/g,function(t,n){return n.toUpperCase()})}function tY(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}var bye=Array.prototype.slice;function fA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fi(e){return function(){return e}}function dA(e){this._context=e}dA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function vp(e){return new dA(e)}const R_=Math.PI,I_=2*R_,Fu=1e-6,nY=I_-Fu;function hA(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function rY(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return hA;const n=oa(10,t);return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class qg{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?hA:rY(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,c=i-n,u=o-t,f=s-n,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>Fu)if(!(Math.abs(f*l-c*u)>Fu)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,p=i-s,v=l*l+c*c,g=h*h+p*p,m=Math.sqrt(v),b=Math.sqrt(d),_=a*Math.tan((R_-Math.acos((v+d-g)/(2*m*b)))/2),S=_/b,O=_/m;Math.abs(S-1)>Fu&&this._append`L${t+S*u},${n+S*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=t+O*l},${this._y1=n+O*c}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Fu||Math.abs(this._y1-u)>Fu)&&this._append`L${c},${u}`,r&&(d<0&&(d=d%I_+I_),d>nY?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:d>Fu&&this._append`A${r},${r},0,${+(d>=R_)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Es(){return new qg}Es.prototype=qg.prototype;function xye(e=3){return new qg(+e)}function L_(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new qg(t)}function pA(e){return e[0]}function vA(e){return e[1]}function Fc(e,t){var n=fi(!0),r=null,i=vp,a=null,o=L_(s);e=typeof e=="function"?e:e===void 0?pA:fi(e),t=typeof t=="function"?t:t===void 0?vA:fi(t);function s(l){var c,u=(l=fA(l)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),c=0;c<=u;++c)!(c<u&&n(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,l),+t(f,c,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:fi(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:fi(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:fi(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function cd(e){const t=typeof e=="function"?e:e.render;return class extends eg{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){t(this)}}}var N_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function iY(e){const{min:[t,n],max:[r,i]}=e.getLocalBounds();let a=0,o=0;return t>0&&(a=t),r<0&&(a=r),n>0&&(o=n),i<0&&(o=i),[a,o]}function aY(e,t=[]){const[n=0,r=0,i=n,a=r]=t,o=e.parentNode,s=o.getEulerAngles();o.setEulerAngles(0);const{min:l,halfExtents:c}=e.getLocalBounds(),[u,f]=l,[d,h]=c;return o.setEulerAngles(s),{x:u-a,y:f-n,width:d*2+a+r,height:h*2+n+i}}const oY=(e,t,n)=>{const r=wi(e,t),i=wi(t,n),a=wi(n,e);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(a,2))/(2*r*i)};function sY(e,t,n,r){const[[i,a],[o,s]]=t,[l,c]=iY(e);if(i===o&&a===s)return Fc()([[0,0],[l,c]]);const u=[[i-o,a-s]].concat(n.length?n:[[0,0]]),f=[r[0]-o,r[1]-s],[d,h]=u;if(oY(f,d,h)>0){const p=(()=>{const{min:v,max:g}=e.getLocalBounds(),m=d[0]+(d[1]-f[1])*(d[1]-0)/(d[0]-f[0]);return g[0]<f[0]?Math.min(g[0],m):Math.max(v[0],m)})();u.splice(1,1,[p,0])}return Fc()(u)}const gA=cd(e=>{const t=e.attributes,{className:n,class:r,transform:i,rotate:a,labelTransform:o,labelTransformOrigin:s,x:l,y:c,x0:u=l,y0:f=c,text:d,background:h,connector:p,startMarker:v,endMarker:g,coordCenter:m,innerHTML:b}=t,_=N_(t,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([l,c,u,f].some(Z=>!Gi(Z))){e.children.forEach(Z=>Z.remove());return}const S=Tt(_,"background"),{padding:O}=S,C=N_(S,["padding"]),E=Tt(_,"connector"),{points:P=[]}=E,T=N_(E,["points"]),A=[[+u,+f],[+l,+c]];let R;b?R=gn(e).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",b).call(Qt,Object.assign({transform:o,transformOrigin:s},_)).node():R=gn(e).maybeAppend("text","text").style("zIndex",0).style("text",d).call(Qt,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},_)).node();const z=gn(e).maybeAppend("background","rect").style("zIndex",-1).call(Qt,aY(R,O)).call(Qt,h?C:{}).node(),I=sY(z,A,P,m),L=v&&new Pr({id:"startMarker",style:Object.assign({x:0,y:0},Tt(_,"startMarker"))}),F=g&&new Pr({id:"endMarker",style:Object.assign({x:0,y:0},Tt(_,"endMarker"))});gn(e).maybeAppend("connector","path").style("zIndex",0).style("path",I).style("markerStart",L).style("markerEnd",F).call(Qt,p?T:{})});function ud(e,t){let n,r=-1,i=-1;if(t===void 0)for(const a of e)++i,a!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of e)(a=t(a,++i,e))!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);return r}function lY(e,t,n,r){const i=t.length/2,a=t.slice(0,i),o=t.slice(i);let s=ud(a,(h,p)=>Math.abs(h[1]-o[p][1]));s=Math.max(Math.min(s,i-2),1);const l=h=>[a[h][0],(a[h][1]+o[h][1])/2],c=l(s),u=l(s-1),f=l(s+1),d=Cs(Li(f,u))/Math.PI*180;return{x:c[0],y:c[1],transform:`rotate(${d})`,textAlign:"center",textBaseline:"middle"}}function mA(e,t,n,r){const{bounds:i}=n,[[a,o],[s,l]]=i,c=s-a,u=l-o,f=d=>{const{x:h,y:p}=d,v=sP(n.x,c),g=sP(n.y,u);return Object.assign(Object.assign({},d),{x:(v||h)+a,y:(g||p)+o})};return f(e==="left"?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:e==="right"?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:e==="top"?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:e==="bottom"?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:e==="top-left"?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:e==="top-right"?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:e==="bottom-left"?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:e==="bottom-right"?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function yA(e,t,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s}=n,l=r.getCenter(),c=Du(r,t,[i,a]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:h}=c,p=e==="inside"?(d+h)/2:h,v=k_(p,o,s),g=(()=>{const[m,b]=t,_=u+(f-u)*.5,[S,O]=e==="inside"?gp(l,p,_):aA(m,b);return{x:S,y:O}})();return Object.assign(Object.assign({},g),{textAlign:e==="inside"?"center":"start",textBaseline:"middle",rotate:v})}function gp(e,t,n){return[e[0]+Math.sin(t)*n,e[1]-Math.cos(t)*n]}function k_(e,t,n){if(!t)return 0;const r=n?0:Math.sin(e)<0?90:-90;return e/Math.PI*180+r}function cY(e,t,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,radius:l=.5,offset:c=0}=n,u=Du(r,t,[i,a]),{startAngle:f,endAngle:d}=u,h=r.getCenter(),p=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:k_(p,o,s)},{innerRadius:m,outerRadius:b}=u,S=m+(b-m)*l+c,[O,C]=gp(h,p,S);return Object.assign({x:O,y:C},g)}function bA(e){return e===void 0?null:e}function xA(e,t,n,r){const{bounds:i}=n,[a]=i;return{x:bA(a[0]),y:bA(a[1])}}function Yl(e,t,n,r){const{bounds:i}=n;return i.length===1?xA(e,t,n,r):(Qh(r)?yA:Jf(r)?cY:mA)(e,t,n,r)}function uY(e,t,n,r,i){const[a,o]=gp(e,t,n),[s,l]=gp(e,t,r),c=Math.sin(t)>0?1:-1;return[[a,o],[s,l],[s+c*i,l]]}function _A(e,t,n){const r=Du(n,e,[t.y,t.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function wA(e,t,n){const r=Du(n,e,[t.y,t.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function j_(e,t,n,r){const{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,f=r.getCenter(),d=wA(t,n,r),h=Math.sin(d)>0?1:-1,p=k_(d,i,a),v={textAlign:h>0||Qh(r)?"start":"end",textBaseline:"middle",rotate:p},g=_A(t,n,r),m=g+(s?l:o),[[b,_],[S,O],[C,E]]=uY(f,d,g,m,s?c:0),P=s?+u*h:0,T=C+P,A=E,R={connector:s,connectorPoints:[[S-T,O-A],[C-T,E-A]]};return Object.assign(Object.assign({x0:b,y0:_,x:C+P,y:E},v),R)}function fY(e,t,n,r){const{bounds:i}=n;return i.length===1?xA(e,t,n,r):(Qh(r)?yA:Jf(r)?j_:mA)(e,t,n,r)}var dY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function hY(e,t,n,r){if(!Jf(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=dY(j_("outside",t,n,r),[]),l=r.getCenter(),c=_A(t,n,r),u=wA(t,n,r),f=c+i+a,d=Math.sin(u)>0?1:-1,h=l[0]+(f+ +o)*d,{x:p}=s,v=h-p;return s.x+=v,s.connectorPoints[0][0]-=v,s}var pY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function vY(e,t,n,r){if(!Jf(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=pY(j_("outside",t,n,r),[]),{x0:l,y0:c}=s,u=r.getCenter(),d=qZ(r)+i,h=ld([l-u[0],c-u[1]]),p=Math.sin(h)>0?1:-1,[v,g]=gp(u,h,d);return s.x=v+(a+o)*p,s.y=g,s}var SA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function gY(e,t){return e!==void 0?e:Jf(t)?"inside":ci(t)?"right":"top"}function mY(e,t,n,r,i){const{position:a}=t,{render:o}=i,s=gY(a,n),c=r[o?"htmlLabel":s==="inside"?"innerLabel":"label"],u=Object.assign({},c,t),f=me[uA(s)];if(!f)throw new Error(`Unknown position: ${s}`);return Object.assign(Object.assign({},c),f(s,e,u,n,i))}const OA=(e,t)=>{const{coordinate:n,theme:r}=t,{render:i}=e;return(a,o)=>{const{text:s,x:l,y:c,transform:u="",transformOrigin:f,className:d=""}=o,h=SA(o,["text","x","y","transform","transformOrigin","className"]),p=mY(a,o,n,r,e),{rotate:v=0,transform:g=""}=p,m=SA(p,["rotate","transform"]);return gn(new gA).call(Qt,m).style("text",`${s}`).style("className",`${d} g2-label`).style("innerHTML",i?i(s,o.datum,o.index):void 0).style("labelTransform",`${g} rotate(${+v}) ${u}`.trim()).style("labelTransformOrigin",f).style("coordCenter",n.getCenter()).call(Qt,h).node()}};OA.props={defaultMarker:"point"};function Ni(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yY(e,t){return Array.from(t,n=>e[n])}function Vl(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[n]=t;if(n&&n.length!==2||t.length>1){const r=Uint32Array.from(e,(i,a)=>a);return t.length>1?(t=t.map(i=>e.map(i)),r.sort((i,a)=>{for(const o of t){const s=mp(o[i],o[a]);if(s)return s}})):(n=e.map(n),r.sort((i,a)=>mp(n[i],n[a]))),yY(e,r)}return e.sort(CA(n))}function CA(e=Ni){if(e===Ni)return mp;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function mp(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var bY=function(e,t){if(!qh(e))return e;for(var n=[],r=0;r<e.length;r++){var i=e[r];t(i,r)&&n.push(i)}return n},EA=bY;function xY(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fd(e){let t,n,r;e.length!==2?(t=Ni,n=(s,l)=>Ni(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ni||e===xY?e:_Y,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function o(s,l,c=0,u=s.length){const f=i(s,l,c,u-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function _Y(){return 0}function D_(e){return e===null?NaN:+e}function*wY(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const MA=fd(Ni),SY=MA.right,OY=MA.left,CY=fd(D_).center;var EY=SY;function MY(e,t,n){return Math.min(n,Math.max(t,e))}function yp(e){return!!e.getBandWidth}function dd(e,t,n){if(!yp(e))return e.invert(t);const{adjustedRange:r}=e,{domain:i}=e.getOptions(),a=n?-1:0,o=e.getStep(),s=n?r:r.map(u=>u+o),l=OY(s,t),c=MY(l+a,0,i.length-1);return i[c]}function Bc(e,t,n){if(!t)return e.getOptions().domain;if(!yp(e)){const l=Vl(t);if(!n)return l;const[c]=l,{range:u}=e.getOptions(),[f,d]=u,h=f>d?-1:1,p=e.invert(e.map(c)+h*n);return[c,p]}const{domain:r}=e.getOptions(),i=t[0],a=r.indexOf(i);if(n){const l=a+Math.round(r.length*n);return r.slice(a,l)}const o=t[t.length-1],s=r.indexOf(o);return r.slice(a,s+1)}function Jg(e,t,n,r,i,a){const{x:o,y:s}=i,l=(h,p)=>{const[v,g]=a.invert(h);return[dd(o,v,p),dd(s,g,p)]},c=l([e,t],!0),u=l([n,r],!1),f=Bc(o,[c[0],u[0]]),d=Bc(s,[c[1],u[1]]);return[f,d]}function Qg(e,t){const[n,r]=e,i=a=>a.getStep?a.getStep():0;return[t.map(n),t.map(r)+i(t)]}function PY(e,t,n){const{x:r,y:i}=t,[a,o]=e,s=Qg(a,r),l=Qg(o,i),c=[s[0],l[0]],u=[s[1],l[1]],[f,d]=n.map(c),[h,p]=n.map(u);return[f,d,h,p]}const PA=Math.abs,eo=Math.atan2,Bu=Math.cos,TY=Math.max,F_=Math.min,fl=Math.sin,hd=Math.sqrt,to=1e-12,bp=Math.PI,em=bp/2,AY=2*bp;function RY(e){return e>1?0:e<-1?bp:Math.acos(e)}function TA(e){return e>=1?em:e<=-1?-em:Math.asin(e)}function IY(e){return e.innerRadius}function LY(e){return e.outerRadius}function NY(e){return e.startAngle}function kY(e){return e.endAngle}function jY(e){return e&&e.padAngle}function DY(e,t,n,r,i,a,o,s){var l=n-e,c=r-t,u=o-i,f=s-a,d=f*l-u*c;if(!(d*d<to))return d=(u*(t-a)-f*(e-i))/d,[e+d*l,t+d*c]}function tm(e,t,n,r,i,a,o){var s=e-n,l=t-r,c=(o?a:-a)/hd(s*s+l*l),u=c*l,f=-c*s,d=e+u,h=t+f,p=n+u,v=r+f,g=(d+p)/2,m=(h+v)/2,b=p-d,_=v-h,S=b*b+_*_,O=i-a,C=d*v-p*h,E=(_<0?-1:1)*hd(TY(0,O*O*S-C*C)),P=(C*_-b*E)/S,T=(-C*b-_*E)/S,A=(C*_+b*E)/S,R=(-C*b+_*E)/S,z=P-g,I=T-m,L=A-g,F=R-m;return z*z+I*I>L*L+F*F&&(P=A,T=R),{cx:P,cy:T,x01:-u,y01:-f,x11:P*(i/O-1),y11:T*(i/O-1)}}function nm(){var e=IY,t=LY,n=fi(0),r=null,i=NY,a=kY,o=jY,s=null,l=L_(c);function c(){var u,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),p=i.apply(this,arguments)-em,v=a.apply(this,arguments)-em,g=PA(v-p),m=v>p;if(s||(s=u=l()),h<d&&(f=h,h=d,d=f),!(h>to))s.moveTo(0,0);else if(g>AY-to)s.moveTo(h*Bu(p),h*fl(p)),s.arc(0,0,h,p,v,!m),d>to&&(s.moveTo(d*Bu(v),d*fl(v)),s.arc(0,0,d,v,p,m));else{var b=p,_=v,S=p,O=v,C=g,E=g,P=o.apply(this,arguments)/2,T=P>to&&(r?+r.apply(this,arguments):hd(d*d+h*h)),A=F_(PA(h-d)/2,+n.apply(this,arguments)),R=A,z=A,I,L;if(T>to){var F=TA(T/d*fl(P)),Z=TA(T/h*fl(P));(C-=F*2)>to?(F*=m?1:-1,S+=F,O-=F):(C=0,S=O=(p+v)/2),(E-=Z*2)>to?(Z*=m?1:-1,b+=Z,_-=Z):(E=0,b=_=(p+v)/2)}var H=h*Bu(b),W=h*fl(b),G=d*Bu(O),J=d*fl(O);if(A>to){var re=h*Bu(_),he=h*fl(_),ce=d*Bu(S),ke=d*fl(S),ot;if(g<bp)if(ot=DY(H,W,ce,ke,re,he,G,J)){var xt=H-ot[0],et=W-ot[1],He=re-ot[0],jt=he-ot[1],Ct=1/fl(RY((xt*He+et*jt)/(hd(xt*xt+et*et)*hd(He*He+jt*jt)))/2),Gt=hd(ot[0]*ot[0]+ot[1]*ot[1]);R=F_(A,(d-Gt)/(Ct-1)),z=F_(A,(h-Gt)/(Ct+1))}else R=z=0}E>to?z>to?(I=tm(ce,ke,H,W,h,z,m),L=tm(re,he,G,J,h,z,m),s.moveTo(I.cx+I.x01,I.cy+I.y01),z<A?s.arc(I.cx,I.cy,z,eo(I.y01,I.x01),eo(L.y01,L.x01),!m):(s.arc(I.cx,I.cy,z,eo(I.y01,I.x01),eo(I.y11,I.x11),!m),s.arc(0,0,h,eo(I.cy+I.y11,I.cx+I.x11),eo(L.cy+L.y11,L.cx+L.x11),!m),s.arc(L.cx,L.cy,z,eo(L.y11,L.x11),eo(L.y01,L.x01),!m))):(s.moveTo(H,W),s.arc(0,0,h,b,_,!m)):s.moveTo(H,W),!(d>to)||!(C>to)?s.lineTo(G,J):R>to?(I=tm(G,J,re,he,d,-R,m),L=tm(H,W,ce,ke,d,-R,m),s.lineTo(I.cx+I.x01,I.cy+I.y01),R<A?s.arc(I.cx,I.cy,R,eo(I.y01,I.x01),eo(L.y01,L.x01),!m):(s.arc(I.cx,I.cy,R,eo(I.y01,I.x01),eo(I.y11,I.x11),!m),s.arc(0,0,d,eo(I.cy+I.y11,I.cx+I.x11),eo(L.cy+L.y11,L.cx+L.x11),m),s.arc(L.cx,L.cy,R,eo(L.y11,L.x11),eo(L.y01,L.x01),!m))):s.arc(0,0,d,O,S,m)}if(s.closePath(),u)return s=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-bp/2;return[Bu(f)*u,fl(f)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:fi(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:fi(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:fi(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:fi(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:fi(+u),c):i},c.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:fi(+u),c):a},c.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:fi(+u),c):o},c.context=function(u){return arguments.length?(s=u==null?null:u,c):s},c}var rm=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function AA(e,t,n,r,i={}){const{inset:a=0,radius:o=0,insetLeft:s=a,insetTop:l=a,insetRight:c=a,insetBottom:u=a,radiusBottomLeft:f=o,radiusBottomRight:d=o,radiusTopLeft:h=o,radiusTopRight:p=o,minWidth:v=-1/0,maxWidth:g=1/0,minHeight:m=-1/0}=i,b=rm(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!Jr(r)&&!wP(r)){const P=!!ci(r),[T,,A]=P?Kg(t):t,[R,z]=T,[I,L]=Li(A,T),F=I>0?R:R+I,Z=L>0?z:z+L,H=Math.abs(I),W=Math.abs(L),G=F+s,J=Z+l,re=H-(s+c),he=W-(l+u),ce=P?Og(re,m,1/0):Og(re,v,g),ke=P?Og(he,v,g):Og(he,m,1/0),ot=P?G:G-(ce-re)/2,xt=P?J-(ke-he)/2:J-(ke-he);return gn(e.createElement("rect",{})).style("x",ot).style("y",xt).style("width",ce).style("height",ke).style("radius",[h,p,d,f]).call(Qt,b).node()}const{y:_,y1:S}=n,O=r.getCenter(),C=Du(r,t,[_,S]),E=nm().cornerRadius(o).padAngle(a*Math.PI/180);return gn(e.createElement("path",{})).style("path",E(C)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",o).style("inset",a).call(Qt,b).node()}const xp=(e,t)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=e,o=rm(e,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:l}=t;return(c,u,f)=>{const{color:d,radius:h=0}=f,p=rm(f,["color","radius"]),v=p.lineWidth||1,{stroke:g,radius:m=h,radiusTopLeft:b=m,radiusTopRight:_=m,radiusBottomRight:S=m,radiusBottomLeft:O=m,innerRadius:C=0,innerRadiusTopLeft:E=C,innerRadiusTopRight:P=C,innerRadiusBottomRight:T=C,innerRadiusBottomLeft:A=C,lineWidth:R=n==="stroke"||g?v:0,inset:z=0,insetLeft:I=z,insetRight:L=z,insetBottom:F=z,insetTop:Z=z,minWidth:H,maxWidth:W,minHeight:G}=o,J=rm(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:re=d,opacity:he}=u,ce=[i?b:E,i?_:P,a?S:T,a?O:A],ke=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];ci(s)&&ke.push(ke.shift());const ot=Object.assign(Object.assign({radius:m},Object.fromEntries(ke.map((xt,et)=>[xt,ce[et]]))),{inset:z,insetLeft:I,insetRight:L,insetBottom:F,insetTop:Z,minWidth:H,maxWidth:W,minHeight:G});return gn(AA(l,c,u,s,ot)).call(Qt,p).style("fill","transparent").style(n,re).style(sA(e),he).style("lineWidth",R).style("stroke",g===void 0?re:g).call(Qt,J).node()}};xp.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const FY={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function BY(e,t){var n;return(n=e.style[t])!==null&&n!==void 0?n:FY[t]}function B_(e,t,n,r){e.style[t]=n,r&&e.children.forEach(i=>B_(i,t,n,r))}function z_(e){B_(e,"visibility","hidden",!0)}function Z_(e){B_(e,"visibility","visible",!0)}var _p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function zc(e){return gn(e).selectAll(`.${Bl}`).nodes().filter(t=>!t.__removed__)}function RA(e,t){return $_(e,t).flatMap(({container:n})=>zc(n))}function $_(e,t){return t.filter(n=>n!==e&&n.options.parentKey===e.options.key)}function dl(e){return gn(e).select(`.${Uh}`).node()}function IA(e){if(e.tagName==="g")return e.getRenderBounds();const t=e.getGeometryBounds(),n=new ra;return n.setFromTransformedAABB(t,e.getWorldTransform()),n}function W_(e,t){const{offsetX:n,offsetY:r}=t,i=IA(e),{min:[a,o],max:[s,l]}=i,c=n<a||n>s,u=r<o||r>l;return c||u?null:[n-a,r-o]}function G_(e,t){const{offsetX:n,offsetY:r}=t,[i,a,o,s]=zY(e);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function zY(e){const t=e.getRenderBounds(),{min:[n,r],max:[i,a]}=t;return[n,r,i,a]}function LA(e){return t=>t.__data__.color}function H_(e){return t=>t.__data__.x}function zu(e){const t=Array.isArray(e)?e:[e],n=new Map(t.flatMap(r=>Array.from(r.markState.keys()).map(a=>[im(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return n.get(im(o,a))[i]}}function Ul(e,t=(r,i)=>r,n=(r,i,a)=>r.setAttribute(i,a)){const r="__states__",i="__ordinal__",a=u=>{const{[r]:f=[],[i]:d={}}=u,h=f.reduce((p,v)=>Object.assign(Object.assign({},p),e[v]),d);if(Object.keys(h).length!==0){for(const[p,v]of Object.entries(h)){const g=BY(u,p),m=t(v,u);n(u,p,m),p in d||(d[p]=g)}u[i]=d}},o=u=>{u[r]||(u[r]=[])};return{setState:(u,...f)=>{o(u),u[r]=[...f],a(u)},removeState:(u,...f)=>{o(u);for(const d of f){const h=u[r].indexOf(d);h!==-1&&u[r].splice(h,1)}a(u)},hasState:(u,f)=>(o(u),u[r].indexOf(f)!==-1)}}function ZY(e){return e===void 0?!0:typeof e!="object"?!1:Object.keys(e).length===0}function im(e,t){return`${e},${t}`}function pd(e,t){const r=(Array.isArray(e)?e:[e]).flatMap(a=>a.marks.map(o=>[im(a.key,o.key),o.state])),i={};for(const a of t){const[o,s]=Array.isArray(a)?a:[a,{}];i[o]=r.reduce((l,c)=>{const[u,f={}]=c,d=ZY(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const v=l[h],g=(m,b,_,S)=>{const O=im(S.__data__.viewKey,S.__data__.markKey);return u!==O?v==null?void 0:v(m,b,_,S):typeof p!="function"?p:p(m,b,_,S)};l[h]=g}return l},{})}return i}function wp(e,t){const n=new Map(e.map((i,a)=>[i,a])),r=t?e.map(t):e;return(i,a)=>{if(typeof i!="function")return i;const o=n.get(a),s=t?t(a):a;return i(s,o,r,a)}}function NA(e){var{link:t=!1,valueof:n=(u,f)=>u,coordinate:r}=e,i=_p(e,["link","valueof","coordinate"]);const a="element-link";if(!t)return[()=>{},()=>{}];const o=u=>u.__data__.points,s=(u,f)=>{const[,d,h]=u,[p,,,v]=f;return[d,p,v,h]};return[u=>{var f;if(u.length<=1)return;const d=Vl(u,(h,p)=>{const{x:v}=h.__data__,{x:g}=p.__data__;return v-g});for(let h=1;h<d.length;h++){const p=Es(),v=d[h-1],g=d[h],[m,b,_,S]=s(o(v),o(g));p.moveTo(...m),p.lineTo(...b),p.lineTo(..._),p.lineTo(...S),p.closePath();const O=Lc(i,T=>n(T,v)),{fill:C=v.getAttribute("fill")}=O,E=_p(O,["fill"]),P=new Ja({className:a,style:Object.assign({d:p.toString(),fill:C,zIndex:-2},E)});(f=v.link)===null||f===void 0||f.remove(),v.parentNode.appendChild(P),v.link=P}},u=>{var f;(f=u.link)===null||f===void 0||f.remove(),u.link=null}]}function kA(e,t,n){const r=i=>{const{transform:a}=e.style;return a?`${a} ${i}`:i};if(Jr(n)){const{points:i}=e.__data__,[a,o]=ci(n)?Kg(i):i,s=n.getCenter(),l=Li(a,s),c=Li(o,s),u=Cs(l),f=iA(l,c),d=u+f/2,h=t*Math.cos(d),p=t*Math.sin(d);return r(`translate(${h}, ${p})`)}return ci(n)?r(`translate(${t}, 0)`):r(`translate(0, ${-t})`)}function jA(e){var{document:t,background:n,scale:r,coordinate:i,valueof:a}=e,o=_p(e,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const l=(m,b,_)=>{const S=m.invert(b),O=b+m.getBandWidth(S)/2,C=m.getStep(S)/2,E=C*_;return[O-C+E,O+C-E]},c=(m,b)=>{const{x:_}=r;if(!yp(_))return[0,1];const{__data__:S}=m,{x:O}=S,[C,E]=l(_,O,b);return[C,E]},u=(m,b)=>{const{y:_}=r;if(!yp(_))return[0,1];const{__data__:S}=m,{y:O}=S,[C,E]=l(_,O,b);return[C,E]},f=(m,b)=>{const{padding:_}=b,[S,O]=c(m,_),[C,E]=u(m,_),P=[[S,C],[O,C],[O,E],[S,E]].map(z=>i.map(z)),{__data__:T}=m,{y:A,y1:R}=T;return AA(t,P,{y:A,y1:R},i,b)},d=(m,b)=>{const{transform:_="scale(1.2, 1.2)",transformOrigin:S="center center",stroke:O=""}=b,C=_p(b,["transform","transformOrigin","stroke"]),E=Object.assign({transform:_,transformOrigin:S,stroke:O},C),P=m.cloneNode(!0);for(const[T,A]of Object.entries(E))P.style[T]=A;return P},h=()=>{const{x:m,y:b}=r;return[m,b].some(yp)};return[m=>{m.background&&m.background.remove();const b=Lc(o,z=>a(z,m)),{fill:_="#CCD6EC",fillOpacity:S=.3,zIndex:O=-2,padding:C=.001,strokeWidth:E=0}=b,P=_p(b,["fill","fillOpacity","zIndex","padding","strokeWidth"]),T=Object.assign(Object.assign({},P),{fill:_,fillOpacity:S,zIndex:O,padding:C,strokeWidth:E}),R=(h()?f:d)(m,T);R.className=s,m.parentNode.parentNode.appendChild(R),m.background=R},m=>{var b;(b=m.background)===null||b===void 0||b.remove(),m.background=null},m=>m.className===s]}function Zc(e,t){const r=e.getRootNode().defaultView.getContextService().getDomElement();r!=null&&r.style&&(e.cursor=r.style.cursor,r.style.cursor=t)}function $Y(e){Zc(e,e.cursor)}function Y_(e,t,n){return e.find(r=>Object.entries(t).every(([i,a])=>n(r)[i]===a))}function am(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function Sp(e,t=!1){const n=EA(e,r=>!!r).map((r,i)=>[i===0?"M":"L",...r]);return t&&n.push(["Z"]),n}function DA(e){return e.querySelectorAll(".element")}function WY(e,t,n=0){const r=[["M",...t[1]]],i=am(e,t[1]),a=am(e,t[0]);return i===0?r.push(["L",...t[3]],["A",a,a,0,n,1,...t[0]],["Z"]):r.push(["A",i,i,0,n,0,...t[2]],["L",...t[3]],["A",a,a,0,n,1,...t[0]],["Z"]),r}function om(e,t){if(t(e))return e;let n=e.parent;for(;n&&!t(n);)n=n.parent;return n}function FA(e,t){const{__data__:n}=e,{markKey:r,index:i,seriesIndex:a}=n,{markState:o}=t,s=Array.from(o.keys()).find(l=>l.key===r);if(s)return a?a.map(l=>s.data[l]):s.data[i]}function GY(e){return om(e,t=>t.className==="component")}function HY(e){return om(e,t=>t.className==="element")}function YY(e){return om(e,t=>t.className==="label")}function La(e,t,n,r=i=>!0){return i=>{if(!r(i))return;n.emit(`plot:${e}`,i);const{target:a}=i;if(!a)return;const{className:o}=a;if(o==="plot")return;const s=HY(a),l=GY(a),c=YY(a),u=s||l||c;if(!u)return;const{className:f,markType:d}=u,h=Object.assign(Object.assign({},i),{nativeEvent:!0});f==="element"?(h.data={data:FA(u,t)},n.emit(`element:${e}`,h),n.emit(`${d}:${e}`,h)):f==="label"?(h.data={data:u.attributes.datum},n.emit(`label:${e}`,h),n.emit(`${o}:${e}`,h)):(n.emit(`component:${e}`,h),n.emit(`${o}:${e}`,h))}}function BA(){return(e,t,n)=>{const{container:r,view:i}=e,a=La(kr.CLICK,i,n,E=>E.detail===1),o=La(kr.DBLCLICK,i,n,E=>E.detail===2),s=La(kr.POINTER_TAP,i,n),l=La(kr.POINTER_DOWN,i,n),c=La(kr.POINTER_UP,i,n),u=La(kr.POINTER_OVER,i,n),f=La(kr.POINTER_OUT,i,n),d=La(kr.POINTER_MOVE,i,n),h=La(kr.POINTER_ENTER,i,n),p=La(kr.POINTER_LEAVE,i,n),v=La(kr.POINTER_UPOUTSIDE,i,n),g=La(kr.DRAG_START,i,n),m=La(kr.DRAG,i,n),b=La(kr.DRAG_END,i,n),_=La(kr.DRAG_ENTER,i,n),S=La(kr.DRAG_LEAVE,i,n),O=La(kr.DRAG_OVER,i,n),C=La(kr.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",h),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",v),r.addEventListener("dragstart",g),r.addEventListener("drag",m),r.addEventListener("dragend",b),r.addEventListener("dragenter",_),r.addEventListener("dragleave",S),r.addEventListener("dragover",O),r.addEventListener("drop",C),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",h),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",v),r.removeEventListener("dragstart",g),r.removeEventListener("drag",m),r.removeEventListener("dragend",b),r.removeEventListener("dragenter",_),r.removeEventListener("dragleave",S),r.removeEventListener("dragover",O),r.removeEventListener("drop",C)}}}BA.props={reapplyWhenUpdate:!0};function VY(){return{"component.axisRadar":FT,"component.axisLinear":kc,"component.axisArc":DT,"component.legendContinuousBlock":eA,"component.legendContinuousBlockSize":tA,"component.legendContinuousSize":M_,"interaction.event":BA,"composition.mark":nA,"composition.view":rA,"shape.label.label":OA}}var UY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function di(e,t){const n=Object.assign(Object.assign({},VY()),t),r=a=>{if(typeof a!="string")return a;const o=`${e}.${a}`;return n[o]||qf(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,l=UY(a,["type"]);s||qf("Plot type is required!");const c=r(s);return c==null?void 0:c(l,o)},r]}function zA(e){const{canvas:t,group:n}=e;return(t==null?void 0:t.document)||(n==null?void 0:n.ownerDocument)||qf("Cannot find library document")}var ZA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function XY(e,t,n){const[r]=di("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:l,insetBottom:c}=e,{coordinates:u=[]}=t,f=tV(u),d=f[0].type==="cartesian3D",h=Object.assign(Object.assign({},e),{x:o,y:s,width:a-o-l,height:i-c-s,transformations:f.flatMap(r)});return d?new _P.Coordinate3D(h):new _P.Coordinate(h)}function $A(e,t){const{coordinate:n={}}=e,r=ZA(e,["coordinate"]),{type:i,transform:a=[]}=n,o=ZA(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:a});const[,s]=di("coordinate",t),{transform:l=!1}=s(i).props||{};if(l)throw new Error(`Unknown coordinate: ${i}.`);return Object.assign(Object.assign({},r),{coordinates:[Object.assign({type:i},o),...a]})}function Hs(e,t){return e.filter(n=>n.type===t)}function Zu(e){return Hs(e,"polar").length>0}function KY(e){return Hs(e,"helix").length>0}function vd(e){return Hs(e,"transpose").length%2===1}function qY(e){return Hs(e,"parallel").length>0}function WA(e){return Hs(e,"theta").length>0}function JY(e){return Hs(e,"reflect").length>0}function Op(e){return Hs(e,"radial").length>0}function QY(e){return Hs(e,"radar").length>0}function eV(e){return Hs(e,"reflectY").length>0}function tV(e){return e.find(t=>t.type==="cartesian"||t.type==="cartesian3D")?e:[...e,{type:"cartesian"}]}function Vn(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}var nV=Vn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),rV=Vn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),iV=Vn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),aV=Vn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),oV=Vn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),sV=Vn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),lV=Vn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),cV=Vn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),uV=Vn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),fV=Vn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),dV=Vn("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function GA(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function hV(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return GA((n-r/t)*t,o,i,a,s)}}function pV(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return GA((n-r/t)*t,i,a,o,s)}}var V_=function(e){return function(){return e}};function HA(e,t){return function(n){return e+n*t}}function vV(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function gV(e,t){var n=t-e;return n?HA(e,n>180||n<-180?n-360*Math.round(n/360):n):V_(isNaN(e)?t:e)}function mV(e){return(e=+e)==1?gd:function(t,n){return n-t?vV(t,n,e):V_(isNaN(t)?n:t)}}function gd(e,t){var n=t-e;return n?HA(e,n):V_(isNaN(e)?t:e)}var _ye=function e(t){var n=mV(t);function r(i,a){var o=n((i=Nh(i)).r,(a=Nh(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=gd(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function YA(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Nh(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=a(l),s+""}}}var yV=YA(hV),wye=YA(pV),ei=e=>yV(e[e.length-1]),VA=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Vn),bV=ei(VA),UA=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Vn),xV=ei(UA),XA=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Vn),_V=ei(XA),KA=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Vn),wV=ei(KA),qA=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Vn),SV=ei(qA),JA=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Vn),OV=ei(JA),QA=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Vn),CV=ei(QA),e3=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Vn),EV=ei(e3),t3=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Vn),MV=ei(t3),n3=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Vn),PV=ei(n3),r3=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Vn),TV=ei(r3),i3=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Vn),AV=ei(i3),a3=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Vn),RV=ei(a3),o3=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Vn),IV=ei(o3),s3=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Vn),LV=ei(s3),l3=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Vn),NV=ei(l3),c3=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Vn),kV=ei(c3),u3=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Vn),jV=ei(u3),f3=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Vn),DV=ei(f3),d3=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Vn),FV=ei(d3),h3=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Vn),BV=ei(h3),p3=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Vn),zV=ei(p3),v3=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Vn),ZV=ei(v3),g3=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Vn),$V=ei(g3),m3=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Vn),WV=ei(m3),y3=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Vn),GV=ei(y3),b3=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Vn),HV=ei(b3);function YV(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}var VV=Math.PI/180,UV=180/Math.PI,x3=-.14861,U_=1.78277,X_=-.29227,sm=-.90649,Cp=1.97294,_3=Cp*sm,w3=Cp*U_,S3=U_*X_-sm*x3;function XV(e){if(e instanceof $u)return new $u(e.h,e.s,e.l,e.opacity);e instanceof go||(e=nE(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(S3*r+_3*t-w3*n)/(S3+_3-w3),a=r-i,o=(Cp*(n-i)-X_*a)/sm,s=Math.sqrt(o*o+a*a)/(Cp*i*(1-i)),l=s?Math.atan2(o,a)*UV-120:NaN;return new $u(l<0?l+360:l,s,i,e.opacity)}function hl(e,t,n,r){return arguments.length===1?XV(e):new $u(e,t,n,r==null?1:r)}function $u(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fv($u,hl,zx(Df,{brighter:function(e){return e=e==null?Ff:Math.pow(Ff,e),new $u(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?xu:Math.pow(xu,e),new $u(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*VV,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new go(255*(t+n*(x3*r+U_*i)),255*(t+n*(X_*r+sm*i)),255*(t+n*(Cp*r)),this.opacity)}}));function O3(e){return function t(n){n=+n;function r(i,a){var o=e((i=hl(i)).h,(a=hl(a)).h),s=gd(i.s,a.s),l=gd(i.l,a.l),c=gd(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=l(Math.pow(u,n)),i.opacity=c(u),i+""}}return r.gamma=t,r}(1)}var Sye=O3(gV),K_=O3(gd),KV=K_(hl(300,.5,0),hl(-240,.5,1)),qV=K_(hl(-100,.75,.35),hl(80,1.5,.8)),JV=K_(hl(260,.75,.35),hl(80,1.5,.8)),lm=hl();function QV(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return lm.h=360*e-100,lm.s=1.5-1.5*t,lm.l=.8-.9*t,lm+""}var cm=Nh(),eU=Math.PI/3,tU=Math.PI*2/3;function nU(e){var t;return e=(.5-e)*Math.PI,cm.r=255*(t=Math.sin(e))*t,cm.g=255*(t=Math.sin(e+eU))*t,cm.b=255*(t=Math.sin(e+tU))*t,cm+""}function rU(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function um(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var iU=um(Vn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),aU=um(Vn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),oU=um(Vn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),sU=um(Vn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function lU(e,t,n,r,i,a){const{guide:o={}}=n,s=mU(e,t,n);if(typeof s!="string")return n;const l=yU(s,e,t,n),c=pU(s,l,n);return Object.assign(Object.assign(Object.assign({},n),xU(s,e,t,n,r)),{domain:c,range:bU(s,e,t,n,c,i,a),expectedDomain:l,guide:o,name:e,type:s})}function cU(e,t){const n={};for(const r of e){const{values:i,name:a}=r,o=t[a];for(const s of i){const{name:l,value:c}=s;n[l]=c.map(u=>o.map(u))}}return n}function uU(e,t){var n;const{components:r=[]}=t,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(e.flatMap(s=>s.channels.map(l=>l.scale)))),o=new Map(a.map(s=>[s.name,s]));for(const s of r){const l=hU(s);for(const c of l){const u=o.get(c),f=((n=s.scale)===null||n===void 0?void 0:n[c])||{},{independent:d=!1}=f;if(u&&!d){const{guide:h}=u,p=typeof h=="boolean"?{}:h;u.guide=Je({},p,s),Object.assign(u,f)}else{const h=Object.assign(Object.assign({},f),{expectedDomain:f.domain,name:c,guide:S_(s,i)});a.push(h)}}}return a}function fU(e){if(!e||!Array.isArray(e))return[Au,Au];let t,n;return[a=>{var o;t=a.map.bind(a),n=(o=a.invert)===null||o===void 0?void 0:o.bind(a);const s=e.filter(([d])=>typeof d=="function"),l=e.filter(([d])=>typeof d!="function"),c=new Map(l);if(a.map=d=>{for(const[h,p]of s)if(h(d))return p;return c.has(d)?c.get(d):t(d)},!n)return a;const u=new Map(l.map(([d,h])=>[h,d])),f=new Map(s.map(([d,h])=>[h,d]));return a.invert=d=>f.has(d)?d:u.has(d)?u.get(d):n(d),a},a=>(t!==null&&(a.map=t),n!==null&&(a.invert=n),a)]}function C3(e,t){const n=Object.keys(e);for(const r of Object.values(t)){const{name:i}=r.getOptions();if(!(i in e))e[i]=r;else{const a=n.filter(l=>l.startsWith(i)).map(l=>+(l.replace(i,"")||0)),o=jr(a)+1,s=`${i}${o}`;e[s]=r,r.getOptions().key=s}}return e}function E3(e,t){const[n]=di("scale",t),{relations:r}=e,[i]=fU(r),a=n(e);return i(a)}function dU(e){const t=e.flatMap(n=>Array.from(n.values())).flatMap(n=>n.channels.map(r=>r.scale));M3(t,"x"),M3(t,"y")}function hU(e){const{channels:t=[],type:n,scale:r={}}=e,i=["shape","color","opacity","size"];return t.length!==0?t:n==="axisX"?["x"]:n==="axisY"?["y"]:n==="legends"?Object.keys(r).filter(a=>i.includes(a)):[]}function M3(e,t){const n=e.filter(({name:a,facet:o=!0})=>o&&a===t),r=n.flatMap(a=>a.domain),i=n.every(P3)?Hl(r):n.every(T3)?Array.from(new Set(r)):null;if(i!==null)for(const a of n)a.domain=i}function pU(e,t,n){const{ratio:r}=n;return r==null?t:P3({type:e})?vU(t,r,e):T3({type:e})?gU(t,r):t}function vU(e,t,n){const r=e.map(Number),i=new Qa({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*t]});return n==="time"?e.map(a=>new Date(i.map(a))):e.map(a=>i.map(a))}function gU(e,t){const n=Math.round(e.length*t);return e.slice(0,n)}function P3(e){const{type:t}=e;return typeof t!="string"?!1:["linear","log","pow","time"].includes(t)}function T3(e){const{type:t}=e;return typeof t!="string"?!1:["band","point","ordinal"].includes(t)}function mU(e,t,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;return r!==void 0?r:IU(t)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?q_(e,s):i!==void 0?L3([i])?q_(e,s):N3(t)?"time":R3(e,a,o):L3(t)?q_(e,s):N3(t)?"time":R3(e,a,o)}function yU(e,t,n,r){const{domain:i}=r;if(i!==void 0)return i;switch(e){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return I3(MU(n,r),r);case"band":case"ordinal":case"point":return PU(n);case"quantile":return TU(n);case"sequential":return I3(AU(n),r);default:return[]}}function bU(e,t,n,r,i,a,o){const{range:s}=r;if(typeof s=="string")return _U(s);if(s!==void 0)return s;const{rangeMin:l,rangeMax:c}=r;switch(e){case"linear":case"time":case"log":case"pow":case"sqrt":{const u=A3(n,r,i,a,o),[f,d]=RU(t,u);return[l!=null?l:f,c!=null?c:d]}case"band":case"point":{const u=t==="size"?5:0,f=t==="size"?10:1;return[l!=null?l:u,c!=null?c:f]}case"ordinal":return A3(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function xU(e,t,n,r,i){switch(e){case"linear":case"time":case"log":case"pow":case"sqrt":return OU(i,r);case"band":case"point":return CU(e,t,i,r);case"sequential":return SU(r);default:return r}}function A3(e,t,n,r,i){const[a]=di("palette",i),{category10:o,category20:s}=r,l=HZ(e.flat()).length<=o.length?o:s,{palette:c=l,offset:u}=t;if(Array.isArray(c))return c;try{return a({type:c})}catch(f){const d=wU(c,n,u);if(d)return d;throw new Error(`Unknown Component: ${c} `)}}function _U(e){return e.split("-")}function wU(e,t,n=r=>r){if(!e)return null;const r=Rc(e),i=wt[`scheme${r}`],a=wt[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const o=i[t.length];if(o)return o}return t.map((o,s)=>a(n(s/t.length)))}function SU(e){const{palette:t="ylGnBu",offset:n}=e,r=Rc(t),i=wt[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?a=>i(n(a)):i}}function OU(e,t){const{interpolate:n=cp,nice:r=!1,tickCount:i=5}=t;return Object.assign(Object.assign({},t),{interpolate:n,nice:r,tickCount:i})}function CU(e,t,n,r){if(r.padding!==void 0||r.paddingInner!==void 0||r.paddingOuter!==void 0)return Object.assign(Object.assign({},r),{unknown:NaN});const i=EU(e,t,n),{paddingInner:a=i,paddingOuter:o=i}=r;return Object.assign(Object.assign({},r),{paddingInner:a,paddingOuter:o,padding:i,unknown:NaN})}function EU(e,t,n){return t==="enterDelay"||t==="enterDuration"||t==="size"?0:e==="band"?WA(n)?0:.1:e==="point"?.5:0}function q_(e,t){return t||(LU(e)?"point":"ordinal")}function R3(e,t,n){return n||(e!=="color"||t?"linear":"sequential")}function I3(e,t){if(e.length===0)return e;const{domainMin:n,domainMax:r}=t,[i,a]=e;return[n!=null?n:i,r!=null?r:a]}function MU(e,t){const{zero:n=!1}=t;let r=1/0,i=-1/0;for(const a of e)for(const o of a)qr(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}function PU(e){return Array.from(new Set(e.flat()))}function TU(e){return e.flat().sort()}function AU(e){let t=1/0,n=-1/0;for(const r of e)for(const i of r)qr(i)&&(t=Math.min(t,+i),n=Math.max(n,+i));return t===1/0?[]:[t<0?-n:t,n]}function RU(e,t){return e==="enterDelay"?[0,1e3]:e=="enterDuration"?[300,1e3]:e.startsWith("y")||e.startsWith("position")?[1,0]:e==="color"?[GZ(t),vP(t)]:e==="opacity"?[0,1]:e==="size"?[1,10]:[0,1]}function L3(e){return J_(e,t=>{const n=typeof t;return n==="string"||n==="boolean"})}function N3(e){return J_(e,t=>t instanceof Date)}function IU(e){return J_(e,Kh)}function J_(e,t){for(const n of e)if(n.some(t))return!0;return!1}function LU(e){return e.startsWith("x")||e.startsWith("y")||e.startsWith("position")||e.startsWith("size")}function NU(e){return e.startsWith("x")||e.startsWith("y")||e.startsWith("position")||e==="enterDelay"||e==="enterDuration"||e==="updateDelay"||e==="updateDuration"||e==="exitDelay"||e==="exitDuration"}function kU(e){if(!e||!e.type)return!1;if(typeof e.type=="function")return!0;const{type:t,domain:n,range:r,interpolator:i}=e,a=n&&n.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&a&&o||["sequential"].includes(t)&&a&&(o||i)||["constant","identity"].includes(t)&&o)}const jU={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},DU={threshold:"threshold",quantize:"quantize",quantile:"quantile"},FU={ordinal:"ordinal",band:"band",point:"point"},BU={constant:"constant"};var $c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function zU(e,t,n){const{coordinates:r=[],title:i}=t,[,a]=di("component",n),o=e.filter(({guide:u})=>u!==null),s=[],l=KU(t,e,n);if(s.push(...l),i){const{props:u}=a("title"),{defaultPosition:f,defaultOrientation:d,defaultOrder:h,defaultSize:p,defaultCrossPadding:v}=u,g=typeof i=="string"?{title:i}:i;s.push(Object.assign({type:"title",position:f,orientation:d,order:h,crossPadding:v[0],defaultSize:p},g))}return HU(o,r).forEach(([u,f])=>{const{props:d}=a(u),{defaultPosition:h,defaultPlane:p="xy",defaultOrientation:v,defaultSize:g,defaultOrder:m,defaultLength:b,defaultPadding:_=[0,0],defaultCrossPadding:S=[0,0]}=d,O=Je({},...f),{guide:C,field:E}=O,P=Array.isArray(C)?C:[C];for(const T of P){const[A,R]=UU(u,h,v,T,f,o,r);if(!A&&!R)continue;const z=A==="left"||A==="right",I=z?_[1]:_[0],L=z?S[1]:S[0],{size:F,order:Z=m,length:H=b,padding:W=I,crossPadding:G=L}=T;s.push(Object.assign(Object.assign({title:E},T),{defaultSize:g,length:H,position:A,plane:p,orientation:R,padding:W,order:Z,crossPadding:G,size:F,type:u,scales:f}))}}),s}function k3(e,t,n,r,i){const[a]=di("component",r),{scaleInstances:o,scale:s,bbox:l}=e,c=$c(e,["scaleInstances","scale","bbox"]),u={bbox:l,library:r};return a(c)({coordinate:t,library:r,markState:i,scales:o,theme:n,value:u,scale:s})}function ZU(e){return e.map(t=>{const n=Je(t,t.style);return delete n.style,n})}function Oye(e){return e.flatMap(t=>t.type=="group"?t.children:t)}function j3(e,t){const n=["left","right","bottom","top"];return _g(e,({type:a,position:o,group:s})=>n.includes(o)?s===void 0?a.startsWith("legend")?`legend-${o}`:Symbol("independent"):s==="independent"?Symbol("independent"):s:Symbol("independent")).flatMap(([,a])=>{if(a.length===1)return a[0];if(t!==void 0){const u=a.filter(v=>v.length!==void 0).map(v=>v.length),f=ws(u);if(f>t)return a.forEach(v=>v.group=Symbol("independent")),a;const d=t-f,h=a.length-u.length,p=d/h;a.forEach(v=>{v.length===void 0&&(v.length=p)})}const o=jr(a,u=>u.size),s=jr(a,u=>u.order),l=jr(a,u=>u.crossPadding),c=a[0].position;return{type:"group",size:o,order:s,position:c,children:a,crossPadding:l}})}function $U(e,t){const n=["shape","size","color","opacity"],r=(d,h)=>d==="constant"&&h==="size",i=e.filter(({type:d,name:h})=>typeof d=="string"&&n.includes(h)&&!r(d,h)),a=i.filter(({type:d})=>d==="constant"),o=i.filter(({type:d})=>d!=="constant"),l=_g(o,d=>d.field?d.field:Symbol("independent")).map(([d,h])=>[d,[...h,...a]]).filter(([,d])=>d.some(h=>h.type!=="constant")),c=new Map(l);if(c.size===0)return[];const u=d=>d.sort(([h],[p])=>h.localeCompare(p));return Array.from(c).map(([,d])=>{const p=YZ(d).sort((v,g)=>g.length-v.length).map(v=>({combination:v,option:v.map(g=>[g.name,WU(g)])}));for(const{option:v,combination:g}of p)if(!v.every(m=>m[1]==="constant")&&v.every(m=>m[1]==="discrete"||m[1]==="constant"))return["legendCategory",g];for(const[v,g]of XZ)for(const{option:m,combination:b}of p)if(g.some(_=>yP(u(_),u(m))))return[v,b];return null}).filter(qr)}function WU(e){const{type:t}=e;return typeof t!="string"?null:t in jU?"continuous":t in FU?"discrete":t in DU?"distribution":t in BU?"constant":null}function GU(e,t){return e.map(n=>{const{name:r}=n;if(KY(t)||WA(t)||vd(t)&&(Zu(t)||Op(t)))return null;if(r.startsWith("x"))return Zu(t)?["axisArc",[n]]:Op(t)?["axisLinear",[n]]:[vd(t)?"axisY":"axisX",[n]];if(r.startsWith("y"))return Zu(t)?["axisLinear",[n]]:Op(t)?["axisArc",[n]]:[vd(t)?"axisX":"axisY",[n]];if(r.startsWith("z"))return["axisZ",[n]];if(r.startsWith("position")){if(QY(t))return["axisRadar",[n]];if(!Zu(t))return["axisY",[n]]}return null}).filter(qr)}function HU(e,t){const n=e.filter(r=>kU(r));return[...$U(n,t),...GU(n,t)]}function Q_(e){const t=Hs(e,"polar");if(t.length){const r=t[t.length-1],{startAngle:i,endAngle:a}=bP(r);return[i,a]}const n=Hs(e,"radial");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=xP(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function YU(e){const t=/position(\d*)/g.exec(e);return t?+t[1]:null}function VU(e,t,n,r,i){const{name:a}=n[0];if(e==="axisRadar"){const o=r.filter(f=>f.name.startsWith("position")),s=YU(a);if(a===o.slice(-1)[0].name||s===null)return[null,null];const[l,c]=Q_(i);return["center",(c-l)/(o.length-1)*s+l]}if(e==="axisY"&&qY(i))return vd(i)?["center","horizontal"]:["center","vertical"];if(e==="axisLinear"){const[o]=Q_(i);return["center",o]}return e==="axisArc"?t[0]==="inner"?["inner",null]:["outer",null]:Zu(i)?["center",null]:Op(i)?["center",null]:e==="axisX"&&JY(i)||e==="axisX"&&eV(i)?["top",null]:t}function UU(e,t,n,r,i,a,o){const[s]=Q_(o),l=[r.position||t,s!=null?s:n];return typeof e=="string"&&e.startsWith("axis")?VU(e,l,i,a,o):typeof e=="string"&&e.startsWith("legend")&&Zu(o)&&r.position==="center"?["center","vertical"]:l}function XU(e,t,n=[]){return e==="x"?vd(n)?`${t}Y`:`${t}X`:e==="y"?vd(n)?`${t}X`:`${t}Y`:null}function KU(e,t,n){const[,r]=di("component",n),{coordinates:i}=e;function a(o,s,l,c){const u=XU(s,o,i);if(!c||!u)return;const{props:f}=r(u),{defaultPosition:d,defaultSize:h,defaultOrder:p,defaultCrossPadding:[v]}=f;return Object.assign(Object.assign({position:d,defaultSize:h,order:p,type:u,crossPadding:v},c),{scales:[l]})}return t.filter(o=>o.slider||o.scrollbar).flatMap(o=>{const{slider:s,scrollbar:l,name:c}=o;return[a("slider",c,o,s),a("scrollbar",c,o,l)]}).filter(o=>!!o)}function D3(e,t,n,r,i,a){const{type:o}=e;if(!["left","right","bottom","top"].includes(r)||typeof o!="string")return;const l=o;return(()=>l.startsWith("axis")?tX:l.startsWith("group")?qU:l.startsWith("legendContinuous")?nX:l==="legendCategory"?rX:l.startsWith("slider")?eX:l==="title"?QU:l.startsWith("scrollbar")?JU:()=>{})()(e,t,n,r,i,a)}function qU(e,t,n,r,i,a){const{children:o}=e,s=jr(o,c=>c.crossPadding);o.forEach(c=>c.crossPadding=s),o.forEach(c=>D3(c,t,n,r,i,a));const l=jr(o,c=>c.size);e.size=l,o.forEach(c=>c.size=l)}function JU(e,t,n,r,i,a){const{trackSize:o=6}=Je({},i.scrollbar,e);e.size=o}function QU(e,t,n,r,i,a){const o=Je({},i.title,e),{title:s,subtitle:l,spacing:c=0}=o,u=$c(o,["title","subtitle","spacing"]);if(s){const f=Tt(u,"title"),d=pm(s,f);e.size=d.height}if(l){const f=Tt(u,"subtitle"),d=pm(l,f);e.size+=c+d.height}}function eX(e,t,n,r,i,a){const o=()=>{const{slider:u}=i;return Je({},u,e)},{trackSize:s,handleIconSize:l}=o(),c=Math.max(s,l*2.4);e.size=c}function tX(e,t,n,r,i,a){e.transform=e.transform||[{type:"hide"}];const o=r==="left"||r==="right",s=F3(e,r,i),{tickLength:l=0,labelSpacing:c=0,titleSpacing:u=0,labelAutoRotate:f}=s,d=$c(s,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=fm(e,a),p=dm(d,h),v=l+c;if(p&&p.length){const m=jr(p,_=>_.width),b=jr(p,_=>_.height);if(o)e.size=m+v;else{const{tickFilter:_,labelTransform:S}=e;oX(h,p,t,n,_)&&!S&&f!==!1&&f!==null?(e.labelTransform="rotate(90)",e.size=m+v):e.size=b+v}}else e.size=l;const g=hm(d);g&&(o?e.size+=u+g.width:e.size+=u+g.height)}function nX(e,t,n,r,i,a){const s=(()=>{const{legendContinuous:S}=i;return Je({},S,e)})(),{labelSpacing:l=0,titleSpacing:c=0}=s,u=$c(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=Tt(u,"ribbon"),{size:h}=d,p=Tt(u,"handleIcon"),{size:v}=p,g=Math.max(h,v*2.4);e.size=g;const m=fm(e,a),b=dm(u,m);if(b){const S=f?"width":"height",O=jr(b,C=>C[S]);e.size+=O+l}const _=hm(u);_&&(f?e.size=Math.max(e.size,_.width):e.size+=c+_.height)}function rX(e,t,n,r,i,a){const s=(()=>{const{legendCategory:L}=i,{title:F}=e,[Z,H]=Array.isArray(F)?[F,void 0]:[void 0,F];return Je({title:Z},L,Object.assign(Object.assign({},e),{title:H}))})(),{itemSpacing:l,itemMarkerSize:c,titleSpacing:u,rowPadding:f,colPadding:d,maxCols:h=1/0,maxRows:p=1/0}=s,v=$c(s,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:m}=e,b=L=>Math.min(L,p),_=L=>Math.min(L,h),S=r==="left"||r==="right",O=m===void 0?t+(S?0:n[0]+n[1]):m,C=hm(v),E=fm(e,a),P=dm(v,E,"itemLabel"),T=Math.max(P[0].height,c)+f,A=(L,F=0)=>c+L+l[0]+F;S?(()=>{let L=-1/0,F=0,Z=1,H=0,W=-1/0,G=-1/0;const J=C?C.height:0,re=O-J;for(const{width:he}of P){const ce=A(he,d);L=Math.max(L,ce),F+T>re?(Z++,W=Math.max(W,H),G=Math.max(G,F),H=1,F=T):(F+=T,H++)}Z<=1&&(W=H,G=F),e.size=L*_(Z),e.length=G+J,Je(e,{cols:_(Z),gridRow:W})})():typeof g=="number"?(()=>{const L=Math.ceil(P.length/g),F=jr(P,Z=>A(Z.width))*g;e.size=T*b(L)-f,e.length=Math.min(F,O)})():(()=>{let L=1,F=0,Z=-1/0;for(const{width:H}of P){const W=A(H,d);F+W>O?(Z=Math.max(Z,F),F=W,L++):F+=W}L===1&&(Z=F),e.size=T*b(L)-f,e.length=Z})(),C&&(S?e.size=Math.max(e.size,C.width):e.size+=u+C.height)}function fm(e,t){const[n]=di("scale",t),{scales:r,tickCount:i,tickMethod:a}=e,o=r.find(s=>s.type!=="constant"&&s.type!=="identity");return i!==void 0&&(o.tickCount=i),a!==void 0&&(o.tickMethod=a),n(o)}function dm(e,t,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=e,o=$c(e,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=iX(t,r,i),l=Tt(o,n),c=s.map((d,h)=>Object.fromEntries(Object.entries(l).map(([p,v])=>[p,typeof v=="function"?v(d,h):v]))),u=s.map((d,h)=>{const p=c[h];return pm(d,p)});if(!c.some(d=>d.transform)){const d=s.map((h,p)=>p);e.indexBBox=new Map(d.map(h=>[h,[s[h],u[h]]]))}return u}function hm(e){const t=c=>c===!1||c===null,{title:n}=e,r=$c(e,["title"]);if(t(n)||n===void 0)return null;const i=Tt(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(n)?n.join(","):n;return typeof s!="string"?null:pm(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function F3(e,t,n){const{title:r}=e,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${Y2(t)}`]:s}=n;return Je({title:i},o,s,Object.assign(Object.assign({},e),{title:a}))}function B3(e,t){const n=e.getTicks?e.getTicks():e.getOptions().domain;return t?n.filter(t):n}function iX(e,t,n){const i=B3(e,n).map(o=>typeof o=="number"?Cg(o):o),a=t?typeof t=="string"?Ic(t):t:e.getFormatter?e.getFormatter():o=>`${o}`;return i.map(a)}function aX(e,t){return e.getBandWidth?e.getBandWidth(t)/2:0}function oX(e,t,n,r,i){if(ws(t,h=>h.width)>n)return!0;const o=e.clone();o.update({range:[0,n]});const s=B3(e,i),l=s.map(h=>o.map(h)+aX(o,h)),c=s.map((h,p)=>p),u=-r[0],f=n+r[1],d=(h,p)=>{const{width:v}=p;return[h-v/2,h+v/2]};for(let h=0;h<c.length;h++){const p=l[h],[v,g]=d(p,t[h]);if(v<u||g>f)return!0;const m=l[h+1];if(m){const[b]=d(m,t[h+1]);if(g>b)return!0}}return!1}function pm(e,t){const n=sX(e),{filter:r}=t,i=$c(t,["filter"]);return n.attr(Object.assign(Object.assign({},i),{visibility:"none"})),n.getBBox()}function sX(e){return e instanceof qa?e:new rs({style:{text:`${e}`}})}function is(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function lX(e){const t=e.find(({type:n})=>n==="axisZ");if(t){const n=e.find(({type:i})=>i==="axisX");n.plane="xy";const r=e.find(({type:i})=>i==="axisY");r.plane="xy",t.plane="yz",t.origin=[n.bbox.x,n.bbox.y,0],t.eulerAngles=[0,-90,0],t.bbox.x=n.bbox.x,t.bbox.y=n.bbox.y,e.push(Object.assign(Object.assign({},n),{plane:"xz",showLabel:!1,showTitle:!1,origin:[n.bbox.x,n.bbox.y,0],eulerAngles:[-90,0,0]})),e.push(Object.assign(Object.assign({},r),{plane:"yz",showLabel:!1,showTitle:!1,origin:[r.bbox.x+r.bbox.width,r.bbox.y,0],eulerAngles:[0,-90,0]})),e.push(Object.assign(Object.assign({},t),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]}))}}function cX(e,t,n,r){var i,a;const{width:o,height:s,depth:l,x:c=0,y:u=0,z:f=0,inset:d=(i=n.inset)!==null&&i!==void 0?i:0,insetLeft:h=d,insetTop:p=d,insetBottom:v=d,insetRight:g=d,margin:m=(a=n.margin)!==null&&a!==void 0?a:0,marginLeft:b=m,marginBottom:_=m,marginTop:S=m,marginRight:O=m,padding:C=n.padding,paddingBottom:E=C,paddingLeft:P=C,paddingRight:T=C,paddingTop:A=C}=fX(e,t,n,r),R=1/4,z=(Ct,Gt,en,an,sn)=>{const{marks:An}=t;if(An.length===0)return[an,sn];if(Ct-an-sn-Ct*R>0)return[an,sn];const zn=Ct*(1-R);return[Gt==="auto"?zn*an/(an+sn):an,en==="auto"?zn*sn/(an+sn):sn]},I=Ct=>Ct==="auto"?20:Ct!=null?Ct:20,L=I(A),F=I(E),Z=z3(e,s-L-F,[L+S,F+_],["left","right"],t,n,r),{paddingLeft:H,paddingRight:W}=Z,G=o-b-O,[J,re]=z(G,P,T,H,W),he=G-J-re,ce=z3(e,he,[J+b,re+O],["bottom","top"],t,n,r),{paddingTop:ke,paddingBottom:ot}=ce,xt=s-_-S,[et,He]=z(xt,E,A,ot,ke),jt=xt-et-He;return{width:o,height:s,depth:l,insetLeft:h,insetTop:p,insetBottom:v,insetRight:g,innerWidth:he,innerHeight:jt,paddingLeft:J,paddingRight:re,paddingTop:He,paddingBottom:et,marginLeft:b,marginBottom:_,marginTop:S,marginRight:O,x:c,y:u,z:f}}function uX(e){const{height:t,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:l=16,marginLeft:c=l,marginRight:u=l,marginTop:f=l,marginBottom:d=l,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:m=h}=e,b=O=>O==="auto"?20:O,_=n-b(i)-b(a)-c-u-p-v,S=t-b(o)-b(s)-f-d-g-m;return{width:_,height:S}}function fX(e,t,n,r){const{coordinates:i}=t;if(!Zu(i)&&!Op(i))return t;const a=e.filter(m=>typeof m.type=="string"&&m.type.startsWith("axis"));if(a.length===0)return t;const o=a.map(m=>{const b=m.type==="axisArc"?"arc":"linear";return F3(m,b,n)}),s=jr(o,m=>{var b;return(b=m.labelSpacing)!==null&&b!==void 0?b:0}),l=a.flatMap((m,b)=>{const _=o[b],S=fm(m,r);return dm(_,S)}).filter(qr),c=jr(l,m=>m.height)+s,u=a.flatMap((m,b)=>{const _=o[b];return hm(_)}).filter(m=>m!==null),f=u.length===0?0:jr(u,m=>m.height),{inset:d=c,insetLeft:h=d,insetBottom:p=d,insetTop:v=d+f,insetRight:g=d}=t;return Object.assign(Object.assign({},t),{insetLeft:h,insetBottom:p,insetTop:v,insetRight:g})}function z3(e,t,n,r,i,a,o){const s=_i(e,p=>p.position),{padding:l=a.padding,paddingLeft:c=l,paddingRight:u=l,paddingBottom:f=l,paddingTop:d=l}=i,h={paddingBottom:f,paddingLeft:c,paddingTop:d,paddingRight:u};for(const p of r){const v=`padding${Y2(uA(p))}`,g=s.get(p)||[],m=h[v],b=T=>{T.size===void 0&&(T.size=T.defaultSize)},_=T=>{T.type==="group"?(T.children.forEach(b),T.size=jr(T.children,A=>A.size)):T.size=T.defaultSize},S=T=>{T.size||(m!=="auto"?_(T):(D3(T,t,n,p,a,o),b(T)))},O=T=>{T.type.startsWith("axis")&&T.labelAutoHide===void 0&&(T.labelAutoHide=!0)},C=p==="bottom"||p==="top",E=is(g,T=>T.order),P=g.filter(T=>T.type.startsWith("axis")&&T.order==E);if(P.length&&(P[0].crossPadding=0),typeof m=="number")g.forEach(b),g.forEach(O);else if(g.length===0)h[v]=0;else{const T=C?t+n[0]+n[1]:t,A=j3(g,T);A.forEach(S);const R=A.reduce((z,{size:I,crossPadding:L=12})=>z+I+L,0);h[v]=R}}return h}function dX(e,t,n){const r=_i(e,C=>`${C.plane||"xy"}-${C.position}`),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:l,marginTop:c,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:m,height:b,width:_,depth:S}=n,O={xy:ew({width:_,height:b,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:l,marginTop:c,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:m}),yz:ew({width:S,height:b,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:S,innerHeight:b,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:ew({width:_,height:S,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:_,innerHeight:S,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[C,E]of r.entries()){const[P,T]=C.split("-"),A=O[P][T],[R,z]=gP(E,I=>typeof I.type!="string"?!1:!!(T==="center"||I.type.startsWith("axis")&&["inner","outer"].includes(T)));R.length&&hX(R,t,A,T),z.length&&wX(E,t,A)}}function ew({width:e,height:t,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:l,marginRight:c,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:h,insetRight:p,insetTop:v}){const g=n+o,m=i+s,b=r+c,_=a+l,S=e-o-c,O=[g+h,m+v,f-h-p,u-v-d,"center",null,null];return{top:[g,0,f,m,"vertical",!0,Ni,o,S],right:[e-b,m,b,u,"horizontal",!1,Ni],bottom:[g,t-_,f,_,"vertical",!1,Ni,o,S],left:[0,m,g,u,"horizontal",!0,Ni],"top-left":[g,0,f,m,"vertical",!0,Ni],"top-right":[g,0,f,m,"vertical",!0,Ni],"bottom-left":[g,t-_,f,_,"vertical",!1,Ni],"bottom-right":[g,t-_,f,_,"vertical",!1,Ni],center:O,inner:O,outer:O}}function hX(e,t,n,r){const[i,a]=gP(e,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));pX(i,t,n,r),SX(a,t,n)}function pX(e,t,n,r){r==="center"?KZ(t)?_X(e,t,n,r):Jr(t)?mX(e,t,n):ep(t)&&yX(e,t,n,e[0].orientation):r==="inner"?vX(e,t,n):r==="outer"&&gX(e,t,n)}function vX(e,t,n){const[r,i,,a]=n,[o,s]=t.getCenter(),[l]=Eg(t),c=a/2,u=l*c,f=o-u,d=s-u;for(let h=0;h<e.length;h++){const p=e[h];p.bbox={x:r+f,y:i+d,width:u*2,height:u*2}}}function gX(e,t,n){const[r,i,a,o]=n;for(const s of e)s.bbox={x:r,y:i,width:a,height:o}}function mX(e,t,n){const[r,i,a,o]=n;for(const s of e)s.bbox={x:r,y:i,width:a,height:o}}function yX(e,t,n,r){r==="horizontal"?xX(e,t,n):r==="vertical"&&bX(e,t,n)}function bX(e,t,n){const[r,i,,a]=n,o=new Array(e.length).fill(0),l=t.map(o).filter((c,u)=>u%2===0).map(c=>c+r);for(let c=0;c<e.length;c++){const u=e[c],f=l[c],d=l[c+1]-f;u.bbox={x:f,y:i,width:d,height:a}}}function xX(e,t,n){const[r,i,a]=n,o=new Array(e.length).fill(0),l=t.map(o).filter((c,u)=>u%2===1).map(c=>c+i);for(let c=0;c<e.length;c++){const u=e[c],f=l[c],d=l[c+1]-f;u.bbox={x:r,y:f,width:a,height:d}}}function _X(e,t,n,r){const[i,a,o,s]=n;for(const l of e)l.bbox={x:i,y:a,width:o,height:s},l.radar={index:e.indexOf(l),count:e.length}}function wX(e,t,n){const[r,i,a,o,s,l,c,u,f]=n,[d,h,p,v,g,m,b,_]=s==="vertical"?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];e.sort((T,A)=>c==null?void 0:c(T.order,A.order));const S=T=>T==="title"||T==="group"||T.startsWith("legend"),O=(T,A,R)=>R===void 0?A:S(T)?R:A,C=(T,A,R)=>R===void 0?A:S(T)?R:A,E=l?h+m:h;for(let T=0,A=E;T<e.length;T++){const R=e[T],{crossPadding:z=0,type:I}=R,{size:L}=R;R.bbox={[d]:l?A-L-z:A+z,[p]:C(I,v,u),[g]:L,[b]:O(I,_,f)},A+=(L+z)*(l?-1:1)}const P=e.filter(T=>T.type==="group");for(const T of P){const{bbox:A,children:R}=T,z=A[b],I=z/R.length,L=R.reduce((G,J)=>{var re;const he=(re=J.layout)===null||re===void 0?void 0:re.justifyContent;return he||G},"flex-start"),F=R.map((G,J)=>{const{length:re=I,padding:he=0}=G;return re+(J===R.length-1?0:he)}),Z=ws(F),H=z-Z,W=L==="flex-start"?0:L==="center"?H/2:H;for(let G=0,J=A[p]+W;G<R.length;G++){const re=R[G],{padding:he=0}=re,ce=G===R.length-1?0:he;re.bbox={[g]:A[g],[d]:A[d],[p]:J,[b]:F[G]-ce},Je(re,{layout:{justifyContent:L}}),J+=F[G]}}}function SX(e,t,n){if(e.length===0)return;const[r,i,a,o]=n,[s]=Eg(t),l=o/2*s/Math.sqrt(2),c=r+a/2,u=i+o/2;for(let f=0;f<e.length;f++){const d=e[f];d.bbox={x:c-l,y:u-l,width:l*2,height:l*2}}}function pl(e,t,n={},r=!1){if(Zl(e)||Array.isArray(e)&&r)return e;const i=Tt(e,t);return Je(n,i)}function vm(e,t={}){return Zl(e)||Array.isArray(e)||!Z3(e)?e:Je(t,e)}function Z3(e){if(Object.keys(e).length===0)return!0;const{title:t,items:n}=e;return t!==void 0||n!==void 0}function vl(e,t){return typeof e=="object"?Tt(e,t):e}var OX=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},md=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function CX(e,t,n){const{encode:r={},scale:i={},transform:a=[]}=t,o=md(t,["encode","scale","transform"]);return[e,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function $3(e,t,n){return OX(this,void 0,void 0,function*(){const{library:r}=n,{data:i}=t,[a]=di("data",r),o=FX(i),{transform:s=[]}=o,u=[md(o,["transform"]),...s].map(a),f=yield TZ(u)(i),d=i&&!Array.isArray(i)&&!Array.isArray(f)?{value:f}:f;return[Array.isArray(f)?Ru(f):[],Object.assign(Object.assign({},t),{data:d})]})}function EX(e,t,n){const{encode:r}=t;if(!r)return[e,t];const i={};for(const[a,o]of Object.entries(r))if(Array.isArray(o))for(let s=0;s<o.length;s++){const l=`${a}${s===0?"":s}`;i[l]=o[s]}else i[a]=o;return[e,Object.assign(Object.assign({},t),{encode:i})]}function MX(e,t,n){const{encode:r,data:i}=t;if(!r)return[e,t];const a=Lc(r,o=>kX(o)?o:{type:jX(i,o),value:o});return[e,Object.assign(Object.assign({},t),{encode:a})]}function PX(e,t,n){const{encode:r}=t;if(!r)return[e,t];const i=Lc(r,(a,o)=>{const{type:s}=a;return s!=="constant"||NU(o)?a:Object.assign(Object.assign({},a),{constant:!0})});return[e,Object.assign(Object.assign({},t),{encode:i})]}function TX(e,t,n){const{encode:r,data:i}=t;if(!r)return[e,t];const{library:a}=n,o=ZX(a),s=Lc(r,l=>o(i,l));return[e,Object.assign(Object.assign({},t),{encode:s})]}function AX(e,t,n){const{tooltip:r={}}=t;return Zl(r)?[e,t]:Array.isArray(r)?[e,Object.assign(Object.assign({},t),{tooltip:{items:r}})]:Kh(r)&&Z3(r)?[e,Object.assign(Object.assign({},t),{tooltip:r})]:[e,Object.assign(Object.assign({},t),{tooltip:{items:[r]}})]}function RX(e,t,n){const{data:r,encode:i,tooltip:a={}}=t;if(Zl(a))return[e,t];const o=f=>{if(!f)return f;if(typeof f=="string")return e.map(d=>({name:f,value:r[d][f]}));if(Kh(f)){const{field:d,channel:h,color:p,name:v=d,valueFormatter:g=C=>C}=f,m=typeof g=="string"?Ic(g):g,b=h&&i[h],_=b&&i[h].field,S=v||_||h,O=[];for(const C of e){const E=d?r[C][d]:b?i[h].value[C]:null;O[C]={name:S,color:p,value:m(E)}}return O}if(typeof f=="function"){const d=[];for(const h of e){const p=f(r[h],h,r,i);Kh(p)?d[h]=p:d[h]={value:p}}return d}return f},{title:s,items:l=[]}=a,c=md(a,["title","items"]),u=Object.assign({title:o(s),items:Array.isArray(l)?l.map(o):[]},c);return[e,Object.assign(Object.assign({},t),{tooltip:u})]}function IX(e,t,n){const{encode:r}=t,i=md(t,["encode"]);if(!r)return[e,t];const a=Object.entries(r),o=a.filter(([,l])=>{const{value:c}=l;return Array.isArray(c[0])}).flatMap(([l,c])=>{const u=[[l,new Array(e.length).fill(void 0)]],{value:f}=c,d=md(c,["value"]);for(let h=0;h<f.length;h++){const p=f[h];if(Array.isArray(p))for(let v=0;v<p.length;v++){const g=u[v]||[`${l}${v}`,new Array(e).fill(void 0)];g[1][h]=p[v],u[v]=g}}return u.map(([h,p])=>[h,Object.assign({type:"column",value:p},d)])}),s=Object.fromEntries([...a,...o]);return[e,Object.assign(Object.assign({},i),{encode:s})]}function LX(e,t,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=t,s=(c,u)=>{if(typeof c=="boolean")return c?{}:null;const f=c[u];return f===void 0||f?f:null},l=typeof r=="object"?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return Je(t,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(c=>{const u=s(o,c);return[c,Object.assign({guide:s(r,c),slider:s(a,c),scrollbar:u},u&&{ratio:u.ratio===void 0?.5:u.ratio})]}))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[e,t]}function NX(e,t,n){const{animate:r}=t;return r||r===void 0?[e,t]:(Je(t,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[e,t])}function kX(e){if(typeof e!="object"||e instanceof Date||e===null)return!1;const{type:t}=e;return qr(t)}function jX(e,t){return typeof t=="function"?"transform":typeof t=="string"&&DX(e,t)?"field":"constant"}function DX(e,t){return Array.isArray(e)?e.some(n=>n[t]!==void 0):!1}function FX(e){if(Gi(e))return{type:"inline",value:e};if(!e)return{type:"inline",value:null};if(Array.isArray(e))return{type:"inline",value:e};const{type:t="inline"}=e,n=md(e,["type"]);return Object.assign(Object.assign({},n),{type:t})}var W3=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},BX=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function zX(e,t,n){return W3(this,void 0,void 0,function*(){const r={library:n},[i,a]=yield $X(e,t,r),{encode:o,scale:s,data:l,tooltip:c}=a;if(Array.isArray(l)===!1)return null;const{channels:u}=t,f=G2(Object.entries(o).filter(([,h])=>qr(h)),h=>h.map(([p,v])=>Object.assign({name:p},v)),([h])=>{var p;const v=(p=/([^\d]+)\d*$/.exec(h))===null||p===void 0?void 0:p[1],g=u.find(m=>m.name===v);return g!=null&&g.independent?h:v}),d=u.filter(h=>{const{name:p,required:v}=h;if(f.find(([g])=>g===p))return!0;if(v)throw new Error(`Missing encoding for channel: ${p}.`);return!1}).flatMap(h=>{const{name:p,scale:v,scaleKey:g,range:m,quantitative:b,ordinal:_}=h;return f.filter(([O])=>O.startsWith(p)).map(([O,C],E)=>{const P=C.some(H=>H.visual),T=C.some(H=>H.constant),A=s[O]||{},{independent:R=!1,key:z=g||O,type:I=T?"constant":P?"identity":v}=A,L=BX(A,["independent","key","type"]),F=I==="constant",Z=F?void 0:m;return{name:O,values:C,scaleKey:R||F?Symbol("independent"):z,scale:Object.assign(Object.assign({type:I,range:Z},L),{quantitative:b,ordinal:_})}})});return[a,Object.assign(Object.assign({},t),{index:i,channels:d,tooltip:c})]})}function ZX(e){const[t]=di("encode",e);return(n,r)=>r===void 0||n===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:t(r)(n),field:WX(r)})}function $X(e,t,n){return W3(this,void 0,void 0,function*(){const{library:r}=n,[i]=di("transform",r),{preInference:a=[],postInference:o=[]}=t,{transform:s=[]}=e,l=[CX,$3,EX,MX,PX,TX,IX,NX,LX,AX,...a.map(i),...s.map(i),...o.map(i),RX];let c=[],u=e;for(const f of l)[c,u]=yield f(c,u,n);return[c,u]})}function WX(e){const{type:t,value:n}=e;return t==="field"&&typeof n=="string"?n:null}var Xl=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Wc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function tw(e,t,n,r){var i;return Xl(this,void 0,void 0,function*(){const[a]=di("composition",n),[o]=di("interaction",n),s=new Set(Object.keys(n).map(I=>{var L;return(L=/mark\.(.*)/.exec(I))===null||L===void 0?void 0:L[1]}).filter(qr)),l=new Set(Object.keys(n).map(I=>{var L;return(L=/component\.(.*)/.exec(I))===null||L===void 0?void 0:L[1]}).filter(qr)),c=I=>{const{type:L}=I;if(typeof L=="function"){const{props:F={}}=L,{composite:Z=!0}=F;if(Z)return"mark"}return typeof L!="string"?L:s.has(L)||l.has(L)?"mark":L},u=I=>c(I)==="mark",f=I=>c(I)==="standardView",d=I=>{const{type:L}=I;return typeof L!="string"?!1:!!l.has(L)},h=I=>{if(f(I))return[I];const L=c(I);return a({type:L,static:d(I)})(I)},p=[],v=new Map,g=new Map,m=[e],b=[];for(;m.length;){const I=m.shift();if(f(I)){const L=g.get(I),[F,Z]=L?V3(L,I,n):yield H3(I,n);v.set(F,I),p.push(F);const H=Z.flatMap(h).map(W=>$A(W,n));if(m.push(...H),H.every(f)){const W=yield Promise.all(H.map(G=>Y3(G,n)));dU(W);for(let G=0;G<H.length;G++){const J=H[G],re=W[G];g.set(J,re)}}}else{const L=u(I)?I:yield q3(I,n),F=h(L);Array.isArray(F)?m.push(...F):typeof F=="function"&&b.push(F())}}r.emitter.emit(kr.BEFORE_PAINT);const _=new Map,S=new Map,O=[];t.selectAll(gl(F2)).data(p,I=>I.key).join(I=>I.append("g").attr("className",F2).attr("id",L=>L.key).call(G3).each(function(L,F,Z){rw(L,gn(Z),O,n,r),_.set(L,Z)}),I=>I.call(G3).each(function(L,F,Z){rw(L,gn(Z),O,n,r),S.set(L,Z)}),I=>I.each(function(L,F,Z){const H=Z.nameInteraction.values();for(const W of H)W.destroy()}).remove());const C=(I,L,F)=>Array.from(I.entries()).map(([Z,H])=>{const W=F||new Map,G=(he,ce=ke=>ke)=>W.set(he,ce),J=v.get(Z),re=HX(gn(H),J,n,r);return{view:Z,container:H,options:J,setState:G,update:(he,ce)=>Xl(this,void 0,void 0,function*(){const ot=H2(Array.from(W.values()))(J);return yield re(ot,he,()=>{ua(ce)&&L(I,ce,W)})})}}),E=(I=S,L,F)=>{var Z;const H=C(I,E,F);for(const W of H){const{options:G,container:J}=W,re=J.nameInteraction;let he=gm(G);L&&(he=he.filter(ce=>L.includes(ce[0])));for(const ce of he){const[ke,ot]=ce,xt=re.get(ke);if(xt&&((Z=xt.destroy)===null||Z===void 0||Z.call(xt)),ot){const He=nw(W.view,ke,ot,o)(W,H,r.emitter);re.set(ke,{destroy:He})}}}},P=C(_,E);for(const I of P){const{options:L}=I,F=new Map;I.container.nameInteraction=F;for(const Z of gm(L)){const[H,W]=Z;if(W){const J=nw(I.view,H,W,o)(I,P,r.emitter);F.set(H,{destroy:J})}}}E();const{width:T,height:A}=e,R=[];for(const I of b){const L=new Promise(F=>Xl(this,void 0,void 0,function*(){for(const Z of I){const H=Object.assign({width:T,height:A},Z);yield tw(H,t,n,r)}F()}));R.push(L)}r.views=p,(i=r.animations)===null||i===void 0||i.forEach(I=>I==null?void 0:I.cancel()),r.animations=O,r.emitter.emit(kr.AFTER_PAINT);const z=O.filter(qr).map(oK).map(I=>I.finished);return Promise.all([...z,...R])})}function G3(e){e.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function GX(e){const[,t]=di("interaction",e);return n=>{const[r,i]=n;try{return[r,t(r)]}catch(a){return[r,i.type]}}}function HX(e,t,n,r){const i=GX(n),a=l=>l[1]&&l[1].props&&l[1].props.reapplyWhenUpdate,s=gm(t).map(i).filter(a).map(l=>l[0]);return(l,c,u)=>Xl(this,void 0,void 0,function*(){const f=[],[d,h]=yield H3(l,n);rw(d,e,f,n,r);for(const p of s.filter(v=>v!==c))YX(p,e,l,d,n,r);for(const p of h)tw(p,e,n,r);return u(),{options:l,view:d}})}function YX(e,t,n,r,i,a){var o;const[s]=di("interaction",i),c=t.node().nameInteraction,u=gm(n).find(([v])=>v===e),f=c.get(e);if(!f||((o=f.destroy)===null||o===void 0||o.call(f),!u[1]))return;const d=nw(r,e,u[1],s),h={options:n,view:r,container:t.node(),update:v=>Promise.resolve(v)},p=d(h,[],a.emitter);c.set(e,{destroy:p})}function H3(e,t){return Xl(this,void 0,void 0,function*(){const n=yield UX(e,t),r=VX(n);e.interaction=r.interaction,e.coordinate=r.coordinate,e.marks=[...r.marks,...r.components];const i=$A(r,t),a=yield Y3(i,t);return V3(a,i,t)})}function VX(e){const{coordinate:t={},interaction:n={},style:r={},marks:i}=e,a=Wc(e,["coordinate","interaction","style","marks"]),o=i.map(d=>d.coordinate||{}),s=i.map(d=>d.interaction||{}),l=i.map(d=>d.viewStyle||{}),c=[...o,t].reduceRight((d,h)=>Je(d,h),{}),u=[n,...s].reduce((d,h)=>Je(d,h),{}),f=[...l,r].reduce((d,h)=>Je(d,h),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:c,interaction:u,style:f})}function UX(e,t){return Xl(this,void 0,void 0,function*(){const[n,r]=di("mark",t),i=new Set(Object.keys(t).map(d=>{var h;return(h=/component\.(.*)/.exec(d))===null||h===void 0?void 0:h[1]}).filter(qr)),{marks:a}=e,o=[],s=[],l=[...a],{width:c,height:u}=uX(e),f={options:e,width:c,height:u};for(;l.length;){const[d]=l.splice(0,1),h=yield q3(d,t),{type:p=qf("G2Mark type is required."),key:v}=h;if(i.has(p))s.push(h);else{const{props:g={}}=r(p),{composite:m=!0}=g;if(!m)o.push(h);else{const{data:b}=h,_=Object.assign(Object.assign({},h),{data:b&&(Array.isArray(b)?b:b.value)}),S=yield n(_,f),O=Array.isArray(S)?S:[S];l.unshift(...O.map((C,E)=>Object.assign(Object.assign({},C),{key:`${v}-${E}`})))}}}return Object.assign(Object.assign({},e),{marks:o,components:s})})}function Y3(e,t){return Xl(this,void 0,void 0,function*(){const[n]=di("theme",t),[,r]=di("mark",t),{theme:i,marks:a,coordinates:o=[]}=e,s=n(K3(i)),l=new Map;for(const u of a){const{type:f}=u,{props:d={}}=r(f),h=yield zX(u,d,t);if(h){const[p,v]=h;l.set(p,v)}}const c=_i(Array.from(l.values()).flatMap(u=>u.channels),({scaleKey:u})=>u);for(const u of c.values()){const f=u.reduce((_,{scale:S})=>Je(_,S),{}),{scaleKey:d}=u[0],{values:h}=u[0],p=Array.from(new Set(h.map(_=>_.field).filter(qr))),v=Je({guide:{title:p.length===0?void 0:p},field:p[0]},f),{name:g}=u[0],m=u.flatMap(({values:_})=>_.map(S=>S.value)),b=Object.assign(Object.assign({},lU(g,m,v,o,s,t)),{key:d});u.forEach(_=>_.scale=b)}return l})}function nw(e,t,n,r){const i=e.theme,a=typeof t=="string"?i[t]||{}:{};return r(Je(a,Object.assign({type:t},n)))}function V3(e,t,n){const[r]=di("mark",n),[i]=di("theme",n),[a]=di("labelTransform",n),{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=t,d=i(K3(l)),h=Array.from(e.values()),p=uU(h,t),v=ZU(zU(uK(Array.from(p),h,e),t,n)),g=cX(v,t,d,n),m=XY(g,t,n),b=s?Je({mainLineWidth:1,mainStroke:"#000"},u):u;dX(j3(v),m,g),lX(v);const _={};for(const C of v){const{scales:E=[]}=C,P=[];for(const T of E){const{name:A}=T,R=E3(T,n);P.push(R),A==="y"&&R.update(Object.assign(Object.assign({},R.getOptions()),{xScale:_.x})),C3(_,{[A]:R})}C.scaleInstances=P}const S=[];for(const[C,E]of e.entries()){const{children:P,dataDomain:T,modifier:A,key:R}=C,{index:z,channels:I,tooltip:L}=E,F=Object.fromEntries(I.map(({name:He,scale:jt})=>[He,jt])),Z=Lc(F,He=>E3(He,n));C3(_,Z);const H=cU(I,Z),W=r(C),[G,J,re]=qX(W(z,Z,H,m)),he=T||G.length,ce=A?A(J,he,g):[],ke=He=>{var jt,Ct;return(Ct=(jt=L.title)===null||jt===void 0?void 0:jt[He])===null||Ct===void 0?void 0:Ct.value},ot=He=>L.items.map(jt=>jt[He]),xt=G.map((He,jt)=>{const Ct=Object.assign({points:J[jt],transform:ce[jt],index:He,markKey:R,viewKey:o},L&&{title:ke(He),items:ot(He)});for(const[Gt,en]of Object.entries(H))Ct[Gt]=en[He],re&&(Ct[`series${Rc(Gt)}`]=re[jt].map(an=>en[an]));return re&&(Ct.seriesIndex=re[jt]),re&&L&&(Ct.seriesItems=re[jt].map(Gt=>ot(Gt)),Ct.seriesTitle=re[jt].map(Gt=>ke(Gt))),Ct});E.data=xt,E.index=G;const et=P==null?void 0:P(xt,Z,g);S.push(...et||[])}return[{layout:g,theme:d,coordinate:m,markState:e,key:o,clip:c,scale:_,style:b,components:v,labelTransform:H2(f.map(a))},S]}function rw(e,t,n,r,i){return Xl(this,void 0,void 0,function*(){const{components:a,theme:o,layout:s,markState:l,coordinate:c,key:u,style:f,clip:d,scale:h}=e,{x:p,y:v,width:g,height:m}=s,b=Wc(s,["x","y","width","height"]),_=["view","plot","main","content"],S=_.map((W,G)=>G),O=["a","margin","padding","inset"],C=_.map(W=>oP(Object.assign({},o.view,f),W)),E=O.map(W=>Tt(b,W)),P=W=>W.style("x",G=>I[G].x).style("y",G=>I[G].y).style("width",G=>I[G].width).style("height",G=>I[G].height).each(function(G,J,re){fK(gn(re),C[G])});let T=0,A=0,R=g,z=m;const I=S.map(W=>{const G=E[W],{left:J=0,top:re=0,bottom:he=0,right:ce=0}=G;return T+=J,A+=re,R-=J+ce,z-=re+he,{x:T,y:A,width:R,height:z}});t.selectAll(gl(WM)).data(S.filter(W=>qr(C[W])),W=>_[W]).join(W=>W.append("rect").attr("className",WM).style("zIndex",-2).call(P),W=>W.call(P),W=>W.remove());const L=tK(l),F=L?{duration:L[1]}:!1;for(const[,W]of _g(a,G=>`${G.type}-${G.position}`))W.forEach((G,J)=>G.index=J);const Z=t.selectAll(gl($M)).data(a,W=>`${W.type}-${W.position}-${W.index}`).join(W=>W.append("g").style("zIndex",({zIndex:G})=>G||-1).attr("className",$M).append(G=>k3(Je({animate:F,scale:h},G),c,o,r,l)),W=>W.transition(function(G,J,re){const{preserve:he=!1}=G;if(he)return;const ce=k3(Je({animate:F,scale:h},G),c,o,r,l),{attributes:ke}=ce,[ot]=re.childNodes;return ot.update(ke,!1)})).transitions();n.push(...Z.flat().filter(qr));const H=t.selectAll(gl(Uh)).data([s],()=>u).join(W=>W.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Uh).call(J3).call(e5,Array.from(l.keys())).call(t5,d),W=>W.call(e5,Array.from(l.keys())).call(G=>L?cK(G,L):J3(G)).call(t5,d)).transitions();n.push(...H.flat());for(const[W,G]of l.entries()){const{data:J}=G,{key:re,class:he,type:ce}=W,ke=t.select(`#${re}`),ot=iK(W,G,e,r,i),xt=aK(W,G,e,r),et=sK(W,G,e,r),He=lK(W,G,e,r),jt=nK(t,ke,he,"element"),Ct=ke.selectAll(gl(Bl)).selectFacetAll(jt).data(J,Gt=>Gt.key,Gt=>Gt.groupKey).join(Gt=>Gt.append(ot).attr("className",Bl).attr("markType",ce).transition(function(en,an,sn){return xt(en,[sn])}),Gt=>Gt.call(en=>{const an=en.parent(),sn=AZ(An=>{const[yr,En]=An.getBounds().min;return[yr,En]});en.transition(function(An,yr,En){rK(En,an,sn);const zn=ot(An,yr),ni=et(An,[En],[zn]);return ni!==null||(En.nodeName===zn.nodeName&&zn.nodeName!=="g"?V2(En,zn):(En.parentNode.replaceChild(zn,En),zn.className=Bl,zn.markType=ce,zn.__data__=En.__data__)),ni}).attr("markType",ce).attr("className",Bl)}),Gt=>Gt.each(function(en,an,sn){sn.__removed__=!0}).transition(function(en,an,sn){return He(en,[sn])}).remove(),Gt=>Gt.append(ot).attr("className",Bl).attr("markType",ce).transition(function(en,an,sn){const{__fromElements__:An}=sn,yr=et(en,An,[sn]);return new ia(An,null,sn.parentNode).transition(yr).remove(),yr}),Gt=>Gt.transition(function(en,an,sn){const yr=new ia([],sn.__toData__,sn.parentNode).append(ot).attr("className",Bl).attr("markType",ce).nodes();return et(en,[sn],yr)}).remove()).transitions();n.push(...Ct.flat())}XX(e,t,n,r,i)})}function XX(e,t,n,r,i){const[a]=di("labelTransform",r),{markState:o,labelTransform:s}=e,l=t.select(gl(D2)).node(),c=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([v,g])=>{const{labels:m=[],key:b}=v,_=eK(v,g,e,r,i),S=t.select(`#${b}`).selectAll(gl(Bl)).nodes().filter(O=>!O.__removed__);return m.flatMap((O,C)=>{const{transform:E=[]}=O,P=Wc(O,["transform"]);return S.flatMap(T=>{const A=KX(P,C,T);return A.forEach(R=>{c.set(R,_),u.set(R,O)}),A})})}),d=gn(l).selectAll(gl(B2)).data(f,v=>v.key).join(v=>v.append(g=>c.get(g)(g)).attr("className",B2),v=>v.each(function(g,m,b){const S=c.get(g)(g);V2(b,S)}),v=>v.remove()).nodes(),h=_i(d,v=>u.get(v.__data__)),{coordinate:p}=e;for(const[v,g]of h){const{transform:m=[]}=v;H2(m.map(a))(g,p)}s&&s(d,p)}function KX(e,t,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,l=QX(n);if(!r)return[Object.assign(Object.assign({},e),{key:`${o}-${t}`,bounds:l,index:s,points:a,dependentElement:n})];const c=JX(e),u=r.map((f,d)=>Object.assign(Object.assign({},e),{key:`${i[d]}-${t}`,bounds:[a[d]],index:f,points:a,dependentElement:n}));return c?c(u):u}function qX([e,t,n]){if(n)return[e,t,n];const r=[],i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a];s.every(([l,c])=>qr(l)&&qr(c))&&(r.push(o),i.push(s))}return[r,i]}function JX(e){const{selector:t}=e;if(!t)return null;if(typeof t=="function")return t;if(t==="first")return n=>[n[0]];if(t==="last")return n=>[n[n.length-1]];throw new Error(`Unknown selector: ${t}`)}function QX(e){const t=e.cloneNode(),n=e.getAnimations();t.style.visibility="hidden",n.forEach(o=>{const s=o.effect.getKeyframes();t.attr(s[s.length-1])}),e.parentNode.appendChild(t);const r=t.getLocalBounds();t.destroy();const{min:i,max:a}=r;return[i,a]}function eK(e,t,n,r,i){const[a]=di("shape",r),{data:o}=e,{data:s,defaultLabelShape:l}=t,c=s.map(h=>h.points),{theme:u,coordinate:f}=n,d=Object.assign(Object.assign({},i),{document:zA(i),theme:u,coordinate:f});return h=>{const{index:p,points:v}=h,g=o[p],{formatter:m=F=>`${F}`,transform:b,style:_,render:S}=h,O=Wc(h,["formatter","transform","style","render"]),C=Lc(Object.assign(Object.assign({},O),_),F=>U3(F,g,p,o)),{shape:E=l,text:P}=C,T=Wc(C,["shape","text"]),A=typeof m=="string"?Ic(m):m,R=Object.assign(Object.assign({},T),{text:A(P,g,p,o),datum:g}),z=Object.assign({type:`label.${E}`,render:S},T),I=a(z,d),L=X3(u,"label",E,"label");return I(v,R,L,c)}}function U3(e,t,n,r){return typeof e=="function"?e(t,n,r):typeof e!="string"?e:t[e]!==void 0?t[e]:e}function tK(e){let t=-1/0,n=1/0;for(const[r,i]of e){const{animate:a={}}=r,{data:o}=i,{enter:s={},update:l={},exit:c={}}=a,{type:u,duration:f=300,delay:d=0}=l,{type:h,duration:p=300,delay:v=0}=s,{type:g,duration:m=300,delay:b=0}=c;for(const _ of o){const{updateType:S=u,updateDuration:O=f,updateDelay:C=d,enterType:E=h,enterDuration:P=p,enterDelay:T=v,exitDuration:A=m,exitDelay:R=b,exitType:z=g}=_;(S===void 0||S)&&(t=Math.max(t,O+C),n=Math.min(n,C)),(z===void 0||z)&&(t=Math.max(t,A+R),n=Math.min(n,R)),(E===void 0||E)&&(t=Math.max(t,P+T),n=Math.min(n,T))}}return t===-1/0?null:[n,t-n]}function nK(e,t,n,r){return e.node().parentElement.findAll(a=>a.style.facet!==void 0&&a.style.facet===n&&a!==t.node()).flatMap(a=>a.getElementsByClassName(r))}function rK(e,t,n){if(!e.__facet__)return;const r=e.parentNode.parentNode,i=t.parentNode,[a,o]=n(r),[s,l]=n(i),c=`translate(${a-s}, ${o-l})`;RZ(e,c),t.append(e)}function iK(e,t,n,r,i){const[a]=di("shape",r),{data:o}=e,{defaultShape:s,data:l,shape:c}=t,u=l.map(g=>g.points),{theme:f,coordinate:d}=n,{type:h,style:p={}}=e,v=Object.assign(Object.assign({},i),{document:zA(i),coordinate:d,theme:f});return g=>{const{shape:m=s}=p,{shape:b=m,points:_,seriesIndex:S,index:O}=g,C=Wc(g,["shape","points","seriesIndex","index"]),E=Object.assign(Object.assign({},C),{index:O}),P=S?S.map(I=>o[I]):o[O],T=S||O,A=Lc(p,I=>U3(I,P,T,o)),R=c[b]?c[b](A,v):a(Object.assign(Object.assign({},A),{type:Q3(e,b)}),v),z=X3(f,h,b,s);return R(_,E,z,u)}}function X3(e,t,n,r){if(typeof t!="string")return;const{color:i}=e,a=e[t]||{},o=a[n]||a[r];return Object.assign({color:i},o)}function iw(e,t,n,r,i){var a,o;const[,s]=di("shape",i),[l]=di("animation",i),{defaultShape:c,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${Rc(e)}Animation`,{[p]:v}=((a=u[c])===null||a===void 0?void 0:a.props)||s(Q3(t,c)).props,{[e]:g={}}=f,m=((o=t.animate)===null||o===void 0?void 0:o[e])||{},b={coordinate:d};return(_,S,O)=>{const{[`${e}Type`]:C,[`${e}Delay`]:E,[`${e}Duration`]:P,[`${e}Easing`]:T}=_,A=Object.assign({type:C||v},m);if(!A.type)return null;const I=l(A,b)(S,O,Je(g,{delay:E,duration:P,easing:T}));return Array.isArray(I)?I:[I]}}function aK(e,t,n,r){return iw("enter",e,t,n,r)}function oK(e){return e.finished.then(()=>{e.cancel()}),e}function sK(e,t,n,r){return iw("update",e,t,n,r)}function lK(e,t,n,r){return iw("exit",e,t,n,r)}function K3(e={}){if(typeof e=="string")return{type:e};const{type:t="light"}=e,n=Wc(e,["type"]);return Object.assign(Object.assign({},n),{type:t})}function gm(e){const t={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:n={}}=e;return Object.entries(Je(t,n)).reverse()}function q3(e,t){return Xl(this,void 0,void 0,function*(){const n={library:t},{data:r}=e,i=Wc(e,["data"]);if(r==null)return e;const[,{data:a}]=yield $3([],{data:r},n);return Object.assign({data:a},i)})}function J3(e){e.style("x",t=>t.paddingLeft+t.marginLeft).style("y",t=>t.paddingTop+t.marginTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function cK(e,t){const[n,r]=t;e.transition(function(i,a,o){const{x:s,y:l,width:c,height:u}=o.style,{paddingLeft:f,paddingTop:d,innerWidth:h,innerHeight:p,marginLeft:v,marginTop:g}=i,m=[{x:s,y:l,width:c,height:u},{x:f+v,y:d+g,width:h,height:p}];return o.animate(m,{delay:n,duration:r,fill:"both"})})}function Q3(e,t){const{type:n}=e;return typeof t=="string"?`${n}.${t}`:t}function e5(e,t){const n=a=>a.class!==void 0?`${a.class}`:"";e.nodes().length===0||(e.selectAll(gl(ZM)).data(t,a=>a.key).join(a=>a.append("g").attr("className",ZM).attr("id",o=>o.key).style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.remove()),e.select(gl(D2)).node())||e.append("g").attr("className",D2).style("zIndex",0)}function gl(...e){return e.map(t=>`.${t}`).join("")}function t5(e,t){e.node()&&e.style("clipPath",n=>{if(!t)return null;const{paddingTop:r,paddingLeft:i,marginLeft:a,marginTop:o,innerWidth:s,innerHeight:l}=n;return new Pu({style:{x:i+a,y:r+o,width:s,height:l}})})}function uK(e,t,n){var r;for(const[c]of n.entries())if(c.type==="cell")return e.filter(u=>u.name!=="shape");if(t.length!==1||e.some(c=>c.name==="shape"))return e;const{defaultShape:i}=t[0];if(!["point","line","rect","hollow"].includes(i))return e;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},l={field:((r=e.find(c=>c.name==="color"))===null||r===void 0?void 0:r.field)||null,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...e,l]}function fK(e,t){for(const[n,r]of Object.entries(t))e.style(n,r)}function n5(e){const t=Je({},e),n=new Map([[t,null]]),r=new Map([[null,-1]]),i=[t];for(;i.length;){const a=i.shift();if(a.key===void 0){const s=n.get(a),l=r.get(a),c=s===null?"0":`${s.key}-${l}`;a.key=c}const{children:o=[]}=a;if(Array.isArray(o))for(let s=0;s<o.length;s++){const l=Je({},o[s]);o[s]=l,n.set(l,a),r.set(l,s),i.push(l)}}return t}function dK(e,t){const n=new XM;return n.registerPlugin(new KM),new wM({width:e,height:t,container:document.createElement("div"),renderer:n})}function hK(e,t={},n=()=>{},r=i=>{throw i}){const{width:i=640,height:a=480,depth:o=0}=e,s=n5(e),{canvas:l=dK(i,a),emitter:c=new If,library:u}=t;t.canvas=l,t.emitter=c;const{width:f,height:d}=l.getConfig();(f!==i||d!==a)&&l.resize(i,a),c.emit(kr.BEFORE_RENDER);const h=gn(l.document.documentElement);return l.ready.then(()=>tw(Object.assign(Object.assign({},s),{width:i,height:a,depth:o}),h,u,t)).then(()=>{if(o){const[p,v]=l.document.documentElement.getPosition();l.document.documentElement.setPosition(p,v,-o/2)}l.requestAnimationFrame(()=>{c.emit(kr.AFTER_RENDER),n==null||n()})}).catch(p=>{r==null||r(p)}),vK(l.getConfig().container)}function Cye(e,t={},n=()=>{},r=i=>{throw i}){var i;const{width:a=640,height:o=480}=e,s=n5(e),{group:l=new Group,emitter:c=new EventEmitter,library:u}=t;l!=null&&l.parentElement||error("renderToMountedElement can't render chart to unmounted group.");const f=select(l);return t.group=l,t.emitter=c,t.canvas=t.canvas||((i=l==null?void 0:l.ownerDocument)===null||i===void 0?void 0:i.defaultView),c.emit(ChartEvent.BEFORE_RENDER),plot(Object.assign(Object.assign({},s),{width:a,height:o}),f,u,t).then(()=>{var d;(d=t.canvas)===null||d===void 0||d.requestAnimationFrame(()=>{c.emit(ChartEvent.AFTER_RENDER),n==null||n()})}).catch(d=>{r==null||r(d)}),l}function r5(e,t={},n=!1){const{canvas:r,emitter:i}=t;r&&(pK(r),n?r.destroy():r.destroyChildren()),i.off()}function pK(e){const t=e.getRoot().querySelectorAll(`.${F2}`);t==null||t.forEach(n=>{const{nameInteraction:r=new Map}=n;(r==null?void 0:r.size)>0&&Array.from(r==null?void 0:r.values()).forEach(i=>{i==null||i.destroy()})})}function vK(e){return typeof e=="string"?document.getElementById(e):e}const yd=e=>e?parseInt(e):0;function gK(e){const t=getComputedStyle(e),n=e.clientWidth||yd(t.width),r=e.clientHeight||yd(t.height),i=yd(t.paddingLeft)+yd(t.paddingRight),a=yd(t.paddingTop)+yd(t.paddingBottom);return{width:n-i,height:r-a}}function Eye(e){const{height:t,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:l=0,marginLeft:c=l,marginRight:u=l,marginTop:f=l,marginBottom:d=l,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:m=h}=e,b=O=>O==="auto"?20:O,_=n-b(i)-b(a)-c-u-p-v,S=t-b(o)-b(s)-f-d-g-m;return{width:_,height:S}}function aw(e,t){const n=[e];for(;n.length;){const r=n.shift();t&&t(r);const i=r.children||[];for(const a of i)n.push(a)}}class ow{constructor(t={},n){this.parentNode=null,this.children=[],this.index=0,this.type=n,this.value=t}map(t=n=>n){const n=t(this.value);return this.value=n,this}attr(t,n){return arguments.length===1?this.value[t]:this.map(r=>(r[t]=n,r))}append(t){const n=new t({});return n.children=[],this.push(n),n}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:n}=t,r=n.findIndex(i=>i===this);n.splice(r,1)}return this}getNodeByKey(t){let n=null;return aw(this,i=>{t===i.attr("key")&&(n=i)}),n}getNodesByType(t){const n=[];return aw(this,i=>{t===i.type&&n.push(i)}),n}getNodeByType(t){let n=null;return aw(this,r=>{n||t===r.type&&(n=r)}),n}call(t,...n){return t(this.map(),...n),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}var i5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sw=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],a5="__remove__",o5="__callback__",s5=1,l5=1;function mK(e){if(e===void 0){const t=document.createElement("div");return t[a5]=!0,t}return typeof e=="string"?document.getElementById(e):e}function yK(e){const t=e.parentNode;t&&t.removeChild(e)}function bK(e){if(e.type!==null)return e;const t=e.children[e.children.length-1];for(const n of sw)t.attr(n,e.attr(n));return t}function c5(e){return Object.assign(Object.assign({},e.value),{type:e.type})}function lw(e,t){const{width:n,height:r,autoFit:i,depth:a=0}=e;let o=640,s=480;if(i){const{width:l,height:c}=gK(t);o=l||o,s=c||s}return o=n||o,s=r||s,{width:Math.max(Gi(o)?o:s5,s5),height:Math.max(Gi(s)?s:l5,l5),depth:a}}function xK(e){const t=bK(e),n=[t],r=new Map;for(r.set(t,c5(t));n.length;){const i=n.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===o5)a.children=s.value;else{const l=c5(s),{children:c=[]}=a;c.push(l),n.push(s),r.set(s,l),a.children=c}}return r.get(t)}function _K(e,t){return typeof e=="function"?!0:new Set(Object.keys(t)).has(e)}function wK(e,t){return typeof e!="function"&&new Set(Object.keys(t)).has(e)}function SK(e,t,n,r,i){const{type:a}=e,{type:o=n||a}=t;if(wK(o,i)){for(const s of sw)e.attr(s)!==void 0&&t[s]===void 0&&(t[s]=e.attr(s));return t}if(_K(o,r)){const s={type:"view"},l=Object.assign({},t);for(const c of sw)l[c]!==void 0&&(s[c]=l[c],delete l[c]);return Object.assign(Object.assign({},s),{children:[l]})}return t}function OK(e,t,n){if(typeof e=="function")return t.mark;const i=Object.assign(Object.assign({},t),n)[e];if(!i)throw new Error(`Unknown mark: ${e}.`);return i}function CK(e,t,n){if(typeof e=="function"){const l=new ow;return l.value=e,l.type=o5,l}const{type:r,children:i}=e,a=i5(e,["type","children"]),o=OK(r,t,n),s=new o;return s.value=a,s.type=r,s}function EK(e,t){const{type:n,children:r}=t,i=i5(t,["type","children"]);e.type===n||n===void 0?lP(e.value,i):typeof n=="string"&&(e.type=n,e.value=i)}function MK(e,t,n,r){if(!e)return;const i=[[e,t]];for(;i.length;){const[a,o]=i.shift(),s=CK(o,n,r);Array.isArray(a.children)&&a.push(s);const{children:l}=o;if(Array.isArray(l))for(const c of l)i.push([s,c]);else typeof l=="function"&&i.push([s,l])}}function PK(e,t,n,r,i){const a=SK(e,t,n,r,i),o=[[null,e,a]];for(;o.length;){const[s,l,c]=o.shift();if(!l)MK(s,c,r,i);else if(!c)l.remove();else{EK(l,c);const{children:u}=c,{children:f}=l;if(Array.isArray(u)&&Array.isArray(f)){const d=Math.max(u.length,f.length);for(let h=0;h<d;h++){const p=u[h],v=f[h];o.push([l,v,p])}}else typeof u=="function"&&o.push([l,null,u])}}}function TK(){let e,t;return[new Promise((r,i)=>{t=r,e=i}),t,e]}function AK(e,t,{key:n=t}){e.prototype[t]=function(r){return arguments.length===0?this.attr(n):this.attr(n,r)}}function RK(e,t,{key:n=t}){e.prototype[t]=function(r){if(arguments.length===0)return this.attr(n);if(Array.isArray(r))return this.attr(n,r);const i=[...this.attr(n)||[],r];return this.attr(n,i)}}function IK(e,t,{key:n=t}){e.prototype[t]=function(r,i){if(arguments.length===0)return this.attr(n);if(arguments.length===1&&typeof r!="string")return this.attr(n,r);const a=this.attr(n)||{};return a[r]=arguments.length===1?!0:i,this.attr(n,a)}}function LK(e,t,n){e.prototype[t]=function(r){if(arguments.length===0)return this.attr(t);if(Array.isArray(r))return this.attr(t,{items:r});if(Kh(r)&&(r.title!==void 0||r.items!==void 0))return this.attr(t,r);if(r===null||r===!1)return this.attr(t,r);const i=this.attr(t)||{},{items:a=[]}=i;return a.push(r),i.items=a,this.attr(t,i)}}function NK(e,t,{ctor:n}){e.prototype[t]=function(r){const i=this.append(n);return t==="mark"&&(i.type=r),i}}function kK(e,t,{ctor:n}){e.prototype[t]=function(){return this.type=null,this.append(n)}}function mm(e){return t=>{for(const[n,r]of Object.entries(e)){const{type:i}=r;i==="value"?AK(t,n,r):i==="array"?RK(t,n,r):i==="object"?IK(t,n,r):i==="node"?NK(t,n,r):i==="container"?kK(t,n,r):i==="mix"&&LK(t,n,r)}return t}}function u5(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,{type:"node",ctor:n}]))}const f5={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"}},jK=Object.assign(Object.assign({},f5),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),DK=Object.assign(Object.assign({},f5),{labelTransform:{type:"array"}});var FK=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};let ym=class extends ow{changeData(t){var n;const r=this.getRoot();if(r)return this.attr("data",t),!((n=this.children)===null||n===void 0)&&n.length&&this.children.forEach(i=>{i.attr("data",t)}),r==null?void 0:r.render()}getView(){const t=this.getRoot(),{views:n}=t.getContext();if(n!=null&&n.length)return n.find(r=>r.key===this._key)}getScale(){var t;return(t=this.getView())===null||t===void 0?void 0:t.scale}getScaleByChannel(t){const n=this.getScale();if(n)return n[t]}getCoordinate(){var t;return(t=this.getView())===null||t===void 0?void 0:t.coordinate}getTheme(){var t;return(t=this.getView())===null||t===void 0?void 0:t.theme}getGroup(){const t=this._key;return t?this.getRoot().getContext().canvas.getRoot().getElementById(t):void 0}show(){const t=this.getGroup();t&&!t.isVisible()&&Z_(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&z_(t)}};ym=FK([mm(DK)],ym);var BK=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};let cw=class extends ow{changeData(t){const n=this.getRoot();if(n)return this.attr("data",t),n==null?void 0:n.render()}getMark(){var t;const n=(t=this.getRoot())===null||t===void 0?void 0:t.getView();if(!n)return;const{markState:r}=n,i=Array.from(r.keys()).find(a=>a.key===this.attr("key"));return r.get(i)}getScale(){var t;const n=(t=this.getRoot())===null||t===void 0?void 0:t.getView();if(n)return n==null?void 0:n.scale}getScaleByChannel(t){var n,r;const i=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(i)return(r=i==null?void 0:i.scale)===null||r===void 0?void 0:r[t]}getGroup(){const t=this.attr("key");return t?this.getRoot().getContext().canvas.getRoot().getElementById(t):void 0}};cw=BK([mm(jK)],cw);var zK=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ZK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const $K="G2_CHART_KEY";class WK extends ym{constructor(t){const{container:n,canvas:r,renderer:i,plugins:a,lib:o}=t,s=ZK(t,["container","canvas","renderer","plugins","lib"]);super(s,"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=qM(()=>{this.forceFit()},300),this._renderer=i||new XM,this._plugins=a||[],this._container=mK(n),this._emitter=new If,this._context={library:Object.assign(Object.assign({},o),GM),emitter:this._emitter,canvas:r},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._context.canvas.getConfig().supportsCSSTransform=!0,this._bindAutoFit(),this._rendering=!0;const t=new Promise((a,o)=>hK(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[n,r,i]=TK();return t.then(r).catch(i).then(()=>this._renderTrailing()),n}options(t){if(arguments.length===0)return xK(this);const{type:n}=t;return n&&(this._previousDefinedType=n),PK(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,n,r){return this._emitter.on(t,n,r),this}once(t,n){return this._emitter.once(t,n),this}emit(t,...n){return this._emitter.emit(t,...n),this}off(t,n){return this._emitter.off(t,n),this}clear(){const t=this.options();this.emit(kr.BEFORE_CLEAR),this._reset(),r5(t,this._context,!1),this.emit(kr.AFTER_CLEAR)}destroy(){const t=this.options();this.emit(kr.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),r5(t,this._context,!0),this._container[a5]&&yK(this._container),this.emit(kr.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:t,height:n}=lw(this.options(),this._container);if(t===this._width&&n===this._height)return Promise.resolve(this);this.emit(kr.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(kr.AFTER_CHANGE_SIZE)}),r}changeSize(t,n){if(t===this._width&&n===this._height)return Promise.resolve(this);this.emit(kr.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",n);const r=this.render();return r.then(()=>{this.emit(kr.AFTER_CHANGE_SIZE)}),r}_create(){const{library:t}=this._context,n=a=>a.startsWith("mark.")||a==="component.axisX"||a==="component.axisY"||a==="component.legends",r=["mark.mark",...Object.keys(t).filter(n)];this._marks={};for(const a of r){const o=a.split(".").pop();class s extends cw{constructor(){super({},o)}}this._marks[o]=s,this[o]=function(l){const c=this.append(s);return o==="mark"&&(c.type=l),c}}const i=["composition.view",...Object.keys(t).filter(a=>a.startsWith("composition.")&&a!=="composition.mark")];this._compositions=Object.fromEntries(i.map(a=>{const o=a.split(".").pop();let s=class extends ym{constructor(){super({},o)}};return s=zK([mm(u5(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))mm(u5(this._compositions))(a);for(const a of i){const o=a.split(".").pop();this[o]=function(){const s=this._compositions[o];return this.type=null,this.append(s)}}}_reset(){const t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([n])=>n.startsWith("margin")||n.startsWith("padding")||n.startsWith("inset")||t.includes(n))),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 n=this._trailingReject.bind(this);this._trailingReject=null,n(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return n=>{this._rendering=!1,t(n)}}_computedOptions(){const t=this.options(),{key:n=$K}=t,{width:r,height:i,depth:a}=lw(t,this._container);return this._width=r,this._height=i,this._key=n,Object.assign(Object.assign({key:this._key},t),{width:r,height:i,depth:a})}_createCanvas(){const{width:t,height:n}=lw(this.options(),this._container);this._plugins.push(new KM),this._plugins.forEach(r=>this._renderer.registerPlugin(r)),this._context.canvas=new wM({container:this._container,width:t,height:n,renderer:this._renderer})}_addToTrailing(){var t;return(t=this._trailingResolve)===null||t===void 0||t.call(this,this),this._trailing=!0,new Promise((r,i)=>{this._trailingResolve=r,this._trailingReject=i})}_bindAutoFit(){const t=this.options(),{autoFit:n}=t;if(this._hasBindAutoFit){n||this._unbindAutoFit();return}n&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}function GK(e,t){class n extends e{constructor(i){super(Object.assign(Object.assign({},i),{lib:t}))}}return n}We.enableCSSParsing=!1;var HK=Object.prototype.hasOwnProperty,uw=function(e,t){if(e===null||!zl(e))return{};var n={};return w_(t,function(r){HK.call(e,r)&&(n[r]=e[r])}),n};function d5(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ep(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}function YK(){var e=1,t=1,n=0,r=!1;function i(o){var s=o.height+1;return o.x0=o.y0=n,o.x1=e,o.y1=t/s,o.eachBefore(a(t,s)),r&&o.eachBefore(d5),o}function a(o,s){return function(l){l.children&&Ep(l,l.x0,o*(l.depth+1)/s,l.x1,o*(l.depth+2)/s);var c=l.x0,u=l.y0,f=l.x1-n,d=l.y1-n;f<c&&(c=f=(c+f)/2),d<u&&(u=d=(u+d)/2),l.x0=c,l.y0=u,l.x1=f,l.y1=d}}return i.round=function(o){return arguments.length?(r=!!o,i):r},i.size=function(o){return arguments.length?(e=+o[0],t=+o[1],i):[e,t]},i.padding=function(o){return arguments.length?(n=+o,i):n},i}var VK=Y(9783);function UK(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function XK(){return this.eachAfter(UK)}var fw=Y(64599);function KK(e,t){var n=-1,r=fw(this),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;e.call(t,a,++n,this)}}catch(o){r.e(o)}finally{r.f()}return this}function qK(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function JK(e,t){for(var n=this,r=[n],i=[],a,o,s,l=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function QK(e,t){var n=-1,r=fw(this),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(e.call(t,a,++n,this))return a}}catch(o){r.e(o)}finally{r.f()}}function eq(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function tq(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function nq(e){for(var t=this,n=rq(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function rq(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function iq(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function aq(){return Array.from(this)}function oq(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function sq(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}var h5=Y(15009),lq=h5().mark(p5);function p5(){var e,t,n,r,i,a;return h5().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=this,n=[e];case 1:t=n.reverse(),n=[];case 2:if(!(e=t.pop())){s.next=8;break}return s.next=5,e;case 5:if(r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);s.next=2;break;case 8:if(n.length){s.next=1;break}case 9:case"end":return s.stop()}},lq,this)}function bd(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=fq)):t===void 0&&(t=uq);for(var n=new xd(e),r,i=[n],a,o,s,l;r=i.pop();)if((o=t(r.data))&&(l=(o=Array.from(o)).length))for(r.children=o,s=l-1;s>=0;--s)i.push(a=o[s]=new xd(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(v5)}function cq(){return bd(this).eachBefore(dq)}function uq(e){return e.children}function fq(e){return Array.isArray(e)?e[1]:null}function dq(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function v5(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function xd(e){this.data=e,this.depth=this.height=0,this.parent=null}xd.prototype=bd.prototype=VK({constructor:xd,count:XK,each:KK,eachAfter:JK,eachBefore:qK,find:QK,sum:eq,sort:tq,path:nq,ancestors:iq,descendants:aq,leaves:oq,links:sq,copy:cq},Symbol.iterator,p5);function dw(e,t){for(var n in t)t.hasOwnProperty(n)&&n!=="constructor"&&t[n]!==void 0&&(e[n]=t[n])}function hq(e,t,n,r){return t&&dw(e,t),n&&dw(e,n),r&&dw(e,r),e}function hw(e){return Bt(e)?0:qh(e)?e.length:Object.keys(e).length}const pq={field:"value",size:[1,1],round:!1,padding:0,sort:(e,t)=>t.value-e.value,as:["x","y"],ignoreParentValue:!0},vq="nodeIndex",Mp="childNodeCount",gq="nodeAncestor",pw="Invalid field: it must be a string!";function mq(e,t){const{field:n,fields:r}=e;if(xi(n))return n;if(ua(n))return console.warn(pw),n[0];if(console.warn(`${pw} will try to get fields instead.`),xi(r))return r;if(ua(r)&&r.length)return r[0];if(t)return t;throw new TypeError(pw)}function yq(e){const t=[];if(e&&e.each){let n,r;e.each(i=>{var a,o;i.parent!==n?(n=i.parent,r=0):r+=1;const s=EA((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(l=>t.find(c=>c.name===l.name)||l),({depth:l})=>l>0&&l<i.depth);i[gq]=s,i[Mp]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[vq]=r,t.push(i)})}else e&&e.eachNode&&e.eachNode(n=>{t.push(n)});return t}function bq(e,t){t=hq({},pq,t);const n=t.as;if(!ua(n)||n.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=mq(t)}catch(l){console.warn(l)}const a=(l=>YK().size(t.size).round(t.round).padding(t.padding)(bd(l).sum(c=>hw(c.children)?t.ignoreParentValue?0:c[r]-ET(c.children,(u,f)=>u+f[r],0):c[r]).sort(t.sort)))(e),o=n[0],s=n[1];return a.each(l=>{var c,u;l[o]=[l.x0,l.x1,l.x1,l.x0],l[s]=[l.y1,l.y1,l.y0,l.y0],l.name=l.name||((c=l.data)===null||c===void 0?void 0:c.name)||((u=l.data)===null||u===void 0?void 0:u.label),l.data.name=l.name,["x0","x1","y0","y1"].forEach(f=>{n.indexOf(f)===-1&&delete l[f]})}),yq(a)}var xq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const _d="sunburst",vw="markType",Mye="value",g5="path",bm="ancestor-node";function _q(e){const{data:t,encode:n}=e,{color:r,value:i}=n,o=bq(t,{field:i,type:"hierarchy.partition",as:["x","y"]}),s=[];return o.forEach(l=>{var c,u,f,d;if(l.depth===0)return null;let h=l.data.name;const p=[h];let v=Object.assign({},l);for(;v.depth>1;)h=`${(c=v.parent.data)===null||c===void 0?void 0:c.name} / ${h}`,p.unshift((u=v.parent.data)===null||u===void 0?void 0:u.name),v=v.parent;const g=Object.assign(Object.assign(Object.assign({},uw(l.data,[i])),{[g5]:h,[bm]:v.data.name}),l);r&&r!==bm&&(g[r]=l.data[r]||((d=(f=l.parent)===null||f===void 0?void 0:f.data)===null||d===void 0?void 0:d[r])),s.push(g)}),s.map(l=>Object.assign(Object.assign({},l),{x:l.x.slice(0,2),y:[l.y[2],l.y[0]],fillOpacity:Math.pow(.85,l.depth)}))}const m5={id:_d,encode:{x:"x",y:"y",key:g5,color:bm,value:"value"},axis:{x:!1,y:!1},style:{[vw]:_d,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Mp]:Mp,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},y5=e=>{const{encode:t,data:n=[],legend:r}=e,i=xq(e,["encode","data","legend"]),a=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(wr(i,["coordinate","innerRadius"],.2),1e-5)}),o=Object.assign(Object.assign({},m5.encode),t),{value:s}=o,l=_q({encode:o,data:n});return[Je({},m5,Object.assign(Object.assign({type:"rect",data:l,encode:o,tooltip:{title:"path",items:[c=>({name:s,value:c[s]})]}},i),{coordinate:a}))]};y5.props={};var wq=Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];return w_(e,function(n,r){bo(e)&&r==="prototype"||t.push(r)}),t},gw=wq,Sq=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const Oq=e=>e.querySelectorAll(".element").filter(t=>wr(t,["style",vw])===_d);function Cq(e){return gn(e).select(`.${Uh}`).node()}const Eq={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function Mq(e={}){const{breadCrumb:t={},fixedColor:n=!0}=e,r=Je({},Eq,t);return i=>{const{update:a,setState:o,container:s,view:l,options:c}=i,u=Cq(s),f=c.marks.find(({id:b})=>b===_d),{state:d}=f,h=new xa;u.appendChild(h);const p=(b,_)=>Sq(this,void 0,void 0,function*(){if(h.removeChildren(),b){const S=new rs({style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});h.appendChild(S);let O="";const C=b==null?void 0:b.split(" / ");let E=r.style.y,P=h.getBBox().width;const T=u.getBBox().width,A=C.map((R,z)=>{const I=new rs({style:Object.assign(Object.assign({x:P,text:" / "},r.style),{y:E})});h.appendChild(I),P+=I.getBBox().width,O=`${O}${R} / `;const L=new rs({name:O.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:R,x:P,depth:z+1},r.style),{y:E})});return h.appendChild(L),P+=L.getBBox().width,P>T&&(E=h.getBBox().height,P=0,I.attr({x:P,y:E}),P+=I.getBBox().width,L.attr({x:P,y:E}),P+=L.getBBox().width),L});[S,...A].forEach((R,z)=>{if(z===A.length)return;const I=Object.assign({},R.attributes);R.attr("cursor","pointer"),R.addEventListener("mouseenter",()=>{R.attr(r.active)}),R.addEventListener("mouseleave",()=>{R.attr(I)}),R.addEventListener("click",()=>{p(R.name,wr(R,["style","depth"]))})})}o("drillDown",S=>{const{marks:O}=S,C=O.map(E=>{if(E.id!==_d&&E.type!=="rect")return E;const{data:P}=E,T=Object.fromEntries(["color"].map(R=>[R,{domain:l.scale[R].getOptions().domain}])),A=P.filter(R=>{const z=R.path;return n&&(R[bm]=z.split(" / ")[_]),b?new RegExp(`^${b}.+`).test(z):!0});return Je({},E,n?{data:A}:{data:A,scale:T})});return Object.assign(Object.assign({},S),{marks:C})}),yield a()}),v=b=>{const _=b.target;if(wr(_,["style",vw])!==_d||wr(_,["markType"])!=="rect"||!wr(_,["style",Mp]))return;const S=wr(_,["__data__","key"]),O=wr(_,["style","depth"]);_.style.cursor="pointer",p(S,O)};u.addEventListener("click",v);const g=gw(Object.assign(Object.assign({},d.active),d.inactive)),m=()=>{Oq(u).forEach(_=>{const S=wr(_,["style",Mp]);if(wr(_,["style","cursor"])!=="pointer"&&S){_.style.cursor="pointer";const C=uw(_.attributes,g);_.addEventListener("mouseenter",()=>{_.attr(d.active)}),_.addEventListener("mouseleave",()=>{_.attr(Je(C,d.inactive))})}})};return u.addEventListener("mousemove",m),()=>{h.remove(),u.removeEventListener("click",v),u.removeEventListener("mousemove",m)}}}We.enableCSSParsing=!1;function Pq(){return{"interaction.drillDown":Mq,"mark.sunburst":y5}}const b5=()=>[["cartesian"]];b5.props={};const mw=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];mw.props={transform:!0};const Tq=(e={})=>{const t={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},t),e)},x5=e=>{const{startAngle:t,endAngle:n,innerRadius:r,outerRadius:i}=Tq(e);return[...mw(),...Jh({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i})]};x5.props={};const yw=()=>[["parallel",0,1,0,1]];yw.props={};const _5=({focusX:e=0,focusY:t=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",e,t,n,r,i]];_5.props={transform:!0};const w5=e=>{const{startAngle:t=-Math.PI/2,endAngle:n=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=e;return[...yw(),...Jh({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i})]};w5.props={};const S5=({value:e})=>t=>t.map(()=>e);S5.props={};const O5=({value:e})=>t=>t.map(n=>n[e]);O5.props={};const C5=({value:e})=>t=>t.map(e);C5.props={};const E5=({value:e})=>()=>e;E5.props={};function ti(e,t){if(e!==null)return{type:"column",value:e,field:t}}function xm(e,t){const n=ti(e,t);return Object.assign(Object.assign({},n),{inferred:!0})}function _m(e,t){if(e!==null)return{type:"column",value:e,field:t,visual:!0}}function Aq(e,t){const n=ti(e,t);return Object.assign(Object.assign({},n),{constant:!1})}function Gc(e,t){const n=[];for(const r of e)n[r]=t;return n}function ur(e,t){const n=e[t];if(!n)return[null,null];const{value:r,field:i=null}=n;return[r,i]}function Pp(e,...t){for(const n of t)if(typeof n=="string"){const[r,i]=ur(e,n);if(r!==null)return[r,i]}else return[n,null];return[null,null]}function Tp(e){return e instanceof Date?!1:typeof e=="object"}const Ap=()=>(e,t)=>{const{encode:n}=t,{y1:r}=n;return r!==void 0?[e,t]:[e,Je({},t,{encode:{y1:xm(Gc(e,0))}})]};Ap.props={};const Wu=()=>(e,t)=>{const{encode:n}=t,{x:r}=n;return r!==void 0?[e,t]:[e,Je({},t,{encode:{x:xm(Gc(e,0))},scale:{x:{guide:null}}})]};Wu.props={};const Gu=(e,t)=>xp(Object.assign({colorAttribute:"fill"},e),t);Gu.props=Object.assign(Object.assign({},xp.props),{defaultMarker:"square"});const wm=(e,t)=>xp(Object.assign({colorAttribute:"stroke"},e),t);wm.props=Object.assign(Object.assign({},xp.props),{defaultMarker:"hollowSquare"});function wd(){}function M5(e){this._context=e}M5.prototype={areaStart:wd,areaEnd:wd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bw(e){return new M5(e)}var P5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Rq(e,t,n){const[r,i,a,o]=e;if(ci(n)){const c=[t?t[0][0]:i[0],i[1]],u=[t?t[3][0]:a[0],a[1]];return[r,c,u,o]}const s=[i[0],t?t[0][1]:i[1]],l=[a[0],t?t[3][1]:a[1]];return[r,s,l,o]}const xw=(e,t)=>{const{adjustPoints:n=Rq}=e,r=P5(e,["adjustPoints"]),{coordinate:i,document:a}=t;return(o,s,l,c)=>{const{index:u}=s,{color:f}=l,d=P5(l,["color"]),h=c[u+1],p=n(o,h,i),v=!!ci(i),[g,m,b,_]=v?Kg(p):p,{color:S=f,opacity:O}=s,C=Fc().curve(bw)([g,m,b,_]);return gn(a.createElement("path",{})).call(Qt,d).style("path",C).style("fill",S).style("fillOpacity",O).call(Qt,r).node()}};xw.props={defaultMarker:"square"};function Iq(e,t,n){const[r,i,a,o]=e;if(ci(n)){const c=[t?t[0][0]:(i[0]+a[0])/2,i[1]],u=[t?t[3][0]:(i[0]+a[0])/2,a[1]];return[r,c,u,o]}const s=[i[0],t?t[0][1]:(i[1]+a[1])/2],l=[a[0],t?t[3][1]:(i[1]+a[1])/2];return[r,s,l,o]}const T5=(e,t)=>xw(Object.assign({adjustPoints:Iq},e),t);T5.props={defaultMarker:"square"};function Rp(e){return Math.abs(e)>10?String(e):e.toString().padStart(2,"0")}function Lq(e){const t=e.getFullYear(),n=Rp(e.getMonth()+1),r=Rp(e.getDate()),i=`${t}-${n}-${r}`,a=e.getHours(),o=e.getMinutes(),s=e.getSeconds();return a||o||s?`${i} ${Rp(a)}:${Rp(o)}:${Rp(s)}`:i}const Sm=(e={})=>{const{channel:t="x"}=e;return(n,r)=>{const{encode:i}=r,{tooltip:a}=r;if(Zl(a))return[n,r];const{title:o}=a;if(o!==void 0)return[n,r];const s=Object.keys(i).filter(c=>c.startsWith(t)).filter(c=>!i[c].inferred).map(c=>ur(i,c)).filter(([c])=>c).map(c=>c[0]);if(s.length===0)return[n,r];const l=[];for(const c of n)l[c]={value:s.map(u=>u[c]instanceof Date?Lq(u[c]):u[c]).join(", ")};return[n,Je({},r,{tooltip:{title:l}})]}};Sm.props={};const Om=e=>{const{channel:t}=e;return(n,r)=>{const{encode:i,tooltip:a}=r;if(Zl(a))return[n,r];const{items:o=[]}=a;if(!o||o.length>0)return[n,r];const l=(Array.isArray(t)?t:[t]).flatMap(c=>Object.keys(i).filter(u=>u.startsWith(c)).map(u=>{const{field:f,value:d,inferred:h=!1,aggregate:p}=i[u];return h?null:p&&d?{channel:u}:f?{field:f}:d?{channel:u}:null}).filter(u=>u!==null));return[n,Je({},r,{tooltip:{items:l}})]}};Om.props={};var Nq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const A5=()=>(e,t)=>{const{encode:n}=t,{key:r}=n,i=Nq(n,["key"]);if(r!==void 0)return[e,t];const a=Object.values(i).map(({value:s})=>s),o=e.map(s=>a.filter(Array.isArray).map(l=>l[s]).join("-"));return[e,Je({},t,{encode:{key:ti(o)}})]};A5.props={};function R5(e={}){const{shapes:t}=e;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{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 xo(e={}){return[...R5(e),{name:"title",scale:"identity"}]}function Pye(){return[{type:MaybeTitle,channel:"color"},{type:MaybeTooltip,channel:["x","y","z"]}]}function Hc(){return[{type:Sm,channel:"color"},{type:Om,channel:["x","y"]}]}function Sd(){return[{type:Sm,channel:"x"},{type:Om,channel:["y"]}]}function kq(){return[{type:Sm,channel:"color"},{type:Om,channel:["position"]}]}function Od(e={}){return R5(e)}function Hi(){return[{type:A5}]}function aa(){return[]}function _w(e,t){return e.getBandWidth(e.invert(t))}function Hu(e,t,n={}){const{x:r,y:i,series:a}=t,{x:o,y:s,series:l}=e,{style:{bandOffset:c=l?0:.5,bandOffsetX:u=c,bandOffsetY:f=c}={}}=n,d=!!(o!=null&&o.getBandWidth),h=!!(s!=null&&s.getBandWidth),p=!!(l!=null&&l.getBandWidth);return!d&&!h?v=>v:(v,g)=>{const m=d?_w(o,r[g]):0,b=h?_w(s,i[g]):0,S=p&&a?(()=>(_w(l,a[g])/2+ +a[g])*m)():0,[O,C]=v;return[O+u*m+S,C+f*b]}}function Cm(e){return parseFloat(e)/100}function ww(e,t,n,r){const{x:i,y:a}=n,{innerWidth:o,innerHeight:s}=r.getOptions(),l=Array.from(e,c=>{const u=i[c],f=a[c],d=typeof u=="string"?Cm(u)*o:+u,h=typeof f=="string"?Cm(f)*s:+f;return[[d,h]]});return[e,l]}function ml(e){return typeof e=="function"?e:t=>t[e]}function Sw(e,t){return Array.from(e,ml(t))}function Ow(e,t){const{source:n=u=>u.source,target:r=u=>u.target,value:i=u=>u.value}=t,{links:a,nodes:o}=e,s=Sw(a,n),l=Sw(a,r),c=Sw(a,i);return{links:a.map((u,f)=>({target:l[f],source:s[f],value:c[f]})),nodes:o||Array.from(new Set([...s,...l]),u=>({key:u}))}}function I5(e,t){return e.getBandWidth(e.invert(t))}const L5={rect:Gu,hollow:wm,funnel:xw,pyramid:T5},N5=()=>(e,t,n,r)=>{const{x:i,y:a,y1:o,series:s,size:l}=n,c=t.x,u=t.series,[f]=r.getSize(),d=l?l.map(v=>+v/f):null,h=l?(v,g,m)=>{const b=v+g/2,_=d[m];return[b-_/2,b+_/2]}:(v,g,m)=>[v,v+g],p=Array.from(e,v=>{const g=I5(c,i[v]),m=u?I5(u,s==null?void 0:s[v]):1,b=g*m,_=(+(s==null?void 0:s[v])||0)*g,S=+i[v]+_,[O,C]=h(S,b,v),E=+a[v],P=+o[v];return[[O,E],[C,E],[C,P],[O,P]].map(I=>r.map(I))});return[e,p]};N5.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:L5,channels:[...xo({shapes:Object.keys(L5)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Hi(),{type:Ap},{type:Wu}],postInference:[...aa(),...Sd()],interaction:{shareTooltip:!0}};const k5={rect:Gu,hollow:wm},j5=()=>(e,t,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n,l=Array.from(e,c=>{const u=[+i[c],+o[c]],f=[+a[c],+o[c]],d=[+a[c],+s[c]],h=[+i[c],+s[c]];return[u,f,d,h].map(p=>r.map(p))});return[e,l]};j5.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:k5,channels:[...xo({shapes:Object.keys(k5)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Hi(),{type:Ap}],postInference:[...aa(),...Sd()],interaction:{shareTooltip:!0}};var D5=Cw(vp);function F5(e){this._curve=e}F5.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Cw(e){function t(n){return new F5(e(n))}return t._curve=e,t}function Ip(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Cw(n)):t()._curve},e}function jq(){return Ip(Fc().curve(D5))}var B5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Dq=cd(e=>{const{d1:t,d2:n,style1:r,style2:i}=e.attributes,a=e.ownerDocument;gn(e).maybeAppend("line",()=>a.createElement("path",{})).style("d",t).call(Qt,r),gn(e).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(Qt,i)});function Fq(e,t){const n=[],r=[];let i=!1,a=null;for(const o of e)!t(o[0])||!t(o[1])?i=!0:(n.push(o),i&&(i=!1,r.push([a,o])),a=o);return[n,r]}const Ms=(e,t)=>{const{curve:n,gradient:r=!1,gradientColor:i="between",defined:a=u=>!Number.isNaN(u)&&u!==void 0&&u!==null,connect:o=!1}=e,s=B5(e,["curve","gradient","gradientColor","defined","connect"]),{coordinate:l,document:c}=t;return(u,f,d)=>{const{color:h,lineWidth:p}=d,v=B5(d,["color","lineWidth"]),{color:g=h,size:m=p,seriesColor:b,seriesX:_,seriesY:S}=f,O=lA(l,f),C=ci(l),E=r&&b?oA(b,_,S,r,i,C):g,P=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},v),E&&{stroke:E}),m&&{lineWidth:m}),O&&{transform:O}),s);let T;if(Jr(l)){const F=l.getCenter();T=Z=>jq().angle((H,W)=>ld(Li(Z[W],F))).radius((H,W)=>wi(Z[W],F)).defined(([H,W])=>a(H)&&a(W)).curve(n)(Z)}else T=Fc().x(F=>F[0]).y(F=>F[1]).defined(([F,Z])=>a(F)&&a(Z)).curve(n);const[A,R]=Fq(u,a),z=Tt(P,"connect"),I=!!R.length;if(!I||o&&!Object.keys(z).length)return gn(c.createElement("path",{})).style("d",T(A)||[]).call(Qt,P).node();if(I&&!o)return gn(c.createElement("path",{})).style("d",T(u)).call(Qt,P).node();const L=F=>F.map(T).join(",");return gn(new Dq).style("style1",Object.assign(Object.assign({},P),z)).style("style2",P).style("d1",L(R)).style("d2",T(u)).node()}};Ms.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const z5=(e,t)=>{const{coordinate:n}=t;return(...r)=>{const i=Jr(n)?bw:vp;return Ms(Object.assign({curve:i},e),t)(...r)}};z5.props=Object.assign(Object.assign({},Ms.props),{defaultMarker:"line"});function Ew(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Mw(e,t){this._context=e,this._k=(1-t)/6}Mw.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:Ew(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ew(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Tye=function e(t){function n(r){return new Mw(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Pw(e,t){this._context=e,this._k=(1-t)/6}Pw.prototype={areaStart:wd,areaEnd:wd,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);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ew(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Aye=function e(t){function n(r){return new Pw(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Z5(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>to){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>to){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function $5(e,t){this._context=e,this._alpha=t}$5.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Z5(this,e,t);break}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Rye=function e(t){function n(r){return t?new $5(r,t):new Mw(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function W5(e,t){this._context=e,this._alpha=t}W5.prototype={areaStart:wd,areaEnd:wd,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);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Z5(this,e,t);break}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var G5=function e(t){function n(r){return t?new W5(r,t):new Pw(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function H5(e){return e<0?-1:1}function Y5(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(H5(a)+H5(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function V5(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Tw(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Em(e){this._context=e}Em.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:Tw(this,this._t0,V5(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Tw(this,V5(this,n=Y5(this,e,t)),n);break;default:Tw(this,this._t0,n=Y5(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function U5(e){this._context=new X5(e)}(U5.prototype=Object.create(Em.prototype)).point=function(e,t){Em.prototype.point.call(this,t,e)};function X5(e){this._context=e}X5.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function K5(e){return new Em(e)}function q5(e){return new U5(e)}var Bq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const J5=(e,t)=>{const n=Bq(e,[]),{coordinate:r}=t;return(...i)=>{const a=Jr(r)?G5:ci(r)?q5:K5;return Ms(Object.assign({curve:a},n),t)(...i)}};J5.props=Object.assign(Object.assign({},Ms.props),{defaultMarker:"smooth"});function Mm(e,t){this._context=e,this._t=t}Mm.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Q5(e){return new Mm(e,.5)}function eR(e){return new Mm(e,0)}function tR(e){return new Mm(e,1)}const nR=(e,t)=>Ms(Object.assign({curve:tR},e),t);nR.props=Object.assign(Object.assign({},Ms.props),{defaultMarker:"hv"});const rR=(e,t)=>Ms(Object.assign({curve:eR},e),t);rR.props=Object.assign(Object.assign({},Ms.props),{defaultMarker:"vh"});const iR=(e,t)=>Ms(Object.assign({curve:Q5},e),t);iR.props=Object.assign(Object.assign({},Ms.props),{defaultMarker:"hvh"});var zq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Zq(e,t,n,r,i){const a=Li(n,t),o=Cs(a),s=o+Math.PI/2,l=[r/2*Math.cos(s),r/2*Math.sin(s)],c=[i/2*Math.cos(s),i/2*Math.sin(s)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],f=[r/2*Math.cos(o),r/2*Math.sin(o)],d=Xg(t,l),h=Xg(n,c),p=Xg(h,u),v=Xg(n,u),g=Li(v,c),m=Li(n,c),b=Li(t,l),_=Li(b,f),S=Li(t,f),O=Li(d,f);e.moveTo(...d),e.lineTo(...h),e.arcTo(...p,...v,i/2),e.arcTo(...g,...m,i/2),e.lineTo(...b),e.arcTo(..._,...S,r/2),e.arcTo(...O,...d,r/2),e.closePath()}const aR=(e,t)=>{const{document:n}=t;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:l}=a,c=zq(a,["color"]),u=Es();for(let f=0;f<r.length-1;f++){const d=r[f],h=r[f+1],p=o[f],v=o[f+1];[...d,...h].every(qr)&&Zq(u,d,h,p,v)}return gn(n.createElement("path",{})).call(Qt,c).style("fill",s||l).style("d",u.toString()).call(Qt,e).node()}};aR.props=Object.assign(Object.assign({},Ms.props),{defaultMarker:"line"});const oR=()=>(e,t)=>{const{style:n={},encode:r}=t,{series:i}=r,{gradient:a}=n;return!a||i?[e,t]:[e,Je({},t,{encode:{series:_m(Gc(e,void 0))}})]};oR.props={};const Aw=()=>(e,t)=>{const{encode:n}=t,{series:r,color:i}=n;if(r!==void 0||i===void 0)return[e,t];const[a,o]=ur(n,"color");return[e,Je({},t,{encode:{series:ti(a,o)}})]};Aw.props={};const sR={line:z5,smooth:J5,hv:nR,vh:rR,hvh:iR,trail:aR},$q=(e,t,n,r)=>{var i,a;const{series:o,x:s,y:l}=n,{x:c,y:u}=t;if(s===void 0||l===void 0)throw new Error("Missing encode for x or y channel.");const f=o?Array.from(_i(e,g=>o[g]).values()):[e],d=f.map(g=>g[0]).filter(g=>g!==void 0),h=(((i=c==null?void 0:c.getBandWidth)===null||i===void 0?void 0:i.call(c))||0)/2,p=(((a=u==null?void 0:u.getBandWidth)===null||a===void 0?void 0:a.call(u))||0)/2,v=Array.from(f,g=>g.map(m=>r.map([+s[m]+h,+l[m]+p])));return[d,v,f]},Wq=(e,t,n,r)=>{const i=Object.entries(n).filter(([o])=>o.startsWith("position")).map(([,o])=>o);if(i.length===0)throw new Error("Missing encode for position channel.");const a=Array.from(e,o=>{const s=i.map(u=>+u[o]),l=r.map(s),c=[];for(let u=0;u<l.length;u+=2)c.push([l[u],l[u+1]]);return c});return[e,a]},lR=()=>(e,t,n,r)=>(ep(r)?Wq:$q)(e,t,n,r);lR.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:sR,channels:[...xo({shapes:Object.keys(sR)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Hi(),{type:oR},{type:Aw}],postInference:[...aa(),...Sd(),...kq()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var Gq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Rw=(e,t,n)=>[["M",e-n,t],["A",n,n,0,1,0,e+n,t],["A",n,n,0,1,0,e-n,t],["Z"]];Rw.style=["fill"];const cR=Rw.bind(void 0);cR.style=["stroke","lineWidth"];const Pm=(e,t,n)=>[["M",e-n,t-n],["L",e+n,t-n],["L",e+n,t+n],["L",e-n,t+n],["Z"]];Pm.style=["fill"];const uR=Pm.bind(void 0);uR.style=["fill"];const fR=Pm.bind(void 0);fR.style=["stroke","lineWidth"];const Iw=(e,t,n)=>{const r=n*.618;return[["M",e-r,t],["L",e,t-n],["L",e+r,t],["L",e,t+n],["Z"]]};Iw.style=["fill"];const dR=Iw.bind(void 0);dR.style=["stroke","lineWidth"];const Lw=(e,t,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t+r],["L",e,t-r],["L",e+n,t+r],["Z"]]};Lw.style=["fill"];const hR=Lw.bind(void 0);hR.style=["stroke","lineWidth"];const Nw=(e,t,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t-r],["L",e+n,t-r],["L",e,t+r],["Z"]]};Nw.style=["fill"];const pR=Nw.bind(void 0);pR.style=["stroke","lineWidth"];const kw=(e,t,n)=>{const r=n/2*Math.sqrt(3);return[["M",e,t-n],["L",e+r,t-n/2],["L",e+r,t+n/2],["L",e,t+n],["L",e-r,t+n/2],["L",e-r,t-n/2],["Z"]]};kw.style=["fill"];const vR=kw.bind(void 0);vR.style=["stroke","lineWidth"];const jw=(e,t,n)=>{const r=n-1.5;return[["M",e-n,t-r],["L",e+n,t+r],["L",e+n,t-r],["L",e-n,t+r],["Z"]]};jw.style=["fill"];const gR=jw.bind(void 0);gR.style=["stroke","lineWidth"];const mR=(e,t,n)=>[["M",e,t+n],["L",e,t-n]];mR.style=["stroke","lineWidth"];const yR=(e,t,n)=>[["M",e-n,t-n],["L",e+n,t+n],["M",e+n,t-n],["L",e-n,t+n]];yR.style=["stroke","lineWidth"];const bR=(e,t,n)=>[["M",e-n/2,t-n],["L",e+n/2,t-n],["M",e,t-n],["L",e,t+n],["M",e-n/2,t+n],["L",e+n/2,t+n]];bR.style=["stroke","lineWidth"];const xR=(e,t,n)=>[["M",e-n,t],["L",e+n,t],["M",e,t-n],["L",e,t+n]];xR.style=["stroke","lineWidth"];const _R=(e,t,n)=>[["M",e-n,t],["L",e+n,t]];_R.style=["stroke","lineWidth"];const Dw=(e,t,n)=>[["M",e-n,t],["L",e+n,t]];Dw.style=["stroke","lineWidth"];const wR=Dw.bind(void 0);wR.style=["stroke","lineWidth"];const SR=(e,t,n)=>[["M",e-n,t],["A",n/2,n/2,0,1,1,e,t],["A",n/2,n/2,0,1,0,e+n,t]];SR.style=["stroke","lineWidth"];const OR=(e,t,n)=>[["M",e-n-1,t-2.5],["L",e,t-2.5],["L",e,t+2.5],["L",e+n+1,t+2.5]];OR.style=["stroke","lineWidth"];const CR=(e,t,n)=>[["M",e-n-1,t+2.5],["L",e,t+2.5],["L",e,t-2.5],["L",e+n+1,t-2.5]];CR.style=["stroke","lineWidth"];const ER=(e,t,n)=>[["M",e-(n+1),t+2.5],["L",e-n/2,t+2.5],["L",e-n/2,t-2.5],["L",e+n/2,t-2.5],["L",e+n/2,t+2.5],["L",e+n+1,t+2.5]];ER.style=["stroke","lineWidth"];const MR=(e,t,n)=>[["M",e-5,t+2.5],["L",e-5,t],["L",e,t],["L",e,t-3],["L",e,t+3],["L",e+6.5,t+3]];MR.style=["stroke","lineWidth"];const Cd=new Map([["bowtie",jw],["cross",yR],["dash",wR],["diamond",Iw],["dot",Dw],["hexagon",kw],["hollowBowtie",gR],["hollowDiamond",dR],["hollowHexagon",vR],["hollowPoint",cR],["hollowSquare",fR],["hollowTriangle",hR],["hollowTriangleDown",pR],["hv",OR],["hvh",ER],["hyphen",_R],["line",mR],["plus",xR],["point",Rw],["rect",uR],["smooth",SR],["square",Pm],["tick",bR],["triangleDown",Nw],["triangle",Lw],["vh",CR],["vhv",MR]]);function Hq(e,t){var{d:n,fill:r,strokeWidth:i,path:a,stroke:o,lineWidth:s,color:l}=t,c=Gq(t,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const u=Cd.get(e)||Cd.get("point");return(...f)=>new Ja({style:Object.assign(Object.assign({},c),{path:u(...f),stroke:u.style.includes("stroke")?l||o:"",fill:u.style.includes("fill")?l||r:"",lineWidth:u.style.includes("lineWidth")?s||s||2:0})})}function Iye(e,t){Cd.set(e,t)}function Lye(e){Cd.delete(e)}var Yq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Vq(e,t,n,r){if(t.length===1)return;const{size:i}=n;if(e==="fixed")return i;if(e==="normal"||SP(r)){const[[a,o],[s,l]]=t,c=Math.abs((s-a)/2),u=Math.abs((l-o)/2);return Math.max(0,(c+u)/2)}return i}const nr=(e,t)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=e,a=Yq(e,["colorAttribute","symbol","mode"]),o=Cd.get(r)||Cd.get("point"),{coordinate:s,document:l}=t;return(c,u,f)=>{const{lineWidth:d,color:h}=f,p=a.stroke?d||1:d,{color:v=h,transform:g,opacity:m}=u,[b,_]=cA(c),O=Vq(i,c,u,s)||a.r||f.r;return gn(l.createElement("path",{})).call(Qt,f).style("fill","transparent").style("d",o(b,_,O)).style("lineWidth",p).style("transform",g).style("stroke",v).style(sA(e),m).style(n,v).call(Qt,a).node()}};nr.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const PR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"point"},e),t);PR.props=Object.assign({defaultMarker:"hollowPoint"},nr.props);const TR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"diamond"},e),t);TR.props=Object.assign({defaultMarker:"hollowDiamond"},nr.props);const AR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},e),t);AR.props=Object.assign({defaultMarker:"hollowHexagon"},nr.props);const RR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"square"},e),t);RR.props=Object.assign({defaultMarker:"hollowSquare"},nr.props);const IR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},e),t);IR.props=Object.assign({defaultMarker:"hollowTriangleDown"},nr.props);const LR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"triangle"},e),t);LR.props=Object.assign({defaultMarker:"hollowTriangle"},nr.props);const NR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},e),t);NR.props=Object.assign({defaultMarker:"hollowBowtie"},nr.props);const kR=(e,t)=>nr(Object.assign({colorAttribute:"fill",symbol:"point"},e),t);kR.props=Object.assign({defaultMarker:"point"},nr.props);const jR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"plus"},e),t);jR.props=Object.assign({defaultMarker:"plus"},nr.props);const DR=(e,t)=>nr(Object.assign({colorAttribute:"fill",symbol:"diamond"},e),t);DR.props=Object.assign({defaultMarker:"diamond"},nr.props);const FR=(e,t)=>nr(Object.assign({colorAttribute:"fill",symbol:"square"},e),t);FR.props=Object.assign({defaultMarker:"square"},nr.props);const BR=(e,t)=>nr(Object.assign({colorAttribute:"fill",symbol:"triangle"},e),t);BR.props=Object.assign({defaultMarker:"triangle"},nr.props);const zR=(e,t)=>nr(Object.assign({colorAttribute:"fill",symbol:"hexagon"},e),t);zR.props=Object.assign({defaultMarker:"hexagon"},nr.props);const ZR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"cross"},e),t);ZR.props=Object.assign({defaultMarker:"cross"},nr.props);const $R=(e,t)=>nr(Object.assign({colorAttribute:"fill",symbol:"bowtie"},e),t);$R.props=Object.assign({defaultMarker:"bowtie"},nr.props);const WR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},e),t);WR.props=Object.assign({defaultMarker:"hyphen"},nr.props);const GR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"line"},e),t);GR.props=Object.assign({defaultMarker:"line"},nr.props);const HR=(e,t)=>nr(Object.assign({colorAttribute:"stroke",symbol:"tick"},e),t);HR.props=Object.assign({defaultMarker:"tick"},nr.props);const YR=(e,t)=>nr(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},e),t);YR.props=Object.assign({defaultMarker:"triangleDown"},nr.props);const Tm=()=>(e,t)=>{const{encode:n}=t,{y:r}=n;return r!==void 0?[e,t]:[e,Je({},t,{encode:{y:xm(Gc(e,0))},scale:{y:{guide:null}}})]};Tm.props={};const VR=()=>(e,t)=>{const{encode:n}=t,{size:r}=n;return r!==void 0?[e,t]:[e,Je({},t,{encode:{size:_m(Gc(e,3))}})]};VR.props={};const UR={hollow:PR,hollowDiamond:TR,hollowHexagon:AR,hollowSquare:RR,hollowTriangleDown:IR,hollowTriangle:LR,hollowBowtie:NR,point:kR,plus:jR,diamond:DR,square:FR,triangle:BR,hexagon:zR,cross:ZR,bowtie:$R,hyphen:WR,line:GR,tick:HR,triangleDown:YR},XR=e=>(t,n,r,i)=>{const{x:a,y:o,x1:s,y1:l,size:c,dx:u,dy:f}=r,[d,h]=i.getSize(),p=Hu(n,r,e),v=m=>{const b=+((u==null?void 0:u[m])||0),_=+((f==null?void 0:f[m])||0),S=s?(+a[m]+ +s[m])/2:+a[m],O=l?(+o[m]+ +l[m])/2:+o[m],C=S+b,E=O+_;return[C,E]},g=c?Array.from(t,m=>{const[b,_]=v(m),S=+c[m],O=S/d,C=S/h,E=[b-O,_-C],P=[b+O,_+C];return[i.map(p(E,m)),i.map(p(P,m))]}):Array.from(t,m=>[i.map(p(v(m),m))]);return[t,g]};XR.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:UR,channels:[...xo({shapes:Object.keys(UR)}),{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:[...Hi(),{type:Wu},{type:Tm}],postInference:[...aa(),{type:VR},...Hc()]};const KR=(e,t)=>{const{coordinate:n}=t;return(r,i,a)=>{const{color:o,text:s="",fontSize:l,rotate:c=0,transform:u=""}=i,f={text:String(s),stroke:o,fill:o,fontSize:l},[[d,h]]=r;return gn(new gA).style("x",d).style("y",h).call(Qt,a).style("transform",`${u}rotate(${+c})`).style("coordCenter",n.getCenter()).call(Qt,f).call(Qt,e).node()}};KR.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Fw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Uq(e){const t=e/Math.sqrt(2),n=e*Math.sqrt(2),[r,i]=[-t,t-n],[a,o]=[0,0],[s,l]=[t,t-n];return[["M",r,i],["A",e,e,0,1,1,s,l],["L",a,o],["Z"]]}function Xq(e){const{min:t,max:n}=e.getLocalBounds();return[(t[0]+n[0])*.5,(t[1]+n[1])*.5]}const Kq=cd(e=>{const t=e.attributes,{class:n,x:r,y:i}=t,a=Fw(t,["class","x","y"]),o=Tt(a,"marker"),{size:s=24}=o,l=()=>Uq(s/2),c=gn(e).maybeAppend("marker",()=>new Pr({})).call(d=>d.node().update(Object.assign({symbol:l},o))).node(),[u,f]=Xq(c);gn(e).maybeAppend("text","text").style("x",u).style("y",f).call(Qt,a)}),qR=(e,t)=>{const n=Fw(e,[]);return(r,i,a)=>{const{color:o}=a,s=Fw(a,["color"]),{color:l=o,text:c=""}=i,u={text:String(c),stroke:l,fill:l},[[f,d]]=r;return gn(new Kq).call(Qt,s).style("x",f).style("y",d).call(Qt,u).call(Qt,n).node()}};qR.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Am=()=>(e,t)=>{const{data:n}=t;if(!Array.isArray(n)||n.some(Tp))return[e,t];const r=Array.isArray(n[0])?n:[n],i=r.map(o=>o[0]),a=r.map(o=>o[1]);return[e,Je({},t,{encode:{x:ti(i),y:ti(a)}})]};Am.props={};var JR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Rm=()=>(e,t)=>{const{data:n,style:r={}}=t,i=JR(t,["data","style"]),{x:a,y:o}=r,s=JR(r,["x","y"]);if(a==null||o==null)return[e,t];const l=a||0,c=o||0;return[[0],Je({},i,{data:[0],cartesian:!0,encode:{x:ti([l]),y:ti([c])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};Rm.props={};const QR={text:KR,badge:qR},eI=e=>{const{cartesian:t=!1}=e;return t?ww:(n,r,i,a)=>{const{x:o,y:s}=i,l=Hu(r,i,e),c=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[n,c]}};eI.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:QR,channels:[...xo({shapes:Object.keys(QR)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...Hi(),{type:Am},{type:Rm}],postInference:[...aa(),...Hc()]};const Bw=()=>(e,t)=>[e,Je({scale:{x:{padding:0},y:{padding:0}}},t)];Bw.props={};const tI={cell:Gu,hollow:wm},nI=()=>(e,t,n,r)=>{const{x:i,y:a}=n,o=t.x,s=t.y,l=Array.from(e,c=>{const u=o.getBandWidth(o.invert(+i[c])),f=s.getBandWidth(s.invert(+a[c])),d=+i[c],h=+a[c],p=[d,h],v=[d+u,h],g=[d+u,h+f],m=[d,h+f];return[p,v,g,m].map(b=>r.map(b))});return[e,l]};nI.props={defaultShape:"cell",defaultLabelShape:"label",shape:tI,composite:!1,channels:[...xo({shapes:Object.keys(tI)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Hi(),{type:Wu},{type:Tm},{type:Bw}],postInference:[...aa(),...Hc()]};function zw(e,t,n){var r=null,i=fi(!0),a=null,o=vp,s=null,l=L_(c);e=typeof e=="function"?e:e===void 0?pA:fi(+e),t=typeof t=="function"?t:fi(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?vA:fi(+n);function c(f){var d,h,p,v=(f=fA(f)).length,g,m=!1,b,_=new Array(v),S=new Array(v);for(a==null&&(s=o(b=l())),d=0;d<=v;++d){if(!(d<v&&i(g=f[d],d,f))===m)if(m=!m)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(_[p],S[p]);s.lineEnd(),s.areaEnd()}m&&(_[d]=+e(g,d,f),S[d]=+t(g,d,f),s.point(r?+r(g,d,f):_[d],n?+n(g,d,f):S[d]))}if(b)return s=null,b+""||null}function u(){return Fc().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:fi(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:fi(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:fi(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:fi(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:fi(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:fi(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:fi(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}function qq(){var e=zw().curve(D5),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Ip(n())},delete e.lineX0,e.lineEndAngle=function(){return Ip(r())},delete e.lineX1,e.lineInnerRadius=function(){return Ip(i())},delete e.lineY0,e.lineOuterRadius=function(){return Ip(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(Cw(o)):t()._curve},e}var Jq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Qq(e,t){const n=[],r=[],i=[];let a=!1,o=null;const s=e.length/2;for(let l=0;l<s;l++){const c=e[l],u=e[l+s];if([...c,...u].some(f=>!t(f)))a=!0;else{if(n.push(c),r.push(u),a&&o){a=!1;const[f,d]=o;i.push([f,c,d,u])}o=[c,u]}}return[n.concat(r),i]}const rI=cd(e=>{const{areaPath:t,connectPath:n,areaStyle:r,connectStyle:i}=e.attributes,a=e.ownerDocument;gn(e).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(Qt,i),gn(e).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",t).call(Qt,r)}),Ys=(e,t)=>{const{curve:n,gradient:r=!1,defined:i=c=>!Number.isNaN(c)&&c!==void 0&&c!==null,connect:a=!1}=e,o=Jq(e,["curve","gradient","defined","connect"]),{coordinate:s,document:l}=t;return(c,u,f)=>{const{color:d}=f,{color:h=d,seriesColor:p,seriesX:v,seriesY:g}=u,m=ci(s),b=lA(s,u),_=r&&p?oA(p,v,g,r,void 0,m):h,S=Object.assign(Object.assign(Object.assign(Object.assign({},f),{stroke:_,fill:_}),b&&{transform:b}),o),[O,C]=Qq(c,i),E=Tt(S,"connect"),P=!!C.length,T=A=>gn(l.createElement("path",{})).style("d",A||"").call(Qt,S).node();if(Jr(s)){const A=R=>{const z=s.getCenter(),I=R.slice(0,R.length/2),L=R.slice(R.length/2);return qq().angle((F,Z)=>ld(Li(I[Z],z))).outerRadius((F,Z)=>wi(I[Z],z)).innerRadius((F,Z)=>wi(L[Z],z)).defined((F,Z)=>[...I[Z],...L[Z]].every(i)).curve(n)(L)};return!P||a&&!Object.keys(E).length?T(A(O)):P&&!a?T(A(c)):gn(new rI).style("areaStyle",S).style("connectStyle",Object.assign(Object.assign({},E),o)).style("areaPath",A(c)).style("connectPath",C.map(A).join("")).node()}else{const A=R=>{const z=R.slice(0,R.length/2),I=R.slice(R.length/2);return m?zw().y((L,F)=>z[F][1]).x1((L,F)=>z[F][0]).x0((L,F)=>I[F][0]).defined((L,F)=>[...z[F],...I[F]].every(i)).curve(n)(z):zw().x((L,F)=>z[F][0]).y1((L,F)=>z[F][1]).y0((L,F)=>I[F][1]).defined((L,F)=>[...z[F],...I[F]].every(i)).curve(n)(z)};return!P||a&&!Object.keys(E).length?T(A(O)):P&&!a?T(A(c)):gn(new rI).style("areaStyle",S).style("connectStyle",Object.assign(Object.assign({},E),o)).style("areaPath",A(c)).style("connectPath",C.map(A).join("")).node()}}};Ys.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const iI=(e,t)=>{const{coordinate:n}=t;return(...r)=>{const i=Jr(n)?bw:vp;return Ys(Object.assign({curve:i},e),t)(...r)}};iI.props=Object.assign(Object.assign({},Ys.props),{defaultMarker:"square"});var eJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const aI=(e,t)=>{const n=eJ(e,[]),{coordinate:r}=t;return(...i)=>{const a=Jr(r)?G5:ci(r)?q5:K5;return Ys(Object.assign({curve:a},n),t)(...i)}};aI.props=Object.assign(Object.assign({},Ys.props),{defaultMarker:"smooth"});const oI=(e,t)=>(...n)=>Ys(Object.assign({curve:Q5},e),t)(...n);oI.props=Object.assign(Object.assign({},Ys.props),{defaultMarker:"hvh"});const sI=(e,t)=>(...n)=>Ys(Object.assign({curve:eR},e),t)(...n);sI.props=Object.assign(Object.assign({},Ys.props),{defaultMarker:"vh"});const lI=(e,t)=>(...n)=>Ys(Object.assign({curve:tR},e),t)(...n);lI.props=Object.assign(Object.assign({},Ys.props),{defaultMarker:"hv"});const cI={area:iI,smooth:aI,hvh:oI,vh:sI,hv:lI},uI=()=>(e,t,n,r)=>{var i,a;const{x:o,y:s,y1:l,series:c}=n,{x:u,y:f}=t,d=c?Array.from(_i(e,m=>c[m]).values()):[e],h=d.map(m=>m[0]).filter(m=>m!==void 0),p=(((i=u==null?void 0:u.getBandWidth)===null||i===void 0?void 0:i.call(u))||0)/2,v=(((a=f==null?void 0:f.getBandWidth)===null||a===void 0?void 0:a.call(f))||0)/2,g=Array.from(d,m=>{const b=m.length,_=new Array(b*2);for(let S=0;S<m.length;S++){const O=m[S];_[S]=r.map([+o[O]+p,+s[O]+v]),_[b+S]=r.map([+o[O]+p,+l[O]+v])}return _});return[h,g,d]};uI.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:cI,channels:[...xo({shapes:Object.keys(cI)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Hi(),{type:Aw},{type:Ap},{type:Bw}],postInference:[...aa(),...Sd()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const fI=()=>(e,t)=>{const{encode:n}=t,{y1:r}=n;if(r)return[e,t];const[i]=ur(n,"y");return[e,Je({},t,{encode:{y1:ti([...i])}})]};fI.props={};const dI=()=>(e,t)=>{const{encode:n}=t,{x1:r}=n;if(r)return[e,t];const[i]=ur(n,"x");return[e,Je({},t,{encode:{x1:ti([...i])}})]};dI.props={};var hI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Zw=(e,t)=>{const{arrow:n=!0,arrowSize:r="40%"}=e,i=hI(e,["arrow","arrowSize"]),{document:a}=t;return(o,s,l)=>{const{defaultColor:c}=l,u=hI(l,["defaultColor"]),{color:f=c,transform:d}=s,[h,p]=o,v=Es();if(v.moveTo(...h),v.lineTo(...p),n){const[g,m]=eY(h,p,{arrowSize:r});v.moveTo(...p),v.lineTo(...g),v.moveTo(...p),v.lineTo(...m)}return gn(a.createElement("path",{})).call(Qt,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Qt,i).node()}};Zw.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const pI=(e,t)=>{const{arrow:n=!1}=e;return(...r)=>Zw(Object.assign(Object.assign({},e),{arrow:n}),t)(...r)};pI.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var vI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const gI=(e,t)=>{const n=vI(e,[]),{coordinate:r,document:i}=t;return(a,o,s)=>{const{color:l}=s,c=vI(s,["color"]),{color:u=l,transform:f}=o,[d,h]=a,p=Es();if(p.moveTo(d[0],d[1]),Jr(r)){const v=r.getCenter();p.quadraticCurveTo(v[0],v[1],h[0],h[1])}else{const v=aA(d,h),g=wi(d,h)/2;pp(p,d,h,v,g)}return gn(i.createElement("path",{})).call(Qt,c).style("d",p.toString()).style("stroke",u).style("transform",f).call(Qt,n).node()}};gI.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var mI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const yI=(e,t)=>{const n=mI(e,[]),{document:r}=t;return(i,a,o)=>{const{color:s}=o,l=mI(o,["color"]),{color:c=s,transform:u}=a,[f,d]=i,h=Es();return h.moveTo(f[0],f[1]),h.bezierCurveTo(f[0]/2+d[0]/2,f[1],f[0]/2+d[0]/2,d[1],d[0],d[1]),gn(r.createElement("path",{})).call(Qt,l).style("d",h.toString()).style("stroke",c).style("transform",u).call(Qt,n).node()}};yI.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function tJ(e,t,n,r){const i=Es();if(Jr(n)){const a=n.getCenter(),o=wi(e,a),l=(wi(t,a)-o)*r+o;return i.moveTo(e[0],e[1]),pp(i,e,t,a,l),i.lineTo(t[0],t[1]),i}return ci(n)?(i.moveTo(e[0],e[1]),i.lineTo(e[0]+(t[0]-e[0])*r,e[1]),i.lineTo(e[0]+(t[0]-e[0])*r,t[1]),i.lineTo(t[0],t[1]),i):(i.moveTo(e[0],e[1]),i.lineTo(e[0],e[1]+(t[1]-e[1])*r),i.lineTo(t[0],e[1]+(t[1]-e[1])*r),i.lineTo(t[0],t[1]),i)}const xI=(e,t)=>{const{cornerRatio:n=1/3}=e,r=bI(e,["cornerRatio"]),{coordinate:i,document:a}=t;return(o,s,l)=>{const{defaultColor:c}=l,u=bI(l,["defaultColor"]),{color:f=c,transform:d}=s,[h,p]=o,v=tJ(h,p,i,n);return gn(a.createElement("path",{})).call(Qt,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Qt,r).node()}};xI.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _I={link:pI,arc:gI,smooth:yI,vhv:xI},$w=e=>(t,n,r,i)=>{const{x:a,y:o,x1:s=a,y1:l=o}=r,c=Hu(n,r,e),u=t.map(f=>[i.map(c([+a[f],+o[f]],f)),i.map(c([+s[f],+l[f]],f))]);return[t,u]};$w.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:_I,channels:[...xo({shapes:Object.keys(_I)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Hi(),{type:fI},{type:dI}],postInference:[...aa(),...Hc()]};var nJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const wI=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s}=o,l=nJ(o,["color"]),{color:c=s,src:u="",size:f=32,transform:d=""}=a;let{width:h=f,height:p=f}=e;const[[v,g]]=i,[m,b]=n.getSize();h=typeof h=="string"?Cm(h)*m:h,p=typeof p=="string"?Cm(p)*b:p;const _=v-Number(h)/2,S=g-Number(p)/2;return gn(r.createElement("image",{})).call(Qt,l).style("x",_).style("y",S).style("img",u).style("stroke",c).style("transform",d).call(Qt,e).style("width",h).style("height",p).node()}};wI.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const SI={image:wI},OI=e=>{const{cartesian:t}=e;return t?ww:(n,r,i,a)=>{const{x:o,y:s}=i,l=Hu(r,i,e),c=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[n,c]}};OI.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:SI,channels:[...xo({shapes:Object.keys(SI)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Hi(),{type:Am},{type:Rm}],postInference:[...aa(),...Hc()]};var rJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function iJ(e,t){const n=Es();if(Jr(t)){const r=t.getCenter(),i=[...e,e[0]],a=i.map(o=>wi(o,r));return i.forEach((o,s)=>{if(s===0){n.moveTo(o[0],o[1]);return}const l=a[s],c=e[s-1],u=a[s-1];u!==void 0&&Math.abs(l-u)<1e-10?pp(n,c,o,r,l):n.lineTo(o[0],o[1])}),n.closePath(),n}return QH(n,e)}const CI=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s}=o,l=rJ(o,["color"]),{color:c=s,transform:u}=a,f=iJ(i,n);return gn(r.createElement("path",{})).call(Qt,l).style("d",f.toString()).style("stroke",c).style("fill",c).style("transform",u).call(Qt,e).node()}};CI.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var EI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function aJ(e,t){const[n,r,i,a]=e,o=Es();if(Jr(t)){const s=t.getCenter(),l=wi(s,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(s[0],s[1],i[0],i[1]),pp(o,i,a,s,l),o.quadraticCurveTo(s[0],s[1],r[0],r[1]),pp(o,r,n,s,l),o.closePath(),o}return o.moveTo(n[0],n[1]),o.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(n[0],n[1]),o.closePath(),o}const MI=(e,t)=>{const n=EI(e,[]),{coordinate:r,document:i}=t;return(a,o,s)=>{const{color:l}=s,c=EI(s,["color"]),{color:u=l,transform:f}=o,d=aJ(a,r);return gn(i.createElement("path",{})).call(Qt,c).style("d",d.toString()).style("fill",u||l).style("stroke",u||l).style("transform",f).call(Qt,n).node()}};MI.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const PI={polygon:CI,ribbon:MI},TI=()=>(e,t,n,r)=>{const i=Object.entries(n).filter(([s])=>s.startsWith("x")).map(([,s])=>s),a=Object.entries(n).filter(([s])=>s.startsWith("y")).map(([,s])=>s),o=e.map(s=>{const l=[];for(let c=0;c<i.length;c++){const u=i[c][s];if(u===void 0)break;const f=a[c][s];l.push(r.map([+u,+f]))}return l});return[e,o]};TI.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:PI,channels:[...xo({shapes:Object.keys(PI)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Hi()],postInference:[...aa(),...Hc()]};var oJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function sJ(e,t){const n=Es();if(!Jr(t))n.moveTo(...e[0]),n.lineTo(...e[1]),n.moveTo(...e[2]),n.lineTo(...e[3]),n.moveTo(...e[4]),n.lineTo(...e[5]),n.lineTo(...e[6]),n.lineTo(...e[7]),n.closePath(),n.moveTo(...e[8]),n.lineTo(...e[9]),n.moveTo(...e[10]),n.lineTo(...e[11]),n.moveTo(...e[12]),n.lineTo(...e[13]);else{const r=t.getCenter(),[i,a]=r,o=Cs(Li(e[0],r)),s=Cs(Li(e[1],r)),l=wi(r,e[2]),c=wi(r,e[3]),u=wi(r,e[8]),f=wi(r,e[10]),d=wi(r,e[11]);n.moveTo(...e[0]),n.arc(i,a,l,o,s),n.arc(i,a,l,s,o,!0),n.moveTo(...e[2]),n.lineTo(...e[3]),n.moveTo(...e[4]),n.arc(i,a,c,o,s),n.lineTo(...e[6]),n.arc(i,a,f,s,o,!0),n.closePath(),n.moveTo(...e[8]),n.arc(i,a,u,o,s),n.arc(i,a,u,s,o,!0),n.moveTo(...e[10]),n.lineTo(...e[11]),n.moveTo(...e[12]),n.arc(i,a,d,o,s),n.arc(i,a,d,s,o,!0)}return n}const AI=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s,transform:l}=a,{color:c,fill:u=c,stroke:f=c}=o,d=oJ(o,["color","fill","stroke"]),h=sJ(i,n);return gn(r.createElement("path",{})).call(Qt,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",l).call(Qt,e).node()}};AI.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var lJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function cJ(e,t,n=4){const r=Es();if(!Jr(t))return r.moveTo(...e[2]),r.lineTo(...e[3]),r.lineTo(e[3][0]-n,e[3][1]),r.lineTo(e[10][0]-n,e[10][1]),r.lineTo(e[10][0]+n,e[10][1]),r.lineTo(e[3][0]+n,e[3][1]),r.lineTo(...e[3]),r.closePath(),r.moveTo(...e[10]),r.lineTo(...e[11]),r.moveTo(e[3][0]+n/2,e[8][1]),r.arc(e[3][0],e[8][1],n/2,0,Math.PI*2),r.closePath(),r;const i=t.getCenter(),[a,o]=i,s=wi(i,e[3]),l=wi(i,e[8]),c=wi(i,e[10]),u=Cs(Li(e[2],i)),f=Math.asin(n/l),d=u-f,h=u+f;r.moveTo(...e[2]),r.lineTo(...e[3]),r.moveTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.arc(a,o,s,d,h),r.lineTo(Math.cos(h)*c+a,Math.sin(h)*c+o),r.arc(a,o,c,h,d,!0),r.lineTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.closePath(),r.moveTo(...e[10]),r.lineTo(...e[11]);const p=(d+h)/2;return r.moveTo(Math.cos(p)*(l+n/2)+a,Math.sin(p)*(l+n/2)+o),r.arc(Math.cos(p)*l+a,Math.sin(p)*l+o,n/2,p,Math.PI*2+p),r.closePath(),r}const RI=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s,transform:l}=a,c=4,{color:u,fill:f=u,stroke:d=u}=o,h=lJ(o,["color","fill","stroke"]),p=cJ(i,n,c);return gn(r.createElement("path",{})).call(Qt,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",l).call(Qt,e).node()}};RI.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const II={box:AI,violin:RI},LI=()=>(e,t,n,r)=>{const{x:i,y:a,y1:o,y2:s,y3:l,y4:c,series:u}=n,f=t.x,d=t.series,h=Array.from(e,p=>{const v=f.getBandWidth(f.invert(+i[p])),g=d?d.getBandWidth(d.invert(+(u==null?void 0:u[p]))):1,m=v*g,b=(+(u==null?void 0:u[p])||0)*v,_=+i[p]+b+m/2,[S,O,C,E,P]=[+a[p],+o[p],+s[p],+l[p],+c[p]];return[[_-m/2,P],[_+m/2,P],[_,P],[_,E],[_-m/2,E],[_+m/2,E],[_+m/2,O],[_-m/2,O],[_-m/2,C],[_+m/2,C],[_,O],[_,S],[_-m/2,S],[_+m/2,S]].map(A=>r.map(A))});return[e,h]};LI.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:II,channels:[...xo({shapes:Object.keys(II)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Hi(),{type:Wu}],postInference:[...aa(),...Sd()],interaction:{shareTooltip:!0}};const NI={vector:Zw},kI=()=>(e,t,n,r)=>{const{x:i,y:a,size:o,rotate:s}=n,[l,c]=r.getSize(),u=e.map(f=>{const d=+s[f]/180*Math.PI,h=+o[f],p=h/l,v=h/c,g=p*Math.cos(d),m=-v*Math.sin(d);return[r.map([+i[f]-g/2,+a[f]-m/2]),r.map([+i[f]+g/2,+a[f]+m/2])]});return[e,u]};kI.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:NI,channels:[...xo({shapes:Object.keys(NI)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Hi()],postInference:[...aa(),...Hc()]};var jI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function uJ(e,t,n){return e.createElement("path",{style:Object.assign({path:`M ${t},${t} L -${t},0 L ${t},-${t} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},n)})}function fJ(e,t){if(!Jr(t))return Fc().x(r=>r[0]).y(r=>r[1])(e);const n=t.getCenter();return nm()({startAngle:0,endAngle:Math.PI*2,outerRadius:wi(e[0],n),innerRadius:wi(e[1],n)})}function dJ(e,t){if(!Jr(e))return t;const[n,r]=e.getCenter();return`translate(${n}, ${r}) ${t||""}`}const Ww=(e,t)=>{const{arrow:n,arrowSize:r=4}=e,i=jI(e,["arrow","arrowSize"]),{coordinate:a,document:o}=t;return(s,l,c)=>{const{color:u,lineWidth:f}=c,d=jI(c,["color","lineWidth"]),{color:h=u,size:p=f}=l,v=n?uJ(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},Tt(i,"arrow"))):null,g=fJ(s,a),m=dJ(a,l.transform);return gn(o.createElement("path",{})).call(Qt,d).style("d",g).style("stroke",h).style("lineWidth",p).style("transform",m).style("markerEnd",v).call(Qt,i).node()}};Ww.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const DI=()=>(e,t)=>{const{data:n}=t;return!Array.isArray(n)||n.some(Tp)?[e,t]:[e,Je({},t,{encode:{x:ti(n)}})]};DI.props={};const FI={line:Ww},BI=e=>(t,n,r,i)=>{const{x:a}=r,o=Hu(n,r,Je({style:{bandOffset:0}},e)),s=Array.from(t,l=>{const c=[a[l],1],u=[a[l],0];return[c,u].map(f=>i.map(o(f,l)))});return[t,s]};BI.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:FI,channels:[...Od({shapes:Object.keys(FI)}),{name:"x",required:!0}],preInference:[...Hi(),{type:DI}],postInference:[...aa()]};const zI=()=>(e,t)=>{const{data:n}=t;return!Array.isArray(n)||n.some(Tp)?[e,t]:[e,Je({},t,{encode:{y:ti(n)}})]};zI.props={};const ZI={line:Ww},$I=e=>(t,n,r,i)=>{const{y:a}=r,o=Hu(n,r,Je({style:{bandOffset:0}},e)),s=Array.from(t,l=>{const c=[0,a[l]],u=[1,a[l]];return[c,u].map(f=>i.map(o(f,l)))});return[t,s]};$I.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:ZI,channels:[...Od({shapes:Object.keys(ZI)}),{name:"y",required:!0}],preInference:[...Hi(),{type:zI}],postInference:[...aa()]};var WI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function hJ(e,t,n){return[["M",e,t],["L",e+2*n,t-n],["L",e+2*n,t+n],["Z"]]}function pJ(e){return Fc().x(t=>t[0]).y(t=>t[1])(e)}function vJ(e,t,n,r,i=0){const[[a,o],[s,l]]=t;if(ci(e)){const d=a+n,h=s+r,p=d+i;return[[d,o],[p,o],[p,l],[h,l]]}const c=o-n,u=l-r,f=c-i;return[[a,c],[a,f],[s,f],[s,u]]}const GI=(e,t)=>{const{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=e,s=WI(e,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:l}=t;return(c,u,f)=>{const{color:d,connectLength1:h}=f,p=WI(f,["color","connectLength1"]),{color:v,transform:g}=u,m=vJ(l,c,r,i,a!=null?a:h),b=Tt(Object.assign(Object.assign({},s),f),"endMarker");return gn(new Ja).call(Qt,p).style("path",pJ(m)).style("stroke",v||d).style("transform",g).style("markerEnd",o?new Pr({className:"marker",style:Object.assign(Object.assign({},b),{symbol:hJ})}):null).call(Qt,s).node()}};GI.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const HI={connector:GI},YI=(...e)=>$w(...e);YI.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:HI,channels:[...Od({shapes:Object.keys(HI)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Hi()],postInference:[...aa()]};function VI(e,t,n,r){if(t)return()=>[0,1];const{[e]:i,[`${e}1`]:a}=n;return o=>{var s;const l=((s=r.getBandWidth)===null||s===void 0?void 0:s.call(r,r.invert(+a[o])))||0;return[i[o],a[o]+l]}}function Gw(e={}){const{extendX:t=!1,extendY:n=!1}=e;return(r,i,a,o)=>{const s=VI("x",t,a,i.x),l=VI("y",n,a,i.y),c=Array.from(r,u=>{const[f,d]=s(u),[h,p]=l(u);return[[f,h],[d,h],[d,p],[f,p]].map(_=>o.map(_))});return[r,c]}}const UI={range:Gu},XI=()=>Gw();XI.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:UI,channels:[...Od({shapes:Object.keys(UI)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Hi()],postInference:[...aa()]};const KI=()=>(e,t)=>{const{data:n}=t;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(Tp))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[e,Je({},t,{encode:{x:ti(r(n,0)),x1:ti(r(n,1))}})]}return[e,t]};KI.props={};const qI={range:Gu},JI=()=>Gw({extendY:!0});JI.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:qI,channels:[...Od({shapes:Object.keys(qI)}),{name:"x",required:!0}],preInference:[...Hi(),{type:KI}],postInference:[...aa()]};const QI=()=>(e,t)=>{const{data:n}=t;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(Tp))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[e,Je({},t,{encode:{y:ti(r(n,0)),y1:ti(r(n,1))}})]}return[e,t]};QI.props={};const eL={range:Gu},tL=()=>Gw({extendX:!0});tL.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:eL,channels:[...Od({shapes:Object.keys(eL)}),{name:"y",required:!0}],preInference:[...Hi(),{type:QI}],postInference:[...aa()]};var nL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Hw=(e,t)=>{const{arrow:n,colorAttribute:r}=e,i=nL(e,["arrow","colorAttribute"]),{coordinate:a,document:o}=t;return(s,l,c)=>{const{color:u,stroke:f}=c,d=nL(c,["color","stroke"]),{d:h,color:p=u}=l,[v,g]=a.getSize();return gn(o.createElement("path",{})).call(Qt,d).style("d",typeof h=="function"?h({width:v,height:g}):h).style(r,p).call(Qt,i).node()}};Hw.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const rL=(e,t)=>Hw(Object.assign({colorAttribute:"fill"},e),t);rL.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const iL=(e,t)=>Hw(Object.assign({fill:"none",colorAttribute:"stroke"},e),t);iL.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const aL={path:rL,hollow:iL},oL=e=>(t,n,r,i)=>[t,t.map(()=>[[0,0]])];oL.props={defaultShape:"path",defaultLabelShape:"label",shape:aL,composite:!1,channels:[...xo({shapes:Object.keys(aL)}),{name:"d",scale:"identity"}],preInference:[...Hi()],postInference:[...aa()]};var gJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sL=(e,t)=>{const{render:n}=e,r=gJ(e,["render"]);return i=>{const[[a,o]]=i;return n(Object.assign(Object.assign({},r),{x:a,y:o}),t)}};sL.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const lL=()=>(e,t)=>{const{style:n={}}=t;return[e,Je({},t,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};lL.props={};const mJ={shape:sL},cL=e=>{const{cartesian:t}=e;return t?ww:(n,r,i,a)=>{const{x:o,y:s}=i,l=Hu(r,i,e),c=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[n,c]}};cL.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:mJ,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Hi(),{type:Am},{type:Rm},{type:lL}]};var yJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const uL=(e,t)=>{const{document:n}=t;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,l=yJ(a,["color"]),{color:c=s}=i,[u,...f]=r,d=Es();return d.moveTo(...u),f.forEach(([h,p])=>{d.lineTo(h,p)}),d.closePath(),gn(n.createElement("path",{})).call(Qt,l).style("d",d.toString()).style("stroke",c||s).style("fill",c||s).style("fillOpacity",.4).style("transform",o).call(Qt,e).node()}};uL.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const fL={density:uL},dL=()=>(e,t,n,r)=>{const{x:i,series:a}=n,o=Object.entries(n).filter(([f])=>f.startsWith("y")).map(([,f])=>f),s=Object.entries(n).filter(([f])=>f.startsWith("size")).map(([,f])=>f);if(i===void 0||o===void 0||s===void 0)throw new Error("Missing encode for x or y or size channel.");const l=t.x,c=t.series,u=Array.from(e,f=>{const d=l.getBandWidth(l.invert(+i[f])),h=c?c.getBandWidth(c.invert(+(a==null?void 0:a[f]))):1,p=d*h,v=(+(a==null?void 0:a[f])||0)*d,g=+i[f]+v+p/2;return[...o.map((b,_)=>[g+ +s[_][f]/e.length,+o[_][f]]),...o.map((b,_)=>[g-+s[_][f]/e.length,+o[_][f]]).reverse()].map(b=>r.map(b))});return[e,u]};dL.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:fL,channels:[...xo({shapes:Object.keys(fL)}),{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:[...Hi(),{type:Ap},{type:Wu}],postInference:[...aa(),...Sd()],interaction:{shareTooltip:!0}};function hL(e){var t,n,r,i=e||1;function a(s,l){++t>i&&(r=n,o(1),++t),n[s]=l}function o(s){t=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set:function(s,l){n[s]!==void 0?n[s]=l:a(s,l)}}}const Nye=hL(3);function bJ(e,t=(...r)=>`${r[0]}`,n=16){const r=hL(n);return(...i)=>{const a=t(...i);let o=r.get(a);return r.has(a)?r.get(a):(o=e(...i),r.set(a,o),o)}}function xJ(e){return typeof e=="string"?e.split(" ").map(t=>{const[n,r]=t.split(":");return[+n,r]}):e}function Im(e,t,n){const r=e?e():document.createElement("canvas");return r.width=t,r.height=n,r}const _J=bJ((e,t,n)=>{const r=Im(n,e*2,e*2),i=r.getContext("2d"),a=e,o=e;if(t===1)i.beginPath(),i.arc(a,o,e,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{const s=i.createRadialGradient(a,o,e*t,a,o,e);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=s,i.fillRect(0,0,2*e,2*e)}return r},e=>`${e}`);function wJ(e,t){const r=Im(t,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return xJ(e).forEach(([a,o])=>{i.addColorStop(a,o)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}function SJ(e,t,n,r,i,a){const{blur:o}=i;let s=r.length;for(;s--;){const{x:l,y:c,value:u,radius:f}=r[s],d=Math.min(u,n),h=l-f,p=c-f,v=_J(f,1-o,a),g=(d-t)/(n-t);e.globalAlpha=Math.max(g,.001),e.drawImage(v,h,p)}return e}function OJ(e,t,n,r,i){const{minOpacity:a,opacity:o,maxOpacity:s,useGradientOpacity:l}=i,c=0,u=0,f=t,d=n,h=e.getImageData(c,u,f,d),p=h.data,v=p.length;for(let g=3;g<v;g+=4){const m=p[g],b=m*4;if(!b)continue;const _=o||Math.max(0,Math.min(s,Math.max(a,m)));p[g-3]=r[b],p[g-2]=r[b+1],p[g-1]=r[b+2],p[g]=l?r[b+3]:_}return h}function CJ(e,t,n,r,i,a,o){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)"]]},a);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const c=Im(o,e,t).getContext("2d"),u=wJ(s.gradient,o);c.clearRect(0,0,e,t),SJ(c,n,r,i,s,o);const f=OJ(c,e,t,u,s),h=Im(o,e,t).getContext("2d");return h.putImageData(f,0,0),h}var EJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function MJ(e,t){return Object.keys(e).reduce((n,r)=>{const i=e[r];return t(i,r)||(n[r]=i),n},{})}const pL=(e,t)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=e,l=EJ(e,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:c,createCanvas:u,document:f}=t;return(d,h,p)=>{const{transform:v}=h,[g,m]=c.getSize(),b=d.map(E=>({x:E[0],y:E[1],value:E[2],radius:E[3]})),_=is(d,E=>E[2]),S=jr(d,E=>E[2]),C=g&&m?CJ(g,m,_,S,b,MJ({gradient:n,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:s},E=>E===void 0),u):{canvas:null};return gn(f.createElement("image",{})).call(Qt,p).style("x",0).style("y",0).style("width",g).style("height",m).style("src",C.canvas).style("transform",v).call(Qt,l).node()}};pL.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const vL={heatmap:pL},gL=e=>(t,n,r,i)=>{const{x:a,y:o,size:s,color:l}=r,c=Array.from(t,u=>{const f=s?+s[u]:40;return[...i.map([+a[u],+o[u]]),l[u],f]});return[[0],[c]]};gL.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:vL,channels:[...xo({shapes:Object.keys(vL)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...Hi(),{type:Wu},{type:Tm}],postInference:[...aa(),...Hc()]};const mL=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];mL.props={};const yL=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];yL.props={};const bL=e=>new Qa(e);bL.props={};const Lm=Symbol("defaultUnknown");function xL(e,t,n){for(let r=0;r<t.length;r+=1)e.has(t[r])||e.set(n(t[r]),r)}function _L(e){const{value:t,from:n,to:r,mapper:i,notFoundReturn:a}=e;let o=i.get(t);if(o===void 0){if(a!==Lm)return a;o=n.push(t)-1,i.set(t,o)}return r[o%r.length]}function wL(e){return e instanceof Date?t=>`${t}`:typeof e=="object"?t=>JSON.stringify(t):t=>t}class Nm extends lp{getDefaultOptions(){return{domain:[],range:[],unknown:Lm}}constructor(t){super(t)}map(t){return this.domainIndexMap.size===0&&xL(this.domainIndexMap,this.getDomain(),this.domainKey),_L({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return this.rangeIndexMap.size===0&&xL(this.rangeIndexMap,this.getRange(),this.rangeKey),_L({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[n]=this.options.domain,[r]=this.options.range;if(this.domainKey=wL(n),this.rangeKey=wL(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new Nm(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:n}=this.options;return this.sortedDomain=n?[...t].sort(n):t,this.sortedDomain}}const SL=e=>new Nm(e);SL.props={};function OL({map:e,initKey:t},n){const r=t(n);return e.has(r)?e.get(r):n}function PJ({map:e,initKey:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function TJ({map:e,initKey:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function AJ(e){return typeof e=="object"?e.valueOf():e}class CL extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=AJ,t!==null)for(const[n,r]of t)this.set(n,r)}get(t){return super.get(OL({map:this.map,initKey:this.initKey},t))}has(t){return super.has(OL({map:this.map,initKey:this.initKey},t))}set(t,n){return super.set(PJ({map:this.map,initKey:this.initKey},t),n)}delete(t){return super.delete(TJ({map:this.map,initKey:this.initKey},t))}}function RJ(e){const t=Math.min(...e);return e.map(n=>n/t)}function IJ(e,t){const n=e.length,r=t-n;return r>0?[...e,...new Array(r).fill(1)]:r<0?e.slice(0,t):e}function LJ(e){return Math.round(e*1e12)/1e12}function NJ(e){const{domain:t,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=e,l=t.length,c=IJ(a,l),[u,f]=n,d=f-u,h=2/l*r+1-1/l*i,p=d/h,v=p*i/l,g=p-l*v,m=RJ(c),b=m.reduce((z,I)=>z+I),_=g/b,S=new CL(t.map((z,I)=>{const L=m[I]*_;return[z,o?Math.floor(L):L]})),O=new CL(t.map((z,I)=>{const F=m[I]*_+v;return[z,o?Math.floor(F):F]})),C=Array.from(O.values()).reduce((z,I)=>z+I),P=(d-(C-C/l*i))*s,T=u+P;let A=o?Math.round(T):T;const R=new Array(l);for(let z=0;z<l;z+=1){R[z]=LJ(A);const I=t[z];A+=O.get(I)}return{valueBandWidth:S,valueStep:O,adjustedRange:R}}function kJ(e){var t;const{domain:n}=e,r=n.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((t=e.flex)===null||t===void 0)&&t.length))return NJ(e);const{range:a,paddingOuter:o,paddingInner:s,round:l,align:c}=e;let u,f,d=a[0];const p=a[1]-d,v=o*2,g=r-s;u=p/Math.max(1,v+g),l&&(u=Math.floor(u)),d+=(p-u*(r-s))*c,f=u*(1-s),l&&(d=Math.round(d),f=Math.round(f));const m=new Array(r).fill(0).map((b,_)=>d+_*u);return{valueStep:u,valueBandWidth:f,adjustedRange:m}}class Yc extends Nm{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Lm,flex:[]}}constructor(t){super(t)}clone(){return new Yc(this.options)}getStep(t){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:t===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:t===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:t,paddingInner:n}=this.options;return t>0?t:n}getPaddingOuter(){const{padding:t,paddingOuter:n}=this.options;return t>0?t:n}rescale(){super.rescale();const{align:t,domain:n,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:l}=kJ({align:t,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:n});this.valueStep=l,this.valueBandWidth=s,this.adjustedRange=o}}const EL=e=>new Yc(e);EL.props={};class km extends lp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:C_}}map(t){return zg(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new km(this.options)}getTicks(){const{domain:t,tickCount:n,tickMethod:r}=this.options,[i,a]=t;return!nd(i)||!nd(a)?[]:r(i,a,n)}}const ML=e=>new km(e);ML.props={};class Yw extends Yc{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Lm,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Yw(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const PL=e=>new Yw(e);PL.props={};var TL=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Vc="\\d\\d?",Uc="\\d\\d",jJ="\\d{3}",DJ="\\d{4}",Lp="[^\\s]+",AL=/\[([^]*?)\]/gm;function RL(e,t){for(var n=[],r=0,i=e.length;r<i;r++)n.push(e[r].substr(0,t));return n}var IL=function(e){return function(t,n){var r=n[e].map(function(a){return a.toLowerCase()}),i=r.indexOf(t.toLowerCase());return i>-1?i:null}};function Yu(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=t;r<i.length;r++){var a=i[r];for(var o in a)e[o]=a[o]}return e}var LL=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],NL=["January","February","March","April","May","June","July","August","September","October","November","December"],FJ=RL(NL,3),BJ=RL(LL,3),kL={dayNamesShort:BJ,dayNames:LL,monthNamesShort:FJ,monthNames:NL,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},jm=Yu({},kL),zJ=function(e){return jm=Yu(jm,e)},jL=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Zo=function(e,t){for(t===void 0&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},ZJ={D:function(e){return String(e.getDate())},DD:function(e){return Zo(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return Zo(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return Zo(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return Zo(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return Zo(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return Zo(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return Zo(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return Zo(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return Zo(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return Zo(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return Zo(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+Zo(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+Zo(Math.floor(Math.abs(t)/60),2)+":"+Zo(Math.abs(t)%60,2)}},DL=function(e){return+e-1},FL=[null,Vc],BL=[null,Lp],zL=["isPm",Lp,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],ZL=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=+t[1]*60+parseInt(t[2],10);return t[0]==="+"?n:-n}return 0}],$J={D:["day",Vc],DD:["day",Uc],Do:["day",Vc+Lp,function(e){return parseInt(e,10)}],M:["month",Vc,DL],MM:["month",Uc,DL],YY:["year",Uc,function(e){var t=new Date,n=+(""+t.getFullYear()).substr(0,2);return+(""+(+e>68?n-1:n)+e)}],h:["hour",Vc,void 0,"isPm"],hh:["hour",Uc,void 0,"isPm"],H:["hour",Vc],HH:["hour",Uc],m:["minute",Vc],mm:["minute",Uc],s:["second",Vc],ss:["second",Uc],YYYY:["year",DJ],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",Uc,function(e){return+e*10}],SSS:["millisecond",jJ],d:FL,dd:FL,ddd:BL,dddd:BL,MMM:["month",Lp,IL("monthNamesShort")],MMMM:["month",Lp,IL("monthNames")],a:zL,A:zL,ZZ:ZL,Z:ZL},Dm={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"},WJ=function(e){return Yu(Dm,e)},$L=function(e,t,n){if(t===void 0&&(t=Dm.default),n===void 0&&(n={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");t=Dm[t]||t;var r=[];t=t.replace(AL,function(a,o){return r.push(o),"@@@"});var i=Yu(Yu({},jm),n);return t=t.replace(TL,function(a){return ZJ[a](e,i)}),t.replace(/@@@/g,function(){return r.shift()})};function GJ(e,t,n){if(n===void 0&&(n={}),typeof t!="string")throw new Error("Invalid format in fecha parse");if(t=Dm[t]||t,e.length>1e3)return null;var r=new Date,i={year:r.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],o=[],s=t.replace(AL,function(S,O){return o.push(jL(O)),"@@@"}),l={},c={};s=jL(s).replace(TL,function(S){var O=$J[S],C=O[0],E=O[1],P=O[3];if(l[C])throw new Error("Invalid format. "+C+" specified twice in format");return l[C]=!0,P&&(c[P]=!0),a.push(O),"("+E+")"}),Object.keys(c).forEach(function(S){if(!l[S])throw new Error("Invalid format. "+S+" is required in specified format")}),s=s.replace(/@@@/g,function(){return o.shift()});var u=e.match(new RegExp(s,"i"));if(!u)return null;for(var f=Yu(Yu({},jm),n),d=1;d<u.length;d++){var h=a[d-1],p=h[0],v=h[2],g=v?v(u[d],f):+u[d];if(g==null)return null;i[p]=g}i.isPm===1&&i.hour!=null&&+i.hour!=12?i.hour=+i.hour+12:i.isPm===0&&+i.hour==12&&(i.hour=0);var m;if(i.timezoneOffset==null){m=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var b=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],d=0,_=b.length;d<_;d++)if(l[b[d][0]]&&i[b[d][0]]!==m[b[d][1]]())return null}else if(m=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return m}var kye={format:$L,parse:GJ,defaultI18n:kL,setGlobalDateI18n:zJ,setGlobalDateMasks:WJ},jye=null;const Np=1e3,kp=Np*60,jp=kp*60,Vu=jp*24,Dp=Vu*7,WL=Vu*30,GL=Vu*365;function no(e,t,n,r){const i=(c,u)=>{const f=h=>r(h)%u===0;let d=u;for(;d&&!f(c);)n(c,-1),d-=1;return c},a=(c,u)=>{u&&i(c,u),t(c)},o=(c,u)=>{const f=new Date(+c);return a(f,u),f},s=(c,u)=>{const f=new Date(+c-1);return a(f,u),n(f,u),a(f),f};return{ceil:s,floor:o,range:(c,u,f,d)=>{const h=[],p=Math.floor(f),v=d?s(c,f):s(c);for(let g=v;g<u;n(g,p),a(g))h.push(new Date(+g));return h},duration:e}}const HJ=no(1,e=>e,(e,t=1)=>{e.setTime(+e+t)},e=>e.getTime()),YJ=no(Np,e=>{e.setMilliseconds(0)},(e,t=1)=>{e.setTime(+e+Np*t)},e=>e.getSeconds()),VJ=no(kp,e=>{e.setSeconds(0,0)},(e,t=1)=>{e.setTime(+e+kp*t)},e=>e.getMinutes()),UJ=no(jp,e=>{e.setMinutes(0,0,0)},(e,t=1)=>{e.setTime(+e+jp*t)},e=>e.getHours()),XJ=no(Vu,e=>{e.setHours(0,0,0,0)},(e,t=1)=>{e.setTime(+e+Vu*t)},e=>e.getDate()-1),HL=no(WL,e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t=1)=>{const n=e.getMonth();e.setMonth(n+t)},e=>e.getMonth()),KJ=no(Dp,e=>{e.setDate(e.getDate()-e.getDay()%7),e.setHours(0,0,0,0)},(e,t=1)=>{e.setDate(e.getDate()+7*t)},e=>{const t=HL.floor(e),n=new Date(+e);return Math.floor((+n-+t)/Dp)}),qJ=no(GL,e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t=1)=>{const n=e.getFullYear();e.setFullYear(n+t)},e=>e.getFullYear()),YL={millisecond:HJ,second:YJ,minute:VJ,hour:UJ,day:XJ,week:KJ,month:HL,year:qJ},JJ=no(1,e=>e,(e,t=1)=>{e.setTime(+e+t)},e=>e.getTime()),QJ=no(Np,e=>{e.setUTCMilliseconds(0)},(e,t=1)=>{e.setTime(+e+Np*t)},e=>e.getUTCSeconds()),eQ=no(kp,e=>{e.setUTCSeconds(0,0)},(e,t=1)=>{e.setTime(+e+kp*t)},e=>e.getUTCMinutes()),tQ=no(jp,e=>{e.setUTCMinutes(0,0,0)},(e,t=1)=>{e.setTime(+e+jp*t)},e=>e.getUTCHours()),nQ=no(Vu,e=>{e.setUTCHours(0,0,0,0)},(e,t=1)=>{e.setTime(+e+Vu*t)},e=>e.getUTCDate()-1),VL=no(WL,e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t=1)=>{const n=e.getUTCMonth();e.setUTCMonth(n+t)},e=>e.getUTCMonth()),rQ=no(Dp,e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7)%7),e.setUTCHours(0,0,0,0)},(e,t=1)=>{e.setTime(+e+Dp*t)},e=>{const t=VL.floor(e),n=new Date(+e);return Math.floor((+n-+t)/Dp)}),iQ=no(GL,e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t=1)=>{const n=e.getUTCFullYear();e.setUTCFullYear(n+t)},e=>e.getUTCFullYear()),UL={millisecond:JJ,second:QJ,minute:eQ,hour:tQ,day:nQ,week:rQ,month:VL,year:iQ};function aQ(e){const t=e?UL:YL,{year:n,month:r,week:i,day:a,hour:o,minute:s,second:l,millisecond:c}=t;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[s,1],[s,5],[s,15],[s,30],[o,1],[o,3],[o,6],[o,12],[a,1],[a,2],[i,1],[r,1],[r,3],[n,1]],year:n,millisecond:c}}function XL(e,t,n,r,i){const a=+e,o=+t,{tickIntervals:s,year:l,millisecond:c}=aQ(i),u=([g,m])=>g.duration*m,f=r?(o-a)/r:n||5,d=r||(o-a)/f,h=s.length,p=m_(s,d,0,h,u);let v;if(p===h){const g=ST(a/l.duration,o/l.duration,f);v=[l,g]}else if(p){const g=d/u(s[p-1])<u(s[p])/d,[m,b]=g?s[p-1]:s[p],_=r?Math.ceil(r/m.duration):b;v=[m,_]}else{const g=Math.max(ST(a,o,f),1);v=[c,g]}return v}const oQ=(e,t,n,r,i)=>{const a=e>t,o=a?t:e,s=a?e:t,[l,c]=XL(o,s,n,r,i),u=l.range(o,new Date(+s+1),c,!0);return a?u.reverse():u},sQ=(e,t,n,r,i)=>{const a=e>t,o=a?t:e,s=a?e:t,[l,c]=XL(o,s,n,r,i),u=[l.floor(o,c),l.ceil(s,c)];return a?u.reverse():u};function lQ(e,t){const{second:n,minute:r,hour:i,day:a,week:o,month:s,year:l}=t;return n.floor(e)<e?".SSS":r.floor(e)<e?":ss":i.floor(e)<e?"hh:mm":a.floor(e)<e?"hh A":s.floor(e)<e?o.floor(e)<e?"MMM DD":"ddd DD":l.floor(e)<e?"MMMM":"YYYY"}function cQ(e){const t=e.getTimezoneOffset(),n=new Date(e);return n.setMinutes(n.getMinutes()+t,n.getSeconds(),n.getMilliseconds()),n}class Vw extends $g{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:oQ,interpolate:id,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return sQ}getTickMethodOptions(){const{domain:t,tickCount:n,tickInterval:r,utc:i}=this.options,a=t[0],o=t[t.length-1];return[a,o,n,r,i]}getFormatter(){const{mask:t,utc:n}=this.options,r=n?UL:YL,i=n?cQ:ku;return a=>$L(i(a),t||lQ(a,r))}clone(){return new Vw(this.options)}}const KL=e=>new Vw(e);KL.props={};const qL=e=>t=>-e(-t),Uw=(e,t)=>{const n=Math.log(e),r=e===Math.E?Math.log:e===10?Math.log10:e===2?Math.log2:i=>Math.log(i)/n;return t?qL(r):r},Xw=(e,t)=>{const n=e===Math.E?Math.exp:r=>oa(e,r);return t?qL(n):n},uQ=(e,t,n,r=10)=>{const i=e<0,a=Xw(r,i),o=Uw(r,i),s=t<e,l=s?t:e,c=s?e:t;let u=o(l),f=o(c),d=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const h=a(u);for(let p=r-1;p>=1;p-=1){const v=h*p;if(v>c)break;v>=l&&d.push(v)}}else for(;u<=f;u+=1){const h=a(u);for(let p=1;p<r;p+=1){const v=h*p;if(v>c)break;v>=l&&d.push(v)}}d.length*2<n&&(d=ju(l,c,n))}else{const h=n===-1?f-u:Math.min(f-u,n);d=ju(u,f,h).map(a)}return s?d.reverse():d},fQ=(e,t,n,r)=>{const i=e<0,a=Uw(r,i),o=Xw(r,i),s=e>t,l=s?t:e,c=s?e:t,u=[o(Math.floor(a(l))),o(Math.ceil(a(c)))];return s?u.reverse():u};class Kw extends $g{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:cp,tickMethod:uQ,tickCount:5}}chooseNice(){return fQ}getTickMethodOptions(){const{domain:t,tickCount:n,base:r}=this.options,i=t[0],a=t[t.length-1];return[i,a,n,r]}chooseTransforms(){const{base:t,domain:n}=this.options,r=n[0]<0;return[Uw(t,r),Xw(t,r)]}clone(){return new Kw(this.options)}}const JL=e=>new Kw(e);JL.props={};const dQ=e=>t=>t<0?-oa(-t,e):oa(t,e),hQ=e=>t=>t<0?-oa(-t,1/e):oa(t,1/e),pQ=e=>e<0?-Math.sqrt(-e):Math.sqrt(e);class Fm extends $g{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:cp,tickMethod:ju,tickCount:5}}constructor(t){super(t)}chooseTransforms(){const{exponent:t}=this.options;if(t===1)return[ku,ku];const n=t===.5?pQ:dQ(t),r=hQ(t);return[n,r]}clone(){return new Fm(this.options)}}const QL=e=>new Fm(e);QL.props={};class qw extends Fm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:cp,tickMethod:ju,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new qw(this.options)}}const eN=e=>new qw(e);eN.props={};const tN=e=>new ad(e);tN.props={};const nN=e=>new Ug(e);nN.props={};const rN=e=>new Vg(e);rN.props={};const vQ=e=>t=>{const n=e(t);return nd(n)?Math.round(n):n};function gQ(e,t){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();const[r]=this.chooseTransforms();this.composeOutput(r,this.chooseClamp(r))},n.prototype.initRange=function(){const{interpolator:r}=this.options;this.options.range=e(r)},n.prototype.composeOutput=function(r,i){const{domain:a,interpolator:o,round:s}=this.getOptions(),l=t(a.map(r)),c=s?vQ(o):o;this.output=rd(c,l,i,r)},n.prototype.invert=void 0}}var mQ=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Jw;function yQ(e){return[e(0),e(1)]}const bQ=e=>{const[t,n]=e;return rd(id(0,1),Bg(t,n))};let Qw=Jw=class extends Qa{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ku,tickMethod:ju,tickCount:5}}constructor(t){super(t)}clone(){return new Jw(this.options)}};Qw=Jw=mQ([gQ(yQ,bQ)],Qw);const iN=e=>new Qw(e);iN.props={};const aN=e=>new dp(e);aN.props={};function eS({colorDefault:e,colorBlack:t,colorWhite:n,colorStroke:r,colorBackground:i,padding1:a,padding2:o,padding3:s,alpha90:l,alpha65:c,alpha45:u,alpha25:f,alpha10:d,category10:h,category20:p,sizeDefault:v=1,padding:g="auto",margin:m=16}){return{padding:g,margin:m,size:v,color:e,category10:h,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:t,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth: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,strokeWidth: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:t,gridStrokeOpacity:d,labelAlign:"horizontal",labelFill:t,labelOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:a,line:!1,lineLineWidth:.5,lineStroke:t,lineStrokeOpacity:u,tickLength:4,tickLineWidth:1,tickStroke:t,tickOpacity:u,titleFill:t,titleOpacity:l,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"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",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",label:!1,tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:t,itemLabelFillOpacity:l,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[a,a],itemValueFill:t,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:t,navButtonFillOpacity:.65,navPageNumFill:t,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:t,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:t,tickStrokeOpacity:.25,rowPadding:a,colPadding:o,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:t,handleLabelFillOpacity:u,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:t,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:t,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:t,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:l,tickStroke:t,tickStrokeOpacity:u},label:{fill:t,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:t,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:t,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:t,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:t,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:t,titleFillOpacity:l,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:t,subtitleFillOpacity:c,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}const xQ=eS({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}),tS=e=>Je({},xQ,e);tS.props={};const oN=e=>Je({},tS(),{category10:"category10",category20:"category20"},e);oN.props={};const _Q=eS({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"#141414",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}),sN=e=>Je({},_Q,{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"}}}},e),lN=e=>Object.assign({},sN(),{category10:"category10",category20:"category20"},e);lN.props={};const wQ=eS({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}),cN=e=>Je({},wQ,{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,n)=>n!==0},axisRight:{gridFilter:(t,n)=>n!==0},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}},e);cN.props={};const uN=e=>(...t)=>{const n=kc(Object.assign({},{crossPadding:50},e))(...t);return LT(n,e),n};uN.props=Object.assign(Object.assign({},kc.props),{defaultPosition:"bottom"});function zye(){}const fN=e=>(...t)=>{const n=kc(Object.assign({},{crossPadding:10},e))(...t);return LT(n,e),n};fN.props=Object.assign(Object.assign({},kc.props),{defaultPosition:"left"});var nS=function(){},SQ=function(e,t,n){var r=e,i=xi(t)?t.split("."):t;return i.forEach(function(a,o){o<i.length-1?(bu(r[a])||(r[a]=Gi(i[o+1])?[]:{}),r=r[a]):r[a]=n}),e};function OQ(e,t){return e.reduce(function(n,r){return(n[r[t]]=n[r[t]]||[]).push(r),n},{})}function CQ(e){var t;return((t=e[0])===null||t===void 0?void 0:t.map(function(n,r){return e.map(function(i){return i[r]})}))||[]}var Ps=Ss({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"),EQ=function(e){zt(t,e);function t(n){var r=e.call(this,n,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:lH(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return r.playState="idle",r.contentGroup=r.appendChild(new xa({class:Ps.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new xa({class:Ps.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(t.prototype,"defaultPage",{get:function(){var n=this.attributes.defaultPage;return Ri(n,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageShape",{get:function(){var n=this.pageViews,r=w(CQ(n.map(function(f){var d=f.getBBox(),h=d.width,p=d.height;return[h,p]})).map(function(f){return Math.max.apply(Math,N([],w(f),!1))}),2),i=r[0],a=r[1],o=this.attributes,s=o.pageWidth,l=s===void 0?i:s,c=o.pageHeight,u=c===void 0?a:c;return{pageWidth:l,pageHeight:u}},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(t.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n=e.prototype.getBBox.call(this),r=n.x,i=n.y,a=this.controllerShape,o=this.pageShape,s=o.pageWidth,l=o.pageHeight;return new ui(r,i,s+a.width,l)},t.prototype.goTo=function(n){var r=this,i=this.attributes.animate,a=this,o=a.currPage,s=a.playState,l=a.playWindow,c=a.pageViews;if(s!=="idle"||n<0||c.length<=0||n>=c.length)return null;c[o].setLocalPosition(0,0),this.prepareFollowingPage(n);var u=w(this.getFollowingPageDiff(n),2),f=u[0],d=u[1];this.playState="running";var h=PP(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return Qf(h,function(){r.innerCurrPage=n,r.playState="idle",r.setVisiblePages([n]),r.updatePageInfo()}),h},t.prototype.prev=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i<=0)return null;var a=n?(i-1+r)%r:Ri(i-1,0,r);return this.goTo(a)},t.prototype.next=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i>=r-1)return null;var a=n?(i+1)%r:Ri(i+1,0,r);return this.goTo(a)},t.prototype.renderClipPath=function(n){var r=this.pageShape,i=r.pageWidth,a=r.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=n.maybeAppendByClassName(Ps.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},t.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(r,i){n.includes(i)?tp(r):Nc(r)})},t.prototype.adjustControllerLayout=function(){var n=this,r=n.prevBtnGroup,i=n.nextBtnGroup,a=n.pageInfoGroup,o=this.attributes,s=o.orientation,l=o.controllerPadding,c=a.getBBox(),u=c.width,f=c.height,d=w(s==="horizontal"?[-180,0]:[-90,90],2),h=d[0],p=d[1];r.setLocalEulerAngles(h),i.setLocalEulerAngles(p);var v=r.getBBox(),g=v.width,m=v.height,b=i.getBBox(),_=b.width,S=b.height,O=Math.max(g,u,_),C=s==="horizontal"?{offset:[[0,0],[g/2+l,0],[g+u+l*2,0]],textAlign:"start"}:{offset:[[O/2,-m-l],[O/2,0],[O/2,S+l]],textAlign:"center"},E=w(C.offset,3),P=w(E[0],2),T=P[0],A=P[1],R=w(E[1],2),z=R[0],I=R[1],L=w(E[2],2),F=L[0],Z=L[1],H=C.textAlign,W=a.querySelector("text");W&&(W.style.textAlign=H),r.setLocalPosition(T,A),a.setLocalPosition(z,I),i.setLocalPosition(F,Z)},t.prototype.updatePageInfo=function(){var n,r=this,i=r.currPage,a=r.pageViews,o=r.attributes.formatter;a.length<2||((n=this.pageInfoGroup.querySelector(Ps.pageInfo.class))===null||n===void 0||n.attr("text",o(i+1,a.length)),this.adjustControllerLayout())},t.prototype.getFollowingPageDiff=function(n){var r=this.currPage;if(r===n)return[0,0];var i=this.attributes.orientation,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,l=n<r?-1:1;return i==="horizontal"?[l*o,0]:[0,l*s]},t.prototype.prepareFollowingPage=function(n){var r=this,i=r.currPage,a=r.pageViews;if(this.setVisiblePages([n,i]),n!==i){var o=w(this.getFollowingPageDiff(n),2),s=o[0],l=o[1];a[n].setLocalPosition(s,l)}},t.prototype.renderController=function(n){var r=this,i=this.attributes.controllerSpacing,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,l=this.pageViews.length>=2,c=n.maybeAppendByClassName(Ps.controller,"g");if(Mg(c.node(),l),!!l){var u=Jn(this.attributes,"button"),f=Jn(this.attributes,"pageNum"),d=w(Gl(u),2),h=d[0],p=d[1],v=h.size,g=Sr(h,["size"]),m=!c.select(Ps.prevBtnGroup.class).node(),b=c.maybeAppendByClassName(Ps.prevBtnGroup,"g").styles(p);this.prevBtnGroup=b.node();var _=b.maybeAppendByClassName(Ps.prevBtn,"path"),S=c.maybeAppendByClassName(Ps.nextBtnGroup,"g").styles(p);this.nextBtnGroup=S.node();var O=S.maybeAppendByClassName(Ps.nextBtn,"path");[_,O].forEach(function(E){E.styles(Ie(Ie({},g),{transformOrigin:"center"})),o_(E.node(),v,!0)});var C=c.maybeAppendByClassName(Ps.pageInfoGroup,"g");this.pageInfoGroup=C.node(),C.maybeAppendByClassName(Ps.pageInfo,"text").styles(f),this.updatePageInfo(),c.node().setLocalPosition(o+i,s/2),m&&(this.prevBtnGroup.addEventListener("click",function(){r.prev()}),this.nextBtnGroup.addEventListener("click",function(){r.next()}))}},t.prototype.render=function(n,r){var i=Tn(r);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},t.prototype.bindEvents=function(){var n=this,r=qM(function(){return n.render(n.attributes,n)},50);this.playWindow.addEventListener(vn.INSERTED,r),this.playWindow.addEventListener(vn.REMOVED,r)},t}(Ra),as=Ss({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function MQ(e){var t=e.querySelector(as.marker.class);return t?t.style:{}}var PQ=function(e){zt(t,e);function t(n){return e.call(this,n,{span:[1,1],marker:function(){return new Mu({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(t.prototype,"showValue",{get:function(){var n=this.attributes.valueText;return n?typeof n=="string"||typeof n=="number"?n!=="":typeof n=="function"?!0:n.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actualSpace",{get:function(){var n=this.labelGroup,r=this.valueGroup,i=this.attributes.markerSize,a=n.node().getBBox(),o=a.width,s=a.height,l=r.node().getBBox(),c=l.width,u=l.height;return{markerWidth:i,labelWidth:o,valueWidth:c,height:Math.max(i,s,u)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"span",{get:function(){var n=this.attributes.span;if(!n)return[1,1];var r=w(Ga(n),2),i=r[0],a=r[1],o=this.showValue?a:0,s=i+o;return[i/s,o/s]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shape",{get:function(){var n,r=this.attributes,i=r.markerSize,a=r.width,o=this.actualSpace,s=o.markerWidth,l=o.height,c=this.actualSpace,u=c.labelWidth,f=c.valueWidth,d=w(this.spacing,2),h=d[0],p=d[1];if(a){var v=a-i-h-p,g=w(this.span,2),m=g[0],b=g[1];n=w([m*v,b*v],2),u=n[0],f=n[1]}var _=s+u+f+h+p;return{width:_,height:l,markerWidth:s,labelWidth:u,valueWidth:f}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){var n=this.attributes.spacing;if(!n)return[0,0];var r=w(Ga(n),2),i=r[0],a=r[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){var n=this.shape,r=n.markerWidth,i=n.labelWidth,a=n.valueWidth,o=n.width,s=n.height,l=w(this.spacing,2),c=l[0],u=l[1];return{height:s,width:o,markerWidth:r,labelWidth:i,valueWidth:a,position:[r/2,r+c,r+i+c+u]}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleSize",{get:function(){var n=MQ(this.markerGroup.node()),r=this.attributes,i=r.markerSize,a=r.markerStrokeWidth,o=a===void 0?n.strokeWidth:a,s=r.markerLineWidth,l=s===void 0?n.lineWidth:s,c=r.markerStroke,u=c===void 0?n.stroke:c,f=+(o||l||(u?1:0))*Math.sqrt(2),d=this.markerGroup.node().getBBox(),h=d.width,p=d.height;return(1-f/Math.max(h,p))*i},enumerable:!1,configurable:!0}),t.prototype.renderMarker=function(n){var r=this,i=this.attributes.marker,a=Jn(this.attributes,"marker");this.markerGroup=n.maybeAppendByClassName(as.markerGroup,"g").style("zIndex",0),zo(!!i,this.markerGroup,function(){var o,s=r.markerGroup.node(),l=(o=s.childNodes)===null||o===void 0?void 0:o[0],c=typeof i=="string"?new Pr({style:{symbol:i},className:as.marker.name}):i();l?c.nodeName===l.nodeName?l instanceof Pr?l.update(Ie(Ie({},a),{symbol:i})):(eW(l,c),Tn(l).styles(a)):(l.remove(),Tn(c).attr("className",as.marker.name).styles(a),s.appendChild(c)):(c instanceof Pr||Tn(c).attr("className",as.marker.name).styles(a),s.appendChild(c)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]),o_(r.markerGroup.node(),r.scaleSize,!0)})},t.prototype.renderLabel=function(n){var r=Jn(this.attributes,"label"),i=r.text,a=Sr(r,["text"]);this.labelGroup=n.maybeAppendByClassName(as.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(as.label,function(){return Nu(i)}).styles(a)},t.prototype.renderValue=function(n){var r=this,i=Jn(this.attributes,"value"),a=i.text,o=Sr(i,["text"]);this.valueGroup=n.maybeAppendByClassName(as.valueGroup,"g").style("zIndex",0),zo(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(as.value,function(){return Nu(a)}).styles(o)})},t.prototype.renderBackground=function(n){var r=this.shape,i=r.width,a=r.height,o=Jn(this.attributes,"background");this.background=n.maybeAppendByClassName(as.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(as.background,"rect").styles(Ie({width:i,height:a},o))},t.prototype.adjustLayout=function(){var n=this.layout,r=n.labelWidth,i=n.valueWidth,a=n.height,o=w(n.position,3),s=o[0],l=o[1],c=o[2],u=a/2;this.markerGroup.styles({x:s,y:u}),this.labelGroup.styles({x:l,y:u}),u_(this.labelGroup.select(as.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({x:c,y:u}),u_(this.valueGroup.select(as.value.class).node(),Math.ceil(i)))},t.prototype.render=function(n,r){var i=Tn(r);this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},t}(Ra),Uu=Ss({page:"item-page",navigator:"navigator",item:"item"},"items"),dN=function(e,t,n){return n===void 0&&(n=!0),e?t(e):n},TQ=function(e){zt(t,e);function t(n){var r=e.call(this,n,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:nS,mouseenter:nS,mouseleave:nS})||this;return r.navigatorShape=[0,0],r}return Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grid",{get:function(){var n=this.attributes,r=n.gridRow,i=n.gridCol,a=n.data;if(!r&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return r&&i?[r,i]:r?[r,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderData",{get:function(){var n=this.attributes,r=n.data,i=n.layout,a=Jn(this.attributes,"item"),o=r.map(function(s,l){var c=s.id,u=c===void 0?l:c,f=s.label,d=s.value;return{id:"".concat(u),index:l,style:Ie({layout:i,labelText:f,valueText:d},Object.fromEntries(Object.entries(a).map(function(h){var p=w(h,2),v=p[0],g=p[1];return[v,Os(g,[s,l,r])]})))}});return o},enumerable:!1,configurable:!0}),t.prototype.getGridLayout=function(){var n=this,r=this.attributes,i=r.orientation,a=r.width,o=r.rowPadding,s=r.colPadding,l=w(this.navigatorShape,1),c=l[0],u=w(this.grid,2),f=u[0],d=u[1],h=d*f,p=0;return this.pageViews.children.map(function(v,g){var m,b,_=Math.floor(g/h),S=g%h,O=n.ifHorizontal(d,f),C=[Math.floor(S/O),S%O];i==="vertical"&&C.reverse();var E=w(C,2),P=E[0],T=E[1],A=(a-c-(d-1)*s)/d,R=v.getBBox().height,z=w([0,0],2),I=z[0],L=z[1];return i==="horizontal"?(m=w([p,P*(R+o)],2),I=m[0],L=m[1],p=T===d-1?0:p+A+s):(b=w([T*(A+s),p],2),I=b[0],L=b[1],p=P===f-1?0:p+R+o),{page:_,index:g,row:P,col:T,pageIndex:S,width:A,height:R,x:I,y:L}})},t.prototype.getFlexLayout=function(){var n=this.attributes,r=n.width,i=n.height,a=n.rowPadding,o=n.colPadding,s=w(this.navigatorShape,1),l=s[0],c=w(this.grid,2),u=c[0],f=c[1],d=w([r-l,i],2),h=d[0],p=d[1],v=w([0,0,0,0,0,0,0,0],8),g=v[0],m=v[1],b=v[2],_=v[3],S=v[4],O=v[5],C=v[6],E=v[7];return this.pageViews.children.map(function(P,T){var A,R,z,I,L=P.getBBox(),F=L.width,Z=L.height,H=C===0?0:o,W=C+H+F;if(W<=h&&dN(S,function(J){return J<f}))return A=w([C+H,E,W],3),g=A[0],m=A[1],C=A[2],{width:F,height:Z,x:g,y:m,page:b,index:T,pageIndex:_++,row:O,col:S++};R=w([O+1,0,0,E+Z+a],4),O=R[0],S=R[1],C=R[2],E=R[3];var G=E+Z;return G<=p&&dN(O,function(J){return J<u})?(z=w([C,E,F],3),g=z[0],m=z[1],C=z[2],{width:F,height:Z,x:g,y:m,page:b,index:T,pageIndex:_++,row:O,col:S++}):(I=w([0,0,F,0,b+1,0,0,0],8),g=I[0],m=I[1],C=I[2],E=I[3],b=I[4],_=I[5],O=I[6],S=I[7],{width:F,height:Z,x:g,y:m,page:b,index:T,pageIndex:_++,row:O,col:S++})})},Object.defineProperty(t.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var n=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,r=n.call(this);return r.slice(-1)[0].page>0?(this.navigatorShape=[55,0],n.call(this)):r},enumerable:!1,configurable:!0}),t.prototype.ifHorizontal=function(n,r){var i=this.attributes.orientation;return ul(i,n,r)},t.prototype.flattenPage=function(n){n.querySelectorAll(Uu.item.class).forEach(function(r){n.appendChild(r)}),n.querySelectorAll(Uu.page.class).forEach(function(r){var i=n.removeChild(r);i.destroy()})},t.prototype.renderItems=function(n){var r=this.attributes,i=r.click,a=r.mouseenter,o=r.mouseleave;this.flattenPage(n);var s=this.dispatchCustomEvent.bind(this);Tn(n).selectAll(Uu.item.class).data(this.renderData,function(l){return l.id}).join(function(l){return l.append(function(c){var u=c.style;return new PQ({style:u})}).attr("className",Uu.item.name).on("click",function(){i==null||i(this),s("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),s("itemMouseenter",{item:this})}).on("pointerleave",function(){o==null||o(this),s("itemMouseleave",{item:this})})},function(l){return l.each(function(c){var u=c.style;this.update(u)})},function(l){return l.remove()})},t.prototype.relayoutNavigator=function(){var n,r=this.attributes,i=r.layout,a=r.width,o=((n=this.pageViews.children[0])===null||n===void 0?void 0:n.getBBox().height)||0,s=w(this.navigatorShape,2),l=s[0],c=s[1];this.navigator.update(i==="grid"?{pageWidth:a-l,pageHeight:o-c}:{})},t.prototype.adjustLayout=function(){var n=this,r=Object.entries(OQ(this.itemsLayout,"page")).map(function(a){var o=w(a,2),s=o[0],l=o[1];return{page:s,layouts:l}}),i=N([],w(this.navigator.getContainer().children),!1);r.forEach(function(a){var o=a.layouts,s=n.pageViews.appendChild(new xa({className:Uu.page.name}));o.forEach(function(l){var c=l.x,u=l.y,f=l.index,d=l.width,h=l.height,p=i[f];s.appendChild(p),SQ(p,"__layout__",l),p.update({x:c,y:u,width:d,height:h})})}),this.relayoutNavigator()},t.prototype.renderNavigator=function(n){var r=this.attributes.orientation,i=Jn(this.attributes,"nav"),a=$l({orientation:r},i),o=this;return n.selectAll(Uu.navigator.class).data(["nav"]).join(function(s){return s.append(function(){return new EQ({style:a})}).attr("className",Uu.navigator.name).each(function(){o.navigator=this})},function(s){return s.each(function(){this.update(a)})},function(s){return s.remove()}),this.navigator},t.prototype.getBBox=function(){return this.navigator.getBBox()},t.prototype.render=function(n,r){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(Tn(r));this.renderItems(a.getContainer()),this.adjustLayout()}},t.prototype.dispatchCustomEvent=function(n,r){var i=new Gr(n,{detail:r});this.dispatchEvent(i)},t}(Ra),AQ=function(e){zt(t,e);function t(n){return e.call(this,n,mH)||this}return t.prototype.renderTitle=function(n,r,i){var a=this.attributes,o=a.showTitle,s=a.titleText,l=Jn(this.attributes,"title"),c=w(Gl(l),2),u=c[0],f=c[1];this.titleGroup=n.maybeAppendByClassName(Ia.titleGroup,"g").styles(f);var d=Ie(Ie({width:r,height:i},u),{text:o?s:""});this.title=this.titleGroup.maybeAppendByClassName(Ia.title,function(){return new sT({style:d})}).update(d)},t.prototype.renderItems=function(n,r){var i=r.x,a=r.y,o=r.width,s=r.height,l=Jn(this.attributes,"title",!0),c=w(Gl(l),2),u=c[0],f=c[1],d=Ie(Ie({},u),{width:o,height:s,x:0,y:0});this.itemsGroup=n.maybeAppendByClassName(Ia.itemsGroup,"g").styles(Ie({x:i,y:a},f));var h=this;this.itemsGroup.selectAll(Ia.items.class).data(["items"]).join(function(p){return p.append(function(){return new TQ({style:d})}).attr("className",Ia.items.name).each(function(){h.items=Tn(this)})},function(p){return p.update(d)},function(p){return p.remove()})},t.prototype.adjustLayout=function(){var n=this.attributes.showTitle;if(n){var r=this.title.node().getAvailableSpace(),i=r.x,a=r.y;this.itemsGroup.node().setLocalPosition(i,a)}},Object.defineProperty(t.prototype,"availableSpace",{get:function(){var n=this.attributes,r=n.showTitle,i=n.width,a=n.height;return r?this.title.node().getAvailableSpace():new ui(0,0,i,a)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n,r,i=(n=this.title)===null||n===void 0?void 0:n.node(),a=(r=this.items)===null||r===void 0?void 0:r.node();return!i||!a?e.prototype.getBBox.call(this):_W(i,a)},t.prototype.render=function(n,r){var i=n.width,a=n.height,o=Tn(r);this.renderTitle(o,i,a),this.renderItems(o,this.availableSpace),this.adjustLayout()},t}(Ra);function Fp(e){if(qh(e)){var t=e;return t[t.length-1]}}var RQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function IQ(e,t){const n=ll(e,"shape"),r=ll(e,"color"),i=n?n.clone():null,a=[];for(const[s,l]of t){const c=s.type,f=((r==null?void 0:r.getOptions().domain.length)>0?r==null?void 0:r.getOptions().domain:l.data).map((d,h)=>{var p;return i?i.map(d||"point"):((p=s==null?void 0:s.style)===null||p===void 0?void 0:p.shape)||l.defaultShape||"point"});typeof c=="string"&&a.push([c,f])}if(a.length===0)return["point",["point"]];if(a.length===1||!n)return a[0];const{range:o}=n.getOptions();return a.map(([s,l])=>{let c=0;for(let u=0;u<a.length;u++){const f=o[u%o.length];l[u]===f&&c++}return[c/l.length,[s,l]]}).sort((s,l)=>l[0]-s[0])[0][1]}function LQ(e,t){const{scales:n,library:r,markState:i}=t,[a,o]=IQ(n,i),{itemMarker:s,itemMarkerSize:l}=e,c=(d,h)=>{var p,v,g;const m=((g=(v=(p=r[`mark.${a}`])===null||p===void 0?void 0:p.props)===null||v===void 0?void 0:v.shape[d])===null||g===void 0?void 0:g.props.defaultMarker)||Fp(d.split(".")),b=typeof l=="function"?l(h):l;return()=>Hq(m,{color:h.color})(0,0,b)},u=d=>`${o[d]}`;return ll(n,"shape")&&!s?(d,h)=>c(u(h),d):typeof s=="function"?(d,h)=>{const p=s(d.id,h);return typeof p=="string"?c(p,d):p}:(d,h)=>c(s||u(h),d)}function NQ(e){const t=ll(e,"opacity");if(t){const{range:n}=t.getOptions();return(r,i)=>n[i]}}function kQ(e,t){const n=ll(e,"size");return n instanceof km?n.map(NaN)*2:t}function jQ(e,t){const{labelFormatter:n=d=>`${d}`}=e,{scales:r,theme:i}=t,a=i.legendCategory.itemMarkerSize,o=kQ(r,a),s={itemMarker:LQ(Object.assign(Object.assign({},e),{itemMarkerSize:o}),t),itemMarkerSize:o,itemMarkerOpacity:NQ(r)},l=typeof n=="string"?Ic(n):n,c=ll(r,"color"),u=CG(r),f=c?d=>c.map(d):()=>t.theme.color;return Object.assign(Object.assign({},s),{data:u.map(d=>({id:d,label:l(d),color:f(d)}))})}function DQ(e,t,n){const{position:r}=t;if(r==="center"){const{bbox:o}=e,{width:s,height:l}=o;return{width:s,height:l}}const{width:i,height:a}=RT(e,t,n);return{width:i,height:a}}const rS=e=>{const{labelFormatter:t,layout:n,order:r,orientation:i,position:a,size:o,title:s,cols:l,itemMarker:c}=e,u=RQ(e,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=u;return d=>{const{value:h,theme:p}=d,{bbox:v}=h,{width:g,height:m}=DQ(h,e,rS),b=TT(a,n),_=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(a)?"vertical":"horizontal",width:g,height:m,layout:l!==void 0?"grid":"flex"},l!==void 0&&{gridCol:l}),f!==void 0&&{gridRow:f}),{titleText:Wg(s)}),jQ(e,d)),{legendCategory:S={}}=p,O=Gg(Object.assign({},S,_,u)),C=new wG({style:Object.assign(Object.assign({x:v.x,y:v.y,width:v.width,height:v.height},b),{subOptions:O})});return C.appendChild(new AQ({className:"legend-category",style:O})),C}};rS.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const hN=e=>()=>new xa;hN.props={};var FQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function pN(e,t,n,r){switch(r){case"center":return{x:e+n/2,y:t,textAlign:"middle"};case"right":return{x:e+n,y:t,textAlign:"right"};default:return{x:e,y:t,textAlign:"left"}}}const BQ=_G({render(e,t){const{width:n,title:r,subtitle:i,spacing:a=2,align:o="left"}=e,s=FQ(e,["width","title","subtitle","spacing","align"]),l=Tt(s,"title"),c=Tt(s,"subtitle"),f=PT(t,".title","text").attr("className","title").call(Qt,Object.assign(Object.assign(Object.assign({},pN(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),l)).node().getLocalBounds();PT(t,".sub-title","text").attr("className","sub-title").call(d=>{if(!i)return d.node().remove();d.node().attr(Object.assign(Object.assign(Object.assign({},pN(0,f.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),c))})}}),vN=e=>({value:t,theme:n})=>{const{x:r,y:i,width:a,height:o}=t.bbox;return new BQ({style:Je({},n.title,Object.assign({x:r,y:i,width:a,height:o},e))})};vN.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};var iS=function(e){if(typeof e!="object"||e===null)return e;var t;if(ua(e)){t=[];for(var n=0,r=e.length;n<r;n++)typeof e[n]=="object"&&e[n]!=null?t[n]=iS(e[n]):t[n]=e[n]}else{t={};for(var i in e)typeof e[i]=="object"&&e[i]!=null?t[i]=iS(e[i]):t[i]=e[i]}return t},aS=iS,zQ=function(e){zt(t,e);function t(n){var r=this,i=n.style,a=Sr(n,["style"]);return r=e.call(this,Je({},{type:"column"},Ie({style:i},a)))||this,r.columnsGroup=new xa({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return t.prototype.render=function(){var n=this.attributes.columns;Tn(this.columnsGroup).selectAll(".column").data(n.flat()).join(function(r){return r.append("rect").attr("className","column").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},t.prototype.update=function(n){this.attr($l({},this.attributes,n)),this.render()},t.prototype.clear=function(){this.removeChildren()},t}(qa),ZQ=function(e){zt(t,e);function t(n){var r=this,i=n.style,a=Sr(n,["style"]);return r=e.call(this,Je({},{type:"lines"},Ie({style:i},a)))||this,r.linesGroup=r.appendChild(new xa),r.areasGroup=r.appendChild(new xa),r.render(),r}return t.prototype.render=function(){var n=this.attributes,r=n.lines,i=n.areas;r&&this.renderLines(r),i&&this.renderAreas(i)},t.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},t.prototype.update=function(n){this.attr($l({},this.attributes,n)),this.render()},t.prototype.renderLines=function(n){Tn(this.linesGroup).selectAll(".line").data(n).join(function(r){return r.append("path").attr("className","line").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},t.prototype.renderAreas=function(n){Tn(this.linesGroup).selectAll(".area").data(n).join(function(r){return r.append("path").attr("className","area").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.style(i)})},function(r){return r.remove()})},t}(qa);function $Q(e,t,n,r){var i,a=[],o=!!r,s,l,c=[1/0,1/0],u=[-1/0,-1/0],f,d,h;if(o){i=w(r,2),c=i[0],u=i[1];for(var p=0,v=e.length;p<v;p+=1){var g=e[p];c=Iu(c,g),u=Lu(u,g)}}for(var p=0,m=e.length;p<m;p+=1){var g=e[p];if(p===0&&!n)h=g;else if(p===m-1&&!n)d=g,a.push(h),a.push(d);else{var b=[p?p-1:m-1,p-1][n?0:1];s=e[b],l=e[n?(p+1)%m:p+1];var _=[0,0];_=n_(l,s),_=Wl(_,t);var S=rp(g,s),O=rp(g,l),C=S+O;C!==0&&(S/=C,O/=C);var E=Wl(_,-S),P=Wl(_,O);d=np(g,E),f=np(g,P),f=Iu(f,Lu(l,g)),f=Lu(f,Iu(l,g)),E=n_(f,g),E=Wl(E,-S/O),d=np(g,E),d=Iu(d,Lu(s,g)),d=Lu(d,Iu(s,g)),P=n_(g,d),P=Wl(P,O/S),f=np(g,P),o&&(d=Lu(d,c),d=Iu(d,u),f=Lu(f,c),f=Iu(f,u)),a.push(h),a.push(d),h=f}}return n&&a.push(a.shift()),a}function WQ(e,t,n){var r;t===void 0&&(t=!1),n===void 0&&(n=[[0,0],[1,1]]);for(var i=!!t,a=[],o=0,s=e.length;o<s;o+=2)a.push([e[o],e[o+1]]);for(var l=$Q(a,.4,i,n),c=a.length,u=[],f,d,h,o=0;o<c-1;o+=1)f=l[o*2],d=l[o*2+1],h=a[o+1],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]]);return i&&(f=l[c],d=l[c+1],r=w(a,1),h=r[0],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]])),u}function GQ(e,t){var n,r=t.x,i=t.y,a=w(i.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(n=w([o,s],2),s=n[0],o=n[1]),e.map(function(l){var c=l.map(function(u,f){return[r.map(f),Ri(i.map(u),s,o)]});return c})}function Bp(e,t){t===void 0&&(t=!1);var n=t?e.length-1:0,r=e.map(function(i,a){return N([a===n?"M":"L"],w(i),!1)});return t?r.reverse():r}function Bm(e,t){if(t===void 0&&(t=!1),e.length<=2)return Bp(e);for(var n=[],r=e.length,i=0;i<r;i+=1){var a=t?e[r-i-1]:e[i];yP(a,n.slice(-2))||n.push.apply(n,N([],w(a),!1))}var o=WQ(n,!1);return t?o.unshift(N(["M"],w(e[r-1]),!1)):o.unshift(N(["M"],w(e[0]),!1)),o}function oS(e,t,n){var r=aS(e);return r.push(["L",t,n],["L",0,n],["Z"]),r}function HQ(e,t,n,r){return e.map(function(i){return oS(t?Bm(i):Bp(i),n,r)})}function YQ(e,t,n){for(var r=[],i=e.length-1;i>=0;i-=1){var a=e[i],o=Bp(a),s=void 0;if(i===0)s=oS(o,t,n);else{var l=e[i-1],c=Bp(l,!0);c[0][0]="L",s=N(N(N([],w(o),!1),w(c),!1),[["Z"]],!1)}r.push(s)}return r}function VQ(e,t,n){for(var r=[],i=e.length-1;i>=0;i-=1){var a=e[i],o=Bm(a),s=void 0;if(i===0)s=oS(o,t,n);else{var l=e[i-1],c=Bm(l,!0),u=a[0];c[0][0]="L",s=N(N(N([],w(o),!1),w(c),!1),[N(["M"],w(u),!1),["Z"]],!1)}r.push(s)}return r}var UQ=function(e,t){if(ua(e)){for(var n,r=1/0,i=0;i<e.length;i++){var a=e[i],o=bo(t)?t(a):a[t];o<r&&(n=a,r=o)}return n}},XQ=function(e,t){if(ua(e)){for(var n,r=-1/0,i=0;i<e.length;i++){var a=e[i],o=bo(t)?t(a):a[t];o>r&&(n=a,r=o)}return n}};function gN(e){return e.length===0?[0,0]:[kv(UQ(e,function(t){return kv(t)||0})),jv(XQ(e,function(t){return jv(t)||0}))]}function mN(e){for(var t=aS(e),n=t[0].length,r=w([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],a=r[1],o=0;o<t.length;o+=1)for(var s=t[o],l=0;l<n;l+=1)s[l]>=0?(s[l]+=i[l],i[l]=s[l]):(s[l]+=a[l],a[l]=s[l]);return t}var KQ=function(e){zt(t,e);function t(n){return e.call(this,n,{type:"line",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 Object.defineProperty(t.prototype,"rawData",{get:function(){var n=this.attributes.data;if(!n||(n==null?void 0:n.length)===0)return[[]];var r=aS(n);return Gi(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.attributes.isStack?mN(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseline",{get:function(){var n=this.scales.y,r=w(n.getOptions().domain||[0,0],2),i=r[0],a=r[1];return a<0?n.map(a):n.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerShape",{get:function(){var n=this.attributes,r=n.width,i=n.height;return{width:r,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linesStyle",{get:function(){var n=this,r=this.attributes,i=r.type,a=r.isStack,o=r.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var s=Jn(this.attributes,"area"),l=Jn(this.attributes,"line"),c=this.containerShape.width,u=this.data;if(u[0].length===0)return{lines:[],areas:[]};var f=this.scales,d=f.x,h=f.y,p=GQ(u,{type:"line",x:d,y:h}),v=[];if(s){var g=this.baseline;a?v=o?VQ(p,c,g):YQ(p,c,g):v=HQ(p,o,c,g)}return{lines:p.map(function(m,b){return Ie({stroke:n.getColor(b),path:o?Bm(m):Bp(m)},l)}),areas:v.map(function(m,b){return Ie({path:m,fill:n.getColor(b)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnsStyle",{get:function(){var n=this,r=Jn(this.attributes,"column"),i=this.attributes,a=i.isStack,o=i.type,s=i.scale;if(o!=="column")throw new Error("columnsStyle can only be used in column type");var l=this.containerShape.height,c=this.rawData;if(!c)return{columns:[]};a&&(c=mN(c));var u=this.createScales(c),f=u.x,d=u.y,h=w(gN(c),2),p=h[0],v=h[1],g=new Qa({domain:[0,v-(p>0?0:p)],range:[0,l*s]}),m=f.getBandWidth(),b=this.rawData;return{columns:c.map(function(_,S){return _.map(function(O,C){var E=m/c.length,P=function(){return{x:f.map(C)+E*S,y:O>=0?d.map(O):d.map(0),width:E,height:g.map(Math.abs(O))}},T=function(){return{x:f.map(C),y:d.map(O),width:m,height:g.map(b[S][C])}};return Ie(Ie({fill:n.getColor(S)},r),a?T():P())})})}},enumerable:!1,configurable:!0}),t.prototype.render=function(n,r){f$(r,".container","rect").attr("className","container").node();var i=n.type,a="spark".concat(i),o=i==="line"?this.linesStyle:this.columnsStyle;Tn(r).selectAll(".spark").data([i]).join(function(s){return s.append(function(l){return l==="line"?new ZQ({className:a,style:o}):new zQ({className:a,style:o})}).attr("className","spark ".concat(a))},function(s){return s.update(o)},function(s){return s.remove()})},t.prototype.getColor=function(n){var r=this.attributes.color;return ua(r)?r[n%r.length]:bo(r)?r.call(null,n):r},t.prototype.createScales=function(n){var r,i,a=this.attributes,o=a.type,s=a.scale,l=a.range,c=l===void 0?[]:l,u=a.spacing,f=this.containerShape,d=f.width,h=f.height,p=w(gN(n),2),v=p[0],g=p[1],m=new Qa({domain:[(r=c[0])!==null&&r!==void 0?r:v,(i=c[1])!==null&&i!==void 0?i:g],range:[h,h*(1-s)]});return o==="line"?{type:o,x:new Qa({domain:[0,n[0].length-1],range:[0,d]}),y:m}:{type:o,x:new Yc({domain:n[0].map(function(b,_){return _}),range:[0,d],paddingInner:u,paddingOuter:u/2,align:.5}),y:m}},t.tag="sparkline",t}(Ra),yN=function(e){zt(t,e);function t(n){var r=e.call(this,n,Ie(Ie(Ie({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.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},sl(ZT,"handle")),sl(BT,"handleIcon")),sl(zT,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(Yg(a));var o=r.availableSpace,s=o.x,l=o.y,c=r.getBBox(),u=c.x,f=c.y;r.selectionStartPos=r.getRatio(r.prevPos-r.getOrientVal([s,l])-r.getOrientVal([+u,+f])),r.selectionWidth=0,document.addEventListener("pointermove",r.onDragging),document.addEventListener("pointerup",r.onDragEnd)}},r.onDragging=function(i){var a=r.attributes,o=a.slidable,s=a.brushable,l=a.type;i.stopPropagation();var c=r.getOrientVal(Yg(i)),u=c-r.prevPos;if(u){var f=r.getRatio(u);switch(r.target){case"start":o&&r.setValuesOffset(f);break;case"end":o&&r.setValuesOffset(0,f);break;case"selection":o&&r.setValuesOffset(f,f);break;case"track":if(!s)return;r.selectionWidth+=f,l==="range"?r.innerSetValues([r.selectionStartPos,r.selectionStartPos+r.selectionWidth].sort(),!0):r.innerSetValues([0,r.selectionStartPos+r.selectionWidth],!0);break;default:break}r.prevPos=c}},r.onDragEnd=function(){document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointerup",r.onDragEnd),r.target="",r.updateHandlesPosition(!1)},r.onValueChange=function(i){var a=r.attributes,o=a.onChange,s=a.type,l=s==="range"?i:i[1],c=s==="range"?r.getValues():r.getValues()[1],u=new Gr("valuechange",{detail:{oldValue:l,value:c}});r.dispatchEvent(u),o==null||o(c)},r.selectionStartPos=0,r.selectionWidth=0,r.prevPos=0,r.target="",r}return Object.defineProperty(t.prototype,"values",{get:function(){return this.attributes.values},set:function(n){this.attributes.values=this.clampValues(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sparklineStyle",{get:function(){var n=this.attributes.orientation;if(n!=="horizontal")return null;var r=Jn(this.attributes,"sparkline");return Ie(Ie({zIndex:0},this.availableSpace),r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shape",{get:function(){var n=this.attributes,r=n.trackLength,i=n.trackSize,a=w(this.getOrientVal([[r,i],[i,r]]),2),o=a[0],s=a[1];return{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableSpace",{get:function(){var n=this.attributes.padding,r=w(Ga(n),4),i=r[0],a=r[1],o=r[2],s=r[3],l=this.shape,c=l.width,u=l.height;return{x:s,y:i,width:c-(s+a),height:u-(i+o)}},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.values},t.prototype.setValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1),this.attributes.values=n;var i=r===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},t.prototype.updateSelectionArea=function(n){var r=this.calcSelectionArea();this.foregroundGroup.selectAll(cl.selection.class).each(function(i,a){Gs(this,r[a],n)})},t.prototype.updateHandlesPosition=function(n){this.attributes.showHandle&&(this.startHandle&&Gs(this.startHandle,this.getHandleStyle("start"),n),this.endHandle&&Gs(this.endHandle,this.getHandleStyle("end"),n))},t.prototype.innerSetValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1);var i=this.values,a=this.clampValues(n);this.attributes.values=a,this.setValues(a),r&&this.onValueChange(i)},t.prototype.renderTrack=function(n){var r=Jn(this.attributes,"track");this.trackShape=Tn(n).maybeAppendByClassName(cl.track,"rect").styles(Ie(Ie({},this.shape),r))},t.prototype.renderBrushArea=function(n){var r=this.attributes.brushable;this.brushArea=Tn(n).maybeAppendByClassName(cl.brushArea,"rect").styles(Ie({fill:"transparent",cursor:r?"crosshair":"default"},this.shape))},t.prototype.renderSparkline=function(n){var r=this,i=this.attributes.orientation,a=Tn(n).maybeAppendByClassName(cl.sparklineGroup,"g");zo(i==="horizontal",a,function(o){var s=r.sparklineStyle;o.maybeAppendByClassName(cl.sparkline,function(){return new KQ({style:s})}).update(s)})},t.prototype.renderHandles=function(){var n=this,r,i=this.attributes,a=i.showHandle,o=i.type,s=o==="range"?["start","end"]:["end"],l=a?s:[],c=this;(r=this.foregroundGroup)===null||r===void 0||r.selectAll(cl.handle.class).data(l.map(function(u){return{type:u}}),function(u){return u.type}).join(function(u){return u.append(function(f){var d=f.type;return new $T({style:n.getHandleStyle(d)})}).each(function(f){var d=f.type;this.attr("class","".concat(cl.handle.name," ").concat(d,"-handle"));var h="".concat(d,"Handle");c[h]=this,this.addEventListener("pointerdown",c.onDragStart(d))})},function(u){return u.each(function(f){var d=f.type;this.update(c.getHandleStyle(d))})},function(u){return u.each(function(f){var d=f.type,h="".concat(d,"Handle");c[h]=void 0}).remove()})},t.prototype.renderSelection=function(n){var r=this.attributes,i=r.type,a=r.selectionType;this.foregroundGroup=Tn(n).maybeAppendByClassName(cl.foreground,"g");var o=Jn(this.attributes,"selection"),s=function(c){return c.style("visibility",function(u){return u.show?"visible":"hidden"}).style("cursor",function(u){return a==="select"?"grab":a==="invert"?"crosshair":"default"}).styles(o)},l=this;this.foregroundGroup.selectAll(cl.selection.class).data(i==="value"?[]:this.calcSelectionArea().map(function(c,u){return{style:Ie({},c),index:u,show:a==="select"?u===1:u!==1}}),function(c){return c.index}).join(function(c){return c.append("rect").attr("className",cl.selection.name).call(s).each(function(u,f){var d=this;f===1?(l.selectionShape=Tn(this),this.on("pointerdown",function(h){d.attr("cursor","grabbing"),l.onDragStart("selection")(h)}),l.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),l.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),l.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){d.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){d.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){d.attr("cursor","pointer")})):this.on("pointerdown",l.onDragStart("track"))})},function(c){return c.call(s)},function(c){return c.remove()}),this.updateSelectionArea(!1),this.renderHandles()},t.prototype.render=function(n,r){this.renderTrack(r),this.renderSparkline(r),this.renderBrushArea(r),this.renderSelection(r)},t.prototype.clampValues=function(n,r){var i;r===void 0&&(r=4);var a=w(this.range,2),o=a[0],s=a[1],l=w(this.getValues().map(function(g){return Hg(g,r)}),2),c=l[0],u=l[1],f=Array.isArray(n)?n:[c,n!=null?n:u],d=w((f||[c,u]).map(function(g){return Hg(g,r)}),2),h=d[0],p=d[1];if(this.attributes.type==="value")return[0,Ri(p,o,s)];h>p&&(i=w([p,h],2),h=i[0],p=i[1]);var v=p-h;return v>s-o?[o,s]:h<o?c===o&&u===p?[o,p]:[o,v+o]:p>s?u===s&&c===h?[h,s]:[s-v,s]:[h,p]},t.prototype.calcSelectionArea=function(n){var r=w(this.clampValues(n),2),i=r[0],a=r[1],o=this.availableSpace,s=o.x,l=o.y,c=o.width,u=o.height;return this.getOrientVal([[{y:l,height:u,x:s,width:i*c},{y:l,height:u,x:i*c+s,width:(a-i)*c},{y:l,height:u,x:a*c,width:(1-a)*c}],[{x:s,width:c,y:l,height:i*u},{x:s,width:c,y:i*u+l,height:(a-i)*u},{x:s,width:c,y:a*u,height:(1-a)*u}]])},t.prototype.calcHandlePosition=function(n){var r=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,o=i.y,s=i.width,l=i.height,c=w(this.clampValues(),2),u=c[0],f=c[1],d=n==="start"?-r:r,h=(n==="start"?u:f)*this.getOrientVal([s,l])+d;return{x:a+this.getOrientVal([h,s/2]),y:o+this.getOrientVal([l/2,h])}},t.prototype.inferTextStyle=function(n){var r=this.attributes.orientation;return r==="horizontal"?{}:n==="start"?{transform:"rotate(90)",textAlign:"start"}:n==="end"?{transform:"rotate(90)",textAlign:"end"}:{}},t.prototype.calcHandleText=function(n){var r,i=this.attributes,a=i.type,o=i.orientation,s=i.formatter,l=i.autoFitLabel,c=Jn(this.attributes,"handle"),u=Jn(c,"label"),f=c.spacing,d=this.getHandleSize(),h=this.clampValues(),p=n==="start"?h[0]:h[1],v=s(p),g=new e_({style:Ie(Ie(Ie({},u),this.inferTextStyle(n)),{text:v})}),m=g.getBBox(),b=m.width,_=m.height;if(g.destroy(),!l){if(a==="value")return{text:v,x:0,y:-_-f};var S=f+d+(o==="horizontal"?b/2:0);return r={text:v},r[o==="horizontal"?"x":"y"]=n==="start"?-S:S,r}var O=0,C=0,E=this.availableSpace,P=E.width,T=E.height,A=this.calcSelectionArea()[1],R=A.x,z=A.y,I=A.width,L=A.height,F=f+d;if(o==="horizontal"){var Z=F+b/2;if(n==="start"){var H=R-F-b;O=H>0?-Z:Z}else{var W=P-R-I-F>b;O=W?Z:-Z}}else{var G=F,J=_+F;n==="start"?C=z-d>_?-J:G:C=T-(z+L)-d>_?J:-G}return{x:O,y:C,text:v}},t.prototype.getHandleLabelStyle=function(n){var r=Jn(this.attributes,"handleLabel");return Ie(Ie(Ie({},r),this.calcHandleText(n)),this.inferTextStyle(n))},t.prototype.getHandleIconStyle=function(){var n=this.attributes.handleIconShape,r=Jn(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return Ie({cursor:i,shape:n,size:a},r)},t.prototype.getHandleStyle=function(n){var r=this.attributes,i=r.showLabel,a=r.showLabelOnInteraction,o=r.orientation,s=this.calcHandlePosition(n),l=this.calcHandleText(n),c=i;return!i&&a&&(this.target?c=!0:c=!1),Ie(Ie(Ie(Ie({},sl(this.getHandleIconStyle(),"icon")),sl(Ie(Ie({},this.getHandleLabelStyle(n)),l),"label")),s),{orientation:o,showLabel:c,type:n,zIndex:3})},t.prototype.getHandleSize=function(){var n=this.attributes,r=n.handleIconSize,i=n.width,a=n.height;return r||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},t.prototype.getOrientVal=function(n){var r=w(n,2),i=r[0],a=r[1],o=this.attributes.orientation;return o==="horizontal"?i:a},t.prototype.setValuesOffset=function(n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=this.attributes.type,o=w(this.getValues(),2),s=o[0],l=o[1],c=a==="range"?n:0,u=[s+c,l+r].sort();i?this.setValues(u):this.innerSetValues(u,!0)},t.prototype.getRatio=function(n){var r=this.availableSpace,i=r.width,a=r.height;return n/this.getOrientVal([i,a])},t.prototype.dispatchCustomEvent=function(n,r,i){var a=this;n.on(r,function(o){o.stopPropagation(),a.dispatchEvent(new Gr(i,{detail:o}))})},t.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var n=this.brushArea;this.dispatchCustomEvent(n,"click","trackClick"),this.dispatchCustomEvent(n,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(n,"pointerleave","trackMouseleave"),n.on("pointerdown",this.onDragStart("track"))},t.prototype.onScroll=function(n){var r=this.attributes.scrollable;if(r){var i=n.deltaX,a=n.deltaY,o=a||i,s=this.getRatio(o);this.setValuesOffset(s,s,!0)}},t.tag="slider",t}(Ra),qQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function JQ(e,t,n){const{x:r,y:i,width:a,height:o}=e;if(t==="left")return[r+a-n,i];if(t==="right")return[r,i];if(t==="bottom")return[r,i];if(t==="top")return[r,i+o-n]}const zp=e=>{const{orientation:t,labelFormatter:n,size:r,style:i={},position:a}=e,o=qQ(e,["orientation","labelFormatter","size","style","position"]);return s=>{var l;const{scales:[c],value:u,theme:f,coordinate:d}=s,{bbox:h}=u,{width:p,height:v}=h,{slider:g={}}=f,m=((l=c.getFormatter)===null||l===void 0?void 0:l.call(c))||(P=>P+""),b=typeof n=="string"?Ic(n):n,_=t==="horizontal",S=ci(d)&&_,{trackSize:O=g.trackSize}=i,[C,E]=JQ(h,a,O);return new yN({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:C,y:E,trackLength:_?p:v,orientation:t,formatter:P=>{const T=b||m,A=S?1-P:P,R=dd(c,A,!0);return T(R)},sparklineData:eee(e,s)},i),o))})}};function QQ(e,t){const[n]=Array.from(e.entries()).filter(([i])=>i.type==="line"||i.type==="area").map(([i])=>{const{encode:a,slider:o}=i;if(o!=null&&o.x&&Object.keys(o.x).length===0){const s=l=>{const c=a[l];return[l,c?c.value:void 0]};return Object.fromEntries(t.map(s))}});if(!(n!=null&&n.series))return n==null?void 0:n.y;const r=n.series.reduce((i,a,o)=>(i[a]=i[a]||[],i[a].push(n.y[o]),i),{});return Object.values(r)}function eee(e,t){const{markState:n}=t;return ua(e.sparklineData)?e.sparklineData:QQ(n,["y","series"])}zp.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const bN=e=>zp(Object.assign(Object.assign({},e),{orientation:"horizontal"}));bN.props=Object.assign(Object.assign({},zp.props),{defaultPosition:"bottom"});const xN=e=>zp(Object.assign(Object.assign({},e),{orientation:"vertical"}));xN.props=Object.assign(Object.assign({},zp.props),{defaultPosition:"left"});var tee=function(e){zt(t,e);function t(n){var r=e.call(this,n,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return r.range=[0,1],r.onValueChange=function(i){var a=r.attributes.value;if(i!==a){var o={detail:{oldValue:i,value:a}};r.dispatchEvent(new Gr("scroll",o)),r.dispatchEvent(new Gr("valuechange",o))}},r.onTrackClick=function(i){var a=r.attributes.slidable;if(a){var o=w(r.getLocalPosition(),2),s=o[0],l=o[1],c=w(r.padding,4),u=c[0],f=c[3],d=r.getOrientVal([s+f,l+u]),h=r.getOrientVal(Yg(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new Gr("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new Gr("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new Gr("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new Gr("trackMouseleave",{detail:i.detail}))},r}return Object.defineProperty(t.prototype,"padding",{get:function(){var n=this.attributes.padding;return Ga(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var n=this.attributes.value,r=w(this.range,2),i=r[0],a=r[1];return Ri(n,i,a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackLength",{get:function(){var n=this.attributes,r=n.viewportLength,i=n.trackLength,a=i===void 0?r:i;return a},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableSpace",{get:function(){var n=this.attributes.trackSize,r=this.trackLength,i=w(this.padding,4),a=i[0],o=i[1],s=i[2],l=i[3],c=w(this.getOrientVal([[r,n],[n,r]]),2),u=c[0],f=c[1];return{x:l,y:a,width:+u-(l+o),height:+f-(a+s)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.trackSize;return r?i/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thumbRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.thumbRadius;if(!r)return 0;var a=this.availableSpace,o=a.width,s=a.height;return i||this.getOrientVal([s,o])/2},enumerable:!1,configurable:!0}),t.prototype.getValues=function(n){n===void 0&&(n=this.value);var r=this.attributes,i=r.viewportLength,a=r.contentLength,o=i/a,s=w(this.range,2),l=s[0],c=s[1],u=n*(c-l-o);return[u,u+o]},t.prototype.getValue=function(){return this.value},t.prototype.renderSlider=function(n){var r=this.attributes,i=r.orientation,a=r.trackSize,o=r.padding,s=r.slidable,l=Jn(this.attributes,"track"),c=Jn(this.attributes,"thumb"),u=Ie(Ie({brushable:!1,orientation:i,padding:o,selectionRadius:this.thumbRadius,showHandle:!1,slidable:s,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:a,values:this.getValues()},sl(l,"track")),sl(c,"selection"));this.slider=Tn(n).maybeAppendByClassName("scrollbar",function(){return new yN({style:u})}).update(u).node()},t.prototype.render=function(n,r){this.renderSlider(r)},t.prototype.setValue=function(n,r){r===void 0&&(r=!1);var i=this.attributes.value,a=w(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues(Ri(n,o,s)),r),this.onValueChange(i)},t.prototype.bindEvents=function(){var n=this;this.slider.addEventListener("trackClick",function(r){r.stopPropagation(),n.onTrackClick(r.detail)}),this.onHover()},t.prototype.getOrientVal=function(n){var r=this.attributes.orientation;return r==="horizontal"?n[0]:n[1]},t.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)},t.tag="scrollbar",t}(Ra),nee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Zp=e=>{const{orientation:t,labelFormatter:n,style:r}=e,i=nee(e,["orientation","labelFormatter","style"]);return({scales:[a],value:o,theme:s})=>{const{bbox:l}=o,{x:c,y:u,width:f,height:d}=l,{scrollbar:h={}}=s,{ratio:p,range:v}=a.getOptions(),g=t==="horizontal"?f:d,m=g/p,[b,_]=v,S=_>b?0:1;return new tee({className:"g2-scrollbar",style:Object.assign({},h,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:c,y:u,trackLength:g,value:S}),i),{orientation:t,contentLength:m,viewportLength:g}))})}};Zp.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const _N=e=>Zp(Object.assign(Object.assign({},e),{orientation:"horizontal"}));_N.props=Object.assign(Object.assign({},Zp.props),{defaultPosition:"bottom"});const wN=e=>Zp(Object.assign(Object.assign({},e),{orientation:"vertical"}));wN.props=Object.assign(Object.assign({},Zp.props),{defaultPosition:"left"});const sS=(e,t)=>{const{coordinate:r}=t;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=ci(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f}];return s.animate(p,Object.assign(Object.assign({},o),e))}},ree=(e,t)=>{const{coordinate:r}=t;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=ci(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.99},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),e))}},SN=(e,t)=>{const{coordinate:r}=t;return xM.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:kt.NUMBER}),(i,a,o)=>{const[s]=i,l=u=>{const{__data__:f,style:d}=u,{radius:h=0,inset:p=0,fillOpacity:v=1,strokeOpacity:g=1,opacity:m=1}=d,{points:b,y:_,y1:S}=f,O=Du(r,b,[_,S]),{innerRadius:C,outerRadius:E}=O,P=nm().cornerRadius(h).padAngle(p*Math.PI/180),T=new Ja({}),A=r.getCenter(),R=L=>{T.attr({d:P(L),transform:`translate(${A[0]}, ${A[1]})`});const F=u2(T);return T.style.transform="",F},z=[{scaleInYRadius:C+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:C+1e-4,fillOpacity:v,strokeOpacity:g,opacity:m,offset:.01},{scaleInYRadius:E,fillOpacity:v,strokeOpacity:g,opacity:m}],I=u.animate(z,Object.assign(Object.assign({},o),e));return I.onframe=function(){u.style.path=R(Object.assign(Object.assign({},O),{outerRadius:Number(u.style.scaleInYRadius)}))},I.onfinish=function(){u.style.path=R(Object.assign(Object.assign({},O),{outerRadius:E}))},I},c=u=>{const{style:f}=u,{transform:d="",fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=f,[g,m]=ci(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],b=[{transform:`${d} ${m}`.trimStart(),transformOrigin:g,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${d} ${m}`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{transform:`${d} scale(1, 1)`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v}];return u.animate(b,Object.assign(Object.assign({},o),e))};return Jr(r)?l(s):c(s)}},iee=(e,t)=>{const{coordinate:r}=t;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=ci(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],p=[{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.99},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),e))}},ON=(e,t)=>{xM.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:kt.NUMBER});const{coordinate:r}=t;return(i,a,o)=>{const[s]=i;if(!Jr(r))return sS(e,t)(i,a,o);const l=r.getCenter(),{__data__:c,style:u}=s,{radius:f=0,inset:d=0,fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=u,{points:g,y:m,y1:b}=c,_=nm().cornerRadius(f).padAngle(d*Math.PI/180),S=Du(r,g,[m,b]),{startAngle:O,endAngle:C}=S,E=new Ja({}),P=R=>{E.attr({d:_(R),transform:`translate(${l[0]}, ${l[1]})`});const z=u2(E);return E.style.transform="",z},T=[{waveInArcAngle:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:O+1e-4,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{waveInArcAngle:C,fillOpacity:h,strokeOpacity:p,opacity:v}],A=s.animate(T,Object.assign(Object.assign({},o),e));return A.onframe=function(){s.style.path=P(Object.assign(Object.assign({},S),{endAngle:Number(s.style.waveInArcAngle)}))},A.onfinish=function(){s.style.path=P(Object.assign(Object.assign({},S),{endAngle:C}))},A}};ON.props={};const CN=e=>(t,n,r)=>{const[i]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,l=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}];return i.animate(l,Object.assign(Object.assign({},r),e))};CN.props={};const EN=e=>(t,n,r)=>{const[i]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,l=[{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(l,Object.assign(Object.assign({},r),e))};EN.props={};const aee=e=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,u="center center",f=[{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c}];return a.animate(f,Object.assign(Object.assign({},i),e))},oee=e=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,u="center center",f=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return a.animate(f,Object.assign(Object.assign({},i),e))},MN=e=>(t,n,r)=>{var i,a;const[o]=t,s=((a=(i=o).getTotalLength)===null||a===void 0?void 0:a.call(i))||0,l=[{lineDash:[0,s]},{lineDash:[s,0]}];return o.animate(l,Object.assign(Object.assign({},r),e))};MN.props={};function Ed(e,t){const n={};for(const r of t){const i=e.style[r];i&&(n[r]=i)}return n}const Md=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function lS(e){const{min:t,max:n}=e.getLocalBounds(),[r,i]=t,[a,o]=n,s=o-i,l=a-r;return[r,i,l,s]}function see(e){const[t,n,r,i]=e;return`
|
|
M ${t} ${n}
|
|
L ${t+r} ${n}
|
|
L ${t+r} ${n+i}
|
|
L ${t} ${n+i}
|
|
Z
|
|
`}function lee(e,t){const[n,r,i,a]=lS(e),o=a/i,s=Math.ceil(Math.sqrt(t/o)),l=Math.ceil(t/s),c=[],u=a/l;let f=0,d=t;for(;d>0;){const h=Math.min(d,s),p=i/h;for(let v=0;v<h;v++){const g=n+v*p,m=r+f*u;c.push(see([g,m,p,u]))}d-=h,f+=1}return c}function cee(e="pack"){return typeof e=="function"?e:lee}function uee(e,t,n){const[r,i,a,o]=lS(e),{transform:s}=e.style,{transform:l}=t.style;PN(t,e);const[c,u,f,d]=lS(t),h=r-c,p=i-u,v=a/f,g=o/d,m=[Object.assign({transform:`${s?s+" ":""}translate(${h}, ${p}) scale(${v}, ${g})`},Ed(e,Md)),Object.assign({transform:`${l?l+" ":""}translate(0, 0) scale(1, 1)`},Ed(t,Md))];return t.animate(m,n)}function PN(e,t){e.__data__=t.__data__,e.className=t.className,e.markType=t.markType,t.parentNode.replaceChild(e,t)}function fee(e,t){const{nodeName:n}=e;if(n==="path")return e;const r=new Ja({style:Object.assign(Object.assign({},Ed(e,Md)),{d:t})});return PN(r,e),r}function TN(e,t){const n=e.indexOf(t),r=e.lastIndexOf(t);return n===r}function dee(e){return!TN(e,"m")||!TN(e,"M")}function AN(e){const t=u2(e);if(t&&!dee(t))return t}function cS(e,t,n,r){const{nodeName:i}=t,{nodeName:a}=n,o=AN(t),s=AN(n);if(i===a&&i!=="path"||(o===void 0||s===void 0))return uee(t,n,r);const u=fee(e,o),f=[Object.assign({path:o},Ed(t,Md)),Object.assign({path:s},Ed(n,Md))],d=u.animate(f,r);return d.onfinish=()=>{u.style.transform="none",V2(u,n)},u.style.transform="none",d}function hee(e,t,n,r){e.style.visibility="hidden";const i=r(e,t.length);return t.map((a,o)=>{const s=new Ja({style:Object.assign({path:i[o]},Ed(e,Md))});return cS(a,s,a,n)})}function pee(e,t,n,r){const i=r(t,e.length),{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style,l=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:o,opacity:s}],c=t.animate(l,n);return[...e.map((f,d)=>{const h=new Ja({style:{path:i[d],fill:t.style.fill}});return cS(f,f,h,n)}),c]}const RN=e=>(t,n,r)=>{const i=cee(e.split),a=Object.assign(Object.assign({},r),e),{length:o}=t,{length:s}=n;if(o===1&&s===1||o>1&&s>1){const[l]=t,[c]=n;return cS(l,l,c,a)}if(o===1&&s>1){const[l]=t;return hee(l,n,a,i)}if(o>1&&s===1){const[l]=n;return pee(t,l,a,i)}return null};RN.props={};const IN=(e,t)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),l=new Ja({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(l),a.style.clipPath=l,sS(e,t)([l],r,i)};IN.props={};const LN=(e,t)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),l=new Ja({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(l),a.style.clipPath=l,SN(e,t)([l],r,i)};LN.props={};var vee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function gee(e,{elements:t,datum:n,groupKey:r=f=>f,link:i=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,emitter:c,state:u={}}){var f;const d=t(e),h=new Set(d),p=_i(d,r),v=wp(d,n),[g,m]=NA(Object.assign({elements:d,valueof:v,link:i,coordinate:l},Tt(u.active,"link"))),[b,_,S]=jA(Object.assign({document:e.ownerDocument,scale:s,coordinate:l,background:a,valueof:v},Tt(u.active,"background"))),O=Je(u,{active:Object.assign({},((f=u.active)===null||f===void 0?void 0:f.offset)&&{transform:(...H)=>{const W=u.active.offset(...H),[,G]=H;return kA(d[G],W,l)}})}),{setState:C,removeState:E,hasState:P}=Ul(O,v);let T;const A=H=>{const{target:W,nativeEvent:G=!0}=H;if(!h.has(W))return;T&&clearTimeout(T);const J=r(W),re=p.get(J),he=new Set(re);for(const ce of d)he.has(ce)?P(ce,"active")||C(ce,"active"):(C(ce,"inactive"),m(ce)),ce!==W&&_(ce);b(W),g(re),G&&c.emit("element:highlight",{nativeEvent:G,data:{data:n(W),group:re.map(n)}})},R=()=>{T&&clearTimeout(T),T=setTimeout(()=>{z(),T=null},o)},z=(H=!0)=>{for(const W of d)E(W,"active","inactive"),_(W),m(W);H&&c.emit("element:unhighlight",{nativeEvent:H})},I=H=>{const{target:W}=H;a&&!S(W)||!a&&!h.has(W)||(o>0?R():z())},L=()=>{z()};e.addEventListener("pointerover",A),e.addEventListener("pointerout",I),e.addEventListener("pointerleave",L);const F=H=>{const{nativeEvent:W}=H;W||z(!1)},Z=H=>{const{nativeEvent:W}=H;if(W)return;const{data:G}=H.data,J=Y_(d,G,n);J&&A({target:J,nativeEvent:!1})};return c.on("element:highlight",Z),c.on("element:unhighlight",F),()=>{e.removeEventListener("pointerover",A),e.removeEventListener("pointerout",I),e.removeEventListener("pointerleave",L),c.off("element:highlight",Z),c.off("element:unhighlight",F);for(const H of d)_(H),m(H)}}function zm(e){var{delay:t,createGroup:n,background:r=!1,link:i=!1}=e,a=vee(e,["delay","createGroup","background","link"]);return(o,s,l)=>{const{container:c,view:u,options:f}=o,{scale:d,coordinate:h}=u,p=dl(c);return gee(p,Object.assign({elements:zc,datum:zu(u),groupKey:n?n(u):void 0,coordinate:h,scale:d,state:pd(f,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:t,emitter:l},a))}}zm.props={reapplyWhenUpdate:!0};function NN(e){return zm(Object.assign(Object.assign({},e),{createGroup:H_}))}NN.props={reapplyWhenUpdate:!0};function kN(e){return zm(Object.assign(Object.assign({},e),{createGroup:LA}))}kN.props={reapplyWhenUpdate:!0};var mee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function yee(e,{elements:t,datum:n,groupKey:r=f=>f,link:i=!1,single:a=!1,coordinate:o,background:s=!1,scale:l,emitter:c,state:u={}}){var f;const d=t(e),h=new Set(d),p=_i(d,r),v=wp(d,n),[g,m]=NA(Object.assign({link:i,elements:d,valueof:v,coordinate:o},Tt(u.selected,"link"))),[b,_]=jA(Object.assign({document:e.ownerDocument,background:s,coordinate:o,scale:l,valueof:v},Tt(u.selected,"background"))),S=Je(u,{selected:Object.assign({},((f=u.selected)===null||f===void 0?void 0:f.offset)&&{transform:(...L)=>{const F=u.selected.offset(...L),[,Z]=L;return kA(d[Z],F,o)}})}),{setState:O,removeState:C,hasState:E}=Ul(S,v),P=(L=!0)=>{for(const F of d)C(F,"selected","unselected"),m(F),_(F);L&&c.emit("element:unselect",{nativeEvent:!0})},T=(L,F,Z=!0)=>{if(E(F,"selected"))P();else{const H=r(F),W=p.get(H),G=new Set(W);for(const J of d)G.has(J)?O(J,"selected"):(O(J,"unselected"),m(J)),J!==F&&_(J);if(g(W),b(F),!Z)return;c.emit("element:select",Object.assign(Object.assign({},L),{nativeEvent:Z,data:{data:[n(F),...W.map(n)]}}))}},A=(L,F,Z=!0)=>{const H=r(F),W=p.get(H),G=new Set(W);if(E(F,"selected")){if(!d.some(re=>!G.has(re)&&E(re,"selected")))return P();for(const re of W)O(re,"unselected"),m(re),_(re)}else{const J=W.some(re=>E(re,"selected"));for(const re of d)G.has(re)?O(re,"selected"):E(re,"selected")||O(re,"unselected");!J&&i&&g(W),b(F)}Z&&c.emit("element:select",Object.assign(Object.assign({},L),{nativeEvent:Z,data:{data:d.filter(J=>E(J,"selected")).map(n)}}))},R=L=>{const{target:F,nativeEvent:Z=!0}=L;return h.has(F)?a?T(L,F,Z):A(L,F,Z):P()};e.addEventListener("click",R);const z=L=>{const{nativeEvent:F,data:Z}=L;if(F)return;const H=a?Z.data.slice(0,1):Z.data;for(const W of H){const G=Y_(d,W,n);R({target:G,nativeEvent:!1})}},I=()=>{P(!1)};return c.on("element:select",z),c.on("element:unselect",I),()=>{for(const L of d)m(L);e.removeEventListener("click",R),c.off("element:select",z),c.off("element:unselect",I)}}function Zm(e){var{createGroup:t,background:n=!1,link:r=!1}=e,i=mee(e,["createGroup","background","link"]);return(a,o,s)=>{const{container:l,view:c,options:u}=a,{coordinate:f,scale:d}=c,h=dl(l);return yee(h,Object.assign({elements:zc,datum:zu(c),groupKey:t?t(c):void 0,coordinate:f,scale:d,state:pd(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:s},i))}}Zm.props={reapplyWhenUpdate:!0};function jN(e){return Zm(Object.assign(Object.assign({},e),{createGroup:H_}))}jN.props={reapplyWhenUpdate:!0};function DN(e){return Zm(Object.assign(Object.assign({},e),{createGroup:LA}))}DN.props={reapplyWhenUpdate:!0};var Xu=function(e,t,n){var r,i,a,o,s=0;n||(n={});var l=function(){s=n.leading===!1?0:Date.now(),r=null,o=e.apply(i,a),r||(i=a=null)},c=function(){var u=Date.now();!s&&n.leading===!1&&(s=u);var f=t-(u-s);return i=this,a=arguments,f<=0||f>t?(r&&(clearTimeout(r),r=null),s=u,o=e.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(l,f)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c};function bee(e){const{coordinate:t={}}=e,{transform:n=[]}=t,r=n.find(a=>a.type==="fisheye");if(r)return r;const i={type:"fisheye"};return n.push(i),t.transform=n,e.coordinate=t,i}function xee({wait:e=30,leading:t,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,l=dl(s),c=Xu(u=>{const f=W_(l,u);if(!f){o("fisheye"),a();return}o("fisheye",d=>{const h=Je({},d,{interaction:{tooltip:{preserve:!0}}});for(const m of h.marks)m.animate=!1;const[p,v]=f,g=bee(h);return g.focusX=p,g.focusY=v,g.visual=!0,h}),a()},e,{leading:t,trailing:n});return l.addEventListener("pointerenter",c),l.addEventListener("pointermove",c),l.addEventListener("pointerleave",c),()=>{l.removeEventListener("pointerenter",c),l.removeEventListener("pointermove",c),l.removeEventListener("pointerleave",c)}}}var _ee=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},wee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function See(e){const{transform:t=[]}=e,n=t.find(i=>i.type==="normalizeY");if(n)return n;const r={type:"normalizeY"};return t.push(r),e.transform=t,r}function Oee(e,t,n){const[r]=Array.from(e.entries()).filter(([i])=>i.type===t).map(([i])=>{const{encode:a}=i,o=s=>{const l=a[s];return[s,l?l.value:void 0]};return Object.fromEntries(n.map(o))});return r}function FN(e){var{wait:t=20,leading:n,trailing:r=!1,labelFormatter:i=o=>`${o}`}=e,a=wee(e,["wait","leading","trailing","labelFormatter"]);return o=>{const{view:s,container:l,update:c,setState:u}=o,{markState:f,scale:d,coordinate:h}=s,p=Oee(f,"line",["x","y","series"]);if(!p)return;const{y:v,x:g,series:m=[]}=p,b=v.map((H,W)=>W),_=Vl(b.map(H=>g[H])),S=dl(l),O=l.getElementsByClassName(Bl),C=l.getElementsByClassName(B2),P=_i(C,H=>H.__data__.key.split("-")[0]),T=new Gh({style:Object.assign({x1:0,y1:0,x2:0,y2:S.getAttribute("height"),stroke:"black",lineWidth:1},Tt(a,"rule"))}),A=new rs({style:Object.assign({x:0,y:S.getAttribute("height"),text:"",fontSize:10},Tt(a,"label"))});T.append(A),S.appendChild(T);const R=(H,W,G)=>{const[J]=H.invert(G),re=W.invert(J);return _[CY(_,re)]},z=(H,W)=>{T.setAttribute("x1",H[0]),T.setAttribute("x2",H[0]),A.setAttribute("text",i(W))};let I;const L=H=>_ee(this,void 0,void 0,function*(){const{x:W}=d,G=R(h,W,H);z(H,G),u("chartIndex",re=>{const he=Je({},re),ce=he.marks.find(He=>He.type==="line"),ot=jr(W2(b,He=>jr(He,jt=>+v[jt])/is(He,jt=>+v[jt]),He=>m[He]).values()),xt=[1/ot,ot];Je(ce,{scale:{y:{domain:xt}}});const et=See(ce);et.groupBy="color",et.basis=(He,jt)=>{const Ct=He[fd(Gt=>g[+Gt]).center(He,G)];return jt[Ct]};for(const He of he.marks)He.animate=!1;return he}),I=(yield c("chartIndex")).view}),F=H=>{const{scale:W,coordinate:G}=I,{x:J,y:re}=W,he=R(G,J,H);z(H,he);for(const ce of O){const{seriesIndex:ke,key:ot}=ce.__data__,xt=ke[fd(an=>g[+an]).center(ke,he)],et=[0,re.map(1)],He=[0,re.map(v[xt]/v[ke[0]])],[,jt]=G.map(et),[,Ct]=G.map(He),Gt=jt-Ct;ce.setAttribute("transform",`translate(0, ${Gt})`);const en=P.get(ot)||[];for(const an of en)an.setAttribute("dy",Gt)}},Z=Xu(H=>{const W=W_(S,H);W&&F(W)},t,{leading:n,trailing:r});return L([0,0]),S.addEventListener("pointerenter",Z),S.addEventListener("pointermove",Z),S.addEventListener("pointerleave",Z),()=>{T.remove(),S.removeEventListener("pointerenter",Z),S.removeEventListener("pointermove",Z),S.removeEventListener("pointerleave",Z)}}}FN.props={reapplyWhenUpdate:!0};function $p(e,t){let n=0,r=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function $m(e,t){let n,r=-1,i=-1;if(t===void 0)for(const a of e)++i,a!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of e)(a=t(a,++i,e))!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);return r}function BN(e){var t=document.createElement("div");t.innerHTML=e;var n=t.childNodes[0];return n&&t.contains(n)&&t.removeChild(n),n}function Cee(e,t){return!e||!t?e:e.replace(/\\?\{([^{}]+)\}/g,function(n,r){return n.charAt(0)==="\\"?n.slice(1):t[r]===void 0?"":t[r]})}var Eee=Cee;function uS(e){return e===void 0&&(e=""),{CONTAINER:"".concat(e,"tooltip"),TITLE:"".concat(e,"tooltip-title"),LIST:"".concat(e,"tooltip-list"),LIST_ITEM:"".concat(e,"tooltip-list-item"),NAME:"".concat(e,"tooltip-list-item-name"),MARKER:"".concat(e,"tooltip-list-item-marker"),NAME_LABEL:"".concat(e,"tooltip-list-item-name-label"),VALUE:"".concat(e,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(e,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(e,"tooltip-crosshair-y")}}var zN={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function Mee(e){var t;e===void 0&&(e="");var n=uS(e);return t={},t[".".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"},t[".".concat(n.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},t[".".concat(n.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},t[".".concat(n.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},t[".".concat(n.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},t[".".concat(n.NAME)]={display:"flex","align-items":"center","max-width":"216px"},t[".".concat(n.NAME_LABEL)]=Ie({flex:1},zN),t[".".concat(n.VALUE)]=Ie({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},zN),t[".".concat(n.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t[".".concat(n.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t}var Pee=function(e){zt(t,e);function t(n){var r=this,i,a,o=(a=(i=n.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,s=uS(o);return r=e.call(this,n,{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(s.CONTAINER,'"></div>'),title:'<div class="'.concat(s.TITLE,'"></div>'),item:'<li class="'.concat(s.LIST_ITEM,`" data-index={index}>
|
|
<span class="`).concat(s.NAME,`">
|
|
<span class="`).concat(s.MARKER,`" style="background:{color}"></span>
|
|
<span class="`).concat(s.NAME_LABEL,`" title="{name}">{name}</span>
|
|
</span>
|
|
<span class="`).concat(s.VALUE,`" title="{value}">{value}</span>
|
|
</li>`)},style:Mee(o)})||this,r.timestamp=-1,r.prevCustomContentKey=r.attributes.contentKey,r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(t.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.element},Object.defineProperty(t.prototype,"elementSize",{get:function(){var n=this.element.offsetWidth,r=this.element.offsetHeight;return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HTMLTooltipItemsElements",{get:function(){var n=this.attributes,r=n.data,i=n.template;return r.map(function(a,o){var s=a.name,l=s===void 0?"":s,c=a.color,u=c===void 0?"black":c,f=a.index,d=Sr(a,["name","color","index"]),h=Ie({name:l,color:u,index:f!=null?f:o},d);return BN(Eee(i.item,h))})},enumerable:!1,configurable:!0}),t.prototype.render=function(n,r){this.renderHTMLTooltipElement(),this.updatePosition()},t.prototype.destroy=function(){var n;(n=this.element)===null||n===void 0||n.remove(),e.prototype.destroy.call(this)},t.prototype.show=function(n,r){var i=this;if(n!==void 0&&r!==void 0){var a=this.element.style.visibility==="hidden",o=function(){i.attributes.x=n!=null?n:i.attributes.x,i.attributes.y=r!=null?r:i.attributes.y,i.updatePosition()};a?this.closeTransition(o):o()}this.element.style.visibility="visible"},t.prototype.hide=function(n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=this.attributes.enterable;i&&this.isCursorEntered(n,r)||(this.element.style.visibility="hidden")},t.prototype.initShape=function(){var n=this.attributes.template;this.element=BN(n.container),this.id&&this.element.setAttribute("id",this.id)},t.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var n=this.attributes.content;n&&(typeof n=="string"?this.element.innerHTML=n:this.element.replaceChildren(n))}},t.prototype.renderHTMLTooltipElement=function(){var n,r,i=this.attributes,a=i.template,o=i.title,s=i.enterable,l=i.style,c=i.content,u=uS(a.prefixCls),f=this.element;if(this.element.style.pointerEvents=s?"auto":"none",c)this.renderCustomContent();else{o?(f.innerHTML=a.title,f.getElementsByClassName(u.TITLE)[0].innerHTML=o):(r=(n=f.getElementsByClassName(u.TITLE))===null||n===void 0?void 0:n[0])===null||r===void 0||r.remove();var d=this.HTMLTooltipItemsElements,h=document.createElement("ul");h.className=u.LIST,h.replaceChildren.apply(h,N([],w(d),!1));var p=this.element.querySelector(".".concat(u.LIST));p?p.replaceWith(h):f.appendChild(h)}v$(f,l)},t.prototype.getRelativeOffsetFromCursor=function(n){var r=this.attributes,i=r.position,a=r.offset,o=n||i,s=o.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},c=this.elementSize,u=c.width,f=c.height,d=[-u/2,-f/2];return s.forEach(function(h){var p=w(d,2),v=p[0],g=p[1],m=w(l[h],2),b=m[0],_=m[1];d=[v+(u/2+a[0])*b,g+(f/2+a[1])*_]}),d},t.prototype.setOffsetPosition=function(n){var r=w(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,l=s===void 0?0:s,c=o.y,u=c===void 0?0:c,f=o.container,d=f.x,h=f.y;this.element.style.left="".concat(+l+d+i,"px"),this.element.style.top="".concat(+u+h+a,"px")},t.prototype.updatePosition=function(){var n=this.attributes.showDelay,r=n===void 0?60:n,i=Date.now();this.timestamp>0&&i-this.timestamp<r||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},t.prototype.autoPosition=function(n){var r=w(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position;if(!c)return[i,a];var f=this.element,d=f.offsetWidth,h=f.offsetHeight,p=w([+s+i,+l+a],2),v=p[0],g=p[1],m={left:"right",right:"left",top:"bottom",bottom:"top"},b=c.x,_=c.y,S=c.width,O=c.height,C={left:v<b,right:v+d>b+S,top:g<_,bottom:g+h>_+O},E=[];u.split("-").forEach(function(T){C[T]?E.push(m[T]):E.push(T)});var P=E.join("-");return this.getRelativeOffsetFromCursor(P)},t.prototype.isCursorEntered=function(n,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,o=i.y,s=i.width,l=i.height;return new ui(a,o,s,l).isPointIn(n,r)}return!1},t.prototype.closeTransition=function(n){var r=this,i=this.element.style.transition;this.element.style.transition="none",n(),setTimeout(function(){r.element.style.transition=i},10)},t.tag="tooltip",t}(Ra),Wp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Wm(e,t){return t?typeof t=="string"?document.querySelector(t):t:e.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function Tee(e){const t=e.getRenderBounds(),{min:[n,r],max:[i,a]}=t;return{x:n,y:r,width:i-n,height:a-r}}function Aee(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}function Ree(e,t,n,r,i,a,o,s={}){const l={".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},c=new Pee({className:"tooltip",style:{x:t,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:Je(l,s)}});return e.appendChild(c.HTMLTooltipElement),c}function ZN({root:e,data:t,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1,css:c,mount:u,bounding:f}){const d=Wm(e,u),h=Wm(e),p=o?h:e,v=f||Tee(e),g=Aee(h,d),{tooltipElement:m=Ree(d,n,r,s,l,v,g,c)}=p,{items:b,title:_=""}=t;m.update(Object.assign({x:n,y:r,data:b,title:_,position:s,enterable:l},i!==void 0&&{content:i(a,{items:b,title:_})})),p.tooltipElement=m}function Xc({root:e,single:t,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=Wm(e),o=t?a:e,{tooltipElement:s}=o;s&&s.hide(i==null?void 0:i.clientX,i==null?void 0:i.clientY)}function fS({root:e,single:t}){const n=Wm(e),r=t?n:e;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function $N(e){const{value:t}=e;return Object.assign(Object.assign({},e),{value:t===void 0?"undefined":t})}function Iee(e){const{__data__:t}=e,{title:n,items:r=[]}=t,i=r.filter(qr).map(a=>{var{color:o=WN(e)}=a,s=Wp(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map($N);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function Lee(e,t){const{color:n,series:r,facet:i=!1}=e,{color:a,series:o}=t,s=l=>l&&l.invert&&!(l instanceof Yc)&&!(l instanceof dp);if(s(r))return r.clone().invert(o);if(o&&r instanceof Yc&&r.invert(o)!==a&&!i)return r.invert(o);if(s(n)){const l=n.invert(a);return Array.isArray(l)?null:l}return null}function WN(e){const t=e.getAttribute("fill"),n=e.getAttribute("stroke"),{__data__:r}=e,{color:i=t&&t!=="transparent"?t:n}=r;return i}function GN(e,t=n=>n){const n=new Map(e.map(r=>[t(r),r]));return Array.from(n.values())}function HN(e,t,n,r=e.map(a=>a.__data__),i={}){const a=l=>l instanceof Date?+l:l,o=GN(r.map(l=>l.title),a).filter(qr),s=r.flatMap((l,c)=>{const u=e[c],{items:f=[],title:d}=l,h=f.filter(qr),p=n!==void 0?n:f.length<=1;return h.map(v=>{var{color:g=WN(u)||i.color,name:m}=v,b=Wp(v,["color","name"]);const _=Lee(t,l),S=p?_||m:m||_;return Object.assign(Object.assign({},b),{color:g,name:S||d})})}).map($N);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:GN(s,l=>`(${a(l.name)}, ${a(l.value)}, ${a(l.color)})`)})}function Nee(e,t,n){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:s,startY:l,transposed:c,polar:u,insetLeft:f,insetTop:d}=n,h=Wp(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),v=t.map(T=>T[1]),g=t.map(T=>T[0]),m=$p(v),b=$p(g),_=()=>{if(u){const T=Math.min(a,o)/2,A=s+f+a/2,R=l+d+o/2,z=Cs(Li([b,m],[A,R])),I=A+T*Math.cos(z),L=R+T*Math.sin(z);return[A,I,R,L]}return c?[s,s+r,m+l,m+l]:[b+s,b+s,l,l+i]},[S,O,C,E]=_(),P=()=>{const T=new Gh({style:Object.assign({x1:S,x2:O,y1:C,y2:E},p)});return e.appendChild(T),T};if(g.length>0){const T=e.ruleY||P();T.style.x1=S,T.style.x2=O,T.style.y1=C,T.style.y2=E,e.ruleY=T}}function YN(e){e.ruleY&&(e.ruleY.remove(),e.ruleY=void 0)}function kee(e,{data:t,style:n,theme:r}){e.markers&&e.markers.forEach(a=>a.remove());const i=t.filter(a=>{const[{x:o,y:s}]=a;return qr(o)&&qr(s)}).map(a=>{const[{color:o,element:s},l]=a,c=o||s.style.fill||s.style.stroke||r.color;return new Mu({style:Object.assign({cx:l[0],cy:l[1],fill:c,r:4,stroke:"#fff",strokeWidth:2},n)})});for(const a of i)e.appendChild(a);e.markers=i}function VN(e){e.markers&&(e.markers.forEach(t=>t.remove()),e.markers=[])}function UN(e,t){return Array.from(e.values()).some(n=>{var r;return(r=n.interaction)===null||r===void 0?void 0:r[t]})}function dS(e,t){return e===void 0?t:e}function XN(e){const{title:t,items:n}=e;return n.length===0&&t===void 0}function jee(e){return Array.from(e.values()).some(t=>{var n;return((n=t.interaction)===null||n===void 0?void 0:n.seriesTooltip)&&t.tooltip})}function Dee(e){return om(e,t=>t.classList?t.classList.includes("element"):!1)}function KN(e,t){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,render:l,groupName:c,emitter:u,wait:f=50,leading:d=!0,trailing:h=!1,startX:p=0,startY:v=0,body:g=!0,single:m=!0,position:b,enterable:_,mount:S,bounding:O,theme:C,disableNative:E=!1,marker:P=!0,preserve:T=!1,style:A={},css:R={}}=t,z=Wp(t,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","disableNative","marker","preserve","style","css"]);const I=n(e),L=ci(o),F=Jr(o),Z=Je(A,z),{innerWidth:H,innerHeight:W,width:G,height:J,insetLeft:re,insetTop:he}=o.getOptions(),ce=[],ke=[];for(const Mn of I){const{__data__:Un}=Mn,{seriesX:Xn,title:Pn,items:Er}=Un;Xn?ce.push(Mn):(Pn||Er)&&ke.push(Mn)}const xt=!!(L?a.y:a.x).getBandWidth&&ke.length>0;ce.sort((Mn,Un)=>{const Xn=L?0:1,Pn=Er=>Er.getBounds().min[Xn];return L?Pn(Un)-Pn(Mn):Pn(Mn)-Pn(Un)});const et=Mn=>{const Un=L?1:0,{min:Xn,max:Pn}=Mn.getLocalBounds();return Vl([Xn[Un],Pn[Un]])};ke.sort((Mn,Un)=>{const[Xn,Pn]=et(Mn),[Er,br]=et(Un),fr=(Xn+Pn)/2,hi=(Er+br)/2;return L?hi-fr:fr-hi});const He=new Map(ce.map(Mn=>{const{__data__:Un}=Mn,{seriesX:Xn}=Un,Pn=Xn.map((br,fr)=>fr),Er=Vl(Pn,br=>Xn[+br]);return[Mn,[Er,Xn]]})),{x:jt}=a,Ct=jt!=null&&jt.getBandWidth?jt.getBandWidth()/2:0,Gt=Mn=>{const[Un]=o.invert(Mn);return Un-Ct},en=(Mn,Un,Xn)=>{const Pn=Gt(Mn),Er=Xn.filter(qr),[br,fr]=Vl([Er[0],Er[Er.length-1]]),hi=br===fr;if(!xt&&(Pn<br||Pn>fr)&&!hi)return null;const Si=fd(tc=>Xn[+tc]).center,io=Si(Un,Pn);return Un[io]},an=(Mn,Un)=>{const Pn=Mn[L?1:0],Er=Un.filter(hi=>{const[Si,io]=et(hi);return Pn>=Si&&Pn<=io});if(!xt||Er.length>0)return Er;const br=fd(hi=>{const[Si,io]=et(hi);return(Si+io)/2}).center,fr=br(Un,Pn);return[Un[fr]].filter(qr)},sn=(Mn,Un)=>{const{__data__:Xn}=Mn;return Object.fromEntries(Object.entries(Xn).filter(([Pn])=>Pn.startsWith("series")&&Pn!=="series").map(([Pn,Er])=>{const br=Er[Un];return[aP(Pn.replace("series","")),br]}))},An=Xu(Mn=>{const Un=W_(e,Mn);if(!Un)return;const Xn=IA(e),Pn=Xn.min[0],Er=Xn.min[1],br=[Un[0]-p,Un[1]-v];if(!br)return;const fr=an(br,ke),hi=[],Si=[];for(const fa of ce){const[S0,dC]=He.get(fa),P8=en(br,S0,dC);if(P8!==null){hi.push(fa);const T8=sn(fa,P8),{x:dpe,y:hpe}=T8,ppe=o.map([(dpe||0)+Ct,hpe||0]);Si.push([Object.assign(Object.assign({},T8),{element:fa}),ppe])}}const io=Array.from(new Set(Si.map(fa=>fa[0].x))),tc=io[$m(io,fa=>Math.abs(fa-Gt(br)))],nf=Si.filter(fa=>fa[0].x===tc),Hy=[...nf.map(fa=>fa[0]),...fr.map(fa=>fa.__data__)],Yy=[...hi,...fr],rf=HN(Yy,a,c,Hy,C);if(r&&rf.items.sort((fa,S0)=>r(fa)-r(S0)),i&&(rf.items=rf.items.filter(i)),Yy.length===0||XN(rf)){yr(Mn);return}if(g&&ZN({root:e,data:rf,x:Un[0]+Pn,y:Un[1]+Er,render:l,event:Mn,single:m,position:b,enterable:_,mount:S,bounding:O,css:R}),s){const fa=nf.map(dC=>dC[1]),S0=Tt(Z,"crosshairs");Nee(e,fa,Object.assign(Object.assign({},S0),{plotWidth:H,plotHeight:W,mainWidth:G,mainHeight:J,insetLeft:re,insetTop:he,startX:p,startY:v,transposed:L,polar:F}))}if(P){const fa=Tt(Z,"marker");kee(e,{data:nf,style:fa,theme:C})}u.emit("tooltip:show",Object.assign(Object.assign({},Mn),{nativeEvent:!0,data:{data:{x:dd(a.x,Gt(br),!0)}}}))},f,{leading:d,trailing:h}),yr=Mn=>{Xc({root:e,single:m,emitter:u,event:Mn}),s&&YN(e),P&&VN(e)},En=()=>{fS({root:e,single:m}),s&&YN(e),P&&VN(e)},zn=({nativeEvent:Mn,data:Un})=>{if(Mn)return;const{x:Xn}=Un.data,{x:Pn}=a,Er=Pn.map(Xn),[br,fr]=o.map([Er,.5]),{min:[hi,Si]}=e.getRenderBounds();An({offsetX:br+hi,offsetY:fr+Si})},ni=()=>{Xc({root:e,single:m,emitter:u,nativeEvent:!1})},Vi=()=>{Di(),En()},Go=()=>{ri()},ri=()=>{E||(e.addEventListener("pointerenter",An),e.addEventListener("pointermove",An),e.addEventListener("pointerleave",yr))},Di=()=>{E||(e.removeEventListener("pointerenter",An),e.removeEventListener("pointermove",An),e.removeEventListener("pointerleave",yr))};return ri(),u.on("tooltip:show",zn),u.on("tooltip:hide",ni),u.on("tooltip:disable",Vi),u.on("tooltip:enable",Go),()=>{Di(),u.off("tooltip:show",zn),u.off("tooltip:hide",ni),u.off("tooltip:disable",Vi),u.off("tooltip:enable",Go),T?Xc({root:e,single:m,emitter:u,nativeEvent:!1}):En()}}function Fee(e,{elements:t,scale:n,render:r,groupName:i,sort:a,filter:o,emitter:s,wait:l=50,leading:c=!0,trailing:u=!1,groupKey:f=T=>T,single:d=!0,position:h,enterable:p,datum:v,view:g,mount:m,bounding:b,theme:_,shared:S=!1,body:O=!0,disableNative:C=!1,preserve:E=!1,css:P={}}){const T=t(e),A=_i(T,f),R=Xu(G=>{const{target:J}=G,re=Dee(J);if(!re){Xc({root:e,single:d,emitter:s,event:G});return}const he=f(re),ce=A.get(he),ke=ce.length===1&&!S?Iee(ce[0]):HN(ce,n,i,void 0,_);if(a&&ke.items.sort((et,He)=>a(et)-a(He)),o&&(ke.items=ke.items.filter(o)),XN(ke)){Xc({root:e,single:d,emitter:s,event:G});return}const{offsetX:ot,offsetY:xt}=G;O&&ZN({root:e,data:ke,x:ot,y:xt,render:r,event:G,single:d,position:h,enterable:p,mount:m,bounding:b,css:P}),s.emit("tooltip:show",Object.assign(Object.assign({},G),{nativeEvent:!0,data:{data:FA(re,g)}}))},l,{leading:c,trailing:u}),z=G=>{Xc({root:e,single:d,emitter:s,event:G})},I=()=>{C||(e.addEventListener("pointermove",R),e.addEventListener("pointerleave",z))},L=()=>{C||(e.removeEventListener("pointermove",R),e.removeEventListener("pointerleave",z))},F=({nativeEvent:G,data:J})=>{if(G)return;const re=Y_(T,J.data,v);if(!re)return;const he=re.getBBox(),{x:ce,y:ke,width:ot,height:xt}=he;R({target:re,offsetX:ce+ot/2,offsetY:ke+xt/2})},Z=({nativeEvent:G}={})=>{G||Xc({root:e,single:d,emitter:s,nativeEvent:!1})},H=()=>{L(),fS({root:e,single:d})},W=()=>{I()};return s.on("tooltip:show",F),s.on("tooltip:hide",Z),s.on("tooltip:enable",W),s.on("tooltip:disable",H),I(),()=>{L(),s.off("tooltip:show",F),s.off("tooltip:hide",Z),E?Xc({root:e,single:d,emitter:s,nativeEvent:!1}):fS({root:e,single:d})}}function qN(e){const{shared:t,crosshairs:n,series:r,name:i,item:a=()=>({}),facet:o=!1}=e,s=Wp(e,["shared","crosshairs","series","name","item","facet"]);return(l,c,u)=>{const{container:f,view:d}=l,{scale:h,markState:p,coordinate:v,theme:g}=d,m=UN(p,"seriesTooltip"),b=UN(p,"crosshairs"),_=dl(f),S=dS(r,m);if(S&&jee(p)&&!o)return KN(_,Object.assign(Object.assign({},s),{theme:g,elements:zc,scale:h,coordinate:v,crosshairs:dS(n,b),item:a,emitter:u}));if(S&&o){const O=c.filter(R=>R!==l&&R.options.parentKey===l.options.key),C=RA(l,c),E=O[0].view.scale,P=_.getBounds(),T=P.min[0],A=P.min[1];return Object.assign(E,{facet:!0}),KN(_.parentNode.parentNode,Object.assign(Object.assign({},s),{theme:g,elements:()=>C,scale:E,coordinate:v,crosshairs:dS(n,b),item:a,startX:T,startY:A,emitter:u}))}return Fee(_,Object.assign(Object.assign({},s),{datum:zu(d),elements:zc,scale:h,coordinate:v,groupKey:t?H_(d):void 0,item:a,emitter:u,view:d,theme:g,shared:t}))}}qN.props={reapplyWhenUpdate:!0};var Gm=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const JN="legend-category",Bee="legend-continuous",zee="items-item",Zee="legend-category-item-marker",$ee="legend-category-item-label";function QN(e){return e.getElementsByClassName(Zee)[0]}function e4(e){return e.getElementsByClassName($ee)[0]}function t4(e){return e.getElementsByClassName(zee)}function hS(e){return e.getElementsByClassName(JN)}function n4(e){return e.getElementsByClassName(Bee)}function Wee(e,t){[...hS(e),...n4(e)].forEach(r=>{t(r,i=>i)})}function pS(e){let t=e.parentNode;for(;t&&!t.__data__;)t=t.parentNode;return t.__data__}function Zye(e){let t=e;for(;t&&!t.attr("class").startsWith("legend");)t=t.children[0];return t.attributes}function Gee(e,{legends:t,marker:n,label:r,datum:i,filter:a,emitter:o,channel:s,state:l={}}){const c=new Map,u=new Map,f=new Map,{unselected:d={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=l,h={unselected:Tt(d,"marker")},p={unselected:Tt(d,"label")},{setState:v,removeState:g}=Ul(h,void 0),{setState:m,removeState:b}=Ul(p,void 0),_=Array.from(t(e));let S=_.map(i);const O=()=>{for(const P of _){const T=i(P),A=n(P),R=r(P);S.includes(T)?(g(A,"unselected"),b(R,"unselected")):(v(A,"unselected"),m(R,"unselected"))}};for(const P of _){const T=()=>{Zc(e,"pointer")},A=()=>{$Y(e)},R=z=>Gm(this,void 0,void 0,function*(){const I=i(P),L=S.indexOf(I);L===-1?S.push(I):S.splice(L,1),S.length===0&&S.push(..._.map(i)),yield a(S),O();const{nativeEvent:F=!0}=z;F&&(S.length===_.length?o.emit("legend:reset",{nativeEvent:F}):o.emit("legend:filter",Object.assign(Object.assign({},z),{nativeEvent:F,data:{channel:s,values:S}})))});P.addEventListener("click",R),P.addEventListener("pointerenter",T),P.addEventListener("pointerout",A),c.set(P,R),u.set(P,T),f.set(P,A)}const C=P=>Gm(this,void 0,void 0,function*(){const{nativeEvent:T}=P;if(T)return;const{data:A}=P,{channel:R,values:z}=A;R===s&&(S=z,yield a(S),O())}),E=P=>Gm(this,void 0,void 0,function*(){const{nativeEvent:T}=P;T||(S=_.map(i),yield a(S),O())});return o.on("legend:filter",C),o.on("legend:reset",E),()=>{for(const P of _)P.removeEventListener("click",c.get(P)),P.removeEventListener("pointerenter",u.get(P)),P.removeEventListener("pointerout",f.get(P)),o.off("legend:filter",C),o.off("legend:reset",E)}}function Hee(e,{legend:t,filter:n,emitter:r,channel:i}){const a=({detail:{value:o}})=>{n(o),r.emit({nativeEvent:!0,data:{channel:i,values:o}})};return t.addEventListener("valuechange",a),()=>{t.removeEventListener("valuechange",a)}}function r4(e,{legend:t,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return Gm(this,void 0,void 0,function*(){const{view:l,update:c,setState:u}=e;u(t,f=>{const{marks:d}=f,h=d.map(p=>{if(p.type==="legends")return p;const{transform:v=[]}=p,g=v.findIndex(({type:_})=>_.startsWith("group")||_.startsWith("bin")),m=[...v];m.splice(g+1,0,{type:"filter",[n]:{value:r,ordinal:i}});const b=Object.fromEntries(a.map(_=>[_,{domain:l.scale[_].getOptions().domain}]));return Je({},p,Object.assign(Object.assign({transform:m,scale:b},!i&&{animate:!1}),{legend:s?!1:Object.fromEntries(o.map(_=>[_,{preserve:!0}]))}))});return Object.assign(Object.assign({},f),{marks:h})}),yield c()})}function Yee(e,t){for(const n of e)r4(n,Object.assign(Object.assign({},t),{facet:!0}))}function Vee(){return(e,t,n)=>{const{container:r}=e,i=t.filter(f=>f!==e),a=i.length>0,o=f=>pS(f).scales.map(d=>d.name),s=[...hS(r),...n4(r)],l=s.flatMap(o),c=a?Xu(Yee,50,{trailing:!0}):Xu(r4,50,{trailing:!0}),u=s.map(f=>{const{name:d,domain:h}=pS(f).scales[0],p=o(f),v={legend:f,channel:d,channels:p,allChannels:l};return f.className===JN?Gee(r,{legends:t4,marker:QN,label:e4,datum:g=>{const{__data__:m}=g,{index:b}=m;return h[b]},filter:g=>{const m=Object.assign(Object.assign({},v),{value:g,ordinal:!0});c(a?i:e,m)},state:f.attributes.state,channel:d,emitter:n}):Hee(r,{legend:f,filter:g=>{const m=Object.assign(Object.assign({},v),{value:g,ordinal:!1});c(a?i:e,m)},emitter:n,channel:d})});return()=>{u.forEach(f=>f())}}}function Uee(){return(e,t,n)=>{const{container:r,view:i,options:a}=e,o=hS(r),s=zc(r),l=h=>pS(h).scales[0].name,c=h=>{const{scale:{[h]:p}}=i;return p},u=pd(a,["active","inactive"]),f=wp(s,zu(i)),d=[];for(const h of o){const p=J=>{const{data:re}=h.attributes,{__data__:he}=J,{index:ce}=he;return re[ce].label},v=l(h),g=t4(h),m=c(v),b=_i(s,J=>m.invert(J.__data__[v])),{state:_={}}=h.attributes,{inactive:S={}}=_,{setState:O,removeState:C}=Ul(u,f),E={inactive:Tt(S,"marker")},P={inactive:Tt(S,"label")},{setState:T,removeState:A}=Ul(E),{setState:R,removeState:z}=Ul(P),I=J=>{for(const re of g){const he=QN(re),ce=e4(re);re===J||J===null?(A(he,"inactive"),z(ce,"inactive")):(T(he,"inactive"),R(ce,"inactive"))}},L=(J,re)=>{const he=p(re),ce=new Set(b.get(he));for(const ot of s)ce.has(ot)?O(ot,"active"):O(ot,"inactive");I(re);const{nativeEvent:ke=!0}=J;ke&&n.emit("legend:highlight",Object.assign(Object.assign({},J),{nativeEvent:ke,data:{channel:v,value:he}}))},F=new Map;for(const J of g){const re=he=>{L(he,J)};J.addEventListener("pointerover",re),F.set(J,re)}const Z=J=>{for(const he of s)C(he,"inactive","active");I(null);const{nativeEvent:re=!0}=J;re&&n.emit("legend:unhighlight",{nativeEvent:re})},H=J=>{const{nativeEvent:re,data:he}=J;if(re)return;const{channel:ce,value:ke}=he;if(ce!==v)return;const ot=g.find(xt=>p(xt)===ke);ot&&L({nativeEvent:!1},ot)},W=J=>{const{nativeEvent:re}=J;re||Z({nativeEvent:!1})};h.addEventListener("pointerleave",Z),n.on("legend:highlight",H),n.on("legend:unhighlight",W);const G=()=>{h.removeEventListener(Z),n.off("legend:highlight",H),n.off("legend:unhighlight",W);for(const[J,re]of F)J.removeEventListener(re)};d.push(G)}return()=>d.forEach(h=>h())}}var os=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Xee(e,t){const[n,r,i,a]=e,[o,s,l,c]=t;return!(o>i||l<n||s>a||c<r)}function Kee(e,t,n,r,i){const[a,o,s,l]=i;return[Math.max(a,Math.min(e,n)),Math.max(o,Math.min(t,r)),Math.min(s,Math.max(e,n)),Math.min(l,Math.max(t,r))]}function qee(e){const{width:t,height:n}=e.getBBox();return[0,0,t,n]}function Kl(e,t){for(const[n,r]of Object.entries(t))e.style(n,r)}const i4=cd(e=>{const t=e.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:l=10,document:c}=t,u=os(t,["x","y","width","height","class","renders","handleSize","document"]);if(!c||i===void 0||a===void 0||n===void 0||r===void 0)return;const f=l/2,d=(ke,ot,xt)=>{ke.handle||(ke.handle=xt.createElement("rect"),ke.append(ke.handle));const{handle:et}=ke;return et.attr(ot),et},h=Tt(U2(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,v=os(h,["render"]),g=Tt(u,"handleE"),{render:m=d}=g,b=os(g,["render"]),_=Tt(U2(u,"handleSE","handleSW"),"handleS"),{render:S=d}=_,O=os(_,["render"]),C=Tt(u,"handleW"),{render:E=d}=C,P=os(C,["render"]),T=Tt(u,"handleNW"),{render:A=d}=T,R=os(T,["render"]),z=Tt(u,"handleNE"),{render:I=d}=z,L=os(z,["render"]),F=Tt(u,"handleSE"),{render:Z=d}=F,H=os(F,["render"]),W=Tt(u,"handleSW"),{render:G=d}=W,J=os(W,["render"]),re=(ke,ot)=>{const{id:xt}=ke,et=ke.attributes,{x:He,y:jt}=et,Ct=os(et,["x","y"]),Gt=ot(ke,Object.assign({x:0,y:0},Ct),c);Gt.id=xt,Gt.style.draggable=!0},he=ke=>()=>{const ot=cd(xt=>re(xt,ke));return new ot({})},ce=gn(e).attr("className",o).style("x",n).style("y",r).style("draggable",!0);ce.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Kl,Object.assign({width:i,height:a},U2(u,"handle"))),ce.maybeAppend("handle-n",he(p)).style("x",f).style("y",-f).style("width",i-l).style("height",l).style("fill","transparent").call(Kl,v),ce.maybeAppend("handle-e",he(m)).style("x",i-f).style("y",f).style("width",l).style("height",a-l).style("fill","transparent").call(Kl,b),ce.maybeAppend("handle-s",he(S)).style("x",f).style("y",a-f).style("width",i-l).style("height",l).style("fill","transparent").call(Kl,O),ce.maybeAppend("handle-w",he(E)).style("x",-f).style("y",f).style("width",l).style("height",a-l).style("fill","transparent").call(Kl,P),ce.maybeAppend("handle-nw",he(A)).style("x",-f).style("y",-f).style("width",l).style("height",l).style("fill","transparent").call(Kl,R),ce.maybeAppend("handle-ne",he(I)).style("x",i-f).style("y",-f).style("width",l).style("height",l).style("fill","transparent").call(Kl,L),ce.maybeAppend("handle-se",he(Z)).style("x",i-f).style("y",a-f).style("width",l).style("height",l).style("fill","transparent").call(Kl,H),ce.maybeAppend("handle-sw",he(G)).style("x",-f).style("y",a-f).style("width",l).style("height",l).style("fill","transparent").call(Kl,J)});function vS(e,t){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=qee(e),brushRegion:l=(et,He,jt,Ct,Gt)=>[et,He,jt,Ct],reverse:c=!1,fill:u="#777",fillOpacity:f="0.3",stroke:d="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=t,p=os(t,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let v=null,g=null,m=null,b=null,_=null,S=!1;const[O,C,E,P]=s;Zc(e,"crosshair"),e.style.draggable=!0;const T=(et,He,jt)=>{if(a(jt),b&&b.remove(),_&&_.remove(),v=[et,He],c)return A();R()},A=()=>{_=new Ja({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),b=new i4({style:{x:0,y:0,width:0,height:0,draggable:!0,document:e.ownerDocument},className:"mask"}),e.appendChild(_),e.appendChild(b)},R=()=>{b=new i4({style:Object.assign(Object.assign({document:e.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:d,draggable:!0}),className:"mask"}),e.appendChild(b)},z=(et=!0)=>{b&&b.remove(),_&&_.remove(),v=null,g=null,m=null,S=!1,b=null,_=null,r(et)},I=(et,He,jt=!0)=>{const[Ct,Gt,en,an]=Kee(et[0],et[1],He[0],He[1],s),[sn,An,yr,En]=l(Ct,Gt,en,an,s);return c?F(sn,An,yr,En):L(sn,An,yr,En),n(sn,An,yr,En,jt),[sn,An,yr,En]},L=(et,He,jt,Ct)=>{b.style.x=et,b.style.y=He,b.style.width=jt-et,b.style.height=Ct-He},F=(et,He,jt,Ct)=>{_.style.d=`
|
|
M${O},${C}L${E},${C}L${E},${P}L${O},${P}Z
|
|
M${et},${He}L${et},${Ct}L${jt},${Ct}L${jt},${He}Z
|
|
`,b.style.x=et,b.style.y=He,b.style.width=jt-et,b.style.height=Ct-He},Z=et=>{const He=(An,yr,En,zn,ni)=>An+yr<zn?zn-yr:An+En>ni?ni-En:An,jt=et[0]-m[0],Ct=et[1]-m[1],Gt=He(jt,v[0],g[0],O,E),en=He(Ct,v[1],g[1],C,P),an=[v[0]+Gt,v[1]+en],sn=[g[0]+Gt,g[1]+en];I(an,sn)},H={"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"}},W=et=>J(et)||G(et),G=et=>{const{id:He}=et;return h.indexOf(He)===-1?!1:new Set(Object.keys(H)).has(He)},J=et=>et===b.getElementById("selection"),re=et=>{const{target:He}=et,[jt,Ct]=G_(e,et);if(!b||!W(He)){T(jt,Ct,et),S=!0;return}W(He)&&(m=[jt,Ct])},he=et=>{const{target:He}=et,jt=G_(e,et);if(!v)return;if(!m)return I(v,jt);if(J(He))return Z(jt);const[Ct,Gt]=[jt[0]-m[0],jt[1]-m[1]],{id:en}=He;if(H[en]){const[an,sn,An,yr]=H[en].vector;return I([v[0]+Ct*an,v[1]+Gt*sn],[g[0]+Ct*An,g[1]+Gt*yr])}},ce=et=>{if(m){m=null;const{x:en,y:an,width:sn,height:An}=b.style;v=[en,an],g=[en+sn,an+An],o(en,an,en+sn,an+An,et);return}g=G_(e,et);const[He,jt,Ct,Gt]=I(v,g);S=!1,i(He,jt,Ct,Gt,et)},ke=et=>{const{target:He}=et;b&&!W(He)&&z()},ot=et=>{const{target:He}=et;!b||!W(He)||S?Zc(e,"crosshair"):J(He)?Zc(e,"move"):G(He)&&Zc(e,H[He.id].cursor)},xt=()=>{Zc(e,"default")};return e.addEventListener("dragstart",re),e.addEventListener("drag",he),e.addEventListener("dragend",ce),e.addEventListener("click",ke),e.addEventListener("pointermove",ot),e.addEventListener("pointerleave",xt),{mask:b,move(et,He,jt,Ct,Gt=!0){b||T(et,He,{}),v=[et,He],g=[jt,Ct],I([et,He],[jt,Ct],Gt)},remove(et=!0){b&&z(et)},destroy(){b&&z(!1),Zc(e,"default"),e.removeEventListener("dragstart",re),e.removeEventListener("drag",he),e.removeEventListener("dragend",ce),e.removeEventListener("click",ke),e.removeEventListener("pointermove",ot),e.removeEventListener("pointerleave",xt)}}}function gS(e,t,n){return t.filter(r=>{if(r===e)return!1;const{interaction:i={}}=r.options;return Object.values(i).find(a=>a.brushKey===n)})}function Jee(e,t,n){return gS(e,t,n).map(r=>dl(r.container))}function Qee(e,t,n){return gS(e,t,n).map(r=>r.options)}function a4(e,t){var{elements:n,selectedHandles:r,siblings:i=he=>[],datum:a,brushRegion:o,extent:s,reverse:l,scale:c,coordinate:u,series:f=!1,key:d=he=>he,bboxOf:h=he=>{const{x:ce,y:ke,width:ot,height:xt}=he.style;return{x:ce,y:ke,width:ot,height:xt}},state:p={},emitter:v}=t,g=os(t,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const m=n(e),b=i(e),_=b.flatMap(n),S=wp(m,a),O=Tt(g,"mask"),{setState:C,removeState:E}=Ul(p,S),P=new Map,{width:T,height:A,x:R=0,y:z=0}=h(e),I=s||[0,0,T,A],L=()=>{for(const he of[...m,..._])E(he,"active","inactive")},F=(he,ce,ke,ot)=>{var xt;for(const He of b)(xt=He.brush)===null||xt===void 0||xt.remove();const et=new Set;for(const He of m){const{min:jt,max:Ct}=He.getLocalBounds(),[Gt,en]=jt,[an,sn]=Ct;Xee([Gt,en,an,sn],[he,ce,ke,ot])?(C(He,"active"),et.add(d(He))):C(He,"inactive")}for(const He of _)et.has(d(He))?C(He,"active"):C(He,"inactive")},Z=()=>{for(const he of m)E(he,"inactive");for(const he of P.values())he.remove();P.clear()},H=(he,ce,ke,ot)=>{const xt=et=>{const He=et.cloneNode();return He.__data__=et.__data__,et.parentNode.appendChild(He),P.set(et,He),He};for(const et of m){const He=P.get(et)||xt(et);He.style.clipPath=new Pu({style:{x:he+R,y:ce+z,width:ke-he,height:ot-ce}}),C(et,"inactive"),C(He,"active")}},W=vS(e,Object.assign(Object.assign({},O),{extent:I,brushRegion:o,reverse:l,selectedHandles:r,brushended:he=>{const ce=f?Z:L;he&&v.emit("brush:remove",{nativeEvent:!0}),ce()},brushed:(he,ce,ke,ot,xt)=>{const et=Jg(he,ce,ke,ot,c,u);xt&&v.emit("brush:highlight",{nativeEvent:!0,data:{selection:et}}),(f?H:F)(he,ce,ke,ot)},brushcreated:(he,ce,ke,ot,xt)=>{const et=Jg(he,ce,ke,ot,c,u);v.emit("brush:end",Object.assign(Object.assign({},xt),{nativeEvent:!0,data:{selection:et}}))},brushupdated:(he,ce,ke,ot,xt)=>{const et=Jg(he,ce,ke,ot,c,u);v.emit("brush:end",Object.assign(Object.assign({},xt),{nativeEvent:!0,data:{selection:et}}))},brushstarted:he=>{v.emit("brush:start",he)}})),G=({nativeEvent:he,data:ce})=>{if(he)return;const{selection:ke}=ce,[ot,xt,et,He]=PY(ke,c,u);W.move(ot,xt,et,He,!1)};v.on("brush:highlight",G);const J=({nativeEvent:he}={})=>{he||W.remove(!1)};v.on("brush:remove",J);const re=W.destroy.bind(W);return W.destroy=()=>{v.off("brush:highlight",G),v.off("brush:remove",J),re()},W}function mS(e){var{facet:t,brushKey:n}=e,r=os(e,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:l,options:c}=i,u=dl(s),f={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},d=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:p}=l;if(t){const g=u.getBounds(),m=g.min[0],b=g.min[1],_=g.max[0],S=g.max[1];return a4(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>RA(i,a),datum:zu($_(i,a).map(O=>O.view)),brushRegion:(O,C,E,P)=>[O,C,E,P],extent:[m,b,_,S],state:pd($_(i,a).map(O=>O.options),d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r))}const v=a4(u,Object.assign(Object.assign({elements:zc,key:g=>g.__data__.key,siblings:()=>Jee(i,a,n),datum:zu([l,...gS(i,a,n).map(g=>g.view)]),brushRegion:(g,m,b,_)=>[g,m,b,_],extent:void 0,state:pd([c,...Qee(i,a,n)],d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r));return u.brush=v,()=>v.destroy()}}function yS(e,t,n,r,i){const[,a,,o]=i;return[e,a,n,o]}function ete(e){return mS(Object.assign(Object.assign({},e),{brushRegion:yS,selectedHandles:["handle-e","handle-w"]}))}function bS(e,t,n,r,i){const[a,,o]=i;return[a,t,o,r]}function tte(e){return mS(Object.assign(Object.assign({},e),{brushRegion:bS,selectedHandles:["handle-n","handle-s"]}))}var xS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const nte="axis",rte="axis-line",ite="axis-main-group",o4="axis-hot-area";function ate(e){return e.getElementsByClassName(nte)}function s4(e){return e.getElementsByClassName(rte)[0]}function ote(e){return e.getElementsByClassName(ite)[0]}function l4(e){return ote(e).getLocalBounds()}function ste(e,t){var{cross:n,offsetX:r,offsetY:i}=t,a=xS(t,["cross","offsetX","offsetY"]);const o=l4(e),s=s4(e),[l]=s.getLocalBounds().min,[c,u]=o.min,[f,d]=o.max,h=(f-c)*2;return{brushRegion:bS,hotZone:new Pu({className:o4,style:Object.assign({x:n?c:l-h/2,width:n?h/2:h,y:u,height:d-u},a)}),extent:n?(p,v,g,m)=>[-1/0,v,1/0,m]:(p,v,g,m)=>[Math.floor(c-r),v,Math.ceil(f-r),m]}}function lte(e,t){var{offsetY:n,offsetX:r,cross:i=!1}=t,a=xS(t,["offsetY","offsetX","cross"]);const o=l4(e),s=s4(e),[,l]=s.getLocalBounds().min,[c,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:yS,hotZone:new Pu({className:o4,style:Object.assign({x:c,width:f-c,y:i?u:l-h,height:i?h:h*2},a)}),extent:i?(p,v,g,m)=>[p,-1/0,g,1/0]:(p,v,g,m)=>[p,Math.floor(u-n),g,Math.ceil(d-n)]}}function cte(e,t){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={},emitter:f,coordinate:d}=t,h=xS(t,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(e),v=n(e),g=wp(p,o),{setState:m,removeState:b}=Ul(u,g),_=new Map,S=Tt(h,"mask"),O=G=>Array.from(_.values()).every(([J,re,he,ce])=>G.some(([ke,ot])=>ke>=J&&ke<=he&&ot>=re&&ot<=ce)),C=v.map(G=>G.attributes.scale),E=G=>G.length>2?[G[0],G[G.length-1]]:G,P=new Map,T=()=>{P.clear();for(let G=0;G<v.length;G++){const J=C[G],{domain:re}=J.getOptions();P.set(G,E(re))}};T();const A=(G,J)=>{const re=[];for(const ce of p){const ke=i(ce);O(ke)?(m(ce,"active"),re.push(ce)):m(ce,"inactive")}if(P.set(G,z(re,G)),!J)return;const he=()=>{if(!I)return Array.from(P.values());const ce=[];for(const[ke,ot]of P){const xt=C[ke],{name:et}=xt.getOptions();et==="x"?ce[0]=ot:ce[1]=ot}return ce};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:he()}})},R=G=>{for(const J of p)b(J,"active","inactive");T(),G&&f.emit("brushAxis:remove",{nativeEvent:!0})},z=(G,J)=>{const re=C[J],{name:he}=re.getOptions(),ce=G.map(ke=>{const ot=ke.__data__;return re.invert(ot[he])});return E(Bc(re,ce))},I=v.some(a)&&v.some(G=>!a(G)),L=[];for(let G=0;G<v.length;G++){const J=v[G],re=a(J)?lte:ste,{hotZone:he,brushRegion:ce,extent:ke}=re(J,{offsetY:s,offsetX:l,cross:I,zIndex:999,fill:"transparent"});J.parentNode.appendChild(he);const ot=vS(he,Object.assign(Object.assign({},S),{reverse:c,brushRegion:ce,brushended(xt){_.delete(J),Array.from(_.entries()).length===0?R(xt):A(G,xt)},brushed(xt,et,He,jt,Ct){_.set(J,ke(xt,et,He,jt)),A(G,Ct)}}));L.push(ot)}const F=(G={})=>{const{nativeEvent:J}=G;J||L.forEach(re=>re.remove(!1))},Z=(G,J,re)=>{const[he,ce]=G,ke=et=>et.getStep?et.getStep():0,ot=H(he,J,re),xt=H(ce,J,re)+ke(J);return a(re)?[ot,-1/0,xt,1/0]:[-1/0,ot,1/0,xt]},H=(G,J,re)=>{const{height:he,width:ce}=d.getOptions(),ke=J.clone();return a(re)?ke.update({range:[0,ce]}):ke.update({range:[he,0]}),ke.map(G)},W=G=>{const{nativeEvent:J}=G;if(J)return;const{selection:re}=G.data;for(let he=0;he<L.length;he++){const ce=re[he],ke=L[he],ot=v[he];if(ce){const xt=C[he];ke.move(...Z(ce,xt,ot),!1)}else ke.remove(!1)}};return f.on("brushAxis:remove",F),f.on("brushAxis:highlight",W),()=>{L.forEach(G=>G.destroy()),f.off("brushAxis:remove",F),f.off("brushAxis:highlight",W)}}function ute(e){return(t,n,r)=>{const{container:i,view:a,options:o}=t,s=dl(i),{x:l,y:c}=s.getBBox(),{coordinate:u}=a;return cte(i,Object.assign({elements:zc,axes:ate,offsetY:c,offsetX:l,points:f=>f.__data__.points,horizontal:f=>{const{startPos:[d,h],endPos:[p,v]}=f.attributes;return d!==p&&h===v},datum:zu(a),state:pd(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},e))}}var fte=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},c4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function dte(e=300){let t=null;return n=>{const{timeStamp:r}=n;return t!==null&&r-t<e?(t=r,!0):(t=r,!1)}}function hte(e,t){var{filter:n,reset:r,brushRegion:i,extent:a,reverse:o,emitter:s,scale:l,coordinate:c,selection:u,series:f=!1}=t,d=c4(t,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=Tt(d,"mask"),{width:p,height:v}=e.getBBox(),g=a||[0,0,p,v],m=dte(),b=vS(e,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:_}));e.addEventListener("click",S);function _(C,E,P,T,A){A.nativeEvent=!0,n(u(C,E,P,T),A),b.remove()}function S(C){m(C)&&(C.nativeEvent=!0,r(C))}const O=({nativeEvent:C,data:E})=>{if(C)return;const{selection:P}=E;n(P,{nativeEvent:!1})};return s.on("brush:filter",O),()=>{b.destroy(),s.off("brush:filter",O),e.removeEventListener("click",S)}}function _S(e){var{hideX:t=!0,hideY:n=!0}=e,r=c4(e,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:l,options:c,update:u,setState:f}=i,d=dl(s),h={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1};let p=!1,v=!1,g=l;const{scale:m,coordinate:b}=l;return hte(d,Object.assign(Object.assign({brushRegion:(_,S,O,C)=>[_,S,O,C],selection:(_,S,O,C)=>{const{scale:E,coordinate:P}=g;return Jg(_,S,O,C,E,P)},filter:(_,S)=>fte(this,void 0,void 0,function*(){if(v)return;v=!0;const[O,C]=_;f("brushFilter",P=>{const{marks:T}=P,A=T.map(R=>Je({axis:Object.assign(Object.assign({},t&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},R,{scale:{x:{domain:O,nice:!1},y:{domain:C,nice:!1}}}));return Object.assign(Object.assign({},c),{marks:A,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},S),{data:{selection:[O,C]}})),g=(yield u()).view,v=!1,p=!0}),reset:_=>{if(v||!p)return;const{scale:S}=l,{x:O,y:C}=S,E=O.getOptions().domain,P=C.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},_),{data:{selection:[E,P]}})),p=!1,g=l,f("brushFilter"),u()},extent:void 0,emitter:o,scale:m,coordinate:b},h),r))}}function pte(e){return _S(Object.assign(Object.assign({hideX:!0},e),{brushRegion:yS}))}function vte(e){return _S(Object.assign(Object.assign({hideY:!0},e),{brushRegion:bS}))}var gte=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const mte="slider";function yte(e,t,n,r=!1,i="x",a="y"){const{marks:o}=e,s=o.map(l=>{var c,u;return Je({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},l,{scale:t,[n]:Object.assign(Object.assign({},((c=l[n])===null||c===void 0?void 0:c[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),((u=l[n])===null||u===void 0?void 0:u[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},e),{marks:s,clip:!0,animate:!1})}function bte(e,t,n){const[r,i]=e,a=n?l=>1-l:l=>l,o=dd(t,a(r),!0),s=dd(t,a(i),!1);return Bc(t,[o,s])}function Hm(e){return[e[0],e[e.length-1]]}function u4({initDomain:e={},className:t=mte,prefix:n="slider",setValue:r=(c,u)=>c.setValues(u),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1,getInitValues:l=c=>{var u;const f=(u=c==null?void 0:c.attributes)===null||u===void 0?void 0:u.values;if(f[0]!==0||f[1]!==1)return f}}){return(c,u,f)=>{const{container:d,view:h,update:p,setState:v}=c,g=d.getElementsByClassName(t);if(!g.length)return()=>{};let m=!1;const{scale:b,coordinate:_,layout:S}=h,{paddingLeft:O,paddingTop:C,paddingBottom:E,paddingRight:P}=S,{x:T,y:A}=b,R=ci(_),z=Z=>{const H=Z==="vertical"?"y":"x",W=Z==="vertical"?"x":"y";return R?[W,H]:[H,W]},I=new Map,L=new Set,F={x:e.x||T.getOptions().domain,y:e.y||A.getOptions().domain};for(const Z of g){const{orientation:H}=Z.attributes,[W,G]=z(H),J=`${n}${Rc(W)}:filter`,re=W==="x",{ratio:he}=T.getOptions(),{ratio:ce}=A.getOptions(),ke=He=>{if(He.data){const{selection:an}=He.data,[sn=Hm(F.x),An=Hm(F.y)]=an;return re?[Bc(T,sn,he),Bc(A,An,ce)]:[Bc(A,An,ce),Bc(T,sn,he)]}const{value:jt}=He.detail,Ct=b[W],Gt=bte(jt,Ct,R&&H==="horizontal"),en=F[G];return[Gt,en]},ot=Xu(He=>gte(this,void 0,void 0,function*(){const{initValue:jt=!1}=He;if(m&&!jt)return;m=!0;const{nativeEvent:Ct=!0}=He,[Gt,en]=ke(He);if(F[W]=Gt,F[G]=en,Ct){const an=re?Gt:en,sn=re?en:Gt;f.emit(J,Object.assign(Object.assign({},He),{nativeEvent:Ct,data:{selection:[Hm(an),Hm(sn)]}}))}v(Z,an=>Object.assign(Object.assign({},yte(an,{[W]:{domain:Gt,nice:!1}},n,i,W,G)),{paddingLeft:O,paddingTop:C,paddingBottom:E,paddingRight:P})),yield p(),m=!1}),a,{leading:o,trailing:s}),xt=He=>{const{nativeEvent:jt}=He;if(jt)return;const{data:Ct}=He,{selection:Gt}=Ct,[en,an]=Gt;Z.dispatchEvent(new Gr("valuechange",{data:Ct,nativeEvent:!1}));const sn=re?Qg(en,T):Qg(an,A);r(Z,sn)};f.on(J,xt),Z.addEventListener("valuechange",ot),I.set(Z,ot),L.add([J,xt]);const et=l(Z);et&&Z.dispatchEvent(new Gr("valuechange",{detail:{value:et},nativeEvent:!1,initValue:!0}))}return p(),()=>{for(const[Z,H]of I)Z.removeEventListener("valuechange",H);for(const[Z,H]of L)f.off(Z,H)}}}const f4="g2-scrollbar";function xte(e={}){return(t,n,r)=>{const{view:i,container:a}=t;if(!a.getElementsByClassName(f4).length)return()=>{};const{scale:s}=i,{x:l,y:c}=s,u={x:[...l.getOptions().domain],y:[...c.getOptions().domain]};return l.update({domain:l.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain}),u4(Object.assign(Object.assign({},e),{initDomain:u,className:f4,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0]),getInitValues:d=>{const h=d.slider.attributes.values;if(h[0]!==0)return h}}))(t,n,r)}}var _te=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function wte(e,t,n){return`<${e} style="${Object.entries(n).map(([r,i])=>`${tY(r)}:${i}`).join(";")}">${t}</${e}>`}const Ste={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 d4(e){return e.nodeName!=="text"?!1:!!e.isOverflowing()}function h4(e){var{offsetX:t=8,offsetY:n=8}=e,r=_te(e,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,l=Tt(r,"tip"),c=new Set,u=d=>{const{target:h}=d;if(!d4(h)){d.stopPropagation();return}const{offsetX:p,offsetY:v}=d,g=p+t-o,m=v+n-s;if(h.tip){h.tip.style.x=g,h.tip.style.y=m;return}const{text:b}=h.style,_=new tg({className:"poptip",style:{innerHTML:wte("div",b,Object.assign(Object.assign({},Ste),l)),x:g,y:m}});a.appendChild(_),h.tip=_,c.add(_)},f=d=>{const{target:h}=d;if(!d4(h)){d.stopPropagation();return}h.tip&&(h.tip.remove(),h.tip=null,c.delete(h.tip))};return a.addEventListener("pointerover",u),a.addEventListener("pointerout",f),()=>{a.removeEventListener("pointerover",u),a.removeEventListener("pointerout",f),c.forEach(d=>d.remove())}}}h4.props={reapplyWhenUpdate:!0};function Ote(e,t){var n=gw(t),r=n.length;if(Bt(e))return!r;for(var i=0;i<r;i+=1){var a=n[i];if(t[a]!==e[a]||!(a in e))return!1}return!0}var Cte=Ote;function Ete(e,t){if(!ua(e))return null;var n;if(bo(t)&&(n=t),zl(t)&&(n=function(i){return Cte(i,t)}),n){for(var r=0;r<e.length;r+=1)if(n(e[r]))return e[r]}return null}var Pd=Ete;function Ym(e){return e==null?null:p4(e)}function p4(e){if(typeof e!="function")throw new Error;return e}var Mte={depth:-1},v4={},wS={};function Pte(e){return e.id}function Tte(e){return e.parentId}function SS(){var e=Pte,t=Tte,n;function r(i){var a=Array.from(i),o=e,s=t,l,c,u,f,d,h,p,v,g=new Map;if(n!=null){var m=a.map(function(P,T){return Ate(n(P,T,i))}),b=m.map(g4),_=new Set(m).add(""),S=fw(b),O;try{for(S.s();!(O=S.n()).done;){var C=O.value;_.has(C)||(_.add(C),m.push(C),b.push(g4(C)),a.push(wS))}}catch(P){S.e(P)}finally{S.f()}o=function(T,A){return m[A]},s=function(T,A){return b[A]}}for(u=0,l=a.length;u<l;++u)c=a[u],h=a[u]=new xd(c),(p=o(c,u,i))!=null&&(p+="")&&(v=h.id=p,g.set(v,g.has(v)?v4:h)),(p=s(c,u,i))!=null&&(p+="")&&(h.parent=p);for(u=0;u<l;++u)if(h=a[u],p=h.parent){if(d=g.get(p),!d)throw new Error("missing: "+p);if(d===v4)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");if(n!=null){for(;f.data===wS&&f.children.length===1;)f=f.children[0],--l;for(var E=a.length-1;E>=0&&(h=a[E],h.data===wS);--E)h.data=null}if(f.parent=Mte,f.eachBefore(function(P){P.depth=P.parent.depth+1,--l}).eachBefore(v5),f.parent=null,l>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(e=Ym(i),r):e},r.parentId=function(i){return arguments.length?(t=Ym(i),r):t},r.path=function(i){return arguments.length?(n=Ym(i),r):n},r}function Ate(e){e="".concat(e);var t=e.length;return OS(e,t-1)&&!OS(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:"/".concat(e)}function g4(e){var t=e.length;if(t<2)return"";for(;--t>1&&!OS(e,t););return e.slice(0,t)}function OS(e,t){if(e[t]==="/"){for(var n=0;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function Rte(e,t,n,r,i){var a=e.children,o,s=a.length,l,c=new Array(s+1);for(c[0]=l=o=0;o<s;++o)c[o+1]=l+=a[o].value;u(0,s,e.value,t,n,r,i);function u(f,d,h,p,v,g,m){if(f>=d-1){var b=a[f];b.x0=p,b.y0=v,b.x1=g,b.y1=m;return}for(var _=c[f],S=h/2+_,O=f+1,C=d-1;O<C;){var E=O+C>>>1;c[E]<S?O=E+1:C=E}S-c[O-1]<c[O]-S&&f+1<O&&--O;var P=c[O]-_,T=h-P;if(g-p>m-v){var A=h?(p*T+g*P)/h:g;u(f,O,P,p,v,A,m),u(O,d,T,A,v,g,m)}else{var R=h?(v*T+m*P)/h:m;u(f,O,P,p,v,g,R),u(O,d,T,p,R,g,m)}}}function Vm(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}function Ite(e,t,n,r,i){(e.depth&1?Vm:Ep)(e,t,n,r,i)}var m4=(1+Math.sqrt(5))/2;function y4(e,t,n,r,i,a){for(var o=[],s=t.children,l,c,u=0,f=0,d=s.length,h,p,v=t.value,g,m,b,_,S,O,C;u<d;){h=i-n,p=a-r;do g=s[f++].value;while(!g&&f<d);for(m=b=g,O=Math.max(p/h,h/p)/(v*e),C=g*g*O,S=Math.max(b/C,C/m);f<d;++f){if(g+=c=s[f].value,c<m&&(m=c),c>b&&(b=c),C=g*g*O,_=Math.max(b/C,C/m),_>S){g-=c;break}S=_}o.push(l={value:g,dice:h<p,children:s.slice(u,f)}),l.dice?Ep(l,n,r,i,v?r+=p*g/v:a):Vm(l,n,r,v?n+=h*g/v:i,a),v-=g,u=f}return o}var b4=function e(t){function n(r,i,a,o,s){y4(t,r,i,a,o,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(m4),Lte=function e(t){function n(r,i,a,o,s){if((l=r._squarify)&&l.ratio===t)for(var l,c,u,f,d=-1,h,p=l.length,v=r.value;++d<p;){for(c=l[d],u=c.children,f=c.value=0,h=u.length;f<h;++f)c.value+=u[f].value;c.dice?Ep(c,i,a,o,v?a+=(s-a)*c.value/v:s):Vm(c,i,a,v?i+=(o-i)*c.value/v:o,s),v-=c.value}else r._squarify=l=y4(t,r,i,a,o,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(m4);function Ku(){return 0}function Td(e){return function(){return e}}function Nte(){var e=b4,t=!1,n=1,r=1,i=[0],a=Ku,o=Ku,s=Ku,l=Ku,c=Ku;function u(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],t&&d.eachBefore(d5),d}function f(d){var h=i[d.depth],p=d.x0+h,v=d.y0+h,g=d.x1-h,m=d.y1-h;g<p&&(p=g=(p+g)/2),m<v&&(v=m=(v+m)/2),d.x0=p,d.y0=v,d.x1=g,d.y1=m,d.children&&(h=i[d.depth+1]=a(d)/2,p+=c(d)-h,v+=o(d)-h,g-=s(d)-h,m-=l(d)-h,g<p&&(p=g=(p+g)/2),m<v&&(v=m=(v+m)/2),e(d,p,v,g,m))}return u.round=function(d){return arguments.length?(t=!!d,u):t},u.size=function(d){return arguments.length?(n=+d[0],r=+d[1],u):[n,r]},u.tile=function(d){return arguments.length?(e=p4(d),u):e},u.padding=function(d){return arguments.length?u.paddingInner(d).paddingOuter(d):u.paddingInner()},u.paddingInner=function(d){return arguments.length?(a=typeof d=="function"?d:Td(+d),u):a},u.paddingOuter=function(d){return arguments.length?u.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):u.paddingTop()},u.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:Td(+d),u):o},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:Td(+d),u):s},u.paddingBottom=function(d){return arguments.length?(l=typeof d=="function"?d:Td(+d),u):l},u.paddingLeft=function(d){return arguments.length?(c=typeof d=="function"?d:Td(+d),u):c},u}function kte(e,t){return Array.isArray(e)?typeof t=="function"?SS().path(t)(e):SS()(e):bd(e)}function x4(e,t=[e.data.name]){e.id=e.id||e.data.name,e.path=t,e.children&&e.children.forEach(n=>{n.id=`${e.id}/${n.data.name}`,n.path=[...t,n.data.name],x4(n,n.path)})}function _4(e){const t=wr(e,["data","name"]);t.replaceAll&&(e.path=t.replaceAll(".","/").split("/")),e.children&&e.children.forEach(n=>{_4(n)})}function jte(e,t){const n={treemapBinary:Rte,treemapDice:Ep,treemapSlice:Vm,treemapSliceDice:Ite,treemapSquarify:b4,treemapResquarify:Lte},r=e==="treemapSquarify"?n[e].ratio(t):n[e];if(!r)throw new TypeError("Invalid tile method!");return r}function w4(e,t,n){const{value:r}=n,i=jte(t.tile,t.ratio),a=kte(e,t.path);ua(e)?_4(a):x4(a),r?a.sum(l=>t.ignoreParentValue&&l.children?0:ml(r)(l)).sort(t.sort):a.count(),Nte().tile(i).size(t.size).round(t.round).paddingInner(t.paddingInner).paddingOuter(t.paddingOuter).paddingTop(t.paddingTop).paddingRight(t.paddingRight).paddingBottom(t.paddingBottom).paddingLeft(t.paddingLeft)(a);const o=a.descendants().map(l=>Object.assign(l,{id:l.id.replace(/^\//,""),x:[l.x0,l.x1],y:[l.y0,l.y1]}));return[o.filter(typeof t.layer=="function"?t.layer:l=>l.height===t.layer),o]}var Dte=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Fte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Bte(e){return gn(e).select(`.${Uh}`).node()}const zte={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function Zte(e={}){const{originData:t=[],layout:n}=e,r=Fte(e,["originData","layout"]),i=Je({},zte,r),a=Tt(i,"breadCrumb"),o=Tt(i,"active");return s=>{const{update:l,setState:c,container:u,options:f}=s,d=Bte(u),h=f.marks[0],{state:p}=h,v=new xa;d.appendChild(v);const g=(S,O)=>Dte(this,void 0,void 0,function*(){if(v.removeChildren(),O){let C="",E=a.y,P=0;const T=[],A=d.getBBox().width,R=S.map((z,I)=>{C=`${C}${z}/`,T.push(z);const L=new rs({name:C.replace(/\/$/,""),style:Object.assign(Object.assign({text:z,x:P,path:[...T],depth:I},a),{y:E})});v.appendChild(L),P+=L.getBBox().width;const F=new rs({style:Object.assign(Object.assign({x:P,text:" / "},a),{y:E})});return v.appendChild(F),P+=F.getBBox().width,P>A&&(E=v.getBBox().height+a.y,P=0,L.attr({x:P,y:E}),P+=L.getBBox().width,F.attr({x:P,y:E}),P+=F.getBBox().width),I===hw(S)-1&&F.remove(),L});R.forEach((z,I)=>{if(I===hw(R)-1)return;const L=Object.assign({},z.attributes);z.attr("cursor","pointer"),z.addEventListener("mouseenter",()=>{z.attr(o)}),z.addEventListener("mouseleave",()=>{z.attr(L)}),z.addEventListener("click",()=>{g(wr(z,["style","path"]),wr(z,["style","depth"]))})})}Wee(u,c),c("treemapDrillDown",C=>{const{marks:E}=C,P=S.join("/"),T=E.map(A=>{if(A.type!=="rect")return A;let R=t;if(O){const I=t.filter(W=>{const G=wr(W,["id"]);return G&&(G.match(`${P}/`)||P.match(G))}).map(W=>({value:W.height===0?wr(W,["value"]):void 0,name:wr(W,["id"])})),{paddingLeft:L,paddingBottom:F,paddingRight:Z}=n,H=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||v.getBBox().height+10)/(O+1),paddingLeft:L/(O+1),paddingBottom:F/(O+1),paddingRight:Z/(O+1),path:W=>W.name,layer:W=>W.depth===O+1});R=w4(I,H,{value:"value"})[0]}else R=t.filter(I=>I.depth===1);const z=[];return R.forEach(({path:I})=>{z.push(Fp(I))}),Je({},A,{data:R,scale:{color:{domain:z}}})});return Object.assign(Object.assign({},C),{marks:T})}),yield l(void 0,["legendFilter"])}),m=S=>{const O=S.target;if(wr(O,["markType"])!=="rect")return;const C=wr(O,["__data__","key"]),E=Pd(t,P=>P.id===C);wr(E,"height")&&g(wr(E,"path"),wr(E,"depth"))};d.addEventListener("click",m);const b=gw(Object.assign(Object.assign({},p.active),p.inactive)),_=()=>{DA(d).forEach(O=>{const C=wr(O,["style","cursor"]),E=Pd(t,P=>P.id===wr(O,["__data__","key"]));if(C!=="pointer"&&(E!=null&&E.height)){O.style.cursor="pointer";const P=uw(O.attributes,b);O.addEventListener("mouseenter",()=>{O.attr(p.active)}),O.addEventListener("mouseleave",()=>{O.attr(Je(P,p.inactive))})}})};return _(),d.addEventListener("mousemove",_),()=>{v.remove(),d.removeEventListener("click",m),d.removeEventListener("mousemove",_)}}}var CS=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},$te=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Wte={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},ES="movePoint",S4=e=>{const t=e.target,{markType:n}=t;n==="line"&&(t.attr("_lineWidth",t.attr("lineWidth")||1),t.attr("lineWidth",t.attr("_lineWidth")+3)),n==="interval"&&(t.attr("_opacity",t.attr("opacity")||1),t.attr("opacity",.7*t.attr("_opacity")))},O4=e=>{const t=e.target,{markType:n}=t;n==="line"&&t.attr("lineWidth",t.attr("_lineWidth")),n==="interval"&&t.attr("opacity",t.attr("_opacity"))},Gte=(e,t,n)=>t.map(r=>["x","color"].reduce((a,o)=>{const s=n[o];return s&&r[s]!==e[s]?!1:a},!0)?Object.assign(Object.assign({},r),e):r),Hte=e=>{const t=wr(e,["__data__","y"]),r=wr(e,["__data__","y1"])-t,{__data__:{data:i,encode:a,transform:o},childNodes:s}=e.parentNode,l=Pd(o,({type:f})=>f==="normalizeY"),c=wr(a,["y","field"]),u=i[s.indexOf(e)][c];return(f,d=!1)=>l||d?f/(1-f)/(r/(1-r))*u:f},Yte=(e,t)=>{const n=wr(e,["__data__","seriesItems",t,"0","value"]),r=wr(e,["__data__","seriesIndex",t]),{__data__:{data:i,encode:a,transform:o}}=e.parentNode,s=Pd(o,({type:u})=>u==="normalizeY"),l=wr(a,["y","field"]),c=i[r][l];return u=>s?n===1?u:u/(1-u)/(n/(1-n))*c:u},C4=(e,t,n)=>{e.forEach((r,i)=>{r.attr("stroke",t[1]===i?n.activeStroke:n.stroke)})},E4=(e,t,n,r)=>{const i=new Ja({style:n}),a=new rs({style:r});return t.appendChild(a),e.appendChild(i),[i,a]},M4=(e,t)=>{if(!wr(e,["options","range","indexOf"]))return;const r=e.options.range.indexOf(t);return e.sortedDomain[r]},MS=(e,t,n)=>{const r=am(e,t),a=am(e,n)/r,o=e[0]+(t[0]-e[0])*a,s=e[1]+(t[1]-e[1])*a;return[o,s]};function Vte(e={}){const{selection:t=[],precision:n=2}=e,r=$te(e,["selection","precision"]),i=Object.assign(Object.assign({},Wte),r||{}),a=Tt(i,"path"),o=Tt(i,"label"),s=Tt(i,"point");return(l,c,u)=>{const{update:f,setState:d,container:h,view:p,options:{marks:v,coordinate:g}}=l,m=dl(h);let b=DA(m),_,S=t;const{transform:O=[],type:C}=g,E=!!Pd(O,({type:W})=>W==="transpose"),P=C==="polar",T=C==="theta",A=!!Pd(b,({markType:W})=>W==="area");A&&(b=b.filter(({markType:W})=>W==="area"));const R=new xa({style:{zIndex:2}});m.appendChild(R);const z=()=>{u.emit("element-point:select",{nativeEvent:!0,data:{selection:S}})},I=(W,G)=>{u.emit("element-point:moved",{nativeEvent:!0,data:{changeData:W,data:G}})},L=W=>{const G=W.target;S=[G.parentNode.childNodes.indexOf(G)],z(),Z(G)},F=W=>{const{data:{selection:G},nativeEvent:J}=W;if(J)return;S=G;const re=wr(b,[S==null?void 0:S[0]]);re&&Z(re)},Z=W=>{const{attributes:G,markType:J,__data__:re}=W,{stroke:he}=G,{points:ce,seriesTitle:ke,color:ot,title:xt,seriesX:et,y1:He}=re;if(E&&J!=="interval")return;const{scale:jt,coordinate:Ct}=(_==null?void 0:_.view)||p,{color:Gt,y:en,x:an}=jt,sn=Ct.getCenter();R.removeChildren();let An;const yr=(En,zn,ni,Vi)=>CS(this,void 0,void 0,function*(){return d("elementPointMove",Go=>{var ri;const Di=(((ri=_==null?void 0:_.options)===null||ri===void 0?void 0:ri.marks)||v).map(Mn=>{if(!Vi.includes(Mn.type))return Mn;const{data:Un,encode:Xn}=Mn,Er=Object.keys(Xn).reduce((fr,hi)=>{const Si=Xn[hi];return hi==="x"&&(fr[Si]=En),hi==="y"&&(fr[Si]=zn),hi==="color"&&(fr[Si]=ni),fr},{}),br=Gte(Er,Un,Xn);return I(Er,br),Je({},Mn,{data:br,animate:!1})});return Object.assign(Object.assign({},Go),{marks:Di})}),yield f("elementPointMove")});if(["line","area"].includes(J))ce.forEach((En,zn)=>{const ni=an.invert(et[zn]);if(!ni)return;const Vi=new Mu({name:ES,style:Object.assign({cx:En[0],cy:En[1],fill:he},s)}),Go=Yte(W,zn);Vi.addEventListener("mousedown",ri=>{const Di=Ct.output([et[zn],0]),Mn=ke==null?void 0:ke.length;h.attr("cursor","move"),S[1]!==zn&&(S[1]=zn,z()),C4(R.childNodes,S,s);const[Un,Xn]=E4(R,Vi,a,o),Pn=br=>{const fr=En[1]+br.clientY-An[1];if(A)if(P){const hi=En[0]+br.clientX-An[0],[Si,io]=MS(sn,Di,[hi,fr]),[,tc]=Ct.output([1,en.output(0)]),[,nf]=Ct.invert([Si,tc-(ce[zn+Mn][1]-io)]),Hy=(zn+1)%Mn,Yy=(zn-1+Mn)%Mn,rf=Sp([ce[Yy],[Si,io],ke[Hy]&&ce[Hy]]);Xn.attr("text",Go(en.invert(nf)).toFixed(n)),Un.attr("path",rf),Vi.attr("cx",Si),Vi.attr("cy",io)}else{const[,hi]=Ct.output([1,en.output(0)]),[,Si]=Ct.invert([En[0],hi-(ce[zn+Mn][1]-fr)]),io=Sp([ce[zn-1],[En[0],fr],ke[zn+1]&&ce[zn+1]]);Xn.attr("text",Go(en.invert(Si)).toFixed(n)),Un.attr("path",io),Vi.attr("cy",fr)}else{const[,hi]=Ct.invert([En[0],fr]),Si=Sp([ce[zn-1],[En[0],fr],ce[zn+1]]);Xn.attr("text",en.invert(hi).toFixed(n)),Un.attr("path",Si),Vi.attr("cy",fr)}};An=[ri.clientX,ri.clientY],window.addEventListener("mousemove",Pn);const Er=()=>CS(this,void 0,void 0,function*(){if(h.attr("cursor","default"),window.removeEventListener("mousemove",Pn),h.removeEventListener("mouseup",Er),li(Xn.attr("text")))return;const br=Number(Xn.attr("text")),fr=M4(Gt,ot);_=yield yr(ni,br,fr,["line","area"]),Xn.remove(),Un.remove(),Z(W)});h.addEventListener("mouseup",Er)}),R.appendChild(Vi)}),C4(R.childNodes,S,s);else if(J==="interval"){let En=[(ce[0][0]+ce[1][0])/2,ce[0][1]];E?En=[ce[0][0],(ce[0][1]+ce[1][1])/2]:T&&(En=ce[0]);const zn=Hte(W),ni=new Mu({name:ES,style:Object.assign(Object.assign({cx:En[0],cy:En[1],fill:he},s),{stroke:s.activeStroke})});ni.addEventListener("mousedown",Vi=>{h.attr("cursor","move");const Go=M4(Gt,ot),[ri,Di]=E4(R,ni,a,o),Mn=Xn=>{if(E){const Pn=En[0]+Xn.clientX-An[0],[Er]=Ct.output([en.output(0),en.output(0)]),[,br]=Ct.invert([Er+(Pn-ce[2][0]),En[1]]),fr=Sp([[Pn,ce[0][1]],[Pn,ce[1][1]],ce[2],ce[3]],!0);Di.attr("text",zn(en.invert(br)).toFixed(n)),ri.attr("path",fr),ni.attr("cx",Pn)}else if(T){const Pn=En[1]+Xn.clientY-An[1],Er=En[0]+Xn.clientX-An[0],[br,fr]=MS(sn,[Er,Pn],En),[hi,Si]=MS(sn,[Er,Pn],ce[1]),io=Ct.invert([br,fr])[1],tc=He-io;if(tc<0)return;const nf=WY(sn,[[br,fr],[hi,Si],ce[2],ce[3]],tc>.5?1:0);Di.attr("text",zn(tc,!0).toFixed(n)),ri.attr("path",nf),ni.attr("cx",br),ni.attr("cy",fr)}else{const Pn=En[1]+Xn.clientY-An[1],[,Er]=Ct.output([1,en.output(0)]),[,br]=Ct.invert([En[0],Er-(ce[2][1]-Pn)]),fr=Sp([[ce[0][0],Pn],[ce[1][0],Pn],ce[2],ce[3]],!0);Di.attr("text",zn(en.invert(br)).toFixed(n)),ri.attr("path",fr),ni.attr("cy",Pn)}};An=[Vi.clientX,Vi.clientY],window.addEventListener("mousemove",Mn);const Un=()=>CS(this,void 0,void 0,function*(){if(h.attr("cursor","default"),h.removeEventListener("mouseup",Un),window.removeEventListener("mousemove",Mn),li(Di.attr("text")))return;const Xn=Number(Di.attr("text"));_=yield yr(xt,Xn,Go,[J]),Di.remove(),ri.remove(),Z(W)});h.addEventListener("mouseup",Un)}),R.appendChild(ni)}};b.forEach((W,G)=>{S[0]===G&&Z(W),W.addEventListener("click",L),W.addEventListener("mouseenter",S4),W.addEventListener("mouseleave",O4)});const H=W=>{const G=W==null?void 0:W.target;(!G||G.name!==ES&&!b.includes(G))&&(S=[],z(),R.removeChildren())};return u.on("element-point:select",F),u.on("element-point:unselect",H),h.addEventListener("mousedown",H),()=>{R.remove(),u.off("element-point:select",F),u.off("element-point:unselect",H),h.removeEventListener("mousedown",H),b.forEach(W=>{W.removeEventListener("click",L),W.removeEventListener("mouseenter",S4),W.removeEventListener("mouseleave",O4)})}}}var Ute=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const P4=()=>e=>{const{children:t}=e;if(!Array.isArray(t))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=e;return t.map(s=>{var{data:l,x:c,y:u,width:f,height:d}=s,h=Ute(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:P_(l,o),x:c!=null?c:n,y:u!=null?u:r,width:f!=null?f:i,height:d!=null?d:a})})};P4.props={};var Xte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const T4=()=>e=>{const{children:t}=e;if(!Array.isArray(t))return[];const{direction:n="row",ratio:r=t.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]=n==="col"?["y","height","width","x"]:["x","width","height","y"],u=r.reduce((v,g)=>v+g),f=e[s]-i*(t.length-1),d=r.map(v=>f*(v/u)),h=[];let p=e[o]||0;for(let v=0;v<d.length;v+=1){const g=t[v],{data:m}=g,b=Xte(g,["data"]),_=P_(m,a);h.push(Object.assign({[o]:p,[s]:d[v],[c]:e[c]||0,[l]:e[l],data:_},b)),p+=d[v]+i}return h};T4.props={};class Gp{constructor(t){this.$value=t}static of(t){return new Gp(t)}call(t,...n){return this.$value=t(this.$value,...n),this}value(){return this.$value}}var Kte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const qte=od(e=>{const{encode:t,data:n,scale:r,shareSize:i=!1}=e,{x:a,y:o}=t,s=(l,c)=>{var u;if(l===void 0||!i)return{};const f=_i(n,p=>p[l]),d=((u=r==null?void 0:r[c])===null||u===void 0?void 0:u.domain)||Array.from(f.keys()),h=d.map(p=>f.has(p)?f.get(p).length:1);return{domain:d,flex:h}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:a===void 0?null:{position:"top"}},a===void 0&&{paddingInner:0}),s(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:o===void 0?null:{position:"right"}},o===void 0&&{paddingInner:0}),s(o,"y"))}}}),PS=od(e=>{const{data:t,scale:n}=e,r=[e];let i,a,o;for(;r.length;){const f=r.shift(),{children:d,encode:h={},scale:p={},legend:v={}}=f,{color:g}=h,{color:m}=p,{color:b}=v;g!==void 0&&(i=g),m!==void 0&&(a=m),b!==void 0&&(o=b),Array.isArray(d)&&r.push(...d)}const s=()=>{var f;const d=(f=n==null?void 0:n.color)===null||f===void 0?void 0:f.domain;if(d!==void 0)return[d];if(i===void 0)return[void 0];const h=typeof i=="function"?i:v=>v[i],p=t.map(h);return p.some(v=>typeof v=="number")?[Hl(p)]:[Array.from(new Set(p)),"ordinal"]},l=typeof i=="string"?i:"",[c,u]=s();return{encode:{color:i},scale:{color:Je({},a,{domain:c,type:u})},legend:{color:Je({title:l},o)}}}),TS=od(()=>({animate:{enterType:"fadeIn"}})),AS=sd(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),RS=sd(()=>({type:"cell"})),A4=sd(e=>{const{data:t}=e;return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{const{data:r,encode:i}=e,{x:a,y:o}=i,s=a?Array.from(new Set(r.map(u=>u[a]))):[],l=o?Array.from(new Set(r.map(u=>u[o]))):[];return(()=>{if(s.length&&l.length){const u=[];for(const f of s)for(const d of l)u.push({[a]:f,[o]:d});return u}if(s.length)return s.map(u=>({[a]:u}));if(l.length)return l.map(u=>({[o]:u}))})()}}]}}}),R4=sd((e,t=Jte,n=Qte,r=ene,i={})=>{const{data:a,encode:o,children:s,scale:l,x:c=0,y:u=0,shareData:f=!1,key:d}=e,{value:h}=a,{x:p,y:v}=o,{color:g}=l,{domain:m}=g;return{children:(_,S,O)=>{const{x:C,y:E}=S,{paddingLeft:P,paddingTop:T,marginLeft:A,marginTop:R}=O,{domain:z}=C.getOptions(),{domain:I}=E.getOptions(),L=Ru(_),F=_.map(t),Z=_.map(({x:he,y:ce})=>[C.invert(he),E.invert(ce)]),W=Z.map(([he,ce])=>ke=>{const{[p]:ot,[v]:xt}=ke;return(p!==void 0?ot===he:!0)&&(v!==void 0?xt===ce:!0)}).map(he=>h.filter(he)),G=f?jr(W,he=>he.length):void 0,J=Z.map(([he,ce])=>({columnField:p,columnIndex:z.indexOf(he),columnValue:he,columnValuesLength:z.length,rowField:v,rowIndex:I.indexOf(ce),rowValue:ce,rowValuesLength:I.length})),re=J.map(he=>Array.isArray(s)?s:[s(he)].flat(1));return L.flatMap(he=>{const[ce,ke,ot,xt]=F[he],et=J[he],He=W[he];return re[he].map(Ct=>{var Gt,en,{scale:an,key:sn,facet:An=!0,axis:yr={},legend:En={}}=Ct,zn=Kte(Ct,["scale","key","facet","axis","legend"]);const ni=((Gt=an==null?void 0:an.y)===null||Gt===void 0?void 0:Gt.guide)||yr.y,Vi=((en=an==null?void 0:an.x)===null||en===void 0?void 0:en.guide)||yr.x,Go={x:{tickCount:p?5:void 0},y:{tickCount:v?5:void 0}},ri=An?He:He.length===0?[]:h,Di={color:{domain:m}},Mn={x:I4(Vi,n)(et,ri),y:I4(ni,r)(et,ri)};return Object.assign(Object.assign({key:`${sn}-${he}`,data:ri,margin:0,x:ce+P+c+A,y:ke+T+u+R,parentKey:d,width:ot,height:xt,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!ri.length,dataDomain:G,scale:Je(Go,an,Di),axis:Je({},yr,Mn),legend:!1},zn),i)})})}}});function Jte(e){const{points:t}=e;return A_(t)}function Um(e,t){return t.length?Je({title:!1,tick:null,label:null},e):Je({title:!1,tick:null,label:null,grid:null},e)}function Qte(e){return(t,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=t;if(r!==i-1)return Um(e,n);const s=a!==o-1?!1:void 0,l=n.length?void 0:null;return Je({title:s,grid:l},e)}}function ene(e){return(t,n)=>{const{rowIndex:r,columnIndex:i}=t;if(i!==0)return Um(e,n);const a=r!==0?!1:void 0,o=n.length?void 0:null;return Je({title:a,grid:o},e)}}function I4(e,t){return typeof e=="function"?e:e===null||e===!1?()=>null:t(e)}const L4=()=>e=>[Gp.of(e).call(RS).call(PS).call(TS).call(qte).call(AS).call(A4).call(R4).value()];L4.props={};var IS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const tne=od(e=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),nne=sd(e=>{const{data:t,children:n,x:r=0,y:i=0,key:a}=e;return{children:(s,l,c)=>{const{x:u,y:f}=l,{paddingLeft:d,paddingTop:h,marginLeft:p,marginTop:v}=c,{domain:g}=u.getOptions(),{domain:m}=f.getOptions(),b=Ru(s),_=s.map(({points:E})=>A_(E)),S=s.map(({x:E,y:P})=>[u.invert(E),f.invert(P)]),O=S.map(([E,P])=>({columnField:E,columnIndex:g.indexOf(E),columnValue:E,columnValuesLength:g.length,rowField:P,rowIndex:m.indexOf(P),rowValue:P,rowValuesLength:m.length})),C=O.map(E=>Array.isArray(n)?n:[n(E)].flat(1));return b.flatMap(E=>{const[P,T,A,R]=_[E],[z,I]=S[E],L=O[E];return C[E].map(Z=>{var H,W;const{scale:G,key:J,encode:re,axis:he,interaction:ce}=Z,ke=IS(Z,["scale","key","encode","axis","interaction"]),ot=(H=G==null?void 0:G.y)===null||H===void 0?void 0:H.guide,xt=(W=G==null?void 0:G.x)===null||W===void 0?void 0:W.guide,et={x:{facet:!1},y:{facet:!1}},He={x:ine(xt)(L,t),y:ane(ot)(L,t)},jt={x:{tickCount:5},y:{tickCount:5}};return Object.assign({data:t,parentKey:a,key:`${J}-${E}`,x:P+d+r+p,y:T+h+i+v,width:A,height:R,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Je(et,G),axis:Je(jt,he,He),legend:!1,encode:Je({},re,{x:z,y:I}),interaction:Je({},ce,{legendFilter:!1})},ke)})})}}}),rne=sd(e=>{const{encode:t}=e,n=IS(e,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=t,o=IS(t,["position","x","y"]),s=[];for(const l of[i].flat(1))for(const c of[a].flat(1))s.push({$x:l,$y:c});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},[i].flat(1).length===1&&{x:{paddingInner:0}}),[a].flat(1).length===1&&{y:{paddingInner:0}})})});function ine(e){return typeof e=="function"?e:e===null?()=>null:(t,n)=>{const{rowIndex:r,rowValuesLength:i}=t;if(r!==i-1)return Um(e,n)}}function ane(e){return typeof e=="function"?e:e===null?()=>null:(t,n)=>{const{columnIndex:r}=t;if(r!==0)return Um(e,n)}}const one=()=>e=>[Gp.of(e).call(RS).call(PS).call(nne).call(rne).call(TS).call(AS).call(tne).value()];var sne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const lne=od(e=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),cne=od(e=>({coordinate:{type:"polar"}})),une=e=>{const{encode:t}=e,n=sne(e,["encode"]),{position:r}=t;return Object.assign(Object.assign({},n),{encode:{x:r}})};function N4(e){return t=>null}function fne(e){const{points:t}=e,[n,r,i,a]=t,o=wi(n,a),s=Li(n,a),l=Li(r,i),c=iA(s,l),u=1/Math.sin(c/2),f=o/(1+u),d=f*Math.sqrt(2),[h,p]=i,g=ld(s)+c/2,m=f*u,b=h+m*Math.sin(g),_=p-m*Math.cos(g);return[b-d/2,_-d/2,d,d]}const dne=()=>e=>[Gp.of(e).call(RS).call(une).call(PS).call(cne).call(A4).call(R4,fne,N4,N4,{frame:!1}).call(TS).call(AS).call(lne).value()];function hne(e,t,n){const i=n,a=[0,i],o=[-i+1,-0+1];if(e==="normal")return a;if(e==="reverse")return o;if(e==="alternate")return t%2===0?a:o;if(e==="reverse-alternate")return t%2===0?o:a}function pne(e,t,n){const r=[e];for(;r.length;){const i=r.pop();i.animate=Je({enter:{duration:t},update:{duration:t,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:t}},i.animate||{});const{children:a}=i;Array.isArray(a)&&r.push(...a)}return e}const k4=()=>e=>{const{children:t=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=e,o=t.length;if(!Array.isArray(t)||o===0)return[];const{key:s}=t[0],l=t.map(c=>Object.assign(Object.assign({},c),{key:s})).map(c=>pne(c,n,a));return function*(){let c=0,u;for(;r==="infinite"||c<r;){const[f,d]=hne(i,c,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield l[p]),u=p}c++}}};k4.props={};function Kc(e,t,n){const{encode:r}=n;if(e===null)return[t];const i=vne(e).map(o=>{var s;return[o,(s=ur(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>qr(o)),a=o=>i.map(([,s])=>s[o]).join("-");return Array.from(_i(t,a).values())}function j4(e){return Array.isArray(e)?yne(e):typeof e=="function"?mne(e):e==="series"?gne:e==="value"?bne:e==="sum"?xne:e==="maxIndex"?_ne:()=>null}function D4(e,t){for(const n of e)n.sort(t)}function F4(e,t){return(t==null?void 0:t.domain)||Array.from(new Set(e))}function vne(e){return Array.isArray(e)?e:[e]}function gne(e,t,n){return Hp(r=>n[r])}function mne(e){return(t,n,r)=>Hp(i=>e(t[i]))}function yne(e){return(t,n,r)=>(i,a)=>e.reduce((o,s)=>o!==0?o:Ni(t[i][s],t[a][s]),0)}function bne(e,t,n){return Hp(r=>t[r])}function xne(e,t,n){const r=Ru(e),i=Array.from(_i(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((l,c)=>l+ +t[c])]));return Hp(o=>a.get(n[o]))}function _ne(e,t,n){const r=Ru(e),i=Array.from(_i(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,ud(s,l=>t[l])]));return Hp(o=>a.get(n[o]))}function Hp(e){return(t,n)=>Ni(e(t),e(n))}const B4=(e={})=>{const{groupBy:t="x",orderBy:n=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=e;return(s,l)=>{const{data:c,encode:u,style:f={}}=l,[d,h]=ur(u,"y"),[p,v]=ur(u,"y1"),[g]=o?Pp(u,"series","color"):ur(u,"color"),m=Kc(t,s,l),_=j4(n)(c,d,g);_&&D4(m,_);const S=new Array(s.length),O=new Array(s.length),C=new Array(s.length),E=[],P=[];for(const I of m){r&&I.reverse();const L=p?+p[I[0]]:0,F=[],Z=[];for(const ce of I){const ke=C[ce]=+d[ce]-L;ke<0?Z.push(ce):ke>=0&&F.push(ce)}const H=F.length>0?F:Z,W=Z.length>0?Z:F;let G=F.length-1,J=0;for(;G>0&&d[H[G]]===0;)G--;for(;J<W.length-1&&d[W[J]]===0;)J++;E.push(H[G]),P.push(W[J]);let re=L;for(const ce of Z.reverse()){const ke=C[ce];re=S[ce]=(O[ce]=re)+ke}let he=L;for(const ce of F){const ke=C[ce];ke>0?he=S[ce]=(O[ce]=he)+ke:S[ce]=O[ce]=he}}const T=new Set(E),A=new Set(P),R=i==="y"?S:O,z=a==="y"?S:O;return[s,Je({},l,{encode:{y0:xm(d,h),y:ti(R,h),y1:ti(z,v)},style:Object.assign({first:(I,L)=>T.has(L),last:(I,L)=>A.has(L)},f)})]}};B4.props={};function z4(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function wne(e,t){let n=0,r,i=0,a=0;if(t===void 0)for(let o of e)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++n,a+=r*(o-i));else{let o=-1;for(let s of e)(s=t(s,++o,e))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,a+=r*(s-i))}if(n>1)return a/(n-1)}function Z4(e,t){const n=wne(e,t);return n&&Math.sqrt(n)}function Sne(e,t,n){const r=z4(e),i=Z4(e);return r&&i?Math.ceil((n-t)*Math.cbrt(r)/(3.49*i)):1}var $4=Array.prototype,One=$4.slice,$ye=$4.map;function LS(e){return()=>e}const Cne=Math.sqrt(50),Ene=Math.sqrt(10),Mne=Math.sqrt(2);function Xm(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=Cne?10:a>=Ene?5:a>=Mne?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Xm(e,t,n*2):[s,l,c]}function Pne(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Xm(t,e,n):Xm(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let c=0;c<s;++c)l[c]=(a-c)/-o;else for(let c=0;c<s;++c)l[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}function Yp(e,t,n){return t=+t,e=+e,n=+n,Xm(e,t,n)[2]}function Wye(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Yp(t,e,n):Yp(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Tne(e,t,n){let r;for(;;){const i=Yp(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function Ane(e){return Math.max(1,Math.ceil(Math.log(z4(e))/Math.LN2)+1)}function Rne(){var e=Xh,t=Hl,n=Ane;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,l,c=new Array(o);for(a=0;a<o;++a)c[a]=e(i[a],a,i);var u=t(c),f=u[0],d=u[1],h=n(c,f,d);if(!Array.isArray(h)){const _=d,S=+h;if(t===Hl&&([f,d]=Tne(f,d,S)),h=Pne(f,d,S),h[0]<=f&&(l=Yp(f,d,S)),h[h.length-1]>=d)if(_>=d&&t===Hl){const O=Yp(f,d,S);isFinite(O)&&(O>0?d=(Math.floor(d/O)+1)*O:O<0&&(d=(Math.ceil(d*-O)+1)/-O))}else h.pop()}for(var p=h.length,v=0,g=p;h[v]<=f;)++v;for(;h[g-1]>d;)--g;(v||g<p)&&(h=h.slice(v,g),p=g-v);var m=new Array(p+1),b;for(a=0;a<=p;++a)b=m[a]=[],b.x0=a>0?h[a-1]:f,b.x1=a<p?h[a]:d;if(isFinite(l)){if(l>0)for(a=0;a<o;++a)(s=c[a])!=null&&f<=s&&s<=d&&m[Math.min(p,Math.floor((s-f)/l))].push(i[a]);else if(l<0){for(a=0;a<o;++a)if((s=c[a])!=null&&f<=s&&s<=d){const _=Math.floor((f-s)*l);m[Math.min(p,_+(h[_]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=c[a])!=null&&f<=s&&s<=d&&m[EY(h,s,0,p)].push(i[a]);return m}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:LS(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:LS([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:LS(Array.isArray(i)?One.call(i):i),r):n},r}function NS(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?mp:CA(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),h=Math.max(n,Math.floor(t-c*f/l+d)),p=Math.min(r,Math.floor(t+(l-c)*f/l+d));NS(e,t,h,p,i)}const a=e[t];let o=n,s=r;for(Vp(e,n,t),i(e[r],a)>0&&Vp(e,n,r);o<s;){for(Vp(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?Vp(e,n,s):(++s,Vp(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Vp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Ine(e,t=Ni){let n,r=!1;if(t.length===1){let i;for(const a of e){const o=t(a);(r?Ni(o,i)>0:Ni(o,o)===0)&&(n=a,i=o,r=!0)}}else for(const i of e)(r?t(i,n)>0:t(i,i)===0)&&(n=i,r=!0);return n}function Km(e,t,n){if(e=Float64Array.from(wY(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return is(e);if(t>=1)return jr(e);var r,i=(r-1)*t,a=Math.floor(i),o=jr(NS(e,a).subarray(0,a+1)),s=is(e.subarray(a+1));return o+(s-o)*(i-a)}}function Gye(e,t,n=number){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Lne(e,t,n=D_){if(!isNaN(t=+t)){if(r=Float64Array.from(e,(s,l)=>D_(n(e[l],l,e))),t<=0)return $m(r);if(t>=1)return ud(r);var r,i=Uint32Array.from(e,(s,l)=>l),a=r.length-1,o=Math.floor(a*t);return NS(i,o,0,a,(s,l)=>mp(r[s],r[l])),o=Ine(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function kS(e,t){return Km(e,.5,t)}function Nne(e,t){return Lne(e,.5,t)}var kne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function qc(e){return t=>t===null?e:`${e} of ${t}`}function jne(e){if(typeof e=="function")return[e,null];const n={mean:Dne,max:Bne,count:Zne,first:Wne,last:Gne,sum:$ne,min:zne,median:Fne}[e];if(!n)throw new Error(`Unknown reducer: ${e}.`);return n()}function Dne(){const e=(n,r)=>$p(n,i=>+r[i]),t=qc("mean");return[e,t]}function Fne(){const e=(n,r)=>kS(n,i=>+r[i]),t=qc("median");return[e,t]}function Bne(){const e=(n,r)=>jr(n,i=>+r[i]),t=qc("max");return[e,t]}function zne(){const e=(n,r)=>is(n,i=>+r[i]),t=qc("min");return[e,t]}function Zne(){const e=(n,r)=>n.length,t=qc("count");return[e,t]}function $ne(){const e=(n,r)=>ws(n,i=>+r[i]),t=qc("sum");return[e,t]}function Wne(){const e=(n,r)=>r[n[0]],t=qc("first");return[e,t]}function Gne(){const e=(n,r)=>r[n[n.length-1]],t=qc("last");return[e,t]}const jS=(e={})=>{const{groupBy:t}=e,n=kne(e,["groupBy"]);return(r,i)=>{const{data:a,encode:o}=i,s=t(r,i);if(!s)return[r,i];const l=(h,p)=>{if(h)return h;const{from:v}=p;if(!v)return h;const[,g]=ur(o,v);return g},c=Object.entries(n).map(([h,p])=>{const[v,g]=jne(p),[m,b]=ur(o,h),_=l(b,p),S=s.map(O=>v(O,m!=null?m:a));return[h,Object.assign(Object.assign({},Aq(S,(g==null?void 0:g(_))||_)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=ur(o,h),g=s.map(m=>p[m[0]]);return[h,ti(g,v)]}),f=s.map(h=>a[h[0]]);return[Ru(s),Je({},i,{data:f,encode:Object.fromEntries([...u,...c])})]}};jS.props={};var Hne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const W4="thresholds";function Yne(e){const[t,n]=Hl(e);return Math.min(200,Sne(e,t,n))}const DS=(e={})=>{const{groupChannels:t=["color"],binChannels:n=["x","y"]}=e,r=Hne(e,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:l}=s,c=n.map(p=>{const[v]=ur(l,p);return v}),u=Tt(r,W4),f=o.filter(p=>c.every(v=>qr(v[p]))),d=[...t.map(p=>{const[v]=ur(l,p);return v}).filter(qr).map(p=>v=>p[v]),...n.map((p,v)=>{const g=c[v],m=u[p]||Yne(g),b=Rne().thresholds(m).value(S=>+g[S])(f),_=new Map(b.flatMap(S=>{const{x0:O,x1:C}=S,E=`${O},${C}`;return S.map(P=>[P,E])}));return i[p]=_,S=>_.get(S)})],h=p=>d.map(v=>v(p)).join("-");return Array.from(_i(f,h).values())};return jS(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(W4)))),Object.fromEntries(n.flatMap(o=>{const s=([c])=>+i[o].get(c).split(",")[0],l=([c])=>+i[o].get(c).split(",")[1];return l.from=o,[[o,s],[`${o}1`,l]]}))),{groupBy:a}))};DS.props={};const G4=(e={})=>{const{thresholds:t}=e;return DS(Object.assign(Object.assign({},e),{thresholdsX:t,groupChannels:["color"],binChannels:["x"]}))};G4.props={};var Vne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const H4=(e={})=>{const{groupBy:t="x",reverse:n=!1,orderBy:r,padding:i}=e,a=Vne(e,["groupBy","reverse","orderBy","padding"]);return(o,s)=>{const{data:l,encode:c,scale:u}=s,{series:f}=u,[d]=ur(c,"y"),[h]=Pp(c,"series","color"),p=F4(h,f),v=Kc(t,o,s),m=j4(r)(l,d,h);m&&D4(v,m);const b=new Array(o.length);for(const _ of v){n&&_.reverse();for(let S=0;S<_.length;S++)b[_[S]]=p[S]}return[o,Je({},s,{scale:{series:{domain:p,paddingInner:i}},encode:{series:ti(b)}})]}};H4.props={};function qm(e,t,n){if(e===null)return[-.5,.5];const r=F4(e,t),a=new Yc({domain:r,range:[0,1],padding:n}).getBandWidth();return[-a/2,a/2]}function Jm(e,t,n){return t*(1-e)+n*e}const Y4=(e={})=>{const{padding:t=0,paddingX:n=t,paddingY:r=t,random:i=Math.random}=e;return(a,o)=>{const{encode:s,scale:l}=o,{x:c,y:u}=l,[f]=ur(s,"x"),[d]=ur(s,"y"),h=qm(f,c,n),p=qm(d,u,r),v=a.map(()=>Jm(i(),...p)),g=a.map(()=>Jm(i(),...h));return[a,Je({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:ti(v),dx:ti(g)}})]}};Y4.props={};const V4=(e={})=>{const{padding:t=0,random:n=Math.random}=e;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[l]=ur(a,"x"),c=qm(l,s,t),u=r.map(()=>Jm(n(),...c));return[r,Je({scale:{x:{padding:.5}}},i,{encode:{dx:ti(u)}})]}};V4.props={};const U4=(e={})=>{const{padding:t=0,random:n=Math.random}=e;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[l]=ur(a,"y"),c=qm(l,s,t),u=r.map(()=>Jm(n(),...c));return[r,Je({scale:{y:{padding:.5}}},i,{encode:{dy:ti(u)}})]}};U4.props={};var Une=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const X4=(e={})=>{const{groupBy:t="x"}=e;return(n,r)=>{const{encode:i}=r,{x:a}=i,o=Une(i,["x"]),s=Object.entries(o).filter(([d])=>d.startsWith("y")).map(([d])=>[d,ur(i,d)[0]]),l=s.map(([d])=>[d,new Array(n.length)]),c=Kc(t,n,r),u=new Array(c.length);for(let d=0;d<c.length;d++){const p=c[d].flatMap(m=>s.map(([,b])=>+b[m])),[v,g]=Hl(p);u[d]=(v+g)/2}const f=Math.max(...u);for(let d=0;d<c.length;d++){const h=f-u[d],p=c[d];for(const v of p)for(let g=0;g<s.length;g++){const[,m]=s[g],[,b]=l[g];b[v]=+m[v]+h}}return[n,Je({},r,{encode:Object.fromEntries(l.map(([d,h])=>[d,ti(h,ur(i,d)[1])]))})]}};X4.props={};const K4=(e={})=>{const{groupBy:t="x",series:n=!0}=e;return(r,i)=>{const{encode:a}=i,[o]=ur(a,"y"),[s,l]=ur(a,"y1"),[c]=n?Pp(a,"series","color"):ur(a,"color"),u=Kc(t,r,i),f=new Array(r.length);for(const d of u){const h=d.map(p=>+o[p]);for(let p=0;p<d.length;p++){const v=d[p],g=Math.max(...h.filter((m,b)=>b!==p));f[v]=o[v]>g?g:o[v]}}return[r,Je({},i,{encode:{y1:ti(f,l)}})]}};K4.props={};const q4=e=>{const{groupBy:t=["x"],reducer:n=(o,s)=>s[o[0]],orderBy:r=null,reverse:i=!1,duration:a}=e;return(o,s)=>{const{encode:l}=s,u=(Array.isArray(t)?t:[t]).map(g=>[g,ur(l,g)[0]]);if(u.length===0)return[o,s];let f=[o];for(const[,g]of u){const m=[];for(const b of f){const _=Array.from(_i(b,S=>g[S]).values());m.push(..._)}f=m}if(r){const[g]=ur(l,r);g&&f.sort((m,b)=>n(m,g)-n(b,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[Gc(o,d)]:Pp(l,"enterDuration",Gc(o,d)),[p]=Pp(l,"enterDelay",Gc(o,0)),v=new Array(o.length);for(let g=0,m=0;g<f.length;g++){const b=f[g],_=jr(b,S=>+h[S]);for(const S of b)v[S]=+p[S]+m;m+=_}return[o,Je({},s,{encode:{enterDuration:_m(h),enterDelay:_m(v)}})]}};q4.props={};var Xne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Kne(e){return typeof e=="function"?e:{min:(n,r)=>is(n,i=>r[+i]),max:(n,r)=>jr(n,i=>r[+i]),first:(n,r)=>r[n[0]],last:(n,r)=>r[n[n.length-1]],mean:(n,r)=>$p(n,i=>r[+i]),median:(n,r)=>kS(n,i=>r[+i]),sum:(n,r)=>ws(n,i=>r[+i]),deviation:(n,r)=>Z4(n,i=>r[+i])}[e]||jr}const J4=(e={})=>{const{groupBy:t="x",basis:n="max"}=e;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,l=Xne(a,["x"]),c=Object.entries(l).filter(([v])=>v.startsWith("y")).map(([v])=>[v,ur(a,v)[0]]),[,u]=c.find(([v])=>v==="y"),f=c.map(([v])=>[v,new Array(r.length)]),d=Kc(t,r,i),h=Kne(n);for(const v of d){const g=h(v,u);for(const m of v)for(let b=0;b<c.length;b++){const[,_]=c[b],[,S]=f[b];S[m]=+_[m]/g}}const p=Zl(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,Je({},i,Object.assign({encode:Object.fromEntries(f.map(([v,g])=>[v,ti(g,ur(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};J4.props={};function Q4(e,t){return[e[0]]}function qne(e,t){const n=e.length-1;return[e[n]]}function Jne(e,t){const n=ud(e,r=>t[r]);return[e[n]]}function Qne(e,t){const n=$m(e,r=>t[r]);return[e[n]]}function ere(e){return typeof e=="function"?e:{first:Q4,last:qne,max:Jne,min:Qne}[e]||Q4}const Qm=(e={})=>{const{groupBy:t="series",channel:n,selector:r}=e;return(i,a)=>{const{encode:o}=a,s=Kc(t,i,a),[l]=ur(o,n),c=ere(r);return[s.flatMap(u=>c(u,l)),a]}};Qm.props={};var tre=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ek=(e={})=>{const{selector:t}=e,n=tre(e,["selector"]);return Qm(Object.assign({channel:"x",selector:t},n))};ek.props={};var nre=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const tk=(e={})=>{const{selector:t}=e,n=nre(e,["selector"]);return Qm(Object.assign({channel:"y",selector:t},n))};tk.props={};var rre=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Up=(e={})=>{const{channels:t=["x","y"]}=e,n=rre(e,["channels"]),r=(i,a)=>Kc(t,i,a);return jS(Object.assign(Object.assign({},n),{groupBy:r}))};Up.props={};const nk=(e={})=>Up(Object.assign(Object.assign({},e),{channels:["x","color","series"]}));nk.props={};const rk=(e={})=>Up(Object.assign(Object.assign({},e),{channels:["y","color","series"]}));rk.props={};const ik=(e={})=>Up(Object.assign(Object.assign({},e),{channels:["color"]}));ik.props={};function ire(e,t,n){return(t.length!==2?Vl(W2(e,t,n),([r,i],[a,o])=>Ni(i,o)||Ni(r,a)):Vl(_i(e,n),([r,i],[a,o])=>t(i,o)||Ni(r,a))).map(([r])=>r)}var ak=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function are(e,t,n){const{by:r=e,reducer:i="max"}=t,[a]=ur(n,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>jr(o,s=>+a[s]);if(i==="min")return o=>is(o,s=>+a[s]);if(i==="sum")return o=>ws(o,s=>+a[s]);if(i==="median")return o=>kS(o,s=>+a[s]);if(i==="mean")return o=>$p(o,s=>+a[s]);if(i==="first")return o=>a[o[0]];if(i==="last")return o=>a[o[o.length-1]];throw new Error(`Unknown reducer: ${i}`)}function ore(e,t,n){const{reverse:r,channel:i}=n,{encode:a}=t,[o]=ur(a,i),s=Vl(e,l=>o[l]);return r&&s.reverse(),[s,t]}function sre(e,t,n){if(!Array.isArray(n))return e;const r=new Set(n);return e.filter(i=>r.has(t[i]))}function lre(e,t,n){var r;const{reverse:i,slice:a,channel:o}=n,s=ak(n,["reverse","slice","channel"]),{encode:l,scale:c={}}=t,u=(r=c[o])===null||r===void 0?void 0:r.domain,[f]=ur(l,o),d=are(o,s,l),h=sre(e,f,u),p=ire(h,d,m=>f[m]);i&&p.reverse();const v=typeof a=="number"?[0,a]:a,g=a?p.slice(...v):p;return[e,Je(t,{scale:{[o]:{domain:g}}})]}const ey=(e={})=>{const{reverse:t=!1,slice:n,channel:r,ordinal:i=!0}=e,a=ak(e,["reverse","slice","channel","ordinal"]);return(o,s)=>i?lre(o,s,Object.assign({reverse:t,slice:n,channel:r},a)):ore(o,s,Object.assign({reverse:t,slice:n,channel:r},a))};ey.props={};const ok=(e={})=>ey(Object.assign(Object.assign({},e),{channel:"x"}));ok.props={};const sk=(e={})=>ey(Object.assign(Object.assign({},e),{channel:"y"}));sk.props={};const lk=(e={})=>ey(Object.assign(Object.assign({},e),{channel:"color"}));lk.props={};function cre(e,t){return typeof t=="string"?e.map(n=>n[t]):e.map(t)}function ure(e,t){if(typeof e=="function")return n=>e(n,t);if(e==="sum")return n=>ws(n,r=>+t[r]);throw new Error(`Unknown reducer: ${e}`)}const ck=(e={})=>{const{field:t,channel:n="y",reducer:r="sum"}=e;return(i,a)=>{const{data:o,encode:s}=a,[l]=ur(s,"x"),c=t?cre(o,t):ur(s,n)[0],u=ure(r,c),f=G2(i,u,d=>l[d]).map(d=>d[1]);return[i,Je({},a,{scale:{x:{flex:f}}})]}};ck.props={};function fre(e){const{padding:t=0,direction:n="col"}=e;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:l}=a,c=l/s;let u=Math.ceil(Math.sqrt(i/c)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>l;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=l-d*f,v=d<=1?0:p/(d-1),[g,m]=d<=1?[(s-o*f)/(o-1),(l-f)/2]:[0,0];return r.map((b,_)=>{const[S,O,C,E]=A_(b),P=n==="col"?_%u:Math.floor(_/d),T=n==="col"?Math.floor(_/u):_%d,A=P*f,R=(d-T-1)*f+p,z=(f-t)/C,I=(f-t)/E,L=A-S+g*P+1/2*t,F=R-O-v*T-m+1/2*t;return`translate(${L}, ${F}) scale(${z}, ${I})`})}}const uk=e=>(t,n)=>[t,Je({},n,{modifier:fre(e),axis:!1})];uk.props={};function dre(e,t,n,r){const i=e.length;if(r>=i||r===0)return e;const a=h=>t[e[h]]*1,o=h=>n[e[h]]*1,s=[],l=(i-2)/(r-2);let c=0,u,f,d;s.push(c);for(let h=0;h<r-2;h++){let p=0,v=0,g=Math.floor((h+1)*l)+1,m=Math.floor((h+2)*l)+1;m=Math.min(m,i);const b=m-g;for(;g<m;g++)p+=a(g),v+=o(g);p/=b,v/=b;let _=Math.floor((h+0)*l)+1;const S=Math.floor((h+1)*l)+1,O=[a(c),o(c)];for(u=f=-1;_<S;_++)f=Math.abs((O[0]-p)*(a(_)-O[1])-(O[0]-o(_))*(v-O[0]))*.5,f>u&&(u=f,d=_);s.push(d),c=d}return s.push(i-1),s.map(h=>e[h])}function hre(e){if(typeof e=="function")return e;if(e==="lttb")return dre;const t={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[$m(r,o=>a[o])]],max:(r,i,a)=>[r[ud(r,o=>a[o])]],median:(r,i,a)=>[r[Nne(r,o=>a[o])]]},n=t[e]||t.median;return(r,i,a,o)=>{const s=Math.max(1,Math.floor(r.length/o));return pre(r,s).flatMap(c=>n(c,i,a))}}function pre(e,t){const n=e.length,r=[];let i=0;for(;i<n;)r.push(e.slice(i,i+=t));return r}const fk=(e={})=>{const{strategy:t="median",thresholds:n=2e3,groupBy:r=["series","color"]}=e,i=hre(t);return(a,o)=>{const{encode:s}=o,l=Kc(r,a,o),[c]=ur(s,"x"),[u]=ur(s,"y");return[l.flatMap(f=>i(f,c,u,n)),o]}};fk.props={};function vre(e){return typeof e=="object"?[e.value,e.ordinal]:[e,!0]}const dk=(e={})=>(t,n)=>{const{encode:r,data:i}=n,a=Object.entries(e).map(([u,f])=>{const[d]=ur(r,u);if(!d)return null;const[h,p=!0]=vre(f);if(typeof h=="function")return v=>h(d[v]);if(p){const v=Array.isArray(h)?h:[h];return v.length===0?null:g=>v.includes(d[g])}else{const[v,g]=h;return m=>d[m]>=v&&d[m]<=g}}).filter(qr);if(a.length===0)return[t,n];const o=u=>a.every(f=>f(u)),s=t.filter(o),l=s.map((u,f)=>f),c=Object.entries(r).map(([u,f])=>[u,Object.assign(Object.assign({},f),{value:l.map(d=>f.value[s[d]]).filter(d=>d!==void 0)})]);return[l,Je({},n,{encode:Object.fromEntries(c),data:s.map(u=>i[u])})]};dk.props={};var hk={},FS={},BS=34,Xp=10,zS=13;function pk(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function gre(e,t){var n=pk(e);return function(r,i){return t(n(r),i,e)}}function vk(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function $o(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function mre(e){return e<0?"-"+$o(-e,6):e>9999?"+"+$o(e,6):$o(e,4)}function yre(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":mre(e.getUTCFullYear(),4)+"-"+$o(e.getUTCMonth()+1,2)+"-"+$o(e.getUTCDate(),2)+(i?"T"+$o(t,2)+":"+$o(n,2)+":"+$o(r,2)+"."+$o(i,3)+"Z":r?"T"+$o(t,2)+":"+$o(n,2)+":"+$o(r,2)+"Z":n||t?"T"+$o(t,2)+":"+$o(n,2)+"Z":"")}function bre(e){var t=new RegExp('["'+e+`
|
|
\r]`),n=e.charCodeAt(0);function r(f,d){var h,p,v=i(f,function(g,m){if(h)return h(g,m-1);p=g,h=d?gre(g,d):pk(g)});return v.columns=p||[],v}function i(f,d){var h=[],p=f.length,v=0,g=0,m,b=p<=0,_=!1;f.charCodeAt(p-1)===Xp&&--p,f.charCodeAt(p-1)===zS&&--p;function S(){if(b)return FS;if(_)return _=!1,hk;var C,E=v,P;if(f.charCodeAt(E)===BS){for(;v++<p&&f.charCodeAt(v)!==BS||f.charCodeAt(++v)===BS;);return(C=v)>=p?b=!0:(P=f.charCodeAt(v++))===Xp?_=!0:P===zS&&(_=!0,f.charCodeAt(v)===Xp&&++v),f.slice(E+1,C-1).replace(/""/g,'"')}for(;v<p;){if((P=f.charCodeAt(C=v++))===Xp)_=!0;else if(P===zS)_=!0,f.charCodeAt(v)===Xp&&++v;else if(P!==n)continue;return f.slice(E,C)}return b=!0,f.slice(E,p)}for(;(m=S())!==FS;){for(var O=[];m!==hk&&m!==FS;)O.push(m),m=S();d&&(O=d(O,g++))==null||h.push(O)}return h}function a(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(e)})}function o(f,d){return d==null&&(d=vk(f)),[d.map(u).join(e)].concat(a(f,d)).join(`
|
|
`)}function s(f,d){return d==null&&(d=vk(f)),a(f,d).join(`
|
|
`)}function l(f){return f.map(c).join(`
|
|
`)}function c(f){return f.map(u).join(e)}function u(f){return f==null?"":f instanceof Date?yre(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:l,formatRow:c,formatValue:u}}function xre(e){for(var t in e){var n=e[t].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))_re&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;e[t]=n}return e}const _re=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var wre=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const gk=e=>{const{value:t,format:n=t.split(".").pop(),delimiter:r=",",autoType:i=!0}=e;return()=>wre(void 0,void 0,void 0,function*(){const a=yield fetch(t);if(n==="csv"){const o=yield a.text();return bre(r).parse(o,i?xre:Au)}else if(n==="json")return yield a.json();throw new Error(`Unknown format: ${n}.`)})};gk.props={};const mk=e=>{const{value:t}=e;return()=>t};mk.props={};function Sre(e,t){return e.map(n=>{if(Array.isArray(n)){const[r,i=t]=n;return[r,i]}return[n,t]})}const yk=e=>{const{fields:t=[]}=e,n=Sre(t,!0);return r=>{const i=(a,o)=>n.reduce((s,[l,c=!0])=>s!==0?s:c?a[l]<o[l]?-1:+(a[l]!==o[l]):a[l]>o[l]?-1:+(a[l]!==o[l]),0);return[...r].sort(i)}};yk.props={};function Hye(e){return e!=null&&!Number.isNaN(e)}const bk=e=>{const{callback:t}=e;return n=>Array.isArray(n)?[...n].sort(t):n};bk.props={};function Ore(e){return e!=null&&!Number.isNaN(e)}const xk=e=>{const{callback:t=Ore}=e;return n=>n.filter(t)};xk.props={};function Cre(e,t=[]){return t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{})}const _k=e=>{const{fields:t}=e;return n=>n.map(r=>Cre(r,t))};_k.props={};function Ere(e){return Object.keys(e).length===0}const wk=e=>t=>{if(!e||Ere(e))return t;const n=r=>Object.entries(r).reduce((i,[a,o])=>(i[e[a]||a]=o,i),{});return t.map(n)};wk.props={};function Mre(e){return!e||Object.keys(e).length===0}const Sk=e=>{const{fields:t,key:n="key",value:r="value"}=e;return i=>Mre(t)?i:i.flatMap(a=>t.map(o=>Object.assign(Object.assign({},a),{[n]:o,[r]:a[o]})))};Sk.props={};const Ok=e=>{const{start:t,end:n}=e;return r=>r.slice(t,n)};Ok.props={};const Ck=e=>{const{callback:t=Au}=e;return n=>t(n)};Ck.props={};const Ek=e=>{const{callback:t=Au}=e;return n=>Array.isArray(n)?n.map(t):n};Ek.props={};function Mk(e){return typeof e=="string"?t=>t[e]:e}const Pk=e=>{const{join:t,on:n,select:r=[],as:i=r,unknown:a=NaN}=e,[o,s]=n,l=Mk(s),c=Mk(o),u=W2(t,([f])=>f,f=>l(f));return f=>f.map(d=>{const h=u.get(c(d));return Object.assign(Object.assign({},d),r.reduce((p,v,g)=>(p[i[g]]=h?h[v]:a,p),{}))})};Pk.props={};var Pre=Y(53843),Tre=Y.n(Pre);function Yye(e){return e!=null&&!Number.isNaN(e)}const Tk=e=>{const{field:t,groupBy:n,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=e,[l,c]=r;return u=>Array.from(_i(u,d=>n.map(h=>d[h]).join("-")).values()).map(d=>{const h=Tre().create(d.map(g=>g[t]),{min:i,max:a,size:o,width:s}),p=h.map(g=>g.x),v=h.map(g=>g.y);return Object.assign(Object.assign({},d[0]),{[l]:p,[c]:v})})};Tk.props={};const Ak=()=>e=>(console.log("G2 data section:",e),e);Ak.props={};function ZS(e){const{min:t,max:n}=e;return[[t[0],t[1]],[n[0],n[1]]]}function Rk(e,t){const[n,r]=e,[i,a]=t;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}function Are(e,t){const[n,r]=e;return!(Rk(n,t)&&Rk(r,t))}function Rre(e,t){const[n,r]=e,[i,a]=t;return n[0]<a[0]&&r[0]>i[0]&&n[1]<a[1]&&r[1]>i[1]}const Ire=e=>{const{priority:t}=e;return n=>{const r=[];return t&&n.sort(t),n.forEach(i=>{Z_(i);const a=i.getLocalBounds();r.some(s=>Rre(ZS(a),ZS(s.getLocalBounds())))?z_(i):r.push(i)}),n}};function Lre([e,t],[n,r]){return r>e&&t>n}function ty(){const e=new Map;return[r=>e.get(r),(r,i)=>e.set(r,i)]}function Nre(e){const t=e.cloneNode(!0),n=t.getElementById("connector");n&&t.removeChild(n);const{min:r,max:i}=t.getRenderBounds();return t.destroy(),{min:r,max:i}}const kre=e=>{const{maxIterations:t=10,maxError:n=.1,padding:r=1}=e;return i=>{const a=i.length;if(a<=1)return i;const[o,s]=ty(),[l,c]=ty(),[u,f]=ty(),[d,h]=ty();for(const p of i){const{min:v,max:g}=Nre(p),[m,b]=v,[_,S]=g;s(p,b),c(p,b),f(p,S-b),h(p,[m,_])}for(let p=0;p<t;p++){i.sort((g,m)=>Ni(l(g),l(m)));let v=0;for(let g=0;g<a-1;g++){const m=i[g];let b=g+1,_;for(;(_=i[b])&&!Lre(d(m),d(_));)b+=1;if(_){const S=l(m),O=u(m),C=l(_),E=C-(S+O);if(E<r){const P=(r-E)/2;v=Math.max(v,P),c(m,S-P),c(_,C+P)}}}if(v<n)break}for(const p of i)p.style.y+=l(p)-o(p);return i}},jre=()=>e=>(e.forEach(t=>{Z_(t);const n=t.attr("bounds"),r=t.getLocalBounds();Are(ZS(r),n)&&z_(t)}),e);function Dre(e){return typeof e=="object"?e:jl(e)}function $S(e){let t=e/255;return t=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4),t}function Ik(e,t,n){return .2126*$S(e)+.7152*$S(t)+.0722*$S(n)}function Lk(e,t){const{r:n,g:r,b:i}=e,{r:a,g:o,b:s}=t,l=Ik(n,r,i),c=Ik(a,o,s);return(Math.max(l,c)+.05)/(Math.min(l,c)+.05)}function Fre(e,t){const n=ud(t,r=>Lk(e,Dre(r)));return t[n]}const Bre=e=>{const{threshold:t=4.5,palette:n=["#000","#fff"]}=e;return r=>(r.forEach(i=>{const a=i.attr("dependentElement").parsedStyle.fill,o=i.parsedStyle.fill;Lk(o,a)<t&&i.attr("fill",Fre(a,n))}),r)};function zre(){return{"data.fetch":gk,"data.inline":mk,"data.sortBy":yk,"data.sort":bk,"data.filter":xk,"data.pick":_k,"data.rename":wk,"data.fold":Sk,"data.slice":Ok,"data.custom":Ck,"data.map":Ek,"data.join":Pk,"data.kde":Tk,"data.log":Ak,"transform.stackY":B4,"transform.binX":G4,"transform.bin":DS,"transform.dodgeX":H4,"transform.jitter":Y4,"transform.jitterX":V4,"transform.jitterY":U4,"transform.symmetryY":X4,"transform.diffY":K4,"transform.stackEnter":q4,"transform.normalizeY":J4,"transform.select":Qm,"transform.selectX":ek,"transform.selectY":tk,"transform.groupX":nk,"transform.groupY":rk,"transform.groupColor":ik,"transform.group":Up,"transform.sortX":ok,"transform.sortY":sk,"transform.sortColor":lk,"transform.flexX":ck,"transform.pack":uk,"transform.sample":fk,"transform.filter":dk,"coordinate.cartesian":b5,"coordinate.polar":Jh,"coordinate.transpose":mw,"coordinate.theta":x5,"coordinate.parallel":yw,"coordinate.fisheye":_5,"coordinate.radial":J2,"coordinate.radar":w5,"encode.constant":S5,"encode.field":O5,"encode.transform":C5,"encode.column":E5,"mark.interval":N5,"mark.rect":j5,"mark.line":lR,"mark.point":XR,"mark.text":eI,"mark.cell":nI,"mark.area":uI,"mark.link":$w,"mark.image":OI,"mark.polygon":TI,"mark.box":LI,"mark.vector":kI,"mark.lineX":BI,"mark.lineY":$I,"mark.connector":YI,"mark.range":XI,"mark.rangeX":JI,"mark.rangeY":tL,"mark.path":oL,"mark.shape":cL,"mark.density":dL,"mark.heatmap":gL,"palette.category10":mL,"palette.category20":yL,"scale.linear":bL,"scale.ordinal":SL,"scale.band":EL,"scale.identity":ML,"scale.point":PL,"scale.time":KL,"scale.log":JL,"scale.pow":QL,"scale.sqrt":eN,"scale.threshold":tN,"scale.quantile":nN,"scale.quantize":rN,"scale.sequential":iN,"scale.constant":aN,"theme.classic":oN,"theme.classicDark":lN,"theme.academy":cN,"theme.light":tS,"theme.dark":sN,"component.axisX":uN,"component.axisY":fN,"component.legendCategory":rS,"component.legendContinuous":Dc,"component.legends":hN,"component.title":vN,"component.sliderX":bN,"component.sliderY":xN,"component.scrollbarX":_N,"component.scrollbarY":wN,"animation.scaleInX":sS,"animation.scaleOutX":ree,"animation.scaleInY":SN,"animation.scaleOutY":iee,"animation.waveIn":ON,"animation.fadeIn":CN,"animation.fadeOut":EN,"animation.zoomIn":aee,"animation.zoomOut":oee,"animation.pathIn":MN,"animation.morphing":RN,"animation.growInX":IN,"animation.growInY":LN,"interaction.elementHighlight":zm,"interaction.elementHighlightByX":NN,"interaction.elementHighlightByColor":kN,"interaction.elementSelect":Zm,"interaction.elementSelectByX":jN,"interaction.elementSelectByColor":DN,"interaction.fisheye":xee,"interaction.chartIndex":FN,"interaction.tooltip":qN,"interaction.legendFilter":Vee,"interaction.legendHighlight":Uee,"interaction.brushHighlight":mS,"interaction.brushXHighlight":ete,"interaction.brushYHighlight":tte,"interaction.brushAxisHighlight":ute,"interaction.brushFilter":_S,"interaction.brushXFilter":pte,"interaction.brushYFilter":vte,"interaction.sliderFilter":u4,"interaction.scrollbarFilter":xte,"interaction.poptip":h4,"interaction.treemapDrillDown":Zte,"interaction.elementPointMove":Vte,"composition.spaceLayer":P4,"composition.spaceFlex":T4,"composition.facetRect":L4,"composition.repeatMatrix":one,"composition.facetCircle":dne,"composition.timingKeyframe":k4,"labelTransform.overlapHide":Ire,"labelTransform.overlapDodgeY":kre,"labelTransform.overflowHide":jre,"labelTransform.contrastReverse":Bre}}var Kp=e=>e;function ny(e,t){e&&kk.hasOwnProperty(e.type)&&kk[e.type](e,t)}var Nk={Feature:function(e,t){ny(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)ny(n[r].geometry,t)}},kk={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){WS(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)WS(n[r],t,0)},Polygon:function(e,t){jk(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)jk(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)ny(n[r],t)}};function WS(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function jk(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)WS(e[n],t,1);t.polygonEnd()}function Ad(e,t){e&&Nk.hasOwnProperty(e.type)?Nk[e.type](e,t):ny(e,t)}class ql{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const a=n[i],o=t+a,s=Math.abs(t)<Math.abs(a)?t-(o-a):a-(o-t);s&&(n[r++]=s),t=o}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,a,o=0;if(n>0){for(o=t[--n];n>0&&(r=o,i=t[--n],o=r+i,a=i-(o-r),!a););n>0&&(a<0&&t[n-1]<0||a>0&&t[n-1]>0)&&(i=a*2,r=o+i,i==r-o&&(o=r))}return o}}function Vye(e,t){const n=new ql;if(t===void 0)for(let r of e)(r=+r)&&n.add(r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function Uye(e,t){const n=new ql;let r=-1;return Float64Array.from(e,t===void 0?i=>n.add(+i||0):i=>n.add(+t(i,++r,e)||0))}var _n=1e-6,Dk=1e-12,sr=Math.PI,Yi=sr/2,Fk=sr/4,ss=sr*2,ro=180/sr,ki=sr/180,Tr=Math.abs,Rd=Math.atan,Jl=Math.atan2,Qn=Math.cos,ry=Math.ceil,Bk=Math.exp,Xye=Math.floor,Kye=Math.hypot,iy=Math.log,GS=Math.pow,Bn=Math.sin,Ts=Math.sign||function(e){return e>0?1:e<0?-1:0},Wo=Math.sqrt,HS=Math.tan;function zk(e){return e>1?0:e<-1?sr:Math.acos(e)}function As(e){return e>1?Yi:e<-1?-Yi:Math.asin(e)}function qye(e){return(e=Bn(e/2))*e}function Rs(){}var YS=new ql,VS=new ql,Zk,$k,US,XS,Jc={point:Rs,lineStart:Rs,lineEnd:Rs,polygonStart:function(){Jc.lineStart=Zre,Jc.lineEnd=Wre},polygonEnd:function(){Jc.lineStart=Jc.lineEnd=Jc.point=Rs,YS.add(Tr(VS)),VS=new ql},result:function(){var e=YS/2;return YS=new ql,e}};function Zre(){Jc.point=$re}function $re(e,t){Jc.point=Wk,Zk=US=e,$k=XS=t}function Wk(e,t){VS.add(XS*e-US*t),US=e,XS=t}function Wre(){Wk(Zk,$k)}var Gk=Jc,Id=1/0,ay=Id,qp=-Id,oy=qp,Gre={point:Hre,lineStart:Rs,lineEnd:Rs,polygonStart:Rs,polygonEnd:Rs,result:function(){var e=[[Id,ay],[qp,oy]];return qp=oy=-(ay=Id=1/0),e}};function Hre(e,t){e<Id&&(Id=e),e>qp&&(qp=e),t<ay&&(ay=t),t>oy&&(oy=t)}var sy=Gre,KS=0,qS=0,Jp=0,ly=0,cy=0,Ld=0,JS=0,QS=0,Qp=0,Hk,Yk,yl,bl,Vs={point:qu,lineStart:Vk,lineEnd:Uk,polygonStart:function(){Vs.lineStart=Ure,Vs.lineEnd=Xre},polygonEnd:function(){Vs.point=qu,Vs.lineStart=Vk,Vs.lineEnd=Uk},result:function(){var e=Qp?[JS/Qp,QS/Qp]:Ld?[ly/Ld,cy/Ld]:Jp?[KS/Jp,qS/Jp]:[NaN,NaN];return KS=qS=Jp=ly=cy=Ld=JS=QS=Qp=0,e}};function qu(e,t){KS+=e,qS+=t,++Jp}function Vk(){Vs.point=Yre}function Yre(e,t){Vs.point=Vre,qu(yl=e,bl=t)}function Vre(e,t){var n=e-yl,r=t-bl,i=Wo(n*n+r*r);ly+=i*(yl+e)/2,cy+=i*(bl+t)/2,Ld+=i,qu(yl=e,bl=t)}function Uk(){Vs.point=qu}function Ure(){Vs.point=Kre}function Xre(){Xk(Hk,Yk)}function Kre(e,t){Vs.point=Xk,qu(Hk=yl=e,Yk=bl=t)}function Xk(e,t){var n=e-yl,r=t-bl,i=Wo(n*n+r*r);ly+=i*(yl+e)/2,cy+=i*(bl+t)/2,Ld+=i,i=bl*e-yl*t,JS+=i*(yl+e),QS+=i*(bl+t),Qp+=i*3,qu(yl=e,bl=t)}var Kk=Vs;function qk(e){this._context=e}qk.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,ss);break}}},result:Rs};var eO=new ql,tO,Jk,Qk,e0,t0,uy={point:Rs,lineStart:function(){uy.point=qre},lineEnd:function(){tO&&ej(Jk,Qk),uy.point=Rs},polygonStart:function(){tO=!0},polygonEnd:function(){tO=null},result:function(){var e=+eO;return eO=new ql,e}};function qre(e,t){uy.point=ej,Jk=e0=e,Qk=t0=t}function ej(e,t){e0-=e,t0-=t,eO.add(Wo(e0*e0+t0*t0)),e0=e,t0=t}var tj=uy;let nj,fy,rj,ij;class aj{constructor(t){this._append=t==null?oj:Jre(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(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==rj||this._append!==fy){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,rj=r,fy=this._append,ij=this._,this._=i}this._+=ij;break}}}result(){const t=this._;return this._="",t.length?t:null}}function oj(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Jre(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return oj;if(t!==nj){const n=oa(10,t);nj=t,fy=function(i){let a=1;this._+=i[0];for(const o=i.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+i[a]}}return fy}function sj(e,t){let n=3,r=4.5,i,a;function o(s){return s&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),Ad(s,i(a))),a.result()}return o.area=function(s){return Ad(s,i(Gk)),Gk.result()},o.measure=function(s){return Ad(s,i(tj)),tj.result()},o.bounds=function(s){return Ad(s,i(sy)),sy.result()},o.centroid=function(s){return Ad(s,i(Kk)),Kk.result()},o.projection=function(s){return arguments.length?(i=s==null?(e=null,Kp):(e=s).stream,o):e},o.context=function(s){return arguments.length?(a=s==null?(t=null,new aj(n)):new qk(t=s),typeof r!="function"&&a.pointRadius(r),o):t},o.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(a.pointRadius(+s),+s),o):r},o.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const l=Math.floor(s);if(!(l>=0))throw new RangeError(`invalid digits: ${s}`);n=l}return t===null&&(a=new aj(n)),o},o.projection(e).digits(n).context(t)}function Nd(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function lj(e,t,n){var r=Nd(e,t-_n,n).concat(t);return function(i){return r.map(function(a){return[i,a]})}}function cj(e,t,n){var r=Nd(e,t-_n,n).concat(t);return function(i){return r.map(function(a){return[a,i]})}}function Qre(){var e,t,n,r,i,a,o,s,l=10,c=l,u=90,f=360,d,h,p,v,g=2.5;function m(){return{type:"MultiLineString",coordinates:b()}}function b(){return Nd(ry(r/u)*u,n,u).map(p).concat(Nd(ry(s/f)*f,o,f).map(v)).concat(Nd(ry(t/l)*l,e,l).filter(function(_){return Tr(_%u)>_n}).map(d)).concat(Nd(ry(a/c)*c,i,c).filter(function(_){return Tr(_%f)>_n}).map(h))}return m.lines=function(){return b().map(function(_){return{type:"LineString",coordinates:_}})},m.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(v(o).slice(1),p(n).reverse().slice(1),v(s).reverse().slice(1))]}},m.extent=function(_){return arguments.length?m.extentMajor(_).extentMinor(_):m.extentMinor()},m.extentMajor=function(_){return arguments.length?(r=+_[0][0],n=+_[1][0],s=+_[0][1],o=+_[1][1],r>n&&(_=r,r=n,n=_),s>o&&(_=s,s=o,o=_),m.precision(g)):[[r,s],[n,o]]},m.extentMinor=function(_){return arguments.length?(t=+_[0][0],e=+_[1][0],a=+_[0][1],i=+_[1][1],t>e&&(_=t,t=e,e=_),a>i&&(_=a,a=i,i=_),m.precision(g)):[[t,a],[e,i]]},m.step=function(_){return arguments.length?m.stepMajor(_).stepMinor(_):m.stepMinor()},m.stepMajor=function(_){return arguments.length?(u=+_[0],f=+_[1],m):[u,f]},m.stepMinor=function(_){return arguments.length?(l=+_[0],c=+_[1],m):[l,c]},m.precision=function(_){return arguments.length?(g=+_,d=lj(a,i,90),h=cj(t,e,g),p=lj(s,o,90),v=cj(r,n,g),m):g},m.extentMajor([[-180,-90+_n],[180,90-_n]]).extentMinor([[-180,-80-_n],[180,80+_n]])}function eie(){return Qre()()}function uj(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Rs,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function dy(e,t){return Tr(e[0]-t[0])<_n&&Tr(e[1]-t[1])<_n}function hy(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function fj(e,t,n,r,i){var a=[],o=[],s,l;if(e.forEach(function(p){if(!((v=p.length-1)<=0)){var v,g=p[0],m=p[v],b;if(dy(g,m)){if(!g[2]&&!m[2]){for(i.lineStart(),s=0;s<v;++s)i.point((g=p[s])[0],g[1]);i.lineEnd();return}m[0]+=2*_n}a.push(b=new hy(g,p,null,!0)),o.push(b.o=new hy(g,null,b,!1)),a.push(b=new hy(m,p,null,!1)),o.push(b.o=new hy(m,null,b,!0))}}),!!a.length){for(o.sort(t),dj(a),dj(o),s=0,l=o.length;s<l;++s)o[s].e=n=!n;for(var c=a[0],u,f;;){for(var d=c,h=!0;d.v;)if((d=d.n)===c)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(s=0,l=u.length;s<l;++s)i.point((f=u[s])[0],f[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(h)for(u=d.p.z,s=u.length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,u=d.z,h=!h}while(!d.v);i.lineEnd()}}}function dj(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function nO(e){return[Jl(e[1],e[0]),As(e[2])]}function kd(e){var t=e[0],n=e[1],r=Qn(n);return[r*Qn(t),r*Bn(t),Bn(n)]}function py(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function vy(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function rO(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function gy(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function iO(e){var t=Wo(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function aO(e){return Tr(e[0])<=sr?e[0]:Ts(e[0])*((Tr(e[0])+sr)%ss-sr)}function tie(e,t){var n=aO(t),r=t[1],i=Bn(r),a=[Bn(n),-Qn(n),0],o=0,s=0,l=new ql;i===1?r=Yi+_n:i===-1&&(r=-Yi-_n);for(var c=0,u=e.length;c<u;++c)if(d=(f=e[c]).length)for(var f,d,h=f[d-1],p=aO(h),v=h[1]/2+Fk,g=Bn(v),m=Qn(v),b=0;b<d;++b,p=S,g=C,m=E,h=_){var _=f[b],S=aO(_),O=_[1]/2+Fk,C=Bn(O),E=Qn(O),P=S-p,T=P>=0?1:-1,A=T*P,R=A>sr,z=g*C;if(l.add(Jl(z*T*Bn(A),m*E+z*Qn(A))),o+=R?P+T*ss:P,R^p>=n^S>=n){var I=vy(kd(h),kd(_));iO(I);var L=vy(a,I);iO(L);var F=(R^P>=0?-1:1)*As(L[2]);(r>F||r===F&&(I[0]||I[1]))&&(s+=R^P>=0?1:-1)}}return(o<-_n||o<_n&&l<-Dk)^s&1}function*nie(e){for(const t of e)yield*t}function hj(e){return Array.from(nie(e))}function pj(e,t,n,r){return function(i){var a=t(i),o=uj(),s=t(o),l=!1,c,u,f,d={point:h,lineStart:v,lineEnd:g,polygonStart:function(){d.point=m,d.lineStart=b,d.lineEnd=_,u=[],c=[]},polygonEnd:function(){d.point=h,d.lineStart=v,d.lineEnd=g,u=hj(u);var S=tie(c,r);u.length?(l||(i.polygonStart(),l=!0),fj(u,iie,S,n,i)):S&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(S,O){e(S,O)&&i.point(S,O)}function p(S,O){a.point(S,O)}function v(){d.point=p,a.lineStart()}function g(){d.point=h,a.lineEnd()}function m(S,O){f.push([S,O]),s.point(S,O)}function b(){s.lineStart(),f=[]}function _(){m(f[0][0],f[0][1]),s.lineEnd();var S=s.clean(),O=o.result(),C,E=O.length,P,T,A;if(f.pop(),c.push(f),f=null,!!E){if(S&1){if(T=O[0],(P=T.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),C=0;C<P;++C)i.point((A=T[C])[0],A[1]);i.lineEnd()}return}E>1&&S&2&&O.push(O.pop().concat(O.shift())),u.push(O.filter(rie))}}return d}}function rie(e){return e.length>1}function iie(e,t){return((e=e.x)[0]<0?e[1]-Yi-_n:Yi-e[1])-((t=t.x)[0]<0?t[1]-Yi-_n:Yi-t[1])}var vj=pj(function(){return!0},aie,sie,[-sr,-Yi]);function aie(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?sr:-sr,l=Tr(a-t);Tr(l-sr)<_n?(e.point(t,n=(n+o)/2>0?Yi:-Yi),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&l>=sr&&(Tr(t-r)<_n&&(t-=r*_n),Tr(a-s)<_n&&(a-=s*_n),n=oie(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function oie(e,t,n,r){var i,a,o=Bn(e-n);return Tr(o)>_n?Rd((Bn(t)*(a=Qn(r))*Bn(n)-Bn(r)*(i=Qn(t))*Bn(e))/(i*a*o)):(t+r)/2}function sie(e,t,n,r){var i;if(e==null)i=n*Yi,r.point(-sr,i),r.point(0,i),r.point(sr,i),r.point(sr,0),r.point(sr,-i),r.point(0,-i),r.point(-sr,-i),r.point(-sr,0),r.point(-sr,i);else if(Tr(e[0]-t[0])>_n){var a=e[0]<t[0]?sr:-sr;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function gj(e,t,n,r,i,a){if(n){var o=Qn(t),s=Bn(t),l=r*n;i==null?(i=t+r*ss,a=t-l/2):(i=mj(o,i),a=mj(o,a),(r>0?i<a:i>a)&&(i+=r*ss));for(var c,u=i;r>0?u>a:u<a;u-=l)c=nO([o,-s*Qn(u),-s*Bn(u)]),e.point(c[0],c[1])}}function mj(e,t){t=kd(t),t[0]-=e,iO(t);var n=zk(-t[1]);return((-t[2]<0?-n:n)+ss-_n)%ss}function Jye(){var e=constant([0,0]),t=constant(90),n=constant(2),r,i,a={point:o};function o(l,c){r.push(l=i(l,c)),l[0]*=degrees,l[1]*=degrees}function s(){var l=e.apply(this,arguments),c=t.apply(this,arguments)*radians,u=n.apply(this,arguments)*radians;return r=[],i=rotateRadians(-l[0]*radians,-l[1]*radians,0).invert,gj(a,c,u,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:constant([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:constant(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:constant(+l),s):n},s}function lie(e){var t=Qn(e),n=2*ki,r=t>0,i=Tr(t)>_n;function a(u,f,d,h){gj(h,e,n,d,u,f)}function o(u,f){return Qn(u)*Qn(f)>t}function s(u){var f,d,h,p,v;return{lineStart:function(){p=h=!1,v=1},point:function(g,m){var b=[g,m],_,S=o(g,m),O=r?S?0:c(g,m):S?c(g+(g<0?sr:-sr),m):0;if(!f&&(p=h=S)&&u.lineStart(),S!==h&&(_=l(f,b),(!_||dy(f,_)||dy(b,_))&&(b[2]=1)),S!==h)v=0,S?(u.lineStart(),_=l(b,f),u.point(_[0],_[1])):(_=l(f,b),u.point(_[0],_[1],2),u.lineEnd()),f=_;else if(i&&f&&r^S){var C;!(O&d)&&(C=l(b,f,!0))&&(v=0,r?(u.lineStart(),u.point(C[0][0],C[0][1]),u.point(C[1][0],C[1][1]),u.lineEnd()):(u.point(C[1][0],C[1][1]),u.lineEnd(),u.lineStart(),u.point(C[0][0],C[0][1],3)))}S&&(!f||!dy(f,b))&&u.point(b[0],b[1]),f=b,h=S,d=O},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return v|(p&&h)<<1}}}function l(u,f,d){var h=kd(u),p=kd(f),v=[1,0,0],g=vy(h,p),m=py(g,g),b=g[0],_=m-b*b;if(!_)return!d&&u;var S=t*m/_,O=-t*b/_,C=vy(v,g),E=gy(v,S),P=gy(g,O);rO(E,P);var T=C,A=py(E,T),R=py(T,T),z=A*A-R*(py(E,E)-1);if(!(z<0)){var I=Wo(z),L=gy(T,(-A-I)/R);if(rO(L,E),L=nO(L),!d)return L;var F=u[0],Z=f[0],H=u[1],W=f[1],G;Z<F&&(G=F,F=Z,Z=G);var J=Z-F,re=Tr(J-sr)<_n,he=re||J<_n;if(!re&&W<H&&(G=H,H=W,W=G),he?re?H+W>0^L[1]<(Tr(L[0]-F)<_n?H:W):H<=L[1]&&L[1]<=W:J>sr^(F<=L[0]&&L[0]<=Z)){var ce=gy(T,(-A+I)/R);return rO(ce,E),[L,nO(ce)]}}}function c(u,f){var d=r?e:sr-e,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return pj(o,s,a,r?[0,-e]:[-sr,e-sr])}function cie(e,t,n,r,i,a){var o=e[0],s=e[1],l=t[0],c=t[1],u=0,f=1,d=l-o,h=c-s,p;if(p=n-o,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>u&&(u=p)}if(p=i-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<f&&(f=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>u&&(u=p)}if(p=a-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<f&&(f=p)}return u>0&&(e[0]=o+u*d,e[1]=s+u*h),f<1&&(t[0]=o+f*d,t[1]=s+f*h),!0}}}}}var n0=1e9,my=-n0;function yj(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function a(c,u,f,d){var h=0,p=0;if(c==null||(h=o(c,f))!==(p=o(u,f))||l(c,u)<0^f>0)do d.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+f+4)%4)!==p);else d.point(u[0],u[1])}function o(c,u){return Tr(c[0]-e)<_n?u>0?0:3:Tr(c[0]-n)<_n?u>0?2:1:Tr(c[1]-t)<_n?u>0?1:0:u>0?3:2}function s(c,u){return l(c.x,u.x)}function l(c,u){var f=o(c,1),d=o(u,1);return f!==d?f-d:f===0?u[1]-c[1]:f===1?c[0]-u[0]:f===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,f=uj(),d,h,p,v,g,m,b,_,S,O,C,E={point:P,lineStart:z,lineEnd:I,polygonStart:A,polygonEnd:R};function P(F,Z){i(F,Z)&&u.point(F,Z)}function T(){for(var F=0,Z=0,H=h.length;Z<H;++Z)for(var W=h[Z],G=1,J=W.length,re=W[0],he,ce,ke=re[0],ot=re[1];G<J;++G)he=ke,ce=ot,re=W[G],ke=re[0],ot=re[1],ce<=r?ot>r&&(ke-he)*(r-ce)>(ot-ce)*(e-he)&&++F:ot<=r&&(ke-he)*(r-ce)<(ot-ce)*(e-he)&&--F;return F}function A(){u=f,d=[],h=[],C=!0}function R(){var F=T(),Z=C&&F,H=(d=hj(d)).length;(Z||H)&&(c.polygonStart(),Z&&(c.lineStart(),a(null,null,1,c),c.lineEnd()),H&&fj(d,s,F,a,c),c.polygonEnd()),u=c,d=h=p=null}function z(){E.point=L,h&&h.push(p=[]),O=!0,S=!1,b=_=NaN}function I(){d&&(L(v,g),m&&S&&f.rejoin(),d.push(f.result())),E.point=P,S&&u.lineEnd()}function L(F,Z){var H=i(F,Z);if(h&&p.push([F,Z]),O)v=F,g=Z,m=H,O=!1,H&&(u.lineStart(),u.point(F,Z));else if(H&&S)u.point(F,Z);else{var W=[b=Math.max(my,Math.min(n0,b)),_=Math.max(my,Math.min(n0,_))],G=[F=Math.max(my,Math.min(n0,F)),Z=Math.max(my,Math.min(n0,Z))];cie(W,G,e,t,n,r)?(S||(u.lineStart(),u.point(W[0],W[1])),u.point(G[0],G[1]),H||u.lineEnd(),C=!1):H&&(u.lineStart(),u.point(F,Z),C=!1)}b=F,_=Z,S=H}return E}}function oO(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function sO(e,t){return Tr(e)>sr&&(e-=Math.round(e/ss)*ss),[e,t]}sO.invert=sO;function bj(e,t,n){return(e%=ss)?t||n?oO(_j(e),wj(t,n)):_j(e):t||n?wj(t,n):sO}function xj(e){return function(t,n){return t+=e,Tr(t)>sr&&(t-=Math.round(t/ss)*ss),[t,n]}}function _j(e){var t=xj(e);return t.invert=xj(-e),t}function wj(e,t){var n=Qn(e),r=Bn(e),i=Qn(t),a=Bn(t);function o(s,l){var c=Qn(l),u=Qn(s)*c,f=Bn(s)*c,d=Bn(l),h=d*n+u*r;return[Jl(f*i-h*a,u*n-d*r),As(h*i+f*a)]}return o.invert=function(s,l){var c=Qn(l),u=Qn(s)*c,f=Bn(s)*c,d=Bn(l),h=d*i-f*a;return[Jl(f*i+d*a,u*n+h*r),As(h*n-u*r)]},o}function uie(e){e=bj(e[0]*ki,e[1]*ki,e.length>2?e[2]*ki:0);function t(n){return n=e(n[0]*ki,n[1]*ki),n[0]*=ro,n[1]*=ro,n}return t.invert=function(n){return n=e.invert(n[0]*ki,n[1]*ki),n[0]*=ro,n[1]*=ro,n},t}function Qye(e){return{stream:r0(e)}}function r0(e){return function(t){var n=new lO;for(var r in e)n[r]=e[r];return n.stream=t,n}}function lO(){}lO.prototype={constructor:lO,point:function(e,t){this.stream.point(e,t)},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()}};function cO(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Ad(n,e.stream(sy)),t(sy.result()),r!=null&&e.clipExtent(r),e}function yy(e,t,n){return cO(e,function(r){var i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],o=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),s=+t[0][0]+(i-o*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(a-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([s,l])},n)}function uO(e,t,n){return yy(e,[[0,0],t],n)}function fO(e,t,n){return cO(e,function(r){var i=+t,a=i/(r[1][0]-r[0][0]),o=(i-a*(r[1][0]+r[0][0]))/2,s=-a*r[0][1];e.scale(150*a).translate([o,s])},n)}function dO(e,t,n){return cO(e,function(r){var i=+t,a=i/(r[1][1]-r[0][1]),o=-a*r[0][0],s=(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])},n)}var Sj=16,fie=Qn(30*ki);function Oj(e,t){return+t?hie(e,t):die(e)}function die(e){return r0({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function hie(e,t){function n(r,i,a,o,s,l,c,u,f,d,h,p,v,g){var m=c-r,b=u-i,_=m*m+b*b;if(_>4*t&&v--){var S=o+d,O=s+h,C=l+p,E=Wo(S*S+O*O+C*C),P=As(C/=E),T=Tr(Tr(C)-1)<_n||Tr(a-f)<_n?(a+f)/2:Jl(O,S),A=e(T,P),R=A[0],z=A[1],I=R-r,L=z-i,F=b*I-m*L;(F*F/_>t||Tr((m*I+b*L)/_-.5)>.3||o*d+s*h+l*p<fie)&&(n(r,i,a,o,s,l,R,z,T,S/=E,O/=E,C,v,g),g.point(R,z),n(R,z,T,S,O,C,c,u,f,d,h,p,v,g))}}return function(r){var i,a,o,s,l,c,u,f,d,h,p,v,g={point:m,lineStart:b,lineEnd:S,polygonStart:function(){r.polygonStart(),g.lineStart=O},polygonEnd:function(){r.polygonEnd(),g.lineStart=b}};function m(P,T){P=e(P,T),r.point(P[0],P[1])}function b(){f=NaN,g.point=_,r.lineStart()}function _(P,T){var A=kd([P,T]),R=e(P,T);n(f,d,u,h,p,v,f=R[0],d=R[1],u=P,h=A[0],p=A[1],v=A[2],Sj,r),r.point(f,d)}function S(){g.point=m,r.lineEnd()}function O(){b(),g.point=C,g.lineEnd=E}function C(P,T){_(i=P,T),a=f,o=d,s=h,l=p,c=v,g.point=_}function E(){n(f,d,u,h,p,v,a,o,i,s,l,c,Sj,r),g.lineEnd=S,S()}return g}}var pie=r0({point:function(e,t){this.stream.point(e*ki,t*ki)}});function vie(e){return r0({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function gie(e,t,n,r,i){function a(o,s){return o*=r,s*=i,[t+e*o,n-e*s]}return a.invert=function(o,s){return[(o-t)/e*r,(n-s)/e*i]},a}function Cj(e,t,n,r,i,a){if(!a)return gie(e,t,n,r,i);var o=Qn(a),s=Bn(a),l=o*e,c=s*e,u=o/e,f=s/e,d=(s*n-o*t)/e,h=(s*t+o*n)/e;function p(v,g){return v*=r,g*=i,[l*v-c*g+t,n-c*v-l*g]}return p.invert=function(v,g){return[r*(u*v-f*g+d),i*(h-f*v-u*g)]},p}function xl(e){return hO(function(){return e})()}function hO(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,l=0,c=0,u,f=0,d=1,h=1,p=null,v=vj,g=null,m,b,_,S=Kp,O=.5,C,E,P,T,A;function R(F){return P(F[0]*ki,F[1]*ki)}function z(F){return F=P.invert(F[0],F[1]),F&&[F[0]*ro,F[1]*ro]}R.stream=function(F){return T&&A===F?T:T=pie(vie(u)(v(C(S(A=F)))))},R.preclip=function(F){return arguments.length?(v=F,p=void 0,L()):v},R.postclip=function(F){return arguments.length?(S=F,g=m=b=_=null,L()):S},R.clipAngle=function(F){return arguments.length?(v=+F?lie(p=F*ki):(p=null,vj),L()):p*ro},R.clipExtent=function(F){return arguments.length?(S=F==null?(g=m=b=_=null,Kp):yj(g=+F[0][0],m=+F[0][1],b=+F[1][0],_=+F[1][1]),L()):g==null?null:[[g,m],[b,_]]},R.scale=function(F){return arguments.length?(n=+F,I()):n},R.translate=function(F){return arguments.length?(r=+F[0],i=+F[1],I()):[r,i]},R.center=function(F){return arguments.length?(a=F[0]%360*ki,o=F[1]%360*ki,I()):[a*ro,o*ro]},R.rotate=function(F){return arguments.length?(s=F[0]%360*ki,l=F[1]%360*ki,c=F.length>2?F[2]%360*ki:0,I()):[s*ro,l*ro,c*ro]},R.angle=function(F){return arguments.length?(f=F%360*ki,I()):f*ro},R.reflectX=function(F){return arguments.length?(d=F?-1:1,I()):d<0},R.reflectY=function(F){return arguments.length?(h=F?-1:1,I()):h<0},R.precision=function(F){return arguments.length?(C=Oj(E,O=F*F),L()):Wo(O)},R.fitExtent=function(F,Z){return yy(R,F,Z)},R.fitSize=function(F,Z){return uO(R,F,Z)},R.fitWidth=function(F,Z){return fO(R,F,Z)},R.fitHeight=function(F,Z){return dO(R,F,Z)};function I(){var F=Cj(n,0,0,d,h,f).apply(null,t(a,o)),Z=Cj(n,r-F[0],i-F[1],d,h,f);return u=bj(s,l,c),E=oO(t,Z),P=oO(u,E),C=Oj(E,O),L()}function L(){return T=A=null,R}return function(){return t=e.apply(this,arguments),R.invert=t.invert&&z,I()}}function pO(e){var t=0,n=sr/3,r=hO(e),i=r(t,n);return i.parallels=function(a){return arguments.length?r(t=a[0]*ki,n=a[1]*ki):[t*ro,n*ro]},i}function mie(e){var t=Qn(e);function n(r,i){return[r*t,Bn(i)/t]}return n.invert=function(r,i){return[r/t,As(i*t)]},n}function Ej(e,t){var n=Bn(e),r=(n+Bn(t))/2;if(Tr(r)<_n)return mie(e);var i=1+n*(2*r-n),a=Wo(i)/r;function o(s,l){var c=Wo(i-2*r*Bn(l))/r;return[c*Bn(s*=r),a-c*Qn(s)]}return o.invert=function(s,l){var c=a-l,u=Jl(s,Tr(c))*Ts(c);return c*r<0&&(u-=sr*Ts(s)*Ts(c)),[u/r,As((i-(s*s+c*c)*r*r)/(2*r))]},o}function by(){return pO(Ej).scale(155.424).center([0,33.6442])}function Mj(){return by().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function yie(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function bie(){var e,t,n=Mj(),r,i=by().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=by().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,c={point:function(d,h){l=[d,h]}};function u(d){var h=d[0],p=d[1];return l=null,r.point(h,p),l||(a.point(h,p),l)||(s.point(h,p),l)}u.invert=function(d){var h=n.scale(),p=n.translate(),v=(d[0]-p[0])/h,g=(d[1]-p[1])/h;return(g>=.12&&g<.234&&v>=-.425&&v<-.214?i:g>=.166&&g<.234&&v>=-.214&&v<-.115?o:n).invert(d)},u.stream=function(d){return e&&t===d?e:e=yie([n.stream(t=d),i.stream(d),o.stream(d)])},u.precision=function(d){return arguments.length?(n.precision(d),i.precision(d),o.precision(d),f()):n.precision()},u.scale=function(d){return arguments.length?(n.scale(d),i.scale(d*.35),o.scale(d),u.translate(n.translate())):n.scale()},u.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],v=+d[1];return r=n.translate(d).clipExtent([[p-.455*h,v-.238*h],[p+.455*h,v+.238*h]]).stream(c),a=i.translate([p-.307*h,v+.201*h]).clipExtent([[p-.425*h+_n,v+.12*h+_n],[p-.214*h-_n,v+.234*h-_n]]).stream(c),s=o.translate([p-.205*h,v+.212*h]).clipExtent([[p-.214*h+_n,v+.166*h+_n],[p-.115*h-_n,v+.234*h-_n]]).stream(c),f()},u.fitExtent=function(d,h){return yy(u,d,h)},u.fitSize=function(d,h){return uO(u,d,h)},u.fitWidth=function(d,h){return fO(u,d,h)},u.fitHeight=function(d,h){return dO(u,d,h)};function f(){return e=t=null,u}return u.scale(1070)}function Pj(e){return function(t,n){var r=Qn(t),i=Qn(n),a=e(r*i);return a===1/0?[2,0]:[a*i*Bn(t),a*Bn(n)]}}function i0(e){return function(t,n){var r=Wo(t*t+n*n),i=e(r),a=Bn(i),o=Qn(i);return[Jl(t*a,r*o),As(r&&n*a/r)]}}var vO=Pj(function(e){return Wo(2/(1+e))});vO.invert=i0(function(e){return 2*As(e/2)});function xie(){return xl(vO).scale(124.75).clipAngle(180-.001)}var gO=Pj(function(e){return(e=zk(e))&&e/Bn(e)});gO.invert=i0(function(e){return e});function _ie(){return xl(gO).scale(79.4188).clipAngle(180-.001)}function a0(e,t){return[e,iy(HS((Yi+t)/2))]}a0.invert=function(e,t){return[e,2*Rd(Bk(t))-Yi]};function wie(){return Tj(a0).scale(961/ss)}function Tj(e){var t=xl(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,o=null,s,l,c;t.scale=function(f){return arguments.length?(r(f),u()):r()},t.translate=function(f){return arguments.length?(i(f),u()):i()},t.center=function(f){return arguments.length?(n(f),u()):n()},t.clipExtent=function(f){return arguments.length?(f==null?o=s=l=c=null:(o=+f[0][0],s=+f[0][1],l=+f[1][0],c=+f[1][1]),u()):o==null?null:[[o,s],[l,c]]};function u(){var f=sr*r(),d=t(uie(t.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===a0?[[Math.max(d[0]-f,o),s],[Math.min(d[0]+f,l),c]]:[[o,Math.max(d[1]-f,s)],[l,Math.min(d[1]+f,c)]])}return u()}function xy(e){return HS((Yi+e)/2)}function Aj(e,t){var n=Qn(e),r=e===t?Bn(e):iy(n/Qn(t))/iy(xy(t)/xy(e)),i=n*GS(xy(e),r)/r;if(!r)return a0;function a(o,s){i>0?s<-Yi+_n&&(s=-Yi+_n):s>Yi-_n&&(s=Yi-_n);var l=i/GS(xy(s),r);return[l*Bn(r*o),i-l*Qn(r*o)]}return a.invert=function(o,s){var l=i-s,c=Ts(r)*Wo(o*o+l*l),u=Jl(o,Tr(l))*Ts(l);return l*r<0&&(u-=sr*Ts(o)*Ts(l)),[u/r,2*Rd(GS(i/c,1/r))-Yi]},a}function Sie(){return pO(Aj).scale(109.5).parallels([30,30])}function o0(e,t){return[e,t]}o0.invert=o0;function Oie(){return xl(o0).scale(152.63)}function Rj(e,t){var n=Qn(e),r=e===t?Bn(e):(n-Qn(t))/(t-e),i=n/r+e;if(Tr(r)<_n)return o0;function a(o,s){var l=i-s,c=r*o;return[l*Bn(c),i-l*Qn(c)]}return a.invert=function(o,s){var l=i-s,c=Jl(o,Tr(l))*Ts(l);return l*r<0&&(c-=sr*Ts(o)*Ts(l)),[c/r,i-Ts(r)*Wo(o*o+l*l)]},a}function Cie(){return pO(Rj).scale(131.154).center([0,13.9389])}var s0=1.340264,l0=-.081106,c0=893e-6,u0=.003796,_y=Wo(3)/2,Eie=12;function mO(e,t){var n=As(_y*Bn(t)),r=n*n,i=r*r*r;return[e*Qn(n)/(_y*(s0+3*l0*r+i*(7*c0+9*u0*r))),n*(s0+l0*r+i*(c0+u0*r))]}mO.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,a=0,o,s,l;a<Eie&&(s=n*(s0+l0*r+i*(c0+u0*r))-t,l=s0+3*l0*r+i*(7*c0+9*u0*r),n-=o=s/l,r=n*n,i=r*r*r,!(Tr(o)<Dk));++a);return[_y*e*(s0+3*l0*r+i*(7*c0+9*u0*r))/Qn(n),As(Bn(n)/_y)]};function Mie(){return xl(mO).scale(177.158)}function yO(e,t){var n=Qn(t),r=Qn(e)*n;return[n*Bn(e)/r,Bn(t)/r]}yO.invert=i0(Rd);function Pie(){return xl(yO).scale(144.049).clipAngle(60)}function Tie(){var e=1,t=0,n=0,r=1,i=1,a=0,o,s,l=null,c,u,f,d=1,h=1,p=r0({point:function(S,O){var C=_([S,O]);this.stream.point(C[0],C[1])}}),v=Kp,g,m;function b(){return d=e*r,h=e*i,g=m=null,_}function _(S){var O=S[0]*d,C=S[1]*h;if(a){var E=C*o-O*s;O=O*o+C*s,C=E}return[O+t,C+n]}return _.invert=function(S){var O=S[0]-t,C=S[1]-n;if(a){var E=C*o+O*s;O=O*o-C*s,C=E}return[O/d,C/h]},_.stream=function(S){return g&&m===S?g:g=p(v(m=S))},_.postclip=function(S){return arguments.length?(v=S,l=c=u=f=null,b()):v},_.clipExtent=function(S){return arguments.length?(v=S==null?(l=c=u=f=null,Kp):yj(l=+S[0][0],c=+S[0][1],u=+S[1][0],f=+S[1][1]),b()):l==null?null:[[l,c],[u,f]]},_.scale=function(S){return arguments.length?(e=+S,b()):e},_.translate=function(S){return arguments.length?(t=+S[0],n=+S[1],b()):[t,n]},_.angle=function(S){return arguments.length?(a=S%360*ki,s=Bn(a),o=Qn(a),b()):a*ro},_.reflectX=function(S){return arguments.length?(r=S?-1:1,b()):r<0},_.reflectY=function(S){return arguments.length?(i=S?-1:1,b()):i<0},_.fitExtent=function(S,O){return yy(_,S,O)},_.fitSize=function(S,O){return uO(_,S,O)},_.fitWidth=function(S,O){return fO(_,S,O)},_.fitHeight=function(S,O){return dO(_,S,O)},_}function bO(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}bO.invert=function(e,t){var n=t,r=25,i;do{var a=n*n,o=a*a;n-=i=(n*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-t)/(1.007226+a*(.015085*3+o*(-.044475*7+.028874*9*a-.005916*11*o)))}while(Tr(i)>_n&&--r>0);return[e/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function Aie(){return xl(bO).scale(175.295)}function xO(e,t){return[Qn(t)*Bn(e),Bn(t)]}xO.invert=i0(As);function Rie(){return xl(xO).scale(249.5).clipAngle(90+_n)}function _O(e,t){var n=Qn(t),r=1+Qn(e)*n;return[n*Bn(e)/r,Bn(t)/r]}_O.invert=i0(function(e){return 2*Rd(e)});function Iie(){return xl(_O).scale(250).clipAngle(142)}function wO(e,t){return[iy(HS((Yi+t)/2)),-e]}wO.invert=function(e,t){return[-t,2*Rd(Bk(e))-Yi]};function Lie(){var e=Tj(wO),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}var Nie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function kie(e){if(typeof e=="function")return e;const t=`geo${Rc(e)}`,n=_t[t];if(!n)throw new Error(`Unknown coordinate: ${e}`);return n}function jie(e){return{type:"FeatureCollection",features:e.flatMap(t=>Die(t).features)}}function Die(e){const t={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!e||!e.type)return null;const n=t[e.type];if(!n)return null;if(n==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:e}]};if(n==="feature")return{type:"FeatureCollection",features:[e]};if(n==="featureCollection")return e}function Fie(e,t){var n;for(const[r,i]of Object.entries(t))(n=e[r])===null||n===void 0||n.call(e,i)}function Bie(e,t,n,r){const i=()=>{const s=t.filter(Ij);return s.find(c=>c.sphere)?{type:"Sphere"}:jie(s.filter(c=>!c.sphere).flatMap(c=>c.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return zie(e,a,n);if(o==="fitWidth")return Zie(e,a,n)}function zie(e,t,n){const{x:r,y:i,width:a,height:o}=n;e.fitExtent([[r,i],[a,o]],t)}function Zie(e,t,n){const{width:r,height:i}=n,[[a,o],[s,l]]=sj(e.fitWidth(r,t)).bounds(t),c=Math.ceil(l-o),u=Math.min(Math.ceil(s-a),c),f=e.scale()*(u-1)/u,[d,h]=e.translate(),p=h+(i-c)/2;e.scale(f).translate([d,p]).precision(.2)}function $ie(e){const{data:t}=e;if(Array.isArray(t))return Object.assign(Object.assign({},e),{data:{value:t}});const{type:n}=t;return n==="graticule10"?Object.assign(Object.assign({},e),{data:{value:[eie()]}}):n==="sphere"?Object.assign(Object.assign({},e),{sphere:!0,data:{value:[{type:"Sphere"}]}}):e}function Ij(e){return e.type==="geoPath"}const Lj=()=>e=>{const{children:t,coordinate:n={}}=e;if(!Array.isArray(t))return[];const{type:r="equalEarth"}=n,i=Nie(n,["type"]),a=kie(r),o=t.map($ie);let s;function l(){return[["custom",(f,d,h,p)=>{const v=a();Bie(v,o,{x:f,y:d,width:h,height:p},i),Fie(v,i),s=sj(v);const m=new Qa({domain:[f,f+h]}),b=new Qa({domain:[d,d+p]}),_=O=>{const C=v(O);if(!C)return[null,null];const[E,P]=C;return[m.map(E),b.map(P)]},S=O=>{if(!O)return null;const[C,E]=O,P=[m.invert(C),b.invert(E)];return v.invert(P)};return{transform:O=>_(O),untransform:O=>S(O)}}]]}function c(f){const{style:d,tooltip:h={}}=f;return Object.assign(Object.assign({},f),{type:"path",tooltip:vm(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>Ij(f)?c(f):f;return[Object.assign(Object.assign({},e),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:l},children:o.flatMap(u)})]};Lj.props={};var Wie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Nj=()=>e=>{const{type:t,data:n,scale:r,encode:i,style:a,animate:o,key:s,state:l}=e,c=Wie(e,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},c),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:a,animate:o,state:l}]})]};Nj.props={};function Gie(){return{"composition.geoView":Lj,"composition.geoPath":Nj}}function Hie(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return kj(this.cover(t,n),t,n,e)}function kj(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,l=e._y0,c=e._x1,u=e._y1,f,d,h,p,v,g,m,b;if(!a)return e._root=o,e;for(;a.length;)if((v=t>=(f=(s+c)/2))?s=f:c=f,(g=n>=(d=(l+u)/2))?l=d:u=d,i=a,!(a=a[m=g<<1|v]))return i[m]=o,e;if(h=+e._x.call(null,a.data),p=+e._y.call(null,a.data),t===h&&n===p)return o.next=a,i?i[m]=o:e._root=o,e;do i=i?i[m]=new Array(4):e._root=new Array(4),(v=t>=(f=(s+c)/2))?s=f:c=f,(g=n>=(d=(l+u)/2))?l=d:u=d;while((m=g<<1|v)===(b=(p>=d)<<1|h>=f));return i[b]=a,i[m]=o,e}function Yie(e){var t,n,r=e.length,i,a,o=new Array(r),s=new Array(r),l=1/0,c=1/0,u=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<l&&(l=i),i>u&&(u=i),a<c&&(c=a),a>f&&(f=a));if(l>u||c>f)return this;for(this.cover(l,c).cover(u,f),n=0;n<r;++n)kj(this,o[n],s[n],e[n]);return this}function Vie(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,l,c;n>e||e>=i||r>t||t>=a;)switch(c=(t<r)<<1|e<n,l=new Array(4),l[c]=s,s=l,o*=2,c){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function Uie(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Xie(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function _o(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Kie(e,t,n){var r,i=this._x0,a=this._y0,o,s,l,c,u=this._x1,f=this._y1,d=[],h=this._root,p,v;for(h&&d.push(new _o(h,i,a,u,f)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,f=t+n,n*=n);p=d.pop();)if(!(!(h=p.node)||(o=p.x0)>u||(s=p.y0)>f||(l=p.x1)<i||(c=p.y1)<a))if(h.length){var g=(o+l)/2,m=(s+c)/2;d.push(new _o(h[3],g,m,l,c),new _o(h[2],o,m,g,c),new _o(h[1],g,s,l,m),new _o(h[0],o,s,g,m)),(v=(t>=m)<<1|e>=g)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=p)}else{var b=e-+this._x.call(null,h.data),_=t-+this._y.call(null,h.data),S=b*b+_*_;if(S<n){var O=Math.sqrt(n=S);i=e-O,a=t-O,u=e+O,f=t+O,r=h.data}}return r}function qie(e){if(isNaN(u=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,l=this._x1,c=this._y1,u,f,d,h,p,v,g,m;if(!n)return this;if(n.length)for(;;){if((p=u>=(d=(o+l)/2))?o=d:l=d,(v=f>=(h=(s+c)/2))?s=h:c=h,t=n,!(n=n[g=v<<1|p]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,m=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[m]=n:this._root=n),this):(this._root=a,this)}function Jie(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Qie(){return this._root}function eae(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function tae(e){var t=[],n,r=this._root,i,a,o,s,l;for(r&&t.push(new _o(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,l=n.y1)&&r.length){var c=(a+s)/2,u=(o+l)/2;(i=r[3])&&t.push(new _o(i,c,u,s,l)),(i=r[2])&&t.push(new _o(i,a,u,c,l)),(i=r[1])&&t.push(new _o(i,c,o,s,u)),(i=r[0])&&t.push(new _o(i,a,o,c,u))}return this}function nae(e){var t=[],n=[],r;for(this._root&&t.push(new _o(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,l=r.x1,c=r.y1,u=(o+l)/2,f=(s+c)/2;(a=i[0])&&t.push(new _o(a,o,s,u,f)),(a=i[1])&&t.push(new _o(a,u,s,l,f)),(a=i[2])&&t.push(new _o(a,o,f,u,c)),(a=i[3])&&t.push(new _o(a,u,f,l,c))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function rae(e){return e[0]}function iae(e){return arguments.length?(this._x=e,this):this._x}function aae(e){return e[1]}function oae(e){return arguments.length?(this._y=e,this):this._y}function jj(e,t,n){var r=new SO(t==null?rae:t,n==null?aae:n,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function SO(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Dj(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var wo=jj.prototype=SO.prototype;wo.copy=function(){var e=new SO(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Dj(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=Dj(r));return e},wo.add=Hie,wo.addAll=Yie,wo.cover=Vie,wo.data=Uie,wo.extent=Xie,wo.find=Kie,wo.remove=qie,wo.removeAll=Jie,wo.root=Qie,wo.size=eae,wo.visit=tae,wo.visitAfter=nae,wo.x=iae,wo.y=oae;function ls(e){return function(){return e}}function jd(e){return(e()-.5)*1e-6}var sae={value:function(){}};function Fj(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new wy(n)}function wy(e){this._=e}function lae(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}wy.prototype=Fj.prototype={constructor:wy,on:function(t,n){var r=this._,i=lae(t+"",r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(t=i[o]).type)&&(a=cae(r[a],t.name)))return a;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<s;)if(a=(t=i[o]).type)r[a]=Bj(r[a],t.name,n);else if(n==null)for(a in r)r[a]=Bj(r[a],t.name,null);return this},copy:function(){var t={},n=this._;for(var r in n)t[r]=n[r].slice();return new wy(t)},call:function(t,n){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,o;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,a=o.length;i<a;++i)o[i].value.apply(n,r)},apply:function(t,n,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)}};function cae(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Bj(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=sae,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var uae=Fj,Dd=0,f0=0,d0=0,zj=1e3,Sy,h0,Oy=0,Ju=0,Cy=0,p0=typeof performance=="object"&&performance.now?performance:Date,Zj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function $j(){return Ju||(Zj(fae),Ju=p0.now()+Cy)}function fae(){Ju=0}function OO(){this._call=this._time=this._next=null}OO.prototype=Wj.prototype={constructor:OO,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?$j():+n)+(t==null?0:+t),!this._next&&h0!==this&&(h0?h0._next=this:Sy=this,h0=this),this._call=e,this._time=n,CO()},stop:function(){this._call&&(this._call=null,this._time=1/0,CO())}};function Wj(e,t,n){var r=new OO;return r.restart(e,t,n),r}function dae(){$j(),++Dd;for(var e=Sy,t;e;)(t=Ju-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Dd}function Gj(){Ju=(Oy=p0.now())+Cy,Dd=f0=0;try{dae()}finally{Dd=0,pae(),Ju=0}}function hae(){var e=p0.now(),t=e-Oy;t>zj&&(Cy-=t,Oy=e)}function pae(){for(var e,t=Sy,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Sy=n);h0=e,CO(r)}function CO(e){if(!Dd){f0&&(f0=clearTimeout(f0));var t=e-Ju;t>24?(e<1/0&&(f0=setTimeout(Gj,e-p0.now()-Cy)),d0&&(d0=clearInterval(d0))):(d0||(Oy=p0.now(),d0=setInterval(hae,zj)),Dd=1,Zj(Gj))}}const vae=1664525,gae=1013904223,Hj=4294967296;function mae(){let e=1;return()=>(e=(vae*e+gae)%Hj)/Hj}function yae(e){return e.x}function bae(e){return e.y}var xae=10,_ae=Math.PI*(3-Math.sqrt(5));function wae(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,l=Wj(f),c=uae("tick","end"),u=mae();e==null&&(e=[]);function f(){d(),c.call("tick",t),n<r&&(l.stop(),c.call("end",t))}function d(v){var g,m=e.length,b;v===void 0&&(v=1);for(var _=0;_<v;++_)for(n+=(a-n)*i,s.forEach(function(S){S(n)}),g=0;g<m;++g)b=e[g],b.fx==null?b.x+=b.vx*=o:(b.x=b.fx,b.vx=0),b.fy==null?b.y+=b.vy*=o:(b.y=b.fy,b.vy=0);return t}function h(){for(var v=0,g=e.length,m;v<g;++v){if(m=e[v],m.index=v,m.fx!=null&&(m.x=m.fx),m.fy!=null&&(m.y=m.fy),isNaN(m.x)||isNaN(m.y)){var b=xae*Math.sqrt(.5+v),_=v*_ae;m.x=b*Math.cos(_),m.y=b*Math.sin(_)}(isNaN(m.vx)||isNaN(m.vy))&&(m.vx=m.vy=0)}}function p(v){return v.initialize&&v.initialize(e,u),v}return h(),t={tick:d,restart:function(){return l.restart(f),t},stop:function(){return l.stop(),t},nodes:function(v){return arguments.length?(e=v,h(),s.forEach(p),t):e},alpha:function(v){return arguments.length?(n=+v,t):n},alphaMin:function(v){return arguments.length?(r=+v,t):r},alphaDecay:function(v){return arguments.length?(i=+v,t):+i},alphaTarget:function(v){return arguments.length?(a=+v,t):a},velocityDecay:function(v){return arguments.length?(o=1-v,t):1-o},randomSource:function(v){return arguments.length?(u=v,s.forEach(p),t):u},force:function(v,g){return arguments.length>1?(g==null?s.delete(v):s.set(v,p(g)),t):s.get(v)},find:function(v,g,m){var b=0,_=e.length,S,O,C,E,P;for(m==null?m=1/0:m*=m,b=0;b<_;++b)E=e[b],S=v-E.x,O=g-E.y,C=S*S+O*O,C<m&&(P=E,m=C);return P},on:function(v,g){return arguments.length>1?(c.on(v,g),t):c.on(v)}}}function Sae(){var e,t,n,r,i=ls(-30),a,o=1,s=1/0,l=.81;function c(h){var p,v=e.length,g=jj(e,yae,bae).visitAfter(f);for(r=h,p=0;p<v;++p)t=e[p],g.visit(d)}function u(){if(e){var h,p=e.length,v;for(a=new Array(p),h=0;h<p;++h)v=e[h],a[v.index]=+i(v,h,e)}}function f(h){var p=0,v,g,m=0,b,_,S;if(h.length){for(b=_=S=0;S<4;++S)(v=h[S])&&(g=Math.abs(v.value))&&(p+=v.value,m+=g,b+=g*v.x,_+=g*v.y);h.x=b/m,h.y=_/m}else{v=h,v.x=v.data.x,v.y=v.data.y;do p+=a[v.data.index];while(v=v.next)}h.value=p}function d(h,p,v,g){if(!h.value)return!0;var m=h.x-t.x,b=h.y-t.y,_=g-p,S=m*m+b*b;if(_*_/l<S)return S<s&&(m===0&&(m=jd(n),S+=m*m),b===0&&(b=jd(n),S+=b*b),S<o&&(S=Math.sqrt(o*S)),t.vx+=m*h.value*r/S,t.vy+=b*h.value*r/S),!0;if(h.length||S>=s)return;(h.data!==t||h.next)&&(m===0&&(m=jd(n),S+=m*m),b===0&&(b=jd(n),S+=b*b),S<o&&(S=Math.sqrt(o*S)));do h.data!==t&&(_=a[h.data.index]*r/S,t.vx+=m*_,t.vy+=b*_);while(h=h.next)}return c.initialize=function(h,p){e=h,n=p,u()},c.strength=function(h){return arguments.length?(i=typeof h=="function"?h:ls(+h),u(),c):i},c.distanceMin=function(h){return arguments.length?(o=h*h,c):Math.sqrt(o)},c.distanceMax=function(h){return arguments.length?(s=h*h,c):Math.sqrt(s)},c.theta=function(h){return arguments.length?(l=h*h,c):Math.sqrt(l)},c}function Oae(e){return e.index}function Yj(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Cae(e){var t=Oae,n=f,r,i=ls(30),a,o,s,l,c,u=1;e==null&&(e=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var m=0,b=e.length;m<u;++m)for(var _=0,S,O,C,E,P,T,A;_<b;++_)S=e[_],O=S.source,C=S.target,E=C.x+C.vx-O.x-O.vx||jd(c),P=C.y+C.vy-O.y-O.vy||jd(c),T=Math.sqrt(E*E+P*P),T=(T-a[_])/T*g*r[_],E*=T,P*=T,C.vx-=E*(A=l[_]),C.vy-=P*A,O.vx+=E*(A=1-A),O.vy+=P*A}function h(){if(o){var g,m=o.length,b=e.length,_=new Map(o.map((O,C)=>[t(O,C,o),O])),S;for(g=0,s=new Array(m);g<b;++g)S=e[g],S.index=g,typeof S.source!="object"&&(S.source=Yj(_,S.source)),typeof S.target!="object"&&(S.target=Yj(_,S.target)),s[S.source.index]=(s[S.source.index]||0)+1,s[S.target.index]=(s[S.target.index]||0)+1;for(g=0,l=new Array(b);g<b;++g)S=e[g],l[g]=s[S.source.index]/(s[S.source.index]+s[S.target.index]);r=new Array(b),p(),a=new Array(b),v()}}function p(){if(o)for(var g=0,m=e.length;g<m;++g)r[g]=+n(e[g],g,e)}function v(){if(o)for(var g=0,m=e.length;g<m;++g)a[g]=+i(e[g],g,e)}return d.initialize=function(g,m){o=g,c=m,h()},d.links=function(g){return arguments.length?(e=g,h(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:ls(+g),p(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:ls(+g),v(),d):i},d}function Eae(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,o=n.length,s,l=0,c=0;for(a=0;a<o;++a)s=n[a],l+=s.x,c+=s.y;for(l=(l/o-e)*r,c=(c/o-t)*r,a=0;a<o;++a)s=n[a],s.x-=l,s.y-=c}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(e=+a,i):e},i.y=function(a){return arguments.length?(t=+a,i):t},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function Mae(e){var t=ls(.1),n,r,i;typeof e!="function"&&(e=ls(e==null?0:+e));function a(s){for(var l=0,c=n.length,u;l<c;++l)u=n[l],u.vx+=(i[l]-u.x)*r[l]*s}function o(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(t=typeof s=="function"?s:ls(+s),o(),a):t},a.x=function(s){return arguments.length?(e=typeof s=="function"?s:ls(+s),o(),a):e},a}function Pae(e){var t=ls(.1),n,r,i;typeof e!="function"&&(e=ls(e==null?0:+e));function a(s){for(var l=0,c=n.length,u;l<c;++l)u=n[l],u.vy+=(i[l]-u.y)*r[l]*s}function o(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(t=typeof s=="function"?s:ls(+s),o(),a):t},a.y=function(s){return arguments.length?(e=typeof s=="function"?s:ls(+s),o(),a):e},a}var Tae=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Aae={joint:!0},Rae={type:"link",axis:!1,legend:!1,encode:{x:[e=>e.source.x,e=>e.target.x],y:[e=>e.source.y,e=>e.target.y]},style:{stroke:"#999",strokeOpacity:.6}},Iae={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Lae={text:""};function Nae(e,t,n){const{nodes:r,links:i}=e,{joint:a,nodeStrength:o,linkStrength:s}=t,{nodeKey:l=p=>p.id,linkKey:c=p=>p.id}=n,u=Sae(),f=Cae(i).id(ml(c));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=wae(r).force("link",f).force("charge",u);a?d.force("center",Eae()):d.force("x",Mae()).force("y",Pae()),d.stop();const h=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let p=0;p<h;p++)d.tick();return{nodesData:r,linksData:i}}const Vj=e=>{const{data:t,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={}}=e,{nodeKey:u=C=>C.id,linkKey:f=C=>C.id}=n,d=Tae(n,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=Tt(h,"node"),v=Tt(h,"link"),{links:g,nodes:m}=Ow(t,h),{nodesData:b,linksData:_}=Nae({links:g,nodes:m},Je({},Aae,a),h),S=pl(c,"link",{items:[C=>({name:"source",value:ml(f)(C.source)}),C=>({name:"target",value:ml(f)(C.target)})]}),O=pl(c,"node",{items:[C=>({name:"key",value:ml(u)(C)})]},!0);return[Je({},Rae,{data:_,encode:v,labels:s,style:Tt(i,"link"),tooltip:S,animate:vl(l,"link")}),Je({},Iae,{data:b,encode:Object.assign({},p),scale:r,style:Tt(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},Lae),Tt(i,"label")),...o],animate:vl(l,"link")})]};Vj.props={};function kae(e,t){return e.parent===t.parent?1:2}function EO(e){var t=e.children;return t?t[0]:e.t}function MO(e){var t=e.children;return t?t[t.length-1]:e.t}function jae(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Dae(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function Fae(e,t,n){return e.a.parent===t.parent?e.a:n}function Ey(e,t){this._=e,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=t}Ey.prototype=Object.create(xd.prototype);function Bae(e){for(var t=new Ey(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=new Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new Ey(a[o],o)),i.parent=n;return(t.parent=new Ey(null,0)).children=[t],t}function zae(){var e=kae,t=1,n=1,r=null;function i(c){var u=Bae(c);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)c.eachBefore(l);else{var f=c,d=c,h=c;c.eachBefore(function(b){b.x<f.x&&(f=b),b.x>d.x&&(d=b),b.depth>h.depth&&(h=b)});var p=f===d?1:e(f,d)/2,v=p-f.x,g=t/(d.x+p+v),m=n/(h.depth||1);c.eachBefore(function(b){b.x=(b.x+v)*g,b.y=b.depth*m})}return c}function a(c){var u=c.children,f=c.parent.children,d=c.i?f[c.i-1]:null;if(u){Dae(c);var h=(u[0].z+u[u.length-1].z)/2;d?(c.z=d.z+e(c._,d._),c.m=c.z-h):c.z=h}else d&&(c.z=d.z+e(c._,d._));c.parent.A=s(c,d,c.parent.A||f[0])}function o(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,u,f){if(u){for(var d=c,h=c,p=u,v=d.parent.children[0],g=d.m,m=h.m,b=p.m,_=v.m,S;p=MO(p),d=EO(d),p&&d;)v=EO(v),h=MO(h),h.a=c,S=p.z+b-d.z-g+e(p._,d._),S>0&&(jae(Fae(p,c,f),c,S),g+=S,m+=S),b+=p.m,g+=d.m,_+=v.m,m+=h.m;p&&!MO(h)&&(h.t=p,h.m+=b-m),d&&!EO(v)&&(v.t=d,v.m+=g-_,f=c)}return f}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function Zae(e,t){return e.parent===t.parent?1:2}function $ae(e){return e.reduce(Wae,0)/e.length}function Wae(e,t){return e+t.x}function Gae(e){return 1+e.reduce(Hae,0)}function Hae(e,t){return Math.max(e,t.y)}function Yae(e){for(var t;t=e.children;)e=t[0];return e}function Vae(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Uae(){var e=Zae,t=1,n=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=$ae(h),d.y=Gae(h)):(d.x=o?s+=e(d,o):0,d.y=0,o=d)});var l=Yae(a),c=Vae(a),u=l.x-e(l,c)/2,f=c.x+e(c,l)/2;return a.eachAfter(r?function(d){d.x=(d.x-a.x)*t,d.y=(a.y-d.y)*n}:function(d){d.x=(d.x-u)/(f-u)*t,d.y=(1-(a.y?d.y/a.y:1))*n})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(r=!1,t=+a[0],n=+a[1],i):r?null:[t,n]},i.nodeSize=function(a){return arguments.length?(r=!0,t=+a[0],n=+a[1],i):r?[t,n]:null},i}const Uj=e=>t=>n=>{const{field:r="value",nodeSize:i,separation:a,sortBy:o,as:s=["x","y"]}=t,[l,c]=s,u=bd(n,p=>p.children).sum(p=>p[r]).sort(o),f=e();f.size([1,1]),i&&f.nodeSize(i),a&&f.separation(a),f(u);const d=[];u.each(p=>{p[l]=p.x,p[c]=p.y,p.name=p.data.name,d.push(p)});const h=u.links();return h.forEach(p=>{p[l]=[p.source[l],p.target[l]],p[c]=[p.source[c],p.target[c]]}),{nodes:d,edges:h}},Xj=e=>Uj(Uae)(e);Xj.props={};const Kj=e=>Uj(zae)(e);Kj.props={};const Xae={sortBy:(e,t)=>t.value-e.value},Kae={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},qae={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},Jae={text:"",fontSize:10},qj=e=>{const{data:t,encode:n={},scale:r={},style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={}}=e,u=n==null?void 0:n.value,{nodes:f,edges:d}=Kj(Object.assign(Object.assign(Object.assign({},Xae),a),{field:u}))(t),h=pl(c,"node",{title:"name",items:["value"]},!0),p=pl(c,"link",{title:"",items:[v=>({name:"source",value:v.source.name}),v=>({name:"target",value:v.target.name})]});return[Je({},qae,{data:d,encode:Tt(n,"link"),scale:Tt(r,"link"),labels:s,style:Object.assign({stroke:"#999"},Tt(i,"link")),tooltip:p,animate:vl(l,"link")}),Je({},Kae,{data:f,scale:Tt(r,"node"),encode:Tt(n,"node"),labels:[Object.assign(Object.assign({},Jae),Tt(i,"label")),...o],style:Object.assign({},Tt(i,"node")),tooltip:h,animate:vl(l,"node")})]};qj.props={};var Qae=1664525,eoe=1013904223,Jj=4294967296;function toe(){var e=1;return function(){return(e=(Qae*e+eoe)%Jj)/Jj}}var noe=Y(52677);function roe(e){return noe(e)==="object"&&"length"in e?e:Array.from(e)}function ioe(e,t){for(var n=e.length,r,i;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function e1e(e){return Qj(e,lcg())}function Qj(e,t){for(var n=0,r=(e=ioe(Array.from(e),t)).length,i=[],a,o;n<r;)a=e[n],o&&e6(o,a)?++n:(o=ooe(i=aoe(i,a)),n=0);return o}function aoe(e,t){var n,r;if(PO(t,e))return[t];for(n=0;n<e.length;++n)if(My(t,e[n])&&PO(v0(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(My(v0(e[n],e[r]),t)&&My(v0(e[n],t),e[r])&&My(v0(e[r],t),e[n])&&PO(t6(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function My(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function e6(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function PO(e,t){for(var n=0;n<t.length;++n)if(!e6(e,t[n]))return!1;return!0}function ooe(e){switch(e.length){case 1:return soe(e[0]);case 2:return v0(e[0],e[1]);case 3:return t6(e[0],e[1],e[2])}}function soe(e){return{x:e.x,y:e.y,r:e.r}}function v0(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,o=t.y,s=t.r,l=a-n,c=o-r,u=s-i,f=Math.sqrt(l*l+c*c);return{x:(n+a+l/f*u)/2,y:(r+o+c/f*u)/2,r:(f+i+s)/2}}function t6(e,t,n){var r=e.x,i=e.y,a=e.r,o=t.x,s=t.y,l=t.r,c=n.x,u=n.y,f=n.r,d=r-o,h=r-c,p=i-s,v=i-u,g=l-a,m=f-a,b=r*r+i*i-a*a,_=b-o*o-s*s+l*l,S=b-c*c-u*u+f*f,O=h*p-d*v,C=(p*S-v*_)/(O*2)-r,E=(v*g-p*m)/O,P=(h*_-d*S)/(O*2)-i,T=(d*m-h*g)/O,A=E*E+T*T-1,R=2*(a+C*E+P*T),z=C*C+P*P-a*a,I=-(Math.abs(A)>1e-6?(R+Math.sqrt(R*R-4*A*z))/(2*A):z/R);return{x:r+C+E*I,y:i+P+T*I,r:I}}function n6(e,t,n){var r=e.x-t.x,i,a,o=e.y-t.y,s,l,c=r*r+o*o;c?(a=t.r+n.r,a*=a,l=e.r+n.r,l*=l,a>l?(i=(c+l-a)/(2*c),s=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-s*o,n.y=e.y-i*o+s*r):(i=(c+a-l)/(2*c),s=Math.sqrt(Math.max(0,a/c-i*i)),n.x=t.x+i*r-s*o,n.y=t.y+i*o+s*r)):(n.x=t.x+n.r,n.y=t.y)}function r6(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function i6(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function Py(e){this._=e,this.next=null,this.previous=null}function a6(e,t){if(!(a=(e=roe(e)).length))return 0;var n,r,i,a,o,s,l,c,u,f,d;if(n=e[0],n.x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;n6(r,n,i=e[2]),n=new Py(n),r=new Py(r),i=new Py(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(l=3;l<a;++l){n6(n._,r._,i=e[l]),i=new Py(i),c=r.next,u=n.previous,f=r._.r,d=n._.r;do if(f<=d){if(r6(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue e}f+=c._.r,c=c.next}else{if(r6(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue e}d+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=i6(n);(i=i.next)!==r;)(s=i6(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Qj(n,t),l=0;l<a;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function t1e(e){return a6(e,lcg()),e}function loe(e){return Math.sqrt(e.value)}function coe(){var e=null,t=1,n=1,r=Ku;function i(a){var o=toe();return a.x=t/2,a.y=n/2,e?a.eachBefore(o6(e)).eachAfter(TO(r,.5,o)).eachBefore(s6(1)):a.eachBefore(o6(loe)).eachAfter(TO(Ku,1,o)).eachAfter(TO(r,a.r/Math.min(t,n),o)).eachBefore(s6(Math.min(t,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(e=Ym(a),i):e},i.size=function(a){return arguments.length?(t=+a[0],n=+a[1],i):[t,n]},i.padding=function(a){return arguments.length?(r=typeof a=="function"?a:Td(+a),i):r},i}function o6(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function TO(e,t,n){return function(r){if(i=r.children){var i,a,o=i.length,s=e(r)*t||0,l;if(s)for(a=0;a<o;++a)i[a].r+=s;if(l=a6(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=l+s}}}function s6(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}var uoe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const foe=(e,t)=>({size:[e,t],padding:0,sort:(n,r)=>r.value-n.value}),doe=(e,t,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,e]},y:{domain:[0,t]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:r=>r.height===0?"#ddd":"#fff",stroke:n.color?void 0:r=>r.height===0?"":"#000"}}),hoe={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:e=>e.r*2},poe={title:e=>e.data.name,items:[{field:"value"}]},voe=(e,t,n)=>{const{value:r}=n,i=ua(e)?SS().path(t.path)(e):bd(e);return r?i.sum(a=>ml(r)(a)).sort(t.sort):i.count(),coe().size(t.size).padding(t.padding)(i),i.descendants()},l6=(e,t)=>{const{width:n,height:r}=t,{data:i,encode:a={},scale:o={},style:s={},layout:l={},labels:c=[],tooltip:u={}}=e,f=uoe(e,["data","encode","scale","style","layout","labels","tooltip"]),d=doe(n,r,a),h=voe(i,Je({},foe(n,r),l),Je({},d.encode,a)),p=Tt(s,"label");return Je({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},hoe),p),...c]},f),{tooltip:vm(u,poe),axis:!1}))};l6.props={};function goe(e){return e.target.depth}function moe(e){return e.depth}function yoe(e,t){return t-1-e.height}function Ty(e,t){return e.sourceLinks.length?e.depth:t-1}function boe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?is(e.sourceLinks,goe)-1:0}function Ay(e){return function(){return e}}function c6(e,t){return Ry(e.source,t.source)||e.index-t.index}function u6(e,t){return Ry(e.target,t.target)||e.index-t.index}function Ry(e,t){return e.y0-t.y0}function AO(e){return e.value}function xoe(e){return e.index}function _oe(e){return e.nodes}function woe(e){return e.links}function f6(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function d6({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function Soe(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=xoe,l=Ty,c,u,f,d=_oe,h=woe,p=6;function v(Z){const H={nodes:d(Z),links:h(Z)};return g(H),m(H),b(H),_(H),C(H),d6(H),H}v.update=function(Z){return d6(Z),Z},v.nodeId=function(Z){return arguments.length?(s=typeof Z=="function"?Z:Ay(Z),v):s},v.nodeAlign=function(Z){return arguments.length?(l=typeof Z=="function"?Z:Ay(Z),v):l},v.nodeDepth=function(Z){return arguments.length?(c=Z,v):c},v.nodeSort=function(Z){return arguments.length?(u=Z,v):u},v.nodeWidth=function(Z){return arguments.length?(i=+Z,v):i},v.nodePadding=function(Z){return arguments.length?(a=o=+Z,v):a},v.nodes=function(Z){return arguments.length?(d=typeof Z=="function"?Z:Ay(Z),v):d},v.links=function(Z){return arguments.length?(h=typeof Z=="function"?Z:Ay(Z),v):h},v.linkSort=function(Z){return arguments.length?(f=Z,v):f},v.size=function(Z){return arguments.length?(e=t=0,n=+Z[0],r=+Z[1],v):[n-e,r-t]},v.extent=function(Z){return arguments.length?(e=+Z[0][0],n=+Z[1][0],t=+Z[0][1],r=+Z[1][1],v):[[e,t],[n,r]]},v.iterations=function(Z){return arguments.length?(p=+Z,v):p};function g({nodes:Z,links:H}){Z.forEach((G,J)=>{G.index=J,G.sourceLinks=[],G.targetLinks=[]});const W=new Map(Z.map(G=>[s(G),G]));if(H.forEach((G,J)=>{G.index=J;let{source:re,target:he}=G;typeof re!="object"&&(re=G.source=f6(W,re)),typeof he!="object"&&(he=G.target=f6(W,he)),re.sourceLinks.push(G),he.targetLinks.push(G)}),f!=null)for(const{sourceLinks:G,targetLinks:J}of Z)G.sort(f),J.sort(f)}function m({nodes:Z}){for(const H of Z)H.value=H.fixedValue===void 0?Math.max(ws(H.sourceLinks,AO),ws(H.targetLinks,AO)):H.fixedValue}function b({nodes:Z}){const H=Z.length;let W=new Set(Z),G=new Set,J=0;for(;W.size;){if(W.forEach(re=>{re.depth=J;for(const{target:he}of re.sourceLinks)G.add(he)}),++J>H)throw new Error("circular link");W=G,G=new Set}if(c){const re=Math.max(jr(Z,ce=>ce.depth)+1,0);let he;for(let ce=0;ce<Z.length;ce++)he=Z[ce],he.depth=c.call(null,he,re)}}function _({nodes:Z}){const H=Z.length;let W=new Set(Z),G=new Set,J=0;for(;W.size;){if(W.forEach(re=>{re.height=J;for(const{source:he}of re.targetLinks)G.add(he)}),++J>H)throw new Error("circular link");W=G,G=new Set}}function S({nodes:Z}){const H=Math.max(jr(Z,J=>J.depth)+1,0),W=(n-e-i)/(H-1),G=new Array(H).fill(0).map(()=>[]);for(const J of Z){const re=Math.max(0,Math.min(H-1,Math.floor(l.call(null,J,H))));J.layer=re,J.x0=e+re*W,J.x1=J.x0+i,G[re]?G[re].push(J):G[re]=[J]}if(u)for(const J of G)J.sort(u);return G}function O(Z){const H=is(Z,W=>(r-t-(W.length-1)*o)/ws(W,AO));for(const W of Z){let G=t;for(const J of W){J.y0=G,J.y1=G+J.value*H,G=J.y1+o;for(const re of J.sourceLinks)re.width=re.value*H}G=(r-G+o)/(W.length+1);for(let J=0;J<W.length;++J){const re=W[J];re.y0+=G*(J+1),re.y1+=G*(J+1)}I(W)}}function C(Z){const H=S(Z);o=Math.min(a,(r-t)/(jr(H,W=>W.length)-1)),O(H);for(let W=0;W<p;++W){const G=Math.pow(.99,W),J=Math.max(1-G,(W+1)/p);P(H,G,J),E(H,G,J)}}function E(Z,H,W){for(let G=1,J=Z.length;G<J;++G){const re=Z[G];for(const he of re){let ce=0,ke=0;for(const{source:xt,value:et}of he.targetLinks){const He=et*(he.layer-xt.layer);ce+=L(xt,he)*He,ke+=He}if(!(ke>0))continue;const ot=(ce/ke-he.y0)*H;he.y0+=ot,he.y1+=ot,z(he)}u===void 0&&re.sort(Ry),re.length&&T(re,W)}}function P(Z,H,W){for(let G=Z.length,J=G-2;J>=0;--J){const re=Z[J];for(const he of re){let ce=0,ke=0;for(const{target:xt,value:et}of he.sourceLinks){const He=et*(xt.layer-he.layer);ce+=F(he,xt)*He,ke+=He}if(!(ke>0))continue;const ot=(ce/ke-he.y0)*H;he.y0+=ot,he.y1+=ot,z(he)}u===void 0&&re.sort(Ry),re.length&&T(re,W)}}function T(Z,H){const W=Z.length>>1,G=Z[W];R(Z,G.y0-o,W-1,H),A(Z,G.y1+o,W+1,H),R(Z,r,Z.length-1,H),A(Z,t,0,H)}function A(Z,H,W,G){for(;W<Z.length;++W){const J=Z[W],re=(H-J.y0)*G;re>1e-6&&(J.y0+=re,J.y1+=re),H=J.y1+o}}function R(Z,H,W,G){for(;W>=0;--W){const J=Z[W],re=(J.y1-H)*G;re>1e-6&&(J.y0-=re,J.y1-=re),H=J.y0-o}}function z({sourceLinks:Z,targetLinks:H}){if(f===void 0){for(const{source:{sourceLinks:W}}of H)W.sort(u6);for(const{target:{targetLinks:W}}of Z)W.sort(c6)}}function I(Z){if(f===void 0)for(const{sourceLinks:H,targetLinks:W}of Z)H.sort(u6),W.sort(c6)}function L(Z,H){let W=Z.y0-(Z.sourceLinks.length-1)*o/2;for(const{target:G,width:J}of Z.sourceLinks){if(G===H)break;W+=J+o}for(const{source:G,width:J}of H.targetLinks){if(G===Z)break;W-=J}return W}function F(Z,H){let W=H.y0-(H.targetLinks.length-1)*o/2;for(const{source:G,width:J}of H.targetLinks){if(G===Z)break;W+=J+o}for(const{target:G,width:J}of Z.sourceLinks){if(G===H)break;W-=J}return W}return v}const Ooe={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:e=>e.nodes,links:e=>e.links,nodeSort:void 0,linkSort:void 0,iterations:6},Coe={left:moe,right:yoe,center:boe,justify:Ty};function Eoe(e){const t=typeof e;return t==="string"?Coe[e]||Ty:t==="function"?e:Ty}const h6=e=>t=>{const{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:a,nodePadding:o,nodeDepth:s,nodes:l,links:c,linkSort:u,iterations:f}=Object.assign({},Ooe,e),d=Soe().nodeSort(r).linkSort(u).links(c).nodes(l).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(Eoe(i)).iterations(f).extent([[0,0],[1,1]]);typeof n=="function"&&d.nodeId(n);const h=d(t),{nodes:p,links:v}=h,g=p.map(b=>{const{x0:_,x1:S,y0:O,y1:C}=b;return Object.assign(Object.assign({},b),{x:[_,S,S,_],y:[O,O,C,C]})}),m=v.map(b=>{const{source:_,target:S}=b,O=_.x1,C=S.x0,E=b.width/2;return Object.assign(Object.assign({},b),{x:[O,O,C,C],y:[b.y0+E,b.y0-E,b.y1+E,b.y1-E]})});return{nodes:g,links:m}};h6.props={};var Moe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Poe={nodeId:e=>e.key,nodeWidth:.02,nodePadding:.02},Toe={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},Aoe={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},Roe={textAlign:e=>e.x[0]<.5?"start":"end",position:e=>e.x[0]<.5?"right":"left",fontSize:10},p6=e=>{const{data:t,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={}}=e,{links:u,nodes:f}=Ow(t,n),d=Tt(n,"node"),h=Tt(n,"link"),{key:p=T=>T.key,color:v=p}=d,{links:g,nodes:m}=h6(Object.assign(Object.assign(Object.assign({},Poe),{nodeId:ml(p)}),a))({links:u,nodes:f}),b=Tt(i,"label"),{text:_=p,spacing:S=5}=b,O=Moe(b,["text","spacing"]),C=ml(p),E=pl(c,"node",{title:C,items:[{field:"value"}]},!0),P=pl(c,"link",{title:"",items:[T=>({name:"source",value:C(T.source)}),T=>({name:"target",value:C(T.target)})]});return[Je({},Toe,{data:m,encode:Object.assign(Object.assign({},d),{color:v}),scale:r,style:Tt(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},Roe),{text:_,dx:T=>T.x[0]<.5?S:-S}),O),...o],tooltip:E,animate:vl(l,"node"),axis:!1}),Je({},Aoe,{data:g,encode:h,labels:s,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},Tt(i,"link")),tooltip:P,animate:vl(l,"link")})]};p6.props={};function Ioe(e,t){return t.value-e.value}function Loe(e,t){return t.frequency-e.frequency}function Noe(e,t){return`${e.id}`.localeCompare(`${t.id}`)}function koe(e,t){return`${e.name}`.localeCompare(`${t.name}`)}const joe={y:0,thickness:.05,weight:!1,marginRatio:.1,id:e=>e.id,source:e=>e.source,target:e=>e.target,sourceWeight:e=>e.value||1,targetWeight:e=>e.value||1,sortBy:null};function Doe(e){const{y:t,thickness:n,weight:r,marginRatio:i,id:a,source:o,target:s,sourceWeight:l,targetWeight:c,sortBy:u}=Object.assign(Object.assign({},joe),e);function f(g){const m=g.nodes.map(_=>Object.assign({},_)),b=g.edges.map(_=>Object.assign({},_));return d(m,b),h(m,b),p(m,b),v(m,b),{nodes:m,edges:b}}function d(g,m){m.forEach(S=>{S.source=o(S),S.target=s(S),S.sourceWeight=l(S),S.targetWeight=c(S)});const b=_i(m,S=>S.source),_=_i(m,S=>S.target);return g.forEach(S=>{S.id=a(S);const O=b.has(S.id)?b.get(S.id):[],C=_.has(S.id)?_.get(S.id):[];S.frequency=O.length+C.length,S.value=ws(O,E=>E.sourceWeight)+ws(C,E=>E.targetWeight)}),{nodes:g,edges:m}}function h(g,m){const b=typeof u=="function"?u:ne[u];b&&g.sort(b)}function p(g,m){const b=g.length;if(!b)throw qf("Invalid nodes: it's empty!");if(!r){const O=1/b;return g.forEach((C,E)=>{C.x=(E+.5)*O,C.y=t}),{nodes:g,edges:m}}const _=i/(2*b),S=g.reduce((O,C)=>O+=C.value,0);return g.reduce((O,C)=>{C.weight=C.value/S,C.width=C.weight*(1-i),C.height=n;const E=_+O,P=E+C.width,T=t-n/2,A=T+n;return C.x=[E,P,P,E],C.y=[T,T,A,A],O+C.width+2*_},0),{nodes:g,edges:m}}function v(g,m){const b=new Map(g.map(O=>[O.id,O]));if(!r)return m.forEach(O=>{const C=o(O),E=s(O),P=b.get(C),T=b.get(E);P&&T&&(O.x=[P.x,T.x],O.y=[P.y,T.y])}),{nodes:g,edges:m};m.forEach(O=>{O.x=[0,0,0,0],O.y=[t,t,t,t]});const _=_i(m,O=>O.source),S=_i(m,O=>O.target);g.forEach(O=>{const{edges:C,width:E,x:P,y:T,value:A,id:R}=O,z=_.get(R)||[],I=S.get(R)||[];let L=0;z.map(F=>{const Z=F.sourceWeight/A*E;F.x[0]=P[0]+L,F.x[1]=P[0]+L+Z,L+=Z}),I.forEach(F=>{const Z=F.targetWeight/A*E;F.x[3]=P[0]+L,F.x[2]=P[0]+L+Z,L+=Z})})}return f}const RO=e=>t=>Doe(e)(t);RO.props={};var v6=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const IO={y:0,thickness:.05,marginRatio:.1,id:e=>e.key,source:e=>e.source,target:e=>e.target,sourceWeight:e=>e.value||1,targetWeight:e=>e.value||1,sortBy:null},Foe={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}},Boe={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},zoe={position:"outside",fontSize:10},g6=(e,t)=>{const{data:n,encode:r={},scale:i,style:a={},layout:o={},nodeLabels:s=[],linkLabels:l=[],animate:c={},tooltip:u={}}=e,{nodes:f,links:d}=Ow(n,r),h=Tt(r,"node"),p=Tt(r,"link"),{key:v=F=>F.key,color:g=v}=h,{linkEncodeColor:m=F=>F.source}=p,{nodeWidthRatio:b=IO.thickness,nodePaddingRatio:_=IO.marginRatio}=o,S=v6(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:O,edges:C}=RO(Object.assign(Object.assign(Object.assign(Object.assign({},IO),{id:ml(v),thickness:b,marginRatio:_}),S),{weight:!0}))({nodes:f,edges:d}),E=Tt(a,"label"),{text:P=v}=E,T=v6(E,["text"]),A=pl(u,"node",{title:"",items:[F=>({name:F.key,value:F.value})]},!0),R=pl(u,"link",{title:"",items:[F=>({name:`${F.source} -> ${F.target}`,value:F.value})]}),{height:z,width:I}=t,L=Math.min(z,I);return[Je({},Boe,{data:C,encode:Object.assign(Object.assign({},p),{color:m}),labels:l,style:Object.assign({fill:m?void 0:"#aaa"},Tt(a,"link")),tooltip:R,animate:vl(c,"link")}),Je({},Foe,{data:O,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:Tt(a,"node"),coordinate:{type:"polar",outerRadius:(L-20)/L,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},zoe),{text:P}),T),...s],tooltip:A,animate:vl(c,"node"),axis:!1})]};g6.props={};var Zoe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const $oe=(e,t)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[e,t],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(n,r)=>r.value-n.value,layer:0}),Woe=(e,t)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:n=>n.path[1]},scale:{x:{domain:[0,e],range:[0,1]},y:{domain:[0,t],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),Goe={fontSize:10,text:e=>Fp(e.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:e=>e.x1-e.x0},Hoe={title:e=>{var t,n;return(n=(t=e.path)===null||t===void 0?void 0:t.join)===null||n===void 0?void 0:n.call(t,".")},items:[{field:"value"}]},Yoe={title:e=>Fp(e.path),items:[{field:"value"}]},m6=(e,t)=>{const{width:n,height:r,options:i}=t,{data:a,encode:o={},scale:s,style:l={},layout:c={},labels:u=[],tooltip:f={}}=e,d=Zoe(e,["data","encode","scale","style","layout","labels","tooltip"]),h=wr(i,["interaction","treemapDrillDown"]),p=Je({},$oe(n,r),c,{layer:h?b=>b.depth===1:c.layer}),[v,g]=w4(a,p,o),m=Tt(l,"label");return Je({},Woe(n,r),Object.assign(Object.assign({data:v,scale:s,style:l,labels:[Object.assign(Object.assign({},Goe),m),...u]},d),{encode:o,tooltip:vm(f,Hoe),axis:!1}),h?{interaction:Object.assign(Object.assign({},d.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:g,layout:p}):void 0}),encode:Object.assign({color:b=>Fp(b.path)},o),tooltip:vm(f,Yoe)}:{})};m6.props={};function Voe(){return{"data.arc":RO,"data.cluster":Xj,"mark.forceGraph":Vj,"mark.tree":qj,"mark.pack":l6,"mark.sankey":p6,"mark.chord":g6,"mark.treemap":m6}}var y6=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Uoe(e,t){return is(e,n=>t[n])}function Xoe(e,t){return jr(e,n=>t[n])}function b6(e,t){const n=LO(e,t)*2.5-NO(e,t)*1.5;return is(e,r=>t[r]>=n?t[r]:NaN)}function LO(e,t){return Km(e,.25,n=>t[n])}function Koe(e,t){return Km(e,.5,n=>t[n])}function NO(e,t){return Km(e,.75,n=>t[n])}function x6(e,t){const n=NO(e,t)*2.5-LO(e,t)*1.5;return jr(e,r=>t[r]<=n?t[r]:NaN)}function qoe(){return(e,t)=>{const{encode:n}=t,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(_i(e,c=>o[+c]).values()).flatMap(c=>{const u=b6(c,a),f=x6(c,a);return c.filter(d=>a[d]<u||a[d]>f)}),t]}}const _6=e=>{const{data:t,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=e,s=y6(e,["data","encode","style","tooltip","transform","animate"]),{point:l=!0}=r,c=y6(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:LO,y2:Koe,y3:NO},h=pl(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=pl(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!l)return Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Uoe},d),{y4:Xoe})],encode:Object.assign(Object.assign({},n),f),style:c,tooltip:h},s);const v=Tt(c,"box"),g=Tt(c,"point");return[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:b6},d),{y4:x6})],encode:Object.assign(Object.assign({},n),f),style:v,tooltip:h,animate:vl(o,"box")},s),{type:"point",data:t,transform:[{type:qoe}],encode:n,style:Object.assign({},g),tooltip:p,animate:vl(o,"point")}]};_6.props={};const w6=(e,t)=>Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))/2,Joe=(e,t)=>{if(!t)return;const{coordinate:n}=t;if(!(n!=null&&n.getCenter))return;const r=n.getCenter();return(i,a,o)=>{const{document:s}=t.canvas,{color:l,index:c}=a,u=s.createElement("g",{}),f=w6(i[0],i[1]),d=w6(i[0],r)*2,h=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:[["M",...i[0]],["A",f,f,0,1,0,...i[1]],["A",d+f*2,d+f*2,0,0,0,...i[2]],["A",f,f,0,1,c===0?0:1,...i[3]],["A",d,d,0,0,1,...i[0]],["Z"]]},o),S_(e,["shape","last","first"])),{fill:l||o.color})});return u.appendChild(h),u}};var Iy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Qoe=(e,t)=>{const{shape:n,radius:r}=e,i=Iy(e,["shape","radius"]),a=Tt(i,"pointer"),o=Tt(i,"pin"),{shape:s}=a,l=Iy(a,["shape"]),{shape:c}=o,u=Iy(o,["shape"]),{coordinate:f,theme:d}=t;return(h,p)=>{const v=h.map(L=>f.invert(L)),[g,m,b]=JZ(f,"polar"),_=f.clone(),{color:S}=p,O=J2({startAngle:g,endAngle:m,innerRadius:b,outerRadius:r});O.push(["cartesian"]),_.update({transformations:O});const C=v.map(L=>_.map(L)),[E,P]=cA(C),[T,A]=f.getCenter(),R=Object.assign(Object.assign({x1:E,y1:P,x2:T,y2:A,stroke:S},l),i),z=Object.assign(Object.assign({cx:T,cy:A,stroke:S},u),i),I=gn(new xa);return Zl(s)||(typeof s=="function"?I.append(()=>s(C,p,_,d)):I.append("line").call(Qt,R).node()),Zl(c)||(typeof c=="function"?I.append(()=>c(C,p,_,d)):I.append("circle").call(Qt,z).node()),I.node()}},S6={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-11/10*Math.PI,endAngle:1/10*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},ese={style:{shape:Qoe,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},tse={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};function nse(e){if(Gi(e)){const t=Math.max(0,Math.min(e,1));return{percent:t,target:t,total:1}}return e}function rse(e,t){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=nse(e),s=a||r,l=a?1:i,c=Object.assign({y:{domain:[0,l]}},t);return o.length?{targetData:[{x:n,y:s,color:"target"}],totalData:o.map((u,f)=>({x:n,y:f>=1?u-o[f-1]:u,color:f})),target:s,total:l,scale:c}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:l-s,color:"total"}],target:s,total:l,scale:c}}function ise(e,{target:t,total:n}){const{content:r}=e;return r?r(t,n):t.toString()}const O6=e=>{const{data:t={},scale:n={},style:r={},animate:i={},transform:a=[]}=e,o=Iy(e,["data","scale","style","animate","transform"]),{targetData:s,totalData:l,target:c,total:u,scale:f}=rse(t,n),d=Tt(r,"text"),h=IZ(r,["pointer","pin"]),p=Tt(r,"arc"),v=p.shape;return[Je({},S6,Object.assign({type:"interval",transform:[{type:"stackY"}],data:l,scale:f,style:v==="round"?Object.assign(Object.assign({},p),{shape:Joe}):p,animate:typeof i=="object"?Tt(i,"arc"):i},o)),Je({},S6,ese,Object.assign({type:"point",data:s,scale:f,style:h,animate:typeof i=="object"?Tt(i,"indicator"):i},o)),Je({},tse,{style:Object.assign({text:ise(d,{target:c,total:u})},d),animate:typeof i=="object"?Tt(i,"text"):i})]};O6.props={};const kO=Math.PI/180,g0=64,Ly=2048;function ase(e){return e.text}function ose(){return"serif"}function C6(){return"normal"}function sse(e){return e.value}function lse(){return~~(Math.random()*2)*90}function cse(){return 1}function use(){}function fse(e,t,n,r){if(t.sprite)return;const i=e.context,a=e.ratio;i.clearRect(0,0,(g0<<5)/a,Ly/a);let o=0,s=0,l=0;const c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/a)+"px "+t.font;let d=i.measureText(t.text+"m").width*a,h=t.size<<1;if(t.rotate){const p=Math.sin(t.rotate*kO),v=Math.cos(t.rotate*kO),g=d*v,m=d*p,b=h*v,_=h*p;d=Math.max(Math.abs(g+_),Math.abs(g-_))+31>>5<<5,h=~~Math.max(Math.abs(m+b),Math.abs(m-b))}else d=d+31>>5<<5;if(h>l&&(l=h),o+d>=g0<<5&&(o=0,s+=l,l=0),s+h>=Ly)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),t.rotate&&i.rotate(t.rotate*kO),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=d,t.height=h,t.xoff=o,t.yoff=s,t.x1=d>>1,t.y1=h>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,o+=d}const u=i.getImageData(0,0,(g0<<5)/a,Ly/a).data,f=[];for(;--r>=0;){if(t=n[r],!t.hasText)continue;const d=t.width,h=d>>5;let p=t.y1-t.y0;for(let m=0;m<p*h;m++)f[m]=0;if(o=t.xoff,o==null)return;s=t.yoff;let v=0,g=-1;for(let m=0;m<p;m++){for(let b=0;b<d;b++){const _=h*m+(b>>5),S=u[(s+m)*(g0<<5)+(o+b)<<2]?1<<31-b%32:0;f[_]|=S,v|=S}v?g=m:(t.y0++,p--,m--,s++)}t.y1=t.y0+g,t.sprite=f.slice(0,(t.y1-t.y0)*h)}}function dse(e,t,n){n>>=5;const r=e.sprite,i=e.width>>5,a=e.x-(i<<4),o=a&127,s=32-o,l=e.y1-e.y0;let c=(e.y+e.y0)*n+(a>>5),u;for(let f=0;f<l;f++){u=0;for(let d=0;d<=i;d++)if((u<<s|(d<i?(u=r[f*i+d])>>>o:0))&t[c+d])return!0;c+=n}return!1}function hse(e,t){const n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function pse(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function E6(e){const t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function vse(e){const n=4*e[0]/e[1];let r=0,i=0;return function(a){const o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4;break}return[r,i]}}function M6(e){const t=[];let n=-1;for(;++n<e;)t[n]=0;return t}function gse(){return document.createElement("canvas")}function Qc(e){return typeof e=="function"?e:function(){return e}}const mse={archimedean:E6,rectangular:vse};function yse(){let e=[256,256],t=ase,n=ose,r=sse,i=C6,a=lse,o=cse,s=E6,l=Math.random,c=use,u=[],f=null,d=1/0;const h=C6,p=gse,v={};v.start=function(){const[b,_]=e,S=g(p()),O=v.board?v.board:M6((e[0]>>5)*e[1]),C=u.length,E=[],P=u.map(function(z,I,L){return z.text=t.call(this,z,I,L),z.font=n.call(this,z,I,L),z.style=h.call(this,z,I,L),z.weight=i.call(this,z,I,L),z.rotate=a.call(this,z,I,L),z.size=~~r.call(this,z,I,L),z.padding=o.call(this,z,I,L),z}).sort(function(z,I){return I.size-z.size});let T=-1,A=v.board?[{x:0,y:0},{x:b,y:_}]:void 0;f&&clearInterval(f),f=setInterval(R,0),R();function R(){const z=Date.now();for(;Date.now()-z<d&&++T<C;){const I=P[T];I.x=b*(l()+.5)>>1,I.y=_*(l()+.5)>>1,fse(S,I,P,T),I.hasText&&m(O,I,A)&&(c.call(null,"word",{cloud:v,word:I}),E.push(I),A?v.hasImage||hse(A,I):A=[{x:I.x+I.x0,y:I.y+I.y0},{x:I.x+I.x1,y:I.y+I.y1}],I.x-=e[0]>>1,I.y-=e[1]>>1)}v._tags=E,v._bounds=A,T>=C&&(v.stop(),c.call(null,"end",{cloud:v,words:E,bounds:A}))}return v},v.stop=function(){return f&&(clearInterval(f),f=null),v};function g(b){b.width=b.height=1;const _=Math.sqrt(b.getContext("2d").getImageData(0,0,1,1).data.length>>2);b.width=(g0<<5)/_,b.height=Ly/_;const S=b.getContext("2d");return S.fillStyle=S.strokeStyle="red",S.textAlign="center",{context:S,ratio:_}}function m(b,_,S){const O=_.x,C=_.y,E=Math.sqrt(e[0]*e[0]+e[1]*e[1]),P=s(e),T=l()<.5?1:-1;let A,R=-T,z,I;for(;(A=P(R+=T))&&(z=~~A[0],I=~~A[1],!(Math.min(Math.abs(z),Math.abs(I))>=E));)if(_.x=O+z,_.y=C+I,!(_.x+_.x0<0||_.y+_.y0<0||_.x+_.x1>e[0]||_.y+_.y1>e[1])&&(!S||!dse(_,b,e[0]))&&(!S||pse(_,S))){const L=_.sprite,F=_.width>>5,Z=e[0]>>5,H=_.x-(F<<4),W=H&127,G=32-W,J=_.y1-_.y0;let re,he=(_.y+_.y0)*Z+(H>>5);for(let ce=0;ce<J;ce++){re=0;for(let ke=0;ke<=F;ke++)b[he+ke]|=re<<G|(ke<F?(re=L[ce*F+ke])>>>W:0);he+=Z}return delete _.sprite,!0}return!1}return v.createMask=b=>{const _=document.createElement("canvas"),[S,O]=e;if(!S||!O)return;const C=S>>5,E=M6((S>>5)*O);_.width=S,_.height=O;const P=_.getContext("2d");P.drawImage(b,0,0,b.width,b.height,0,0,S,O);const T=P.getImageData(0,0,S,O).data;for(let A=0;A<O;A++)for(let R=0;R<S;R++){const z=C*A+(R>>5),I=A*S+R<<2,F=T[I]>=250&&T[I+1]>=250&&T[I+2]>=250?1<<31-R%32:0;E[z]|=F}v.board=E,v.hasImage=!0},v.timeInterval=function(b){d=b==null?1/0:b},v.words=function(b){u=b},v.size=function(b=[]){e=[+b[0],+b[1]]},v.text=function(b){t=Qc(b)},v.font=function(b){n=Qc(b)},v.fontWeight=function(b){i=Qc(b)},v.rotate=function(b){a=Qc(b)},v.spiral=function(b){s=mse[b]||b},v.fontSize=function(b){r=Qc(b)},v.padding=function(b){o=Qc(b)},v.random=function(b){l=Qc(b)},v.on=function(b){c=Qc(b)},v}var bse=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};function xse(e,t){return{set(n,r,i){if(t[n]===void 0)return this;const a=r?r.call(null,t[n]):t[n];return i?i.call(null,a):typeof e[n]=="function"?e[n](a):e[n]=a,this},setAsync(n,r,i){return bse(this,void 0,void 0,function*(){if(t[n]===void 0)return this;const a=r?yield r.call(null,t[n]):t[n];return i?i.call(null,a):typeof e[n]=="function"?e[n](a):e[n]=a,this})}}}var _se=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},wse=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Sse={size:[500,500],fontSize:[14,28]};function Ose(e){return new Promise((t,n)=>{if(e instanceof HTMLImageElement){t(e);return}if(typeof e=="string"){const r=new Image;r.crossOrigin="anonymous",r.src=e,r.onload=()=>t(r),r.onerror=()=>{console.error(`'image ${e} load failed !!!'`),n()};return}n()})}function Cse(e,t){if(typeof e=="function")return e;if(Array.isArray(e)){const[n,r]=e;if(!t)return()=>(r+n)/2;const[i,a]=t;return a===i?()=>(r+n)/2:({value:o})=>(r-n)/(a-i)*(o-i)+n}return()=>e}const P6=e=>t=>_se(void 0,void 0,void 0,function*(){const n=Object.assign({},Sse,e),r=yse();yield xse(r,n).set("fontSize",m=>{const b=t.map(_=>_.value);return Cse(m,[is(b),jr(b)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",Ose,r.createMask),r.words([...t]);const i=r.start(),[a,o]=n.size,s=[{x:0,y:0},{x:a,y:o}],{_bounds:l=s,_tags:c,hasImage:u}=i,f=c.map(m=>{var{x:b,y:_}=m,S=wse(m,["x","y"]);return Object.assign(Object.assign({},S),{x:b+a/2,y:_+o/2})}),[{x:d,y:h},{x:p,y:v}]=l,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:u?0:d,y:u?0:h}),Object.assign(Object.assign({},g),{x:u?a:p,y:u?o:v})),f});P6.props={};var Ese=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Mse=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Pse(e,t){const{text:n="text",value:r="value"}=t;return e.map(i=>Object.assign(Object.assign({},i),{text:i[n],value:i[r]}))}const Tse=(e,t)=>({size:[e,t]}),Ase=(e,t)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,e],range:[0,1]},y:{domain:[0,t],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),T6=(e,t)=>Ese(void 0,void 0,void 0,function*(){const{width:n,height:r}=t,{data:i,encode:a={},scale:o,style:s={},layout:l={}}=e,c=Mse(e,["data","encode","scale","style","layout"]),u=Pse(i,a),f=yield P6(Object.assign(Object.assign({},Tse(n,r)),l))(u);return Je({},Ase(n,r),Object.assign(Object.assign({data:f,encode:a,scale:o,style:s},c),{axis:!1}))});T6.props={};const A6=5e3;function R6(e,t,n){return e+(t-e)*n}function Rse(e,t,n,r){return t===0?[[e+1/2*n/Math.PI/2,r/2],[e+1/2*n/Math.PI,r],[e+n/4,r]]:t===1?[[e+1/2*n/Math.PI/2*(Math.PI-2),r],[e+1/2*n/Math.PI/2*(Math.PI-1),r/2],[e+n/4,0]]:t===2?[[e+1/2*n/Math.PI/2,-r/2],[e+1/2*n/Math.PI,-r],[e+n/4,-r]]:[[e+1/2*n/Math.PI/2*(Math.PI-2),-r],[e+1/2*n/Math.PI/2*(Math.PI-1),-r/2],[e+n/4,0]]}function Ise(e,t,n,r,i,a,o){const s=Math.ceil(2*e/n*4)*4,l=[];let c=r;for(;c<-Math.PI*2;)c+=Math.PI*2;for(;c>0;)c-=Math.PI*2;c=c/Math.PI/2*n;const u=a-e+c-e*2;l.push(["M",u,t]);let f=0;for(let d=0;d<s;++d){const h=d%4,p=Rse(d*n/4,h,n,i);l.push(["C",p[0][0]+u,-p[0][1]+t,p[1][0]+u,-p[1][1]+t,p[2][0]+u,-p[2][1]+t]),d===s-1&&(f=p[2][0])}return l.push(["L",f+u,o+e]),l.push(["L",u,o+e]),l.push(["Z"]),l}function Lse(e,t,n,r,i,a,o,s,l,c,u){const{fill:f,fillOpacity:d,opacity:h}=i;for(let p=0;p<r;p++){const v=r<=1?1:p/(r-1),g=Ise(s,o+s*n,l,0,s/40,e,t),m=u.createElement("path",{style:{path:g,fill:f,opacity:R6(.2,.9,v)*Number(h||d)}});a.appendChild(m);try{if(c===!1)return;const b=[{transform:"translate(0, 0)"},{transform:`translate(${l*2}px, 0)`}];m.animate(b,{duration:R6(.5*A6,A6,v)*2,iterations:1/0})}catch(b){console.warn("off-screen group animate error!")}}}function Nse(e,t,n){return`
|
|
M ${e} ${t-n}
|
|
a ${n} ${n} 0 1 0 0 ${n*2}
|
|
a ${n} ${n} 0 1 0 0 ${-n*2}
|
|
Z
|
|
`}function kse(e,t,n){const i=n*.618;return`
|
|
M ${e-i} ${t-n}
|
|
L ${e+i} ${t-n}
|
|
L ${e+i} ${t+n}
|
|
L ${e-i} ${t+n}
|
|
Z
|
|
`}function jse(e,t,n){return`
|
|
M ${e} ${t-n}
|
|
L ${e+n} ${t}
|
|
L ${e} ${t+n}
|
|
L ${e-n} ${t}
|
|
Z
|
|
`}function Dse(e,t,n){return`
|
|
M ${e} ${t-n}
|
|
L ${e+n} ${t+n}
|
|
L ${e-n} ${t+n}
|
|
Z
|
|
`}function Fse(e,t,n){const r=n*4/3,i=Math.max(r,n*2),a=r/2,o=e,s=a+t-i/2,l=Math.asin(a/((i-a)*.85)),c=Math.sin(l)*a,u=Math.cos(l)*a,f=o-u,d=s+c,h=e,p=s+a/Math.sin(l);return`
|
|
M ${f} ${d}
|
|
A ${a} ${a} 0 1 1 ${f+u*2} ${d}
|
|
Q ${h} ${p} ${e} ${t+i/2}
|
|
Q ${h} ${p} ${f} ${d}
|
|
Z
|
|
`}const I6={pin:Fse,rect:kse,circle:Nse,diamond:jse,triangle:Dse};var L6=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Bse=(e="circle")=>I6[e]||I6.circle,N6=(e,t)=>{if(!t)return;const{coordinate:n}=t,{liquidOptions:r,styleOptions:i}=e,{liquidShape:a,percent:o}=r,{background:s,outline:l={},wave:c={}}=i,u=L6(i,["background","outline","wave"]),{border:f=2,distance:d=0}=l,h=L6(l,["border","distance"]),{length:p=192,count:v=3}=c;return(g,m,b)=>{const{document:_}=t.canvas,{color:S,fillOpacity:O}=b,C=Object.assign(Object.assign({fill:S},b),u),E=_.createElement("g",{}),[P,T]=n.getCenter(),A=n.getSize(),R=Math.min(...A)/2,I=(bo(a)?a:Bse(a))(P,T,R,...A);if(Object.keys(s).length){const Z=_.createElement("path",{style:Object.assign({path:I,fill:"#fff"},s)});E.appendChild(Z)}if(o>0){const Z=_.createElement("path",{style:{path:I}});E.appendChild(Z),E.style.clipPath=Z,Lse(P,T,1-o,v,C,E,Z.getBBox().y,R*2,p,!0,_)}const L=_.createElement("path",{style:{path:I,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),F=_.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:I,stroke:S,strokeOpacity:O,lineWidth:f},C),h),{fill:"transparent"})});return E.appendChild(L),E.appendChild(F),E}};N6.props={};var zse=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Zse={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:N6},animate:{enter:{type:"fadeIn"}}},$se={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},k6=e=>{const{data:t={},style:n={},animate:r}=e,i=zse(e,["data","style","animate"]),a=Math.max(0,Gi(t)?t:t==null?void 0:t.percent),o=[{percent:a,type:"liquid"}],s=Object.assign(Object.assign({},Tt(n,"text")),Tt(n,"content")),l=Tt(n,"outline"),c=Tt(n,"wave"),u=Tt(n,"background");return[Je({},Zse,Object.assign({type:"interval",data:o,style:{liquidOptions:{percent:a,liquidShape:n==null?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:l,wave:c,background:u})},animate:r},i)),Je({},$se,{style:Object.assign({text:`${Cg(a*100)} %`},s),animate:r})]};k6.props={};var Ql=Y(69916);const j6=1e-10;function D6(e,t){const n=Gse(e),r=n.filter(function(l){return Wse(l,e)});let i=0,a=0,o;const s=[];if(r.length>1){const l=Hse(r);for(o=0;o<r.length;++o){const u=r[o];u.angle=Math.atan2(u.x-l.x,u.y-l.y)}r.sort(function(u,f){return f.angle-u.angle});let c=r[r.length-1];for(o=0;o<r.length;++o){const u=r[o];a+=(c.x+u.x)*(u.y-c.y);const f={x:(u.x+c.x)/2,y:(u.y+c.y)/2};let d=null;for(let h=0;h<u.parentIndex.length;++h)if(c.parentIndex.indexOf(u.parentIndex[h])>-1){const p=e[u.parentIndex[h]],v=Math.atan2(u.x-p.x,u.y-p.y),g=Math.atan2(c.x-p.x,c.y-p.y);let m=g-v;m<0&&(m+=2*Math.PI);const b=g-m/2;let _=m0(f,{x:p.x+p.radius*Math.sin(b),y:p.y+p.radius*Math.cos(b)});_>p.radius*2&&(_=p.radius*2),(d===null||d.width>_)&&(d={circle:p,width:_,p1:u,p2:c})}d!==null&&(s.push(d),i+=jO(d.circle.radius,d.width),c=u)}}else{let l=e[0];for(o=1;o<e.length;++o)e[o].radius<l.radius&&(l=e[o]);let c=!1;for(o=0;o<e.length;++o)if(m0(e[o],l)>Math.abs(l.radius-e[o].radius)){c=!0;break}c?i=a=0:(i=l.radius*l.radius*Math.PI,s.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-j6,y:l.y+l.radius},width:l.radius*2}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=s,t.innerPoints=r,t.intersectionPoints=n),i+a}function Wse(e,t){for(let n=0;n<t.length;++n)if(m0(e,t[n])>t[n].radius+j6)return!1;return!0}function Gse(e){const t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){const i=B6(e[n],e[r]);for(let a=0;a<i.length;++a){const o=i[a];o.parentIndex=[n,r],t.push(o)}}return t}function jO(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function m0(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function F6(e,t,n){if(n>=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);const r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return jO(e,r)+jO(t,i)}function B6(e,t){const n=m0(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,l=e.y+a*(t.y-e.y)/n,c=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+c,y:l-u},{x:s-c,y:l+u}]}function Hse(e){const t={x:0,y:0};for(let n=0;n<e.length;++n)t.x+=e[n].x,t.y+=e[n].y;return t.x/=e.length,t.y/=e.length,t}function Yse(e,t){t=t||{},t.maxIterations=t.maxIterations||500;const n=t.initialLayout||Kse,r=t.lossFunction||FO;e=Vse(e);const i=n(e,t),a=[],o=[];let s;for(s in i)i.hasOwnProperty(s)&&(a.push(i[s].x),a.push(i[s].y),o.push(s));const c=(0,Ql.nelderMead)(function(u){const f={};for(let d=0;d<o.length;++d){const h=o[d];f[h]={x:u[2*d],y:u[2*d+1],radius:i[h].radius}}return r(f,e)},a,t).x;for(let u=0;u<o.length;++u)s=o[u],i[s].x=c[2*u],i[s].y=c[2*u+1];return i}const z6=1e-10;function DO(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+z6?Math.abs(e-t):(0,Ql.bisect)(function(r){return F6(e,t,r)-n},0,e+t)}function Vse(e){e=e.slice();const t=[],n={};let r,i,a,o;for(r=0;r<e.length;++r){const s=e[r];s.sets.length==1?t.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],n[[a,o]]=!0,n[[o,a]]=!0)}for(t.sort((s,l)=>s>l?1:-1),r=0;r<t.length;++r)for(a=t[r],i=r+1;i<t.length;++i)o=t[i],[a,o]in n||e.push({sets:[a,o],size:0});return e}function Use(e,t,n){const r=(0,Ql.zerosM)(t.length,t.length),i=(0,Ql.zerosM)(t.length,t.length);return e.filter(function(a){return a.sets.length==2}).map(function(a){const o=n[a.sets[0]],s=n[a.sets[1]],l=Math.sqrt(t[o].size/Math.PI),c=Math.sqrt(t[s].size/Math.PI),u=DO(l,c,a.size);r[o][s]=r[s][o]=u;let f=0;a.size+1e-10>=Math.min(t[o].size,t[s].size)?f=1:a.size<=1e-10&&(f=-1),i[o][s]=i[s][o]=f}),{distances:r,constraints:i}}function Xse(e,t,n,r){let i=0,a;for(a=0;a<t.length;++a)t[a]=0;for(a=0;a<n.length;++a){const o=e[2*a],s=e[2*a+1];for(let l=a+1;l<n.length;++l){const c=e[2*l],u=e[2*l+1],f=n[a][l],d=r[a][l],h=(c-o)*(c-o)+(u-s)*(u-s),p=Math.sqrt(h),v=h-f*f;d>0&&p<=f||d<0&&p>=f||(i+=2*v*v,t[2*a]+=4*v*(o-c),t[2*a+1]+=4*v*(s-u),t[2*l]+=4*v*(c-o),t[2*l+1]+=4*v*(u-s))}}return i}function Kse(e,t){let n=Jse(e,t);const r=t.lossFunction||FO;if(e.length>=8){const i=qse(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function qse(e,t){t=t||{};const n=t.restarts||10,r=[],i={};let a;for(a=0;a<e.length;++a){const v=e[a];v.sets.length==1&&(i[v.sets[0]]=r.length,r.push(v))}const o=Use(e,r,i);let s=o.distances;const l=o.constraints,c=(0,Ql.norm2)(s.map(Ql.norm2))/s.length;s=s.map(function(v){return v.map(function(g){return g/c})});const u=function(v,g){return Xse(v,g,s,l)};let f,d;for(a=0;a<n;++a){const v=(0,Ql.zeros)(s.length*2).map(Math.random);d=(0,Ql.conjugateGradient)(u,v,t),(!f||d.fx<f.fx)&&(f=d)}const h=f.x,p={};for(a=0;a<r.length;++a){const v=r[a];p[v.sets[0]]={x:h[2*a]*c,y:h[2*a+1]*c,radius:Math.sqrt(v.size/Math.PI)}}if(t.history)for(a=0;a<t.history.length;++a)(0,Ql.scale)(t.history[a].x,c);return p}function Jse(e,t){const n=t&&t.lossFunction?t.lossFunction:FO,r={},i={};let a;for(let f=0;f<e.length;++f){const d=e[f];d.sets.length==1&&(a=d.sets[0],r[a]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:d.size,radius:Math.sqrt(d.size/Math.PI)},i[a]=[])}e=e.filter(function(f){return f.sets.length==2});for(let f=0;f<e.length;++f){const d=e[f];let h=d.hasOwnProperty("weight")?d.weight:1;const p=d.sets[0],v=d.sets[1];d.size+z6>=Math.min(r[p].size,r[v].size)&&(h=0),i[p].push({set:v,size:d.size,weight:h}),i[v].push({set:p,size:d.size,weight:h})}const o=[];for(a in i)if(i.hasOwnProperty(a)){let f=0;for(let d=0;d<i[a].length;++d)f+=i[a][d].size*i[a][d].weight;o.push({set:a,size:f})}function s(f,d){return d.size-f.size}o.sort(s);const l={};function c(f){return f.set in l}function u(f,d){r[d].x=f.x,r[d].y=f.y,l[d]=!0}u({x:0,y:0},o[0].set);for(let f=1;f<o.length;++f){const d=o[f].set,h=i[d].filter(c);if(a=r[d],h.sort(s),h.length===0)throw"ERROR: missing pairwise overlap information";const p=[];for(let m=0;m<h.length;++m){const b=r[h[m].set],_=DO(a.radius,b.radius,h[m].size);p.push({x:b.x+_,y:b.y}),p.push({x:b.x-_,y:b.y}),p.push({y:b.y+_,x:b.x}),p.push({y:b.y-_,x:b.x});for(let S=m+1;S<h.length;++S){const O=r[h[S].set],C=DO(a.radius,O.radius,h[S].size),E=B6({x:b.x,y:b.y,radius:_},{x:O.x,y:O.y,radius:C});for(let P=0;P<E.length;++P)p.push(E[P])}}let v=1e50,g=p[0];for(let m=0;m<p.length;++m){r[d].x=p[m].x,r[d].y=p[m].y;const b=n(r,e);b<v&&(v=b,g=p[m])}u(g,d)}return r}function FO(e,t){let n=0;function r(i){return i.map(function(a){return e[a]})}for(let i=0;i<t.length;++i){const a=t[i];let o;if(a.sets.length==1)continue;if(a.sets.length==2){const l=e[a.sets[0]],c=e[a.sets[1]];o=F6(l.radius,c.radius,m0(l,c))}else o=D6(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;n+=s*(o-a.size)*(o-a.size)}return n}function Qse(e,t,n){n===null?e.sort(function(i,a){return a.radius-i.radius}):e.sort(n);let r;if(e.length>0){const i=e[0].x,a=e[0].y;for(r=0;r<e.length;++r)e[r].x-=i,e[r].y-=a}if(e.length==2&&distance(e[0],e[1])<Math.abs(e[1].radius-e[0].radius)&&(e[1].x=e[0].x+e[0].radius-e[1].radius-1e-10,e[1].y=e[0].y),e.length>1){const i=Math.atan2(e[1].x,e[1].y)-t;let a,o;const s=Math.cos(i),l=Math.sin(i);for(r=0;r<e.length;++r)a=e[r].x,o=e[r].y,e[r].x=s*a-l*o,e[r].y=l*a+s*o}if(e.length>2){let i=Math.atan2(e[2].x,e[2].y)-t;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const a=e[1].y/(1e-10+e[1].x);for(r=0;r<e.length;++r){const o=(e[r].x+a*e[r].y)/(1+a*a);e[r].x=2*o-e[r].x,e[r].y=2*o*a-e[r].y}}}}function ele(e){e.map(function(o){o.parent=o});function t(o){return o.parent!==o&&(o.parent=t(o.parent)),o.parent}function n(o,s){const l=t(o),c=t(s);l.parent=c}for(let o=0;o<e.length;++o)for(let s=o+1;s<e.length;++s){const l=e[o].radius+e[s].radius;distance(e[o],e[s])+1e-10<l&&n(e[s],e[o])}const r={};let i;for(let o=0;o<e.length;++o)i=t(e[o]).parent.setid,i in r||(r[i]=[]),r[i].push(e[o]);e.map(function(o){delete o.parent});const a=[];for(i in r)r.hasOwnProperty(i)&&a.push(r[i]);return a}function BO(e){const t=function(n){const r=Math.max.apply(null,e.map(function(a){return a[n]+a.radius})),i=Math.min.apply(null,e.map(function(a){return a[n]-a.radius}));return{max:r,min:i}};return{xRange:t("x"),yRange:t("y")}}function n1e(e,t,n){t===null&&(t=Math.PI/2);let r=[],i,a;for(a in e)if(e.hasOwnProperty(a)){const d=e[a];r.push({x:d.x,y:d.y,radius:d.radius,setid:a})}const o=ele(r);for(i=0;i<o.length;++i){Qse(o[i],t,n);const d=BO(o[i]);o[i].size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),o[i].bounds=d}o.sort(function(d,h){return h.size-d.size}),r=o[0];let s=r.bounds;const l=(s.xRange.max-s.xRange.min)/50;function c(d,h,p){if(!d)return;const v=d.bounds;let g,m,b;h?g=s.xRange.max-v.xRange.min+l:(g=s.xRange.max-v.xRange.max,b=(v.xRange.max-v.xRange.min)/2-(s.xRange.max-s.xRange.min)/2,b<0&&(g+=b)),p?m=s.yRange.max-v.yRange.min+l:(m=s.yRange.max-v.yRange.max,b=(v.yRange.max-v.yRange.min)/2-(s.yRange.max-s.yRange.min)/2,b<0&&(m+=b));for(let _=0;_<d.length;++_)d[_].x+=g,d[_].y+=m,r.push(d[_])}let u=1;for(;u<o.length;)c(o[u],!0,!1),c(o[u+1],!1,!0),c(o[u+2],!0,!0),u+=3,s=BO(r);const f={};for(i=0;i<r.length;++i)f[r[i].setid]=r[i];return f}function tle(e,t,n,r){const i=[],a=[];for(const v in e)e.hasOwnProperty(v)&&(a.push(v),i.push(e[v]));t-=2*r,n-=2*r;const o=BO(i),s=o.xRange,l=o.yRange;if(s.max==s.min||l.max==l.min)return console.log("not scaling solution: zero size detected"),e;const c=t/(s.max-s.min),u=n/(l.max-l.min),f=Math.min(u,c),d=(t-(s.max-s.min)*f)/2,h=(n-(l.max-l.min)*f)/2,p={};for(let v=0;v<i.length;++v){const g=i[v];p[a[v]]={radius:f*g.radius,x:r+d+(g.x-s.min)*f,y:r+h+(g.y-l.min)*f}}return p}function nle(e,t,n){const r=[],i=e-n,a=t;return r.push("M",i,a),r.push("A",n,n,0,1,0,i+2*n,a),r.push("A",n,n,0,1,0,i,a),r.join(" ")}function rle(e){const t={};D6(e,t);const n=t.arcs;if(n.length===0)return"M 0 0";if(n.length==1){const r=n[0].circle;return nle(r.x,r.y,r.radius)}else{const r=[`
|
|
M`,n[0].p2.x,n[0].p2.y];for(let i=0;i<n.length;++i){const a=n[i],o=a.circle.radius,s=a.width>o;r.push(`
|
|
A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const Z6=e=>{const{sets:t="sets",size:n="size",as:r=["key","path"],padding:i=0}=e,[a,o]=r;return s=>{const l=s.map(f=>Object.assign(Object.assign({},f),{sets:f[t],size:f[n],[a]:f.sets.join("&")}));l.sort((f,d)=>f.sets.length-d.sets.length);const c=Yse(l);let u;return l.map(f=>{const d=f[t],h=({width:p,height:v})=>{u=u||tle(c,p,v,i);const g=d.map(b=>u[b]);let m=rle(g);return/[zZ]$/.test(m)||(m+=" Z"),m};return Object.assign(Object.assign({},f),{[o]:h})})}};Z6.props={};function ile(){return{"data.venn":Z6,"mark.boxplot":_6,"mark.gauge":O6,"mark.wordCloud":T6,"mark.liquid":k6}}function ale(){return Object.assign(Object.assign(Object.assign(Object.assign({},Gie()),Voe()),ile()),zre())}var Ny=function(){return Ny=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ny.apply(this,arguments)},ole=GK(WK,Ny(Ny({},ale()),Pq())),sle="[object Boolean]";function lle(e){return e===!0||e===!1||$i(e)&&Rr(e)==sle}var zO=lle,y0=function(){return y0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},y0.apply(this,arguments)},cle=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ule=["renderer"],$6=["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"],ZO="__transform__",fle="__skipDelCustomKeys__",Qu=function(e,t){return zO(t)?{type:e,available:t}:y0({type:e},t)},$O={xField:"encode.x",yField:"encode.y",colorField:"encode.color",angleField:"encode.y",keyField:"encode.key",sizeField:"encode.size",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",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(e){return Qu("stackY",e)}},normalize:{target:"transform",value:function(e){return Qu("normalizeY",e)}},percent:{target:"transform",value:function(e){return Qu("normalizeY",e)}},group:{target:"transform",value:function(e){return Qu("dodgeX",e)}},sort:{target:"transform",value:function(e){return Qu("sortX",e)}},symmetry:{target:"transform",value:function(e){return Qu("symmetryY",e)}},diff:{target:"transform",value:function(e){return Qu("diffY",e)}},meta:{target:"scale",value:function(e){return e}},label:{target:"labels",value:function(e){return e}},shape:"style.shape",connectNulls:{target:"style",value:function(e){return zO(e)?{connect:e}:e}}},WO=["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],ky=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:WO},{key:"point",type:"point",extend_keys:WO},{key:"area",type:"area",extend_keys:WO}],dle=[{key:"transform",callback:function(e,t,n){var r;e[t]=e[t]||[];var i=n.available,a=i===void 0?!0:i,o=cle(n,["available"]);if(a)e[t].push(y0((r={},r[ZO]=!0,r),o));else{var s=e[t].indexOf(function(l){return l.type===n.type});s!==-1&&e[t].splice(s,1)}}},{key:"labels",callback:function(e,t,n){var r;if(!n||Dn(n)){e[t]=n||[];return}n.text||(n.text=e.yField),e[t]=e[t]||[],e[t].push(y0((r={},r[ZO]=!0,r),n))}}],GO=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],hle=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jy=function(){return jy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jy.apply(this,arguments)},ple=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},vle=function(e){hle(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=ple(n,["style"]);return e.call(this,jy({style:jy({fill:"#eee"},r)},i))||this}return t}(Hh),gle=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dy=function(){return Dy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Dy.apply(this,arguments)},mle=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},W6=function(e){gle(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=mle(n,["style"]);return e.call(this,Dy({style:Dy({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},r)},i))||this}return t}(rs);function yle(e,t,n){(n!==void 0&&!sa(e[t],n)||n===void 0&&!(t in e))&&Sf(e,t,n)}var HO=yle;function ble(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var xle=ble,_le=xle(),G6=_le;function wle(e){return $i(e)&&Fs(e)}var Sle=wle,Ole="[object Object]",Cle=Function.prototype,Ele=Object.prototype,H6=Cle.toString,Mle=Ele.hasOwnProperty,Ple=H6.call(Object);function Tle(e){if(!$i(e)||Rr(e)!=Ole)return!1;var t=dh(e);if(t===null)return!0;var n=Mle.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&H6.call(n)==Ple}var YO=Tle;function Ale(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var VO=Ale;function Rle(e){return Rl(e,vu(e))}var Ile=Rle;function Lle(e,t,n,r,i,a,o){var s=VO(e,n),l=VO(t,n),c=o.get(l);if(c){HO(e,n,c);return}var u=a?a(s,l,n+"",e,t,o):void 0,f=u===void 0;if(f){var d=Dn(l),h=!d&&Ml(l),p=!d&&!h&&rh(l);u=l,d||h||p?Dn(s)?u=s:Sle(s)?u=fh(s):h?(f=!1,u=uh(l,!0)):p?(f=!1,u=ph(l,!0)):u=[]:YO(l)||Xa(l)?(u=s,Xa(s)?u=Ile(s):(!gr(s)||Na(s))&&(u=lv(l))):f=!1}f&&(o.set(l,u),i(u,l,r,a,o),o.delete(l)),HO(e,n,u)}var Nle=Lle;function Y6(e,t,n,r,i){e!==t&&G6(t,function(a,o){if(i||(i=new qs),gr(a))Nle(e,t,o,n,Y6,r,i);else{var s=r?r(VO(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),HO(e,o,s)}},vu)}var kle=Y6;function jle(e){return e}var UO=jle;function Dle(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Fle=Dle,V6=Math.max;function Ble(e,t,n){return t=V6(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=V6(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Fle(e,this,s)}}var U6=Ble;function zle(e){return function(){return e}}var Zle=zle,$le=wf?function(e,t){return wf(e,"toString",{configurable:!0,enumerable:!1,value:Zle(t),writable:!0})}:UO,Wle=$le,Gle=800,Hle=16,Yle=Date.now;function Vle(e){var t=0,n=0;return function(){var r=Yle(),i=Hle-(r-n);if(n=r,i>0){if(++t>=Gle)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ule=Vle,Xle=Ule(Wle),X6=Xle;function Kle(e,t){return X6(U6(e,t,UO),e+"")}var qle=Kle;function Jle(e,t,n){if(!gr(n))return!1;var r=typeof t;return(r=="number"?Fs(n)&&Wi(t,n.length):r=="string"&&t in n)?sa(n[t],e):!1}var Qle=Jle;function ece(e){return qle(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Qle(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var K6=ece,tce=K6(function(e,t,n,r){kle(e,t,n,r)}),nce=tce,q6=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},rce=function(e,t){if(Dn(t))return t},eu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nce.apply(void 0,q6(q6([],e,!1),[rce],!1))},ice=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),J6=function(e){ice(t,e);function t(n,r,i){var a=e.call(this,{style:eu(i,r)})||this;return a.chart=n,a}return t.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},t.prototype.disconnectedCallback=function(){},t.prototype.attributeChangedCallback=function(n){},t.prototype.update=function(n,r){var i;return this.attr(eu({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},t.prototype.clear=function(){this.removeChildren()},t.prototype.getElementsLayout=function(){var n=this.chart.getContext().canvas,r=n.document.getElementsByClassName("element"),i=[];return r.forEach(function(a){var o=a.getBBox(),s=o.x,l=o.y,c=o.width,u=o.height,f=a.__data__;i.push({bbox:o,x:s,y:l,width:c,height:u,key:f.key,data:f})}),i},t.prototype.bindEvents=function(n,r){},t}(eg),ace=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fy=function(){return Fy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fy.apply(this,arguments)},oce=function(e){ace(t,e);function t(n,r){return e.call(this,n,r,{type:t.tag})||this}return t.prototype.getConversionTagLayout=function(){var n=this.direction==="vertical",r=this.getElementsLayout(),i=r[0],a=i.x,o=i.y,s=i.height,l=i.width,c=i.data,u=["items",0,"value"],f=Zr(c,u),d=n?r[1].y-o-s:r[1].x-a-l,h=[],p=this.attributes,v=p.size,g=v===void 0?40:v,m=p.arrowSize,b=m===void 0?20:m,_=p.spacing,S=_===void 0?4:_;return r.forEach(function(O,C){if(C>0){var E=O.x,P=O.y,T=O.height,A=O.width,R=O.data,z=O.key,I=Zr(R,u),L=g/2;if(n){var F=E+A/2,Z=P;h.push({points:[[F+L,Z-d+S],[F+L,Z-b-S],[F,Z-S],[F-L,Z-b-S],[F-L,Z-d+S]],center:[F,Z-d/2-S],width:d,value:[f,I],key:z})}else{var F=E,Z=P+T/2;h.push({points:[[E-d+S,Z-L],[E-b-S,Z-L],[F-S,Z],[E-b-S,Z+L],[E-d+S,Z+L]],center:[F-d/2-S,Z],width:d,value:[f,I],key:z})}f=I}}),h},t.prototype.render=function(){this.setDirection(),this.drawConversionTag()},t.prototype.setDirection=function(){var n=this.chart.getCoordinate(),r=Zr(n,"options.transformations"),i="horizontal";r.forEach(function(a){a.includes("transpose")&&(i="vertical")}),this.direction=i},t.prototype.drawConversionTag=function(){var n=this,r=this.getConversionTagLayout(),i=this.attributes,a=i.style,o=i.text,s=o.style,l=o.formatter;r.forEach(function(c){var u=c.points,f=c.center,d=c.value,h=c.key,p=d[0],v=d[1],g=f[0],m=f[1],b=new vle({style:Fy({points:u,fill:"#eee"},a),id:"polygon-".concat(h)}),_=new W6({style:Fy({x:g,y:m,text:Na(l)?l(p,v):(v/p*100).toFixed(2)+"%"},s),id:"text-".concat(h)});n.appendChild(b),n.appendChild(_)})},t.prototype.update=function(){var n=this,r=this.getConversionTagLayout();r.forEach(function(i){var a=i.points,o=i.center,s=i.key,l=o[0],c=o[1],u=n.getElementById("polygon-".concat(s)),f=n.getElementById("text-".concat(s));u.setAttribute("points",a),f.setAttribute("x",l),f.setAttribute("y",c)})},t.tag="ConversionTag",t}(J6),sce=1,lce=2;function cce(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],c=e[l],u=s[1];if(o&&s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new qs;if(r)var d=r(c,u,l,e,t,f);if(!(d===void 0?sh(u,c,sce|lce,r,f):d))return!1}}return!0}var uce=cce;function fce(e){return e===e&&!gr(e)}var Q6=fce;function dce(e){for(var t=vs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Q6(i)]}return t}var hce=dce;function pce(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var e8=pce;function vce(e){var t=hce(e);return t.length==1&&t[0][2]?e8(t[0][0],t[0][1]):function(n){return n===e||uce(n,e,t)}}var gce=vce;function mce(e,t){return e!=null&&t in Object(e)}var yce=mce;function bce(e,t,n){t=gc(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=mc(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Xo(i)&&Wi(o,i)&&(Dn(e)||Xa(e)))}var xce=bce;function _ce(e,t){return e!=null&&xce(e,t,yce)}var t8=_ce,wce=1,Sce=2;function Oce(e,t){return _h(e)&&Q6(t)?e8(mc(e),t):function(n){var r=Zr(n,e);return r===void 0&&r===t?t8(n,e):sh(t,r,wce|Sce)}}var Cce=Oce;function Ece(e){return function(t){return t==null?void 0:t[e]}}var Mce=Ece;function Pce(e){return function(t){return Rf(t,e)}}var Tce=Pce;function Ace(e){return _h(e)?Mce(mc(e)):Tce(e)}var Rce=Ace;function Ice(e){return typeof e=="function"?e:e==null?UO:typeof e=="object"?Dn(e)?Cce(e[0],e[1]):gce(e):Rce(e)}var XO=Ice;function Lce(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var Nce=Lce;function kce(e){return e!==e}var jce=kce;function Dce(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var Fce=Dce;function Bce(e,t,n){return t===t?Fce(e,t,n):Nce(e,jce,n)}var n8=Bce;function zce(e,t){var n=e==null?0:e.length;return!!n&&n8(e,t,0)>-1}var Zce=zce;function $ce(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Wce=$ce;function Gce(){}var r8=Gce,Hce=1/0,Yce=hc&&1/mr(new hc([,-0]))[1]==Hce?function(e){return new hc(e)}:r8,Vce=Yce,Uce=200;function Xce(e,t,n){var r=-1,i=Zce,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=Wce;else if(a>=Uce){var c=t?null:Vce(e);if(c)return mr(c);o=!1,i=rn,l=new ze}else l=t?[]:s;e:for(;++r<a;){var u=e[r],f=t?t(u):u;if(u=n||u!==0?u:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(u)}else i(l,f,n)||(l!==s&&l.push(f),s.push(u))}return s}var Kce=Xce;function qce(e,t){return e&&e.length?Kce(e,XO(t,2)):[]}var KO=qce;function Jce(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}var Qce=Jce;function eue(e,t){return e&&G6(e,t,vs)}var tue=eue;function nue(e,t){return function(n,r){if(n==null)return n;if(!Fs(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var rue=nue,iue=rue(tue),i8=iue;function aue(e,t,n,r){return i8(e,function(i,a,o){t(r,i,n(i),o)}),r}var oue=aue;function sue(e,t){return function(n,r){var i=Dn(n)?Qce:oue,a=t?t():{};return i(n,e,XO(r,2),a)}}var lue=sue,cue=Object.prototype,uue=cue.hasOwnProperty,fue=lue(function(e,t,n){uue.call(e,n)?e[n].push(t):Sf(e,n,[t])}),a8=fue,qO=32,o8=16,s8=48,due=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),b0=function(){return b0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},b0.apply(this,arguments)},hue=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},pue=function(e){due(t,e);function t(n,r){return e.call(this,n,r,{type:t.tag})||this}return t.prototype.render=function(){this.drawText()},t.prototype.getBidirectionalBarAxisTextLayout=function(){var n=this.attributes.layout,r=n==="vertical",i=this.getElementsLayout(),a=r?KO(i,"x"):KO(i,"y"),o=["title"],s=[],l=this.chart.getContext().views,c=Zr(l,[0,"layout"]),u=c.width,f=c.height;return a.forEach(function(d){var h=d.x,p=d.y,v=d.height,g=d.width,m=d.data,b=d.key,_=Zr(m,o);r?s.push({x:h+g/2,y:f,text:_,key:b}):s.push({x:u,y:p+v/2,text:_,key:b})}),KO(s,"text").length!==s.length&&(s=Object.values(a8(s,"text")).map(function(d){var h,p=d.reduce(function(v,g){return v+(r?g.x:g.y)},0);return b0(b0({},d[0]),(h={},h[r?"x":"y"]=p/d.length,h))})),s},t.prototype.transformLabelStyle=function(n){var r={},i=/^label[A-Z]/;return Object.keys(n).forEach(function(a){i.test(a)&&(r[a.replace("label","").replace(/^[A-Z]/,function(o){return o.toLowerCase()})]=n[a])}),r},t.prototype.drawText=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout(),i=this.attributes,a=i.layout,o=i.labelFormatter,s=hue(i,["layout","labelFormatter"]);r.forEach(function(l){var c=l.x,u=l.y,f=l.text,d=l.key,h=new W6({style:b0({x:c,y:u,text:Na(o)?o(f):f,wordWrap:!0,wordWrapWidth:a==="horizontal"?qO*2:120,maxLines:2,textOverflow:"ellipsis"},n.transformLabelStyle(s)),id:"text-".concat(d)});n.appendChild(h)})},t.prototype.update=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout();r.forEach(function(i){var a=i.x,o=i.y,s=i.key,l=n.getElementById("text-".concat(s));l.setAttribute("x",a),l.setAttribute("y",o)})},t.tag="BidirectionalBarAxisText",t}(J6),vue={ConversionTag:oce,BidirectionalBarAxisText:pue},gue=function(){function e(t,n){this.container=new Map,this.chart=t,this.config=n,this.init()}return e.prototype.init=function(){var t=this;GO.forEach(function(n){var r,i=n.key,a=n.shape,o=t.config[i];if(o){var s=new vue[a](t.chart,o),l=t.chart.getContext().canvas;l.appendChild(s),t.container.set(i,s)}else(r=t.container.get(i))===null||r===void 0||r.clear()})},e.prototype.update=function(){var t=this;this.container.size&&GO.forEach(function(n){var r=n.key,i=t.container.get(r);i==null||i.update()})},e}();function mue(e,t,n,r){if(!gr(e))return e;t=gc(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var l=mc(t[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=o){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=gr(u)?u:Wi(t[i+1])?[]:{})}Of(s,l,c),s=s[l]}return e}var l8=mue;function yue(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Rf(e,o);n(s,o)&&l8(a,gc(o,e),s)}return a}var bue=yue;function xue(e,t){return bue(e,t,function(n,r){return t8(e,r)})}var _ue=xue,c8=un?un.isConcatSpreadable:void 0;function wue(e){return Dn(e)||Xa(e)||!!(c8&&e&&e[c8])}var Sue=wue;function u8(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Sue),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?u8(s,t-1,n,r,i):ac(i,s):r||(i[i.length]=s)}return i}var Oue=u8;function Cue(e){var t=e==null?0:e.length;return t?Oue(e,1):[]}var Eue=Cue;function Mue(e){return X6(U6(e,void 0,Eue),e+"")}var JO=Mue,Pue=JO(function(e,t){return e==null?{}:_ue(e,t)}),f8=Pue,Tue=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fd=function(){return Fd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fd.apply(this,arguments)},d8="data-chart-source-type",Cr=function(e){Tue(t,e);function t(n,r){var i=e.call(this)||this;return i.container=typeof n=="string"?document.getElementById(n):n,i.options=i.mergeOption(r),i.createG2(),i.bindEvents(),i}return t.prototype.getChartOptions=function(){return Fd(Fd({},f8(this.options,ule)),{container:this.container})},t.prototype.getSpecOptions=function(){return this.type==="base"||this[fle]?Fd(Fd({},this.options),this.getChartOptions()):this.options},t.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new ole(this.getChartOptions()),this.container.setAttribute(d8,"Ant Design Charts")},t.prototype.bindEvents=function(){var n=this;this.chart&&this.chart.on("*",function(r){r!=null&&r.type&&n.emit(r.type,r)})},t.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},t.prototype.getDefaultOptions=function(){},t.prototype.render=function(){var n=this;this.type!=="base"&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){n.annotation=new gue(n.chart,n.options)}),this.bindSizeSensor()},t.prototype.update=function(n){this.options=this.mergeOption(n)},t.prototype.mergeOption=function(n){return eu({},this.getBaseOptions(),this.getDefaultOptions(),n)},t.prototype.changeData=function(n){this.chart.changeData(n)},t.prototype.changeSize=function(n,r){this.chart.changeSize(n,r)},t.prototype.destroy=function(){this.chart.destroy(),this.off(),this.container.removeAttribute(d8)},t.prototype.execAdaptor=function(){var n=this.getSchemaAdaptor();n({chart:this.chart,options:this.options})},t.prototype.triggerResize=function(){this.chart.forceFit()},t.prototype.bindSizeSensor=function(){var n=this,r=this.options.autoFit,i=r===void 0?!0:r;i&&this.chart.on(kr.AFTER_CHANGE_SIZE,function(){n.annotation.update()})},t}(If),Aue=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rue=function(e){Aue(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="base",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return function(n){return n}},t}(Cr);function Iue(){}var QO=Iue;function By(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}By.prototype=yh(QO.prototype),By.prototype.constructor=By;var x0=By,Lue=pu&&new pu,h8=Lue,Nue=h8?function(e){return h8.get(e)}:r8,p8=Nue,kue={},v8=kue,jue=Object.prototype,Due=jue.hasOwnProperty;function Fue(e){for(var t=e.name+"",n=v8[t],r=Due.call(v8,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t}var zy=Fue,Bue=4294967295;function Zy(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Bue,this.__views__=[]}Zy.prototype=yh(QO.prototype),Zy.prototype.constructor=Zy;var eC=Zy;function zue(e){if(e instanceof eC)return e.clone();var t=new x0(e.__wrapped__,e.__chain__);return t.__actions__=fh(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Zue=zue,$ue=Object.prototype,Wue=$ue.hasOwnProperty;function $y(e){if($i(e)&&!Dn(e)&&!(e instanceof eC)){if(e instanceof x0)return e;if(Wue.call(e,"__wrapped__"))return Zue(e)}return new x0(e)}$y.prototype=QO.prototype,$y.prototype.constructor=$y;var Gue=$y;function Hue(e){var t=zy(e),n=Gue[t];if(typeof n!="function"||!(t in eC.prototype))return!1;if(e===n)return!0;var r=p8(n);return!!r&&e===r[0]}var g8=Hue,Yue="Expected a function",Vue=8,Uue=32,Xue=128,Kue=256;function que(e){return JO(function(t){var n=t.length,r=n,i=x0.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if(typeof a!="function")throw new TypeError(Yue);if(i&&!o&&zy(a)=="wrapper")var o=new x0([],!0)}for(r=o?r:n;++r<n;){a=t[r];var s=zy(a),l=s=="wrapper"?p8(a):void 0;l&&g8(l[0])&&l[1]==(Xue|Vue|Uue|Kue)&&!l[4].length&&l[9]==1?o=o[zy(l[0])].apply(o,l[3]):o=a.length==1&&g8(a)?o[s]():o.thru(a)}return function(){var c=arguments,u=c[0];if(o&&c.length==1&&Dn(u))return o.plant(u).value();for(var f=0,d=n?t[f].apply(this,c):u;++f<n;)d=t[f].call(this,d);return d}})}var Jue=que,Que=Jue(),Ar=Que,efe=function(e){var t=e.options,n=t.children,r=n===void 0?[]:n;return r.forEach(function(i){Object.keys(i).forEach(function(a){Dn(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[ZO]}))})}),t};function tfe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var nfe=tfe;function rfe(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var ife=rfe;function afe(e,t){return t.length<2?e:Rf(e,ife(t,0,-1))}var ofe=afe;function sfe(e,t){return t=gc(t,e),e=ofe(e,t),e==null||delete e[mc(nfe(t))]}var lfe=sfe;function cfe(e){return YO(e)?void 0:e}var ufe=cfe,ffe=1,dfe=2,hfe=4,pfe=JO(function(e,t){var n={};if(e==null)return n;var r=!1;t=Af(t,function(a){return a=gc(a,e),r||(r=a.length>1),a}),Rl(e,ev(e),n),r&&(n=gv(n,ffe|dfe|hfe,ufe));for(var i=t.length;i--;)lfe(n,t[i]);return n}),tC=pfe;function vfe(e){return e===void 0}var gfe=vfe;function mfe(e,t,n){return e==null?e:l8(e,t,n)}var on=mfe,m8=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},yfe=function(e){var t=e.children,n=t===void 0?[]:t,r=Object.keys($O).concat(ky.map(function(i){return i.key}));return r.forEach(function(i){delete e[i]}),n.forEach(function(i){Object.keys(i).forEach(function(a){r.includes(a)&&delete i[a]})}),Object.keys(e).forEach(function(i){m8(m8([],$6,!0),GO.map(function(a){return a.key}),!0).includes(i)||delete e[i]}),e},Dr=function(e){var t=efe(e),n=t.children,r=n===void 0?[]:n,i=tC(t,[].concat($6,ky.map(function(c){return c.key}))),a=function(c){var u;return(u=dle.find(function(f){return f.key===c}))===null||u===void 0?void 0:u.callback},o=function(c,u,f){var d=a(u);d?d(c,u,f):c[u]=eu({},c[u],f)},s=function(c){Object.keys(c).forEach(function(u){if(c[u]){var f=ky.find(function(p){return p.key===u});if(f){var d=f.type,h=f.extend_keys;d?r.push(l(eu({},f8(c,h),{type:d},c[u]))):Dn(c[u])&&c[u].forEach(function(p){r.push(l(p))})}}})},l=function(c){return s(c),Object.keys($O).forEach(function(u){var f=$O[u];if(!gfe(c[u]))if(gr(f)){var d=f.value,h=f.target,p=d(c[u]);o(c,h,p)}else on(c,f,c[u])}),c};return r.forEach(function(c){var u=eu({},i,c);l(eu(c,u))}),s(t),yfe(t),e},nC=function(){return nC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},nC.apply(this,arguments)};function bfe(e){var t=e.options,n=t.stack,r=t.tooltip,i=t.xField;if(!n)return e;var a=ky.map(function(s){return s.type}).filter(function(s){return!!s}),o=!1;return a.forEach(function(s){t[s]&&(o=!0,on(t,[s,"stack"],nC({y1:"y"},typeof n=="object"?n:{})))}),o&&!zO(r)&&!r&&on(t,"tooltip",{title:i,items:[{channel:"y"}]}),e}function ji(e){return Ar(bfe)(e)}function xfe(e){return Ar(ji,Dr)(e)}var _fe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wfe=function(e){_fe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="area",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"area"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return xfe},t}(Cr),Bd=function(){return Bd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Bd.apply(this,arguments)};function y8(e){var t=function(n){var r=n.options;Zr(r,"children.length")>1&&on(r,"children",[{type:"interval"}]);var i=r.scale,a=r.markBackground,o=r.data,s=r.children,l=r.yField,c=Zr(i,"y.domain",[]);if(a&&c.length&&Dn(o)){var u="domainMax",f=o.map(function(d){var h;return Bd(Bd({originData:Bd({},d)},tC(d,l)),(h={},h[u]=c[c.length-1],h))});s.unshift(Bd({type:"interval",data:f,yField:u,tooltip:!1,style:{fill:"#eee"},label:!1},a))}return n};return Ar(t,ji,Dr)(e)}var Sfe=function(){var e=function(t,n){return function(r){var i=t.fill,a=i===void 0?"#2888FF":i,o=t.stroke,s=t.fillOpacity,l=s===void 0?1:s,c=t.strokeOpacity,u=c===void 0?.2:c,f=t.pitch,d=f===void 0?8:f,h=r[0],p=r[1],v=r[2],g=r[3],m=(p[1]-h[1])/2,b=n.document,_=b.createElement("g",{}),S=b.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+m],[v[0]-d,h[1]+m],g],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),O=b.createElement("polygon",{style:{points:[[h[0]-d,h[1]+m],p,v,[v[0]-d,h[1]+m]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u}}),C=b.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+m],p,[h[0]+d,h[1]+m]],fill:a,fillOpacity:l-.2}});return _.appendChild(S),_.appendChild(O),_.appendChild(C),_}};HM("shape.interval.bar25D",e)},Ofe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Sfe();var Cfe=function(e){Ofe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Bar",n}return t.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},elementHighlightByColor:{background:!0}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return y8},t}(Cr),Efe=function(){var e=function(t,n){return function(r){var i=t.fill,a=i===void 0?"#2888FF":i,o=t.stroke,s=t.fillOpacity,l=s===void 0?1:s,c=t.strokeOpacity,u=c===void 0?.2:c,f=t.pitch,d=f===void 0?8:f,h=r[1][0]-r[0][0],p=h/2+r[0][0],v=n.document,g=v.createElement("g",{}),m=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]+d],[p,r[3][1]+d],[r[3][0],r[3][1]]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),b=v.createElement("polygon",{style:{points:[[p,r[1][1]+d],[r[1][0],r[1][1]],[r[2][0],r[2][1]],[p,r[2][1]+d]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u}}),_=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]-d],[r[1][0],r[1][1]],[p,r[1][1]+d]],fill:a,fillOpacity:l-.2}});return g.appendChild(b),g.appendChild(m),g.appendChild(_),g}};HM("shape.interval.column25D",e)},Mfe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Efe();var Pfe=function(e){Mfe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="column",n}return t.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0},elementHighlightByColor:{background:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return y8},t}(Cr);function Tfe(e){var t=function(r){var i=r.options,a=i.children,o=a===void 0?[]:a,s=i.legend;return s&&o.forEach(function(l){if(!Zr(l,"colorField")){var c=Zr(l,"yField");on(l,"colorField",function(){return c})}}),r},n=function(r){var i=r.options,a=i.annotations,o=a===void 0?[]:a,s=i.children,l=s===void 0?[]:s,c=i.scale,u=!1;return Zr(c,"y.key")||l.forEach(function(f,d){if(!Zr(f,"scale.y.key")){var h="child".concat(d,"Scale");on(f,"scale.y.key",h);var p=f.annotations,v=p===void 0?[]:p;v.length>0&&(on(f,"scale.y.independent",!1),v.forEach(function(g){on(g,"scale.y.key",h)})),!u&&o.length>0&&Zr(f,"scale.y.independent")===void 0&&(u=!0,on(f,"scale.y.independent",!1),o.forEach(function(g){on(g,"scale.y.key",h)}))}}),r};return Ar(t,n,ji,Dr)(e)}var Afe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),b8=function(e){Afe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="DualAxes",n}return t.getDefaultOptions=function(){return{type:"view",axis:{y:{title:!1,tick:!1},x:{title:!1}},scale:{y:{independent:!0,nice:!0}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Tfe},t}(Cr);function Rfe(e){var t=function(a){var o=a.options,s=o.xField,l=o.colorField;return l||on(o,"colorField",s),a},n=function(a){var o=a.options,s=o.compareField,l=o.transform,c=o.isTransposed,u=c===void 0?!0:c,f=o.coordinate;return l||(s?on(o,"transform",[]):on(o,"transform",[{type:"symmetryY"}])),!f&&u&&on(o,"coordinate",{transform:[{type:"transpose"}]}),a},r=function(a){var o=a.options,s=o.compareField,l=o.seriesField,c=o.data,u=o.children,f=o.yField,d=o.isTransposed,h=d===void 0?!0:d;if(s||l){var p=Object.values(a8(c,function(v){return v[s||l]}));u[0].data=p[0],u.push({type:"interval",data:p[1],yField:function(v){return-v[f]}}),delete o.compareField,delete o.data}return l&&(on(o,"type","spaceFlex"),on(o,"ratio",[1,1]),on(o,"direction",h?"row":"col"),delete o.seriesField),a},i=function(a){var o=a.options,s=o.tooltip,l=o.xField,c=o.yField;return s||on(o,"tooltip",{title:!1,items:[function(u){return{name:u[l],value:u[c]}}]}),a};return Ar(t,n,r,i,ji,Dr)(e)}var Ife=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lfe=function(e){Ife(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="column",n}return t.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"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Rfe},t}(Cr);function Nfe(e){return Ar(ji,Dr)(e)}var kfe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jfe=function(e){kfe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="line",n}return t.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"line"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Nfe},t}(Cr);function _0(e){switch(typeof e){case"function":return e;case"string":return function(t){return Zr(t,[e])};default:return function(){return e}}}var tu=function(){return tu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},tu.apply(this,arguments)};function Dfe(e){var t=function(n){var r=n.options,i=r.angleField,a=r.data,o=r.label,s=r.tooltip,l=r.colorField,c=_0(l);if(Dn(a)){var u=a.reduce(function(d,h){return d+h[i]},0);if(u===0){var f=a.map(function(d){var h;return tu(tu({},d),(h={},h[i]=1,h))});on(r,"data",f),o&&on(r,"label",tu(tu({},o),{formatter:function(){return 0}})),s!==!1&&on(r,"tooltip",tu(tu({},s),{items:[function(d,h,p){return{name:c(d,h,p),value:0}}]}))}}return n};return Ar(t,Dr)(e)}var Ffe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bfe=function(e){Ffe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="pie",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"theta"},transform:[{type:"stackY",reverse:!0}],animate:{enter:{type:"waveIn"}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Dfe},t}(Cr);function zfe(e){return Ar(ji,Dr)(e)}var Zfe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$fe=function(e){Zfe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="scatter",n}return t.getDefaultOptions=function(){return{axis:{y:{title:!1},x:{title:!1}},legend:{size:!1},children:[{type:"point"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return zfe},t}(Cr);function Wfe(e){var t=function(n){return on(n,"options.coordinate",{type:Zr(n,"options.coordinateType","polar")}),n};return Ar(t,Dr)(e)}var Gfe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hfe=function(e){Gfe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="radar",n}return t.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"}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Wfe},t}(Cr);function Yfe(e,t){var n=-1,r=Fs(e)?Array(e.length):[];return i8(e,function(i,a,o){r[++n]=t(i,a,o)}),r}var Vfe=Yfe;function Ufe(e,t){var n=Dn(e)?Af:Vfe;return n(e,XO(t,3))}var zd=Ufe,ec=function(){return ec=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ec.apply(this,arguments)},Xfe="__stock-range__",Kfe="trend",qfe="up",Jfe="down";function Qfe(e){var t=function(r){var i=r.options,a=i.data,o=i.yField;return r.options.data=zd(a,function(s){var l=s&&ec({},s);if(Array.isArray(o)&&l){var c=o[0],u=o[1],f=o[2],d=o[3];l[Kfe]=l[c]<=l[u]?qfe:Jfe,l[Xfe]=[l[c],l[u],l[f],l[d]]}return l}),r},n=function(r){var i=r.options,a=i.xField,o=i.yField,s=i.fallingFill,l=i.risingFill,c=o[0],u=o[1],f=o[2],d=o[3],h=_0(a);return r.options.children=zd(r.options.children,function(p,v){var g=v===0;return ec(ec({},p),{tooltip:{title:function(m,b,_){var S=h(m,b,_);return S instanceof Date?S.toLocaleString():S},items:[{field:f},{field:d},{field:c},{field:u}]},encode:ec(ec({},p.encode||{}),{y:g?[f,d]:[c,u],color:function(m){return Math.sign(m[u]-m[c])}}),style:ec(ec({},p.style||{}),{lineWidth:g?1:10})})}),delete i.yField,r.options.legend={color:!1},s&&on(r,"options.scale.color.range[0]",s),l&&on(r,"options.scale.color.range[2]",l),r};return Ar(t,n,Dr)(e)}var ede=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tde=["#26a69a","#999999","#ef5350"],nde=function(e){ede(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="stock",n}return t.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:tde},y:{nice:!0}},children:[{type:"link"},{type:"link"}],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}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Qfe},t}(Cr);function rde(e){return Ar(ji,Dr)(e)}var ide=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ade=function(e){ide(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyLine",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],autoFit:!1,animate:{enter:{type:"growInX",duration:500}},padding:0,margin:0,tooltip:!1}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return rde},t}(Cr);function ode(e){return Ar(ji,Dr)(e)}var sde=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lde=function(e){sde(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyArea",n}return t.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return ode},t}(Cr);function cde(e){return Ar(ji,Dr)(e)}var ude=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fde=function(e){ude(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyColumn",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return cde},t}(Cr),rC=function(){return rC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},rC.apply(this,arguments)};function dde(e){var t=function(n){var r=n.options,i=r.percent,a=r.color,o=a===void 0?[]:a;if(!i)return n;var s={scale:{color:{range:o.length?o:[]}},data:[1,i]};return Object.assign(r,rC({},s)),n};return Ar(t,ji,Dr)(e)}var hde=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pde=function(e){hde(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyProgress",n}return t.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,margin:0,padding:0,tooltip:!1,children:[{interaction:{tooltip:!1},coordinate:{transform:[{type:"transpose"}]},type:"interval",axis:!1,legend:!1,encode:{y:function(n){return n},color:function(n,r){return r}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return dde},t}(Cr),iC=function(){return iC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},iC.apply(this,arguments)};function vde(e){var t=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return on(r,"options.coordinate.innerRadius",o),r},n=function(r){var i=r.options,a=i.percent,o=i.color,s=o===void 0?[]:o;if(!a)return r;var l={scale:{color:{range:s.length?s:[]}},data:[1,a]};return Object.assign(i,iC({},l)),r};return Ar(t,n,ji,Dr)(e)}var gde=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),mde=function(e){gde(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyRing",n}return t.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,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(n){return n},color:function(n,r){return r}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return vde},t}(Cr);function yde(e){return Ar(Dr)(e)}var bde=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xde=function(e){bde(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="rose",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"polar"},animate:{enter:{type:"waveIn"}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return yde},t}(Cr),aC="__start__",Zd="__end__",oC="__waterfall_value__",sC=function(){return sC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},sC.apply(this,arguments)},_de=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function wde(e){var t=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.yField;return o.length&&(o.reduce(function(l,c,u){var f,d=_0(s),h=d(c,u,o);if(u===0||c.isTotal)c[aC]=0,c[Zd]=h,c[oC]=h;else{var p=(f=l[Zd])!==null&&f!==void 0?f:d(l,u,o);c[aC]=p,c[Zd]=p+h,c[oC]=l[Zd]}return c},[]),Object.assign(i,{yField:[aC,Zd]})),r},n=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.xField,l=i.children,c=i.linkStyle,u=_de([],o,!0);return u.reduce(function(f,d,h){return h>0&&(d.x1=f[s],d.x2=d[s],d.y1=f[Zd]),d},[]),u.shift(),l.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:u,style:sC({stroke:"#697474"},c),label:!1,tooltip:!1}),r};return Ar(t,n,ji,Dr)(e)}var Sde=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ode=function(e){Sde(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="waterfall",n}return t.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:oC,valueFormatter:"~s",name:"value"},axis:{y:{title:null,labelFormatter:"~s"},x:{title:null}},children:[{type:"interval",interaction:{elementHighlightByColor:{background:!0}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return wde},t}(Cr),Cde="[object Number]";function Ede(e){return typeof e=="number"||$i(e)&&Rr(e)==Cde}var $d=Ede,Mde=Object.prototype,Pde=Mde.hasOwnProperty,Tde=K6(function(e,t){if(hu(t)||Fs(t)){Rl(t,vs(t),e);return}for(var n in t)Pde.call(t,n)&&Of(e,n,t[n])}),x8=Tde,Ade=/\s/;function Rde(e){for(var t=e.length;t--&&Ade.test(e.charAt(t)););return t}var Ide=Rde,Lde=/^\s+/;function Nde(e){return e&&e.slice(0,Ide(e)+1).replace(Lde,"")}var kde=Nde,_8=0/0,jde=/^[-+]0x[0-9a-f]+$/i,Dde=/^0b[01]+$/i,Fde=/^0o[0-7]+$/i,Bde=parseInt;function zde(e){if(typeof e=="number")return e;if(gu(e))return _8;if(gr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=gr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=kde(e);var n=Dde.test(e);return n||Fde.test(e)?Bde(e.slice(2),n?2:8):jde.test(e)?_8:+e}var w8=zde,S8=1/0,Zde=17976931348623157e292;function $de(e){if(!e)return e===0?e:0;if(e=w8(e),e===S8||e===-S8){var t=e<0?-1:1;return t*Zde}return e===e?e:0}var Wde=$de;function Gde(e){var t=Wde(e),n=t%1;return t===t?n?t-n:t:0}var O8=Gde,Hde=pi.isFinite,Yde=Math.min;function Vde(e){var t=Math[e];return function(n,r){if(n=w8(n),r=r==null?0:Yde(O8(r),292),r&&Hde(n)){var i=(Oh(n)+"e").split("e"),a=t(i[0]+"e"+(+i[1]+r));return i=(Oh(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return t(n)}}var Ude=Vde,Xde=Ude("ceil"),Kde=Xde,qde=0/0;function Jde(e){return typeof e=="number"?e:gu(e)?qde:+e}var C8=Jde;function Qde(e,t){return function(n,r){var i;if(n===void 0&&r===void 0)return t;if(n!==void 0&&(i=n),r!==void 0){if(i===void 0)return r;typeof n=="string"||typeof r=="string"?(n=Sh(n),r=Sh(r)):(n=C8(n),r=C8(r)),i=e(n,r)}return i}}var ehe=Qde,the=ehe(function(e,t){return e/t},1),nhe=the;function rhe(e){var t=function(n){var r=n.options,i=r.data,a=r.binNumber,o=r.binWidth,s=r.children,l=r.channel,c=l===void 0?"count":l,u=Zr(s,"[0].transform[0]",{});return $d(o)?(x8(u,{thresholds:Kde(nhe(i.length,o)),y:c}),n):($d(a)&&x8(u,{thresholds:a,y:c}),n)};return Ar(t,ji,Dr)(e)}var ihe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ahe=function(e){ihe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Histogram",n}return t.getDefaultOptions=function(){return{type:"view",autoFit:!0,axis:{y:{title:!1},x:{title:!1}},children:[{type:"rect",transform:[{type:"binX",y:"count"}],interaction:{elementHighlightByColor:{background:!0}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return rhe},t}(Cr);function ohe(e){var t=function(r){var i=r.options,a=i.tooltip,o=a===void 0?{}:a,s=i.colorField,l=i.sizeField;return o&&!o.field&&(o.field=s||l),r},n=function(r){var i=r.options,a=i.mark,o=i.children;return a&&(o[0].type=a),r};return Ar(t,n,ji,Dr)(e)}var she=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lhe=function(e){she(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="heatmap",n}return t.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{valueFormatter:"~s"},axis:{y:{title:null,grid:!0},x:{title:null,grid:!0}},children:[{type:"point",interaction:{elementHighlightByColor:{background:!0}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return ohe},t}(Cr);function che(e){var t=function(n){var r=n.options.boxType,i=r===void 0?"box":r;return n.options.children[0].type=i,n};return Ar(t,ji,Dr)(e)}var uhe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fhe=function(e){uhe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="box",n}return t.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"}]}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return che},t}(Cr);function dhe(e){var t=function(n){var r=n.options,i=r.data,a=[{type:"custom",callback:function(s){return{links:s}}}];if(Dn(i))i.length>0?on(r,"data",{value:i,transform:a}):delete r.children;else if(Zr(i,"type")==="fetch"&&Zr(i,"value")){var o=Zr(i,"transform");Dn(o)?on(i,"transform",o.concat(a)):on(i,"transform",a)}return n};return Ar(t,ji,Dr)(e)}var hhe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),phe=function(e){hhe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="sankey",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return dhe},t}(Cr);function vhe(e){var t=e.options.layout,n=t===void 0?"horizontal":t;return e.options.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}],e}function ghe(e){vhe(e);var t=e.options.layout,n=t===void 0?"horizontal":t;return e.options.children.forEach(function(r){var i;!((i=r==null?void 0:r.coordinate)===null||i===void 0)&&i.transform&&(r.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}])}),e}function mhe(e){return e==null}var yhe=mhe,bhe="[object String]";function xhe(e){return typeof e=="string"||!Dn(e)&&$i(e)&&Rr(e)==bhe}var E8=xhe;function _he(e,t){return Af(t,function(n){return e[n]})}var whe=_he;function She(e){return e==null?[]:whe(e,vs(e))}var Ohe=She,Che=Math.max;function Ehe(e,t,n,r){e=Fs(e)?e:Ohe(e),n=n&&!r?O8(n):0;var i=e.length;return n<0&&(n=Che(i+n,0)),E8(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&n8(e,t,n)>-1}var Mhe=Ehe,Us=function(){return Us=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Us.apply(this,arguments)},Wy=["#f0efff","#5B8FF9","#3D76DD"];function lC(e,t,n,r){r===void 0&&(r=!0);var i=0,a=!1,o=zd(e,function(s){var l,c,u=Zr(s,[t]);if(yhe(u))return[];if(E8(u)){var f=Number(u);return isNaN(f)?[]:(l={},l[n]=s[n],l[t]=f,l)}return Dn(u)?(a=!0,i=Math.max(i,u.length),zd(r?u.sort(function(d,h){return h-d}):u,function(d,h){var p;return p={},p[n]=s[n],p[t]=d,p.index=h,p})):(i=Math.max(1,i),c={},c[n]=s[n],c[t]=u,c)}).flat();return a?[o.map(function(s){return Us({index:0},s)}),i]:[o,i]}function cC(e,t){return new Array(e).fill("").map(function(n,r){return Dn(t)?t[r%t.length]:t})}function Phe(e){var t=function(i){var a=i.options,o=a.color,s=a.rangeField,l=s===void 0?"ranges":s,c=a.measureField,u=c===void 0?"measures":c,f=a.targetField,d=f===void 0?"targets":f,h=a.xField,p=h===void 0?"title":h,v=a.mapField,g=a.data,m=lC(g,l,p),b=m[0],_=m[1],S=lC(g,u,p,!1),O=S[0],C=S[1],E=lC(g,d,p,!1),P=E[0],T=E[1],A=Zr(o,[l],Wy[0]),R=Zr(o,[u],Wy[1]),z=Zr(o,[d],Wy[2]),I=[cC(_,A),cC(C,R),cC(T,z)].flat();return i.options.children=zd(i.options.children,function(L,F){var Z=[b,O,P][F],H=[l,u,d][F];return Us(Us({},L),{data:Z,encode:Us(Us({},L.encode||{}),{x:p,y:H,color:function(W){var G=W.index,J=$d(G)?"".concat(H,"_").concat(G):H;return v?Zr(v,[H,G],J):J}}),style:Us(Us({},L.style||{}),{zIndex:function(W){return-W[H]}}),labels:F!==0?zd(L.labels,function(W){return Us(Us({},W),{text:H})}):void 0})}),i.options.scale.color.range=I,i.options.legend.color.itemMarker=function(L){return v&&Mhe(v==null?void 0:v[d],L)||(L==null?void 0:L.replace(/\_\d$/,""))===d?"line":"square"},i},n=function(i){var a=i.options.layout,o=a===void 0?"horizontal":a;return o!=="horizontal"&&on(i,"options.children[2].shapeField","hyphen"),i},r=function(i){var a=i.options,o=a.range,s=o===void 0?{}:o,l=a.measure,c=l===void 0?{}:l,u=a.target,f=u===void 0?{}:u,d=a.children;return i.options.children=[s,c,f].map(function(h,p){return eu(d[p],h)}),i};return Ar(t,n,r,ghe,Dr)(e)}var The=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ahe=function(e){The(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="bullet",n}return t.getDefaultOptions=function(){return{type:"view",scale:{color:{range:Wy}},legend:{color:{itemMarker:function(n){return n==="target"?"line":"square"}}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval",style:{maxWidth:30},axis:{y:{grid:!0,gridLineWidth:2}}},{type:"interval",style:{maxWidth:20},transform:[{type:"stackY"}]},{type:"point",encode:{size:8,shape:"line"}}],interaction:{tooltip:{shared:!0}},coordinate:{transform:[{type:"transpose"}]}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Phe},t}(Cr);function Rhe(e){var t=function(n){var r=n.options.data;return n.options.data={value:r},n};return Ar(t,ji,Dr)(e)}var Ihe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lhe=function(e){Ihe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Gauge",n}return t.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Rhe},t}(Cr);function Nhe(e){var t=function(n){var r=n.options.percent;return $d(r)&&on(n,"options.data",r),n};return Ar(t,ji,Dr)(e)}var khe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jhe=function(e){khe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Liquid",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Nhe},t}(Cr);function Dhe(e){return Ar(ji,Dr)(e)}var Fhe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bhe=function(e){Fhe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="WordCloud",n}return t.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Dhe},t}(Cr);function zhe(e){var t=function(n){var r=n.options,i=r.data;return i&&on(r,"data",{value:i}),n};return Ar(t,ji,Dr)(e)}var Zhe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$he=function(e){Zhe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="treemap",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return zhe},t}(Cr),ef=function(){return ef=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ef.apply(this,arguments)};function Whe(e){var t=function(i){var a=i.options,o=a.startAngle,s=a.maxAngle,l=a.coordinate,c=$d(o)?o/(2*Math.PI)*360:-90,u=$d(s)?(Number(s)+c)/180*Math.PI:Math.PI;return on(i,["options","coordinate"],ef(ef({},l),{endAngle:u,startAngle:o!=null?o:-Math.PI/2})),i},n=function(i){var a=i.options,o=a.tooltip,s=a.xField,l=a.yField,c=_0(s),u=_0(l);return o||on(a,"tooltip",{title:!1,items:[function(f,d,h){return{name:c(f,d,h),value:u(f,d,h)}}]}),i},r=function(i){var a=i.options,o=a.markBackground,s=a.children,l=a.scale,c=a.coordinate,u=a.xField,f=Zr(l,"y.domain",[]);return o&&s.unshift(ef({type:"interval",xField:u,yField:f[f.length-1],colorField:o.color,scale:{color:{type:"identity"}},style:{fillOpacity:o.opacity,fill:o.color?void 0:"#e0e4ee"},coordinate:ef(ef({},c),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},o)),i};return Ar(t,n,r,ji,Dr)(e)}var Ghe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hhe=function(e){Ghe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="radial",n}return t.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}}}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Whe},t}(Cr);function Yhe(e){return Ar(Dr)(e)}var Vhe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Uhe=function(e){Vhe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="CirclePacking",n}return t.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Yhe},t}(Cr),Gy=function(){return Gy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Gy.apply(this,arguments)};function Xhe(e){var t=function(n){var r=n.options,i=r.xField,a=r.yField,o=r.seriesField,s=r.children,l=s==null?void 0:s.map(function(c){return Gy(Gy({},c),{xField:i,yField:a,seriesField:o,colorField:o,data:c.type==="density"?{transform:[{type:"kde",field:a,groupBy:[i,o]}]}:c.data})}).filter(function(c){return r.violinType!=="density"||c.type==="density"});return on(r,"children",l),r.violinType==="polar"&&on(r,"coordinate",{type:"polar"}),on(r,"violinType",void 0),n};return Ar(t,ji,Dr)(e)}var Khe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qhe=function(e){Khe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="violin",n}return t.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"}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Xhe},t}(Cr),w0=function(){return w0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},w0.apply(this,arguments)},Jhe=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function Qhe(e){var t=function(a){var o=a.options,s=o.yField,l=o.children;return l.forEach(function(c,u){on(c,"yField",s[u])}),a},n=function(a){var o=a.options,s=o.yField,l=o.children,c=o.data;if(YO(c))return a;var u=Dn(Zr(c,[0]))?c:[c,c];return l.forEach(function(f,d){on(f,"data",Jhe([],u[d].map(function(h){return w0({groupKey:s[d]},h)}),!0))}),a},r=function(a){var o=a.options,s=o.yField,l=s[0],c=s[1],u=o.tooltip;return u||on(o,"tooltip",{items:[{field:l,value:l},{field:c,value:c}]}),a},i=function(a){var o=a.options,s=o.children,l=o.layout,c=o.coordinate.transform,u=o.paddingBottom,f=u===void 0?s8:u,d=o.paddingLeft,h=d===void 0?s8:d,p=o.axis;on(o,"axisText",w0(w0({},(p==null?void 0:p.x)||{}),{layout:l}));var v=s[0],g=s[1];if(l==="vertical")on(o,"direction","col"),on(o,"paddingLeft",h),on(o,"coordinate.transform",c.filter(function(O){return O.type!=="transpose"})),on(v,"paddingBottom",o8),on(g,"paddingTop",o8),on(g,"axis",{x:{position:"top"}}),on(g,"scale",{y:{range:[0,1]}});else{on(o,"paddingBottom",f),on(v,"scale",{y:{range:[0,1]}});var m=v.paddingRight,b=m===void 0?qO:m,_=g.paddingLeft,S=_===void 0?qO:_;on(v,"paddingRight",b),on(v,"axis",{x:{position:"right"}}),on(g,"paddingLeft",S)}return a};return Ar(t,n,r,i,ji,Dr)(e)}var epe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tpe=function(e){epe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="BidirectionalBar",n}return t.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"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Qhe},t}(Cr),tf;(function(e){e.color="key",e.d="path"})(tf||(tf={}));function npe(e){var t=function(n){var r=n.options,i=r.data,a=r.setsField,o=r.sizeField;return Dn(i)&&(on(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[tf.color,tf.d]}]}),on(r,"colorField",a),on(r,["children","0","encode","d"],tf.d)),on(n,"options",tC(r,["sizeField","setsField"])),n};return Ar(t,Dr)(e)}var rpe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ipe=function(e){rpe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="venn",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:tf.color,d:tf.d}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return npe},t}(Cr);function ape(e){var t=function(n){return n};return Ar(t,Dr)(e)}var ope=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),spe=function(e){ope(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Sunburst",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return ape},t}(Cr),lpe={Base:Rue,Line:jfe,Column:Pfe,Pie:Bfe,Area:wfe,Bar:Cfe,DualAxes:b8,Funnel:Lfe,Scatter:$fe,Radar:Hfe,Rose:xde,Stock:nde,TinyLine:ade,TinyArea:lde,TinyColumn:fde,TinyProgress:pde,TinyRing:mde,Waterfall:Ode,Histogram:ahe,Heatmap:lhe,Box:fhe,Sankey:phe,Bullet:Ahe,Gauge:Lhe,Liquid:jhe,WordCloud:Bhe,Treemap:$he,RadialBar:Hhe,CirclePacking:Uhe,Violin:qhe,BidirectionalBar:tpe,Venn:ipe,Mix:b8,Sunburst:spe},uC=function(){return uC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},uC.apply(this,arguments)},M8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},cpe=(0,Qe.forwardRef)(function(e,t){var n=e.chartType,r=n===void 0?"Base":n,i=M8(e,["chartType"]),a=i.containerStyle,o=a===void 0?{height:"inherit"}:a,s=i.containerAttributes,l=s===void 0?{}:s,c=i.className,u=i.loading,f=i.loadingTemplate,d=i.errorTemplate,h=M8(i,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate"]),p=Mx(lpe[r],h),v=p.chart,g=p.container;return(0,Qe.useImperativeHandle)(t,function(){return v.current}),Qe.createElement(ii,{errorTemplate:d},u&&Qe.createElement(Oi,{loadingTemplate:f}),Qe.createElement("div",uC({className:c,style:o,ref:g},l)))}),fC=function(){return fC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fC.apply(this,arguments)},upe=function(e){return Qe.createElement(cpe,fC({},e,{chartType:"Column"}))},fpe=upe},31847:function(jn,Kn,Y){"use strict";Y.d(Kn,{Z:function(){return Yr}});var se=Y(4942),me=Y(1413),wt=Y(91),_t=Y(28459),ne=Y(93967),Qe=Y.n(ne),j=Y(67294),Xe=Y(71002),we=Y(97685),D=Y(87462),gt=Y(50756),St=Y(86500),Fe=Y(1350),Ne=2,Be=.16,Re=.05,rt=.05,Xt=.15,ln=5,rr=4,Zn=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function qn(pe){var X=pe.r,Me=pe.g,ze=pe.b,Nt=(0,St.py)(X,Me,ze);return{h:Nt.h*360,s:Nt.s,v:Nt.v}}function cn(pe){var X=pe.r,Me=pe.g,ze=pe.b;return"#".concat((0,St.vq)(X,Me,ze,!1))}function In(pe,X,Me){var ze=Me/100,Nt={r:(X.r-pe.r)*ze+pe.r,g:(X.g-pe.g)*ze+pe.g,b:(X.b-pe.b)*ze+pe.b};return Nt}function ir(pe,X,Me){var ze;return Math.round(pe.h)>=60&&Math.round(pe.h)<=240?ze=Me?Math.round(pe.h)-Ne*X:Math.round(pe.h)+Ne*X:ze=Me?Math.round(pe.h)+Ne*X:Math.round(pe.h)-Ne*X,ze<0?ze+=360:ze>=360&&(ze-=360),ze}function dr(pe,X,Me){if(pe.h===0&&pe.s===0)return pe.s;var ze;return Me?ze=pe.s-Be*X:X===rr?ze=pe.s+Be:ze=pe.s+Re*X,ze>1&&(ze=1),Me&&X===ln&&ze>.1&&(ze=.1),ze<.06&&(ze=.06),Number(ze.toFixed(2))}function Vt(pe,X,Me){var ze;return Me?ze=pe.v+rt*X:ze=pe.v-Xt*X,ze>1&&(ze=1),Number(ze.toFixed(2))}function Kt(pe){for(var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Me=[],ze=(0,Fe.uA)(pe),Nt=ln;Nt>0;Nt-=1){var nn=qn(ze),Sn=cn((0,Fe.uA)({h:ir(nn,Nt,!0),s:dr(nn,Nt,!0),v:Vt(nn,Nt,!0)}));Me.push(Sn)}Me.push(cn(ze));for(var rn=1;rn<=rr;rn+=1){var bn=qn(ze),dn=cn((0,Fe.uA)({h:ir(bn,rn),s:dr(bn,rn),v:Vt(bn,rn)}));Me.push(dn)}return X.theme==="dark"?Zn.map(function(Fn){var fn=Fn.index,kn=Fn.opacity,Lr=cn(In((0,Fe.uA)(X.backgroundColor||"#141414"),(0,Fe.uA)(Me[fn]),kn*100));return Lr}):Me}var Hr={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},er={},Oi={};Object.keys(Hr).forEach(function(pe){er[pe]=Kt(Hr[pe]),er[pe].primary=er[pe][5],Oi[pe]=Kt(Hr[pe],{theme:"dark",backgroundColor:"#141414"}),Oi[pe].primary=Oi[pe][5]});var $n=er.red,ii=er.volcano,Ui=er.gold,Ha=er.orange,ao=er.yellow,So=er.lime,pi=er.green,_a=er.cyan,un=er.blue,It=er.geekblue,wn=er.purple,Wn=er.magenta,Fr=er.grey,vi=er.grey,Xi=(0,j.createContext)({}),oo=Xi,Fi=Y(44958),so=Y(27571),lo=Y(80334);function Oo(pe){return pe.replace(/-(.)/g,function(X,Me){return Me.toUpperCase()})}function Pi(pe,X){(0,lo.ZP)(pe,"[@ant-design/icons] ".concat(X))}function da(pe){return(0,Xe.Z)(pe)==="object"&&typeof pe.name=="string"&&typeof pe.theme=="string"&&((0,Xe.Z)(pe.icon)==="object"||typeof pe.icon=="function")}function Co(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(pe).reduce(function(X,Me){var ze=pe[Me];switch(Me){case"class":X.className=ze,delete X.class;break;default:delete X[Me],X[Oo(Me)]=ze}return X},{})}function Rr(pe,X,Me){return Me?j.createElement(pe.tag,(0,me.Z)((0,me.Z)({key:X},Co(pe.attrs)),Me),(pe.children||[]).map(function(ze,Nt){return Rr(ze,"".concat(X,"-").concat(pe.tag,"-").concat(Nt))})):j.createElement(pe.tag,(0,me.Z)({key:X},Co(pe.attrs)),(pe.children||[]).map(function(ze,Nt){return Rr(ze,"".concat(X,"-").concat(pe.tag,"-").concat(Nt))}))}function wa(pe){return Kt(pe)[0]}function gr(pe){return pe?Array.isArray(pe)?pe:[pe]:[]}var cs={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ha=`
|
|
.anticon {
|
|
display: inline-flex;
|
|
alignItems: center;
|
|
color: inherit;
|
|
font-style: normal;
|
|
line-height: 0;
|
|
text-align: center;
|
|
text-transform: none;
|
|
vertical-align: -0.125em;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
.anticon > * {
|
|
line-height: 1;
|
|
}
|
|
|
|
.anticon svg {
|
|
display: inline-block;
|
|
}
|
|
|
|
.anticon::before {
|
|
display: none;
|
|
}
|
|
|
|
.anticon .anticon-icon {
|
|
display: block;
|
|
}
|
|
|
|
.anticon[tabindex] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anticon-spin::before,
|
|
.anticon-spin {
|
|
display: inline-block;
|
|
-webkit-animation: loadingCircle 1s infinite linear;
|
|
animation: loadingCircle 1s infinite linear;
|
|
}
|
|
|
|
@-webkit-keyframes loadingCircle {
|
|
100% {
|
|
-webkit-transform: rotate(360deg);
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@keyframes loadingCircle {
|
|
100% {
|
|
-webkit-transform: rotate(360deg);
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
`,Ho=function(X){var Me=(0,j.useContext)(oo),ze=Me.csp,Nt=Me.prefixCls,nn=ha;Nt&&(nn=nn.replace(/anticon/g,Nt)),(0,j.useEffect)(function(){var Sn=X.current,rn=(0,so.A)(Sn);(0,Fi.hq)(nn,"@ant-design-icons",{prepend:!0,csp:ze,attachTo:rn})},[])},Yo=["icon","className","onClick","style","primaryColor","secondaryColor"],Sa={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Na(pe){var X=pe.primaryColor,Me=pe.secondaryColor;Sa.primaryColor=X,Sa.secondaryColor=Me||wa(X),Sa.calculated=!!Me}function pa(){return(0,me.Z)({},Sa)}var ka=function(X){var Me=X.icon,ze=X.className,Nt=X.onClick,nn=X.style,Sn=X.primaryColor,rn=X.secondaryColor,bn=(0,wt.Z)(X,Yo),dn=j.useRef(),Fn=Sa;if(Sn&&(Fn={primaryColor:Sn,secondaryColor:rn||wa(Sn)}),Ho(dn),Pi(da(Me),"icon should be icon definiton, but got ".concat(Me)),!da(Me))return null;var fn=Me;return fn&&typeof fn.icon=="function"&&(fn=(0,me.Z)((0,me.Z)({},fn),{},{icon:fn.icon(Fn.primaryColor,Fn.secondaryColor)})),Rr(fn.icon,"svg-".concat(fn.name),(0,me.Z)((0,me.Z)({className:ze,onClick:Nt,style:nn,"data-icon":fn.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},bn),{},{ref:dn}))};ka.displayName="IconReact",ka.getTwoToneColors=pa,ka.setTwoToneColors=Na;var Dn=ka;function hr(pe){var X=gr(pe),Me=(0,we.Z)(X,2),ze=Me[0],Nt=Me[1];return Dn.setTwoToneColors({primaryColor:ze,secondaryColor:Nt})}function Ci(){var pe=Dn.getTwoToneColors();return pe.calculated?[pe.primaryColor,pe.secondaryColor]:pe.primaryColor}var Eo=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];hr(un.primary);var sa=j.forwardRef(function(pe,X){var Me=pe.className,ze=pe.icon,Nt=pe.spin,nn=pe.rotate,Sn=pe.tabIndex,rn=pe.onClick,bn=pe.twoToneColor,dn=(0,wt.Z)(pe,Eo),Fn=j.useContext(oo),fn=Fn.prefixCls,kn=fn===void 0?"anticon":fn,Lr=Fn.rootClassName,Qi=Qe()(Lr,kn,(0,se.Z)((0,se.Z)({},"".concat(kn,"-").concat(ze.name),!!ze.name),"".concat(kn,"-spin"),!!Nt||ze.name==="loading"),Me),Ba=Sn;Ba===void 0&&rn&&(Ba=-1);var yi=nn?{msTransform:"rotate(".concat(nn,"deg)"),transform:"rotate(".concat(nn,"deg)")}:void 0,mr=gr(bn),Ma=(0,we.Z)(mr,2),ea=Ma[0],Zi=Ma[1];return j.createElement("span",(0,D.Z)({role:"img","aria-label":ze.name},dn,{ref:X,tabIndex:Ba,onClick:rn,className:Qi}),j.createElement(Dn,{icon:ze,primaryColor:ea,secondaryColor:Zi,style:yi}))});sa.displayName="AntdIcon",sa.getTwoToneColor=Ci,sa.setTwoToneColor=hr;var Oa=sa,Ir=function(X,Me){return j.createElement(Oa,(0,D.Z)({},X,{ref:Me,icon:gt.Z}))},Ei=j.forwardRef(Ir),Vo=Ei,Ca=Y(48874),Gn=Y(13169),pr=Y(25378),gi=Y(97435),ai=Y(21770),Ln=Y(98082),lr=function(X){var Me=X.componentCls,ze=X.antCls;return(0,se.Z)({},"".concat(Me,"-actions"),(0,se.Z)((0,se.Z)({marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0,listStyle:"none",display:"flex",gap:X.marginXS,background:X.colorBgContainer,borderBlockStart:"".concat(X.lineWidth,"px ").concat(X.lineType," ").concat(X.colorSplit),minHeight:42},"& > *",{alignItems:"center",justifyContent:"center",flex:1,display:"flex",cursor:"pointer",color:X.colorTextSecondary,transition:"color 0.3s","&:hover":{color:X.colorPrimaryHover}}),"& > li > div",{flex:1,width:"100%",marginBlock:X.marginSM,marginInline:0,color:X.colorTextSecondary,textAlign:"center",a:{color:X.colorTextSecondary,transition:"color 0.3s","&:hover":{color:X.colorPrimaryHover}},div:(0,se.Z)((0,se.Z)({position:"relative",display:"block",minWidth:32,fontSize:X.fontSize,lineHeight:X.lineHeight,cursor:"pointer","&:hover":{color:X.colorPrimaryHover,transition:"color 0.3s"}},"a:not(".concat(ze,`-btn),
|
|
> .anticon`),{display:"inline-block",width:"100%",color:X.colorTextSecondary,lineHeight:"22px",transition:"color 0.3s","&:hover":{color:X.colorPrimaryHover}}),".anticon",{fontSize:X.cardActionIconSize,lineHeight:"22px"}),"&:not(:last-child)":{borderInlineEnd:"".concat(X.lineWidth,"px ").concat(X.lineType," ").concat(X.colorSplit)}}))};function Mr(pe){return(0,Ln.Xj)("ProCardActions",function(X){var Me=(0,me.Z)((0,me.Z)({},X),{},{componentCls:".".concat(pe),cardActionIconSize:16});return[lr(Me)]})}var Rt=Y(85893),Mo=function(X){var Me=X.actions,ze=X.prefixCls,Nt=Mr(ze),nn=Nt.wrapSSR,Sn=Nt.hashId;return Array.isArray(Me)&&Me!==null&&Me!==void 0&&Me.length?nn((0,Rt.jsx)("ul",{className:Qe()("".concat(ze,"-actions"),Sn),children:Me.map(function(rn,bn){return(0,Rt.jsx)("li",{style:{width:"".concat(100/Me.length,"%"),padding:0,margin:0},className:Qe()("".concat(ze,"-actions-item"),Sn),children:rn},"action-".concat(bn))})})):nn((0,Rt.jsx)("ul",{className:Qe()("".concat(ze,"-actions"),Sn),children:Me}))},Q=Mo,Uo=Y(71230),Ya=Y(15746),ja=Y(54548),Ki=new ja.E4("card-loading",{"0%":{backgroundPosition:"0 50%"},"50%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Hn=function(X){return(0,se.Z)({},X.componentCls,(0,se.Z)((0,se.Z)({"&-loading":{overflow:"hidden"},"&-loading &-body":{userSelect:"none"}},"".concat(X.componentCls,"-loading-content"),{width:"100%",p:{marginBlock:0,marginInline:0}}),"".concat(X.componentCls,"-loading-block"),{height:"14px",marginBlock:"4px",background:"linear-gradient(90deg, rgba(54, 61, 64, 0.2), rgba(54, 61, 64, 0.4), rgba(54, 61, 64, 0.2))",backgroundSize:"600% 600%",borderRadius:X.borderRadius,animationName:Ki,animationDuration:"1.4s",animationTimingFunction:"ease",animationIterationCount:"infinite"}))};function nu(pe){return(0,Ln.Xj)("ProCardLoading",function(X){var Me=(0,me.Z)((0,me.Z)({},X),{},{componentCls:".".concat(pe)});return[Hn(Me)]})}var Is=function(X){var Me=X.style,ze=X.prefix,Nt=nu(ze||"ant-pro-card"),nn=Nt.wrapSSR;return nn((0,Rt.jsxs)("div",{className:"".concat(ze,"-loading-content"),style:Me,children:[(0,Rt.jsx)(Uo.Z,{gutter:8,children:(0,Rt.jsx)(Ya.Z,{span:22,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})})}),(0,Rt.jsxs)(Uo.Z,{gutter:8,children:[(0,Rt.jsx)(Ya.Z,{span:8,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})}),(0,Rt.jsx)(Ya.Z,{span:15,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})})]}),(0,Rt.jsxs)(Uo.Z,{gutter:8,children:[(0,Rt.jsx)(Ya.Z,{span:6,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})}),(0,Rt.jsx)(Ya.Z,{span:18,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})})]}),(0,Rt.jsxs)(Uo.Z,{gutter:8,children:[(0,Rt.jsx)(Ya.Z,{span:13,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})}),(0,Rt.jsx)(Ya.Z,{span:9,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})})]}),(0,Rt.jsxs)(Uo.Z,{gutter:8,children:[(0,Rt.jsx)(Ya.Z,{span:4,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})}),(0,Rt.jsx)(Ya.Z,{span:3,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})}),(0,Rt.jsx)(Ya.Z,{span:16,children:(0,Rt.jsx)("div",{className:"".concat(ze,"-loading-block")})})]})]}))},Ls=Is,us=Y(50344),nc=Y(34155),Xs=["tab","children"],fs=null;function ru(pe){return pe.filter(function(X){return X})}function iu(pe,X,Me){if(pe)return pe.map(function(Nt){return(0,me.Z)((0,me.Z)({},Nt),{},{children:(0,Rt.jsx)(be,(0,me.Z)((0,me.Z)({},Me==null?void 0:Me.cardProps),{},{children:Nt.children}))})});(0,lo.ET)(!Me,"Tabs.TabPane is deprecated. Please use `items` directly.");var ze=(0,us.Z)(X).map(function(Nt){if(j.isValidElement(Nt)){var nn=Nt.key,Sn=Nt.props,rn=Sn||{},bn=rn.tab,dn=rn.children,Fn=(0,wt.Z)(rn,Xs),fn=(0,me.Z)((0,me.Z)({key:String(nn)},Fn),{},{children:(0,Rt.jsx)(be,(0,me.Z)((0,me.Z)({},Me==null?void 0:Me.cardProps),{},{children:dn})),label:bn});return fn}return null});return ru(ze)}var af=function(X){var Me=useContext(ConfigProvider.ConfigContext),ze=Me.getPrefixCls;if(version.startsWith("5"))return _jsx(_Fragment,{});var Nt=X.key,nn=X.tab,Sn=X.tabKey,rn=X.disabled,bn=X.destroyInactiveTabPane,dn=X.children,Fn=X.className,fn=X.style,kn=X.cardProps,Lr=_objectWithoutProperties(X,fs),Qi=ze("pro-card-tabpane"),Ba=classNames(Qi,Fn);return _jsx(Tabs.TabPane,_objectSpread(_objectSpread({tabKey:Sn,tab:nn,className:Ba,style:fn,disabled:rn,destroyInactiveTabPane:bn},Lr),{},{children:_jsx(Card,_objectSpread(_objectSpread({},kn),{},{children:dn}))}),Nt)},ds=null,rc=function(X){return{backgroundColor:X.controlItemBgActive,borderColor:X.controlOutline}},la=function(X){var Me=X.componentCls;return(0,se.Z)((0,se.Z)((0,se.Z)({},Me,(0,me.Z)((0,me.Z)({position:"relative",display:"flex",flexDirection:"column",boxSizing:"border-box",width:"100%",marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0,backgroundColor:X.colorBgContainer,borderRadius:X.borderRadius},Ln.Wf===null||Ln.Wf===void 0?void 0:(0,Ln.Wf)(X)),{},(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({"&-box-shadow":{boxShadow:"0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017",borderColor:"transparent"},"&-col":{width:"100%"},"&-border":{border:"".concat(X.lineWidth,"px ").concat(X.lineType," ").concat(X.colorSplit)},"&-hoverable":(0,se.Z)({cursor:"pointer",transition:"box-shadow 0.3s, border-color 0.3s","&:hover":{borderColor:"transparent",boxShadow:"0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017"}},"&".concat(Me,"-checked:hover"),{borderColor:X.controlOutline}),"&-checked":(0,me.Z)((0,me.Z)({},rc(X)),{},{"&::after":{position:"absolute",insetBlockStart:2,insetInlineEnd:2,width:0,height:0,border:"6px solid ".concat(X.colorPrimary),borderBlockEnd:"6px solid transparent",borderInlineStart:"6px solid transparent",borderStartEndRadius:2,content:'""'}}),"&:focus":(0,me.Z)({},rc(X)),"&&-ghost":(0,se.Z)({backgroundColor:"transparent"},"> ".concat(Me),{"&-header":{paddingInlineEnd:0,paddingBlockEnd:X.padding,paddingInlineStart:0},"&-body":{paddingBlock:0,paddingInline:0,backgroundColor:"transparent"}}),"&&-split > &-body":{paddingBlock:0,paddingInline:0},"&&-contain-card > &-body":{display:"flex"}},"".concat(Me,"-body-direction-column"),{flexDirection:"column"}),"".concat(Me,"-body-wrap"),{flexWrap:"wrap"}),"&&-collapse",(0,se.Z)({},"> ".concat(Me),{"&-header":{paddingBlockEnd:X.padding,borderBlockEnd:0},"&-body":{display:"none"}})),"".concat(Me,"-header"),{display:"flex",alignItems:"center",justifyContent:"space-between",paddingInline:X.paddingLG,paddingBlock:X.padding,paddingBlockEnd:0,"&-border":{"&":{paddingBlockEnd:X.padding},borderBlockEnd:"".concat(X.lineWidth,"px ").concat(X.lineType," ").concat(X.colorSplit)},"&-collapsible":{cursor:"pointer"}}),"".concat(Me,"-title"),{color:X.colorText,fontWeight:500,fontSize:X.fontSizeLG,lineHeight:X.lineHeight}),"".concat(Me,"-extra"),{color:X.colorText}),"".concat(Me,"-type-inner"),(0,se.Z)({},"".concat(Me,"-header"),{backgroundColor:X.colorFillAlter})),"".concat(Me,"-collapsible-icon"),{marginInlineEnd:X.marginXS,color:X.colorIconHover,":hover":{color:X.colorPrimaryHover},"& svg":{transition:"transform ".concat(X.motionDurationMid)}}),"".concat(Me,"-body"),{display:"block",boxSizing:"border-box",height:"100%",paddingInline:X.paddingLG,paddingBlock:X.padding,"&-center":{display:"flex",alignItems:"center",justifyContent:"center"}}),"&&-size-small",(0,se.Z)((0,se.Z)({},Me,{"&-header":{paddingInline:X.paddingSM,paddingBlock:X.paddingXS,paddingBlockEnd:0,"&-border":{paddingBlockEnd:X.paddingXS}},"&-title":{fontSize:X.fontSize},"&-body":{paddingInline:X.paddingSM,paddingBlock:X.paddingSM}}),"".concat(Me,"-header").concat(Me,"-header-collapsible"),{paddingBlock:X.paddingXS})))),"".concat(Me,"-col"),(0,se.Z)((0,se.Z)({},"&".concat(Me,"-split-vertical"),{borderInlineEnd:"".concat(X.lineWidth,"px ").concat(X.lineType," ").concat(X.colorSplit)}),"&".concat(Me,"-split-horizontal"),{borderBlockEnd:"".concat(X.lineWidth,"px ").concat(X.lineType," ").concat(X.colorSplit)})),"".concat(Me,"-tabs"),(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(X.antCls,"-tabs-top > ").concat(X.antCls,"-tabs-nav"),(0,se.Z)({marginBlockEnd:0},"".concat(X.antCls,"-tabs-nav-list"),{marginBlockStart:X.marginXS,paddingInlineStart:X.padding})),"".concat(X.antCls,"-tabs-bottom > ").concat(X.antCls,"-tabs-nav"),(0,se.Z)({marginBlockEnd:0},"".concat(X.antCls,"-tabs-nav-list"),{paddingInlineStart:X.padding})),"".concat(X.antCls,"-tabs-left"),(0,se.Z)({},"".concat(X.antCls,"-tabs-content-holder"),(0,se.Z)({},"".concat(X.antCls,"-tabs-content"),(0,se.Z)({},"".concat(X.antCls,"-tabs-tabpane"),{paddingInlineStart:0})))),"".concat(X.antCls,"-tabs-left > ").concat(X.antCls,"-tabs-nav"),(0,se.Z)({marginInlineEnd:0},"".concat(X.antCls,"-tabs-nav-list"),{paddingBlockStart:X.padding})),"".concat(X.antCls,"-tabs-right"),(0,se.Z)({},"".concat(X.antCls,"-tabs-content-holder"),(0,se.Z)({},"".concat(X.antCls,"-tabs-content"),(0,se.Z)({},"".concat(X.antCls,"-tabs-tabpane"),{paddingInlineStart:0})))),"".concat(X.antCls,"-tabs-right > ").concat(X.antCls,"-tabs-nav"),(0,se.Z)({},"".concat(X.antCls,"-tabs-nav-list"),{paddingBlockStart:X.padding})))},qi=24,B=function(X,Me){var ze=Me.componentCls;return X===0?(0,se.Z)({},"".concat(ze,"-col-0"),{display:"none"}):(0,se.Z)({},"".concat(ze,"-col-").concat(X),{flexShrink:0,width:"".concat(X/qi*100,"%")})},$=function(X){return Array(qi+1).fill(1).map(function(Me,ze){return B(ze,X)})};function K(pe){return(0,Ln.Xj)("ProCard",function(X){var Me=(0,me.Z)((0,me.Z)({},X),{},{componentCls:".".concat(pe)});return[la(Me),$(Me)]})}var te=["className","style","bodyStyle","headStyle","title","subTitle","extra","wrap","layout","loading","gutter","tooltip","split","headerBordered","bordered","boxShadow","children","size","actions","ghost","hoverable","direction","collapsed","collapsible","collapsibleIconRender","defaultCollapsed","onCollapse","checked","onChecked","tabs","type"],ge=j.forwardRef(function(pe,X){var Me,ze=pe.className,Nt=pe.style,nn=pe.bodyStyle,Sn=pe.headStyle,rn=pe.title,bn=pe.subTitle,dn=pe.extra,Fn=pe.wrap,fn=Fn===void 0?!1:Fn,kn=pe.layout,Lr=pe.loading,Qi=pe.gutter,Ba=Qi===void 0?0:Qi,yi=pe.tooltip,mr=pe.split,Ma=pe.headerBordered,ea=Ma===void 0?!1:Ma,Zi=pe.bordered,ga=Zi===void 0?!1:Zi,za=pe.boxShadow,wl=za===void 0?!1:za,ks=pe.children,Js=pe.size,hs=pe.actions,js=pe.ghost,Ro=js===void 0?!1:js,Sl=pe.hoverable,lu=Sl===void 0?!1:Sl,ic=pe.direction,uo=pe.collapsed,cf=pe.collapsible,Ol=cf===void 0?!1:cf,uf=pe.collapsibleIconRender,ac=pe.defaultCollapsed,Xd=ac===void 0?!1:ac,ff=pe.onCollapse,Kd=pe.checked,oc=pe.onChecked,ps=pe.tabs,Ua=pe.type,Qs=(0,wt.Z)(pe,te),df=(0,j.useContext)(_t.ZP.ConfigContext),cu=df.getPrefixCls,sc=(0,pr.Z)()||{lg:!0,md:!0,sm:!0,xl:!1,xs:!1,xxl:!1},uu=(0,ai.Z)(Xd,{value:uo,onChange:ff}),hf=(0,we.Z)(uu,2),Cl=hf[0],Io=hf[1],$i=["xxl","xl","lg","md","sm","xs"],lc=iu(ps==null?void 0:ps.items,ks,ps),qd=function(bi){var Ti=[0,0],Xo=Array.isArray(bi)?bi:[bi,0];return Xo.forEach(function(Pa,Lo){if((0,Xe.Z)(Pa)==="object")for(var Pl=0;Pl<$i.length;Pl+=1){var Tl=$i[Pl];if(sc[Tl]&&Pa[Tl]!==void 0){Ti[Lo]=Pa[Tl];break}}else Ti[Lo]=Pa||0}),Ti},Ds=function(bi,Ti){return bi?Ti:{}},El=function(bi){var Ti=bi;if((0,Xe.Z)(bi)==="object")for(var Xo=0;Xo<$i.length;Xo+=1){var Pa=$i[Xo];if(sc!=null&&sc[Pa]&&(bi==null?void 0:bi[Pa])!==void 0){Ti=bi[Pa];break}}var Lo=Ds(typeof Ti=="string"&&/\d%|\dpx/i.test(Ti),{width:Ti,flexShrink:0});return{span:Ti,colSpanStyle:Lo}},xr=cu("pro-card"),pf=K(xr),vf=pf.wrapSSR,Xa=pf.hashId,Jd=qd(Ba),gf=(0,we.Z)(Jd,2),cc=gf[0],uc=gf[1],fu=!1,fc=j.Children.toArray(ks),Qd=fc.map(function(Wi,bi){var Ti;if(Wi!=null&&(Ti=Wi.type)!==null&&Ti!==void 0&&Ti.isProCard){fu=!0;var Xo=Wi.props.colSpan,Pa=El(Xo),Lo=Pa.span,Pl=Pa.colSpanStyle,Tl=Qe()(["".concat(xr,"-col")],Xa,(0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(xr,"-split-vertical"),mr==="vertical"&&bi!==fc.length-1),"".concat(xr,"-split-horizontal"),mr==="horizontal"&&bi!==fc.length-1),"".concat(xr,"-col-").concat(Lo),typeof Lo=="number"&&Lo>=0&&Lo<=24)),yf=vf((0,Rt.jsx)("div",{style:(0,me.Z)((0,me.Z)((0,me.Z)({},Pl),Ds(cc>0,{paddingInlineEnd:cc/2,paddingInlineStart:cc/2})),Ds(uc>0,{paddingBlockStart:uc/2,paddingBlockEnd:uc/2})),className:Tl,children:j.cloneElement(Wi)}));return j.cloneElement(yf,{key:"pro-card-col-".concat((Wi==null?void 0:Wi.key)||bi)})}return Wi}),eh=Qe()("".concat(xr),ze,Xa,(Me={},(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)(Me,"".concat(xr,"-border"),ga),"".concat(xr,"-box-shadow"),wl),"".concat(xr,"-contain-card"),fu),"".concat(xr,"-loading"),Lr),"".concat(xr,"-split"),mr==="vertical"||mr==="horizontal"),"".concat(xr,"-ghost"),Ro),"".concat(xr,"-hoverable"),lu),"".concat(xr,"-size-").concat(Js),Js),"".concat(xr,"-type-").concat(Ua),Ua),"".concat(xr,"-collapse"),Cl),(0,se.Z)(Me,"".concat(xr,"-checked"),Kd))),Ml=Qe()("".concat(xr,"-body"),Xa,(0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(xr,"-body-center"),kn==="center"),"".concat(xr,"-body-direction-column"),mr==="horizontal"||ic==="column"),"".concat(xr,"-body-wrap"),fn&&fu)),th=nn,mf=j.isValidElement(Lr)?Lr:(0,Rt.jsx)(Ls,{prefix:xr,style:(nn==null?void 0:nn.padding)===0||(nn==null?void 0:nn.padding)==="0px"?{padding:24}:void 0}),dc=Ol&&uo===void 0&&(uf?uf({collapsed:Cl}):(0,Rt.jsx)(Vo,{rotate:Cl?void 0:90,className:"".concat(xr,"-collapsible-icon ").concat(Xa).trim()}));return vf((0,Rt.jsxs)("div",(0,me.Z)((0,me.Z)({className:eh,style:Nt,ref:X,onClick:function(bi){var Ti;oc==null||oc(bi),Qs==null||(Ti=Qs.onClick)===null||Ti===void 0||Ti.call(Qs,bi)}},(0,gi.Z)(Qs,["prefixCls","colSpan"])),{},{children:[(rn||dn||dc)&&(0,Rt.jsxs)("div",{className:Qe()("".concat(xr,"-header"),Xa,(0,se.Z)((0,se.Z)({},"".concat(xr,"-header-border"),ea||Ua==="inner"),"".concat(xr,"-header-collapsible"),dc)),style:Sn,onClick:function(){dc&&Io(!Cl)},children:[(0,Rt.jsxs)("div",{className:"".concat(xr,"-title ").concat(Xa).trim(),children:[dc,(0,Rt.jsx)(Ca.G,{label:rn,tooltip:yi,subTitle:bn})]}),dn&&(0,Rt.jsx)("div",{className:"".concat(xr,"-extra ").concat(Xa).trim(),onClick:function(bi){return bi.stopPropagation()},children:dn})]}),ps?(0,Rt.jsx)("div",{className:"".concat(xr,"-tabs ").concat(Xa).trim(),children:(0,Rt.jsx)(Gn.Z,(0,me.Z)((0,me.Z)({onChange:ps.onChange},ps),{},{items:lc,children:Lr?mf:ks}))}):(0,Rt.jsx)("div",{className:Ml,style:th,children:Lr?mf:Qd}),hs?(0,Rt.jsx)(Q,{actions:hs,prefixCls:xr}):null]})))}),be=ge,ae=function(X){var Me=X.componentCls;return(0,se.Z)({},Me,{"&-divider":{flex:"none",width:X.lineWidth,marginInline:X.marginXS,marginBlock:X.marginLG,backgroundColor:X.colorSplit,"&-horizontal":{width:"initial",height:X.lineWidth,marginInline:X.marginLG,marginBlock:X.marginXS}},"&&-size-small &-divider":{marginBlock:X.marginLG,marginInline:X.marginXS,"&-horizontal":{marginBlock:X.marginXS,marginInline:X.marginLG}}})};function oe(pe){return(0,Ln.Xj)("ProCardDivider",function(X){var Me=(0,me.Z)((0,me.Z)({},X),{},{componentCls:".".concat(pe)});return[ae(Me)]})}var Ce=function(X){var Me=(0,j.useContext)(_t.ZP.ConfigContext),ze=Me.getPrefixCls,Nt=ze("pro-card"),nn="".concat(Nt,"-divider"),Sn=oe(Nt),rn=Sn.wrapSSR,bn=Sn.hashId,dn=X.className,Fn=X.style,fn=Fn===void 0?{}:Fn,kn=X.type,Lr=Qe()(nn,dn,bn,(0,se.Z)({},"".concat(nn,"-").concat(kn),kn));return rn((0,Rt.jsx)("div",{className:Lr,style:fn}))},Ee=Ce,Ot=function(X){return(0,se.Z)({},X.componentCls,{display:"flex",flexDirection:"column",justifyContent:"flex-end",marginBlock:X.marginLG,marginInline:0,color:X.colorText,fontWeight:"500",fontSize:"20px",lineHeight:"38px"})};function Et(pe){return(0,Ln.Xj)("ProCardOperation",function(X){var Me=(0,me.Z)((0,me.Z)({},X),{},{componentCls:".".concat(pe)});return[Ot(Me)]})}var Ht=function(X){var Me=X.className,ze=X.style,Nt=ze===void 0?{}:ze,nn=X.children,Sn=(0,j.useContext)(_t.ZP.ConfigContext),rn=Sn.getPrefixCls,bn=rn("pro-card-operation"),dn=Et(bn),Fn=dn.wrapSSR,fn=dn.hashId,kn=Qe()(bn,Me,fn);return Fn((0,Rt.jsx)("div",{className:kn,style:Nt,children:nn}))},mt=Ht,Lt=Y(36688),Dt=function(X,Me){return j.createElement(Oa,(0,D.Z)({},X,{ref:Me,icon:Lt.Z}))},ht=j.forwardRef(Dt),Jt=ht,Ft=Y(83062),tn=Y(40411),yt=Y(57838),qt=Y(96159),Nn=Y(64217),va=Y(53124),Ea=Y(99559),ca=pe=>{const{value:X,formatter:Me,precision:ze,decimalSeparator:Nt,groupSeparator:nn="",prefixCls:Sn}=pe;let rn;if(typeof Me=="function")rn=Me(X);else{const bn=String(X),dn=bn.match(/^(-?)(\d*)(\.(\d+))?$/);if(!dn||bn==="-")rn=bn;else{const Fn=dn[1];let fn=dn[2]||"0",kn=dn[4]||"";fn=fn.replace(/\B(?=(\d{3})+(?!\d))/g,nn),typeof ze=="number"&&(kn=kn.padEnd(ze,"0").slice(0,ze>0?ze:0)),kn&&(kn=`${Nt}${kn}`),rn=[j.createElement("span",{key:"int",className:`${Sn}-content-value-int`},Fn,fn),kn&&j.createElement("span",{key:"decimal",className:`${Sn}-content-value-decimal`},kn)]}}return j.createElement("span",{className:`${Sn}-content-value`},rn)},mi=Y(14747),zr=Y(91945),vr=Y(45503);const Da=pe=>{const{componentCls:X,marginXXS:Me,padding:ze,colorTextDescription:Nt,titleFontSize:nn,colorTextHeading:Sn,contentFontSize:rn,fontFamily:bn}=pe;return{[`${X}`]:Object.assign(Object.assign({},(0,mi.Wf)(pe)),{[`${X}-title`]:{marginBottom:Me,color:Nt,fontSize:nn},[`${X}-skeleton`]:{paddingTop:ze},[`${X}-content`]:{color:Sn,fontSize:rn,fontFamily:bn,[`${X}-content-value`]:{display:"inline-block",direction:"ltr"},[`${X}-content-prefix, ${X}-content-suffix`]:{display:"inline-block"},[`${X}-content-prefix`]:{marginInlineEnd:Me},[`${X}-content-suffix`]:{marginInlineStart:Me}}})}},_l=pe=>{const{fontSizeHeading3:X,fontSize:Me}=pe;return{titleFontSize:Me,contentFontSize:X}};var Va=(0,zr.I$)("Statistic",pe=>{const X=(0,vr.TS)(pe,{});return[Da(X)]},_l),Fa=function(pe,X){var Me={};for(var ze in pe)Object.prototype.hasOwnProperty.call(pe,ze)&&X.indexOf(ze)<0&&(Me[ze]=pe[ze]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nt=0,ze=Object.getOwnPropertySymbols(pe);Nt<ze.length;Nt++)X.indexOf(ze[Nt])<0&&Object.prototype.propertyIsEnumerable.call(pe,ze[Nt])&&(Me[ze[Nt]]=pe[ze[Nt]]);return Me},Po=pe=>{const{prefixCls:X,className:Me,rootClassName:ze,style:Nt,valueStyle:nn,value:Sn=0,title:rn,valueRender:bn,prefix:dn,suffix:Fn,loading:fn=!1,formatter:kn,precision:Lr,decimalSeparator:Qi=".",groupSeparator:Ba=",",onMouseEnter:yi,onMouseLeave:mr}=pe,Ma=Fa(pe,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:ea,direction:Zi,statistic:ga}=j.useContext(va.E_),za=ea("statistic",X),[wl,ks,Js]=Va(za),hs=j.createElement(ca,{decimalSeparator:Qi,groupSeparator:Ba,prefixCls:za,formatter:kn,precision:Lr,value:Sn}),js=Qe()(za,{[`${za}-rtl`]:Zi==="rtl"},ga==null?void 0:ga.className,Me,ze,ks,Js),Ro=(0,Nn.Z)(Ma,{aria:!0,data:!0});return wl(j.createElement("div",Object.assign({},Ro,{className:js,style:Object.assign(Object.assign({},ga==null?void 0:ga.style),Nt),onMouseEnter:yi,onMouseLeave:mr}),rn&&j.createElement("div",{className:`${za}-title`},rn),j.createElement(Ea.Z,{paragraph:!1,loading:fn,className:`${za}-skeleton`},j.createElement("div",{style:nn,className:`${za}-content`},dn&&j.createElement("span",{className:`${za}-content-prefix`},dn),bn?bn(hs):hs,Fn&&j.createElement("span",{className:`${za}-content-suffix`},Fn)))))};const To=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Ao(pe,X){let Me=pe;const ze=/\[[^\]]*]/g,Nt=(X.match(ze)||[]).map(bn=>bn.slice(1,-1)),nn=X.replace(ze,"[]"),Sn=To.reduce((bn,dn)=>{let[Fn,fn]=dn;if(bn.includes(Fn)){const kn=Math.floor(Me/fn);return Me-=kn*fn,bn.replace(new RegExp(`${Fn}+`,"g"),Lr=>{const Qi=Lr.length;return kn.toString().padStart(Qi,"0")})}return bn},nn);let rn=0;return Sn.replace(ze,()=>{const bn=Nt[rn];return rn+=1,bn})}function co(pe,X){const{format:Me=""}=X,ze=new Date(pe).getTime(),Nt=Date.now(),nn=Math.max(ze-Nt,0);return Ao(nn,Me)}var Wd=function(pe,X){var Me={};for(var ze in pe)Object.prototype.hasOwnProperty.call(pe,ze)&&X.indexOf(ze)<0&&(Me[ze]=pe[ze]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nt=0,ze=Object.getOwnPropertySymbols(pe);Nt<ze.length;Nt++)X.indexOf(ze[Nt])<0&&Object.prototype.propertyIsEnumerable.call(pe,ze[Nt])&&(Me[ze[Nt]]=pe[ze[Nt]]);return Me};const Gd=1e3/30;function au(pe){return new Date(pe).getTime()}const Hd=pe=>{const{value:X,format:Me="HH:mm:ss",onChange:ze,onFinish:Nt}=pe,nn=Wd(pe,["value","format","onChange","onFinish"]),Sn=(0,yt.Z)(),rn=j.useRef(null),bn=()=>{Nt==null||Nt(),rn.current&&(clearInterval(rn.current),rn.current=null)},dn=()=>{const kn=au(X);kn>=Date.now()&&(rn.current=setInterval(()=>{Sn(),ze==null||ze(kn-Date.now()),kn<Date.now()&&bn()},Gd))};j.useEffect(()=>(dn(),()=>{rn.current&&(clearInterval(rn.current),rn.current=null)}),[X]);const Fn=(kn,Lr)=>co(kn,Object.assign(Object.assign({},Lr),{format:Me})),fn=kn=>(0,qt.Tm)(kn,{title:void 0});return j.createElement(Po,Object.assign({},nn,{value:X,valueRender:fn,formatter:Fn}))};var Yd=j.memo(Hd);Po.Countdown=Yd;var of=Po,Vd=function(X){return(0,se.Z)({},X.componentCls,(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({display:"flex",fontSize:X.fontSize,"& + &":{marginBlockStart:4},"&-tip":{marginInlineStart:4},"&-wrapper":(0,se.Z)({display:"flex",width:"100%"},"".concat(X.componentCls,"-status"),{width:"14px"}),"&-icon":{marginInlineEnd:16},"&-trend-icon":{width:0,height:0,borderInlineEnd:"3.5px solid transparent",borderBlockEnd:"9px solid #000",borderInlineStart:"3.5px solid transparent","&-up":{transform:"rotate(0deg)"},"&-down":{transform:"rotate(180deg)"}},"&-content":(0,se.Z)({width:"100%"},"".concat(X.antCls,"-statistic-content"),{"&-value-int":{fontSize:X.fontSizeHeading3}}),"&-description":{width:"100%"}},"".concat(X.antCls,"-statistic-title"),{color:X.colorText}),"&-trend-up",(0,se.Z)({},"".concat(X.antCls,"-statistic-content"),(0,se.Z)({color:"#f5222d"},"".concat(X.componentCls,"-trend-icon"),{borderBlockEndColor:"#f5222d"}))),"&-trend-down",(0,se.Z)({},"".concat(X.antCls,"-statistic-content"),(0,se.Z)({color:"#389e0d"},"".concat(X.componentCls,"-trend-icon"),{borderBlockEndColor:"#52c41a"}))),"& &-layout-horizontal",(0,se.Z)((0,se.Z)((0,se.Z)({display:"flex",justifyContent:"space-between"},"".concat(X.antCls,"-statistic-title"),{marginBlockEnd:0}),"".concat(X.antCls,"-statistic-content-value"),{fontWeight:500}),"".concat(X.antCls,"-statistic-title,").concat(X.antCls,"-statistic-content,").concat(X.antCls,"-statistic-content-suffix,").concat(X.antCls,"-statistic-content-prefix,").concat(X.antCls,"-statistic-content-value-decimal"),{fontSize:X.fontSize})),"& &-layout-inline",(0,se.Z)((0,se.Z)((0,se.Z)({display:"inline-flex",color:X.colorTextSecondary},"".concat(X.antCls,"-statistic-title"),{marginInlineEnd:"6px",marginBlockEnd:0}),"".concat(X.antCls,"-statistic-content"),{color:X.colorTextSecondary}),"".concat(X.antCls,"-statistic-title,").concat(X.antCls,"-statistic-content,").concat(X.antCls,"-statistic-content-suffix,").concat(X.antCls,"-statistic-content-prefix,").concat(X.antCls,"-statistic-content-value-decimal"),{fontSize:X.fontSizeSM})))};function Ns(pe){return(0,Ln.Xj)("Statistic",function(X){var Me=(0,me.Z)((0,me.Z)({},X),{},{componentCls:".".concat(pe)});return[Vd(Me)]})}var ou=["className","layout","style","description","children","title","tip","status","trend","prefix","icon"],Ud=function(X){var Me=X.className,ze=X.layout,Nt=ze===void 0?"inline":ze,nn=X.style,Sn=X.description,rn=X.children,bn=X.title,dn=X.tip,Fn=X.status,fn=X.trend,kn=X.prefix,Lr=X.icon,Qi=(0,wt.Z)(X,ou),Ba=(0,j.useContext)(_t.ZP.ConfigContext),yi=Ba.getPrefixCls,mr=yi("pro-card-statistic"),Ma=Ns(mr),ea=Ma.wrapSSR,Zi=Ma.hashId,ga=Qe()(mr,Me,Zi),za=Qe()("".concat(mr,"-status"),Zi),wl=Qe()("".concat(mr,"-icon"),Zi),ks=Qe()("".concat(mr,"-wrapper"),Zi),Js=Qe()("".concat(mr,"-content"),Zi),hs=Qe()(Zi,(0,se.Z)((0,se.Z)({},"".concat(mr,"-layout-").concat(Nt),Nt),"".concat(mr,"-trend-").concat(fn),fn)),js=dn&&(0,Rt.jsx)(Ft.Z,{title:dn,children:(0,Rt.jsx)(Jt,{className:"".concat(mr,"-tip ").concat(Zi).trim()})}),Ro=Qe()("".concat(mr,"-trend-icon"),Zi,(0,se.Z)({},"".concat(mr,"-trend-icon-").concat(fn),fn)),Sl=fn&&(0,Rt.jsx)("div",{className:Ro}),lu=Fn&&(0,Rt.jsx)("div",{className:za,children:(0,Rt.jsx)(tn.Z,{status:Fn,text:null})}),ic=Lr&&(0,Rt.jsx)("div",{className:wl,children:Lr});return ea((0,Rt.jsxs)("div",{className:ga,style:nn,children:[ic,(0,Rt.jsxs)("div",{className:ks,children:[lu,(0,Rt.jsxs)("div",{className:Js,children:[(0,Rt.jsx)(of,(0,me.Z)({title:(bn||js)&&(0,Rt.jsxs)(Rt.Fragment,{children:[bn,js]}),prefix:(Sl||kn)&&(0,Rt.jsxs)(Rt.Fragment,{children:[Sl,kn]}),className:hs},Qi)),Sn&&(0,Rt.jsx)("div",{className:"".concat(mr,"-description ").concat(Zi).trim(),children:Sn})]})]})]}))},sf=Ud,lf=function(X){return(0,se.Z)({},X.componentCls,{"&-chart":{display:"flex",flexDirection:"column",marginBlockStart:8,marginBlockEnd:8,"&-left":{marginBlockStart:0,marginInlineEnd:"16px"},"&-right":{marginBlockStart:0,marginInlineStart:"16px"}},"&-content":{display:"flex",flexDirection:"column","&-horizontal":(0,se.Z)({flexDirection:"row"},"".concat(X.componentCls,"-chart"),{alignItems:"center",alignSelf:"flex-start"})},"&-footer":{marginBlockStart:8,paddingBlockStart:"16px",borderBlockStart:"rgba(0, 0, 0, 0.08) solid ".concat(X.colorBorder)}})};function Ks(pe){return(0,Ln.Xj)("StatisticCard",function(X){var Me=(0,me.Z)((0,me.Z)({},X),{},{componentCls:".".concat(pe)});return[lf(Me)]})}var qs=["children","statistic","className","chart","chartPlacement","footer"],Ji=function(X){var Me=X.children,ze=X.statistic,Nt=X.className,nn=X.chart,Sn=X.chartPlacement,rn=X.footer,bn=(0,wt.Z)(X,qs),dn=(0,j.useContext)(_t.ZP.ConfigContext),Fn=dn.getPrefixCls,fn=Fn("pro-statistic-card"),kn=Ks(fn),Lr=kn.wrapSSR,Qi=kn.hashId,Ba=Qe()(fn,Nt,Qi),yi=ze&&(0,Rt.jsx)(sf,(0,me.Z)({layout:"vertical"},ze)),mr=Qe()("".concat(fn,"-chart"),Qi,(0,se.Z)((0,se.Z)({},"".concat(fn,"-chart-left"),Sn==="left"&&nn&&ze),"".concat(fn,"-chart-right"),Sn==="right"&&nn&&ze)),Ma=nn&&(0,Rt.jsx)("div",{className:mr,children:nn}),ea=Qe()("".concat(fn,"-content "),Qi,(0,se.Z)({},"".concat(fn,"-content-horizontal"),Sn==="left"||Sn==="right")),Zi=(Ma||yi)&&(Sn==="left"?(0,Rt.jsxs)("div",{className:ea,children:[Ma,yi]}):(0,Rt.jsxs)("div",{className:ea,children:[yi,Ma]})),ga=rn&&(0,Rt.jsx)("div",{className:"".concat(fn,"-footer ").concat(Qi).trim(),children:rn});return Lr((0,Rt.jsxs)(be,(0,me.Z)((0,me.Z)({className:Ba},bn),{},{children:[Zi,Me,ga]})))},su=function(X){return(0,Rt.jsx)(Ji,(0,me.Z)({bodyStyle:{padding:0}},X))};Ji.Statistic=sf,Ji.Divider=Ee,Ji.Operation=mt,Ji.isProCard=!0,Ji.Group=su;var Yr=Ji},34540:function(jn,Kn,Y){"use strict";var se=Y(1413),me=Y(91),wt=Y(86190),_t=Y(67294),ne=Y(66758),Qe=Y(11911),j=Y(85893),Xe=["fieldProps","proFieldProps"],we="dateRange",D=_t.forwardRef(function(gt,St){var Fe=gt.fieldProps,Ne=gt.proFieldProps,Be=(0,me.Z)(gt,Xe),Re=(0,_t.useContext)(ne.Z);return(0,j.jsx)(Qe.Z,(0,se.Z)({ref:St,fieldProps:(0,se.Z)({getPopupContainer:Re.getPopupContainer},Fe),valueType:we,proFieldProps:Ne,filedConfig:{valueType:we,customLightMode:!0,lightFilterLabelFormatter:function(Xt){return(0,wt.c)(Xt,(Fe==null?void 0:Fe.format)||"YYYY-MM-DD")}}},Be))});Kn.Z=D},64317:function(jn,Kn,Y){"use strict";var se=Y(1413),me=Y(91),wt=Y(22270),_t=Y(67294),ne=Y(66758),Qe=Y(11911),j=Y(85893),Xe=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],we=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],D=function(Re,rt){var Xt=Re.fieldProps,ln=Re.children,rr=Re.params,Zn=Re.proFieldProps,qn=Re.mode,cn=Re.valueEnum,In=Re.request,ir=Re.showSearch,dr=Re.options,Vt=(0,me.Z)(Re,Xe),Kt=(0,_t.useContext)(ne.Z);return(0,j.jsx)(Qe.Z,(0,se.Z)((0,se.Z)({valueEnum:(0,wt.h)(cn),request:In,params:rr,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,se.Z)({options:dr,mode:qn,showSearch:ir,getPopupContainer:Kt.getPopupContainer},Xt),ref:rt,proFieldProps:Zn},Vt),{},{children:ln}))},gt=_t.forwardRef(function(Be,Re){var rt=Be.fieldProps,Xt=Be.children,ln=Be.params,rr=Be.proFieldProps,Zn=Be.mode,qn=Be.valueEnum,cn=Be.request,In=Be.options,ir=(0,me.Z)(Be,we),dr=(0,se.Z)({options:In,mode:Zn||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},rt),Vt=(0,_t.useContext)(ne.Z);return(0,j.jsx)(Qe.Z,(0,se.Z)((0,se.Z)({valueEnum:(0,wt.h)(qn),request:cn,params:ln,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,se.Z)({getPopupContainer:Vt.getPopupContainer},dr),ref:Re,proFieldProps:rr},ir),{},{children:Xt}))}),St=_t.forwardRef(D),Fe=gt,Ne=St;Ne.SearchSelect=Fe,Ne.displayName="ProFormComponent",Kn.Z=Ne},57470:function(jn,Kn,Y){"use strict";Y.d(Kn,{t:function(){return _a}});var se=Y(91),me=Y(97685),wt=Y(1413),_t=Y(10915),ne=Y(12044),Qe=Y(21770),j=Y(15746),Xe=Y(28459),we=Y(71230),D=Y(8232),gt=Y(93967),St=Y.n(gt),Fe=Y(9220),Ne=Y(67294),Be=Y(78733),Re=Y(87462),rt=Y(66023),Xt=Y(46976),ln=function(It,wn){return Ne.createElement(Xt.Z,(0,Re.Z)({},It,{ref:wn,icon:rt.Z}))},rr=Ne.forwardRef(ln),Zn=Y(28700),qn=Y(78957),cn=Y(85893),In=function(It,wn,Wn,Fr){return It?(0,cn.jsxs)(cn.Fragment,{children:[Wn.getMessage("tableForm.collapsed","\u5C55\u5F00"),Fr&&"(".concat(Fr,")"),(0,cn.jsx)(rr,{style:{marginInlineStart:"0.5em",transition:"0.3s all",transform:"rotate(".concat(It?0:.5,"turn)")}})]}):(0,cn.jsxs)(cn.Fragment,{children:[Wn.getMessage("tableForm.expand","\u6536\u8D77"),(0,cn.jsx)(rr,{style:{marginInlineStart:"0.5em",transition:"0.3s all",transform:"rotate(".concat(It?0:.5,"turn)")}})]})},ir=function(It){var wn=It.setCollapsed,Wn=It.collapsed,Fr=Wn===void 0?!1:Wn,vi=It.submitter,Xi=It.style,oo=It.hiddenNum,Fi=(0,Ne.useContext)(Xe.ZP.ConfigContext),so=Fi.getPrefixCls,lo=(0,_t.YB)(),Oo=(0,Ne.useContext)(_t.L_),Pi=Oo.hashId,da=(0,Zn.v)(It.collapseRender)||In;return(0,cn.jsxs)(qn.Z,{style:Xi,size:16,children:[vi,It.collapseRender!==!1&&(0,cn.jsx)("a",{className:"".concat(so("pro-query-filter-collapse-button")," ").concat(Pi).trim(),onClick:function(){return wn(!Fr)},children:da==null?void 0:da(Fr,It,lo,oo)})]})},dr=ir,Vt=Y(4942),Kt=Y(98082),Hr=function(It){return(0,Vt.Z)({},It.componentCls,(0,Vt.Z)((0,Vt.Z)((0,Vt.Z)((0,Vt.Z)({"&&":{padding:24}},"".concat(It.antCls,"-form-item"),{marginBlock:0}),"".concat(It.proComponentsCls,"-form-group-title"),{marginBlock:0}),"&-row",{rowGap:24,"&-split":(0,Vt.Z)((0,Vt.Z)({},"".concat(It.proComponentsCls,"-form-group"),{display:"flex",alignItems:"center",gap:It.marginXS}),"&:last-child",{marginBlockEnd:12}),"&-split-line":{"&:after":{position:"absolute",width:"100%",content:'""',height:1,insetBlockEnd:-12,borderBlockEnd:"1px dashed ".concat(It.colorSplit)}}}),"&-collapse-button",{display:"flex",alignItems:"center",color:It.colorPrimary}))};function er(un){return(0,Kt.Xj)("QueryFilter",function(It){var wn=(0,wt.Z)((0,wt.Z)({},It),{},{componentCls:".".concat(un)});return[Hr(wn)]})}var Oi=["collapsed","layout","defaultCollapsed","defaultColsNumber","span","searchGutter","searchText","resetText","optionRender","collapseRender","onReset","onCollapse","labelWidth","style","split","preserve","ignoreRules","showHiddenNum","submitterColSpanProps"],$n,ii={xs:513,sm:513,md:785,lg:992,xl:1057,xxl:1/0},Ui={vertical:[[513,1,"vertical"],[785,2,"vertical"],[1057,3,"vertical"],[1/0,4,"vertical"]],default:[[513,1,"vertical"],[701,2,"vertical"],[1062,3,"horizontal"],[1352,3,"horizontal"],[1/0,4,"horizontal"]]},Ha=function(It,wn,Wn){if(Wn&&typeof Wn=="number")return{span:Wn,layout:It};var Fr=Wn?["xs","sm","md","lg","xl","xxl"].map(function(Xi){return[ii[Xi],24/Wn[Xi],"horizontal"]}):Ui[It||"default"],vi=(Fr||Ui.default).find(function(Xi){return wn<Xi[0]+16});return vi?{span:24/vi[1],layout:vi==null?void 0:vi[2]}:{span:8,layout:"horizontal"}},ao=function(It,wn){return It==null?void 0:It.flatMap(function(Wn){var Fr;if((Wn==null?void 0:Wn.type.displayName)==="ProForm-Group"&&!((Fr=Wn.props)!==null&&Fr!==void 0&&Fr.title))return Wn.props.children;if(wn&&Ne.isValidElement(Wn)){var vi;return Ne.cloneElement(Wn,(0,wt.Z)((0,wt.Z)({},Wn.props),{},{formItemProps:(0,wt.Z)((0,wt.Z)({},(vi=Wn.props)===null||vi===void 0?void 0:vi.formItemProps),{},{rules:[]})}))}return Wn})},So=function(It){var wn,Wn,Fr,vi,Xi=(0,_t.YB)(),oo=(0,Ne.useContext)(_t.L_),Fi=oo.hashId,so=It.resetText||Xi.getMessage("tableForm.reset","\u91CD\u7F6E"),lo=It.searchText||Xi.getMessage("tableForm.search","\u641C\u7D22"),Oo=(0,Qe.Z)(function(){return It.defaultCollapsed&&!!It.submitter},{value:It.collapsed,onChange:It.onCollapse}),Pi=(0,me.Z)(Oo,2),da=Pi[0],Co=Pi[1],Rr=It.optionRender,wa=It.collapseRender,gr=It.split,cs=It.items,ha=It.spanSize,Ho=It.showLength,Yo=It.searchGutter,Sa=It.showHiddenNum,Na=(0,Ne.useMemo)(function(){return!It.submitter||Rr===!1?null:Ne.cloneElement(It.submitter,(0,wt.Z)({searchConfig:{resetText:so,submitText:lo},render:Rr&&function(Gn,pr){return Rr((0,wt.Z)((0,wt.Z)({},It),{},{resetText:so,searchText:lo}),It,pr)}},It.submitter.props))},[It,so,lo,Rr]),pa=0,ka=0,Dn=!1,hr=0,Ci=0,Eo=ao(cs,It.ignoreRules).map(function(Gn,pr){var gi,ai,Ln,lr,Mr=Ne.isValidElement(Gn)&&(gi=Gn==null||(ai=Gn.props)===null||ai===void 0?void 0:ai.colSize)!==null&&gi!==void 0?gi:1,Rt=Math.min(ha.span*(Mr||1),24);if(pa+=Rt,hr+=Mr,pr===0){var Mo;Dn=Rt===24&&!(Gn!=null&&(Mo=Gn.props)!==null&&Mo!==void 0&&Mo.hidden)}var Q=(Gn==null||(Ln=Gn.props)===null||Ln===void 0?void 0:Ln.hidden)||da&&(Dn||hr>Ho-1)&&!!pr&&pa>=24;ka+=1;var Uo=Ne.isValidElement(Gn)&&(Gn.key||"".concat((lr=Gn.props)===null||lr===void 0?void 0:lr.name))||pr;return Ne.isValidElement(Gn)&&Q?It.preserve?{itemDom:Ne.cloneElement(Gn,{hidden:!0,key:Uo||pr}),hidden:!0,colSpan:Rt}:{itemDom:null,colSpan:0,hidden:!0}:{itemDom:Gn,colSpan:Rt,hidden:!1}}),sa=Eo.map(function(Gn,pr){var gi,ai,Ln=Gn.itemDom,lr=Gn.colSpan,Mr=Ln==null||(gi=Ln.props)===null||gi===void 0?void 0:gi.hidden;if(Mr)return Ln;var Rt=Ne.isValidElement(Ln)&&(Ln.key||"".concat((ai=Ln.props)===null||ai===void 0?void 0:ai.name))||pr;return 24-Ci%24<lr&&(pa+=24-Ci%24,Ci+=24-Ci%24),Ci+=lr,gr&&Ci%24===0&&pr<ka-1?(0,cn.jsx)(j.Z,{span:lr,className:"".concat(It.baseClassName,"-row-split-line ").concat(It.baseClassName,"-row-split ").concat(Fi).trim(),children:Ln},Rt):(0,cn.jsx)(j.Z,{className:"".concat(It.baseClassName,"-row-split ").concat(Fi).trim(),span:lr,children:Ln},Rt)}),Oa=Sa&&Eo.filter(function(Gn){return Gn.hidden}).length,Ir=(0,Ne.useMemo)(function(){return!(pa<24||hr<=Ho)},[hr,Ho,pa]),Ei=(0,Ne.useMemo)(function(){var Gn,pr,gi=Ci%24+((Gn=(pr=It.submitterColSpanProps)===null||pr===void 0?void 0:pr.span)!==null&&Gn!==void 0?Gn:ha.span);if(gi>24){var ai,Ln;return 24-((ai=(Ln=It.submitterColSpanProps)===null||Ln===void 0?void 0:Ln.span)!==null&&ai!==void 0?ai:ha.span)}return 24-gi},[Ci,Ci%24+((wn=(Wn=It.submitterColSpanProps)===null||Wn===void 0?void 0:Wn.span)!==null&&wn!==void 0?wn:ha.span),(Fr=It.submitterColSpanProps)===null||Fr===void 0?void 0:Fr.span]),Vo=(0,Ne.useContext)(Xe.ZP.ConfigContext),Ca=Vo.getPrefixCls("pro-query-filter");return(0,cn.jsxs)(we.Z,{gutter:Yo,justify:"start",className:St()("".concat(Ca,"-row"),Fi),children:[sa,Na&&(0,cn.jsx)(j.Z,(0,wt.Z)((0,wt.Z)({span:ha.span,offset:Ei,className:St()((vi=It.submitterColSpanProps)===null||vi===void 0?void 0:vi.className)},It.submitterColSpanProps),{},{style:{textAlign:"end"},children:(0,cn.jsx)(D.Z.Item,{label:" ",colon:!1,shouldUpdate:!1,className:"".concat(Ca,"-actions ").concat(Fi).trim(),children:(0,cn.jsx)(dr,{hiddenNum:Oa,collapsed:da,collapseRender:Ir?wa:!1,submitter:Na,setCollapsed:Co},"pro-form-query-filter-actions")})}),"submitter")]},"resize-observer-row")},pi=(0,ne.j)()?($n=document)===null||$n===void 0||($n=$n.body)===null||$n===void 0?void 0:$n.clientWidth:1024;function _a(un){var It=un.collapsed,wn=un.layout,Wn=un.defaultCollapsed,Fr=Wn===void 0?!0:Wn,vi=un.defaultColsNumber,Xi=un.span,oo=un.searchGutter,Fi=oo===void 0?24:oo,so=un.searchText,lo=un.resetText,Oo=un.optionRender,Pi=un.collapseRender,da=un.onReset,Co=un.onCollapse,Rr=un.labelWidth,wa=Rr===void 0?"80":Rr,gr=un.style,cs=un.split,ha=un.preserve,Ho=ha===void 0?!0:ha,Yo=un.ignoreRules,Sa=un.showHiddenNum,Na=Sa===void 0?!1:Sa,pa=un.submitterColSpanProps,ka=(0,se.Z)(un,Oi),Dn=(0,Ne.useContext)(Xe.ZP.ConfigContext),hr=Dn.getPrefixCls("pro-query-filter"),Ci=er(hr),Eo=Ci.wrapSSR,sa=Ci.hashId,Oa=(0,Qe.Z)(function(){return typeof(gr==null?void 0:gr.width)=="number"?gr==null?void 0:gr.width:pi}),Ir=(0,me.Z)(Oa,2),Ei=Ir[0],Vo=Ir[1],Ca=(0,Ne.useMemo)(function(){return Ha(wn,Ei+16,Xi)},[wn,Ei,Xi]),Gn=(0,Ne.useMemo)(function(){return vi!==void 0?vi-1:Math.max(1,24/Ca.span-1)},[vi,Ca.span]),pr=(0,Ne.useMemo)(function(){if(wa&&Ca.layout!=="vertical"&&wa!=="auto")return{labelCol:{flex:"0 0 ".concat(wa,"px")},wrapperCol:{style:{maxWidth:"calc(100% - ".concat(wa,"px)")}},style:{flexWrap:"nowrap"}}},[Ca.layout,wa]);return Eo((0,cn.jsx)(Fe.Z,{onResize:function(ai){Ei!==ai.width&&ai.width>17&&Vo(ai.width)},children:(0,cn.jsx)(Be.I,(0,wt.Z)((0,wt.Z)({isKeyPressSubmit:!0,preserve:Ho},ka),{},{className:St()(hr,sa,ka.className),onReset:da,style:gr,layout:Ca.layout,fieldProps:{style:{width:"100%"}},formItemProps:pr,groupProps:{titleStyle:{display:"inline-block",marginInlineEnd:16}},contentRender:function(ai,Ln,lr){return(0,cn.jsx)(So,{spanSize:Ca,collapsed:It,form:lr,submitterColSpanProps:pa,collapseRender:Pi,defaultCollapsed:Fr,onCollapse:Co,optionRender:Oo,submitter:Ln,items:ai,split:cs,baseClassName:hr,resetText:un.resetText,searchText:un.searchText,searchGutter:Fi,preserve:Ho,ignoreRules:Yo,showLength:Gn,showHiddenNum:Na})}}))},"resize-observer"))}},50624:function(jn,Kn,Y){"use strict";Y.d(Kn,{Z:function(){return Il}});var se=Y(74165),me=Y(15861),wt=Y(71002),_t=Y(97685),ne=Y(4942),Qe=Y(74902),j=Y(1413),Xe=Y(91),we=Y(87462),D=Y(67294),gt=Y(50756),St=Y(93967),Fe=Y.n(St),Ne=Y(86500),Be=Y(1350),Re=2,rt=.16,Xt=.05,ln=.05,rr=.15,Zn=5,qn=4,cn=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function In(x){var y=x.r,M=x.g,w=x.b,k=(0,Ne.py)(y,M,w);return{h:k.h*360,s:k.s,v:k.v}}function ir(x){var y=x.r,M=x.g,w=x.b;return"#".concat((0,Ne.vq)(y,M,w,!1))}function dr(x,y,M){var w=M/100,k={r:(y.r-x.r)*w+x.r,g:(y.g-x.g)*w+x.g,b:(y.b-x.b)*w+x.b};return k}function Vt(x,y,M){var w;return Math.round(x.h)>=60&&Math.round(x.h)<=240?w=M?Math.round(x.h)-Re*y:Math.round(x.h)+Re*y:w=M?Math.round(x.h)+Re*y:Math.round(x.h)-Re*y,w<0?w+=360:w>=360&&(w-=360),w}function Kt(x,y,M){if(x.h===0&&x.s===0)return x.s;var w;return M?w=x.s-rt*y:y===qn?w=x.s+rt:w=x.s+Xt*y,w>1&&(w=1),M&&y===Zn&&w>.1&&(w=.1),w<.06&&(w=.06),Number(w.toFixed(2))}function Hr(x,y,M){var w;return M?w=x.v+ln*y:w=x.v-rr*y,w>1&&(w=1),Number(w.toFixed(2))}function er(x){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=[],w=(0,Be.uA)(x),k=Zn;k>0;k-=1){var U=In(w),N=ir((0,Be.uA)({h:Vt(U,k,!0),s:Kt(U,k,!0),v:Hr(U,k,!0)}));M.push(N)}M.push(ir(w));for(var V=1;V<=qn;V+=1){var q=In(w),ee=ir((0,Be.uA)({h:Vt(q,V),s:Kt(q,V),v:Hr(q,V)}));M.push(ee)}return y.theme==="dark"?cn.map(function(ie){var fe=ie.index,ve=ie.opacity,Se=ir(dr((0,Be.uA)(y.backgroundColor||"#141414"),(0,Be.uA)(M[fe]),ve*100));return Se}):M}var Oi={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},$n={},ii={};Object.keys(Oi).forEach(function(x){$n[x]=er(Oi[x]),$n[x].primary=$n[x][5],ii[x]=er(Oi[x],{theme:"dark",backgroundColor:"#141414"}),ii[x].primary=ii[x][5]});var Ui=$n.red,Ha=$n.volcano,ao=$n.gold,So=$n.orange,pi=$n.yellow,_a=$n.lime,un=$n.green,It=$n.cyan,wn=$n.blue,Wn=$n.geekblue,Fr=$n.purple,vi=$n.magenta,Xi=$n.grey,oo=$n.grey,Fi=(0,D.createContext)({}),so=Fi,lo=Y(44958),Oo=Y(27571),Pi=Y(80334);function da(x){return x.replace(/-(.)/g,function(y,M){return M.toUpperCase()})}function Co(x,y){(0,Pi.ZP)(x,"[@ant-design/icons] ".concat(y))}function Rr(x){return(0,wt.Z)(x)==="object"&&typeof x.name=="string"&&typeof x.theme=="string"&&((0,wt.Z)(x.icon)==="object"||typeof x.icon=="function")}function wa(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(x).reduce(function(y,M){var w=x[M];switch(M){case"class":y.className=w,delete y.class;break;default:delete y[M],y[da(M)]=w}return y},{})}function gr(x,y,M){return M?D.createElement(x.tag,(0,j.Z)((0,j.Z)({key:y},wa(x.attrs)),M),(x.children||[]).map(function(w,k){return gr(w,"".concat(y,"-").concat(x.tag,"-").concat(k))})):D.createElement(x.tag,(0,j.Z)({key:y},wa(x.attrs)),(x.children||[]).map(function(w,k){return gr(w,"".concat(y,"-").concat(x.tag,"-").concat(k))}))}function cs(x){return er(x)[0]}function ha(x){return x?Array.isArray(x)?x:[x]:[]}var Ho={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Yo=`
|
|
.anticon {
|
|
display: inline-block;
|
|
color: inherit;
|
|
font-style: normal;
|
|
line-height: 0;
|
|
text-align: center;
|
|
text-transform: none;
|
|
vertical-align: -0.125em;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
.anticon > * {
|
|
line-height: 1;
|
|
}
|
|
|
|
.anticon svg {
|
|
display: inline-block;
|
|
}
|
|
|
|
.anticon::before {
|
|
display: none;
|
|
}
|
|
|
|
.anticon .anticon-icon {
|
|
display: block;
|
|
}
|
|
|
|
.anticon[tabindex] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anticon-spin::before,
|
|
.anticon-spin {
|
|
display: inline-block;
|
|
-webkit-animation: loadingCircle 1s infinite linear;
|
|
animation: loadingCircle 1s infinite linear;
|
|
}
|
|
|
|
@-webkit-keyframes loadingCircle {
|
|
100% {
|
|
-webkit-transform: rotate(360deg);
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@keyframes loadingCircle {
|
|
100% {
|
|
-webkit-transform: rotate(360deg);
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
`,Sa=function(y){var M=(0,D.useContext)(so),w=M.csp,k=M.prefixCls,U=Yo;k&&(U=U.replace(/anticon/g,k)),(0,D.useEffect)(function(){var N=y.current,V=(0,Oo.A)(N);(0,lo.hq)(U,"@ant-design-icons",{prepend:!0,csp:w,attachTo:V})},[])},Na=["icon","className","onClick","style","primaryColor","secondaryColor"],pa={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function ka(x){var y=x.primaryColor,M=x.secondaryColor;pa.primaryColor=y,pa.secondaryColor=M||cs(y),pa.calculated=!!M}function Dn(){return(0,j.Z)({},pa)}var hr=function(y){var M=y.icon,w=y.className,k=y.onClick,U=y.style,N=y.primaryColor,V=y.secondaryColor,q=(0,Xe.Z)(y,Na),ee=D.useRef(),ie=pa;if(N&&(ie={primaryColor:N,secondaryColor:V||cs(N)}),Sa(ee),Co(Rr(M),"icon should be icon definiton, but got ".concat(M)),!Rr(M))return null;var fe=M;return fe&&typeof fe.icon=="function"&&(fe=(0,j.Z)((0,j.Z)({},fe),{},{icon:fe.icon(ie.primaryColor,ie.secondaryColor)})),gr(fe.icon,"svg-".concat(fe.name),(0,j.Z)((0,j.Z)({className:w,onClick:k,style:U,"data-icon":fe.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},q),{},{ref:ee}))};hr.displayName="IconReact",hr.getTwoToneColors=Dn,hr.setTwoToneColors=ka;var Ci=hr;function Eo(x){var y=ha(x),M=(0,_t.Z)(y,2),w=M[0],k=M[1];return Ci.setTwoToneColors({primaryColor:w,secondaryColor:k})}function sa(){var x=Ci.getTwoToneColors();return x.calculated?[x.primaryColor,x.secondaryColor]:x.primaryColor}var Oa=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Eo(wn.primary);var Ir=D.forwardRef(function(x,y){var M=x.className,w=x.icon,k=x.spin,U=x.rotate,N=x.tabIndex,V=x.onClick,q=x.twoToneColor,ee=(0,Xe.Z)(x,Oa),ie=D.useContext(so),fe=ie.prefixCls,ve=fe===void 0?"anticon":fe,Se=ie.rootClassName,ue=Fe()(Se,ve,(0,ne.Z)((0,ne.Z)({},"".concat(ve,"-").concat(w.name),!!w.name),"".concat(ve,"-spin"),!!k||w.name==="loading"),M),de=N;de===void 0&&V&&(de=-1);var ye=U?{msTransform:"rotate(".concat(U,"deg)"),transform:"rotate(".concat(U,"deg)")}:void 0,_e=ha(q),xe=(0,_t.Z)(_e,2),Ue=xe[0],Ye=xe[1];return D.createElement("span",(0,we.Z)({role:"img","aria-label":w.name},ee,{ref:y,tabIndex:de,onClick:V,className:ue}),D.createElement(Ci,{icon:w,primaryColor:Ue,secondaryColor:Ye,style:ye}))});Ir.displayName="AntdIcon",Ir.getTwoToneColor=sa,Ir.setTwoToneColor=Eo;var Ei=Ir,Vo=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:gt.Z}))},Ca=D.forwardRef(Vo),Gn=Y(48874),pr=Y(28459),gi=Y(13169),ai=Y(25378),Ln=Y(97435),lr=Y(21770),Mr=Y(98082),Rt=function(y){var M=y.componentCls,w=y.antCls;return(0,ne.Z)({},"".concat(M,"-actions"),(0,ne.Z)((0,ne.Z)({marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0,listStyle:"none",display:"flex",gap:y.marginXS,background:y.colorBgContainer,borderBlockStart:"".concat(y.lineWidth,"px ").concat(y.lineType," ").concat(y.colorSplit),minHeight:42},"& > *",{alignItems:"center",justifyContent:"center",flex:1,display:"flex",cursor:"pointer",color:y.colorTextSecondary,transition:"color 0.3s","&:hover":{color:y.colorPrimaryHover}}),"& > li > div",{flex:1,width:"100%",marginBlock:y.marginSM,marginInline:0,color:y.colorTextSecondary,textAlign:"center",a:{color:y.colorTextSecondary,transition:"color 0.3s","&:hover":{color:y.colorPrimaryHover}},div:(0,ne.Z)((0,ne.Z)({position:"relative",display:"block",minWidth:32,fontSize:y.fontSize,lineHeight:y.lineHeight,cursor:"pointer","&:hover":{color:y.colorPrimaryHover,transition:"color 0.3s"}},"a:not(".concat(w,`-btn),
|
|
> .anticon`),{display:"inline-block",width:"100%",color:y.colorTextSecondary,lineHeight:"22px",transition:"color 0.3s","&:hover":{color:y.colorPrimaryHover}}),".anticon",{fontSize:y.cardActionIconSize,lineHeight:"22px"}),"&:not(:last-child)":{borderInlineEnd:"".concat(y.lineWidth,"px ").concat(y.lineType," ").concat(y.colorSplit)}}))};function Mo(x){return(0,Mr.Xj)("ProCardActions",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x),cardActionIconSize:16});return[Rt(M)]})}var Q=Y(85893),Uo=function(y){var M=y.actions,w=y.prefixCls,k=Mo(w),U=k.wrapSSR,N=k.hashId;return Array.isArray(M)&&M!==null&&M!==void 0&&M.length?U((0,Q.jsx)("ul",{className:Fe()("".concat(w,"-actions"),N),children:M.map(function(V,q){return(0,Q.jsx)("li",{style:{width:"".concat(100/M.length,"%"),padding:0,margin:0},className:Fe()("".concat(w,"-actions-item"),N),children:V},"action-".concat(q))})})):U((0,Q.jsx)("ul",{className:Fe()("".concat(w,"-actions"),N),children:M}))},Ya=Uo,ja=Y(71230),Ki=Y(15746),Hn=Y(54548),nu=new Hn.E4("card-loading",{"0%":{backgroundPosition:"0 50%"},"50%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Is=function(y){return(0,ne.Z)({},y.componentCls,(0,ne.Z)((0,ne.Z)({"&-loading":{overflow:"hidden"},"&-loading &-body":{userSelect:"none"}},"".concat(y.componentCls,"-loading-content"),{width:"100%",p:{marginBlock:0,marginInline:0}}),"".concat(y.componentCls,"-loading-block"),{height:"14px",marginBlock:"4px",background:"linear-gradient(90deg, rgba(54, 61, 64, 0.2), rgba(54, 61, 64, 0.4), rgba(54, 61, 64, 0.2))",backgroundSize:"600% 600%",borderRadius:y.borderRadius,animationName:nu,animationDuration:"1.4s",animationTimingFunction:"ease",animationIterationCount:"infinite"}))};function Ls(x){return(0,Mr.Xj)("ProCardLoading",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[Is(M)]})}var us=function(y){var M=y.style,w=y.prefix,k=Ls(w||"ant-pro-card"),U=k.wrapSSR;return U((0,Q.jsxs)("div",{className:"".concat(w,"-loading-content"),style:M,children:[(0,Q.jsx)(ja.Z,{gutter:8,children:(0,Q.jsx)(Ki.Z,{span:22,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})})}),(0,Q.jsxs)(ja.Z,{gutter:8,children:[(0,Q.jsx)(Ki.Z,{span:8,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})}),(0,Q.jsx)(Ki.Z,{span:15,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})})]}),(0,Q.jsxs)(ja.Z,{gutter:8,children:[(0,Q.jsx)(Ki.Z,{span:6,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})}),(0,Q.jsx)(Ki.Z,{span:18,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})})]}),(0,Q.jsxs)(ja.Z,{gutter:8,children:[(0,Q.jsx)(Ki.Z,{span:13,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})}),(0,Q.jsx)(Ki.Z,{span:9,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})})]}),(0,Q.jsxs)(ja.Z,{gutter:8,children:[(0,Q.jsx)(Ki.Z,{span:4,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})}),(0,Q.jsx)(Ki.Z,{span:3,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})}),(0,Q.jsx)(Ki.Z,{span:16,children:(0,Q.jsx)("div",{className:"".concat(w,"-loading-block")})})]})]}))},nc=us,Xs=Y(67159),fs=Y(50344),ru=Y(34155),iu=["tab","children"],af=["key","tab","tabKey","disabled","destroyInactiveTabPane","children","className","style","cardProps"];function ds(x){return x.filter(function(y){return y})}function rc(x,y,M){if(x)return x.map(function(k){return(0,j.Z)((0,j.Z)({},k),{},{children:(0,Q.jsx)(Ce,(0,j.Z)((0,j.Z)({},M==null?void 0:M.cardProps),{},{children:k.children}))})});(0,Pi.ET)(!M,"Tabs.TabPane is deprecated. Please use `items` directly.");var w=(0,fs.Z)(y).map(function(k){if(D.isValidElement(k)){var U=k.key,N=k.props,V=N||{},q=V.tab,ee=V.children,ie=(0,Xe.Z)(V,iu),fe=(0,j.Z)((0,j.Z)({key:String(U)},ie),{},{children:(0,Q.jsx)(Ce,(0,j.Z)((0,j.Z)({},M==null?void 0:M.cardProps),{},{children:ee})),label:q});return fe}return null});return ds(w)}var la=function(y){var M=(0,D.useContext)(pr.ZP.ConfigContext),w=M.getPrefixCls;if(Xs.Z.startsWith("5"))return(0,Q.jsx)(Q.Fragment,{});var k=y.key,U=y.tab,N=y.tabKey,V=y.disabled,q=y.destroyInactiveTabPane,ee=y.children,ie=y.className,fe=y.style,ve=y.cardProps,Se=(0,Xe.Z)(y,af),ue=w("pro-card-tabpane"),de=Fe()(ue,ie);return(0,Q.jsx)(gi.Z.TabPane,(0,j.Z)((0,j.Z)({tabKey:N,tab:U,className:de,style:fe,disabled:V,destroyInactiveTabPane:q},Se),{},{children:(0,Q.jsx)(Ce,(0,j.Z)((0,j.Z)({},ve),{},{children:ee}))}),k)},qi=la,B=function(y){return{backgroundColor:y.controlItemBgActive,borderColor:y.controlOutline}},$=function(y){var M=y.componentCls;return(0,ne.Z)((0,ne.Z)((0,ne.Z)({},M,(0,j.Z)((0,j.Z)({position:"relative",display:"flex",flexDirection:"column",boxSizing:"border-box",width:"100%",marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0,backgroundColor:y.colorBgContainer,borderRadius:y.borderRadius},Mr.Wf===null||Mr.Wf===void 0?void 0:(0,Mr.Wf)(y)),{},(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({"&-box-shadow":{boxShadow:"0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017",borderColor:"transparent"},"&-col":{width:"100%"},"&-border":{border:"".concat(y.lineWidth,"px ").concat(y.lineType," ").concat(y.colorSplit)},"&-hoverable":(0,ne.Z)({cursor:"pointer",transition:"box-shadow 0.3s, border-color 0.3s","&:hover":{borderColor:"transparent",boxShadow:"0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017"}},"&".concat(M,"-checked:hover"),{borderColor:y.controlOutline}),"&-checked":(0,j.Z)((0,j.Z)({},B(y)),{},{"&::after":{position:"absolute",insetBlockStart:2,insetInlineEnd:2,width:0,height:0,border:"6px solid ".concat(y.colorPrimary),borderBlockEnd:"6px solid transparent",borderInlineStart:"6px solid transparent",borderStartEndRadius:2,content:'""'}}),"&:focus":(0,j.Z)({},B(y)),"&&-ghost":(0,ne.Z)({backgroundColor:"transparent"},"> ".concat(M),{"&-header":{paddingInlineEnd:0,paddingBlockEnd:y.padding,paddingInlineStart:0},"&-body":{paddingBlock:0,paddingInline:0,backgroundColor:"transparent"}}),"&&-split > &-body":{paddingBlock:0,paddingInline:0},"&&-contain-card > &-body":{display:"flex"}},"".concat(M,"-body-direction-column"),{flexDirection:"column"}),"".concat(M,"-body-wrap"),{flexWrap:"wrap"}),"&&-collapse",(0,ne.Z)({},"> ".concat(M),{"&-header":{paddingBlockEnd:y.padding,borderBlockEnd:0},"&-body":{display:"none"}})),"".concat(M,"-header"),{display:"flex",alignItems:"center",justifyContent:"space-between",paddingInline:y.paddingLG,paddingBlock:y.padding,paddingBlockEnd:0,"&-border":{"&":{paddingBlockEnd:y.padding},borderBlockEnd:"".concat(y.lineWidth,"px ").concat(y.lineType," ").concat(y.colorSplit)},"&-collapsible":{cursor:"pointer"}}),"".concat(M,"-title"),{color:y.colorText,fontWeight:500,fontSize:y.fontSizeLG,lineHeight:y.lineHeight}),"".concat(M,"-extra"),{color:y.colorText}),"".concat(M,"-type-inner"),(0,ne.Z)({},"".concat(M,"-header"),{backgroundColor:y.colorFillAlter})),"".concat(M,"-collapsible-icon"),{marginInlineEnd:y.marginXS,color:y.colorIconHover,":hover":{color:y.colorPrimaryHover},"& svg":{transition:"transform ".concat(y.motionDurationMid)}}),"".concat(M,"-body"),{display:"block",boxSizing:"border-box",height:"100%",paddingInline:y.paddingLG,paddingBlock:y.padding,"&-center":{display:"flex",alignItems:"center",justifyContent:"center"}}),"&&-size-small",(0,ne.Z)((0,ne.Z)({},M,{"&-header":{paddingInline:y.paddingSM,paddingBlock:y.paddingXS,paddingBlockEnd:0,"&-border":{paddingBlockEnd:y.paddingXS}},"&-title":{fontSize:y.fontSize},"&-body":{paddingInline:y.paddingSM,paddingBlock:y.paddingSM}}),"".concat(M,"-header").concat(M,"-header-collapsible"),{paddingBlock:y.paddingXS})))),"".concat(M,"-col"),(0,ne.Z)((0,ne.Z)({},"&".concat(M,"-split-vertical"),{borderInlineEnd:"".concat(y.lineWidth,"px ").concat(y.lineType," ").concat(y.colorSplit)}),"&".concat(M,"-split-horizontal"),{borderBlockEnd:"".concat(y.lineWidth,"px ").concat(y.lineType," ").concat(y.colorSplit)})),"".concat(M,"-tabs"),(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(y.antCls,"-tabs-top > ").concat(y.antCls,"-tabs-nav"),(0,ne.Z)({marginBlockEnd:0},"".concat(y.antCls,"-tabs-nav-list"),{marginBlockStart:y.marginXS,paddingInlineStart:y.padding})),"".concat(y.antCls,"-tabs-bottom > ").concat(y.antCls,"-tabs-nav"),(0,ne.Z)({marginBlockEnd:0},"".concat(y.antCls,"-tabs-nav-list"),{paddingInlineStart:y.padding})),"".concat(y.antCls,"-tabs-left"),(0,ne.Z)({},"".concat(y.antCls,"-tabs-content-holder"),(0,ne.Z)({},"".concat(y.antCls,"-tabs-content"),(0,ne.Z)({},"".concat(y.antCls,"-tabs-tabpane"),{paddingInlineStart:0})))),"".concat(y.antCls,"-tabs-left > ").concat(y.antCls,"-tabs-nav"),(0,ne.Z)({marginInlineEnd:0},"".concat(y.antCls,"-tabs-nav-list"),{paddingBlockStart:y.padding})),"".concat(y.antCls,"-tabs-right"),(0,ne.Z)({},"".concat(y.antCls,"-tabs-content-holder"),(0,ne.Z)({},"".concat(y.antCls,"-tabs-content"),(0,ne.Z)({},"".concat(y.antCls,"-tabs-tabpane"),{paddingInlineStart:0})))),"".concat(y.antCls,"-tabs-right > ").concat(y.antCls,"-tabs-nav"),(0,ne.Z)({},"".concat(y.antCls,"-tabs-nav-list"),{paddingBlockStart:y.padding})))},K=24,te=function(y,M){var w=M.componentCls;return y===0?(0,ne.Z)({},"".concat(w,"-col-0"),{display:"none"}):(0,ne.Z)({},"".concat(w,"-col-").concat(y),{flexShrink:0,width:"".concat(y/K*100,"%")})},ge=function(y){return Array(K+1).fill(1).map(function(M,w){return te(w,y)})};function be(x){return(0,Mr.Xj)("ProCard",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[$(M),ge(M)]})}var ae=["className","style","bodyStyle","headStyle","title","subTitle","extra","wrap","layout","loading","gutter","tooltip","split","headerBordered","bordered","boxShadow","children","size","actions","ghost","hoverable","direction","collapsed","collapsible","collapsibleIconRender","defaultCollapsed","onCollapse","checked","onChecked","tabs","type"],oe=D.forwardRef(function(x,y){var M,w=x.className,k=x.style,U=x.bodyStyle,N=x.headStyle,V=x.title,q=x.subTitle,ee=x.extra,ie=x.wrap,fe=ie===void 0?!1:ie,ve=x.layout,Se=x.loading,ue=x.gutter,de=ue===void 0?0:ue,ye=x.tooltip,_e=x.split,xe=x.headerBordered,Ue=xe===void 0?!1:xe,Ye=x.bordered,ft=Ye===void 0?!1:Ye,at=x.boxShadow,Le=at===void 0?!1:at,je=x.children,Pe=x.size,Te=x.actions,Oe=x.ghost,Ve=Oe===void 0?!1:Oe,Mt=x.hoverable,it=Mt===void 0?!1:Mt,le=x.direction,Ze=x.collapsed,Ke=x.collapsible,nt=Ke===void 0?!1:Ke,Ge=x.collapsibleIconRender,Ae=x.defaultCollapsed,$e=Ae===void 0?!1:Ae,st=x.onCollapse,ut=x.checked,Pt=x.onChecked,lt=x.tabs,dt=x.type,tt=(0,Xe.Z)(x,ae),ct=(0,D.useContext)(pr.ZP.ConfigContext),Zt=ct.getPrefixCls,Wt=(0,ai.Z)()||{lg:!0,md:!0,sm:!0,xl:!1,xs:!1,xxl:!1},Rn=(0,lr.Z)($e,{value:Ze,onChange:st}),ar=(0,_t.Z)(Rn,2),hn=ar[0],Yn=ar[1],Or=["xxl","xl","lg","md","sm","xs"],Ai=rc(lt==null?void 0:lt.items,je,lt),Yt=function(si){var vt=[0,0],xn=Array.isArray(si)?si:[si,0];return xn.forEach(function(mn,ma){if((0,wt.Z)(mn)==="object")for(var gs=0;gs<Or.length;gs+=1){var cr=Or[gs];if(Wt[cr]&&mn[cr]!==void 0){vt[ma]=mn[cr];break}}else vt[ma]=mn||0}),vt},qe=function(si,vt){return si?vt:{}},pt=function(si){var vt=si;if((0,wt.Z)(si)==="object")for(var xn=0;xn<Or.length;xn+=1){var mn=Or[xn];if(Wt!=null&&Wt[mn]&&(si==null?void 0:si[mn])!==void 0){vt=si[mn];break}}var ma=qe(typeof vt=="string"&&/\d%|\dpx/i.test(vt),{width:vt,flexShrink:0});return{span:vt,colSpanStyle:ma}},bt=Zt("pro-card"),yn=be(bt),On=yn.wrapSSR,pn=yn.hashId,tr=Yt(de),Ur=(0,_t.Z)(tr,2),fo=Ur[0],Za=Ur[1],yc=!1,Ll=D.Children.toArray(je),Nl=Ll.map(function(ta,si){var vt;if(ta!=null&&(vt=ta.type)!==null&&vt!==void 0&&vt.isProCard){yc=!0;var xn=ta.props.colSpan,mn=pt(xn),ma=mn.span,gs=mn.colSpanStyle,cr=Fe()(["".concat(bt,"-col")],pn,(0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(bt,"-split-vertical"),_e==="vertical"&&si!==Ll.length-1),"".concat(bt,"-split-horizontal"),_e==="horizontal"&&si!==Ll.length-1),"".concat(bt,"-col-").concat(ma),typeof ma=="number"&&ma>=0&&ma<=24)),bc=On((0,Q.jsx)("div",{style:(0,j.Z)((0,j.Z)((0,j.Z)({},gs),qe(fo>0,{paddingInlineEnd:fo/2,paddingInlineStart:fo/2})),qe(Za>0,{paddingBlockStart:Za/2,paddingBlockEnd:Za/2})),className:cr,children:D.cloneElement(ta)}));return D.cloneElement(bc,{key:"pro-card-col-".concat((ta==null?void 0:ta.key)||si)})}return ta}),ho=Fe()("".concat(bt),w,pn,(M={},(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)(M,"".concat(bt,"-border"),ft),"".concat(bt,"-box-shadow"),Le),"".concat(bt,"-contain-card"),yc),"".concat(bt,"-loading"),Se),"".concat(bt,"-split"),_e==="vertical"||_e==="horizontal"),"".concat(bt,"-ghost"),Ve),"".concat(bt,"-hoverable"),it),"".concat(bt,"-size-").concat(Pe),Pe),"".concat(bt,"-type-").concat(dt),dt),"".concat(bt,"-collapse"),hn),(0,ne.Z)(M,"".concat(bt,"-checked"),ut))),kl=Fe()("".concat(bt,"-body"),pn,(0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(bt,"-body-center"),ve==="center"),"".concat(bt,"-body-direction-column"),_e==="horizontal"||le==="column"),"".concat(bt,"-body-wrap"),fe&&yc)),yu=U,po=D.isValidElement(Se)?Se:(0,Q.jsx)(nc,{prefix:bt,style:(U==null?void 0:U.padding)===0||(U==null?void 0:U.padding)==="0px"?{padding:24}:void 0}),Bs=nt&&Ze===void 0&&(Ge?Ge({collapsed:hn}):(0,Q.jsx)(Ca,{rotate:hn?void 0:90,className:"".concat(bt,"-collapsible-icon ").concat(pn).trim()}));return On((0,Q.jsxs)("div",(0,j.Z)((0,j.Z)({className:ho,style:k,ref:y,onClick:function(si){var vt;Pt==null||Pt(si),tt==null||(vt=tt.onClick)===null||vt===void 0||vt.call(tt,si)}},(0,Ln.Z)(tt,["prefixCls","colSpan"])),{},{children:[(V||ee||Bs)&&(0,Q.jsxs)("div",{className:Fe()("".concat(bt,"-header"),pn,(0,ne.Z)((0,ne.Z)({},"".concat(bt,"-header-border"),Ue||dt==="inner"),"".concat(bt,"-header-collapsible"),Bs)),style:N,onClick:function(){Bs&&Yn(!hn)},children:[(0,Q.jsxs)("div",{className:"".concat(bt,"-title ").concat(pn).trim(),children:[Bs,(0,Q.jsx)(Gn.G,{label:V,tooltip:ye,subTitle:q})]}),ee&&(0,Q.jsx)("div",{className:"".concat(bt,"-extra ").concat(pn).trim(),onClick:function(si){return si.stopPropagation()},children:ee})]}),lt?(0,Q.jsx)("div",{className:"".concat(bt,"-tabs ").concat(pn).trim(),children:(0,Q.jsx)(gi.Z,(0,j.Z)((0,j.Z)({onChange:lt.onChange},lt),{},{items:Ai,children:Se?po:je}))}):(0,Q.jsx)("div",{className:kl,style:yu,children:Se?po:Nl}),Te?(0,Q.jsx)(Ya,{actions:Te,prefixCls:bt}):null]})))}),Ce=oe,Ee=function(y){var M=y.componentCls;return(0,ne.Z)({},M,{"&-divider":{flex:"none",width:y.lineWidth,marginInline:y.marginXS,marginBlock:y.marginLG,backgroundColor:y.colorSplit,"&-horizontal":{width:"initial",height:y.lineWidth,marginInline:y.marginLG,marginBlock:y.marginXS}},"&&-size-small &-divider":{marginBlock:y.marginLG,marginInline:y.marginXS,"&-horizontal":{marginBlock:y.marginXS,marginInline:y.marginLG}}})};function Ot(x){return(0,Mr.Xj)("ProCardDivider",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[Ee(M)]})}var Et=function(y){var M=(0,D.useContext)(pr.ZP.ConfigContext),w=M.getPrefixCls,k=w("pro-card"),U="".concat(k,"-divider"),N=Ot(k),V=N.wrapSSR,q=N.hashId,ee=y.className,ie=y.style,fe=ie===void 0?{}:ie,ve=y.type,Se=Fe()(U,ee,q,(0,ne.Z)({},"".concat(U,"-").concat(ve),ve));return V((0,Q.jsx)("div",{className:Se,style:fe}))},Ht=Et,mt=function(y){return(0,Q.jsx)(Ce,(0,j.Z)({bodyStyle:{padding:0}},y))},Lt=Ce;Lt.isProCard=!0,Lt.Divider=Ht,Lt.TabPane=qi,Lt.Group=mt;var Dt=Lt,ht=Dt,Jt=Y(2514),Ft=Y(34994),tn=Ft.A,yt=Y(10915),qt=Y(84506),Nn=Y(15294),va=Y(62914),Ea=function(y,M){return D.createElement(va.Z,(0,we.Z)({},y,{ref:M,icon:Nn.Z}))},Bi=D.forwardRef(Ea),ca=Y(2453),mi=Y(8232),zr=Y(26702),vr=Y(15105),Da=Y(98423),_l=Y(96159),Va=Y(53124),Fa=Y(55241),zi=Y(86743),Po=Y(81643),To=Y(14726),Ao=Y(33671),co=Y(10110),Wd=Y(24457),Gd=Y(66330),au=Y(91945);const Hd=x=>{const{componentCls:y,iconCls:M,antCls:w,zIndexPopup:k,colorText:U,colorWarning:N,marginXXS:V,marginXS:q,fontSize:ee,fontWeightStrong:ie,colorTextHeading:fe}=x;return{[y]:{zIndex:k,[`&${w}-popover`]:{fontSize:ee},[`${y}-message`]:{marginBottom:q,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${y}-message-icon ${M}`]:{color:N,fontSize:ee,lineHeight:1,marginInlineEnd:q},[`${y}-title`]:{fontWeight:ie,color:fe,"&:only-child":{fontWeight:"normal"}},[`${y}-description`]:{marginTop:V,color:U}},[`${y}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:q}}}}},Yd=x=>{const{zIndexPopupBase:y}=x;return{zIndexPopup:y+60}};var of=(0,au.I$)("Popconfirm",x=>Hd(x),Yd,{resetStyle:!1}),Vd=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M};const Ns=x=>{const{prefixCls:y,okButtonProps:M,cancelButtonProps:w,title:k,description:U,cancelText:N,okText:V,okType:q="primary",icon:ee=D.createElement(zr.Z,null),showCancel:ie=!0,close:fe,onConfirm:ve,onCancel:Se,onPopupClick:ue}=x,{getPrefixCls:de}=D.useContext(Va.E_),[ye]=(0,co.Z)("Popconfirm",Wd.Z.Popconfirm),_e=(0,Po.Z)(k),xe=(0,Po.Z)(U);return D.createElement("div",{className:`${y}-inner-content`,onClick:ue},D.createElement("div",{className:`${y}-message`},ee&&D.createElement("span",{className:`${y}-message-icon`},ee),D.createElement("div",{className:`${y}-message-text`},_e&&D.createElement("div",{className:Fe()(`${y}-title`)},_e),xe&&D.createElement("div",{className:`${y}-description`},xe))),D.createElement("div",{className:`${y}-buttons`},ie&&D.createElement(To.ZP,Object.assign({onClick:Se,size:"small"},w),N||(ye==null?void 0:ye.cancelText)),D.createElement(zi.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,Ao.nx)(q)),M),actionFn:ve,close:fe,prefixCls:de("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},V||(ye==null?void 0:ye.okText))))};var Ud=x=>{const{prefixCls:y,placement:M,className:w,style:k}=x,U=Vd(x,["prefixCls","placement","className","style"]),{getPrefixCls:N}=D.useContext(Va.E_),V=N("popconfirm",y),[q]=of(V);return q(D.createElement(Gd.ZP,{placement:M,className:Fe()(V,w),style:k,content:D.createElement(Ns,Object.assign({prefixCls:V},U))}))},sf=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M};const lf=D.forwardRef((x,y)=>{var M,w;const{prefixCls:k,placement:U="top",trigger:N="click",okType:V="primary",icon:q=D.createElement(zr.Z,null),children:ee,overlayClassName:ie,onOpenChange:fe,onVisibleChange:ve}=x,Se=sf(x,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:ue}=D.useContext(Va.E_),[de,ye]=(0,lr.Z)(!1,{value:(M=x.open)!==null&&M!==void 0?M:x.visible,defaultValue:(w=x.defaultOpen)!==null&&w!==void 0?w:x.defaultVisible}),_e=(Te,Oe)=>{ye(Te,!0),ve==null||ve(Te),fe==null||fe(Te,Oe)},xe=Te=>{_e(!1,Te)},Ue=Te=>{var Oe;return(Oe=x.onConfirm)===null||Oe===void 0?void 0:Oe.call(void 0,Te)},Ye=Te=>{var Oe;_e(!1,Te),(Oe=x.onCancel)===null||Oe===void 0||Oe.call(void 0,Te)},ft=Te=>{Te.keyCode===vr.Z.ESC&&de&&_e(!1,Te)},at=Te=>{const{disabled:Oe=!1}=x;Oe||_e(Te)},Le=ue("popconfirm",k),je=Fe()(Le,ie),[Pe]=of(Le);return Pe(D.createElement(Fa.Z,Object.assign({},(0,Da.Z)(Se,["title"]),{trigger:N,placement:U,onOpenChange:at,open:de,ref:y,overlayClassName:je,content:D.createElement(Ns,Object.assign({okType:V,icon:q},x,{prefixCls:Le,close:xe,onConfirm:Ue,onCancel:Ye})),"data-popover-inject":!0}),(0,_l.Tm)(ee,{onKeyDown:Te=>{var Oe,Ve;D.isValidElement(ee)&&((Ve=ee==null?void 0:(Oe=ee.props).onKeyDown)===null||Ve===void 0||Ve.call(Oe,Te)),ft(Te)}})))});lf._InternalPanelDoNotUseOrYouWillBeFired=Ud;var Ks=lf,qs=Y(84164),Ji=Y(88306),su=Y(8880),Yr=Y(48171),pe=Y(10178),X=Y(41036),Me=Y(27068),ze=Y(26369),Nt=Y(92210),nn=["map_row_parentKey"],Sn=["map_row_parentKey","map_row_key"],rn=["map_row_key"],bn=function(y){return(ca.ZP.warn||ca.ZP.warning)(y)},dn=function(y){return Array.isArray(y)?y.join(","):y};function Fn(x,y){var M,w=x.getRowKey,k=x.row,U=x.data,N=x.childrenColumnName,V=N===void 0?"children":N,q=(M=dn(x.key))===null||M===void 0?void 0:M.toString(),ee=new Map;function ie(ve,Se,ue){ve.forEach(function(de,ye){var _e=(ue||0)*10+ye,xe=w(de,_e).toString();de&&(0,wt.Z)(de)==="object"&&V in de&&ie(de[V]||[],xe,_e);var Ue=(0,j.Z)((0,j.Z)({},de),{},{map_row_key:xe,children:void 0,map_row_parentKey:Se});delete Ue.children,Se||delete Ue.map_row_parentKey,ee.set(xe,Ue)})}y==="top"&&ee.set(q,(0,j.Z)((0,j.Z)({},ee.get(q)),k)),ie(U),y==="update"&&ee.set(q,(0,j.Z)((0,j.Z)({},ee.get(q)),k)),y==="delete"&&ee.delete(q);var fe=function(Se){var ue=new Map,de=[],ye=function(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Se.forEach(function(Ue){if(Ue.map_row_parentKey&&!Ue.map_row_key){var Ye=Ue.map_row_parentKey,ft=(0,Xe.Z)(Ue,nn);if(ue.has(Ye)||ue.set(Ye,[]),xe){var at;(at=ue.get(Ye))===null||at===void 0||at.push(ft)}}})};return ye(y==="top"),Se.forEach(function(_e){if(_e.map_row_parentKey&&_e.map_row_key){var xe,Ue=_e.map_row_parentKey,Ye=_e.map_row_key,ft=(0,Xe.Z)(_e,Sn);ue.has(Ye)&&(ft[V]=ue.get(Ye)),ue.has(Ue)||ue.set(Ue,[]),(xe=ue.get(Ue))===null||xe===void 0||xe.push(ft)}}),ye(y==="update"),Se.forEach(function(_e){if(!_e.map_row_parentKey){var xe=_e.map_row_key,Ue=(0,Xe.Z)(_e,rn);if(xe&&ue.has(xe)){var Ye=(0,j.Z)((0,j.Z)({},Ue),{},(0,ne.Z)({},V,ue.get(xe)));de.push(Ye);return}de.push(Ue)}}),de};return fe(ee)}function fn(x,y){var M=x.recordKey,w=x.onSave,k=x.row,U=x.children,N=x.newLineConfig,V=x.editorType,q=x.tableName,ee=(0,D.useContext)(X.J),ie=mi.Z.useFormInstance(),fe=(0,lr.Z)(!1),ve=(0,_t.Z)(fe,2),Se=ve[0],ue=ve[1],de=(0,Yr.J)((0,me.Z)((0,se.Z)().mark(function ye(){var _e,xe,Ue,Ye,ft,at,Le,je,Pe;return(0,se.Z)().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.prev=0,xe=V==="Map",Ue=[q,Array.isArray(M)?M[0]:M].map(function(Ve){return Ve==null?void 0:Ve.toString()}).flat(1).filter(Boolean),ue(!0),Oe.next=6,ie.validateFields(Ue,{recursive:!0});case 6:return Ye=(ee==null||(_e=ee.getFieldFormatValue)===null||_e===void 0?void 0:_e.call(ee,Ue))||ie.getFieldValue(Ue),Array.isArray(M)&&M.length>1&&(ft=(0,qt.Z)(M),at=ft.slice(1),Le=(0,Ji.Z)(Ye,at),(0,su.Z)(Ye,at,Le)),je=xe?(0,su.Z)({},Ue,Ye):Ye,Oe.next=11,w==null?void 0:w(M,(0,Nt.T)({},k,je),k,N);case 11:return Pe=Oe.sent,ue(!1),Oe.abrupt("return",Pe);case 16:throw Oe.prev=16,Oe.t0=Oe.catch(0),console.log(Oe.t0),ue(!1),Oe.t0;case 21:case"end":return Oe.stop()}},ye,null,[[0,16]])})));return(0,D.useImperativeHandle)(y,function(){return{save:de}},[de]),(0,Q.jsxs)("a",{onClick:function(){var ye=(0,me.Z)((0,se.Z)().mark(function _e(xe){return(0,se.Z)().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return xe.stopPropagation(),xe.preventDefault(),Ye.prev=2,Ye.next=5,de();case 5:Ye.next=9;break;case 7:Ye.prev=7,Ye.t0=Ye.catch(2);case 9:case"end":return Ye.stop()}},_e,null,[[2,7]])}));return function(_e){return ye.apply(this,arguments)}}(),children:[Se?(0,Q.jsx)(Bi,{style:{marginInlineEnd:8}}):null,U||"\u4FDD\u5B58"]},"save")}var kn=function(y){var M=y.recordKey,w=y.onDelete,k=y.row,U=y.children,N=y.deletePopconfirmMessage,V=(0,lr.Z)(function(){return!1}),q=(0,_t.Z)(V,2),ee=q[0],ie=q[1],fe=(0,Yr.J)((0,me.Z)((0,se.Z)().mark(function ve(){var Se;return(0,se.Z)().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.prev=0,ie(!0),de.next=4,w==null?void 0:w(M,k);case 4:return Se=de.sent,ie(!1),de.abrupt("return",Se);case 9:return de.prev=9,de.t0=de.catch(0),console.log(de.t0),ie(!1),de.abrupt("return",null);case 14:case"end":return de.stop()}},ve,null,[[0,9]])})));return U!==!1?(0,Q.jsx)(Ks,{title:N,onConfirm:function(){return fe()},children:(0,Q.jsxs)("a",{children:[ee?(0,Q.jsx)(Bi,{style:{marginInlineEnd:8}}):null,U||"\u5220\u9664"]})},"delete"):null},Lr=function(y){var M=y.recordKey,w=y.tableName,k=y.newLineConfig,U=y.editorType,N=y.onCancel,V=y.cancelEditable,q=y.row,ee=y.cancelText,ie=(0,D.useContext)(X.J),fe=mi.Z.useFormInstance();return(0,Q.jsx)("a",{onClick:function(){var ve=(0,me.Z)((0,se.Z)().mark(function Se(ue){var de,ye,_e,xe,Ue,Ye;return(0,se.Z)().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return ue.stopPropagation(),ue.preventDefault(),ye=U==="Map",_e=[w,M].flat(1).filter(Boolean),xe=(ie==null||(de=ie.getFieldFormatValue)===null||de===void 0?void 0:de.call(ie,_e))||(fe==null?void 0:fe.getFieldValue(_e)),Ue=ye?(0,su.Z)({},_e,xe):xe,at.next=8,N==null?void 0:N(M,Ue,q,k);case 8:return Ye=at.sent,at.next=11,V(M);case 11:return fe.setFieldsValue((0,ne.Z)({},"".concat(M),ye?(0,Ji.Z)(q,_e):q)),at.abrupt("return",Ye);case 13:case"end":return at.stop()}},Se)}));return function(Se){return ve.apply(this,arguments)}}(),children:ee||"\u53D6\u6D88"},"cancel")};function Qi(x,y){var M=y.recordKey,w=y.newLineConfig,k=y.saveText,U=y.deleteText,N=(0,D.forwardRef)(fn),V=(0,D.createRef)();return{save:(0,Q.jsx)(N,(0,j.Z)((0,j.Z)({},y),{},{row:x,ref:V,children:k}),"save"+M),saveRef:V,delete:(w==null?void 0:w.options.recordKey)!==M?(0,Q.jsx)(kn,(0,j.Z)((0,j.Z)({},y),{},{row:x,children:U}),"delete"+M):void 0,cancel:(0,Q.jsx)(Lr,(0,j.Z)((0,j.Z)({},y),{},{row:x}),"cancel"+M)}}function Ba(x){var y=(0,D.useState)(void 0),M=(0,_t.Z)(y,2),w=M[0],k=M[1],U=function(){var Ae=new Map,$e=function st(ut,Pt){ut==null||ut.forEach(function(lt,dt){var tt,ct=Pt==null?dt.toString():Pt+"_"+dt.toString();Ae.set(ct,dn(x.getRowKey(lt,-1))),Ae.set((tt=dn(x.getRowKey(lt,-1)))===null||tt===void 0?void 0:tt.toString(),ct),x.childrenColumnName&<[x.childrenColumnName]&&st(lt[x.childrenColumnName],ct)})};return $e(x.dataSource),Ae},N=(0,D.useMemo)(function(){return U()},[]),V=(0,D.useRef)(N),q=(0,D.useRef)(void 0);(0,Me.Au)(function(){V.current=U()},[x.dataSource]),q.current=w;var ee=x.type||"single",ie=(0,qs.Z)(x.dataSource,"children",x.getRowKey),fe=(0,_t.Z)(ie,1),ve=fe[0],Se=(0,lr.Z)([],{value:x.editableKeys,onChange:x.onChange?function(Ge){var Ae,$e,st;x==null||(Ae=x.onChange)===null||Ae===void 0||Ae.call(x,($e=Ge==null?void 0:Ge.filter(function(ut){return ut!==void 0}))!==null&&$e!==void 0?$e:[],(st=Ge==null?void 0:Ge.map(function(ut){return ve(ut)}).filter(function(ut){return ut!==void 0}))!==null&&st!==void 0?st:[])}:void 0}),ue=(0,_t.Z)(Se,2),de=ue[0],ye=ue[1],_e=(0,D.useMemo)(function(){var Ge=ee==="single"?de==null?void 0:de.slice(0,1):de;return new Set(Ge)},[(de||[]).join(","),ee]),xe=(0,ze.D)(de),Ue=(0,Yr.J)(function(Ge){var Ae,$e,st,ut,Pt=(Ae=x.getRowKey(Ge,Ge.index))===null||Ae===void 0||($e=Ae.toString)===null||$e===void 0?void 0:$e.call(Ae),lt=(st=x.getRowKey(Ge,-1))===null||st===void 0||(ut=st.toString)===null||ut===void 0?void 0:ut.call(st),dt=de==null?void 0:de.map(function(Zt){return Zt==null?void 0:Zt.toString()}),tt=(xe==null?void 0:xe.map(function(Zt){return Zt==null?void 0:Zt.toString()}))||[],ct=x.tableName&&!!(tt!=null&&tt.includes(lt))||!!(tt!=null&&tt.includes(Pt));return{recordKey:lt,isEditable:x.tableName&&(dt==null?void 0:dt.includes(lt))||(dt==null?void 0:dt.includes(Pt)),preIsEditable:ct}}),Ye=(0,Yr.J)(function(Ge){return _e.size>0&&ee==="single"&&x.onlyOneLineEditorAlertMessage!==!1?(bn(x.onlyOneLineEditorAlertMessage||"\u53EA\u80FD\u540C\u65F6\u7F16\u8F91\u4E00\u884C"),!1):(_e.add(Ge),ye(Array.from(_e)),!0)}),ft=(0,Yr.J)(function(){var Ge=(0,me.Z)((0,se.Z)().mark(function Ae($e,st){var ut,Pt;return(0,se.Z)().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(ut=dn($e).toString(),Pt=V.current.get(ut),!(!_e.has(ut)&&Pt&&(st==null||st)&&x.tableName)){dt.next=5;break}return ft(Pt,!1),dt.abrupt("return");case 5:return w&&w.options.recordKey===$e&&k(void 0),_e.delete(ut),_e.delete(dn($e)),ye(Array.from(_e)),dt.abrupt("return",!0);case 10:case"end":return dt.stop()}},Ae)}));return function(Ae,$e){return Ge.apply(this,arguments)}}()),at=(0,pe.D)((0,me.Z)((0,se.Z)().mark(function Ge(){var Ae,$e,st,ut,Pt=arguments;return(0,se.Z)().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:for($e=Pt.length,st=new Array($e),ut=0;ut<$e;ut++)st[ut]=Pt[ut];(Ae=x.onValuesChange)===null||Ae===void 0||Ae.call.apply(Ae,[x].concat(st));case 2:case"end":return dt.stop()}},Ge)})),64),Le=(0,Yr.J)(function(Ge,Ae){var $e;if(x.onValuesChange){var st=x.dataSource;de==null||de.forEach(function(tt){if((w==null?void 0:w.options.recordKey)!==tt){var ct=tt.toString(),Zt=(0,Ji.Z)(Ae,[x.tableName||"",ct].flat(1).filter(function(Wt){return Wt||Wt===0}));Zt&&(st=Fn({data:st,getRowKey:x.getRowKey,row:Zt,key:ct,childrenColumnName:x.childrenColumnName||"children"},"update"))}});var ut=Ge,Pt=($e=Object.keys(ut||{}).pop())===null||$e===void 0?void 0:$e.toString(),lt=(0,j.Z)((0,j.Z)({},w==null?void 0:w.defaultValue),(0,Ji.Z)(Ae,[x.tableName||"",Pt.toString()].flat(1).filter(function(tt){return tt||tt===0}))),dt=V.current.has(dn(Pt))?st.find(function(tt,ct){var Zt,Wt=(Zt=x.getRowKey(tt,ct))===null||Zt===void 0?void 0:Zt.toString();return Wt===Pt}):lt;at.run(dt||lt,st)}}),je=(0,D.useRef)(new Map);(0,D.useEffect)(function(){je.current.forEach(function(Ge,Ae){_e.has(Ae)||je.current.delete(Ae)})},[je,_e]);var Pe=(0,Yr.J)(function(){var Ge=(0,me.Z)((0,se.Z)().mark(function Ae($e,st){var ut,Pt,lt,dt;return(0,se.Z)().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(ut=dn($e),Pt=V.current.get($e.toString()),!(!_e.has(ut)&&Pt&&(st==null||st)&&x.tableName)){ct.next=6;break}return ct.next=5,Pe(Pt,!1);case 5:return ct.abrupt("return",ct.sent);case 6:return lt=je.current.get(ut)||je.current.get(ut.toString()),ct.prev=7,ct.next=10,lt==null||(dt=lt.current)===null||dt===void 0?void 0:dt.save();case 10:ct.next=15;break;case 12:return ct.prev=12,ct.t0=ct.catch(7),ct.abrupt("return",!1);case 15:return _e.delete(ut),_e.delete(ut.toString()),ye(Array.from(_e)),ct.abrupt("return",!0);case 19:case"end":return ct.stop()}},Ae,null,[[7,12]])}));return function(Ae,$e){return Ge.apply(this,arguments)}}()),Te=(0,Yr.J)(function(Ge,Ae){if(Ae!=null&&Ae.parentKey&&!V.current.has(dn(Ae==null?void 0:Ae.parentKey).toString()))return console.warn("can't find record by key",Ae==null?void 0:Ae.parentKey),!1;if(q.current&&x.onlyAddOneLineAlertMessage!==!1)return bn(x.onlyAddOneLineAlertMessage||"\u53EA\u80FD\u65B0\u589E\u4E00\u884C"),!1;if(_e.size>0&&ee==="single"&&x.onlyOneLineEditorAlertMessage!==!1)return bn(x.onlyOneLineEditorAlertMessage||"\u53EA\u80FD\u540C\u65F6\u7F16\u8F91\u4E00\u884C"),!1;var $e=x.getRowKey(Ge,-1);if(!$e&&$e!==0)throw(0,Pi.ET)(!!$e,`\u8BF7\u8BBE\u7F6E recordCreatorProps.record \u5E76\u8FD4\u56DE\u4E00\u4E2A\u552F\u4E00\u7684key
|
|
https://procomponents.ant.design/components/editable-table#editable-%E6%96%B0%E5%BB%BA%E8%A1%8C`),new Error("\u8BF7\u8BBE\u7F6E recordCreatorProps.record \u5E76\u8FD4\u56DE\u4E00\u4E2A\u552F\u4E00\u7684key");if(_e.add($e),ye(Array.from(_e)),(Ae==null?void 0:Ae.newRecordType)==="dataSource"||x.tableName){var st,ut={data:x.dataSource,getRowKey:x.getRowKey,row:(0,j.Z)((0,j.Z)({},Ge),{},{map_row_parentKey:Ae!=null&&Ae.parentKey?(st=dn(Ae==null?void 0:Ae.parentKey))===null||st===void 0?void 0:st.toString():void 0}),key:$e,childrenColumnName:x.childrenColumnName||"children"};x.setDataSource(Fn(ut,(Ae==null?void 0:Ae.position)==="top"?"top":"update"))}else k({defaultValue:Ge,options:(0,j.Z)((0,j.Z)({},Ae),{},{recordKey:$e})});return!0}),Oe=(0,yt.YB)(),Ve=(x==null?void 0:x.saveText)||Oe.getMessage("editableTable.action.save","\u4FDD\u5B58"),Mt=(x==null?void 0:x.deleteText)||Oe.getMessage("editableTable.action.delete","\u5220\u9664"),it=(x==null?void 0:x.cancelText)||Oe.getMessage("editableTable.action.cancel","\u53D6\u6D88"),le=(0,Yr.J)(function(){var Ge=(0,me.Z)((0,se.Z)().mark(function Ae($e,st,ut,Pt){var lt,dt,tt,ct,Zt,Wt,Rn;return(0,se.Z)().wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,x==null||(lt=x.onSave)===null||lt===void 0?void 0:lt.call(x,$e,st,ut,Pt);case 2:return ct=hn.sent,hn.next=5,ft($e);case 5:if(Zt=Pt||q.current||{},Wt=Zt.options,!(!(Wt!=null&&Wt.parentKey)&&(Wt==null?void 0:Wt.recordKey)===$e)){hn.next=9;break}return(Wt==null?void 0:Wt.position)==="top"?x.setDataSource([st].concat((0,Qe.Z)(x.dataSource))):x.setDataSource([].concat((0,Qe.Z)(x.dataSource),[st])),hn.abrupt("return",ct);case 9:return Rn={data:x.dataSource,getRowKey:x.getRowKey,row:Wt?(0,j.Z)((0,j.Z)({},st),{},{map_row_parentKey:(dt=dn((tt=Wt==null?void 0:Wt.parentKey)!==null&&tt!==void 0?tt:""))===null||dt===void 0?void 0:dt.toString()}):st,key:$e,childrenColumnName:x.childrenColumnName||"children"},x.setDataSource(Fn(Rn,(Wt==null?void 0:Wt.position)==="top"?"top":"update")),hn.next=13,ft($e);case 13:return hn.abrupt("return",ct);case 14:case"end":return hn.stop()}},Ae)}));return function(Ae,$e,st,ut){return Ge.apply(this,arguments)}}()),Ze=(0,Yr.J)(function(){var Ge=(0,me.Z)((0,se.Z)().mark(function Ae($e,st){var ut,Pt,lt;return(0,se.Z)().wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return Pt={data:x.dataSource,getRowKey:x.getRowKey,row:st,key:$e,childrenColumnName:x.childrenColumnName||"children"},tt.next=3,x==null||(ut=x.onDelete)===null||ut===void 0?void 0:ut.call(x,$e,st);case 3:return lt=tt.sent,tt.next=6,ft($e,!1);case 6:return x.setDataSource(Fn(Pt,"delete")),tt.abrupt("return",lt);case 8:case"end":return tt.stop()}},Ae)}));return function(Ae,$e){return Ge.apply(this,arguments)}}()),Ke=(0,Yr.J)(function(){var Ge=(0,me.Z)((0,se.Z)().mark(function Ae($e,st,ut,Pt){var lt,dt;return(0,se.Z)().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.next=2,x==null||(lt=x.onCancel)===null||lt===void 0?void 0:lt.call(x,$e,st,ut,Pt);case 2:return dt=ct.sent,ct.abrupt("return",dt);case 4:case"end":return ct.stop()}},Ae)}));return function(Ae,$e,st,ut){return Ge.apply(this,arguments)}}()),nt=function(Ae){var $e=x.getRowKey(Ae,Ae.index),st={saveText:Ve,cancelText:it,deleteText:Mt,addEditRecord:Te,recordKey:$e,cancelEditable:ft,index:Ae.index,tableName:x.tableName,newLineConfig:w,onCancel:Ke,onDelete:Ze,onSave:le,editableKeys:de,setEditableRowKeys:ye,deletePopconfirmMessage:x.deletePopconfirmMessage||"".concat(Oe.getMessage("deleteThisLine","\u5220\u9664\u6B64\u9879"),"?")},ut=Qi(Ae,st);return x.tableName?je.current.set(V.current.get(dn($e))||dn($e),ut.saveRef):je.current.set(dn($e),ut.saveRef),x.actionRender?x.actionRender(Ae,st,{save:ut.save,delete:ut.delete,cancel:ut.cancel}):[ut.save,ut.delete,ut.cancel]};return{editableKeys:de,setEditableRowKeys:ye,isEditable:Ue,actionRender:nt,startEditable:Ye,cancelEditable:ft,addEditRecord:Te,saveEditable:Pe,newLineRecord:w,preEditableKeys:xe,onValuesChange:Le,getRealIndex:x.getRealIndex}}var yi=Y(51812),mr=Y(53914),Ma=Y(78164),ea=Y(72051),Zi=Y(72378),ga=Y.n(Zi),za=function(y){return y!=null};function wl(x,y,M){var w,k;if(x===!1)return!1;var U=y.total,N=y.current,V=y.pageSize,q=y.setPageInfo,ee=(0,wt.Z)(x)==="object"?x:{};return(0,j.Z)((0,j.Z)({showTotal:function(fe,ve){return"".concat(M.getMessage("pagination.total.range","\u7B2C")," ").concat(ve[0],"-").concat(ve[1]," ").concat(M.getMessage("pagination.total.total","\u6761/\u603B\u5171")," ").concat(fe," ").concat(M.getMessage("pagination.total.item","\u6761"))},total:U},ee),{},{current:x!==!0&&x&&(w=x.current)!==null&&w!==void 0?w:N,pageSize:x!==!0&&x&&(k=x.pageSize)!==null&&k!==void 0?k:V,onChange:function(fe,ve){var Se=x,ue=Se.onChange;ue==null||ue(fe,ve||20),(ve!==V||N!==fe)&&q({pageSize:ve,current:fe})}})}function ks(x,y,M){var w=(0,j.Z)((0,j.Z)({},M.editableUtils),{},{pageInfo:y.pageInfo,reload:function(){var k=(0,me.Z)((0,se.Z)().mark(function N(V){return(0,se.Z)().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(!V){ee.next=3;break}return ee.next=3,y.setPageInfo({current:1});case 3:return ee.next=5,y==null?void 0:y.reload();case 5:case"end":return ee.stop()}},N)}));function U(N){return k.apply(this,arguments)}return U}(),reloadAndRest:function(){var k=(0,me.Z)((0,se.Z)().mark(function N(){return(0,se.Z)().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return M.onCleanSelected(),q.next=3,y.setPageInfo({current:1});case 3:return q.next=5,y==null?void 0:y.reload();case 5:case"end":return q.stop()}},N)}));function U(){return k.apply(this,arguments)}return U}(),reset:function(){var k=(0,me.Z)((0,se.Z)().mark(function N(){var V;return(0,se.Z)().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ee.next=2,M.resetAll();case 2:return ee.next=4,y==null||(V=y.reset)===null||V===void 0?void 0:V.call(y);case 4:return ee.next=6,y==null?void 0:y.reload();case 6:case"end":return ee.stop()}},N)}));function U(){return k.apply(this,arguments)}return U}(),fullScreen:function(){return M.fullScreen()},clearSelected:function(){return M.onCleanSelected()},setPageInfo:function(U){return y.setPageInfo(U)}});x.current=w}function Js(x,y){return y.filter(function(M){return M}).length<1?x:y.reduce(function(M,w){return w(M)},x)}var hs=function(y,M){return M===void 0?!1:typeof M=="boolean"?M:M[y]},js=function(y){var M;return y&&(0,wt.Z)(y)==="object"&&(y==null||(M=y.props)===null||M===void 0?void 0:M.colSpan)},Ro=function(y,M){return y?Array.isArray(y)?y.join("-"):y.toString():"".concat(M)};function Sl(x){return Array.isArray(x)?x.join(","):x==null?void 0:x.toString()}function lu(x){var y={},M={};return x.forEach(function(w){var k=Sl(w.dataIndex);if(k){if(w.filters){var U=w.defaultFilteredValue;U===void 0?y[k]=null:y[k]=w.defaultFilteredValue}w.sorter&&w.defaultSortOrder&&(M[k]=w.defaultSortOrder)}}),{sort:M,filter:y}}function ic(){var x,y,M,w,k,U,N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},V=(0,D.useRef)(),q=(0,D.useRef)(null),ee=(0,D.useRef)(),ie=(0,D.useRef)(),fe=(0,D.useState)(""),ve=(0,_t.Z)(fe,2),Se=ve[0],ue=ve[1],de=(0,D.useRef)([]),ye=(0,lr.Z)(function(){return N.size||N.defaultSize||"middle"},{value:N.size,onChange:N.onSizeChange}),_e=(0,_t.Z)(ye,2),xe=_e[0],Ue=_e[1],Ye=(0,D.useMemo)(function(){var Oe,Ve;if(N!=null&&(Oe=N.columnsState)!==null&&Oe!==void 0&&Oe.defaultValue)return N.columnsState.defaultValue;var Mt={};return(Ve=N.columns)===null||Ve===void 0||Ve.forEach(function(it,le){var Ze=it.key,Ke=it.dataIndex,nt=it.fixed,Ge=it.disable,Ae=Ro(Ze!=null?Ze:Ke,le);Ae&&(Mt[Ae]={show:!0,fixed:nt,disable:Ge})}),Mt},[N.columns]),ft=(0,lr.Z)(function(){var Oe,Ve,Mt=N.columnsState||{},it=Mt.persistenceType,le=Mt.persistenceKey;if(le&&it&&typeof window!="undefined"){var Ze=window[it];try{var Ke=Ze==null?void 0:Ze.getItem(le);if(Ke){var nt;if(N!=null&&(nt=N.columnsState)!==null&&nt!==void 0&&nt.defaultValue){var Ge;return ga()(JSON.parse(Ke),N==null||(Ge=N.columnsState)===null||Ge===void 0?void 0:Ge.defaultValue)}return JSON.parse(Ke)}}catch(Ae){console.warn(Ae)}}return N.columnsStateMap||((Oe=N.columnsState)===null||Oe===void 0?void 0:Oe.value)||((Ve=N.columnsState)===null||Ve===void 0?void 0:Ve.defaultValue)||Ye},{value:((x=N.columnsState)===null||x===void 0?void 0:x.value)||N.columnsStateMap,onChange:((y=N.columnsState)===null||y===void 0?void 0:y.onChange)||N.onColumnsStateChange}),at=(0,_t.Z)(ft,2),Le=at[0],je=at[1];(0,D.useEffect)(function(){var Oe=N.columnsState||{},Ve=Oe.persistenceType,Mt=Oe.persistenceKey;if(Mt&&Ve&&typeof window!="undefined"){var it=window[Ve];try{var le=it==null?void 0:it.getItem(Mt);if(le){var Ze;if(N!=null&&(Ze=N.columnsState)!==null&&Ze!==void 0&&Ze.defaultValue){var Ke;je(ga()(JSON.parse(le),N==null||(Ke=N.columnsState)===null||Ke===void 0?void 0:Ke.defaultValue))}else je(JSON.parse(le))}else je(Ye)}catch(nt){console.warn(nt)}}},[(M=N.columnsState)===null||M===void 0?void 0:M.persistenceKey,(w=N.columnsState)===null||w===void 0?void 0:w.persistenceType,Ye]),(0,Pi.ET)(!N.columnsStateMap,"columnsStateMap\u5DF2\u7ECF\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 columnsState.value \u66FF\u6362"),(0,Pi.ET)(!N.columnsStateMap,"columnsStateMap has been discarded, please use columnsState.value replacement");var Pe=(0,D.useCallback)(function(){var Oe=N.columnsState||{},Ve=Oe.persistenceType,Mt=Oe.persistenceKey;if(!(!Mt||!Ve||typeof window=="undefined")){var it=window[Ve];try{it==null||it.removeItem(Mt)}catch(le){console.warn(le)}}},[N.columnsState]);(0,D.useEffect)(function(){var Oe,Ve;if(!(!((Oe=N.columnsState)!==null&&Oe!==void 0&&Oe.persistenceKey)||!((Ve=N.columnsState)!==null&&Ve!==void 0&&Ve.persistenceType))&&typeof window!="undefined"){var Mt=N.columnsState,it=Mt.persistenceType,le=Mt.persistenceKey,Ze=window[it];try{Ze==null||Ze.setItem(le,JSON.stringify(Le))}catch(Ke){console.warn(Ke),Pe()}}},[(k=N.columnsState)===null||k===void 0?void 0:k.persistenceKey,Le,(U=N.columnsState)===null||U===void 0?void 0:U.persistenceType]);var Te={action:V.current,setAction:function(Ve){V.current=Ve},sortKeyColumns:de.current,setSortKeyColumns:function(Ve){de.current=Ve},propsRef:ie,columnsMap:Le,keyWords:Se,setKeyWords:function(Ve){return ue(Ve)},setTableSize:Ue,tableSize:xe,prefixName:ee.current,setPrefixName:function(Ve){ee.current=Ve},setColumnsMap:je,columns:N.columns,rootDomRef:q,clearPersistenceStorage:Pe,defaultColumnKeyMap:Ye};return Object.defineProperty(Te,"prefixName",{get:function(){return ee.current}}),Object.defineProperty(Te,"sortKeyColumns",{get:function(){return de.current}}),Object.defineProperty(Te,"action",{get:function(){return V.current}}),Te}var uo=(0,D.createContext)({}),cf=function(y){var M=ic(y.initValue);return(0,Q.jsx)(uo.Provider,{value:M,children:y.children})},Ol=Y(78957),uf=function(y){return(0,ne.Z)({},y.componentCls,{marginBlockEnd:16,backgroundColor:(0,Mr.uK)(y.colorTextBase,.02),borderRadius:y.borderRadius,border:"none","&-container":{paddingBlock:y.paddingSM,paddingInline:y.paddingLG},"&-info":{display:"flex",alignItems:"center",transition:"all 0.3s",color:y.colorTextTertiary,"&-content":{flex:1},"&-option":{minWidth:48,paddingInlineStart:16}}})};function ac(x){return(0,Mr.Xj)("ProTableAlert",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[uf(M)]})}var Xd=function(y){var M=y.intl,w=y.onCleanSelected;return[(0,Q.jsx)("a",{onClick:w,children:M.getMessage("alert.clear","\u6E05\u7A7A")},"0")]};function ff(x){var y=x.selectedRowKeys,M=y===void 0?[]:y,w=x.onCleanSelected,k=x.alwaysShowAlert,U=x.selectedRows,N=x.alertInfoRender,V=N===void 0?function(Ue){var Ye=Ue.intl;return(0,Q.jsxs)(Ol.Z,{children:[Ye.getMessage("alert.selected","\u5DF2\u9009\u62E9"),M.length,Ye.getMessage("alert.item","\u9879"),"\xA0\xA0"]})}:N,q=x.alertOptionRender,ee=q===void 0?Xd:q,ie=(0,yt.YB)(),fe=ee&&ee({onCleanSelected:w,selectedRowKeys:M,selectedRows:U,intl:ie}),ve=(0,D.useContext)(pr.ZP.ConfigContext),Se=ve.getPrefixCls,ue=Se("pro-table-alert"),de=ac(ue),ye=de.wrapSSR,_e=de.hashId;if(V===!1)return null;var xe=V({intl:ie,selectedRowKeys:M,selectedRows:U,onCleanSelected:w});return xe===!1||M.length<1&&!k?null:ye((0,Q.jsx)("div",{className:"".concat(ue," ").concat(_e).trim(),children:(0,Q.jsx)("div",{className:"".concat(ue,"-container ").concat(_e).trim(),children:(0,Q.jsxs)("div",{className:"".concat(ue,"-info ").concat(_e).trim(),children:[(0,Q.jsx)("div",{className:"".concat(ue,"-info-content ").concat(_e).trim(),children:xe}),fe?(0,Q.jsx)("div",{className:"".concat(ue,"-info-option ").concat(_e).trim(),children:fe}):null]})})}))}var Kd=ff,oc=Y(43144),ps=Y(15671),Ua=Y(97326),Qs=Y(32531),df=Y(29388),cu=Y(60249);function sc(){var x=(0,D.useState)(!0),y=(0,_t.Z)(x,2),M=y[1],w=(0,D.useCallback)(function(){return M(function(k){return!k})},[]);return w}function uu(x,y){var M=(0,D.useMemo)(function(){var w={current:y};return new Proxy(w,{set:function(U,N,V){return Object.is(U[N],V)||(U[N]=V,x(M)),!0}})},[]);return M}function hf(x){var y=sc(),M=uu(y,x);return M}var Cl=Y(51280),Io=Y(22270),$i=Y(74138),lc=Y(73177),qd=Y(85265),Ds=Y(73935),El=Y(78733),xr=function(y){return(0,ne.Z)({},y.componentCls,{"&-sidebar-dragger":{width:"5px",cursor:"ew-resize",padding:"4px 0 0",borderTop:"1px solid transparent",position:"absolute",top:0,left:0,bottom:0,zIndex:100,backgroundColor:"transparent","&-min-disabled":{cursor:"w-resize"},"&-max-disabled":{cursor:"e-resize"}}})};function pf(x){return(0,Mr.Xj)("DrawerForm",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[xr(M)]})}var vf=["children","trigger","onVisibleChange","drawerProps","onFinish","submitTimeout","title","width","resize","onOpenChange","visible","open"];function Xa(x){var y,M,w=x.children,k=x.trigger,U=x.onVisibleChange,N=x.drawerProps,V=x.onFinish,q=x.submitTimeout,ee=x.title,ie=x.width,fe=x.resize,ve=x.onOpenChange,Se=x.visible,ue=x.open,de=(0,Xe.Z)(x,vf);(0,Pi.ET)(!de.footer||!(N!=null&&N.footer),"DrawerForm \u662F\u4E00\u4E2A ProForm \u7684\u7279\u6B8A\u5E03\u5C40\uFF0C\u5982\u679C\u60F3\u81EA\u5B9A\u4E49\u6309\u94AE\uFF0C\u8BF7\u4F7F\u7528 submit.render \u81EA\u5B9A\u4E49\u3002");var ye=D.useMemo(function(){var Yt,qe,pt,bt={onResize:function(){},maxWidth:window.innerWidth*.8,minWidth:300};return typeof fe=="boolean"?fe?bt:{}:(0,yi.Y)({onResize:(Yt=fe==null?void 0:fe.onResize)!==null&&Yt!==void 0?Yt:bt.onResize,maxWidth:(qe=fe==null?void 0:fe.maxWidth)!==null&&qe!==void 0?qe:bt.maxWidth,minWidth:(pt=fe==null?void 0:fe.minWidth)!==null&&pt!==void 0?pt:bt.minWidth})},[fe]),_e=(0,D.useContext)(pr.ZP.ConfigContext),xe=_e.getPrefixCls("pro-form-drawer"),Ue=pf(xe),Ye=Ue.wrapSSR,ft=Ue.hashId,at=function(qe){return"".concat(xe,"-").concat(qe," ").concat(ft)},Le=(0,D.useState)([]),je=(0,_t.Z)(Le,2),Pe=je[1],Te=(0,D.useState)(!1),Oe=(0,_t.Z)(Te,2),Ve=Oe[0],Mt=Oe[1],it=(0,D.useState)(!1),le=(0,_t.Z)(it,2),Ze=le[0],Ke=le[1],nt=(0,D.useState)(ie||(fe?ye==null?void 0:ye.minWidth:800)),Ge=(0,_t.Z)(nt,2),Ae=Ge[0],$e=Ge[1],st=(0,lr.Z)(!!Se,{value:ue||Se,onChange:ve||U}),ut=(0,_t.Z)(st,2),Pt=ut[0],lt=ut[1],dt=(0,D.useRef)(null),tt=(0,D.useCallback)(function(Yt){dt.current===null&&Yt&&Pe([]),dt.current=Yt},[]),ct=(0,D.useRef)(),Zt=(0,D.useCallback)(function(){var Yt,qe,pt,bt=(Yt=(qe=(pt=de.formRef)===null||pt===void 0?void 0:pt.current)!==null&&qe!==void 0?qe:de.form)!==null&&Yt!==void 0?Yt:ct.current;bt&&N!==null&&N!==void 0&&N.destroyOnClose&&bt.resetFields()},[N==null?void 0:N.destroyOnClose,de.form,de.formRef]);(0,D.useEffect)(function(){Pt&&(ue||Se)&&(ve==null||ve(!0),U==null||U(!0)),Ze&&$e(ye==null?void 0:ye.minWidth)},[Se,Pt,Ze]),(0,D.useImperativeHandle)(de.formRef,function(){return ct.current},[ct.current]);var Wt=(0,D.useMemo)(function(){return k?D.cloneElement(k,(0,j.Z)((0,j.Z)({key:"trigger"},k.props),{},{onClick:function(){var Yt=(0,me.Z)((0,se.Z)().mark(function pt(bt){var yn,On;return(0,se.Z)().wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:lt(!Pt),Ke(!Object.keys(ye)),(yn=k.props)===null||yn===void 0||(On=yn.onClick)===null||On===void 0||On.call(yn,bt);case 3:case"end":return tr.stop()}},pt)}));function qe(pt){return Yt.apply(this,arguments)}return qe}()})):null},[lt,k,Pt,Ke,Ze]),Rn=(0,D.useMemo)(function(){var Yt,qe,pt,bt;return de.submitter===!1?!1:ga()({searchConfig:{submitText:(Yt=(qe=_e.locale)===null||qe===void 0||(qe=qe.Modal)===null||qe===void 0?void 0:qe.okText)!==null&&Yt!==void 0?Yt:"\u786E\u8BA4",resetText:(pt=(bt=_e.locale)===null||bt===void 0||(bt=bt.Modal)===null||bt===void 0?void 0:bt.cancelText)!==null&&pt!==void 0?pt:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:q?Ve:void 0,onClick:function(On){var pn;lt(!1),N==null||(pn=N.onClose)===null||pn===void 0||pn.call(N,On)}}},de.submitter)},[de.submitter,(y=_e.locale)===null||y===void 0||(y=y.Modal)===null||y===void 0?void 0:y.okText,(M=_e.locale)===null||M===void 0||(M=M.Modal)===null||M===void 0?void 0:M.cancelText,q,Ve,lt,N]),ar=(0,D.useCallback)(function(Yt,qe){return(0,Q.jsxs)(Q.Fragment,{children:[Yt,dt.current&&qe?(0,Q.jsx)(D.Fragment,{children:(0,Ds.createPortal)(qe,dt.current)},"submitter"):qe]})},[]),hn=(0,Yr.J)(function(){var Yt=(0,me.Z)((0,se.Z)().mark(function qe(pt){var bt,yn,On;return(0,se.Z)().wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return bt=V==null?void 0:V(pt),q&&bt instanceof Promise&&(Mt(!0),yn=setTimeout(function(){return Mt(!1)},q),bt.finally(function(){clearTimeout(yn),Mt(!1)})),tr.next=4,bt;case 4:return On=tr.sent,On&<(!1),tr.abrupt("return",On);case 7:case"end":return tr.stop()}},qe)}));return function(qe){return Yt.apply(this,arguments)}}()),Yn=(0,lc.X)(Pt,U),Or=(0,D.useCallback)(function(Yt){var qe,pt,bt=(document.body.offsetWidth||1e3)-(Yt.clientX-document.body.offsetLeft),yn=(qe=ye==null?void 0:ye.minWidth)!==null&&qe!==void 0?qe:ie||800,On=(pt=ye==null?void 0:ye.maxWidth)!==null&&pt!==void 0?pt:window.innerWidth*.8;if(bt<yn){$e(yn);return}if(bt>On){$e(On);return}$e(bt)},[ye==null?void 0:ye.maxWidth,ye==null?void 0:ye.minWidth,ie]),Ai=(0,D.useCallback)(function(){document.removeEventListener("mousemove",Or),document.removeEventListener("mouseup",Ai)},[Or]);return Ye((0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(qd.Z,(0,j.Z)((0,j.Z)((0,j.Z)({title:ee,width:Ae},N),Yn),{},{afterOpenChange:function(qe){var pt;qe||Zt(),N==null||(pt=N.afterOpenChange)===null||pt===void 0||pt.call(N,qe)},onClose:function(qe){var pt;q&&Ve||(lt(!1),N==null||(pt=N.onClose)===null||pt===void 0||pt.call(N,qe))},footer:de.submitter!==!1&&(0,Q.jsx)("div",{ref:tt,style:{display:"flex",justifyContent:"flex-end"}}),children:[fe?(0,Q.jsx)("div",{className:Fe()(at("sidebar-dragger"),ft,(0,ne.Z)((0,ne.Z)({},at("sidebar-dragger-min-disabled"),Ae===(ye==null?void 0:ye.minWidth)),at("sidebar-dragger-max-disabled"),Ae===(ye==null?void 0:ye.maxWidth))),onMouseDown:function(qe){var pt;ye==null||(pt=ye.onResize)===null||pt===void 0||pt.call(ye),qe.stopPropagation(),qe.preventDefault(),document.addEventListener("mousemove",Or),document.addEventListener("mouseup",Ai),Ke(!0)}}):null,(0,Q.jsx)(Q.Fragment,{children:(0,Q.jsx)(El.I,(0,j.Z)((0,j.Z)({formComponentType:"DrawerForm",layout:"vertical"},de),{},{formRef:ct,onInit:function(qe,pt){var bt;de.formRef&&(de.formRef.current=pt),de==null||(bt=de.onInit)===null||bt===void 0||bt.call(de,qe,pt),ct.current=pt},submitter:Rn,onFinish:function(){var Yt=(0,me.Z)((0,se.Z)().mark(function qe(pt){var bt;return(0,se.Z)().wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,hn(pt);case 2:return bt=On.sent,On.abrupt("return",bt);case 4:case"end":return On.stop()}},qe)}));return function(qe){return Yt.apply(this,arguments)}}(),contentRender:ar,children:w}))})]})),Wt]}))}var Jd={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},gf=Jd,cc=Y(46976),uc=function(y,M){return D.createElement(cc.Z,(0,we.Z)({},y,{ref:M,icon:gf}))},fu=D.forwardRef(uc),fc=Y(98912),Qd=Y(1336),eh=function(y){return(0,ne.Z)({},y.componentCls,{lineHeight:"30px","&::before":{display:"block",height:0,visibility:"hidden",content:"'.'"},"&-small":{lineHeight:y.lineHeight},"&-container":{display:"flex",flexWrap:"wrap",gap:y.marginXS},"&-item":(0,ne.Z)({whiteSpace:"nowrap"},"".concat(y.antCls,"-form-item"),{marginBlock:0}),"&-line":{minWidth:"198px"},"&-line:not(:first-child)":{marginBlockStart:"16px",marginBlockEnd:8},"&-collapse-icon":{width:y.controlHeight,height:y.controlHeight,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},"&-effective":(0,ne.Z)({},"".concat(y.componentCls,"-collapse-icon"),{backgroundColor:y.colorBgTextHover})})};function Ml(x){return(0,Mr.Xj)("LightFilter",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[eh(M)]})}var th=["size","collapse","collapseLabel","initialValues","onValuesChange","form","placement","formRef","bordered","ignoreRules","footerRender"],mf=function(y){var M=y.items,w=y.prefixCls,k=y.size,U=k===void 0?"middle":k,N=y.collapse,V=y.collapseLabel,q=y.onValuesChange,ee=y.bordered,ie=y.values,fe=y.footerRender,ve=y.placement,Se=(0,yt.YB)(),ue="".concat(w,"-light-filter"),de=Ml(ue),ye=de.wrapSSR,_e=de.hashId,xe=(0,D.useState)(!1),Ue=(0,_t.Z)(xe,2),Ye=Ue[0],ft=Ue[1],at=(0,D.useState)(function(){return(0,j.Z)({},ie)}),Le=(0,_t.Z)(at,2),je=Le[0],Pe=Le[1];(0,D.useEffect)(function(){Pe((0,j.Z)({},ie))},[ie]);var Te=(0,D.useMemo)(function(){var it=[],le=[];return M.forEach(function(Ze){var Ke=Ze.props||{},nt=Ke.secondary;nt||N?it.push(Ze):le.push(Ze)}),{collapseItems:it,outsideItems:le}},[y.items]),Oe=Te.collapseItems,Ve=Te.outsideItems,Mt=function(){return V||(N?(0,Q.jsx)(fu,{className:"".concat(ue,"-collapse-icon ").concat(_e).trim()}):(0,Q.jsx)(fc.Q,{size:U,label:Se.getMessage("form.lightFilter.more","\u66F4\u591A\u7B5B\u9009")}))};return ye((0,Q.jsx)("div",{className:Fe()(ue,_e,"".concat(ue,"-").concat(U),(0,ne.Z)({},"".concat(ue,"-effective"),Object.keys(ie).some(function(it){return Array.isArray(ie[it])?ie[it].length>0:ie[it]}))),children:(0,Q.jsxs)("div",{className:"".concat(ue,"-container ").concat(_e).trim(),children:[Ve.map(function(it,le){var Ze=it.key,Ke=it.props.fieldProps,nt=Ke!=null&&Ke.placement?Ke==null?void 0:Ke.placement:ve;return(0,Q.jsx)("div",{className:"".concat(ue,"-item ").concat(_e).trim(),children:D.cloneElement(it,{fieldProps:(0,j.Z)((0,j.Z)({},it.props.fieldProps),{},{placement:nt}),proFieldProps:(0,j.Z)((0,j.Z)({},it.props.proFieldProps),{},{light:!0,label:it.props.label,bordered:ee}),bordered:ee})},Ze||le)}),Oe.length?(0,Q.jsx)("div",{className:"".concat(ue,"-item ").concat(_e).trim(),children:(0,Q.jsx)(Qd.M,{padding:24,open:Ye,onOpenChange:function(le){ft(le)},placement:ve,label:Mt(),footerRender:fe,footer:{onConfirm:function(){q((0,j.Z)({},je)),ft(!1)},onClear:function(){var le={};Oe.forEach(function(Ze){var Ke=Ze.props.name;le[Ke]=void 0}),q(le)}},children:Oe.map(function(it){var le=it.key,Ze=it.props,Ke=Ze.name,nt=Ze.fieldProps,Ge=(0,j.Z)((0,j.Z)({},nt),{},{onChange:function(st){return Pe((0,j.Z)((0,j.Z)({},je),{},(0,ne.Z)({},Ke,st!=null&&st.target?st.target.value:st))),!1}});je.hasOwnProperty(Ke)&&(Ge[it.props.valuePropName||"value"]=je[Ke]);var Ae=nt!=null&&nt.placement?nt==null?void 0:nt.placement:ve;return(0,Q.jsx)("div",{className:"".concat(ue,"-line ").concat(_e).trim(),children:D.cloneElement(it,{fieldProps:(0,j.Z)((0,j.Z)({},Ge),{},{placement:Ae})})},le)})})},"more"):null]})}))};function dc(x){var y=x.size,M=x.collapse,w=x.collapseLabel,k=x.initialValues,U=x.onValuesChange,N=x.form,V=x.placement,q=x.formRef,ee=x.bordered,ie=x.ignoreRules,fe=x.footerRender,ve=(0,Xe.Z)(x,th),Se=(0,D.useContext)(pr.ZP.ConfigContext),ue=Se.getPrefixCls,de=ue("pro-form"),ye=(0,D.useState)(function(){return(0,j.Z)({},k)}),_e=(0,_t.Z)(ye,2),xe=_e[0],Ue=_e[1],Ye=(0,D.useRef)();return(0,D.useImperativeHandle)(q,function(){return Ye.current},[Ye.current]),(0,Q.jsx)(El.I,(0,j.Z)((0,j.Z)({size:y,initialValues:k,form:N,contentRender:function(at){return(0,Q.jsx)(mf,{prefixCls:de,items:at==null?void 0:at.flatMap(function(Le){return(Le==null?void 0:Le.type.displayName)==="ProForm-Group"?Le.props.children:Le}),size:y,bordered:ee,collapse:M,collapseLabel:w,placement:V,values:xe||{},footerRender:fe,onValuesChange:function(je){var Pe,Te,Oe=(0,j.Z)((0,j.Z)({},xe),je);Ue(Oe),(Pe=Ye.current)===null||Pe===void 0||Pe.setFieldsValue(Oe),(Te=Ye.current)===null||Te===void 0||Te.submit(),U&&U(je,Oe)}})},formRef:Ye,formItemProps:{colon:!1,labelAlign:"left"},fieldProps:{style:{width:void 0}}},(0,Ln.Z)(ve,["labelWidth"])),{},{onValuesChange:function(at,Le){var je;Ue(Le),U==null||U(at,Le),(je=Ye.current)===null||je===void 0||je.submit()}}))}var Wi=Y(17788),bi=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function Ti(x){var y,M,w=x.children,k=x.trigger,U=x.onVisibleChange,N=x.onOpenChange,V=x.modalProps,q=x.onFinish,ee=x.submitTimeout,ie=x.title,fe=x.width,ve=x.visible,Se=x.open,ue=(0,Xe.Z)(x,bi);(0,Pi.ET)(!ue.footer||!(V!=null&&V.footer),"ModalForm \u662F\u4E00\u4E2A ProForm \u7684\u7279\u6B8A\u5E03\u5C40\uFF0C\u5982\u679C\u60F3\u81EA\u5B9A\u4E49\u6309\u94AE\uFF0C\u8BF7\u4F7F\u7528 submit.render \u81EA\u5B9A\u4E49\u3002");var de=(0,D.useContext)(pr.ZP.ConfigContext),ye=(0,D.useState)([]),_e=(0,_t.Z)(ye,2),xe=_e[1],Ue=(0,D.useState)(!1),Ye=(0,_t.Z)(Ue,2),ft=Ye[0],at=Ye[1],Le=(0,lr.Z)(!!ve,{value:Se||ve,onChange:N||U}),je=(0,_t.Z)(Le,2),Pe=je[0],Te=je[1],Oe=(0,D.useRef)(null),Ve=(0,D.useCallback)(function(Ae){Oe.current===null&&Ae&&xe([]),Oe.current=Ae},[]),Mt=(0,D.useRef)(),it=(0,D.useCallback)(function(){var Ae,$e,st,ut=(Ae=($e=ue.form)!==null&&$e!==void 0?$e:(st=ue.formRef)===null||st===void 0?void 0:st.current)!==null&&Ae!==void 0?Ae:Mt.current;ut&&V!==null&&V!==void 0&&V.destroyOnClose&&ut.resetFields()},[V==null?void 0:V.destroyOnClose,ue.form,ue.formRef]);(0,D.useImperativeHandle)(ue.formRef,function(){return Mt.current},[Mt.current]),(0,D.useEffect)(function(){Pe&&(Se||ve)&&(N==null||N(!0),U==null||U(!0))},[ve,Se,Pe]);var le=(0,D.useMemo)(function(){return k?D.cloneElement(k,(0,j.Z)((0,j.Z)({key:"trigger"},k.props),{},{onClick:function(){var Ae=(0,me.Z)((0,se.Z)().mark(function st(ut){var Pt,lt;return(0,se.Z)().wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:Te(!Pe),(Pt=k.props)===null||Pt===void 0||(lt=Pt.onClick)===null||lt===void 0||lt.call(Pt,ut);case 2:case"end":return tt.stop()}},st)}));function $e(st){return Ae.apply(this,arguments)}return $e}()})):null},[Te,k,Pe]),Ze=(0,D.useMemo)(function(){var Ae,$e,st,ut,Pt,lt;return ue.submitter===!1?!1:ga()({searchConfig:{submitText:(Ae=($e=V==null?void 0:V.okText)!==null&&$e!==void 0?$e:(st=de.locale)===null||st===void 0||(st=st.Modal)===null||st===void 0?void 0:st.okText)!==null&&Ae!==void 0?Ae:"\u786E\u8BA4",resetText:(ut=(Pt=V==null?void 0:V.cancelText)!==null&&Pt!==void 0?Pt:(lt=de.locale)===null||lt===void 0||(lt=lt.Modal)===null||lt===void 0?void 0:lt.cancelText)!==null&&ut!==void 0?ut:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:ee?ft:void 0,onClick:function(tt){var ct;Te(!1),V==null||(ct=V.onCancel)===null||ct===void 0||ct.call(V,tt)}}},ue.submitter)},[(y=de.locale)===null||y===void 0||(y=y.Modal)===null||y===void 0?void 0:y.cancelText,(M=de.locale)===null||M===void 0||(M=M.Modal)===null||M===void 0?void 0:M.okText,V,ue.submitter,Te,ft,ee]),Ke=(0,D.useCallback)(function(Ae,$e){return(0,Q.jsxs)(Q.Fragment,{children:[Ae,Oe.current&&$e?(0,Q.jsx)(D.Fragment,{children:(0,Ds.createPortal)($e,Oe.current)},"submitter"):$e]})},[]),nt=(0,D.useCallback)(function(){var Ae=(0,me.Z)((0,se.Z)().mark(function $e(st){var ut,Pt,lt;return(0,se.Z)().wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return ut=q==null?void 0:q(st),ee&&ut instanceof Promise&&(at(!0),Pt=setTimeout(function(){return at(!1)},ee),ut.finally(function(){clearTimeout(Pt),at(!1)})),tt.next=4,ut;case 4:return lt=tt.sent,lt&&Te(!1),tt.abrupt("return",lt);case 7:case"end":return tt.stop()}},$e)}));return function($e){return Ae.apply(this,arguments)}}(),[q,Te,ee]),Ge=(0,lc.X)(Pe);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Wi.Z,(0,j.Z)((0,j.Z)((0,j.Z)({title:ie,width:fe||800},V),Ge),{},{onCancel:function($e){var st;ee&&ft||(Te(!1),V==null||(st=V.onCancel)===null||st===void 0||st.call(V,$e))},afterClose:function(){var $e;it(),Te(!1),V==null||($e=V.afterClose)===null||$e===void 0||$e.call(V)},footer:ue.submitter!==!1?(0,Q.jsx)("div",{ref:Ve,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,Q.jsx)(El.I,(0,j.Z)((0,j.Z)({formComponentType:"ModalForm",layout:"vertical"},ue),{},{onInit:function($e,st){var ut;ue.formRef&&(ue.formRef.current=st),ue==null||(ut=ue.onInit)===null||ut===void 0||ut.call(ue,$e,st),Mt.current=st},formRef:Mt,submitter:Ze,onFinish:function(){var Ae=(0,me.Z)((0,se.Z)().mark(function $e(st){var ut;return(0,se.Z)().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,nt(st);case 2:return ut=lt.sent,lt.abrupt("return",ut);case 4:case"end":return lt.stop()}},$e)}));return function($e){return Ae.apply(this,arguments)}}(),contentRender:Ke,children:w}))})),le]})}var Xo=Y(57470),Pa=Y(1977),Lo=Y(64894),Pl=Y(62208),Tl=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function yf(x){return typeof x=="string"}function Vy(x){var y,M=x.className,w=x.prefixCls,k=x.style,U=x.active,N=x.status,V=x.iconPrefix,q=x.icon,ee=x.wrapperStyle,ie=x.stepNumber,fe=x.disabled,ve=x.description,Se=x.title,ue=x.subTitle,de=x.progressDot,ye=x.stepIcon,_e=x.tailContent,xe=x.icons,Ue=x.stepIndex,Ye=x.onStepClick,ft=x.onClick,at=x.render,Le=(0,Xe.Z)(x,Tl),je=!!Ye&&!fe,Pe={};je&&(Pe.role="button",Pe.tabIndex=0,Pe.onClick=function(le){ft==null||ft(le),Ye(Ue)},Pe.onKeyDown=function(le){var Ze=le.which;(Ze===vr.Z.ENTER||Ze===vr.Z.SPACE)&&Ye(Ue)});var Te=function(){var Ze,Ke,nt=Fe()("".concat(w,"-icon"),"".concat(V,"icon"),(Ze={},(0,ne.Z)(Ze,"".concat(V,"icon-").concat(q),q&&yf(q)),(0,ne.Z)(Ze,"".concat(V,"icon-check"),!q&&N==="finish"&&(xe&&!xe.finish||!xe)),(0,ne.Z)(Ze,"".concat(V,"icon-cross"),!q&&N==="error"&&(xe&&!xe.error||!xe)),Ze)),Ge=D.createElement("span",{className:"".concat(w,"-icon-dot")});return de?typeof de=="function"?Ke=D.createElement("span",{className:"".concat(w,"-icon")},de(Ge,{index:ie-1,status:N,title:Se,description:ve})):Ke=D.createElement("span",{className:"".concat(w,"-icon")},Ge):q&&!yf(q)?Ke=D.createElement("span",{className:"".concat(w,"-icon")},q):xe&&xe.finish&&N==="finish"?Ke=D.createElement("span",{className:"".concat(w,"-icon")},xe.finish):xe&&xe.error&&N==="error"?Ke=D.createElement("span",{className:"".concat(w,"-icon")},xe.error):q||N==="finish"||N==="error"?Ke=D.createElement("span",{className:nt}):Ke=D.createElement("span",{className:"".concat(w,"-icon")},ie),ye&&(Ke=ye({index:ie-1,status:N,title:Se,description:ve,node:Ke})),Ke},Oe=N||"wait",Ve=Fe()("".concat(w,"-item"),"".concat(w,"-item-").concat(Oe),M,(y={},(0,ne.Z)(y,"".concat(w,"-item-custom"),q),(0,ne.Z)(y,"".concat(w,"-item-active"),U),(0,ne.Z)(y,"".concat(w,"-item-disabled"),fe===!0),y)),Mt=(0,j.Z)({},k),it=D.createElement("div",(0,we.Z)({},Le,{className:Ve,style:Mt}),D.createElement("div",(0,we.Z)({onClick:ft},Pe,{className:"".concat(w,"-item-container")}),D.createElement("div",{className:"".concat(w,"-item-tail")},_e),D.createElement("div",{className:"".concat(w,"-item-icon")},Te()),D.createElement("div",{className:"".concat(w,"-item-content")},D.createElement("div",{className:"".concat(w,"-item-title")},Se,ue&&D.createElement("div",{title:typeof ue=="string"?ue:void 0,className:"".concat(w,"-item-subtitle")},ue)),ve&&D.createElement("div",{className:"".concat(w,"-item-description")},ve))));return at&&(it=at(it)||null),it}var O0=Vy,Uy=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function C0(x){var y,M=x.prefixCls,w=M===void 0?"rc-steps":M,k=x.style,U=k===void 0?{}:k,N=x.className,V=x.children,q=x.direction,ee=q===void 0?"horizontal":q,ie=x.type,fe=ie===void 0?"default":ie,ve=x.labelPlacement,Se=ve===void 0?"horizontal":ve,ue=x.iconPrefix,de=ue===void 0?"rc":ue,ye=x.status,_e=ye===void 0?"process":ye,xe=x.size,Ue=x.current,Ye=Ue===void 0?0:Ue,ft=x.progressDot,at=ft===void 0?!1:ft,Le=x.stepIcon,je=x.initial,Pe=je===void 0?0:je,Te=x.icons,Oe=x.onChange,Ve=x.itemRender,Mt=x.items,it=Mt===void 0?[]:Mt,le=(0,Xe.Z)(x,Uy),Ze=fe==="navigation",Ke=fe==="inline",nt=Ke||at,Ge=Ke?"horizontal":ee,Ae=Ke?void 0:xe,$e=nt?"vertical":Se,st=Fe()(w,"".concat(w,"-").concat(Ge),N,(y={},(0,ne.Z)(y,"".concat(w,"-").concat(Ae),Ae),(0,ne.Z)(y,"".concat(w,"-label-").concat($e),Ge==="horizontal"),(0,ne.Z)(y,"".concat(w,"-dot"),!!nt),(0,ne.Z)(y,"".concat(w,"-navigation"),Ze),(0,ne.Z)(y,"".concat(w,"-inline"),Ke),y)),ut=function(dt){Oe&&Ye!==dt&&Oe(dt)},Pt=function(dt,tt){var ct=(0,j.Z)({},dt),Zt=Pe+tt;return _e==="error"&&tt===Ye-1&&(ct.className="".concat(w,"-next-error")),ct.status||(Zt===Ye?ct.status=_e:Zt<Ye?ct.status="finish":ct.status="wait"),Ke&&(ct.icon=void 0,ct.subTitle=void 0),!ct.render&&Ve&&(ct.render=function(Wt){return Ve(ct,Wt)}),D.createElement(O0,(0,we.Z)({},ct,{active:Zt===Ye,stepNumber:Zt+1,stepIndex:Zt,key:Zt,prefixCls:w,iconPrefix:de,wrapperStyle:U,progressDot:nt,stepIcon:Le,icons:Te,onStepClick:Oe&&ut}))};return D.createElement("div",(0,we.Z)({className:st,style:U},le),it.filter(function(lt){return lt}).map(Pt))}C0.Step=O0;var Xy=C0,E0=Xy,Ky=Y(98675),qy=Y(38703),Ko=Y(83062),nh=Y(14747),Jy=Y(45503),Qy=x=>{const{componentCls:y,customIconTop:M,customIconSize:w,customIconFontSize:k}=x;return{[`${y}-item-custom`]:{[`> ${y}-item-container > ${y}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${y}-icon`]:{top:M,width:w,height:w,fontSize:k,lineHeight:`${(0,Hn.bf)(k)}`}}},[`&:not(${y}-vertical)`]:{[`${y}-item-custom`]:{[`${y}-item-icon`]:{width:"auto",background:"none"}}}}},e1=x=>{const{componentCls:y,inlineDotSize:M,inlineTitleColor:w,inlineTailColor:k}=x,U=x.calc(x.paddingXS).add(x.lineWidth).equal(),N={[`${y}-item-container ${y}-item-content ${y}-item-title`]:{color:w}};return{[`&${y}-inline`]:{width:"auto",display:"inline-flex",[`${y}-item`]:{flex:"none","&-container":{padding:`${(0,Hn.bf)(U)} ${(0,Hn.bf)(x.paddingXXS)} 0`,margin:`0 ${(0,Hn.bf)(x.calc(x.marginXXS).div(2).equal())}`,borderRadius:x.borderRadiusSM,cursor:"pointer",transition:`background-color ${x.motionDurationMid}`,"&:hover":{background:x.controlItemBgHover},["&[role='button']:hover"]:{opacity:1}},"&-icon":{width:M,height:M,marginInlineStart:`calc(50% - ${(0,Hn.bf)(x.calc(M).div(2).equal())})`,[`> ${y}-icon`]:{top:0},[`${y}-icon-dot`]:{borderRadius:x.calc(x.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:x.calc(x.marginXS).sub(x.lineWidth).equal()},"&-title":{color:w,fontSize:x.fontSizeSM,lineHeight:x.lineHeightSM,fontWeight:"normal",marginBottom:x.calc(x.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:x.calc(M).div(2).add(U).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:x.lineWidth,borderRadius:0,marginInlineStart:0,background:k}},[`&:first-child ${y}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${y}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${y}-item-icon ${y}-icon ${y}-icon-dot`]:{backgroundColor:x.colorBorderBg,border:`${(0,Hn.bf)(x.lineWidth)} ${x.lineType} ${k}`}},N),"&-finish":Object.assign({[`${y}-item-tail::after`]:{backgroundColor:k},[`${y}-item-icon ${y}-icon ${y}-icon-dot`]:{backgroundColor:k,border:`${(0,Hn.bf)(x.lineWidth)} ${x.lineType} ${k}`}},N),"&-error":N,"&-active, &-process":Object.assign({[`${y}-item-icon`]:{width:M,height:M,marginInlineStart:`calc(50% - ${(0,Hn.bf)(x.calc(M).div(2).equal())})`,top:0}},N),[`&:not(${y}-item-active) > ${y}-item-container[role='button']:hover`]:{[`${y}-item-title`]:{color:w}}}}}},t1=x=>{const{componentCls:y,iconSize:M,lineHeight:w,iconSizeSM:k}=x;return{[`&${y}-label-vertical`]:{[`${y}-item`]:{overflow:"visible","&-tail":{marginInlineStart:x.calc(M).div(2).add(x.controlHeightLG).equal(),padding:`${(0,Hn.bf)(x.paddingXXS)} ${(0,Hn.bf)(x.paddingLG)}`},"&-content":{display:"block",width:x.calc(M).div(2).add(x.controlHeightLG).mul(2).equal(),marginTop:x.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:x.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:x.marginXXS,marginInlineStart:0,lineHeight:w}},[`&${y}-small:not(${y}-dot)`]:{[`${y}-item`]:{"&-icon":{marginInlineStart:x.calc(M).sub(k).div(2).add(x.controlHeightLG).equal()}}}}}},n1=x=>{const{componentCls:y,navContentMaxWidth:M,navArrowColor:w,stepsNavActiveColor:k,motionDurationSlow:U}=x;return{[`&${y}-navigation`]:{paddingTop:x.paddingSM,[`&${y}-small`]:{[`${y}-item`]:{"&-container":{marginInlineStart:x.calc(x.marginSM).mul(-1).equal()}}},[`${y}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:x.calc(x.margin).mul(-1).equal(),paddingBottom:x.paddingSM,textAlign:"start",transition:`opacity ${U}`,[`${y}-item-content`]:{maxWidth:M},[`${y}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},nh.vS),{"&::after":{display:"none"}})},[`&:not(${y}-item-active)`]:{[`${y}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,Hn.bf)(x.calc(x.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:x.fontSizeIcon,height:x.fontSizeIcon,borderTop:`${(0,Hn.bf)(x.lineWidth)} ${x.lineType} ${w}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,Hn.bf)(x.lineWidth)} ${x.lineType} ${w}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:x.lineWidthBold,backgroundColor:k,transition:`width ${U}, inset-inline-start ${U}`,transitionTimingFunction:"ease-out",content:'""'}},[`${y}-item${y}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${y}-navigation${y}-vertical`]:{[`> ${y}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${y}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:x.calc(x.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,Hn.bf)(x.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:x.calc(x.controlHeight).mul(.25).equal(),height:x.calc(x.controlHeight).mul(.25).equal(),marginBottom:x.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${y}-item-container > ${y}-item-tail`]:{visibility:"hidden"}}},[`&${y}-navigation${y}-horizontal`]:{[`> ${y}-item > ${y}-item-container > ${y}-item-tail`]:{visibility:"hidden"}}}},r1=x=>{const{antCls:y,componentCls:M}=x;return{[`&${M}-with-progress`]:{[`${M}-item`]:{paddingTop:x.paddingXXS,[`&-process ${M}-item-container ${M}-item-icon ${M}-icon`]:{color:x.processIconColor}},[`&${M}-vertical > ${M}-item `]:{paddingInlineStart:x.paddingXXS,[`> ${M}-item-container > ${M}-item-tail`]:{top:x.marginXXS,insetInlineStart:x.calc(x.iconSize).div(2).sub(x.lineWidth).add(x.paddingXXS).equal()}},[`&, &${M}-small`]:{[`&${M}-horizontal ${M}-item:first-child`]:{paddingBottom:x.paddingXXS,paddingInlineStart:x.paddingXXS}},[`&${M}-small${M}-vertical > ${M}-item > ${M}-item-container > ${M}-item-tail`]:{insetInlineStart:x.calc(x.iconSizeSM).div(2).sub(x.lineWidth).add(x.paddingXXS).equal()},[`&${M}-label-vertical`]:{[`${M}-item ${M}-item-tail`]:{top:x.calc(x.margin).sub(x.calc(x.lineWidth).mul(2).equal()).equal()}},[`${M}-item-icon`]:{position:"relative",[`${y}-progress`]:{position:"absolute",insetBlockStart:x.calc(x.calc(x.iconSize).sub(x.stepsProgressSize).sub(x.calc(x.lineWidth).mul(2).equal()).equal()).div(2).equal(),insetInlineStart:x.calc(x.calc(x.iconSize).sub(x.stepsProgressSize).sub(x.calc(x.lineWidth).mul(2).equal()).equal()).div(2).equal()}}}}},i1=x=>{const{componentCls:y,descriptionMaxWidth:M,lineHeight:w,dotCurrentSize:k,dotSize:U,motionDurationSlow:N}=x;return{[`&${y}-dot, &${y}-dot${y}-small`]:{[`${y}-item`]:{"&-title":{lineHeight:w},"&-tail":{top:x.calc(x.dotSize).sub(x.calc(x.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,Hn.bf)(x.calc(M).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,Hn.bf)(x.calc(x.marginSM).mul(2).equal())})`,height:x.calc(x.lineWidth).mul(3).equal(),marginInlineStart:x.marginSM}},"&-icon":{width:U,height:U,marginInlineStart:x.calc(x.descriptionMaxWidth).sub(U).div(2).equal(),paddingInlineEnd:0,lineHeight:`${(0,Hn.bf)(U)}`,background:"transparent",border:0,[`${y}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${N}`,"&::after":{position:"absolute",top:x.calc(x.marginSM).mul(-1).equal(),insetInlineStart:x.calc(U).sub(x.calc(x.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:x.calc(x.controlHeightLG).mul(1.5).equal(),height:x.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:M},[`&-process ${y}-item-icon`]:{position:"relative",top:x.calc(U).sub(k).div(2).equal(),width:k,height:k,lineHeight:`${(0,Hn.bf)(k)}`,background:"none",marginInlineStart:x.calc(x.descriptionMaxWidth).sub(k).div(2).equal()},[`&-process ${y}-icon`]:{[`&:first-child ${y}-icon-dot`]:{insetInlineStart:0}}}},[`&${y}-vertical${y}-dot`]:{[`${y}-item-icon`]:{marginTop:x.calc(x.controlHeight).sub(U).div(2).equal(),marginInlineStart:0,background:"none"},[`${y}-item-process ${y}-item-icon`]:{marginTop:x.calc(x.controlHeight).sub(k).div(2).equal(),top:0,insetInlineStart:x.calc(U).sub(k).div(2).equal(),marginInlineStart:0},[`${y}-item > ${y}-item-container > ${y}-item-tail`]:{top:x.calc(x.controlHeight).sub(U).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,Hn.bf)(x.calc(U).add(x.paddingXS).equal())} 0 ${(0,Hn.bf)(x.paddingXS)}`,"&::after":{marginInlineStart:x.calc(U).sub(x.lineWidth).div(2).equal()}},[`&${y}-small`]:{[`${y}-item-icon`]:{marginTop:x.calc(x.controlHeightSM).sub(U).div(2).equal()},[`${y}-item-process ${y}-item-icon`]:{marginTop:x.calc(x.controlHeightSM).sub(k).div(2).equal()},[`${y}-item > ${y}-item-container > ${y}-item-tail`]:{top:x.calc(x.controlHeightSM).sub(U).div(2).equal()}},[`${y}-item:first-child ${y}-icon-dot`]:{insetInlineStart:0},[`${y}-item-content`]:{width:"inherit"}}}},P0=x=>{const{componentCls:y}=x;return{[`&${y}-rtl`]:{direction:"rtl",[`${y}-item`]:{"&-subtitle":{float:"left"}},[`&${y}-navigation`]:{[`${y}-item::after`]:{transform:"rotate(-45deg)"}},[`&${y}-vertical`]:{[`> ${y}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${y}-item-icon`]:{float:"right"}}},[`&${y}-dot`]:{[`${y}-item-icon ${y}-icon-dot, &${y}-small ${y}-item-icon ${y}-icon-dot`]:{float:"right"}}}}},a1=x=>{const{componentCls:y,iconSizeSM:M,fontSizeSM:w,fontSize:k,colorTextDescription:U}=x;return{[`&${y}-small`]:{[`&${y}-horizontal:not(${y}-label-vertical) ${y}-item`]:{paddingInlineStart:x.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${y}-item-icon`]:{width:M,height:M,marginTop:0,marginBottom:0,marginInline:`0 ${(0,Hn.bf)(x.marginXS)}`,fontSize:w,lineHeight:`${(0,Hn.bf)(M)}`,textAlign:"center",borderRadius:M},[`${y}-item-title`]:{paddingInlineEnd:x.paddingSM,fontSize:k,lineHeight:`${(0,Hn.bf)(M)}`,"&::after":{top:x.calc(M).div(2).equal()}},[`${y}-item-description`]:{color:U,fontSize:k},[`${y}-item-tail`]:{top:x.calc(M).div(2).sub(x.paddingXXS).equal()},[`${y}-item-custom ${y}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${y}-icon`]:{fontSize:M,lineHeight:`${(0,Hn.bf)(M)}`,transform:"none"}}}}},o1=x=>{const{componentCls:y,iconSizeSM:M,iconSize:w}=x;return{[`&${y}-vertical`]:{display:"flex",flexDirection:"column",[`> ${y}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${y}-item-icon`]:{float:"left",marginInlineEnd:x.margin},[`${y}-item-content`]:{display:"block",minHeight:x.calc(x.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${y}-item-title`]:{lineHeight:`${(0,Hn.bf)(w)}`},[`${y}-item-description`]:{paddingBottom:x.paddingSM}},[`> ${y}-item > ${y}-item-container > ${y}-item-tail`]:{position:"absolute",top:0,insetInlineStart:x.calc(w).div(2).sub(x.lineWidth).equal(),width:x.lineWidth,height:"100%",padding:`${(0,Hn.bf)(x.calc(x.marginXXS).mul(1.5).add(w).equal())} 0 ${(0,Hn.bf)(x.calc(x.marginXXS).mul(1.5).equal())}`,"&::after":{width:x.lineWidth,height:"100%"}},[`> ${y}-item:not(:last-child) > ${y}-item-container > ${y}-item-tail`]:{display:"block"},[` > ${y}-item > ${y}-item-container > ${y}-item-content > ${y}-item-title`]:{"&::after":{display:"none"}},[`&${y}-small ${y}-item-container`]:{[`${y}-item-tail`]:{position:"absolute",top:0,insetInlineStart:x.calc(M).div(2).sub(x.lineWidth).equal(),padding:`${(0,Hn.bf)(x.calc(x.marginXXS).mul(1.5).add(M).equal())} 0 ${(0,Hn.bf)(x.calc(x.marginXXS).mul(1.5).equal())}`},[`${y}-item-title`]:{lineHeight:`${(0,Hn.bf)(M)}`}}}}},qo;(function(x){x.wait="wait",x.process="process",x.finish="finish",x.error="error"})(qo||(qo={}));const du=(x,y)=>{const M=`${y.componentCls}-item`,w=`${x}IconColor`,k=`${x}TitleColor`,U=`${x}DescriptionColor`,N=`${x}TailColor`,V=`${x}IconBgColor`,q=`${x}IconBorderColor`,ee=`${x}DotColor`;return{[`${M}-${x} ${M}-icon`]:{backgroundColor:y[V],borderColor:y[q],[`> ${y.componentCls}-icon`]:{color:y[w],[`${y.componentCls}-icon-dot`]:{background:y[ee]}}},[`${M}-${x}${M}-custom ${M}-icon`]:{[`> ${y.componentCls}-icon`]:{color:y[ee]}},[`${M}-${x} > ${M}-container > ${M}-content > ${M}-title`]:{color:y[k],"&::after":{backgroundColor:y[N]}},[`${M}-${x} > ${M}-container > ${M}-content > ${M}-description`]:{color:y[U]},[`${M}-${x} > ${M}-container > ${M}-tail::after`]:{backgroundColor:y[N]}}},s1=x=>{const{componentCls:y,motionDurationSlow:M}=x,w=`${y}-item`,k=`${w}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[w]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${w}-container > ${w}-tail, > ${w}-container > ${w}-content > ${w}-title::after`]:{display:"none"}}},[`${w}-container`]:{outline:"none",["&:focus-visible"]:{[k]:Object.assign({},(0,nh.oN)(x))}},[`${k}, ${w}-content`]:{display:"inline-block",verticalAlign:"top"},[k]:{width:x.iconSize,height:x.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:x.marginXS,fontSize:x.iconFontSize,fontFamily:x.fontFamily,lineHeight:`${(0,Hn.bf)(x.iconSize)}`,textAlign:"center",borderRadius:x.iconSize,border:`${(0,Hn.bf)(x.lineWidth)} ${x.lineType} transparent`,transition:`background-color ${M}, border-color ${M}`,[`${y}-icon`]:{position:"relative",top:x.iconTop,color:x.colorPrimary,lineHeight:1}},[`${w}-tail`]:{position:"absolute",top:x.calc(x.iconSize).div(2).sub(x.paddingXXS).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:x.lineWidth,background:x.colorSplit,borderRadius:x.lineWidth,transition:`background ${M}`,content:'""'}},[`${w}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:x.padding,color:x.colorText,fontSize:x.fontSizeLG,lineHeight:`${(0,Hn.bf)(x.titleLineHeight)}`,"&::after":{position:"absolute",top:x.calc(x.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:x.lineWidth,background:x.processTailColor,content:'""'}},[`${w}-subtitle`]:{display:"inline",marginInlineStart:x.marginXS,color:x.colorTextDescription,fontWeight:"normal",fontSize:x.fontSize},[`${w}-description`]:{color:x.colorTextDescription,fontSize:x.fontSize}},du(qo.wait,x)),du(qo.process,x)),{[`${w}-process > ${w}-container > ${w}-title`]:{fontWeight:x.fontWeightStrong}}),du(qo.finish,x)),du(qo.error,x)),{[`${w}${y}-next-error > ${y}-item-title::after`]:{background:x.colorError},[`${w}-disabled`]:{cursor:"not-allowed"}})},rh=x=>{const{componentCls:y,motionDurationSlow:M}=x;return{[`& ${y}-item`]:{[`&:not(${y}-item-active)`]:{[`& > ${y}-item-container[role='button']`]:{cursor:"pointer",[`${y}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${y}-icon`]:{transition:`color ${M}`}},"&:hover":{[`${y}-item`]:{["&-title, &-subtitle, &-description"]:{color:x.colorPrimary}}}},[`&:not(${y}-item-process)`]:{[`& > ${y}-item-container[role='button']:hover`]:{[`${y}-item`]:{"&-icon":{borderColor:x.colorPrimary,[`${y}-icon`]:{color:x.colorPrimary}}}}}}},[`&${y}-horizontal:not(${y}-label-vertical)`]:{[`${y}-item`]:{paddingInlineStart:x.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${y}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:x.descriptionMaxWidth,whiteSpace:"normal"}}}}},l1=x=>{const{componentCls:y}=x;return{[y]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,nh.Wf)(x)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),s1(x)),rh(x)),Qy(x)),a1(x)),o1(x)),t1(x)),i1(x)),n1(x)),P0(x)),r1(x)),e1(x))}},c1=x=>({titleLineHeight:x.controlHeight,customIconSize:x.controlHeight,customIconTop:0,customIconFontSize:x.controlHeightSM,iconSize:x.controlHeight,iconTop:-.5,iconFontSize:x.fontSize,iconSizeSM:x.fontSizeHeading3,dotSize:x.controlHeight/4,dotCurrentSize:x.controlHeightLG/4,navArrowColor:x.colorTextDisabled,navContentMaxWidth:"auto",descriptionMaxWidth:140,waitIconColor:x.wireframe?x.colorTextDisabled:x.colorTextLabel,waitIconBgColor:x.wireframe?x.colorBgContainer:x.colorFillContent,waitIconBorderColor:x.wireframe?x.colorTextDisabled:"transparent",finishIconBgColor:x.wireframe?x.colorBgContainer:x.controlItemBgActive,finishIconBorderColor:x.wireframe?x.colorPrimary:x.controlItemBgActive});var u1=(0,au.I$)("Steps",x=>{const{colorTextDisabled:y,controlHeightLG:M,colorTextLightSolid:w,colorText:k,colorPrimary:U,colorTextDescription:N,colorTextQuaternary:V,colorError:q,colorBorderSecondary:ee,colorSplit:ie}=x,fe=(0,Jy.TS)(x,{processIconColor:w,processTitleColor:k,processDescriptionColor:k,processIconBgColor:U,processIconBorderColor:U,processDotColor:U,processTailColor:ie,waitTitleColor:N,waitDescriptionColor:N,waitTailColor:ie,waitDotColor:y,finishIconColor:U,finishTitleColor:k,finishDescriptionColor:N,finishTailColor:U,finishDotColor:U,errorIconColor:w,errorTitleColor:q,errorDescriptionColor:q,errorTailColor:ie,errorIconBgColor:q,errorIconBorderColor:q,errorDotColor:q,stepsNavActiveColor:U,stepsProgressSize:M,inlineDotSize:6,inlineTitleColor:V,inlineTailColor:ee});return[l1(fe)]},c1);function A0(x){return x.filter(y=>y)}function f1(x,y){if(x)return x;const M=(0,fs.Z)(y).map(w=>{if(D.isValidElement(w)){const{props:k}=w;return Object.assign({},k)}return null});return A0(M)}var d1=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M};const hu=x=>{const{percent:y,size:M,className:w,rootClassName:k,direction:U,items:N,responsive:V=!0,current:q=0,children:ee,style:ie}=x,fe=d1(x,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:ve}=(0,ai.Z)(V),{getPrefixCls:Se,direction:ue,steps:de}=D.useContext(Va.E_),ye=D.useMemo(()=>V&&ve?"vertical":U,[ve,U]),_e=(0,Ky.Z)(M),xe=Se("steps",x.prefixCls),[Ue,Ye,ft]=u1(xe),at=x.type==="inline",Le=Se("",x.iconPrefix),je=f1(N,ee),Pe=at?void 0:y,Te=Object.assign(Object.assign({},de==null?void 0:de.style),ie),Oe=Fe()(de==null?void 0:de.className,{[`${xe}-rtl`]:ue==="rtl",[`${xe}-with-progress`]:Pe!==void 0},w,k,Ye,ft),Ve={finish:D.createElement(Lo.Z,{className:`${xe}-finish-icon`}),error:D.createElement(Pl.Z,{className:`${xe}-error-icon`})},Mt=le=>{let{node:Ze,status:Ke}=le;if(Ke==="process"&&Pe!==void 0){const nt=_e==="small"?32:40;return D.createElement("div",{className:`${xe}-progress-icon`},D.createElement(qy.Z,{type:"circle",percent:Pe,size:nt,strokeWidth:4,format:()=>null}),Ze)}return Ze},it=(le,Ze)=>le.description?D.createElement(Ko.Z,{title:le.description},Ze):Ze;return Ue(D.createElement(E0,Object.assign({icons:Ve},fe,{style:Te,current:q,size:_e,items:je,itemRender:at?it:void 0,stepIcon:Mt,direction:ye,prefixCls:xe,iconPrefix:Le,className:Oe})))};hu.Step=E0.Step;var R0=hu,I0=["onFinish","step","formRef","title","stepProps"];function h1(x){var y=(0,D.useRef)(),M=(0,D.useContext)(L0),w=(0,D.useContext)(Fs),k=(0,j.Z)((0,j.Z)({},x),w),U=k.onFinish,N=k.step,V=k.formRef,q=k.title,ee=k.stepProps,ie=(0,Xe.Z)(k,I0);return(0,Pi.ET)(!ie.submitter,"StepForm \u4E0D\u5305\u542B\u63D0\u4EA4\u6309\u94AE\uFF0C\u8BF7\u5728 StepsForm \u4E0A"),(0,D.useImperativeHandle)(V,function(){return y.current},[V==null?void 0:V.current]),(0,D.useEffect)(function(){if(k.name||k.step){var fe=(k.name||k.step).toString();return M==null||M.regForm(fe,k),function(){M==null||M.unRegForm(fe)}}},[]),M&&M!==null&&M!==void 0&&M.formArrayRef&&(M.formArrayRef.current[N||0]=y),(0,Q.jsx)(El.I,(0,j.Z)({formRef:y,onFinish:function(){var fe=(0,me.Z)((0,se.Z)().mark(function ve(Se){var ue;return(0,se.Z)().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(ie.name&&(M==null||M.onFormFinish(ie.name,Se)),!U){ye.next=9;break}return M==null||M.setLoading(!0),ye.next=5,U==null?void 0:U(Se);case 5:return ue=ye.sent,ue&&(M==null||M.next()),M==null||M.setLoading(!1),ye.abrupt("return");case 9:M!=null&&M.lastStep||M==null||M.next();case 10:case"end":return ye.stop()}},ve)}));return function(ve){return fe.apply(this,arguments)}}(),onInit:function(ve,Se){var ue;y.current=Se,M&&M!==null&&M!==void 0&&M.formArrayRef&&(M.formArrayRef.current[N||0]=y),ie==null||(ue=ie.onInit)===null||ue===void 0||ue.call(ie,ve,Se)},layout:"vertical"},(0,Ln.Z)(ie,["layoutType","columns"])))}var p1=h1,v1=function(y){return(0,ne.Z)({},y.componentCls,{"&-container":{width:"max-content",minWidth:"420px",maxWidth:"100%",margin:"auto"},"&-steps-container":(0,ne.Z)({maxWidth:"1160px",margin:"auto"},"".concat(y.antCls,"-steps-vertical"),{height:"100%"}),"&-step":{display:"none",marginBlockStart:"32px","&-active":{display:"block"},"> form":{maxWidth:"100%"}}})};function g1(x){return(0,Mr.Xj)("StepsForm",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[v1(M)]})}var m1=["current","onCurrentChange","submitter","stepsFormRender","stepsRender","stepFormRender","stepsProps","onFinish","formProps","containerStyle","formRef","formMapRef","layoutRender"],L0=D.createContext(void 0),y1={horizontal:function(y){var M=y.stepsDom,w=y.formDom;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ja.Z,{gutter:{xs:8,sm:16,md:24},children:(0,Q.jsx)(Ki.Z,{span:24,children:M})}),(0,Q.jsx)(ja.Z,{gutter:{xs:8,sm:16,md:24},children:(0,Q.jsx)(Ki.Z,{span:24,children:w})})]})},vertical:function(y){var M=y.stepsDom,w=y.formDom;return(0,Q.jsxs)(ja.Z,{align:"stretch",wrap:!0,gutter:{xs:8,sm:16,md:24},children:[(0,Q.jsx)(Ki.Z,{xxl:4,xl:6,lg:7,md:8,sm:10,xs:12,children:D.cloneElement(M,{style:{height:"100%"}})}),(0,Q.jsx)(Ki.Z,{children:(0,Q.jsx)("div",{style:{display:"flex",alignItems:"center",width:"100%",height:"100%"},children:w})})]})}},Fs=D.createContext(null);function b1(x){var y=(0,D.useContext)(pr.ZP.ConfigContext),M=y.getPrefixCls,w=M("pro-steps-form"),k=g1(w),U=k.wrapSSR,N=k.hashId,V=x.current,q=x.onCurrentChange,ee=x.submitter,ie=x.stepsFormRender,fe=x.stepsRender,ve=x.stepFormRender,Se=x.stepsProps,ue=x.onFinish,de=x.formProps,ye=x.containerStyle,_e=x.formRef,xe=x.formMapRef,Ue=x.layoutRender,Ye=(0,Xe.Z)(x,m1),ft=(0,D.useRef)(new Map),at=(0,D.useRef)(new Map),Le=(0,D.useRef)([]),je=(0,D.useState)([]),Pe=(0,_t.Z)(je,2),Te=Pe[0],Oe=Pe[1],Ve=(0,D.useState)(!1),Mt=(0,_t.Z)(Ve,2),it=Mt[0],le=Mt[1],Ze=(0,yt.YB)(),Ke=(0,lr.Z)(0,{value:x.current,onChange:x.onCurrentChange}),nt=(0,_t.Z)(Ke,2),Ge=nt[0],Ae=nt[1],$e=(0,D.useMemo)(function(){return y1[(Se==null?void 0:Se.direction)||"horizontal"]},[Se==null?void 0:Se.direction]),st=(0,D.useMemo)(function(){return Ge===Te.length-1},[Te.length,Ge]),ut=(0,D.useCallback)(function(qe,pt){at.current.has(qe)||Oe(function(bt){return[].concat((0,Qe.Z)(bt),[qe])}),at.current.set(qe,pt)},[]),Pt=(0,D.useCallback)(function(qe){Oe(function(pt){return pt.filter(function(bt){return bt!==qe})}),at.current.delete(qe),ft.current.delete(qe)},[]);(0,D.useImperativeHandle)(xe,function(){return Le.current},[Le.current]),(0,D.useImperativeHandle)(_e,function(){var qe;return(qe=Le.current[Ge||0])===null||qe===void 0?void 0:qe.current},[Ge,Le.current]);var lt=(0,D.useCallback)(function(){var qe=(0,me.Z)((0,se.Z)().mark(function pt(bt,yn){var On,pn;return(0,se.Z)().wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:if(ft.current.set(bt,yn),!(!st||!ue)){Ur.next=3;break}return Ur.abrupt("return");case 3:return le(!0),On=Nt.T.apply(void 0,[{}].concat((0,Qe.Z)(Array.from(ft.current.values())))),Ur.prev=5,Ur.next=8,ue(On);case 8:pn=Ur.sent,pn&&(Ae(0),Le.current.forEach(function(fo){var Za;return(Za=fo.current)===null||Za===void 0?void 0:Za.resetFields()})),Ur.next=15;break;case 12:Ur.prev=12,Ur.t0=Ur.catch(5),console.log(Ur.t0);case 15:return Ur.prev=15,le(!1),Ur.finish(15);case 18:case"end":return Ur.stop()}},pt,null,[[5,12,15,18]])}));return function(pt,bt){return qe.apply(this,arguments)}}(),[st,ue,le,Ae]),dt=(0,D.useMemo)(function(){var qe=(0,Pa.n)(Xs.Z,"4.24.0")>-1,pt=qe?{items:Te.map(function(bt){var yn=at.current.get(bt);return(0,j.Z)({key:bt,title:yn==null?void 0:yn.title},yn==null?void 0:yn.stepProps)})}:{};return(0,Q.jsx)("div",{className:"".concat(w,"-steps-container ").concat(N).trim(),style:{maxWidth:Math.min(Te.length*320,1160)},children:(0,Q.jsx)(R0,(0,j.Z)((0,j.Z)((0,j.Z)({},Se),pt),{},{current:Ge,onChange:void 0,children:!qe&&Te.map(function(bt){var yn=at.current.get(bt);return(0,Q.jsx)(R0.Step,(0,j.Z)({title:yn==null?void 0:yn.title},yn==null?void 0:yn.stepProps),bt)})}))})},[Te,N,w,Ge,Se]),tt=(0,Yr.J)(function(){var qe,pt=Le.current[Ge];(qe=pt.current)===null||qe===void 0||qe.submit()}),ct=(0,Yr.J)(function(){Ge<1||Ae(Ge-1)}),Zt=(0,D.useMemo)(function(){return ee!==!1&&(0,Q.jsx)(To.ZP,(0,j.Z)((0,j.Z)({type:"primary",loading:it},ee==null?void 0:ee.submitButtonProps),{},{onClick:function(){var pt;ee==null||(pt=ee.onSubmit)===null||pt===void 0||pt.call(ee),tt()},children:Ze.getMessage("stepsForm.next","\u4E0B\u4E00\u6B65")}),"next")},[Ze,it,tt,ee]),Wt=(0,D.useMemo)(function(){return ee!==!1&&(0,Q.jsx)(To.ZP,(0,j.Z)((0,j.Z)({},ee==null?void 0:ee.resetButtonProps),{},{onClick:function(){var pt;ct(),ee==null||(pt=ee.onReset)===null||pt===void 0||pt.call(ee)},children:Ze.getMessage("stepsForm.prev","\u4E0A\u4E00\u6B65")}),"pre")},[Ze,ct,ee]),Rn=(0,D.useMemo)(function(){return ee!==!1&&(0,Q.jsx)(To.ZP,(0,j.Z)((0,j.Z)({type:"primary",loading:it},ee==null?void 0:ee.submitButtonProps),{},{onClick:function(){var pt;ee==null||(pt=ee.onSubmit)===null||pt===void 0||pt.call(ee),tt()},children:Ze.getMessage("stepsForm.submit","\u63D0\u4EA4")}),"submit")},[Ze,it,tt,ee]),ar=(0,Yr.J)(function(){Ge>Te.length-2||Ae(Ge+1)}),hn=(0,D.useMemo)(function(){var qe=[],pt=Ge||0;if(pt<1?Te.length===1?qe.push(Rn):qe.push(Zt):pt+1===Te.length?qe.push(Wt,Rn):qe.push(Wt,Zt),qe=qe.filter(D.isValidElement),ee&&ee.render){var bt,yn={form:(bt=Le.current[Ge])===null||bt===void 0?void 0:bt.current,onSubmit:tt,step:Ge,onPre:ct};return ee.render(yn,qe)}return ee&&(ee==null?void 0:ee.render)===!1?null:qe},[Te.length,Zt,tt,Wt,ct,Ge,Rn,ee]),Yn=(0,D.useMemo)(function(){return(0,fs.Z)(x.children).map(function(qe,pt){var bt=qe.props,yn=bt.name||"".concat(pt),On=Ge===pt,pn=On?{contentRender:ve,submitter:!1}:{};return(0,Q.jsx)("div",{className:Fe()("".concat(w,"-step"),N,(0,ne.Z)({},"".concat(w,"-step-active"),On)),children:(0,Q.jsx)(Fs.Provider,{value:(0,j.Z)((0,j.Z)((0,j.Z)((0,j.Z)({},pn),de),bt),{},{name:yn,step:pt}),children:qe})},yn)})},[de,N,w,x.children,Ge,ve]),Or=(0,D.useMemo)(function(){return fe?fe(Te.map(function(qe){var pt;return{key:qe,title:(pt=at.current.get(qe))===null||pt===void 0?void 0:pt.title}}),dt):dt},[Te,dt,fe]),Ai=(0,D.useMemo)(function(){return(0,Q.jsxs)("div",{className:"".concat(w,"-container ").concat(N).trim(),style:ye,children:[Yn,ie?null:(0,Q.jsx)(Ol.Z,{children:hn})]})},[ye,Yn,N,w,ie,hn]),Yt=(0,D.useMemo)(function(){var qe={stepsDom:Or,formDom:Ai};return ie?ie(Ue?Ue(qe):$e(qe),hn):Ue?Ue(qe):$e(qe)},[Or,Ai,$e,ie,hn,Ue]);return U((0,Q.jsx)("div",{className:Fe()(w,N),children:(0,Q.jsx)(mi.Z.Provider,(0,j.Z)((0,j.Z)({},Ye),{},{children:(0,Q.jsx)(L0.Provider,{value:{loading:it,setLoading:le,regForm:ut,keyArray:Te,next:ar,formArrayRef:Le,formMapRef:at,lastStep:st,unRegForm:Pt,onFormFinish:lt},children:Yt})}))}))}function vs(x){return(0,Q.jsx)(yt._Y,{needDeps:!0,children:(0,Q.jsx)(b1,(0,j.Z)({},x))})}vs.StepForm=p1,vs.useForm=mi.Z.useForm;var x1=["steps","columns","forceUpdate","grid"],ih=function(y){var M=y.steps,w=y.columns,k=y.forceUpdate,U=y.grid,N=(0,Xe.Z)(y,x1),V=(0,Cl.d)(N),q=(0,D.useCallback)(function(ie){var fe,ve;(fe=(ve=V.current).onCurrentChange)===null||fe===void 0||fe.call(ve,ie),k([])},[k,V]),ee=(0,D.useMemo)(function(){return M==null?void 0:M.map(function(ie,fe){return(0,D.createElement)(W0,(0,j.Z)((0,j.Z)({grid:U},ie),{},{key:fe,layoutType:"StepForm",columns:w[fe]}))})},[w,U,M]);return(0,Q.jsx)(vs,(0,j.Z)((0,j.Z)({},N),{},{onCurrentChange:q,children:ee}))},_1=ih,w1=function(y){var M=y.children;return(0,Q.jsx)(Q.Fragment,{children:M})},S1=w1,N0=Y(97462),O1=function(y,M){if(y.valueType==="dependency"){var w,k,U,N=(w=y.getFieldProps)===null||w===void 0?void 0:w.call(y);return(0,Pi.ET)(Array.isArray((k=y.name)!==null&&k!==void 0?k:N==null?void 0:N.name),'SchemaForm: fieldProps.name should be NamePath[] when valueType is "dependency"'),(0,Pi.ET)(typeof y.columns=="function",'SchemaForm: columns should be a function when valueType is "dependency"'),Array.isArray((U=y.name)!==null&&U!==void 0?U:N==null?void 0:N.name)?(0,D.createElement)(N0.Z,(0,j.Z)((0,j.Z)({name:y.name},N),{},{key:y.key}),function(V){return!y.columns||typeof y.columns!="function"?null:M.genItems(y.columns(V))}):null}return!0},C1=Y(96074),ah=function(y){if(y.valueType==="divider"){var M;return(0,D.createElement)(C1.Z,(0,j.Z)((0,j.Z)({},(M=y.getFieldProps)===null||M===void 0?void 0:M.call(y)),{},{key:y.key}))}return!0},xf=Y(11911),oh=function(y,M){var w=M.action,k=M.formRef,U=M.type,N=M.originItem,V=(0,j.Z)((0,j.Z)({},(0,Ln.Z)(y,["dataIndex","width","render","renderFormItem","renderText","title"])),{},{name:y.name||y.key||y.dataIndex,width:y.width,render:y!=null&&y.render?function(fe,ve,Se){var ue,de,ye,_e;return y==null||(ue=y.render)===null||ue===void 0?void 0:ue.call(y,fe,ve,Se,w==null?void 0:w.current,(0,j.Z)((0,j.Z)({type:U},y),{},{key:(de=y.key)===null||de===void 0?void 0:de.toString(),formItemProps:(ye=y.getFormItemProps)===null||ye===void 0?void 0:ye.call(y),fieldProps:(_e=y.getFieldProps)===null||_e===void 0?void 0:_e.call(y)}))}:void 0}),q=function(){return(0,Q.jsx)(xf.Z,(0,j.Z)((0,j.Z)({},V),{},{ignoreFormItem:!0}))},ee=y!=null&&y.renderFormItem?function(fe,ve){var Se,ue,de,ye,_e=(0,yi.Y)((0,j.Z)((0,j.Z)({},ve),{},{onChange:void 0}));return y==null||(Se=y.renderFormItem)===null||Se===void 0?void 0:Se.call(y,(0,j.Z)((0,j.Z)({type:U},y),{},{key:(ue=y.key)===null||ue===void 0?void 0:ue.toString(),formItemProps:(de=y.getFormItemProps)===null||de===void 0?void 0:de.call(y),fieldProps:(ye=y.getFieldProps)===null||ye===void 0?void 0:ye.call(y),originProps:N}),(0,j.Z)((0,j.Z)({},_e),{},{defaultRender:q,type:U}),k.current)}:void 0,ie=function(){if(y!=null&&y.renderFormItem){var ve=ee==null?void 0:ee(null,{});if(!ve||y.ignoreFormItem)return ve}return(0,D.createElement)(xf.Z,(0,j.Z)((0,j.Z)({},V),{},{key:[y.key,y.index||0].join("-"),renderFormItem:ee}))};return y.dependencies?(0,Q.jsx)(N0.Z,{name:y.dependencies||[],children:ie},y.key):ie()},E1=Y(55136),hc=function(y,M){var w=M.genItems;if(y.valueType==="formList"&&y.dataIndex){var k,U;return!y.columns||!Array.isArray(y.columns)?null:(0,D.createElement)(E1.u,(0,j.Z)((0,j.Z)({},(k=y.getFormItemProps)===null||k===void 0?void 0:k.call(y)),{},{key:y.key,name:y.dataIndex,label:y.label,initialValue:y.initialValue,colProps:y.colProps,rowProps:y.rowProps},(U=y.getFieldProps)===null||U===void 0?void 0:U.call(y)),w(y.columns))}return!0},k0=Y(96365),pu=Y(83607),j0=["children","value","valuePropName","onChange","fieldProps","space","type","transform","convertValue","lightProps"],M1=["children","space","valuePropName"],D0={space:Ol.Z,group:k0.Z.Group};function F0(x){var y=arguments.length<=1?void 0:arguments[1];return y&&y.target&&x in y.target?y.target[x]:y}var B0=function(y){var M=y.children,w=y.value,k=w===void 0?[]:w,U=y.valuePropName,N=y.onChange,V=y.fieldProps,q=y.space,ee=y.type,ie=ee===void 0?"space":ee,fe=y.transform,ve=y.convertValue,Se=y.lightProps,ue=(0,Xe.Z)(y,j0),de=(0,Yr.J)(function(Le,je){var Pe,Te=(0,Qe.Z)(k);Te[je]=F0(U||"value",Le),N==null||N(Te),V==null||(Pe=V.onChange)===null||Pe===void 0||Pe.call(V,Te)}),ye=-1,_e=(0,fs.Z)(M).map(function(Le){if(D.isValidElement(Le)){var je,Pe,Te;ye+=1;var Oe=ye,Ve=(Le==null||(je=Le.type)===null||je===void 0?void 0:je.displayName)==="ProFormComponent"||(Le==null||(Pe=Le.props)===null||Pe===void 0?void 0:Pe.readonly),Mt=Ve?(0,j.Z)((0,j.Z)({key:Oe,ignoreFormItem:!0},Le.props||{}),{},{fieldProps:(0,j.Z)((0,j.Z)({},Le==null||(Te=Le.props)===null||Te===void 0?void 0:Te.fieldProps),{},{onChange:function(){de(arguments.length<=0?void 0:arguments[0],Oe)}}),value:k==null?void 0:k[Oe],onChange:void 0}):(0,j.Z)((0,j.Z)({key:Oe},Le.props||{}),{},{value:k==null?void 0:k[Oe],onChange:function(le){var Ze,Ke;de(le,Oe),(Ze=(Ke=Le.props).onChange)===null||Ze===void 0||Ze.call(Ke,le)}});return D.cloneElement(Le,Mt)}return Le}),xe=D0[ie],Ue=(0,Jt.zx)(ue),Ye=Ue.RowWrapper,ft=(0,D.useMemo)(function(){return(0,j.Z)({},ie==="group"?{compact:!0}:{})},[ie]),at=(0,D.useCallback)(function(Le){var je=Le.children;return(0,Q.jsx)(xe,(0,j.Z)((0,j.Z)((0,j.Z)({},ft),q),{},{align:"start",wrap:!0,children:je}))},[xe,q,ft]);return(0,Q.jsx)(Ye,{Wrapper:at,children:_e})},z0=D.forwardRef(function(x,y){var M=x.children,w=x.space,k=x.valuePropName,U=(0,Xe.Z)(x,M1);return(0,D.useImperativeHandle)(y,function(){return{}}),(0,Q.jsx)(B0,(0,j.Z)((0,j.Z)((0,j.Z)({space:w,valuePropName:k},U.fieldProps),{},{onChange:void 0},U),{},{children:M}))}),P1=(0,pu.G)(z0),T1=P1,A1=function(y,M){var w=M.genItems;if(y.valueType==="formSet"&&y.dataIndex){var k,U;return!y.columns||!Array.isArray(y.columns)?null:(0,D.createElement)(T1,(0,j.Z)((0,j.Z)({},(k=y.getFormItemProps)===null||k===void 0?void 0:k.call(y)),{},{key:y.key,initialValue:y.initialValue,name:y.dataIndex,label:y.label,colProps:y.colProps,rowProps:y.rowProps},(U=y.getFieldProps)===null||U===void 0?void 0:U.call(y)),w(y.columns))}return!0},R1=Ft.A.Group,I1=function(y,M){var w=M.genItems;if(y.valueType==="group"){var k;return!y.columns||!Array.isArray(y.columns)?null:(0,Q.jsx)(R1,(0,j.Z)((0,j.Z)({label:y.label,colProps:y.colProps,rowProps:y.rowProps},(k=y.getFieldProps)===null||k===void 0?void 0:k.call(y)),{},{children:w(y.columns)}),y.key)}return!0},Al=function(y){return y.valueType&&typeof y.valueType=="string"&&["index","indexBorder","option"].includes(y==null?void 0:y.valueType)?null:!0},pc=[Al,I1,hc,A1,ah,O1],L1=function(y,M){for(var w=0;w<pc.length;w++){var k=pc[w],U=k(y,M);if(U!==!0)return U}return oh(y,M)},Z0=["columns","layoutType","type","action","shouldUpdate","formRef"],$0={DrawerForm:Xa,QueryFilter:Xo.t,LightFilter:dc,StepForm:vs.StepForm,StepsForm:_1,ModalForm:Ti,Embed:S1,Form:Ft.A};function _f(x){var y=x.columns,M=x.layoutType,w=M===void 0?"Form":M,k=x.type,U=k===void 0?"form":k,N=x.action,V=x.shouldUpdate,q=V===void 0?function(it,le){return(0,mr.ZP)(it)!==(0,mr.ZP)(le)}:V,ee=x.formRef,ie=(0,Xe.Z)(x,Z0),fe=$0[w]||Ft.A,ve=mi.Z.useForm(),Se=(0,_t.Z)(ve,1),ue=Se[0],de=mi.Z.useFormInstance(),ye=(0,D.useState)([]),_e=(0,_t.Z)(ye,2),xe=_e[1],Ue=(0,D.useState)(function(){return[]}),Ye=(0,_t.Z)(Ue,2),ft=Ye[0],at=Ye[1],Le=hf(x.form||de||ue),je=(0,D.useRef)(),Pe=(0,Cl.d)(x),Te=(0,Yr.J)(function(it){return it.filter(function(le){return!(le.hideInForm&&U==="form")}).sort(function(le,Ze){return Ze.order||le.order?(Ze.order||0)-(le.order||0):(Ze.index||0)-(le.index||0)}).map(function(le,Ze){var Ke=(0,Io.h)(le.title,le,"form",(0,Q.jsx)(Gn.G,{label:le.title,tooltip:le.tooltip||le.tip})),nt=(0,yi.Y)({title:Ke,label:Ke,name:le.name,valueType:(0,Io.h)(le.valueType,{}),key:le.key||le.dataIndex||Ze,columns:le.columns,valueEnum:le.valueEnum,dataIndex:le.dataIndex||le.key,initialValue:le.initialValue,width:le.width,index:le.index,readonly:le.readonly,colSize:le.colSize,colProps:le.colProps,rowProps:le.rowProps,className:le.className,tooltip:le.tooltip||le.tip,dependencies:le.dependencies,proFieldProps:le.proFieldProps,ignoreFormItem:le.ignoreFormItem,getFieldProps:le.fieldProps?function(){return(0,Io.h)(le.fieldProps,Le.current,le)}:void 0,getFormItemProps:le.formItemProps?function(){return(0,Io.h)(le.formItemProps,Le.current,le)}:void 0,render:le.render,renderFormItem:le.renderFormItem,renderText:le.renderText,request:le.request,params:le.params,transform:le.transform,convertValue:le.convertValue,debounceTime:le.debounceTime,defaultKeyWords:le.defaultKeyWords});return L1(nt,{action:N,type:U,originItem:le,formRef:Le,genItems:Te})}).filter(function(le){return!!le})}),Oe=(0,D.useCallback)(function(it,le){var Ze=Pe.current.onValuesChange;(q===!0||typeof q=="function"&&q(le,je.current))&&at([]),je.current=le,Ze==null||Ze(it,le)},[Pe,q]),Ve=(0,$i.Z)(function(){if(Le.current&&!(y.length&&Array.isArray(y[0])))return Te(y)},[y,ie==null?void 0:ie.open,N,U,ft,!!Le.current]),Mt=(0,$i.Z)(function(){return w==="StepsForm"?{forceUpdate:xe,columns:y}:{}},[y,w]);return(0,D.useImperativeHandle)(ee,function(){return Le.current},[Le.current]),(0,Q.jsx)(fe,(0,j.Z)((0,j.Z)((0,j.Z)({},Mt),ie),{},{onInit:function(le,Ze){var Ke;ee&&(ee.current=Ze),ie==null||(Ke=ie.onInit)===null||Ke===void 0||Ke.call(ie,le,Ze),Le.current=Ze},form:x.form||ue,formRef:Le,onValuesChange:Oe,children:Ve}))}var W0=_f;function G0(x){var y=x.replace(/[A-Z]/g,function(M){return"-".concat(M.toLowerCase())});return y.startsWith("-")&&(y=y.slice(1)),y}var N1=function(y,M){return!y&&M!==!1?(M==null?void 0:M.filterType)==="light"?"LightFilter":"QueryFilter":"Form"},k1=function(y,M,w){return!y&&w==="LightFilter"?(0,Ln.Z)((0,j.Z)({},M),["labelWidth","defaultCollapsed","filterType"]):y?{}:(0,Ln.Z)((0,j.Z)({labelWidth:M?M==null?void 0:M.labelWidth:void 0,defaultCollapsed:!0},M),["filterType"])},H0=function(y,M){return y?(0,Ln.Z)(M,["ignoreRules"]):(0,j.Z)({ignoreRules:!0},M)},sh=function(y){var M=y.onSubmit,w=y.formRef,k=y.dateFormatter,U=k===void 0?"string":k,N=y.type,V=y.columns,q=y.action,ee=y.ghost,ie=y.manualRequest,fe=y.onReset,ve=y.submitButtonLoading,Se=y.search,ue=y.form,de=y.bordered,ye=(0,D.useContext)(yt.L_),_e=ye.hashId,xe=N==="form",Ue=function(){var Oe=(0,me.Z)((0,se.Z)().mark(function Ve(Mt,it){return(0,se.Z)().wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:M&&M(Mt,it);case 1:case"end":return Ze.stop()}},Ve)}));return function(Mt,it){return Oe.apply(this,arguments)}}(),Ye=(0,D.useContext)(pr.ZP.ConfigContext),ft=Ye.getPrefixCls,at=(0,D.useMemo)(function(){return V.filter(function(Oe){return!(Oe===ea.Z.EXPAND_COLUMN||Oe===ea.Z.SELECTION_COLUMN||(Oe.hideInSearch||Oe.search===!1)&&N!=="form"||N==="form"&&Oe.hideInForm)}).map(function(Oe){var Ve,Mt=!Oe.valueType||["textarea","jsonCode","code"].includes(Oe==null?void 0:Oe.valueType)&&N==="table"?"text":Oe==null?void 0:Oe.valueType,it=(Oe==null?void 0:Oe.key)||(Oe==null||(Ve=Oe.dataIndex)===null||Ve===void 0?void 0:Ve.toString());return(0,j.Z)((0,j.Z)((0,j.Z)({},Oe),{},{width:void 0},Oe.search?Oe.search:{}),{},{valueType:Mt,proFieldProps:(0,j.Z)((0,j.Z)({},Oe.proFieldProps),{},{proFieldKey:it?"table-field-".concat(it):void 0})})})},[V,N]),Le=ft("pro-table-search"),je=ft("pro-table-form"),Pe=(0,D.useMemo)(function(){return N1(xe,Se)},[Se,xe]),Te=(0,D.useMemo)(function(){return{submitter:{submitButtonProps:{loading:ve}}}},[ve]);return(0,Q.jsx)("div",{className:Fe()(_e,(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},ft("pro-card"),!0),"".concat(ft("pro-card"),"-border"),!!de),"".concat(ft("pro-card"),"-bordered"),!!de),"".concat(ft("pro-card"),"-ghost"),!!ee),Le,!0),je,xe),ft("pro-table-search-".concat(G0(Pe))),!0),"".concat(Le,"-ghost"),ee),Se==null?void 0:Se.className,Se!==!1&&(Se==null?void 0:Se.className))),children:(0,Q.jsx)(W0,(0,j.Z)((0,j.Z)((0,j.Z)((0,j.Z)({layoutType:Pe,columns:at,type:N},Te),k1(xe,Se,Pe)),H0(xe,ue||{})),{},{formRef:w,action:q,dateFormatter:U,onInit:function(Ve,Mt){if(w.current=Mt,N!=="form"){var it,le,Ze,Ke=(it=q.current)===null||it===void 0?void 0:it.pageInfo,nt=Ve,Ge=nt.current,Ae=Ge===void 0?Ke==null?void 0:Ke.current:Ge,$e=nt.pageSize,st=$e===void 0?Ke==null?void 0:Ke.pageSize:$e;if((le=q.current)===null||le===void 0||(Ze=le.setPageInfo)===null||Ze===void 0||Ze.call(le,(0,j.Z)((0,j.Z)({},Ke),{},{current:parseInt(Ae,10),pageSize:parseInt(st,10)})),ie)return;Ue(Ve,!0)}},onReset:function(Ve){fe==null||fe(Ve)},onFinish:function(Ve){Ue(Ve,!1)},initialValues:ue==null?void 0:ue.initialValues}))})},j1=sh,Y0=function(x){(0,Qs.Z)(M,x);var y=(0,df.Z)(M);function M(){var w;(0,ps.Z)(this,M);for(var k=arguments.length,U=new Array(k),N=0;N<k;N++)U[N]=arguments[N];return w=y.call.apply(y,[this].concat(U)),(0,ne.Z)((0,Ua.Z)(w),"onSubmit",function(V,q){var ee=w.props,ie=ee.pagination,fe=ee.beforeSearchSubmit,ve=fe===void 0?function(ft){return ft}:fe,Se=ee.action,ue=ee.onSubmit,de=ee.onFormSearchSubmit,ye=ie?(0,yi.Y)({current:ie.current,pageSize:ie.pageSize}):{},_e=(0,j.Z)((0,j.Z)({},V),{},{_timestamp:Date.now()},ye),xe=(0,Ln.Z)(ve(_e),Object.keys(ye));if(de(xe),!q){var Ue,Ye;(Ue=Se.current)===null||Ue===void 0||(Ye=Ue.setPageInfo)===null||Ye===void 0||Ye.call(Ue,{current:1})}ue&&!q&&(ue==null||ue(V))}),(0,ne.Z)((0,Ua.Z)(w),"onReset",function(V){var q,ee,ie=w.props,fe=ie.pagination,ve=ie.beforeSearchSubmit,Se=ve===void 0?function(Ue){return Ue}:ve,ue=ie.action,de=ie.onFormSearchSubmit,ye=ie.onReset,_e=fe?(0,yi.Y)({current:fe.current,pageSize:fe.pageSize}):{},xe=(0,Ln.Z)(Se((0,j.Z)((0,j.Z)({},V),_e)),Object.keys(_e));de(xe),(q=ue.current)===null||q===void 0||(ee=q.setPageInfo)===null||ee===void 0||ee.call(q,{current:1}),ye==null||ye()}),(0,ne.Z)((0,Ua.Z)(w),"isEqual",function(V){var q=w.props,ee=q.columns,ie=q.loading,fe=q.formRef,ve=q.type,Se=q.cardBordered,ue=q.dateFormatter,de=q.form,ye=q.search,_e=q.manualRequest,xe={columns:ee,loading:ie,formRef:fe,type:ve,cardBordered:Se,dateFormatter:ue,form:de,search:ye,manualRequest:_e};return!(0,cu.A)(xe,{columns:V.columns,formRef:V.formRef,loading:V.loading,type:V.type,cardBordered:V.cardBordered,dateFormatter:V.dateFormatter,form:V.form,search:V.search,manualRequest:V.manualRequest})}),(0,ne.Z)((0,Ua.Z)(w),"shouldComponentUpdate",function(V){return w.isEqual(V)}),(0,ne.Z)((0,Ua.Z)(w),"render",function(){var V=w.props,q=V.columns,ee=V.loading,ie=V.formRef,fe=V.type,ve=V.action,Se=V.cardBordered,ue=V.dateFormatter,de=V.form,ye=V.search,_e=V.pagination,xe=V.ghost,Ue=V.manualRequest,Ye=_e?(0,yi.Y)({current:_e.current,pageSize:_e.pageSize}):{};return(0,Q.jsx)(j1,{submitButtonLoading:ee,columns:q,type:fe,ghost:xe,formRef:ie,onSubmit:w.onSubmit,manualRequest:Ue,onReset:w.onReset,dateFormatter:ue,search:ye,form:(0,j.Z)((0,j.Z)({autoFocusFirstInput:!1},de),{},{extraUrlParams:(0,j.Z)((0,j.Z)({},Ye),de==null?void 0:de.extraUrlParams)}),action:ve,bordered:hs("search",Se)})}),w}return(0,oc.Z)(M)}(D.Component),D1=Y0,F1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},B1=F1,wf=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:B1}))},z1=D.forwardRef(wf),Sf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"},Z1=Sf,$1=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:Z1}))},W1=D.forwardRef($1),Of={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 474H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zm-353.6-74.7c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H550V104c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v156h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.6zm11.4 225.4a7.14 7.14 0 00-11.3 0L405.6 752.3a7.23 7.23 0 005.7 11.7H474v156c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V764h62.8c6 0 9.4-7 5.7-11.7L517.7 624.7z"}}]},name:"vertical-align-middle",theme:"outlined"},G1=Of,Rl=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:G1}))},H1=D.forwardRef(Rl),Y1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z"}}]},name:"vertical-align-bottom",theme:"outlined"},V1=Y1,U1=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:V1}))},X1=D.forwardRef(U1),K1=Y(34689),q1=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:K1.Z}))},J1=D.forwardRef(q1),Q1=Y(14e3),vu={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},eb=vu,lh=Y(93771),V0=function(y,M){return D.createElement(lh.Z,(0,we.Z)({},y,{ref:M,icon:eb}))},U0=D.forwardRef(V0),tb=Y(20640),X0=Y.n(tb),ch=Y(9220),Cf=Y(8410),uh=Y(42550),K0=Y(79370),fh=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M};const nb={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"};var q0=D.forwardRef((x,y)=>{const M=ee=>{const{keyCode:ie}=ee;ie===vr.Z.ENTER&&ee.preventDefault()},w=ee=>{const{keyCode:ie}=ee,{onClick:fe}=x;ie===vr.Z.ENTER&&fe&&fe()},{style:k,noStyle:U,disabled:N}=x,V=fh(x,["style","noStyle","disabled"]);let q={};return U||(q=Object.assign({},nb)),N&&(q.pointerEvents="none"),q=Object.assign(Object.assign({},q),k),D.createElement("div",Object.assign({role:"button",tabIndex:0,ref:y},V,{onKeyDown:M,onKeyUp:w,style:q}))}),dh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},rb=dh,ib=function(y,M){return D.createElement(lh.Z,(0,we.Z)({},y,{ref:M,icon:rb}))},J0=D.forwardRef(ib),ab=Y(22913),Q0=Y(49867),ob=Y(78589);const ev=(x,y,M,w)=>{const{titleMarginBottom:k,fontWeightStrong:U}=w;return{marginBottom:k,color:M,fontWeight:U,fontSize:x,lineHeight:y}},sb=x=>{const y=[1,2,3,4,5],M={};return y.forEach(w=>{M[`
|
|
h${w}&,
|
|
div&-h${w},
|
|
div&-h${w} > textarea,
|
|
h${w}
|
|
`]=ev(x[`fontSizeHeading${w}`],x[`lineHeightHeading${w}`],x.colorTextHeading,x)}),M},lb=x=>{const{componentCls:y}=x;return{"a&, a":Object.assign(Object.assign({},(0,Q0.N)(x)),{textDecoration:x.linkDecoration,"&:active, &:hover":{textDecoration:x.linkHoverDecoration},[`&[disabled], &${y}-disabled`]:{color:x.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:x.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},cb=x=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:x.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:x.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:ob.EV[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:x.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),ub=x=>{const{componentCls:y,paddingSM:M}=x,w=M;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:x.calc(x.paddingSM).mul(-1).equal(),marginTop:x.calc(w).mul(-1).equal(),marginBottom:`calc(1em - ${(0,Hn.bf)(w)})`},[`${y}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:x.calc(x.marginXS).add(2).equal(),insetBlockEnd:x.marginXS,color:x.colorTextDescription,fontWeight:"normal",fontSize:x.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},fb=x=>({[`${x.componentCls}-copy-success`]:{[`
|
|
&,
|
|
&:hover,
|
|
&:focus`]:{color:x.colorSuccess}},[`${x.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),hh=()=>({[`
|
|
a&-ellipsis,
|
|
span&-ellipsis
|
|
`]:{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),db=x=>{const{componentCls:y,titleMarginTop:M}=x;return{[y]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:x.colorText,wordBreak:"break-word",lineHeight:x.lineHeight,[`&${y}-secondary`]:{color:x.colorTextDescription},[`&${y}-success`]:{color:x.colorSuccess},[`&${y}-warning`]:{color:x.colorWarning},[`&${y}-danger`]:{color:x.colorError,"a&:active, a&:focus":{color:x.colorErrorActive},"a&:hover":{color:x.colorErrorHover}},[`&${y}-disabled`]:{color:x.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},[`
|
|
div&,
|
|
p
|
|
`]:{marginBottom:"1em"}},sb(x)),{[`
|
|
& + h1${y},
|
|
& + h2${y},
|
|
& + h3${y},
|
|
& + h4${y},
|
|
& + h5${y}
|
|
`]:{marginTop:M},[`
|
|
div,
|
|
ul,
|
|
li,
|
|
p,
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5`]:{[`
|
|
+ h1,
|
|
+ h2,
|
|
+ h3,
|
|
+ h4,
|
|
+ h5
|
|
`]:{marginTop:M}}}),cb(x)),lb(x)),{[`
|
|
${y}-expand,
|
|
${y}-edit,
|
|
${y}-copy
|
|
`]:Object.assign(Object.assign({},(0,Q0.N)(x)),{marginInlineStart:x.marginXXS})}),ub(x)),fb(x)),hh()),{"&-rtl":{direction:"rtl"}})}},hb=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"});var tv=(0,au.I$)("Typography",x=>[db(x)],hb),pb=x=>{const{prefixCls:y,"aria-label":M,className:w,style:k,direction:U,maxLength:N,autoSize:V=!0,value:q,onSave:ee,onCancel:ie,onEnd:fe,component:ve,enterIcon:Se=D.createElement(J0,null)}=x,ue=D.useRef(null),de=D.useRef(!1),ye=D.useRef(),[_e,xe]=D.useState(q);D.useEffect(()=>{xe(q)},[q]),D.useEffect(()=>{if(ue.current&&ue.current.resizableTextArea){const{textArea:le}=ue.current.resizableTextArea;le.focus();const{length:Ze}=le.value;le.setSelectionRange(Ze,Ze)}},[]);const Ue=le=>{let{target:Ze}=le;xe(Ze.value.replace(/[\n\r]/g,""))},Ye=()=>{de.current=!0},ft=()=>{de.current=!1},at=le=>{let{keyCode:Ze}=le;de.current||(ye.current=Ze)},Le=()=>{ee(_e.trim())},je=le=>{let{keyCode:Ze,ctrlKey:Ke,altKey:nt,metaKey:Ge,shiftKey:Ae}=le;ye.current===Ze&&!de.current&&!Ke&&!nt&&!Ge&&!Ae&&(Ze===vr.Z.ENTER?(Le(),fe==null||fe()):Ze===vr.Z.ESC&&ie())},Pe=()=>{Le()},Te=ve?`${y}-${ve}`:"",[Oe,Ve,Mt]=tv(y),it=Fe()(y,`${y}-edit-content`,{[`${y}-rtl`]:U==="rtl"},w,Te,Ve,Mt);return Oe(D.createElement("div",{className:it,style:k},D.createElement(ab.Z,{ref:ue,maxLength:N,value:_e,onChange:Ue,onKeyDown:at,onKeyUp:je,onCompositionStart:Ye,onCompositionEnd:ft,onBlur:Pe,"aria-label":M,rows:1,autoSize:V}),Se!==null?(0,_l.Tm)(Se,{className:`${y}-edit-content-confirm`}):null))};function Ef(x,y){return D.useMemo(()=>{const M=!!x;return[M,Object.assign(Object.assign({},y),M&&typeof x=="object"?x:null)]},[x])}var gb=(x,y)=>{const M=D.useRef(!1);D.useEffect(()=>{M.current?x():M.current=!0},y)},mb=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M},ph=D.forwardRef((x,y)=>{const{prefixCls:M,component:w="article",className:k,rootClassName:U,setContentRef:N,children:V,direction:q,style:ee}=x,ie=mb(x,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:fe,direction:ve,typography:Se}=D.useContext(Va.E_),ue=q!=null?q:ve;let de=y;N&&(de=(0,uh.sQ)(y,N));const ye=fe("typography",M),[_e,xe,Ue]=tv(ye),Ye=Fe()(ye,Se==null?void 0:Se.className,{[`${ye}-rtl`]:ue==="rtl"},k,U,xe,Ue),ft=Object.assign(Object.assign({},Se==null?void 0:Se.style),ee);return _e(D.createElement(w,Object.assign({className:Ye,style:ft,ref:de},ie),V))}),yb=Y(48820),bb=function(y,M){return D.createElement(lh.Z,(0,we.Z)({},y,{ref:M,icon:yb.Z}))},xb=D.forwardRef(bb);function nv(x){return x===!1?[!1,!1]:Array.isArray(x)?x:[x]}function Mf(x,y,M){return x===!0||x===void 0?y:x||M&&y}function _b(x){const{prefixCls:y,copied:M,locale:w={},onCopy:k,iconOnly:U,tooltips:N,icon:V}=x,q=nv(N),ee=nv(V),{copied:ie,copy:fe}=w,ve=M?Mf(q[1],ie):Mf(q[0],fe),ue=typeof ve=="string"?ve:M?ie:fe;return D.createElement(Ko.Z,{key:"copy",title:ve},D.createElement(q0,{className:Fe()(`${y}-copy`,{[`${y}-copy-success`]:M,[`${y}-copy-icon-only`]:U}),onClick:k,"aria-label":ue},M?Mf(ee[1],D.createElement(Lo.Z,null),!0):Mf(ee[0],D.createElement(xb,null),!0)))}const rv=D.forwardRef((x,y)=>{let{style:M,children:w}=x;const k=D.useRef(null);return D.useImperativeHandle(y,()=>({isExceed:()=>{const U=k.current;return U.scrollHeight>U.clientHeight},getHeight:()=>k.current.clientHeight})),D.createElement("span",{"aria-hidden":!0,ref:k,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},M)},w)});function iv(x){const y=typeof x;return y==="string"||y==="number"}function wb(x){let y=0;return x.forEach(M=>{iv(M)?y+=String(M).length:y+=1}),y}function av(x,y){let M=0;const w=[];for(let k=0;k<x.length;k+=1){if(M===y)return w;const U=x[k],V=iv(U)?String(U).length:1,q=M+V;if(q>y){const ee=y-M;return w.push(String(U).slice(0,ee)),w}w.push(U),M=q}return x}const vh=0,gh=1,mh=2,ov=3,sv={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function Sb(x){const{enableMeasure:y,width:M,text:w,children:k,rows:U,miscDeps:N,onEllipsis:V}=x,q=D.useMemo(()=>(0,fs.Z)(w),[w]),ee=D.useMemo(()=>wb(q),[w]),ie=D.useMemo(()=>k(q,!1,!1),[w]),[fe,ve]=D.useState(null),Se=D.useRef(null),ue=D.useRef(null),[de,ye]=D.useState(vh),[_e,xe]=D.useState(0);(0,Cf.Z)(()=>{ye(y&&M&&ee?gh:vh)},[M,w,U,y,q]),(0,Cf.Z)(()=>{var at,Le;if(de===gh){const je=!!(!((at=ue.current)===null||at===void 0)&&at.isExceed());ye(je?mh:ov),ve(je?[0,ee]:null),xe((((Le=ue.current)===null||Le===void 0?void 0:Le.getHeight())||0)+1),V(je)}},[de]);const Ue=fe?Math.ceil((fe[0]+fe[1])/2):0;(0,Cf.Z)(()=>{var at;const[Le,je]=fe||[0,0];if(Le!==je){const Te=(((at=Se.current)===null||at===void 0?void 0:at.getHeight())||0)>_e;let Oe=Ue;je-Le===1&&(Oe=Te?Le:je),ve(Te?[Le,Oe]:[Oe,je])}},[fe,Ue]);const Ye=D.useMemo(()=>{if(de!==mh||!fe||fe[0]!==fe[1]){const at=k(q,!1,!1);return de!==ov&&de!==vh?D.createElement("span",{style:Object.assign(Object.assign({},sv),{WebkitLineClamp:U})},at):at}return k(av(q,fe[0]),!0,!0)},[de,fe,q].concat((0,Qe.Z)(N))),ft={width:M,whiteSpace:"normal",margin:0,padding:0};return D.createElement(D.Fragment,null,Ye,de===gh&&D.createElement(rv,{style:Object.assign(Object.assign(Object.assign({},ft),sv),{WebkitLineClamp:U}),ref:ue},ie),de===mh&&fe&&fe[0]!==fe[1]&&D.createElement(rv,{style:Object.assign(Object.assign({},ft),{top:400}),ref:Se},k(av(q,Ue),!0,!0)))}var Ob=x=>{let{enableEllipsis:y,isEllipsis:M,children:w,tooltipProps:k}=x;return!(k!=null&&k.title)||!y?w:D.createElement(Ko.Z,Object.assign({open:M?void 0:!1},k),w)},Cb=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M};function Eb(x,y){let{mark:M,code:w,underline:k,delete:U,strong:N,keyboard:V,italic:q}=x,ee=y;function ie(fe,ve){ve&&(ee=D.createElement(fe,{},ee))}return ie("strong",N),ie("u",k),ie("del",U),ie("code",w),ie("mark",M),ie("kbd",V),ie("i",q),ee}const Mb="...";var Pf=D.forwardRef((x,y)=>{var M,w,k;const{prefixCls:U,className:N,style:V,type:q,disabled:ee,children:ie,ellipsis:fe,editable:ve,copyable:Se,component:ue,title:de}=x,ye=Cb(x,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:_e,direction:xe}=D.useContext(Va.E_),[Ue]=(0,co.Z)("Text"),Ye=D.useRef(null),ft=D.useRef(null),at=_e("typography",U),Le=(0,Da.Z)(ye,["mark","code","delete","underline","strong","keyboard","italic"]),[je,Pe]=Ef(ve),[Te,Oe]=(0,lr.Z)(!1,{value:Pe.editing}),{triggerType:Ve=["icon"]}=Pe,Mt=vt=>{var xn;vt&&((xn=Pe.onStart)===null||xn===void 0||xn.call(Pe)),Oe(vt)};gb(()=>{var vt;Te||(vt=ft.current)===null||vt===void 0||vt.focus()},[Te]);const it=vt=>{vt==null||vt.preventDefault(),Mt(!0)},le=vt=>{var xn;(xn=Pe.onChange)===null||xn===void 0||xn.call(Pe,vt),Mt(!1)},Ze=()=>{var vt;(vt=Pe.onCancel)===null||vt===void 0||vt.call(Pe),Mt(!1)},[Ke,nt]=Ef(Se),[Ge,Ae]=D.useState(!1),$e=D.useRef(null),st={};nt.format&&(st.format=nt.format);const ut=()=>{$e.current&&clearTimeout($e.current)},Pt=vt=>{var xn;vt==null||vt.preventDefault(),vt==null||vt.stopPropagation(),X0()(nt.text||String(ie)||"",st),Ae(!0),ut(),$e.current=setTimeout(()=>{Ae(!1)},3e3),(xn=nt.onCopy)===null||xn===void 0||xn.call(nt,vt)};D.useEffect(()=>ut,[]);const[lt,dt]=D.useState(!1),[tt,ct]=D.useState(!1),[Zt,Wt]=D.useState(!1),[Rn,ar]=D.useState(!1),[hn,Yn]=D.useState(!1),[Or,Ai]=D.useState(!0),[Yt,qe]=Ef(fe,{expandable:!1}),pt=Yt&&!Zt,{rows:bt=1}=qe,yn=D.useMemo(()=>!pt||qe.suffix!==void 0||qe.onEllipsis||qe.expandable||je||Ke,[pt,qe,je,Ke]);(0,Cf.Z)(()=>{Yt&&!yn&&(dt((0,K0.G)("webkitLineClamp")),ct((0,K0.G)("textOverflow")))},[yn,Yt]);const On=D.useMemo(()=>yn?!1:bt===1?tt:lt,[yn,tt,lt]),pn=pt&&(On?hn:Rn),tr=pt&&bt===1&&On,Ur=pt&&bt>1&&On,fo=vt=>{var xn;Wt(!0),(xn=qe.onExpand)===null||xn===void 0||xn.call(qe,vt)},[Za,yc]=D.useState(0),Ll=vt=>{let{offsetWidth:xn}=vt;yc(xn)},Nl=vt=>{var xn;ar(vt),Rn!==vt&&((xn=qe.onEllipsis)===null||xn===void 0||xn.call(qe,vt))};D.useEffect(()=>{const vt=Ye.current;if(Yt&&On&&vt){const xn=Ur?vt.offsetHeight<vt.scrollHeight:vt.offsetWidth<vt.scrollWidth;hn!==xn&&Yn(xn)}},[Yt,On,ie,Ur,Or,Za]),D.useEffect(()=>{const vt=Ye.current;if(typeof IntersectionObserver=="undefined"||!vt||!On||!pt)return;const xn=new IntersectionObserver(()=>{Ai(!!vt.offsetParent)});return xn.observe(vt),()=>{xn.disconnect()}},[On,pt]);let ho={};qe.tooltip===!0?ho={title:(M=Pe.text)!==null&&M!==void 0?M:ie}:D.isValidElement(qe.tooltip)?ho={title:qe.tooltip}:typeof qe.tooltip=="object"?ho=Object.assign({title:(w=Pe.text)!==null&&w!==void 0?w:ie},qe.tooltip):ho={title:qe.tooltip};const kl=D.useMemo(()=>{const vt=xn=>["string","number"].includes(typeof xn);if(!(!Yt||On)){if(vt(Pe.text))return Pe.text;if(vt(ie))return ie;if(vt(de))return de;if(vt(ho.title))return ho.title}},[Yt,On,de,ho.title,pn]);if(Te)return D.createElement(pb,{value:(k=Pe.text)!==null&&k!==void 0?k:typeof ie=="string"?ie:"",onSave:le,onCancel:Ze,onEnd:Pe.onEnd,prefixCls:at,className:N,style:V,direction:xe,component:ue,maxLength:Pe.maxLength,autoSize:Pe.autoSize,enterIcon:Pe.enterIcon});const yu=()=>{const{expandable:vt,symbol:xn}=qe;if(!vt)return null;let mn;return xn?mn=xn:mn=Ue==null?void 0:Ue.expand,D.createElement("a",{key:"expand",className:`${at}-expand`,onClick:fo,"aria-label":Ue==null?void 0:Ue.expand},mn)},po=()=>{if(!je)return;const{icon:vt,tooltip:xn}=Pe,mn=(0,fs.Z)(xn)[0]||(Ue==null?void 0:Ue.edit),ma=typeof mn=="string"?mn:"";return Ve.includes("icon")?D.createElement(Ko.Z,{key:"edit",title:xn===!1?"":mn},D.createElement(q0,{ref:ft,className:`${at}-edit`,onClick:it,"aria-label":ma},vt||D.createElement(U0,{role:"button"}))):null},Bs=()=>Ke?D.createElement(_b,Object.assign({key:"copy"},nt,{prefixCls:at,copied:Ge,locale:Ue,onCopy:Pt,iconOnly:ie==null})):null,ta=vt=>[vt&&yu(),po(),Bs()],si=vt=>[vt&&D.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Mb),qe.suffix,ta(vt)];return D.createElement(ch.Z,{onResize:Ll,disabled:!pt},vt=>D.createElement(Ob,{tooltipProps:ho,enableEllipsis:pt,isEllipsis:pn},D.createElement(ph,Object.assign({className:Fe()({[`${at}-${q}`]:q,[`${at}-disabled`]:ee,[`${at}-ellipsis`]:Yt,[`${at}-single-line`]:pt&&bt===1,[`${at}-ellipsis-single-line`]:tr,[`${at}-ellipsis-multiple-line`]:Ur},N),prefixCls:U,style:Object.assign(Object.assign({},V),{WebkitLineClamp:Ur?bt:void 0}),component:ue,ref:(0,uh.sQ)(vt,Ye,y),direction:xe,onClick:Ve.includes("text")?it:void 0,"aria-label":kl==null?void 0:kl.toString(),title:de},Le),D.createElement(Sb,{enableMeasure:pt&&!On,text:ie,rows:bt,width:Za,onEllipsis:Nl,miscDeps:[Ge,Zt]},(xn,mn)=>{let ma=xn;return xn.length&&mn&&kl&&(ma=D.createElement("span",{key:"show-content","aria-hidden":!0},ma)),Eb(x,D.createElement(D.Fragment,null,ma,si(mn)))}))))}),yh=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M},lv=D.forwardRef((x,y)=>{var{ellipsis:M,rel:w}=x,k=yh(x,["ellipsis","rel"]);const U=Object.assign(Object.assign({},k),{rel:w===void 0&&k.target==="_blank"?"noopener noreferrer":w});return delete U.navigate,D.createElement(Pf,Object.assign({},U,{ref:y,ellipsis:!!M,component:"a"}))}),Tb=D.forwardRef((x,y)=>D.createElement(Pf,Object.assign({ref:y},x,{component:"div"}))),Ab=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M};const cv=(x,y)=>{var{ellipsis:M}=x,w=Ab(x,["ellipsis"]);const k=D.useMemo(()=>M&&typeof M=="object"?(0,Da.Z)(M,["expandable","rows"]):M,[M]);return D.createElement(Pf,Object.assign({ref:y},w,{ellipsis:k,component:"span"}))};var Rb=D.forwardRef(cv),Ib=function(x,y){var M={};for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&y.indexOf(w)<0&&(M[w]=x[w]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,w=Object.getOwnPropertySymbols(x);k<w.length;k++)y.indexOf(w[k])<0&&Object.prototype.propertyIsEnumerable.call(x,w[k])&&(M[w[k]]=x[w[k]]);return M};const Lb=[1,2,3,4,5];var Nb=D.forwardRef((x,y)=>{const{level:M=1}=x,w=Ib(x,["level"]);let k;return Lb.includes(M)?k=`h${M}`:k="h1",D.createElement(Pf,Object.assign({ref:y},w,{component:k}))});const vc=ph;vc.Text=Rb,vc.Link=lv,vc.Title=Nb,vc.Paragraph=Tb;var uv=vc,kb=Y(84567),jb=function(y){return(0,ne.Z)((0,ne.Z)((0,ne.Z)({},y.componentCls,{width:"auto","&-title":{display:"flex",alignItems:"center",justifyContent:"space-between",height:"32px"},"&-overlay":(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(y.antCls,"-popover-inner-content"),{width:"200px",paddingBlock:0,paddingInline:0,paddingBlockEnd:8}),"".concat(y.antCls,"-tree-node-content-wrapper:hover"),{backgroundColor:"transparent"}),"".concat(y.antCls,"-tree-draggable-icon"),{cursor:"grab"}),"".concat(y.antCls,"-tree-treenode"),(0,ne.Z)((0,ne.Z)({alignItems:"center","&:hover":(0,ne.Z)({},"".concat(y.componentCls,"-list-item-option"),{display:"block"})},"".concat(y.antCls,"-tree-checkbox"),{marginInlineEnd:"4px"}),"".concat(y.antCls,"-tree-title"),{width:"100%"}))}),"".concat(y.componentCls,"-action-rest-button"),{color:y.colorPrimary}),"".concat(y.componentCls,"-list"),(0,ne.Z)((0,ne.Z)((0,ne.Z)({display:"flex",flexDirection:"column",width:"100%",paddingBlockStart:8},"&".concat(y.componentCls,"-list-group"),{paddingBlockStart:0}),"&-title",{marginBlockStart:"6px",marginBlockEnd:"6px",paddingInlineStart:"24px",color:y.colorTextSecondary,fontSize:"12px"}),"&-item",{display:"flex",alignItems:"center",maxHeight:24,justifyContent:"space-between","&-title":{flex:1,maxWidth:80,textOverflow:"ellipsis",overflow:"hidden",wordBreak:"break-all",whiteSpace:"nowrap"},"&-option":{display:"none",float:"right",cursor:"pointer","> span":{"> span.anticon":{color:y.colorPrimary}},"> span + span":{marginInlineStart:4}}}))};function Db(x){return(0,Mr.Xj)("ColumnSetting",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[jb(M)]})}var Fb=["key","dataIndex","children"],fv=["disabled"],bh=function(y){var M=y.title,w=y.show,k=y.children,U=y.columnKey,N=y.fixed,V=(0,D.useContext)(uo),q=V.columnsMap,ee=V.setColumnsMap;return w?(0,Q.jsx)(Ko.Z,{title:M,children:(0,Q.jsx)("span",{onClick:function(fe){fe.stopPropagation(),fe.preventDefault();var ve=q[U]||{},Se=(0,j.Z)((0,j.Z)({},q),{},(0,ne.Z)({},U,(0,j.Z)((0,j.Z)({},ve),{},{fixed:N})));ee(Se)},children:k})}):null},Bb=function(y){var M=y.columnKey,w=y.isLeaf,k=y.title,U=y.className,N=y.fixed,V=y.showListItemOption,q=(0,yt.YB)(),ee=(0,D.useContext)(yt.L_),ie=ee.hashId,fe=(0,Q.jsxs)("span",{className:"".concat(U,"-list-item-option ").concat(ie).trim(),children:[(0,Q.jsx)(bh,{columnKey:M,fixed:"left",title:q.getMessage("tableToolBar.leftPin","\u56FA\u5B9A\u5728\u5217\u9996"),show:N!=="left",children:(0,Q.jsx)(W1,{})}),(0,Q.jsx)(bh,{columnKey:M,fixed:void 0,title:q.getMessage("tableToolBar.noPin","\u4E0D\u56FA\u5B9A"),show:!!N,children:(0,Q.jsx)(H1,{})}),(0,Q.jsx)(bh,{columnKey:M,fixed:"right",title:q.getMessage("tableToolBar.rightPin","\u56FA\u5B9A\u5728\u5217\u5C3E"),show:N!=="right",children:(0,Q.jsx)(X1,{})})]});return(0,Q.jsxs)("span",{className:"".concat(U,"-list-item ").concat(ie).trim(),children:[(0,Q.jsx)("div",{className:"".concat(U,"-list-item-title ").concat(ie).trim(),children:k}),V&&!w?fe:null]},M)},xh=function(y){var M,w,k,U=y.list,N=y.draggable,V=y.checkable,q=y.showListItemOption,ee=y.className,ie=y.showTitle,fe=ie===void 0?!0:ie,ve=y.title,Se=y.listHeight,ue=Se===void 0?280:Se,de=(0,D.useContext)(yt.L_),ye=de.hashId,_e=(0,D.useContext)(uo),xe=_e.columnsMap,Ue=_e.setColumnsMap,Ye=_e.sortKeyColumns,ft=_e.setSortKeyColumns,at=U&&U.length>0,Le=(0,D.useMemo)(function(){if(!at)return{};var Oe=[],Ve=new Map,Mt=function it(le,Ze){return le.map(function(Ke){var nt,Ge=Ke.key,Ae=Ke.dataIndex,$e=Ke.children,st=(0,Xe.Z)(Ke,Fb),ut=Ro(Ge,[Ze==null?void 0:Ze.columnKey,st.index].filter(Boolean).join("-")),Pt=xe[ut||"null"]||{show:!0};Pt.show!==!1&&!$e&&Oe.push(ut);var lt=(0,j.Z)((0,j.Z)({key:ut},(0,Ln.Z)(st,["className"])),{},{selectable:!1,disabled:Pt.disable===!0,disableCheckbox:typeof Pt.disable=="boolean"?Pt.disable:(nt=Pt.disable)===null||nt===void 0?void 0:nt.checkbox,isLeaf:Ze?!0:void 0});if($e){var dt;lt.children=it($e,(0,j.Z)((0,j.Z)({},Pt),{},{columnKey:ut})),(dt=lt.children)!==null&&dt!==void 0&&dt.every(function(tt){return Oe==null?void 0:Oe.includes(tt.key)})&&Oe.push(ut)}return Ve.set(Ge,lt),lt})};return{list:Mt(U),keys:Oe,map:Ve}},[xe,U,at]),je=(0,Yr.J)(function(Oe,Ve,Mt){var it=(0,j.Z)({},xe),le=(0,Qe.Z)(Ye),Ze=le.findIndex(function(Ae){return Ae===Oe}),Ke=le.findIndex(function(Ae){return Ae===Ve}),nt=Mt>=Ze;if(!(Ze<0)){var Ge=le[Ze];le.splice(Ze,1),Mt===0?le.unshift(Ge):le.splice(nt?Ke:Ke+1,0,Ge),le.forEach(function(Ae,$e){it[Ae]=(0,j.Z)((0,j.Z)({},it[Ae]||{}),{},{order:$e})}),Ue(it),ft(le)}}),Pe=(0,Yr.J)(function(Oe){var Ve=(0,j.Z)({},xe),Mt=function it(le){var Ze,Ke=(0,j.Z)({},Ve[le]);if(Ke.show=Oe.checked,(Ze=Le.map)!==null&&Ze!==void 0&&(Ze=Ze.get(le))!==null&&Ze!==void 0&&Ze.children){var nt;(nt=Le.map.get(le))===null||nt===void 0||(nt=nt.children)===null||nt===void 0||nt.forEach(function(Ge){return it(Ge.key)})}Ve[le]=Ke};Mt(Oe.node.key),Ue((0,j.Z)({},Ve))});if(!at)return null;var Te=(0,Q.jsx)(Q1.Z,{itemHeight:24,draggable:N&&!!((M=Le.list)!==null&&M!==void 0&&M.length)&&((w=Le.list)===null||w===void 0?void 0:w.length)>1,checkable:V,onDrop:function(Ve){var Mt=Ve.node.key,it=Ve.dragNode.key,le=Ve.dropPosition,Ze=Ve.dropToGap,Ke=le===-1||!Ze?le+1:le;je(it,Mt,Ke)},blockNode:!0,onCheck:function(Ve,Mt){return Pe(Mt)},checkedKeys:Le.keys,showLine:!1,titleRender:function(Ve){var Mt=(0,j.Z)((0,j.Z)({},Ve),{},{children:void 0});if(!Mt.title)return null;var it=(0,Io.h)(Mt.title,Mt),le=(0,Q.jsx)(uv.Text,{style:{width:80},ellipsis:{tooltip:it},children:it});return(0,Q.jsx)(Bb,(0,j.Z)((0,j.Z)({className:ee},Mt),{},{showListItemOption:q,title:le,columnKey:Mt.key}))},height:ue,treeData:(k=Le.list)===null||k===void 0?void 0:k.map(function(Oe){var Ve=Oe.disabled,Mt=(0,Xe.Z)(Oe,fv);return Mt})});return(0,Q.jsxs)(Q.Fragment,{children:[fe&&(0,Q.jsx)("span",{className:"".concat(ee,"-list-title ").concat(ye).trim(),children:ve}),Te]})},zb=function(y){var M=y.localColumns,w=y.className,k=y.draggable,U=y.checkable,N=y.showListItemOption,V=y.listsHeight,q=(0,D.useContext)(yt.L_),ee=q.hashId,ie=[],fe=[],ve=[],Se=(0,yt.YB)();M.forEach(function(ye){if(!ye.hideInSetting){var _e=ye.fixed;if(_e==="left"){fe.push(ye);return}if(_e==="right"){ie.push(ye);return}ve.push(ye)}});var ue=ie&&ie.length>0,de=fe&&fe.length>0;return(0,Q.jsxs)("div",{className:Fe()("".concat(w,"-list"),ee,(0,ne.Z)({},"".concat(w,"-list-group"),ue||de)),children:[(0,Q.jsx)(xh,{title:Se.getMessage("tableToolBar.leftFixedTitle","\u56FA\u5B9A\u5728\u5DE6\u4FA7"),list:fe,draggable:k,checkable:U,showListItemOption:N,className:w,listHeight:V}),(0,Q.jsx)(xh,{list:ve,draggable:k,checkable:U,showListItemOption:N,title:Se.getMessage("tableToolBar.noFixedTitle","\u4E0D\u56FA\u5B9A"),showTitle:de||ue,className:w,listHeight:V}),(0,Q.jsx)(xh,{title:Se.getMessage("tableToolBar.rightFixedTitle","\u56FA\u5B9A\u5728\u53F3\u4FA7"),list:ie,draggable:k,checkable:U,showListItemOption:N,className:w,listHeight:V})]})};function dv(x){var y,M,w,k,U=(0,D.useRef)(null),N=(0,D.useContext)(uo),V=x.columns,q=x.checkedReset,ee=q===void 0?!0:q,ie=N.columnsMap,fe=N.setColumnsMap,ve=N.clearPersistenceStorage;(0,D.useEffect)(function(){var Pe;if((Pe=N.propsRef.current)!==null&&Pe!==void 0&&(Pe=Pe.columnsState)!==null&&Pe!==void 0&&Pe.value){var Te;U.current=JSON.parse(JSON.stringify(((Te=N.propsRef.current)===null||Te===void 0||(Te=Te.columnsState)===null||Te===void 0?void 0:Te.value)||{}))}},[]);var Se=(0,Yr.J)(function(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,Te={},Oe=function Ve(Mt){Mt.forEach(function(it){var le=it.key,Ze=it.fixed,Ke=it.index,nt=it.children,Ge=it.disable,Ae=Ro(le,Ke);if(Ae){var $e,st;Te[Ae]={show:Ge?($e=ie[Ae])===null||$e===void 0?void 0:$e.show:Pe,fixed:Ze,disable:Ge,order:(st=ie[Ae])===null||st===void 0?void 0:st.order}}nt&&Ve(nt)})};Oe(V),fe(Te)}),ue=(0,Yr.J)(function(Pe){Pe.target.checked?Se():Se(!1)}),de=(0,Yr.J)(function(){var Pe;ve==null||ve(),fe(((Pe=N.propsRef.current)===null||Pe===void 0||(Pe=Pe.columnsState)===null||Pe===void 0?void 0:Pe.defaultValue)||U.current||N.defaultColumnKeyMap)}),ye=Object.values(ie).filter(function(Pe){return!Pe||Pe.show===!1}),_e=ye.length>0&&ye.length!==V.length,xe=(0,yt.YB)(),Ue=(0,D.useContext)(pr.ZP.ConfigContext),Ye=Ue.getPrefixCls,ft=Ye("pro-table-column-setting"),at=Db(ft),Le=at.wrapSSR,je=at.hashId;return Le((0,Q.jsx)(Fa.Z,{arrow:!1,title:(0,Q.jsxs)("div",{className:"".concat(ft,"-title ").concat(je).trim(),children:[x.checkable===!1?(0,Q.jsx)("div",{}):(0,Q.jsx)(kb.Z,{indeterminate:_e,checked:ye.length===0&&ye.length!==V.length,onChange:function(Te){ue(Te)},children:xe.getMessage("tableToolBar.columnDisplay","\u5217\u5C55\u793A")}),ee?(0,Q.jsx)("a",{onClick:de,className:"".concat(ft,"-action-rest-button ").concat(je).trim(),children:xe.getMessage("tableToolBar.reset","\u91CD\u7F6E")}):null,x!=null&&x.extra?(0,Q.jsx)(Ol.Z,{size:12,align:"center",children:x.extra}):null]}),overlayClassName:"".concat(ft,"-overlay ").concat(je).trim(),trigger:"click",placement:"bottomRight",content:(0,Q.jsx)(zb,{checkable:(y=x.checkable)!==null&&y!==void 0?y:!0,draggable:(M=x.draggable)!==null&&M!==void 0?M:!0,showListItemOption:(w=x.showListItemOption)!==null&&w!==void 0?w:!0,className:ft,localColumns:V,listsHeight:x.listsHeight}),children:x.children||(0,Q.jsx)(Ko.Z,{title:xe.getMessage("tableToolBar.columnSetting","\u5217\u8BBE\u7F6E"),children:(k=x.settingIcon)!==null&&k!==void 0?k:(0,Q.jsx)(J1,{})})}))}var Zb=dv,$b=Y(66023),Wb=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:$b.Z}))},hv=D.forwardRef(Wb),Gb=Y(68508),pv=function(y){var M=(0,Pa.n)((0,lc.b)(),"4.24.0")>-1?{menu:y}:{overlay:(0,Q.jsx)(Gb.Z,(0,j.Z)({},y))};return(0,yi.Y)(M)},vv=Y(85418),Hb=function(y){var M=(0,D.useContext)(yt.L_),w=M.hashId,k=y.items,U=k===void 0?[]:k,N=y.type,V=N===void 0?"inline":N,q=y.prefixCls,ee=y.activeKey,ie=y.defaultActiveKey,fe=(0,lr.Z)(ee||ie,{value:ee,onChange:y.onChange}),ve=(0,_t.Z)(fe,2),Se=ve[0],ue=ve[1];if(U.length<1)return null;var de=U.find(function(_e){return _e.key===Se})||U[0];if(V==="inline")return(0,Q.jsx)("div",{className:Fe()("".concat(q,"-menu"),"".concat(q,"-inline-menu"),w),children:U.map(function(_e,xe){return(0,Q.jsx)("div",{onClick:function(){ue(_e.key)},className:Fe()("".concat(q,"-inline-menu-item"),de.key===_e.key?"".concat(q,"-inline-menu-item-active"):void 0,w),children:_e.label},_e.key||xe)})});if(V==="tab")return(0,Q.jsx)(gi.Z,{items:U.map(function(_e){var xe;return(0,j.Z)((0,j.Z)({},_e),{},{key:(xe=_e.key)===null||xe===void 0?void 0:xe.toString()})}),activeKey:de.key,onTabClick:function(xe){return ue(xe)},children:(0,Pa.n)(Xs.Z,"4.23.0")<0?U==null?void 0:U.map(function(_e,xe){return(0,D.createElement)(gi.Z.TabPane,(0,j.Z)((0,j.Z)({},_e),{},{key:_e.key||xe,tab:_e.label}))}):null});var ye=pv({selectedKeys:[de.key],onClick:function(xe){ue(xe.key)},items:U.map(function(_e,xe){return{key:_e.key||xe,disabled:_e.disabled,label:_e.label}})});return(0,Q.jsx)("div",{className:Fe()("".concat(q,"-menu"),"".concat(q,"-dropdownmenu")),children:(0,Q.jsx)(vv.Z,(0,j.Z)((0,j.Z)({trigger:["click"]},ye),{},{children:(0,Q.jsxs)(Ol.Z,{className:"".concat(q,"-dropdownmenu-label"),children:[de.label,(0,Q.jsx)(hv,{})]})}))})},Yb=Hb,Vb=function(y){return(0,ne.Z)({},y.componentCls,(0,ne.Z)((0,ne.Z)((0,ne.Z)({lineHeight:"1","&-container":{display:"flex",justifyContent:"space-between",paddingBlock:y.padding,paddingInline:0,"&-mobile":{flexDirection:"column"}},"&-title":{display:"flex",alignItems:"center",justifyContent:"flex-start",color:y.colorTextHeading,fontWeight:"500",fontSize:y.fontSizeLG},"&-search:not(:last-child)":{display:"flex",alignItems:"center",justifyContent:"flex-start"},"&-setting-item":{marginBlock:0,marginInline:4,color:y.colorIconHover,fontSize:y.fontSizeLG,cursor:"pointer","> span":{display:"block",width:"100%",height:"100%"},"&:hover":{color:y.colorPrimary}},"&-left":(0,ne.Z)((0,ne.Z)({display:"flex",flexWrap:"wrap",alignItems:"center",gap:y.marginXS,justifyContent:"flex-start",maxWidth:"calc(100% - 200px)",flex:1},"".concat(y.antCls,"-tabs"),{width:"100%"}),"&-has-tabs",{overflow:"hidden"}),"&-right":{flex:1,display:"flex",flexWrap:"wrap",justifyContent:"flex-end",gap:y.marginXS},"&-extra-line":{marginBlockEnd:y.margin},"&-setting-items":{display:"flex",gap:y.marginXS,lineHeight:"32px",alignItems:"center"},"&-filter":(0,ne.Z)({"&:not(:last-child)":{marginInlineEnd:y.margin},display:"flex",alignItems:"center"},"div$".concat(y.antCls,"-pro-table-search"),{marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0}),"&-inline-menu-item":{display:"inline-block",marginInlineEnd:y.marginLG,cursor:"pointer",opacity:"0.75","&-active":{fontWeight:"bold",opacity:"1"}}},"".concat(y.antCls,"-tabs-top > ").concat(y.antCls,"-tabs-nav"),(0,ne.Z)({marginBlockEnd:0,"&::before":{borderBlockEnd:0}},"".concat(y.antCls,"-tabs-nav-list"),{marginBlockStart:0,"${token.antCls}-tabs-tab":{paddingBlockStart:0}})),"&-dropdownmenu-label",{fontWeight:"bold",fontSize:y.fontSizeIcon,textAlign:"center",cursor:"pointer"}),"@media (max-width: 768px)",(0,ne.Z)({},y.componentCls,{"&-container":{display:"flex",flexWrap:"wrap",flexDirection:"column"},"&-left":{marginBlockEnd:"16px",maxWidth:"100%"}})))};function Ub(x){return(0,Mr.Xj)("ProTableListToolBar",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[Vb(M)]})}function Xb(x){if(D.isValidElement(x))return x;if(x){var y=x,M=y.icon,w=y.tooltip,k=y.onClick,U=y.key;return M&&w?(0,Q.jsx)(Ko.Z,{title:w,children:(0,Q.jsx)("span",{onClick:function(){k&&k(U)},children:M},U)}):(0,Q.jsx)("span",{onClick:function(){k&&k(U)},children:M},U)}return null}var Kb=function(y){var M,w=y.prefixCls,k=y.tabs,U=y.multipleLine,N=y.filtersNode;return U?(0,Q.jsx)("div",{className:"".concat(w,"-extra-line"),children:k!=null&&k.items&&k!==null&&k!==void 0&&k.items.length?(0,Q.jsx)(gi.Z,{style:{width:"100%"},defaultActiveKey:k.defaultActiveKey,activeKey:k.activeKey,items:k.items.map(function(V,q){var ee;return(0,j.Z)((0,j.Z)({label:V.tab},V),{},{key:((ee=V.key)===null||ee===void 0?void 0:ee.toString())||(q==null?void 0:q.toString())})}),onChange:k.onChange,tabBarExtraContent:N,children:(M=k.items)===null||M===void 0?void 0:M.map(function(V,q){return(0,Pa.n)(Xs.Z,"4.23.0")<0?(0,D.createElement)(gi.Z.TabPane,(0,j.Z)((0,j.Z)({},V),{},{key:V.key||q,tab:V.tab})):null})}):N}):null},qb=function(y){var M=y.prefixCls,w=y.title,k=y.subTitle,U=y.tooltip,N=y.className,V=y.style,q=y.search,ee=y.onSearch,ie=y.multipleLine,fe=ie===void 0?!1:ie,ve=y.filter,Se=y.actions,ue=Se===void 0?[]:Se,de=y.settings,ye=de===void 0?[]:de,_e=y.tabs,xe=y.menu,Ue=(0,D.useContext)(pr.ZP.ConfigContext),Ye=Ue.getPrefixCls,ft=Mr.Ow.useToken(),at=ft.token,Le=Ye("pro-table-list-toolbar",M),je=Ub(Le),Pe=je.wrapSSR,Te=je.hashId,Oe=(0,yt.YB)(),Ve=(0,D.useState)(!1),Mt=(0,_t.Z)(Ve,2),it=Mt[0],le=Mt[1],Ze=Oe.getMessage("tableForm.inputPlaceholder","\u8BF7\u8F93\u5165"),Ke=(0,D.useMemo)(function(){return q?D.isValidElement(q)?q:(0,Q.jsx)(k0.Z.Search,(0,j.Z)((0,j.Z)({style:{width:200},placeholder:Ze},q),{},{onSearch:(0,me.Z)((0,se.Z)().mark(function dt(){var tt,ct,Zt,Wt,Rn,ar,hn=arguments;return(0,se.Z)().wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:for(Zt=hn.length,Wt=new Array(Zt),Rn=0;Rn<Zt;Rn++)Wt[Rn]=hn[Rn];return Or.next=3,(tt=(ct=q).onSearch)===null||tt===void 0?void 0:tt.call.apply(tt,[ct].concat(Wt));case 3:ar=Or.sent,ar!==!1&&(ee==null||ee(Wt==null?void 0:Wt[0]));case 5:case"end":return Or.stop()}},dt)}))})):null},[Ze,ee,q]),nt=(0,D.useMemo)(function(){return ve?(0,Q.jsx)("div",{className:"".concat(Le,"-filter ").concat(Te).trim(),children:ve}):null},[ve,Te,Le]),Ge=(0,D.useMemo)(function(){return xe||w||k||U},[xe,k,w,U]),Ae=(0,D.useMemo)(function(){return Array.isArray(ue)?ue.length<1?null:(0,Q.jsx)("div",{style:{display:"flex",alignItems:"center",gap:at.marginXS},children:ue.map(function(dt,tt){return D.isValidElement(dt)?D.cloneElement(dt,(0,j.Z)({key:tt},dt==null?void 0:dt.props)):(0,Q.jsx)(D.Fragment,{children:dt},tt)})}):ue},[ue]),$e=(0,D.useMemo)(function(){return!!(Ge&&Ke||!fe&&nt||Ae||ye!=null&&ye.length)},[Ae,nt,Ge,fe,Ke,ye==null?void 0:ye.length]),st=(0,D.useMemo)(function(){return U||w||k||xe||!Ge&&Ke},[Ge,xe,Ke,k,w,U]),ut=(0,D.useMemo)(function(){return!st&&$e?(0,Q.jsx)("div",{className:"".concat(Le,"-left ").concat(Te).trim()}):!xe&&(Ge||!Ke)?(0,Q.jsx)("div",{className:"".concat(Le,"-left ").concat(Te).trim(),children:(0,Q.jsx)("div",{className:"".concat(Le,"-title ").concat(Te).trim(),children:(0,Q.jsx)(Gn.G,{tooltip:U,label:w,subTitle:k})})}):(0,Q.jsxs)("div",{className:Fe()("".concat(Le,"-left"),Te,(0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(Le,"-left-has-tabs"),(xe==null?void 0:xe.type)==="tab"),"".concat(Le,"-left-has-dropdown"),(xe==null?void 0:xe.type)==="dropdown"),"".concat(Le,"-left-has-inline-menu"),(xe==null?void 0:xe.type)==="inline")),children:[Ge&&!xe&&(0,Q.jsx)("div",{className:"".concat(Le,"-title ").concat(Te).trim(),children:(0,Q.jsx)(Gn.G,{tooltip:U,label:w,subTitle:k})}),xe&&(0,Q.jsx)(Yb,(0,j.Z)((0,j.Z)({},xe),{},{prefixCls:Le})),!Ge&&Ke?(0,Q.jsx)("div",{className:"".concat(Le,"-search ").concat(Te).trim(),children:Ke}):null]})},[st,$e,Ge,Te,xe,Le,Ke,k,w,U]),Pt=(0,D.useMemo)(function(){return $e?(0,Q.jsxs)("div",{className:"".concat(Le,"-right ").concat(Te).trim(),style:it?{}:{alignItems:"center"},children:[fe?null:nt,Ge&&Ke?(0,Q.jsx)("div",{className:"".concat(Le,"-search ").concat(Te).trim(),children:Ke}):null,Ae,ye!=null&&ye.length?(0,Q.jsx)("div",{className:"".concat(Le,"-setting-items ").concat(Te).trim(),children:ye.map(function(dt,tt){var ct=Xb(dt);return(0,Q.jsx)("div",{className:"".concat(Le,"-setting-item ").concat(Te).trim(),children:ct},tt)})}):null]}):null},[$e,Le,Te,it,Ge,Ke,fe,nt,Ae,ye]),lt=(0,D.useMemo)(function(){if(!$e&&!st)return null;var dt=Fe()("".concat(Le,"-container"),Te,(0,ne.Z)({},"".concat(Le,"-container-mobile"),it));return(0,Q.jsxs)("div",{className:dt,children:[ut,Pt]})},[st,$e,Te,it,ut,Le,Pt]);return Pe((0,Q.jsx)(ch.Z,{onResize:function(tt){tt.width<375!==it&&le(tt.width<375)},children:(0,Q.jsxs)("div",{style:V,className:Fe()(Le,Te,N),children:[lt,(0,Q.jsx)(Kb,{filtersNode:nt,prefixCls:Le,tabs:_e,multipleLine:fe})]})}))},Jb=qb,Qb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z"}}]},name:"column-height",theme:"outlined"},ex=Qb,tx=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:ex}))},nx=D.forwardRef(tx),rx=function(y){var M=y.icon,w=M===void 0?(0,Q.jsx)(nx,{}):M,k=(0,D.useContext)(uo),U=(0,yt.YB)(),N=pv({selectedKeys:[k.tableSize],onClick:function(q){var ee,ie=q.key;(ee=k.setTableSize)===null||ee===void 0||ee.call(k,ie)},style:{width:80},items:[{key:"large",label:U.getMessage("tableToolBar.densityLarger","\u9ED8\u8BA4")},{key:"middle",label:U.getMessage("tableToolBar.densityMiddle","\u4E2D\u7B49")},{key:"small",label:U.getMessage("tableToolBar.densitySmall","\u7D27\u51D1")}]});return(0,Q.jsx)(vv.Z,(0,j.Z)((0,j.Z)({},N),{},{trigger:["click"],children:(0,Q.jsx)(Ko.Z,{title:U.getMessage("tableToolBar.density","\u8868\u683C\u5BC6\u5EA6"),children:w})}))},Vr=D.memo(rx),Tf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"},gv=Tf,ix=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:gv}))},ax=D.forwardRef(ix),ox={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"},mv=ox,sx=function(y,M){return D.createElement(Ei,(0,we.Z)({},y,{ref:M,icon:mv}))},lx=D.forwardRef(sx),gu=Y(12044),cx=function(){var y=(0,yt.YB)(),M=(0,D.useState)(!1),w=(0,_t.Z)(M,2),k=w[0],U=w[1];return(0,D.useEffect)(function(){(0,gu.j)()&&(document.onfullscreenchange=function(){U(!!document.fullscreenElement)})},[]),k?(0,Q.jsx)(Ko.Z,{title:y.getMessage("tableToolBar.exitFullScreen","\u5168\u5C4F"),children:(0,Q.jsx)(ax,{})}):(0,Q.jsx)(Ko.Z,{title:y.getMessage("tableToolBar.fullScreen","\u5168\u5C4F"),children:(0,Q.jsx)(lx,{})})},yv=D.memo(cx),ux=["headerTitle","tooltip","toolBarRender","action","options","selectedRowKeys","selectedRows","toolbar","onSearch","columns","optionsRender"];function _h(x,y){var M,w=x.intl;return{reload:{text:w.getMessage("tableToolBar.reload","\u5237\u65B0"),icon:(M=y.reloadIcon)!==null&&M!==void 0?M:(0,Q.jsx)(z1,{})},density:{text:w.getMessage("tableToolBar.density","\u8868\u683C\u5BC6\u5EA6"),icon:(0,Q.jsx)(Vr,{icon:y.densityIcon})},fullScreen:{text:w.getMessage("tableToolBar.fullScreen","\u5168\u5C4F"),icon:(0,Q.jsx)(yv,{})}}}function fx(x,y,M,w){return Object.keys(x).filter(function(k){return k}).map(function(k){var U=x[k];if(!U)return null;var N=U===!0?y[k]:function(q){U==null||U(q,M.current)};if(typeof N!="function"&&(N=function(){}),k==="setting")return(0,D.createElement)(Zb,(0,j.Z)((0,j.Z)({},x[k]),{},{columns:w,key:k}));if(k==="fullScreen")return(0,Q.jsx)("span",{onClick:N,children:(0,Q.jsx)(yv,{})},k);var V=_h(y,x)[k];return V?(0,Q.jsx)("span",{onClick:N,children:(0,Q.jsx)(Ko.Z,{title:V.text,children:V.icon})},k):null}).filter(function(k){return k})}function wh(x){var y=x.headerTitle,M=x.tooltip,w=x.toolBarRender,k=x.action,U=x.options,N=x.selectedRowKeys,V=x.selectedRows,q=x.toolbar,ee=x.onSearch,ie=x.columns,fe=x.optionsRender,ve=(0,Xe.Z)(x,ux),Se=(0,D.useContext)(uo),ue=(0,yt.YB)(),de=(0,D.useMemo)(function(){var xe={reload:function(){var at;return k==null||(at=k.current)===null||at===void 0?void 0:at.reload()},density:!0,setting:!0,search:!1,fullScreen:function(){var at,Le;return k==null||(at=k.current)===null||at===void 0||(Le=at.fullScreen)===null||Le===void 0?void 0:Le.call(at)}};if(U===!1)return[];var Ue=(0,j.Z)((0,j.Z)({},xe),{},{fullScreen:!1},U),Ye=fx(Ue,(0,j.Z)((0,j.Z)({},xe),{},{intl:ue}),k,ie);return fe?fe((0,j.Z)({headerTitle:y,tooltip:M,toolBarRender:w,action:k,options:U,selectedRowKeys:N,selectedRows:V,toolbar:q,onSearch:ee,columns:ie,optionsRender:fe},ve),Ye):Ye},[k,ie,y,ue,ee,fe,U,ve,N,V,w,q,M]),ye=w?w(k==null?void 0:k.current,{selectedRowKeys:N,selectedRows:V}):[],_e=(0,D.useMemo)(function(){if(!U||!U.search)return!1;var xe={value:Se.keyWords,onChange:function(Ye){return Se.setKeyWords(Ye.target.value)}};return U.search===!0?xe:(0,j.Z)((0,j.Z)({},xe),U.search)},[Se,U]);return(0,D.useEffect)(function(){Se.keyWords===void 0&&(ee==null||ee(""))},[Se.keyWords,ee]),(0,Q.jsx)(Jb,(0,j.Z)({title:y,tooltip:M||ve.tip,search:_e,onSearch:ee,actions:ye,settings:de},q))}var dx=function(x){(0,Qs.Z)(M,x);var y=(0,df.Z)(M);function M(){var w;(0,ps.Z)(this,M);for(var k=arguments.length,U=new Array(k),N=0;N<k;N++)U[N]=arguments[N];return w=y.call.apply(y,[this].concat(U)),(0,ne.Z)((0,Ua.Z)(w),"onSearch",function(V){var q,ee,ie,fe,ve=w.props,Se=ve.options,ue=ve.onFormSearchSubmit,de=ve.actionRef;if(!(!Se||!Se.search)){var ye=Se.search===!0?{}:Se.search,_e=ye.name,xe=_e===void 0?"keyword":_e,Ue=(q=Se.search)===null||q===void 0||(ee=q.onSearch)===null||ee===void 0?void 0:ee.call(q,V);Ue!==!1&&(de==null||(ie=de.current)===null||ie===void 0||(fe=ie.setPageInfo)===null||fe===void 0||fe.call(ie,{current:1}),ue((0,yi.Y)((0,ne.Z)({_timestamp:Date.now()},xe,V))))}}),(0,ne.Z)((0,Ua.Z)(w),"isEquals",function(V){var q=w.props,ee=q.hideToolbar,ie=q.tableColumn,fe=q.options,ve=q.tooltip,Se=q.toolbar,ue=q.selectedRows,de=q.selectedRowKeys,ye=q.headerTitle,_e=q.actionRef,xe=q.toolBarRender;return(0,cu.A)({hideToolbar:ee,tableColumn:ie,options:fe,tooltip:ve,toolbar:Se,selectedRows:ue,selectedRowKeys:de,headerTitle:ye,actionRef:_e,toolBarRender:xe},{hideToolbar:V.hideToolbar,tableColumn:V.tableColumn,options:V.options,tooltip:V.tooltip,toolbar:V.toolbar,selectedRows:V.selectedRows,selectedRowKeys:V.selectedRowKeys,headerTitle:V.headerTitle,actionRef:V.actionRef,toolBarRender:V.toolBarRender},["render","renderFormItem"])}),(0,ne.Z)((0,Ua.Z)(w),"shouldComponentUpdate",function(V){return V.searchNode?!0:!w.isEquals(V)}),(0,ne.Z)((0,Ua.Z)(w),"render",function(){var V=w.props,q=V.hideToolbar,ee=V.tableColumn,ie=V.options,fe=V.searchNode,ve=V.tooltip,Se=V.toolbar,ue=V.selectedRows,de=V.selectedRowKeys,ye=V.headerTitle,_e=V.actionRef,xe=V.toolBarRender,Ue=V.optionsRender;return q?null:(0,Q.jsx)(wh,{tooltip:ve,columns:ee,options:ie,headerTitle:ye,action:_e,onSearch:w.onSearch,selectedRows:ue,selectedRowKeys:de,toolBarRender:xe,toolbar:(0,j.Z)({filter:fe},Se),optionsRender:Ue})}),w}return(0,oc.Z)(M)}(D.Component),hx=dx,px=new Hn.E4("turn",{"0%":{transform:"rotate(0deg)"},"25%":{transform:"rotate(90deg)"},"50%":{transform:"rotate(180deg)"},"75%":{transform:"rotate(270deg)"},"100%":{transform:"rotate(360deg)"}}),vx=function(y){return(0,ne.Z)((0,ne.Z)((0,ne.Z)({},y.componentCls,(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({zIndex:1},"".concat(y.antCls,"-table-wrapper ").concat(y.antCls,"-table-pagination").concat(y.antCls,"-pagination"),{marginBlockEnd:0}),"&:not(:root):fullscreen",{minHeight:"100vh",overflow:"auto",background:y.colorBgContainer}),"&-extra",{marginBlockEnd:16}),"&-polling",(0,ne.Z)({},"".concat(y.componentCls,"-list-toolbar-setting-item"),{".anticon.anticon-reload":{transform:"rotate(0deg)",animationName:px,animationDuration:"1s",animationTimingFunction:"linear",animationIterationCount:"infinite"}})),"td".concat(y.antCls,"-table-cell"),{">a":{fontSize:y.fontSize}}),"".concat(y.antCls,"-table").concat(y.antCls,"-table-tbody").concat(y.antCls,"-table-wrapper:only-child").concat(y.antCls,"-table"),{marginBlock:0,marginInline:0}),"".concat(y.antCls,"-table").concat(y.antCls,"-table-middle ").concat(y.componentCls),(0,ne.Z)({marginBlock:0,marginInline:-8},"".concat(y.proComponentsCls,"-card"),{backgroundColor:"initial"})),"& &-search",(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({marginBlockEnd:"16px",background:y.colorBgContainer,"&-ghost":{background:"transparent"}},"&".concat(y.componentCls,"-form"),{marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:16,overflow:"unset"}),"&-light-filter",{marginBlockEnd:0,paddingBlock:0,paddingInline:0}),"&-form-option",(0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(y.antCls,"-form-item"),{}),"".concat(y.antCls,"-form-item-label"),{}),"".concat(y.antCls,"-form-item-control-input"),{})),"@media (max-width: 575px)",(0,ne.Z)({},y.componentCls,(0,ne.Z)({height:"auto !important",paddingBlockEnd:"24px"},"".concat(y.antCls,"-form-item-label"),{minWidth:"80px",textAlign:"start"})))),"&-toolbar",{display:"flex",alignItems:"center",justifyContent:"space-between",height:"64px",paddingInline:24,paddingBlock:0,"&-option":{display:"flex",alignItems:"center",justifyContent:"flex-end"},"&-title":{flex:"1",color:y.colorTextLabel,fontWeight:"500",fontSize:"16px",lineHeight:"24px",opacity:"0.85"}})),"@media (max-width: ".concat(y.screenXS,")px"),(0,ne.Z)({},y.componentCls,(0,ne.Z)({},"".concat(y.antCls,"-table"),{width:"100%",overflowX:"auto","&-thead > tr,&-tbody > tr":{"> th,> td":{whiteSpace:"pre",">span":{display:"block"}}}}))),"@media (max-width: 575px)",(0,ne.Z)({},"".concat(y.componentCls,"-toolbar"),{flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",height:"auto",marginBlockEnd:"16px",marginInlineStart:"16px",paddingBlock:8,paddingInline:8,paddingBlockStart:"16px",lineHeight:"normal","&-title":{marginBlockEnd:16},"&-option":{display:"flex",justifyContent:"space-between",width:"100%"},"&-default-option":{display:"flex",flex:"1",alignItems:"center",justifyContent:"flex-end"}}))};function gx(x){return(0,Mr.Xj)("ProTable",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[vx(M)]})}var mx=["data","success","total"],yx=function(y){var M=y.pageInfo;if(M){var w=M.current,k=M.defaultCurrent,U=M.pageSize,N=M.defaultPageSize;return{current:w||k||1,total:0,pageSize:U||N||20}}return{current:1,total:0,pageSize:20}},bx=function(y,M,w){var k,U=(0,D.useRef)(!1),N=(0,D.useRef)(null),V=w||{},q=V.onLoad,ee=V.manual,ie=V.polling,fe=V.onRequestError,ve=V.debounceTime,Se=ve===void 0?20:ve,ue=V.effects,de=ue===void 0?[]:ue,ye=(0,D.useRef)(ee),_e=(0,D.useRef)(),xe=(0,lr.Z)(M,{value:w==null?void 0:w.dataSource,onChange:w==null?void 0:w.onDataSourceChange}),Ue=(0,_t.Z)(xe,2),Ye=Ue[0],ft=Ue[1],at=(0,lr.Z)(!1,{value:(0,wt.Z)(w==null?void 0:w.loading)==="object"?w==null||(k=w.loading)===null||k===void 0?void 0:k.spinning:w==null?void 0:w.loading,onChange:w==null?void 0:w.onLoadingChange}),Le=(0,_t.Z)(at,2),je=Le[0],Pe=Le[1],Te=(0,lr.Z)(function(){return yx(w)},{onChange:w==null?void 0:w.onPageInfoChange}),Oe=(0,_t.Z)(Te,2),Ve=Oe[0],Mt=Oe[1],it=(0,Yr.J)(function(tt){(tt.current!==Ve.current||tt.pageSize!==Ve.pageSize||tt.total!==Ve.total)&&Mt(tt)}),le=(0,lr.Z)(!1),Ze=(0,_t.Z)(le,2),Ke=Ze[0],nt=Ze[1],Ge=function(ct,Zt){(0,Ds.unstable_batchedUpdates)(function(){ft(ct),(Ve==null?void 0:Ve.total)!==Zt&&it((0,j.Z)((0,j.Z)({},Ve),{},{total:Zt||ct.length}))})},Ae=(0,ze.D)(Ve==null?void 0:Ve.current),$e=(0,ze.D)(Ve==null?void 0:Ve.pageSize),st=(0,ze.D)(ie),ut=(0,Yr.J)(function(){(0,Ds.unstable_batchedUpdates)(function(){Pe(!1),nt(!1)})}),Pt=function(){var tt=(0,me.Z)((0,se.Z)().mark(function ct(Zt){var Wt,Rn,ar,hn,Yn,Or,Ai,Yt,qe,pt,bt,yn;return(0,se.Z)().wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:if(!ye.current){pn.next=3;break}return ye.current=!1,pn.abrupt("return");case 3:return Zt?nt(!0):Pe(!0),Wt=Ve||{},Rn=Wt.pageSize,ar=Wt.current,pn.prev=5,hn=(w==null?void 0:w.pageInfo)!==!1?{current:ar,pageSize:Rn}:void 0,pn.next=9,y==null?void 0:y(hn);case 9:if(pn.t0=pn.sent,pn.t0){pn.next=12;break}pn.t0={};case 12:if(Yn=pn.t0,Or=Yn.data,Ai=Or===void 0?[]:Or,Yt=Yn.success,qe=Yn.total,pt=qe===void 0?0:qe,bt=(0,Xe.Z)(Yn,mx),Yt!==!1){pn.next=21;break}return pn.abrupt("return",[]);case 21:return yn=Js(Ai,[w.postData].filter(function(tr){return tr})),Ge(yn,pt),q==null||q(yn,bt),pn.abrupt("return",yn);case 27:if(pn.prev=27,pn.t1=pn.catch(5),fe!==void 0){pn.next=31;break}throw new Error(pn.t1);case 31:Ye===void 0&&ft([]),fe(pn.t1);case 33:return pn.prev=33,ut(),pn.finish(33);case 36:return pn.abrupt("return",[]);case 37:case"end":return pn.stop()}},ct,null,[[5,27,33,36]])}));return function(Zt){return tt.apply(this,arguments)}}(),lt=(0,pe.D)(function(){var tt=(0,me.Z)((0,se.Z)().mark(function ct(Zt){var Wt,Rn,ar;return(0,se.Z)().wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:if(_e.current&&clearTimeout(_e.current),y){Yn.next=3;break}return Yn.abrupt("return");case 3:return Wt=new AbortController,N.current=Wt,Yn.prev=5,Yn.next=8,Promise.race([Pt(Zt),new Promise(function(Or,Ai){var Yt,qe;(Yt=N.current)===null||Yt===void 0||(Yt=Yt.signal)===null||Yt===void 0||(qe=Yt.addEventListener)===null||qe===void 0||qe.call(Yt,"abort",function(){Ai("aborted"),lt.cancel(),ut()})})]);case 8:if(Rn=Yn.sent,!Wt.signal.aborted){Yn.next=11;break}return Yn.abrupt("return");case 11:return ar=(0,Io.h)(ie,Rn),ar&&!U.current&&(_e.current=setTimeout(function(){lt.run(ar)},Math.max(ar,2e3))),Yn.abrupt("return",Rn);case 16:if(Yn.prev=16,Yn.t0=Yn.catch(5),Yn.t0!=="aborted"){Yn.next=20;break}return Yn.abrupt("return");case 20:throw Yn.t0;case 21:case"end":return Yn.stop()}},ct,null,[[5,16]])}));return function(ct){return tt.apply(this,arguments)}}(),Se||30),dt=function(){var ct;(ct=N.current)===null||ct===void 0||ct.abort(),lt.cancel(),ut()};return(0,D.useEffect)(function(){return ie||clearTimeout(_e.current),!st&&ie&<.run(!0),function(){clearTimeout(_e.current)}},[ie]),(0,D.useEffect)(function(){return U.current=!1,function(){U.current=!0}},[]),(0,D.useEffect)(function(){var tt=Ve||{},ct=tt.current,Zt=tt.pageSize;(!Ae||Ae===ct)&&(!$e||$e===Zt)||w.pageInfo&&Ye&&(Ye==null?void 0:Ye.length)>Zt||ct!==void 0&&Ye&&Ye.length<=Zt&&(dt(),lt.run(!1))},[Ve==null?void 0:Ve.current]),(0,D.useEffect)(function(){$e&&(dt(),lt.run(!1))},[Ve==null?void 0:Ve.pageSize]),(0,Me.KW)(function(){return dt(),lt.run(!1),ee||(ye.current=!1),function(){dt()}},[].concat((0,Qe.Z)(de),[ee])),{dataSource:Ye,setDataSource:ft,loading:(0,wt.Z)(w==null?void 0:w.loading)==="object"?(0,j.Z)((0,j.Z)({},w==null?void 0:w.loading),{},{spinning:je}):je,reload:function(){var tt=(0,me.Z)((0,se.Z)().mark(function Zt(){return(0,se.Z)().wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return dt(),Rn.abrupt("return",lt.run(!1));case 2:case"end":return Rn.stop()}},Zt)}));function ct(){return tt.apply(this,arguments)}return ct}(),pageInfo:Ve,pollingLoading:Ke,reset:function(){var tt=(0,me.Z)((0,se.Z)().mark(function Zt(){var Wt,Rn,ar,hn,Yn,Or,Ai,Yt;return(0,se.Z)().wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:Wt=w||{},Rn=Wt.pageInfo,ar=Rn||{},hn=ar.defaultCurrent,Yn=hn===void 0?1:hn,Or=ar.defaultPageSize,Ai=Or===void 0?20:Or,Yt={current:Yn,total:0,pageSize:Ai},it(Yt);case 4:case"end":return pt.stop()}},Zt)}));function ct(){return tt.apply(this,arguments)}return ct}(),setPageInfo:function(){var tt=(0,me.Z)((0,se.Z)().mark(function Zt(Wt){return(0,se.Z)().wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:it((0,j.Z)((0,j.Z)({},Ve),Wt));case 1:case"end":return ar.stop()}},Zt)}));function ct(Zt){return tt.apply(this,arguments)}return ct}()}},xx=bx,Af=function(y){return function(M,w){var k,U,N=M.fixed,V=M.index,q=w.fixed,ee=w.index;if(N==="left"&&q!=="left"||q==="right"&&N!=="right")return-2;if(q==="left"&&N!=="left"||N==="right"&&q!=="right")return 2;var ie=M.key||"".concat(V),fe=w.key||"".concat(ee);if((k=y[ie])!==null&&k!==void 0&&k.order||(U=y[fe])!==null&&U!==void 0&&U.order){var ve,Se;return(((ve=y[ie])===null||ve===void 0?void 0:ve.order)||0)-(((Se=y[fe])===null||Se===void 0?void 0:Se.order)||0)}return(M.index||0)-(w.index||0)}},_x=Y(53439),bv=Y(28700),xv=function(y){var M={};return Object.keys(y||{}).forEach(function(w){var k;Array.isArray(y[w])&&((k=y[w])===null||k===void 0?void 0:k.length)===0||y[w]!==void 0&&(M[w]=y[w])}),M},_v=function(y){var M;return!!(y!=null&&(M=y.valueType)!==null&&M!==void 0&&M.toString().startsWith("date")||(y==null?void 0:y.valueType)==="select"||y!=null&&y.valueEnum)},Sh=function(y){var M;return((M=y.ellipsis)===null||M===void 0?void 0:M.showTitle)===!1?!1:y.ellipsis},wx=function(y,M,w){if(M.copyable||M.ellipsis){var k=M.copyable&&w?{text:w,tooltips:["",""]}:void 0,U=_v(M),N=Sh(M)&&w?{tooltip:(M==null?void 0:M.tooltip)!==!1&&U?(0,Q.jsx)("div",{className:"pro-table-tooltip-text",children:y}):w}:!1;return(0,Q.jsx)(uv.Text,{style:{width:"100%",margin:0,padding:0},title:"",copyable:k,ellipsis:N,children:y})}return y},Oh=Y(74763),Sx=Y(66758),gc=function(y){var M="".concat(y.antCls,"-progress-bg");return(0,ne.Z)({},y.componentCls,{"&-multiple":{paddingBlockStart:6,paddingBlockEnd:12,paddingInline:8},"&-progress":{"&-success":(0,ne.Z)({},M,{backgroundColor:y.colorSuccess}),"&-error":(0,ne.Z)({},M,{backgroundColor:y.colorError}),"&-warning":(0,ne.Z)({},M,{backgroundColor:y.colorWarning})},"&-rule":{display:"flex",alignItems:"center","&-icon":{"&-default":{display:"flex",alignItems:"center",justifyContent:"center",width:"14px",height:"22px","&-circle":{width:"6px",height:"6px",backgroundColor:y.colorTextSecondary,borderRadius:"4px"}},"&-loading":{color:y.colorPrimary},"&-error":{color:y.colorError},"&-success":{color:y.colorSuccess}},"&-text":{color:y.colorText}}})};function Ox(x){return(0,Mr.Xj)("InlineErrorFormItem",function(y){var M=(0,j.Z)((0,j.Z)({},y),{},{componentCls:".".concat(x)});return[gc(M)]})}var Cx=["rules","name","children","popoverProps"],mc=["errorType","rules","name","popoverProps","children"],wv={marginBlockStart:-5,marginBlockEnd:-5,marginInlineStart:0,marginInlineEnd:0},Rf=function(y){var M=y.inputProps,w=y.input,k=y.extra,U=y.errorList,N=y.popoverProps,V=(0,D.useState)(!1),q=(0,_t.Z)(V,2),ee=q[0],ie=q[1],fe=(0,D.useState)([]),ve=(0,_t.Z)(fe,2),Se=ve[0],ue=ve[1],de=(0,D.useContext)(pr.ZP.ConfigContext),ye=de.getPrefixCls,_e=ye(),xe=(0,Mr.dQ)(),Ue=Ox("".concat(_e,"-form-item-with-help")),Ye=Ue.wrapSSR,ft=Ue.hashId;(0,D.useEffect)(function(){M.validateStatus!=="validating"&&ue(M.errors)},[M.errors,M.validateStatus]);var at=(0,lc.X)(Se.length<1?!1:ee,function(je){je!==ee&&ie(je)}),Le=M.validateStatus==="validating";return(0,Q.jsx)(Fa.Z,(0,j.Z)((0,j.Z)((0,j.Z)({trigger:(N==null?void 0:N.trigger)||["click"],placement:(N==null?void 0:N.placement)||"topLeft"},at),{},{getPopupContainer:N==null?void 0:N.getPopupContainer,getTooltipContainer:N==null?void 0:N.getTooltipContainer,content:Ye((0,Q.jsx)("div",{className:"".concat(_e,"-form-item ").concat(ft," ").concat(xe.hashId).trim(),style:{margin:0,padding:0},children:(0,Q.jsxs)("div",{className:"".concat(_e,"-form-item-with-help ").concat(ft," ").concat(xe.hashId).trim(),children:[Le?(0,Q.jsx)(Bi,{}):null,U]})}))},N),{},{children:(0,Q.jsxs)(Q.Fragment,{children:[w,k]})}),"popover")},Ex=function(y){var M=y.rules,w=y.name,k=y.children,U=y.popoverProps,N=(0,Xe.Z)(y,Cx);return(0,Q.jsx)(mi.Z.Item,(0,j.Z)((0,j.Z)({name:w,rules:M,hasFeedback:!1,shouldUpdate:function(q,ee){if(q===ee)return!1;var ie=[w].flat(1);ie.length>1&&ie.pop();try{return JSON.stringify((0,Ji.Z)(q,ie))!==JSON.stringify((0,Ji.Z)(ee,ie))}catch(fe){return!0}},_internalItemRender:{mark:"pro_table_render",render:function(q,ee){return(0,Q.jsx)(Rf,(0,j.Z)({inputProps:q,popoverProps:U},ee))}}},N),{},{style:(0,j.Z)((0,j.Z)({},wv),N==null?void 0:N.style),children:k}))},Zr=function(y){var M=y.errorType,w=y.rules,k=y.name,U=y.popoverProps,N=y.children,V=(0,Xe.Z)(y,mc);return k&&w!==null&&w!==void 0&&w.length&&M==="popover"?(0,Q.jsx)(Ex,(0,j.Z)((0,j.Z)({name:k,rules:w,popoverProps:U},V),{},{children:N})):(0,Q.jsx)(mi.Z.Item,(0,j.Z)((0,j.Z)({rules:w,shouldUpdate:k?function(q,ee){if(q===ee)return!1;var ie=[k].flat(1);ie.length>1&&ie.pop();try{return JSON.stringify((0,Ji.Z)(q,ie))!==JSON.stringify((0,Ji.Z)(ee,ie))}catch(fe){return!0}}:void 0},V),{},{style:(0,j.Z)((0,j.Z)({},wv),V.style),name:k,children:N}))},mu=function(y,M,w){return M===void 0?y:(0,Io.h)(y,M,w)},Sv=["children"],Mx=["",null,void 0],Ov=function(){for(var y=arguments.length,M=new Array(y),w=0;w<y;w++)M[w]=arguments[w];return M.filter(function(k){return k!==void 0}).map(function(k){return typeof k=="number"?k.toString():k}).flat(1)},Px=function(y){var M=(0,D.useContext)(Sx.z),w=y.columnProps,k=y.prefixName,U=y.text,N=y.counter,V=y.rowData,q=y.index,ee=y.recordKey,ie=y.subName,fe=y.proFieldProps,ve=y.editableUtils,Se=Ft.A.useFormInstance(),ue=ee||q,de=(0,D.useMemo)(function(){var je,Pe;return(je=ve==null||(Pe=ve.getRealIndex)===null||Pe===void 0?void 0:Pe.call(ve,V))!==null&&je!==void 0?je:q},[ve,q,V]),ye=(0,D.useState)(function(){var je,Pe;return Ov(k,k?ie:[],k?de:ue,(je=(Pe=w==null?void 0:w.key)!==null&&Pe!==void 0?Pe:w==null?void 0:w.dataIndex)!==null&&je!==void 0?je:q)}),_e=(0,_t.Z)(ye,2),xe=_e[0],Ue=_e[1],Ye=(0,D.useMemo)(function(){return xe.slice(0,-1)},[xe]);(0,D.useEffect)(function(){var je,Pe,Te=Ov(k,k?ie:[],k?de:ue,(je=(Pe=w==null?void 0:w.key)!==null&&Pe!==void 0?Pe:w==null?void 0:w.dataIndex)!==null&&je!==void 0?je:q);Te.join("-")!==xe.join("-")&&Ue(Te)},[w==null?void 0:w.dataIndex,w==null?void 0:w.key,q,ee,k,ue,ie,xe,de]);var ft=(0,D.useMemo)(function(){return[Se,(0,j.Z)((0,j.Z)({},w),{},{rowKey:Ye,rowIndex:q,isEditable:!0})]},[w,Se,q,Ye]),at=(0,D.useCallback)(function(je){var Pe=je.children,Te=(0,Xe.Z)(je,Sv);return(0,Q.jsx)(Zr,(0,j.Z)((0,j.Z)({popoverProps:{getPopupContainer:M.getPopupContainer||function(){return N.rootDomRef.current||document.body}},errorType:"popover",name:xe},Te),{},{children:Pe}),ue)},[ue,xe]),Le=(0,D.useCallback)(function(){var je,Pe,Te=(0,j.Z)({},mu.apply(void 0,[w==null?void 0:w.formItemProps].concat((0,Qe.Z)(ft))));Te.messageVariables=(0,j.Z)({label:(w==null?void 0:w.title)||"\u6B64\u9879",type:(w==null?void 0:w.valueType)||"\u6587\u672C"},Te==null?void 0:Te.messageVariables),Te.initialValue=(je=(Pe=k?null:U)!==null&&Pe!==void 0?Pe:Te==null?void 0:Te.initialValue)!==null&&je!==void 0?je:w==null?void 0:w.initialValue;var Oe=(0,Q.jsx)(xf.Z,(0,j.Z)({cacheForSwr:!0,name:xe,proFormFieldKey:ue,ignoreFormItem:!0,fieldProps:mu.apply(void 0,[w==null?void 0:w.fieldProps].concat((0,Qe.Z)(ft)))},fe),xe.join("-"));return w!=null&&w.renderFormItem&&(Oe=w.renderFormItem((0,j.Z)((0,j.Z)({},w),{},{index:q,isEditable:!0,type:"table"}),{defaultRender:function(){return(0,Q.jsx)(Q.Fragment,{children:Oe})},type:"form",recordKey:ee,record:(0,j.Z)((0,j.Z)({},V),Se==null?void 0:Se.getFieldValue([ue])),isEditable:!0},Se,y.editableUtils),w.ignoreFormItem)?(0,Q.jsx)(Q.Fragment,{children:Oe}):(0,Q.jsx)(at,(0,j.Z)((0,j.Z)({},Te),{},{children:Oe}),xe.join("-"))},[w,ft,k,U,ue,xe,fe,at,q,ee,V,Se,y.editableUtils]);return xe.length===0?null:typeof(w==null?void 0:w.renderFormItem)=="function"||typeof(w==null?void 0:w.fieldProps)=="function"||typeof(w==null?void 0:w.formItemProps)=="function"?(0,Q.jsx)(mi.Z.Item,{noStyle:!0,shouldUpdate:function(Pe,Te){if(Pe===Te)return!1;var Oe=[Ye].flat(1);try{return JSON.stringify((0,Ji.Z)(Pe,Oe))!==JSON.stringify((0,Ji.Z)(Te,Oe))}catch(Ve){return!0}},children:function(){return Le()}}):Le()};function If(x){var y,M,w=x.text,k=x.valueType,U=x.rowData,N=x.columnProps,V=x.index;if((!k||["textarea","text"].includes(k.toString()))&&!(N!=null&&N.valueEnum)&&x.mode==="read")return Mx.includes(w)?x.columnEmptyText:w;if(typeof k=="function"&&U)return If((0,j.Z)((0,j.Z)({},x),{},{valueType:k(U,x.type)||"text"}));var q=(N==null?void 0:N.key)||(N==null||(y=N.dataIndex)===null||y===void 0?void 0:y.toString()),ee=N!=null&&N.dependencies?[x.prefixName,x.prefixName?V==null?void 0:V.toString():(M=x.recordKey)===null||M===void 0?void 0:M.toString(),N==null?void 0:N.dependencies].filter(Boolean).flat(1):[],ie={valueEnum:(0,Io.h)(N==null?void 0:N.valueEnum,U),request:N==null?void 0:N.request,dependencies:N!=null&&N.dependencies?[ee]:void 0,originDependencies:N!=null&&N.dependencies?[N==null?void 0:N.dependencies]:void 0,params:(0,Io.h)(N==null?void 0:N.params,U,N),readonly:N==null?void 0:N.readonly,text:k==="index"||k==="indexBorder"?x.index:w,mode:x.mode,renderFormItem:void 0,valueType:k,record:U,proFieldProps:{emptyText:x.columnEmptyText,proFieldKey:q?"table-field-".concat(q):void 0}};return x.mode!=="edit"?(0,Q.jsx)(xf.Z,(0,j.Z)({mode:"read",ignoreFormItem:!0,fieldProps:mu(N==null?void 0:N.fieldProps,null,N)},ie)):(0,Q.jsx)(Px,(0,j.Z)((0,j.Z)({},x),{},{proFieldProps:ie}),x.recordKey)}var Ch=If,zt=function(y){var M,w=y.title,k=typeof(y==null?void 0:y.ellipsis)=="boolean"?y==null?void 0:y.ellipsis:y==null||(M=y.ellipsis)===null||M===void 0?void 0:M.showTitle;return w&&typeof w=="function"?w(y,"table",(0,Q.jsx)(Gn.G,{label:null,tooltip:y.tooltip||y.tip})):(0,Q.jsx)(Gn.G,{label:w,tooltip:y.tooltip||y.tip,ellipsis:k})};function Ie(x,y,M,w){return typeof w=="boolean"?w===!1:(w==null?void 0:w(x,y,M))===!1}var Sr=function(y,M,w){var k=Array.isArray(w)?(0,Ji.Z)(M,w):M[w],U=String(k);return String(U)===String(y)};function Tx(x){var y=x.columnProps,M=x.text,w=x.rowData,k=x.index,U=x.columnEmptyText,N=x.counter,V=x.type,q=x.subName,ee=x.marginSM,ie=x.editableUtils,fe=N.action,ve=N.prefixName,Se=ie.isEditable((0,j.Z)((0,j.Z)({},w),{},{index:k})),ue=Se.isEditable,de=Se.recordKey,ye=y.renderText,_e=ye===void 0?function(je){return je}:ye,xe=_e(M,w,k,fe),Ue=ue&&!Ie(M,w,k,y==null?void 0:y.editable)?"edit":"read",Ye=Ch({text:xe,valueType:y.valueType||"text",index:k,rowData:w,subName:q,columnProps:(0,j.Z)((0,j.Z)({},y),{},{entry:w,entity:w}),counter:N,columnEmptyText:U,type:V,recordKey:de,mode:Ue,prefixName:ve,editableUtils:ie}),ft=Ue==="edit"?Ye:wx(Ye,y,xe);if(Ue==="edit")return y.valueType==="option"?(0,Q.jsx)("div",{style:{display:"flex",alignItems:"center",gap:ee,justifyContent:y.align==="center"?"center":"flex-start"},children:ie.actionRender((0,j.Z)((0,j.Z)({},w),{},{index:y.index||k}))}):ft;if(!y.render){var at=D.isValidElement(ft)||["string","number"].includes((0,wt.Z)(ft));return!(0,Oh.k)(ft)&&at?ft:null}var Le=y.render(ft,w,k,(0,j.Z)((0,j.Z)({},fe),ie),(0,j.Z)((0,j.Z)({},y),{},{isEditable:ue,type:"table"}));return js(Le)?Le:Le&&y.valueType==="option"&&Array.isArray(Le)?(0,Q.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:8},children:Le}):Le}function Cv(x,y){var M,w=x.columns,k=x.counter,U=x.columnEmptyText,N=x.type,V=x.editableUtils,q=x.marginSM,ee=x.rowKey,ie=ee===void 0?"id":ee,fe=x.childrenColumnName,ve=fe===void 0?"children":fe,Se=new Map;return w==null||(M=w.map(function(ue,de){if(ue===ea.Z.EXPAND_COLUMN||ue===ea.Z.SELECTION_COLUMN)return ue;var ye=ue,_e=ye.key,xe=ye.dataIndex,Ue=ye.valueEnum,Ye=ye.valueType,ft=Ye===void 0?"text":Ye,at=ye.children,Le=ye.onFilter,je=ye.filters,Pe=je===void 0?[]:je,Te=Ro(_e||(xe==null?void 0:xe.toString()),[y==null?void 0:y.key,de].filter(Boolean).join("-")),Oe=!Ue&&!ft&&!at;if(Oe)return(0,j.Z)({index:de},ue);var Ve=ue===ea.Z.EXPAND_COLUMN||ue===ea.Z.SELECTION_COLUMN;if(Ve)return{index:de,isExtraColumns:!0,hideInSearch:!0,hideInTable:!1,hideInForm:!0,hideInSetting:!0,extraColumn:ue};var Mt=k.columnsMap[Te]||{fixed:ue.fixed},it=function(){return Le===!0?function(nt,Ge){return Sr(nt,Ge,xe)}:(0,bv.v)(Le)},le=ie,Ze=(0,j.Z)((0,j.Z)({index:de,key:Te},ue),{},{title:zt(ue),valueEnum:Ue,filters:Pe===!0?(0,_x.NA)((0,Io.h)(Ue,void 0)).filter(function(Ke){return Ke&&Ke.value!=="all"}):Pe,onFilter:it(),fixed:Mt.fixed,width:ue.width||(ue.fixed?200:void 0),children:ue.children?Cv((0,j.Z)((0,j.Z)({},x),{},{columns:(ue==null?void 0:ue.children)||[]}),(0,j.Z)((0,j.Z)({},ue),{},{key:Te})):void 0,render:function(nt,Ge,Ae){typeof ie=="function"&&(le=ie(Ge,Ae));var $e;if((0,wt.Z)(Ge)==="object"&&Ge!==null&&Reflect.has(Ge,le)){var st;$e=Ge[le];var ut=Se.get($e)||[];(st=Ge[ve])===null||st===void 0||st.forEach(function(lt){var dt=lt[le];Se.has(dt)||Se.set(dt,ut.concat([Ae,ve]))})}var Pt={columnProps:ue,text:nt,rowData:Ge,index:Ae,columnEmptyText:U,counter:k,type:N,marginSM:q,subName:Se.get($e),editableUtils:V};return Tx(Pt)}});return xv(Ze)}))===null||M===void 0?void 0:M.filter(function(ue){return!ue.hideInTable})}var CC=["rowKey","tableClassName","defaultClassName","action","tableColumn","type","pagination","rowSelection","size","defaultSize","tableStyle","toolbarDom","searchNode","style","cardProps","alertDom","name","onSortChange","onFilterChange","options","isLightFilter","className","cardBordered","editableUtils","getRowKey"],EC=["cardBordered","request","className","params","defaultData","headerTitle","postData","ghost","pagination","actionRef","columns","toolBarRender","optionsRender","onLoad","onRequestError","style","cardProps","tableStyle","tableClassName","columnsStateMap","onColumnsStateChange","options","search","name","onLoadingChange","rowSelection","beforeSearchSubmit","tableAlertRender","defaultClassName","formRef","type","columnEmptyText","toolbar","rowKey","manualRequest","polling","tooltip","revalidateOnFocus","searchFormRender"];function MC(x){var y=x.rowKey,M=x.tableClassName,w=x.defaultClassName,k=x.action,U=x.tableColumn,N=x.type,V=x.pagination,q=x.rowSelection,ee=x.size,ie=x.defaultSize,fe=x.tableStyle,ve=x.toolbarDom,Se=x.searchNode,ue=x.style,de=x.cardProps,ye=x.alertDom,_e=x.name,xe=x.onSortChange,Ue=x.onFilterChange,Ye=x.options,ft=x.isLightFilter,at=x.className,Le=x.cardBordered,je=x.editableUtils,Pe=x.getRowKey,Te=(0,Xe.Z)(x,CC),Oe=(0,D.useContext)(uo),Ve=(0,D.useMemo)(function(){var Pt=function lt(dt){return dt.map(function(tt){var ct=Ro(tt.key,tt.index),Zt=Oe.columnsMap[ct];return Zt&&Zt.show===!1?!1:tt.children?(0,j.Z)((0,j.Z)({},tt),{},{children:lt(tt.children)}):tt}).filter(Boolean)};return Pt(U)},[Oe.columnsMap,U]),Mt=(0,D.useMemo)(function(){var Pt=[],lt=function dt(tt){for(var ct=0;ct<tt.length;ct++){var Zt=tt[ct];Zt.children?dt(Zt.children):Pt.push(Zt)}};return lt(Ve),Pt==null?void 0:Pt.every(function(dt){return!!dt.filters&&!!dt.onFilter||dt.filters===void 0&&dt.onFilter===void 0})},[Ve]),it=function(lt){var dt=je.newLineRecord||{},tt=dt.options,ct=dt.defaultValue,Zt=(tt==null?void 0:tt.position)==="top";if(tt!=null&&tt.parentKey){var Wt,Rn,ar={data:lt,getRowKey:Pe,row:(0,j.Z)((0,j.Z)({},ct),{},{map_row_parentKey:(Wt=dn(tt.parentKey))===null||Wt===void 0?void 0:Wt.toString()}),key:tt==null?void 0:tt.recordKey,childrenColumnName:((Rn=x.expandable)===null||Rn===void 0?void 0:Rn.childrenColumnName)||"children"};return Fn(ar,Zt?"top":"update")}if(Zt)return[ct].concat((0,Qe.Z)(k.dataSource));if(V&&V!==null&&V!==void 0&&V.current&&V!==null&&V!==void 0&&V.pageSize){var hn=(0,Qe.Z)(k.dataSource);return(V==null?void 0:V.pageSize)>hn.length?(hn.push(ct),hn):(hn.splice((V==null?void 0:V.current)*(V==null?void 0:V.pageSize)-1,0,ct),hn)}return[].concat((0,Qe.Z)(k.dataSource),[ct])},le=function(){return(0,j.Z)((0,j.Z)({},Te),{},{size:ee,rowSelection:q===!1?void 0:q,className:M,style:fe,columns:Ve.map(function(lt){return lt.isExtraColumns?lt.extraColumn:lt}),loading:k.loading,dataSource:je.newLineRecord?it(k.dataSource):k.dataSource,pagination:V,onChange:function(dt,tt,ct,Zt){var Wt;if((Wt=Te.onChange)===null||Wt===void 0||Wt.call(Te,dt,tt,ct,Zt),Mt||Ue((0,yi.Y)(tt)),Array.isArray(ct)){var Rn=ct.reduce(function(Or,Ai){return(0,j.Z)((0,j.Z)({},Or),{},(0,ne.Z)({},"".concat(Ai.field),Ai.order))},{});xe((0,yi.Y)(Rn))}else{var ar,hn=(ar=ct.column)===null||ar===void 0?void 0:ar.sorter,Yn=(hn==null?void 0:hn.toString())===hn;xe((0,yi.Y)((0,ne.Z)({},"".concat(Yn?hn:ct.field),ct.order)))}}})},Ze=(0,D.useMemo)(function(){return x.search===!1&&!x.headerTitle&&x.toolBarRender===!1},[]),Ke=(0,Q.jsx)(Jt._p.Provider,{value:{grid:!1,colProps:void 0,rowProps:void 0},children:(0,Q.jsx)(ea.Z,(0,j.Z)((0,j.Z)({},le()),{},{rowKey:y}))}),nt=x.tableViewRender?x.tableViewRender((0,j.Z)((0,j.Z)({},le()),{},{rowSelection:q!==!1?q:void 0}),Ke):Ke,Ge=(0,D.useMemo)(function(){if(x.editable&&!x.name){var Pt,lt,dt;return(0,Q.jsxs)(Q.Fragment,{children:[ve,ye,(0,D.createElement)(tn,(0,j.Z)((0,j.Z)({},(Pt=x.editable)===null||Pt===void 0?void 0:Pt.formProps),{},{formRef:(lt=x.editable)===null||lt===void 0||(lt=lt.formProps)===null||lt===void 0?void 0:lt.formRef,component:!1,form:(dt=x.editable)===null||dt===void 0?void 0:dt.form,onValuesChange:je.onValuesChange,key:"table",submitter:!1,omitNil:!1,dateFormatter:x.dateFormatter}),nt)]})}return(0,Q.jsxs)(Q.Fragment,{children:[ve,ye,nt]})},[ye,x.loading,!!x.editable,nt,ve]),Ae=(0,D.useMemo)(function(){return de===!1||Ze===!0||x.name?{}:ve?{paddingBlockStart:0}:ve&&V===!1?{paddingBlockStart:0}:{padding:0}},[Ze,V,x.name,de,ve]),$e=de===!1||Ze===!0||x.name?Ge:(0,Q.jsx)(ht,(0,j.Z)((0,j.Z)({ghost:x.ghost,bordered:hs("table",Le),bodyStyle:Ae},de),{},{children:Ge})),st=function(){return x.tableRender?x.tableRender(x,$e,{toolbar:ve||void 0,alert:ye||void 0,table:nt||void 0}):$e},ut=(0,Q.jsxs)("div",{className:Fe()(at,(0,ne.Z)({},"".concat(w,"-polling"),k.pollingLoading)),style:ue,ref:Oe.rootDomRef,children:[ft?null:Se,N!=="form"&&x.tableExtraRender&&(0,Q.jsx)("div",{className:Fe()(at,"".concat(w,"-extra")),children:x.tableExtraRender(x,k.dataSource||[])}),N!=="form"&&st()]});return!Ye||!(Ye!=null&&Ye.fullScreen)?ut:(0,Q.jsx)(pr.ZP,{getPopupContainer:function(){return Oe.rootDomRef.current||document.body},children:ut})}var PC={},Ax=function(y){var M,w=y.cardBordered,k=y.request,U=y.className,N=y.params,V=N===void 0?PC:N,q=y.defaultData,ee=y.headerTitle,ie=y.postData,fe=y.ghost,ve=y.pagination,Se=y.actionRef,ue=y.columns,de=ue===void 0?[]:ue,ye=y.toolBarRender,_e=y.optionsRender,xe=y.onLoad,Ue=y.onRequestError,Ye=y.style,ft=y.cardProps,at=y.tableStyle,Le=y.tableClassName,je=y.columnsStateMap,Pe=y.onColumnsStateChange,Te=y.options,Oe=y.search,Ve=y.name,Mt=y.onLoadingChange,it=y.rowSelection,le=it===void 0?!1:it,Ze=y.beforeSearchSubmit,Ke=y.tableAlertRender,nt=y.defaultClassName,Ge=y.formRef,Ae=y.type,$e=Ae===void 0?"table":Ae,st=y.columnEmptyText,ut=st===void 0?"-":st,Pt=y.toolbar,lt=y.rowKey,dt=y.manualRequest,tt=y.polling,ct=y.tooltip,Zt=y.revalidateOnFocus,Wt=Zt===void 0?!1:Zt,Rn=y.searchFormRender,ar=(0,Xe.Z)(y,EC),hn=gx(y.defaultClassName),Yn=hn.wrapSSR,Or=hn.hashId,Ai=Fe()(nt,U,Or),Yt=(0,D.useRef)(),qe=(0,D.useRef)(),pt=Ge||qe;(0,D.useImperativeHandle)(Se,function(){return Yt.current});var bt=(0,lr.Z)(le?(le==null?void 0:le.defaultSelectedRowKeys)||[]:void 0,{value:le?le.selectedRowKeys:void 0}),yn=(0,_t.Z)(bt,2),On=yn[0],pn=yn[1],tr=(0,lr.Z)(function(){if(!(dt||Oe!==!1))return{}}),Ur=(0,_t.Z)(tr,2),fo=Ur[0],Za=Ur[1],yc=(0,lr.Z)({}),Ll=(0,_t.Z)(yc,2),Nl=Ll[0],ho=Ll[1],kl=(0,lr.Z)({}),yu=(0,_t.Z)(kl,2),po=yu[0],Bs=yu[1];(0,D.useEffect)(function(){var $t=lu(de),Ut=$t.sort,or=$t.filter;ho(or),Bs(Ut)},[]);var ta=(0,yt.YB)(),si=(0,wt.Z)(ve)==="object"?ve:{defaultCurrent:1,defaultPageSize:20,pageSize:20,current:1},vt=(0,D.useContext)(uo),xn=(0,D.useMemo)(function(){if(k)return function(){var $t=(0,me.Z)((0,se.Z)().mark(function Ut(or){var Xr,vo;return(0,se.Z)().wrap(function(Qo){for(;;)switch(Qo.prev=Qo.next){case 0:return Xr=(0,j.Z)((0,j.Z)((0,j.Z)({},or||{}),fo),V),delete Xr._timestamp,Qo.next=4,k(Xr,po,Nl);case 4:return vo=Qo.sent,Qo.abrupt("return",vo);case 6:case"end":return Qo.stop()}},Ut)}));return function(Ut){return $t.apply(this,arguments)}}()},[fo,V,Nl,po,k]),mn=xx(xn,q,{pageInfo:ve===!1?!1:si,loading:y.loading,dataSource:y.dataSource,onDataSourceChange:y.onDataSourceChange,onLoad:xe,onLoadingChange:Mt,onRequestError:Ue,postData:ie,revalidateOnFocus:Wt,manual:fo===void 0,polling:tt,effects:[(0,mr.ZP)(V),(0,mr.ZP)(fo),(0,mr.ZP)(Nl),(0,mr.ZP)(po)],debounceTime:y.debounceTime,onPageInfoChange:function(Ut){var or,Xr;!ve||!xn||(ve==null||(or=ve.onChange)===null||or===void 0||or.call(ve,Ut.current,Ut.pageSize),ve==null||(Xr=ve.onShowSizeChange)===null||Xr===void 0||Xr.call(ve,Ut.current,Ut.pageSize))}});(0,D.useEffect)(function(){var $t;if(!(y.manualRequest||!y.request||!Wt||($t=y.form)!==null&&$t!==void 0&&$t.ignoreRules)){var Ut=function(){document.visibilityState==="visible"&&mn.reload()};return document.addEventListener("visibilitychange",Ut),function(){return document.removeEventListener("visibilitychange",Ut)}}},[]);var ma=D.useRef(new Map),gs=D.useMemo(function(){return typeof lt=="function"?lt:function($t,Ut){var or;return Ut===-1?$t==null?void 0:$t[lt]:y.name?Ut==null?void 0:Ut.toString():(or=$t==null?void 0:$t[lt])!==null&&or!==void 0?or:Ut==null?void 0:Ut.toString()}},[y.name,lt]);(0,D.useMemo)(function(){var $t;if(($t=mn.dataSource)!==null&&$t!==void 0&&$t.length){var Ut=mn.dataSource.map(function(or){var Xr=gs(or,-1);return ma.current.set(Xr,or),Xr});return Ut}return[]},[mn.dataSource,gs]);var cr=(0,D.useMemo)(function(){var $t=ve===!1?!1:(0,j.Z)({},ve),Ut=(0,j.Z)((0,j.Z)({},mn.pageInfo),{},{setPageInfo:function(Xr){var vo=Xr.pageSize,Zs=Xr.current,Qo=mn.pageInfo;if(vo===Qo.pageSize||Qo.current===1){mn.setPageInfo({pageSize:vo,current:Zs});return}k&&mn.setDataSource([]),mn.setPageInfo({pageSize:vo,current:$e==="list"?Zs:1})}});return k&&$t&&(delete $t.onChange,delete $t.onShowSizeChange),wl($t,Ut,ta)},[ve,mn,ta]);(0,Me.KW)(function(){var $t;y.request&&V&&mn.dataSource&&(mn==null||($t=mn.pageInfo)===null||$t===void 0?void 0:$t.current)!==1&&mn.setPageInfo({current:1})},[V]),vt.setPrefixName(y.name);var bc=(0,D.useCallback)(function(){le&&le.onChange&&le.onChange([],[],{type:"none"}),pn([])},[le,pn]);vt.propsRef.current=y;var Jo=Ba((0,j.Z)((0,j.Z)({},y.editable),{},{tableName:y.name,getRowKey:gs,childrenColumnName:((M=y.expandable)===null||M===void 0?void 0:M.childrenColumnName)||"children",dataSource:mn.dataSource||[],setDataSource:function(Ut){var or,Xr;(or=y.editable)===null||or===void 0||(Xr=or.onValuesChange)===null||Xr===void 0||Xr.call(or,void 0,Ut),mn.setDataSource(Ut)}})),Rx=Mr.Ow===null||Mr.Ow===void 0?void 0:Mr.Ow.useToken(),Eh=Rx.token;ks(Yt,mn,{fullScreen:function(){var Ut;if(!(!((Ut=vt.rootDomRef)!==null&&Ut!==void 0&&Ut.current)||!document.fullscreenEnabled))if(document.fullscreenElement)document.exitFullscreen();else{var or;(or=vt.rootDomRef)===null||or===void 0||or.current.requestFullscreen()}},onCleanSelected:function(){bc()},resetAll:function(){var Ut;bc(),ho({}),Bs({}),vt.setKeyWords(void 0),mn.setPageInfo({current:1}),pt==null||(Ut=pt.current)===null||Ut===void 0||Ut.resetFields(),Za({})},editableUtils:Jo}),vt.setAction(Yt.current);var ms=(0,D.useMemo)(function(){var $t;return Cv({columns:de,counter:vt,columnEmptyText:ut,type:$e,marginSM:Eh.marginSM,editableUtils:Jo,rowKey:lt,childrenColumnName:($t=y.expandable)===null||$t===void 0?void 0:$t.childrenColumnName}).sort(Af(vt.columnsMap))},[de,vt==null?void 0:vt.sortKeyColumns,vt==null?void 0:vt.columnsMap,ut,$e,Jo.editableKeys&&Jo.editableKeys.join(",")]);(0,Me.Au)(function(){if(ms&&ms.length>0){var $t=ms.map(function(Ut){return Ro(Ut.key,Ut.index)});vt.setSortKeyColumns($t)}},[ms],["render","renderFormItem"],100),(0,Me.KW)(function(){var $t=mn.pageInfo,Ut=ve||{},or=Ut.current,Xr=or===void 0?$t==null?void 0:$t.current:or,vo=Ut.pageSize,Zs=vo===void 0?$t==null?void 0:$t.pageSize:vo;ve&&(Xr||Zs)&&(Zs!==($t==null?void 0:$t.pageSize)||Xr!==($t==null?void 0:$t.current))&&mn.setPageInfo({pageSize:Zs||$t.pageSize,current:Xr||$t.current})},[ve&&ve.pageSize,ve&&ve.current]);var Ev=(0,j.Z)((0,j.Z)({selectedRowKeys:On},le),{},{onChange:function(Ut,or,Xr){le&&le.onChange&&le.onChange(Ut,or,Xr),pn(Ut)}}),No=Oe!==!1&&(Oe==null?void 0:Oe.filterType)==="light",Mv=(0,D.useCallback)(function($t){if(Te&&Te.search){var Ut,or,Xr=Te.search===!0?{}:Te.search,vo=Xr.name,Zs=vo===void 0?"keyword":vo,Qo=(Ut=Te.search)===null||Ut===void 0||(or=Ut.onSearch)===null||or===void 0?void 0:or.call(Ut,vt.keyWords);if(Qo!==!1){Za((0,j.Z)((0,j.Z)({},$t),{},(0,ne.Z)({},Zs,vt.keyWords)));return}}Za($t)},[vt.keyWords,Te,Za]),Mh=(0,D.useMemo)(function(){if((0,wt.Z)(mn.loading)==="object"){var $t;return(($t=mn.loading)===null||$t===void 0?void 0:$t.spinning)||!1}return mn.loading},[mn.loading]),ya=(0,D.useMemo)(function(){var $t=Oe===!1&&$e!=="form"?null:(0,Q.jsx)(D1,{pagination:cr,beforeSearchSubmit:Ze,action:Yt,columns:de,onFormSearchSubmit:function(or){Mv(or)},ghost:fe,onReset:y.onReset,onSubmit:y.onSubmit,loading:!!Mh,manualRequest:dt,search:Oe,form:y.form,formRef:pt,type:y.type||"table",cardBordered:y.cardBordered,dateFormatter:y.dateFormatter});return Rn&&$t?(0,Q.jsx)(Q.Fragment,{children:Rn(y,$t)}):$t},[Ze,pt,fe,Mh,dt,Mv,cr,y,de,Oe,Rn,$e]),zs=(0,D.useMemo)(function(){return On==null?void 0:On.map(function($t){var Ut;return(Ut=ma.current)===null||Ut===void 0?void 0:Ut.get($t)})},[On]),Lf=ye===!1?null:(0,Q.jsx)(hx,{headerTitle:ee,hideToolbar:Te===!1&&!ee&&!ye&&!Pt&&!No,selectedRows:zs,selectedRowKeys:On,tableColumn:ms,tooltip:ct,toolbar:Pt,onFormSearchSubmit:function(Ut){Za((0,j.Z)((0,j.Z)({},fo),Ut))},searchNode:No?ya:null,options:Te,optionsRender:_e,actionRef:Yt,toolBarRender:ye}),Ix=le!==!1?(0,Q.jsx)(Kd,{selectedRowKeys:On,selectedRows:zs,onCleanSelected:bc,alertOptionRender:ar.tableAlertOptionRender,alertInfoRender:Ke,alwaysShowAlert:le==null?void 0:le.alwaysShowAlert}):null;return Yn((0,Q.jsx)(MC,(0,j.Z)((0,j.Z)({},y),{},{name:Ve,defaultClassName:nt,size:vt.tableSize,onSizeChange:vt.setTableSize,pagination:cr,searchNode:ya,rowSelection:le!==!1?Ev:void 0,className:Ai,tableColumn:ms,isLightFilter:No,action:mn,alertDom:Ix,toolbarDom:Lf,onSortChange:function(Ut){po!==Ut&&Bs(Ut!=null?Ut:{})},onFilterChange:function(Ut){Ut!==Nl&&ho(Ut)},editableUtils:Jo,getRowKey:gs})))},el=function(y){var M=(0,D.useContext)(pr.ZP.ConfigContext),w=M.getPrefixCls,k=y.ErrorBoundary===!1?D.Fragment:y.ErrorBoundary||Ma.S;return(0,Q.jsx)(cf,{initValue:y,children:(0,Q.jsx)(yt._Y,{needDeps:!0,children:(0,Q.jsx)(k,{children:(0,Q.jsx)(Ax,(0,j.Z)({defaultClassName:"".concat(w("pro-table"))},y))})})})};el.Summary=ea.Z.Summary;var Il=el},78164:function(jn,Kn,Y){"use strict";Y.d(Kn,{S:function(){return D}});var se=Y(15671),me=Y(43144),wt=Y(97326),_t=Y(32531),ne=Y(29388),Qe=Y(4942),j=Y(29905),Xe=Y(67294),we=Y(85893),D=function(gt){(0,_t.Z)(Fe,gt);var St=(0,ne.Z)(Fe);function Fe(){var Ne;(0,se.Z)(this,Fe);for(var Be=arguments.length,Re=new Array(Be),rt=0;rt<Be;rt++)Re[rt]=arguments[rt];return Ne=St.call.apply(St,[this].concat(Re)),(0,Qe.Z)((0,wt.Z)(Ne),"state",{hasError:!1,errorInfo:""}),Ne}return(0,me.Z)(Fe,[{key:"componentDidCatch",value:function(Be,Re){console.log(Be,Re)}},{key:"render",value:function(){return this.state.hasError?(0,we.jsx)(j.ZP,{status:"error",title:"Something went wrong.",extra:this.state.errorInfo}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(Be){return{hasError:!0,errorInfo:Be.message}}}]),Fe}(Xe.Component)},28700:function(jn,Kn,Y){"use strict";Y.d(Kn,{v:function(){return se}});var se=function(wt){if(wt&&wt!==!0)return wt}},17816:function(jn,Kn){(function(Y,se){se(Kn)})(this,function(Y){"use strict";function se(B){var $=typeof Symbol=="function"&&Symbol.iterator,K=$&&B[$],te=0;if(K)return K.call(B);if(B&&typeof B.length=="number")return{next:function(){return{value:(B=B&&te>=B.length?void 0:B)&&B[te++],done:!B}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}function me(B,$){var K=typeof Symbol=="function"&&B[Symbol.iterator];if(!K)return B;var te,ge,be=K.call(B),ae=[];try{for(;($===void 0||0<$--)&&!(te=be.next()).done;)ae.push(te.value)}catch(oe){ge={error:oe}}finally{try{te&&!te.done&&(K=be.return)&&K.call(be)}finally{if(ge)throw ge.error}}return ae}function wt(B,$,K){if(K||arguments.length===2)for(var te,ge=0,be=$.length;ge<be;ge++)!te&&ge in $||((te=te||Array.prototype.slice.call($,0,ge))[ge]=$[ge]);return B.concat(te||Array.prototype.slice.call($))}function _t(B){return Qe(B,"Function")}var ne={}.toString,Qe=function(B,$){return ne.call(B)==="[object "+$+"]"},j=function(B){return Array.isArray?Array.isArray(B):Qe(B,"Array")},Xe=function(B){if(typeof($=B)!="object"||$===null||!Qe(B,"Object"))return!1;var $;if(Object.getPrototypeOf(B)===null)return!0;for(var K=B;Object.getPrototypeOf(K)!==null;)K=Object.getPrototypeOf(K);return Object.getPrototypeOf(B)===K},we=function(B){return Qe(B,"Number")},D=Object.values?function(B){return Object.values(B)}:function(B){var $,K=[],te=B,ge=function(Ce,Ee){_t(B)&&Ee==="prototype"||K.push(Ce)};if(te){if(j(te))for(var be=0,ae=te.length;be<ae&&ge(te[be],be)!==!1;be++);else if($=typeof te,te!==null&&$=="object"||$=="function"){for(var oe in te)if(te.hasOwnProperty(oe)&&ge(te[oe],oe)===!1)break}}return K},gt=5;function St(B){for(var $=[],K=1;K<arguments.length;K++)$[K-1]=arguments[K];for(var te=0;te<$.length;te+=1)(function ge(be,ae,oe,Ce){for(var Ee in oe=oe||0,Ce=Ce||gt,ae){var Ot;ae.hasOwnProperty(Ee)&&((Ot=ae[Ee])!==null&&Xe(Ot)?(Xe(be[Ee])||(be[Ee]={}),oe<Ce?ge(be[Ee],Ot,oe+1,Ce):be[Ee]=ae[Ee]):j(Ot)?(be[Ee]=[],be[Ee]=be[Ee].concat(Ot)):Ot!==void 0&&(be[Ee]=Ot))}})(B,$[te]);return B}function Fe(B){return B}(function(B,$){var K;if(_t(B))return(K=function(){for(var te=[],ge=0;ge<arguments.length;ge++)te[ge]=arguments[ge];var be,ae=$?$.apply(this,te):te[0],oe=K.cache;return oe.has(ae)?oe.get(ae):(be=B.apply(this,te),oe.set(ae,be),be)}).cache=new Map;throw new TypeError("Expected a function")})(function(B,ae){var K=(ae=ae===void 0?{}:ae).fontSize,te=ae.fontFamily,ge=ae.fontWeight,be=ae.fontStyle,ae=ae.fontVariant;return(Ne=Ne||document.createElement("canvas").getContext("2d")).font=[be,ae,ge,K+"px",te].join(" "),Ne.measureText(Qe(B,"String")?B:"").width},function(B,$){return function(){for(var K=0,te=0,ge=arguments.length;te<ge;te++)K+=arguments[te].length;for(var be=Array(K),ae=0,te=0;te<ge;te++)for(var oe=arguments[te],Ce=0,Ee=oe.length;Ce<Ee;Ce++,ae++)be[ae]=oe[Ce];return be}([B],D($=$===void 0?{}:$)).join("")});var Ne,Be=typeof Float32Array!="undefined"?Float32Array:Array;function Re(){var B=new Be(9);return Be!=Float32Array&&(B[1]=0,B[2]=0,B[3]=0,B[5]=0,B[6]=0,B[7]=0),B[0]=1,B[4]=1,B[8]=1,B}Math.hypot||(Math.hypot=function(){for(var B=0,$=arguments.length;$--;)B+=arguments[$]*arguments[$];return Math.sqrt(B)});var rt=function(B,Et,yt){var te=Et[0],ge=Et[1],be=Et[2],ae=Et[3],oe=Et[4],Ce=Et[5],Ee=Et[6],Ot=Et[7],Et=Et[8],Ht=yt[0],mt=yt[1],Lt=yt[2],Dt=yt[3],ht=yt[4],Jt=yt[5],Ft=yt[6],tn=yt[7],yt=yt[8];return B[0]=Ht*te+mt*ae+Lt*Ee,B[1]=Ht*ge+mt*oe+Lt*Ot,B[2]=Ht*be+mt*Ce+Lt*Et,B[3]=Dt*te+ht*ae+Jt*Ee,B[4]=Dt*ge+ht*oe+Jt*Ot,B[5]=Dt*be+ht*Ce+Jt*Et,B[6]=Ft*te+tn*ae+yt*Ee,B[7]=Ft*ge+tn*oe+yt*Ot,B[8]=Ft*be+tn*Ce+yt*Et,B};function Xt(){var B=new Be(16);return Be!=Float32Array&&(B[1]=0,B[2]=0,B[3]=0,B[4]=0,B[6]=0,B[7]=0,B[8]=0,B[9]=0,B[11]=0,B[12]=0,B[13]=0,B[14]=0),B[0]=1,B[5]=1,B[10]=1,B[15]=1,B}var ln=function(B,Ft,K){var te=Ft[0],ge=Ft[1],be=Ft[2],ae=Ft[3],oe=Ft[4],Ce=Ft[5],Ee=Ft[6],Ot=Ft[7],Et=Ft[8],Ht=Ft[9],mt=Ft[10],Lt=Ft[11],Dt=Ft[12],ht=Ft[13],Jt=Ft[14],Ft=Ft[15],tn=K[0],yt=K[1],qt=K[2],Nn=K[3];return B[0]=tn*te+yt*oe+qt*Et+Nn*Dt,B[1]=tn*ge+yt*Ce+qt*Ht+Nn*ht,B[2]=tn*be+yt*Ee+qt*mt+Nn*Jt,B[3]=tn*ae+yt*Ot+qt*Lt+Nn*Ft,tn=K[4],yt=K[5],qt=K[6],Nn=K[7],B[4]=tn*te+yt*oe+qt*Et+Nn*Dt,B[5]=tn*ge+yt*Ce+qt*Ht+Nn*ht,B[6]=tn*be+yt*Ee+qt*mt+Nn*Jt,B[7]=tn*ae+yt*Ot+qt*Lt+Nn*Ft,tn=K[8],yt=K[9],qt=K[10],Nn=K[11],B[8]=tn*te+yt*oe+qt*Et+Nn*Dt,B[9]=tn*ge+yt*Ce+qt*Ht+Nn*ht,B[10]=tn*be+yt*Ee+qt*mt+Nn*Jt,B[11]=tn*ae+yt*Ot+qt*Lt+Nn*Ft,tn=K[12],yt=K[13],qt=K[14],Nn=K[15],B[12]=tn*te+yt*oe+qt*Et+Nn*Dt,B[13]=tn*ge+yt*Ce+qt*Ht+Nn*ht,B[14]=tn*be+yt*Ee+qt*mt+Nn*Jt,B[15]=tn*ae+yt*Ot+qt*Lt+Nn*Ft,B};function rr(B){for(var $=[],K=1;K<arguments.length;K++)$[K-1]=arguments[K];return B?$.reduce(function(te,ge){return function(be){return ge(te(be))}},B):Fe}function Zn(B){return B instanceof Float32Array||B instanceof Array}function qn(B,$,K){for(;B<$;)B+=2*Math.PI;for(;K<B;)B-=2*Math.PI;return B}Ir=new Be(3),Be!=Float32Array&&(Ir[0]=0,Ir[1]=0,Ir[2]=0),Ir=new Be(4),Be!=Float32Array&&(Ir[0]=0,Ir[1]=0,Ir[2]=0,Ir[3]=0);function cn(ae,$,K,te,ge){var be=(ae=me(ae,2))[0],ae=ae[1],oe=Re();return be=[be,ae],(ae=oe)[0]=1,ae[1]=0,ae[2]=0,ae[3]=0,ae[4]=1,ae[5]=0,ae[6]=be[0],ae[7]=be[1],ae[8]=1,ae}function In(B,...$){return $.reduce((K,te)=>ge=>K(te(ge)),B)}function ir(B,$){return $-B?K=>(K-B)/($-B):K=>.5}const dr=Math.sqrt(50),Vt=Math.sqrt(10),Kt=Math.sqrt(2);function Hr(B,$,K){return $=($-B)/Math.max(0,K),B=Math.floor(Math.log($)/Math.LN10),K=$/oa(10,B),0<=B?(K>=dr?10:K>=Vt?5:K>=Kt?2:1)*oa(10,B):-oa(10,-B)/(K>=dr?10:K>=Vt?5:K>=Kt?2:1)}const er=(B,$,K=5)=>{B=[B,$];let te=0,ge=B.length-1,be=B[te],ae=B[ge],oe;return ae<be&&([be,ae]=[ae,be],[te,ge]=[ge,te]),0<(oe=Hr(be,ae,K))?(be=Math.floor(be/oe)*oe,ae=Math.ceil(ae/oe)*oe,oe=Hr(be,ae,K)):oe<0&&(be=Math.ceil(be*oe)/oe,ae=Math.floor(ae*oe)/oe,oe=Hr(be,ae,K)),0<oe?(B[te]=Math.floor(be/oe)*oe,B[ge]=Math.ceil(ae/oe)*oe):oe<0&&(B[te]=Math.ceil(be*oe)/oe,B[ge]=Math.floor(ae*oe)/oe),B};function Oi(B){return B!=null&&!Number.isNaN(B)}function $n(B,$){return K=>{K.prototype.rescale=function(){this.initRange(),this.nice();var[te]=this.chooseTransforms();this.composeOutput(te,this.chooseClamp(te))},K.prototype.initRange=function(){var te=this.options.interpolator;this.options.range=B(te)},K.prototype.composeOutput=function(te,ge){var be,{domain:oe,interpolator:ae,round:Ce}=this.getOptions(),oe=$(oe.map(te)),Ce=Ce?(be=ae,Ee=>(Ee=be(Ee),we(Ee)?Math.round(Ee):Ee)):ae;this.output=In(Ce,oe,ge,te)},K.prototype.invert=void 0}}var ii,Ir={exports:{}},Oa={exports:{}},Ui=function(B){return!(!B||typeof B=="string")&&(B instanceof Array||Array.isArray(B)||0<=B.length&&(B.splice instanceof Function||Object.getOwnPropertyDescriptor(B,B.length-1)&&B.constructor.name!=="String"))},Ha=Array.prototype.concat,ao=Array.prototype.slice,So=Oa.exports=function(B){for(var $=[],K=0,te=B.length;K<te;K++){var ge=B[K];Ui(ge)?$=Ha.call($,ao.call(ge)):$.push(ge)}return $},pi=(So.wrap=function(B){return function(){return B(So(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]}),_a=Oa.exports,un=Object.hasOwnProperty,It=Object.create(null);for(ii in pi)un.call(pi,ii)&&(It[pi[ii]]=ii);var wn=Ir.exports={to:{},get:{}};function Wn(B,$,K){return Math.min(Math.max($,B),K)}function Fr(B){return B=Math.round(B).toString(16).toUpperCase(),B.length<2?"0"+B:B}wn.get=function(B){var $,K;switch(B.substring(0,3).toLowerCase()){case"hsl":$=wn.get.hsl(B),K="hsl";break;case"hwb":$=wn.get.hwb(B),K="hwb";break;default:$=wn.get.rgb(B),K="rgb"}return $?{model:K,value:$}:null},wn.get.rgb=function(B){if(!B)return null;var $,K,te,ge=[0,0,0,1];if($=B.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(te=$[2],$=$[1],K=0;K<3;K++){var be=2*K;ge[K]=parseInt($.slice(be,2+be),16)}te&&(ge[3]=parseInt(te,16)/255)}else if($=B.match(/^#([a-f0-9]{3,4})$/i)){for(te=($=$[1])[3],K=0;K<3;K++)ge[K]=parseInt($[K]+$[K],16);te&&(ge[3]=parseInt(te+te,16)/255)}else{if($=B.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(K=0;K<3;K++)ge[K]=parseInt($[K+1],0);else{if(!($=B.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return($=B.match(/^(\w+)$/))?$[1]==="transparent"?[0,0,0,0]:un.call(pi,$[1])?((ge=pi[$[1]])[3]=1,ge):null:null;for(K=0;K<3;K++)ge[K]=Math.round(2.55*parseFloat($[K+1]))}$[4]&&($[5]?ge[3]=.01*parseFloat($[4]):ge[3]=parseFloat($[4]))}for(K=0;K<3;K++)ge[K]=Wn(ge[K],0,255);return ge[3]=Wn(ge[3],0,1),ge},wn.get.hsl=function(B){var $;return(B=B&&B.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*)?\)$/))?($=parseFloat(B[4]),[(parseFloat(B[1])%360+360)%360,Wn(parseFloat(B[2]),0,100),Wn(parseFloat(B[3]),0,100),Wn(isNaN($)?1:$,0,1)]):null},wn.get.hwb=function(B){var $;return(B=B&&B.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*)?\)$/))?($=parseFloat(B[4]),[(parseFloat(B[1])%360+360)%360,Wn(parseFloat(B[2]),0,100),Wn(parseFloat(B[3]),0,100),Wn(isNaN($)?1:$,0,1)]):null},wn.to.hex=function(){var B=_a(arguments);return"#"+Fr(B[0])+Fr(B[1])+Fr(B[2])+(B[3]<1?Fr(Math.round(255*B[3])):"")},wn.to.rgb=function(){var B=_a(arguments);return B.length<4||B[3]===1?"rgb("+Math.round(B[0])+", "+Math.round(B[1])+", "+Math.round(B[2])+")":"rgba("+Math.round(B[0])+", "+Math.round(B[1])+", "+Math.round(B[2])+", "+B[3]+")"},wn.to.rgb.percent=function(){var B=_a(arguments),$=Math.round(B[0]/255*100),K=Math.round(B[1]/255*100),te=Math.round(B[2]/255*100);return B.length<4||B[3]===1?"rgb("+$+"%, "+K+"%, "+te+"%)":"rgba("+$+"%, "+K+"%, "+te+"%, "+B[3]+")"},wn.to.hsl=function(){var B=_a(arguments);return B.length<4||B[3]===1?"hsl("+B[0]+", "+B[1]+"%, "+B[2]+"%)":"hsla("+B[0]+", "+B[1]+"%, "+B[2]+"%, "+B[3]+")"},wn.to.hwb=function(){var B=_a(arguments),$="";return 4<=B.length&&B[3]!==1&&($=", "+B[3]),"hwb("+B[0]+", "+B[1]+"%, "+B[2]+"%"+$+")"},wn.to.keyword=function(B){return It[B.slice(0,3)]};var vi=Ir.exports;function Xi(B,$,K){let te=K;return te<0&&(te+=1),1<te&&--te,te<1/6?B+6*($-B)*te:te<.5?$:te<2/3?B+($-B)*(2/3-te)*6:B}function oo(ge){var $,K,te,ge=vi.get(ge);return ge?({model:ge,value:$}=ge,ge==="rgb"?$:ge==="hsl"?($=(ge=$)[0]/360,K=ge[1]/100,te=ge[2]/100,ge=ge[3],K==0?[255*te,255*te,255*te,ge]:[255*Xi(K=2*te-(te=te<.5?te*(1+K):te+K-te*K),te,$+1/3),255*Xi(K,te,$),255*Xi(K,te,$-1/3),ge]):null):null}const Fi=(B,$)=>K=>B*(1-K)+$*K,so=(B,$)=>{if(typeof B=="number"&&typeof $=="number")return Fi(B,$);if(typeof B!="string"||typeof $!="string")return()=>B;{var K=B,te=$;const ge=oo(K),be=oo(te);return ge===null||be===null?ge?()=>K:()=>te:ae=>{var oe=new Array(4);for(let Lt=0;Lt<4;Lt+=1){var Ce=ge[Lt],Ee=be[Lt];oe[Lt]=Ce*(1-ae)+Ee*ae}var[Ot,Et,Ht,mt]=oe;return`rgba(${Math.round(Ot)}, ${Math.round(Et)}, ${Math.round(Ht)}, ${mt})`}}},lo=(B,$)=>{const K=Fi(B,$);return te=>Math.round(K(te))};function Oo({map:B,initKey:$},K){return $=$(K),B.has($)?B.get($):K}function Pi(B){return typeof B=="object"?B.valueOf():B}class da extends Map{constructor($){if(super(),this.map=new Map,this.initKey=Pi,$!==null)for(var[K,te]of $)this.set(K,te)}get($){return super.get(Oo({map:this.map,initKey:this.initKey},$))}has($){return super.has(Oo({map:this.map,initKey:this.initKey},$))}set($,K){return super.set(([{map:$,initKey:te},ge]=[{map:this.map,initKey:this.initKey},$],te=te(ge),$.has(te)?$.get(te):($.set(te,ge),ge)),K);var te,ge}delete($){return super.delete(([{map:$,initKey:K},te]=[{map:this.map,initKey:this.initKey},$],K=K(te),$.has(K)&&(te=$.get(K),$.delete(K)),te));var K,te}}class Co{constructor($){this.options=St({},this.getDefaultOptions()),this.update($)}getOptions(){return this.options}update($={}){this.options=St({},this.options,$),this.rescale($)}rescale($){}}const Rr=Symbol("defaultUnknown");function wa(B,$,K){for(let te=0;te<$.length;te+=1)B.has($[te])||B.set(K($[te]),te)}function gr($){var{value:$,from:K,to:te,mapper:ge,notFoundReturn:be}=$;let ae=ge.get($);if(ae===void 0){if(be!==Rr)return be;ae=K.push($)-1,ge.set($,ae)}return te[ae%te.length]}function cs(B){return B instanceof Date?$=>""+$:typeof B=="object"?$=>JSON.stringify($):$=>$}class ha extends Co{getDefaultOptions(){return{domain:[],range:[],unknown:Rr}}constructor($){super($)}map($){return this.domainIndexMap.size===0&&wa(this.domainIndexMap,this.getDomain(),this.domainKey),gr({value:this.domainKey($),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert($){return this.rangeIndexMap.size===0&&wa(this.rangeIndexMap,this.getRange(),this.rangeKey),gr({value:this.rangeKey($),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale($){var[K]=this.options.domain,[te]=this.options.range;this.domainKey=cs(K),this.rangeKey=cs(te),this.rangeIndexMap?($&&!$.range||this.rangeIndexMap.clear(),$&&!$.domain&&!$.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new ha(this.options)}getRange(){return this.options.range}getDomain(){var $,K;return this.sortedDomain||({domain:$,compare:K}=this.options,this.sortedDomain=K?[...$].sort(K):$),this.sortedDomain}}function Ho(ht){const{domain:$,range:K,paddingOuter:te,paddingInner:ge,flex:be,round:ae,align:oe}=ht;var Ce=$.length,mt=0<(mt=(ht=Ce)-(Ee=be).length)?[...Ee,...new Array(mt).fill(1)]:mt<0?Ee.slice(0,ht):Ee,[ht,Ee]=K,Ee=Ee-ht,Dt=Ee/(2/Ce*te+1-1/Ce*ge);const Ot=Dt*ge/Ce;Dt-=Ce*Ot;const Et=function(yt){const qt=Math.min(...yt);return yt.map(Nn=>Nn/qt)}(mt),Ht=Dt/Et.reduce((yt,qt)=>yt+qt);var mt=new da($.map((yt,qt)=>(qt=Et[qt]*Ht,[yt,ae?Math.floor(qt):qt]))),Lt=new da($.map((yt,qt)=>(qt=Et[qt]*Ht+Ot,[yt,ae?Math.floor(qt):qt]))),Dt=Array.from(Lt.values()).reduce((yt,qt)=>yt+qt),ht=ht+(Ee-(Dt-Dt/Ce*ge))*oe;let Jt=ae?Math.round(ht):ht;var Ft=new Array(Ce);for(let yt=0;yt<Ce;yt+=1){Ft[yt]=(tn=Jt,Math.round(1e12*tn)/1e12);var tn=$[yt];Jt+=Lt.get(tn)}return{valueBandWidth:mt,valueStep:Lt,adjustedRange:Ft}}class Yo extends ha{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Rr,flex:[]}}constructor($){super($)}clone(){return new Yo(this.options)}getStep($){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:$===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get($)}getBandWidth($){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:$===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get($)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:$,paddingInner:K}=this.options;return 0<$?$:K}getPaddingOuter(){var{padding:$,paddingOuter:K}=this.options;return 0<$?$:K}rescale(){super.rescale();var{align:te,domain:$,range:ge,round:be,flex:K}=this.options,{adjustedRange:te,valueBandWidth:ge,valueStep:be}=function(Ee){var oe=Ee.domain;if((oe=oe.length)===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!((Ce=Ee.flex)==null||!Ce.length))return Ho(Ee);var{range:Ce,paddingOuter:Ee,paddingInner:Ot,round:Et,align:Ht}=Ee;let mt,Lt,Dt=Ce[0];return Ce=Ce[1]-Dt,mt=Ce/Math.max(1,2*Ee+(oe-Ot)),Et&&(mt=Math.floor(mt)),Dt+=(Ce-mt*(oe-Ot))*Ht,Lt=mt*(1-Ot),Et&&(Dt=Math.round(Dt),Lt=Math.round(Lt)),Ee=new Array(oe).fill(0).map((ht,Jt)=>Dt+Jt*mt),{valueStep:mt,valueBandWidth:Lt,adjustedRange:Ee}}({align:te,range:ge,round:be,flex:K,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:$});this.valueStep=be,this.valueBandWidth=ge,this.adjustedRange=te}}const Sa=(B,$,K)=>{let te,ge,be=B,ae=$;if(be===ae&&0<K)return[be];let oe=Hr(be,ae,K);if(oe===0||!Number.isFinite(oe))return[];if(0<oe){be=Math.ceil(be/oe),ae=Math.floor(ae/oe),ge=new Array(te=Math.ceil(ae-be+1));for(let Ce=0;Ce<te;Ce+=1)ge[Ce]=(be+Ce)*oe}else{oe=-oe,be=Math.ceil(be*oe),ae=Math.floor(ae*oe),ge=new Array(te=Math.ceil(ae-be+1));for(let Ce=0;Ce<te;Ce+=1)ge[Ce]=(be+Ce)/oe}return ge},Na=(te,be,K)=>{var[te,ge]=te,[be,ae]=be;let oe,Ce;return In(Ce=te<ge?(oe=ir(te,ge),K(be,ae)):(oe=ir(ge,te),K(ae,be)),oe)},pa=(B,$,K)=>{const te=Math.min(B.length,$.length)-1,ge=new Array(te),be=new Array(te);var ae=B[0]>B[te],oe=ae?[...B].reverse():B,Ce=ae?[...$].reverse():$;for(let Ee=0;Ee<te;Ee+=1)ge[Ee]=ir(oe[Ee],oe[Ee+1]),be[Ee]=K(Ce[Ee],Ce[Ee+1]);return Ee=>{var Ot=function(Ht,mt,Lt,Dt,ht){let Jt=Lt||0,Ft=Dt||Ht.length;for(var tn=ht||(qt=>qt);Jt<Ft;){var yt=Math.floor((Jt+Ft)/2);tn(Ht[yt])>mt?Ft=yt:Jt=yt+1}return Jt}(B,Ee,1,te)-1,Et=ge[Ot];return In(be[Ot],Et)(Ee)}},ka=(B,$,K,te)=>(2<Math.min(B.length,$.length)?pa:Na)(B,$,te?lo:K);class Dn extends Co{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Fi,tickCount:5}}map($){return Oi($)?this.output($):this.options.unknown}invert($){return Oi($)?this.input($):this.options.unknown}nice(){var $,K,te,ge;this.options.nice&&([$,K,te,...ge]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()($,K,te,...ge))}getTicks(){var $=this.options.tickMethod,[K,te,ge,...be]=this.getTickMethodOptions();return $(K,te,ge,...be)}getTickMethodOptions(){var{domain:$,tickCount:K}=this.options;return[$[0],$[$.length-1],K]}chooseNice(){return er}rescale(){this.nice();var[$,K]=this.chooseTransforms();this.composeOutput($,this.chooseClamp($)),this.composeInput($,K,this.chooseClamp(K))}chooseClamp(te){var{clamp:K,range:ge}=this.options,te=this.options.domain.map(te),ge=Math.min(te.length,ge.length);if(K){K=te[0],te=te[ge-1];const be=te<K?te:K,ae=te<K?K:te;return oe=>Math.min(Math.max(be,oe),ae)}return Fe}composeOutput($,K){var{domain:ae,range:te,round:ge,interpolate:be}=this.options,ae=ka(ae.map($),te,be,ge);this.output=In(ae,K,$)}composeInput($,K,te){var{domain:ge,range:be}=this.options,be=ka(be,ge.map($),Fi);this.input=In(K,te,be)}}class hr extends Dn{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:so,tickMethod:Sa,tickCount:5}}chooseTransforms(){return[Fe,Fe]}clone(){return new hr(this.options)}}class Ci extends Yo{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Rr,paddingInner:1,paddingOuter:0}}constructor($){super($)}getPaddingInner(){return 1}clone(){return new Ci(this.options)}update($){super.update($)}getPaddingOuter(){return this.options.padding}}function Eo(B,$){for(var K=[],te=0,ge=B.length;te<ge;te++)K.push(B[te].substr(0,$));return K}var sa,Oa=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ir=["January","February","March","April","May","June","July","August","September","October","November","December"],Ei=Eo(Ir,3);(function(B){for(var $=[],K=1;K<arguments.length;K++)$[K-1]=arguments[K];for(var te=0,ge=$;te<ge.length;te++){var be,ae=ge[te];for(be in ae)B[be]=ae[be]}})({},{dayNamesShort:Eo(Oa,3),dayNames:Oa,monthNamesShort:Ei,monthNames:Ir,amPm:["am","pm"],DoFn:function(B){return B+["th","st","nd","rd"][3<B%10?0:(B-B%10!=10?1:0)*B%10]}});var Vo;let Ca=sa=class extends hr{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Fe,tickMethod:Sa,tickCount:5}}constructor(B){super(B)}clone(){return new sa(this.options)}};Ca=sa=function(B,$,K,te){var ge,be=arguments.length,ae=be<3?$:te===null?te=Object.getOwnPropertyDescriptor($,K):te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(B,$,K,te);else for(var oe=B.length-1;0<=oe;oe--)(ge=B[oe])&&(ae=(be<3?ge(ae):3<be?ge($,K,ae):ge($,K))||ae);return 3<be&&ae&&Object.defineProperty($,K,ae),ae}([$n(function(B){return[B(0),B(1)]},$=>{var[$,K]=$;return In(Fi(0,1),ir($,K))})],Ca);let Gn=Vo=class extends hr{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Fe,tickMethod:Sa,tickCount:5}}constructor(B){super(B)}clone(){return new Vo(this.options)}};Gn=Vo=function(B,$,K,te){var ge,be=arguments.length,ae=be<3?$:te===null?te=Object.getOwnPropertyDescriptor($,K):te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(B,$,K,te);else for(var oe=B.length-1;0<=oe;oe--)(ge=B[oe])&&(ae=(be<3?ge(ae):3<be?ge($,K,ae):ge($,K))||ae);return 3<be&&ae&&Object.defineProperty($,K,ae),ae}([$n(function(B){return[B(0),B(.5),B(1)]},B=>{const[$,K,te]=B,ge=In(Fi(0,.5),ir($,K)),be=In(Fi(.5,1),ir(K,te));return ae=>($>te?ae<K?be:ge:ae<K?ge:be)(ae)})],Gn);function pr(B,$,K,te,ge){var be=new hr({range:[$,$+te]}),ae=new hr({range:[K,K+ge]});return{transform:function(Ee){var Ee=me(Ee,2),Ce=Ee[0],Ee=Ee[1];return[be.map(Ce),ae.map(Ee)]},untransform:function(Ee){var Ee=me(Ee,2),Ce=Ee[0],Ee=Ee[1];return[be.invert(Ce),ae.invert(Ee)]}}}function gi(B,$,K,te,ge){return(0,me(B,1)[0])($,K,te,ge)}function ai(B,$,K,te,ge){return me(B,1)[0]}function Ln(Ce,$,K,te,ge){var be=(Ce=me(Ce,4))[0],ae=Ce[1],oe=Ce[2],Ce=Ce[3],Ee=new hr({range:[oe,Ce]}),Ot=new hr({range:[be,ae]}),Et=1<(oe=ge/te)?1:oe,Ht=1<oe?1/oe:1;return{transform:function(Dt){var Dt=me(Dt,2),Lt=Dt[0],Dt=Dt[1],Lt=Ot.map(Lt),Dt=Ee.map(Dt);return[.5*(Dt*Math.cos(Lt)*Et)+.5,.5*(Dt*Math.sin(Lt)*Ht)+.5]},untransform:function(ht){var ht=me(ht,2),Lt=ht[0],ht=ht[1],Lt=2*(Lt-.5)/Et,ht=2*(ht-.5)/Ht,Dt=Math.sqrt(Math.pow(Lt,2)+Math.pow(ht,2)),ht=qn(Math.atan2(ht,Lt),be,ae);return[Ot.invert(ht),Ee.invert(Dt)]}}}function lr(B,$,K,te,ge){return{transform:function(ae){var ae=me(ae,2),oe=ae[0];return[ae[1],oe]},untransform:function(ae){var ae=me(ae,2),oe=ae[0];return[ae[1],oe]}}}function Mr(B){for(var $=[],K=1;K<arguments.length;K++)$[K-1]=arguments[K];return ja.apply(void 0,wt([[-1,-1]],me($),!1))}function Rt(B){for(var $=[],K=1;K<arguments.length;K++)$[K-1]=arguments[K];return ja.apply(void 0,wt([[-1,1]],me($),!1))}function Mo(B){for(var $=[],K=1;K<arguments.length;K++)$[K-1]=arguments[K];return ja.apply(void 0,wt([[1,-1]],me($),!1))}function Q(ae,$,K,te,ge){var be,ae=me(ae,1)[0],oe=Re();return oe=oe,ae=ae,be=Math.sin(ae),ae=Math.cos(ae),oe[0]=ae,oe[1]=be,oe[2]=0,oe[3]=-be,oe[4]=ae,oe[5]=0,oe[6]=0,oe[7]=0,oe[8]=1,oe}function Uo(B,$,K,te,ge){var be=(B=me(B,4))[0],ae=B[1],oe=B[2],Ce=(B[3]-oe)/(+ae/(2*Math.PI)+1),Ee=Ce/(2*Math.PI),Ot=new hr({range:[oe,oe+.99*Ce]}),Et=new hr({range:[be,ae]}),Ht=1<(B=ge/te)?1:B,mt=1<B?1/B:1;return{transform:function(ht){var ht=me(ht,2),Dt=ht[0],ht=ht[1],Dt=Et.map(Dt),ht=Ot.map(ht);return[.5*(Math.cos(Dt)*(Ee*Dt+ht)*Ht)+.5,.5*(Math.sin(Dt)*(Ee*Dt+ht)*mt)+.5]},untransform:function(ht){var ht=me(ht,2),Jt=ht[0],ht=ht[1],Jt=2*(Jt-.5)/Ht,ht=2*(ht-.5)/mt,Dt=Math.sqrt(Math.pow(Jt,2)+Math.pow(ht,2)),ht=qn(Math.atan2(ht,Jt)+Math.floor(Dt/Ce)*Math.PI*2,be,ae),Jt=Dt-Ee*ht;return[Et.invert(ht),Ot.invert(Jt)]}}}function Ya(Ce,$,K,te,ge){var be=(Ce=me(Ce,4))[0],ae=Ce[1],oe=Ce[2],Ce=Ce[3],Ee=new hr({range:[oe,Ce]});return{transform:function(Ot){for(var Et=[],Ht=Ot.length,mt=new Ci({domain:new Array(Ht).fill(0).map(function(Jt,Ft){return Ft}),range:[be,ae]}),Lt=0;Lt<Ht;Lt++){var ht=Ot[Lt],Dt=mt.map(Lt),ht=Ee.map(ht);Et.push(Dt,ht)}return Et},untransform:function(Ot){for(var Et=[],Ht=0;Ht<Ot.length;Ht+=2){var mt=Ot[Ht+1];Et.push(Ee.invert(mt))}return Et}}}var ja=function(ae,$,K,te,ge){var ae=me(ae,2),be=ae[0],ae=ae[1],oe=Re();return be=[be,ae],(ae=oe)[0]=be[0],ae[1]=0,ae[2]=0,ae[3]=0,ae[4]=be[1],ae[5]=0,ae[6]=0,ae[7]=0,ae[8]=1,ae};function Ki(B){return 1/Math.tan(B)}function Hn(B,$,K,te,ge){var be=Ki(me(B,1)[0]);return{transform:function(Ce){var Ce=me(Ce,2),oe=Ce[0],Ce=Ce[1];return[oe+Ce*be,Ce]},untransform:function(Ce){var Ce=me(Ce,2),oe=Ce[0],Ce=Ce[1];return[oe-Ce*be,Ce]}}}function nu(B,$,K,te,ge){var be=Ki(me(B,1)[0]);return{transform:function(oe){var oe=me(oe,2),Ce=oe[0];return[Ce,oe[1]+Ce*be]},untransform:function(oe){var oe=me(oe,2),Ce=oe[0];return[Ce,oe[1]-Ce*be]}}}function Is(B,$,K,oe,ae){var be=B<$,ae=(be?$-oe:ae-$)||ae-oe,oe=be?-1:1;return oe*ae*(K+1)/(K+ae/((B-$)*oe))+$}function Ls(B,$,K,te,ae){var be=B<$,ae=(be?$-te:ae-$)||ae-te;return ae/(ae*(K+1)/(B-$)-K*(be?-1:1))+$}function us(B,$,K){return K?new hr({range:[0,1],domain:[0,$]}).map(B):B}function nc(oe,$,K,te,ge){var be=(oe=me(oe,3))[0],ae=oe[1],oe=oe[2],Ce=us(be,te,oe!==void 0&&oe);return{transform:function(Et){var Et=me(Et,2),Ot=Et[0],Et=Et[1];return[Is(Ot,Ce,ae,0,1),Et]},untransform:function(Et){var Et=me(Et,2),Ot=Et[0],Et=Et[1];return[Ls(Ot,Ce,ae,0,1),Et]}}}function Xs(oe,$,K,te,ge){var be=(oe=me(oe,3))[0],ae=oe[1],oe=oe[2],Ce=us(be,ge,oe!==void 0&&oe);return{transform:function(Ee){return Ee=me(Ee,2),[Ee[0],Is(Ee[1],Ce,ae,0,1)]},untransform:function(Ee){return Ee=me(Ee,2),[Ee[0],Ls(Ee[1],Ce,ae,0,1)]}}}function fs(Ee,$,K,te,ge){var be=(Ee=me(Ee,5))[0],ae=Ee[1],oe=Ee[2],Ce=Ee[3],Ee=Ee[4],Ot=us(be,te,Ee=Ee!==void 0&&Ee),Et=us(ae,ge,Ee);return{transform:function(Lt){var Lt=me(Lt,2),mt=Lt[0],Lt=Lt[1];return[Is(mt,Ot,oe,0,1),Is(Lt,Et,Ce,0,1)]},untransform:function(Lt){var Lt=me(Lt,2),mt=Lt[0],Lt=Lt[1];return[Ls(mt,Ot,oe,0,1),Ls(Lt,Et,Ce,0,1)]}}}function ru(Ee,$,K,te,ge){var be=(Ee=me(Ee,5))[0],ae=Ee[1],oe=Ee[2],Ce=Ee[3],Ee=(Ee=Ee[4])!==void 0&&Ee,Ot=new hr({range:[0,te]}),Et=new hr({range:[0,ge]}),Ht=Ee?be:Ot.map(be),mt=Ee?ae:Et.map(ae);return{transform:function(ht){var ht=me(ht,2),Dt=ht[0],ht=ht[1],Jt=Ot.map(Dt)-Ht,Ft=Et.map(ht)-mt,tn=Math.sqrt(Jt*Jt+Ft*Ft);return oe<tn?[Dt,ht]:(Dt=Is(tn,0,Ce,0,oe),ht=Math.atan2(Ft,Jt),tn=Ht+Dt*Math.cos(ht),Ft=mt+Dt*Math.sin(ht),[Ot.invert(tn),Et.invert(Ft)])},untransform:function(ht){var ht=me(ht,2),Dt=ht[0],ht=ht[1],Jt=Ot.map(Dt)-Ht,Ft=Et.map(ht)-mt,tn=Math.sqrt(Jt*Jt+Ft*Ft);return oe<tn?[Dt,ht]:(Dt=Ls(tn,0,Ce,0,oe),ht=Math.atan2(Ft,Jt),tn=Ht+Dt*Math.cos(ht),Ft=mt+Dt*Math.sin(ht),[Ot.invert(tn),Et.invert(Ft)])}}}function iu(B,$,K,te,ge,be,ae){var oe=new hr({range:[$,$+ge]}),Ce=new hr({range:[K,K+be]}),Ee=new hr({range:[te,te+ae]});return{transform:function(mt){var mt=me(mt,3),Et=mt[0],Ht=mt[1],mt=mt[2];return[oe.map(Et),Ce.map(Ht),Ee.map(mt)]},untransform:function(mt){var mt=me(mt,3),Et=mt[0],Ht=mt[1],mt=mt[2];return[oe.invert(Et),Ce.invert(Ht),Ee.invert(mt)]}}}function af(Ot,$,K,te,ge,be,ae){var oe,Ce=(Ot=me(Ot,3))[0],Ee=Ot[1],Ot=Ot[2];return oe=Xt(),Ce=[Ce,Ee,Ot],oe[0]=1,oe[1]=0,oe[2]=0,oe[3]=0,oe[4]=0,oe[5]=1,oe[6]=0,oe[7]=0,oe[8]=0,oe[9]=0,oe[10]=1,oe[11]=0,oe[12]=Ce[0],oe[13]=Ce[1],oe[14]=Ce[2],oe[15]=1,oe}function ds(B,$,K,te,ge,be,ae){return{transform:function(Ce){var Ce=me(Ce,3),Ee=Ce[0];return[Ce[1],Ee,Ce[2]]},untransform:function(Ce){var Ce=me(Ce,3),Ee=Ce[0];return[Ce[1],Ee,Ce[2]]}}}function rc(Ot,$,K,te,ge,be,ae){var oe,Ce=(Ot=me(Ot,3))[0],Ee=Ot[1],Ot=Ot[2];return oe=Xt(),Ce=[Ce,Ee,Ot],oe[0]=Ce[0],oe[1]=0,oe[2]=0,oe[3]=0,oe[4]=0,oe[5]=Ce[1],oe[6]=0,oe[7]=0,oe[8]=0,oe[9]=0,oe[10]=Ce[2],oe[11]=0,oe[12]=0,oe[13]=0,oe[14]=0,oe[15]=1,oe}la.prototype.update=function(B){this.options=St({},this.options,B),this.recoordinate()},la.prototype.clone=function(){return new la(this.options)},la.prototype.getOptions=function(){return this.options},la.prototype.clear=function(){this.update({transformations:[]})},la.prototype.getSize=function(){var B=this.options;return[B.width,B.height]},la.prototype.getCenter=function(){var B=this.options,$=B.x,K=B.y;return[(2*$+B.width)/2,(2*K+B.height)/2]},la.prototype.transform=function(){for(var B=[],$=0;$<arguments.length;$++)B[$]=arguments[$];var K=this.options.transformations;return this.update({transformations:wt(wt([],me(K),!1),[wt([],me(B),!1)],!1)}),this},la.prototype.map=function(B){return this.output(B)},la.prototype.invert=function(B){return this.input(B)},la.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},la.prototype.compose=function(B){function $(yt,qt){var Nn;oe.push((qt=qt===void 0?!0:qt)?(Nn=yt,function(va){for(var Ea=[],Bi=0;Bi<va.length-1;Bi+=2){var ca=[va[Bi],va[Bi+1]],ca=Nn(ca);Ea.push.apply(Ea,wt([],me(ca),!1))}return Ea}):yt)}var K,te,ge=(B=B===void 0?!1:B)?wt([],me(this.options.transformations),!1).reverse():this.options.transformations,be=B?function(yt){return yt.untransform}:function(yt){return yt.transform},ae=[],oe=[];try{for(var Ce=se(ge),Ee=Ce.next();!Ee.done;Ee=Ce.next()){var Ot,Et,Ht,mt,Lt,Dt,ht=me(Ee.value),Jt=ht[0],Ft=ht.slice(1),tn=this.transformers[Jt];tn&&(Et=(Ot=this.options).x,Ht=Ot.y,mt=Ot.width,Lt=Ot.height,Zn(Dt=tn(wt([],me(Ft),!1),Et,Ht,mt,Lt))?ae.push(Dt):(ae.length&&($(this.createMatrixTransform(ae,B)),ae.splice(0,ae.length)),$(be(Dt)||Fe,Jt!=="parallel")))}}catch(yt){K={error:yt}}finally{try{Ee&&!Ee.done&&(te=Ce.return)&&te.call(Ce)}finally{if(K)throw K.error}}return ae.length&&$(this.createMatrixTransform(ae,B)),rr.apply(void 0,wt([],me(oe),!1))},la.prototype.createMatrixTransform=function(B,$){var K,te,ge,be,ae,oe,Ce,Ee,Ot,Et,Ht,mt,Lt=Re();return $&&B.reverse(),B.forEach(function(Dt){return rt(Lt,Lt,Dt)}),$&&($=B=Lt,(mt=new Be(9))[0]=$[0],mt[1]=$[1],mt[2]=$[2],mt[3]=$[3],mt[4]=$[4],mt[5]=$[5],mt[6]=$[6],mt[7]=$[7],mt[8]=$[8],mt=($=mt)[0],K=$[1],te=$[2],ge=$[3],be=$[4],ae=$[5],oe=$[6],Ce=$[7],Ee=($=$[8])*be-ae*Ce,Ht=mt*Ee+K*(Ot=-$*ge+ae*oe)+te*(Et=Ce*ge-be*oe))&&(B[0]=Ee*(Ht=1/Ht),B[1]=(-$*K+te*Ce)*Ht,B[2]=(ae*K-te*be)*Ht,B[3]=Ot*Ht,B[4]=($*mt-te*oe)*Ht,B[5]=(-ae*mt+te*ge)*Ht,B[6]=Et*Ht,B[7]=(-Ce*mt+K*oe)*Ht,B[8]=(be*mt-K*ge)*Ht),function(qt){var ht,Jt,Ft,tn,yt,qt=[qt[0],qt[1],1];return Ft=Lt,tn=(Jt=ht=qt)[0],yt=Jt[1],Jt=Jt[2],ht[0]=tn*Ft[0]+yt*Ft[3]+Jt*Ft[6],ht[1]=tn*Ft[1]+yt*Ft[4]+Jt*Ft[7],ht[2]=tn*Ft[2]+yt*Ft[5]+Jt*Ft[8],[qt[0],qt[1]]}},Oa=la;function la(B){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:pr,translate:cn,custom:gi,matrix:ai,polar:Ln,transpose:lr,scale:ja,"shear.x":Hn,"shear.y":nu,reflect:Mr,"reflect.x":Rt,"reflect.y":Mo,rotate:Q,helix:Uo,parallel:Ya,fisheye:fs,"fisheye.x":nc,"fisheye.y":Xs,"fisheye.circular":ru},this.update(B)}qi.prototype.update=function(B){this.options=St({},this.options,B),this.recoordinate()},qi.prototype.clone=function(){return new qi(this.options)},qi.prototype.getOptions=function(){return this.options},qi.prototype.clear=function(){this.update({transformations:[]})},qi.prototype.getSize=function(){var B=this.options;return[B.width,B.height,B.depth]},qi.prototype.getCenter=function(){var B=this.options,$=B.x,K=B.y,te=B.z;return[(2*$+B.width)/2,(2*K+B.height)/2,(2*te+B.depth)/2]},qi.prototype.transform=function(){for(var B=[],$=0;$<arguments.length;$++)B[$]=arguments[$];var K=this.options.transformations;return this.update({transformations:wt(wt([],me(K),!1),[wt([],me(B),!1)],!1)}),this},qi.prototype.map=function(B){return this.output(B)},qi.prototype.invert=function(B){return this.input(B)},qi.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},qi.prototype.compose=function(B){function $(Nn,va){var Ea;oe.push((va=va===void 0?!0:va)?(Ea=Nn,function(Bi){for(var ca=[],mi=0;mi<Bi.length-1;mi+=3){var zr=[Bi[mi],Bi[mi+1],Bi[mi+2]],zr=Ea(zr);ca.push.apply(ca,wt([],me(zr),!1))}return ca}):Nn)}var K,te,ge=(B=B===void 0?!1:B)?wt([],me(this.options.transformations),!1).reverse():this.options.transformations,be=B?function(Nn){return Nn.untransform}:function(Nn){return Nn.transform},ae=[],oe=[];try{for(var Ce=se(ge),Ee=Ce.next();!Ee.done;Ee=Ce.next()){var Ot,Et,Ht,mt,Lt,Dt,ht,Jt,Ft=me(Ee.value),tn=Ft[0],yt=Ft.slice(1),qt=this.transformers[tn];qt&&(Et=(Ot=this.options).x,Ht=Ot.y,mt=Ot.z,Lt=Ot.width,Dt=Ot.height,ht=Ot.depth,Zn(Jt=qt(wt([],me(yt),!1),Et,Ht,mt,Lt,Dt,ht))?ae.push(Jt):(ae.length&&($(this.createMatrixTransform(ae,B)),ae.splice(0,ae.length)),$(be(Jt)||Fe,!0)))}}catch(Nn){K={error:Nn}}finally{try{Ee&&!Ee.done&&(te=Ce.return)&&te.call(Ce)}finally{if(K)throw K.error}}return ae.length&&$(this.createMatrixTransform(ae,B)),rr.apply(void 0,wt([],me(oe),!1))},qi.prototype.createMatrixTransform=function(B,$){var K,te,ge,be,ae,oe,Ce,Ee,Ot,Et,Ht,mt,Lt,Dt,ht,Jt,Ft,tn,yt,qt,Nn,va,Ea,Bi,ca,mi,zr,vr,Da=Xt();return $&&B.reverse(),B.forEach(function(_l){return ln(Da,Da,_l)}),$&&($=B=Da,(vr=new Be(16))[0]=$[0],vr[1]=$[1],vr[2]=$[2],vr[3]=$[3],vr[4]=$[4],vr[5]=$[5],vr[6]=$[6],vr[7]=$[7],vr[8]=$[8],vr[9]=$[9],vr[10]=$[10],vr[11]=$[11],vr[12]=$[12],vr[13]=$[13],vr[14]=$[14],vr[15]=$[15],vr=($=vr)[0],K=$[1],te=$[2],ge=$[3],be=$[4],ae=$[5],oe=$[6],Ce=$[7],Ee=$[8],Ot=$[9],Et=$[10],Ht=$[11],mt=$[12],Lt=$[13],Dt=$[14],$=$[15],zr=(ht=vr*ae-K*be)*(mi=Et*$-Ht*Dt)-(Jt=vr*oe-te*be)*(ca=Ot*$-Ht*Lt)+(Ft=vr*Ce-ge*be)*(Bi=Ot*Dt-Et*Lt)+(tn=K*oe-te*ae)*(Ea=Ee*$-Ht*mt)-(yt=K*Ce-ge*ae)*(va=Ee*Dt-Et*mt)+(qt=te*Ce-ge*oe)*(Nn=Ee*Lt-Ot*mt))&&(B[0]=(ae*mi-oe*ca+Ce*Bi)*(zr=1/zr),B[1]=(te*ca-K*mi-ge*Bi)*zr,B[2]=(Lt*qt-Dt*yt+$*tn)*zr,B[3]=(Et*yt-Ot*qt-Ht*tn)*zr,B[4]=(oe*Ea-be*mi-Ce*va)*zr,B[5]=(vr*mi-te*Ea+ge*va)*zr,B[6]=(Dt*Ft-mt*qt-$*Jt)*zr,B[7]=(Ee*qt-Et*Ft+Ht*Jt)*zr,B[8]=(be*ca-ae*Ea+Ce*Nn)*zr,B[9]=(K*Ea-vr*ca-ge*Nn)*zr,B[10]=(mt*yt-Lt*Ft+$*ht)*zr,B[11]=(Ot*Ft-Ee*yt-Ht*ht)*zr,B[12]=(ae*va-be*Bi-oe*Nn)*zr,B[13]=(vr*Bi-K*va+te*Nn)*zr,B[14]=(Lt*Jt-mt*tn-Dt*ht)*zr,B[15]=(Ee*tn-Ot*Jt+Et*ht)*zr),function(co){var Va,Fa,zi,Po,To,Ao,co=[co[0],co[1],co[2],1];return zi=Da,Po=(Fa=Va=co)[0],To=Fa[1],Ao=Fa[2],Fa=Fa[3],Va[0]=zi[0]*Po+zi[4]*To+zi[8]*Ao+zi[12]*Fa,Va[1]=zi[1]*Po+zi[5]*To+zi[9]*Ao+zi[13]*Fa,Va[2]=zi[2]*Po+zi[6]*To+zi[10]*Ao+zi[14]*Fa,Va[3]=zi[3]*Po+zi[7]*To+zi[11]*Ao+zi[15]*Fa,[co[0],co[1],co[2]]}},Ei=qi;function qi(B){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:iu,translate3D:af,scale3D:rc,transpose3D:ds},this.update(B)}Y.Coordinate=Oa,Y.Coordinate3D=Ei,Object.defineProperty(Y,"__esModule",{value:!0})})},38554:function(jn){"use strict";var Kn=Object.prototype.hasOwnProperty,Y="~";function se(){}Object.create&&(se.prototype=Object.create(null),new se().__proto__||(Y=!1));function me(Qe,j,Xe){this.fn=Qe,this.context=j,this.once=Xe||!1}function wt(Qe,j,Xe,we,D){if(typeof Xe!="function")throw new TypeError("The listener must be a function");var gt=new me(Xe,we||Qe,D),St=Y?Y+j:j;return Qe._events[St]?Qe._events[St].fn?Qe._events[St]=[Qe._events[St],gt]:Qe._events[St].push(gt):(Qe._events[St]=gt,Qe._eventsCount++),Qe}function _t(Qe,j){--Qe._eventsCount===0?Qe._events=new se:delete Qe._events[j]}function ne(){this._events=new se,this._eventsCount=0}ne.prototype.eventNames=function(){var j=[],Xe,we;if(this._eventsCount===0)return j;for(we in Xe=this._events)Kn.call(Xe,we)&&j.push(Y?we.slice(1):we);return Object.getOwnPropertySymbols?j.concat(Object.getOwnPropertySymbols(Xe)):j},ne.prototype.listeners=function(j){var Xe=Y?Y+j:j,we=this._events[Xe];if(!we)return[];if(we.fn)return[we.fn];for(var D=0,gt=we.length,St=new Array(gt);D<gt;D++)St[D]=we[D].fn;return St},ne.prototype.listenerCount=function(j){var Xe=Y?Y+j:j,we=this._events[Xe];return we?we.fn?1:we.length:0},ne.prototype.emit=function(j,Xe,we,D,gt,St){var Fe=Y?Y+j:j;if(!this._events[Fe])return!1;var Ne=this._events[Fe],Be=arguments.length,Re,rt;if(Ne.fn){switch(Ne.once&&this.removeListener(j,Ne.fn,void 0,!0),Be){case 1:return Ne.fn.call(Ne.context),!0;case 2:return Ne.fn.call(Ne.context,Xe),!0;case 3:return Ne.fn.call(Ne.context,Xe,we),!0;case 4:return Ne.fn.call(Ne.context,Xe,we,D),!0;case 5:return Ne.fn.call(Ne.context,Xe,we,D,gt),!0;case 6:return Ne.fn.call(Ne.context,Xe,we,D,gt,St),!0}for(rt=1,Re=new Array(Be-1);rt<Be;rt++)Re[rt-1]=arguments[rt];Ne.fn.apply(Ne.context,Re)}else{var Xt=Ne.length,ln;for(rt=0;rt<Xt;rt++)switch(Ne[rt].once&&this.removeListener(j,Ne[rt].fn,void 0,!0),Be){case 1:Ne[rt].fn.call(Ne[rt].context);break;case 2:Ne[rt].fn.call(Ne[rt].context,Xe);break;case 3:Ne[rt].fn.call(Ne[rt].context,Xe,we);break;case 4:Ne[rt].fn.call(Ne[rt].context,Xe,we,D);break;default:if(!Re)for(ln=1,Re=new Array(Be-1);ln<Be;ln++)Re[ln-1]=arguments[ln];Ne[rt].fn.apply(Ne[rt].context,Re)}}return!0},ne.prototype.on=function(j,Xe,we){return wt(this,j,Xe,we,!1)},ne.prototype.once=function(j,Xe,we){return wt(this,j,Xe,we,!0)},ne.prototype.removeListener=function(j,Xe,we,D){var gt=Y?Y+j:j;if(!this._events[gt])return this;if(!Xe)return _t(this,gt),this;var St=this._events[gt];if(St.fn)St.fn===Xe&&(!D||St.once)&&(!we||St.context===we)&&_t(this,gt);else{for(var Fe=0,Ne=[],Be=St.length;Fe<Be;Fe++)(St[Fe].fn!==Xe||D&&!St[Fe].once||we&&St[Fe].context!==we)&&Ne.push(St[Fe]);Ne.length?this._events[gt]=Ne.length===1?Ne[0]:Ne:_t(this,gt)}return this},ne.prototype.removeAllListeners=function(j){var Xe;return j?(Xe=Y?Y+j:j,this._events[Xe]&&_t(this,Xe)):(this._events=new se,this._eventsCount=0),this},ne.prototype.off=ne.prototype.removeListener,ne.prototype.addListener=ne.prototype.on,ne.prefixed=Y,ne.EventEmitter=ne,jn.exports=ne},8874:function(jn){"use strict";jn.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]}},19818:function(jn,Kn,Y){var se=Y(8874),me=Y(86851),wt=Object.hasOwnProperty,_t=Object.create(null);for(var ne in se)wt.call(se,ne)&&(_t[se[ne]]=ne);var Qe=jn.exports={to:{},get:{}};Qe.get=function(we){var D=we.substring(0,3).toLowerCase(),gt,St;switch(D){case"hsl":gt=Qe.get.hsl(we),St="hsl";break;case"hwb":gt=Qe.get.hwb(we),St="hwb";break;default:gt=Qe.get.rgb(we),St="rgb";break}return gt?{model:St,value:gt}:null},Qe.get.rgb=function(we){if(!we)return null;var D=/^#([a-f0-9]{3,4})$/i,gt=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,St=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Fe=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Ne=/^(\w+)$/,Be=[0,0,0,1],Re,rt,Xt;if(Re=we.match(gt)){for(Xt=Re[2],Re=Re[1],rt=0;rt<3;rt++){var ln=rt*2;Be[rt]=parseInt(Re.slice(ln,ln+2),16)}Xt&&(Be[3]=parseInt(Xt,16)/255)}else if(Re=we.match(D)){for(Re=Re[1],Xt=Re[3],rt=0;rt<3;rt++)Be[rt]=parseInt(Re[rt]+Re[rt],16);Xt&&(Be[3]=parseInt(Xt+Xt,16)/255)}else if(Re=we.match(St)){for(rt=0;rt<3;rt++)Be[rt]=parseInt(Re[rt+1],0);Re[4]&&(Re[5]?Be[3]=parseFloat(Re[4])*.01:Be[3]=parseFloat(Re[4]))}else if(Re=we.match(Fe)){for(rt=0;rt<3;rt++)Be[rt]=Math.round(parseFloat(Re[rt+1])*2.55);Re[4]&&(Re[5]?Be[3]=parseFloat(Re[4])*.01:Be[3]=parseFloat(Re[4]))}else return(Re=we.match(Ne))?Re[1]==="transparent"?[0,0,0,0]:wt.call(se,Re[1])?(Be=se[Re[1]],Be[3]=1,Be):null:null;for(rt=0;rt<3;rt++)Be[rt]=j(Be[rt],0,255);return Be[3]=j(Be[3],0,1),Be},Qe.get.hsl=function(we){if(!we)return null;var D=/^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*)?\)$/,gt=we.match(D);if(gt){var St=parseFloat(gt[4]),Fe=(parseFloat(gt[1])%360+360)%360,Ne=j(parseFloat(gt[2]),0,100),Be=j(parseFloat(gt[3]),0,100),Re=j(isNaN(St)?1:St,0,1);return[Fe,Ne,Be,Re]}return null},Qe.get.hwb=function(we){if(!we)return null;var D=/^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*)?\)$/,gt=we.match(D);if(gt){var St=parseFloat(gt[4]),Fe=(parseFloat(gt[1])%360+360)%360,Ne=j(parseFloat(gt[2]),0,100),Be=j(parseFloat(gt[3]),0,100),Re=j(isNaN(St)?1:St,0,1);return[Fe,Ne,Be,Re]}return null},Qe.to.hex=function(){var we=me(arguments);return"#"+Xe(we[0])+Xe(we[1])+Xe(we[2])+(we[3]<1?Xe(Math.round(we[3]*255)):"")},Qe.to.rgb=function(){var we=me(arguments);return we.length<4||we[3]===1?"rgb("+Math.round(we[0])+", "+Math.round(we[1])+", "+Math.round(we[2])+")":"rgba("+Math.round(we[0])+", "+Math.round(we[1])+", "+Math.round(we[2])+", "+we[3]+")"},Qe.to.rgb.percent=function(){var we=me(arguments),D=Math.round(we[0]/255*100),gt=Math.round(we[1]/255*100),St=Math.round(we[2]/255*100);return we.length<4||we[3]===1?"rgb("+D+"%, "+gt+"%, "+St+"%)":"rgba("+D+"%, "+gt+"%, "+St+"%, "+we[3]+")"},Qe.to.hsl=function(){var we=me(arguments);return we.length<4||we[3]===1?"hsl("+we[0]+", "+we[1]+"%, "+we[2]+"%)":"hsla("+we[0]+", "+we[1]+"%, "+we[2]+"%, "+we[3]+")"},Qe.to.hwb=function(){var we=me(arguments),D="";return we.length>=4&&we[3]!==1&&(D=", "+we[3]),"hwb("+we[0]+", "+we[1]+"%, "+we[2]+"%"+D+")"},Qe.to.keyword=function(we){return _t[we.slice(0,3)]};function j(we,D,gt){return Math.min(Math.max(D,we),gt)}function Xe(we){var D=Math.round(we).toString(16).toUpperCase();return D.length<2?"0"+D:D}},20640:function(jn,Kn,Y){"use strict";var se=Y(11742),me={"text/plain":"Text","text/html":"Url",default:"Text"},wt="Copy to clipboard: #{key}, Enter";function _t(Qe){var j=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return Qe.replace(/#{\s*key\s*}/g,j)}function ne(Qe,j){var Xe,we,D,gt,St,Fe,Ne=!1;j||(j={}),Xe=j.debug||!1;try{D=se(),gt=document.createRange(),St=document.getSelection(),Fe=document.createElement("span"),Fe.textContent=Qe,Fe.ariaHidden="true",Fe.style.all="unset",Fe.style.position="fixed",Fe.style.top=0,Fe.style.clip="rect(0, 0, 0, 0)",Fe.style.whiteSpace="pre",Fe.style.webkitUserSelect="text",Fe.style.MozUserSelect="text",Fe.style.msUserSelect="text",Fe.style.userSelect="text",Fe.addEventListener("copy",function(Re){if(Re.stopPropagation(),j.format)if(Re.preventDefault(),typeof Re.clipboardData=="undefined"){Xe&&console.warn("unable to use e.clipboardData"),Xe&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var rt=me[j.format]||me.default;window.clipboardData.setData(rt,Qe)}else Re.clipboardData.clearData(),Re.clipboardData.setData(j.format,Qe);j.onCopy&&(Re.preventDefault(),j.onCopy(Re.clipboardData))}),document.body.appendChild(Fe),gt.selectNodeContents(Fe),St.addRange(gt);var Be=document.execCommand("copy");if(!Be)throw new Error("copy command was unsuccessful");Ne=!0}catch(Re){Xe&&console.error("unable to copy using execCommand: ",Re),Xe&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(j.format||"text",Qe),j.onCopy&&j.onCopy(window.clipboardData),Ne=!0}catch(rt){Xe&&console.error("unable to copy using clipboardData: ",rt),Xe&&console.error("falling back to prompt"),we=_t("message"in j?j.message:wt),window.prompt(we,Qe)}}finally{St&&(typeof St.removeRange=="function"?St.removeRange(gt):St.removeAllRanges()),Fe&&document.body.removeChild(Fe),D()}return Ne}jn.exports=ne},69916:function(jn,Kn){(function(Y,se){se(Kn)})(this,function(Y){"use strict";function se(Fe,Ne,Be,Re){Re=Re||{};var rt=Re.maxIterations||100,Xt=Re.tolerance||1e-10,ln=Fe(Ne),rr=Fe(Be),Zn=Be-Ne;if(ln*rr>0)throw"Initial bisect points must have opposite signs";if(ln===0)return Ne;if(rr===0)return Be;for(var qn=0;qn<rt;++qn){Zn/=2;var cn=Ne+Zn,In=Fe(cn);if(In*ln>=0&&(Ne=cn),Math.abs(Zn)<Xt||In===0)return cn}return Ne+Zn}function me(Fe){for(var Ne=new Array(Fe),Be=0;Be<Fe;++Be)Ne[Be]=0;return Ne}function wt(Fe,Ne){return me(Fe).map(function(){return me(Ne)})}function _t(Fe,Ne){for(var Be=0,Re=0;Re<Fe.length;++Re)Be+=Fe[Re]*Ne[Re];return Be}function ne(Fe){return Math.sqrt(_t(Fe,Fe))}function Qe(Fe,Ne,Be){for(var Re=0;Re<Ne.length;++Re)Fe[Re]=Ne[Re]*Be}function j(Fe,Ne,Be,Re,rt){for(var Xt=0;Xt<Fe.length;++Xt)Fe[Xt]=Ne*Be[Xt]+Re*rt[Xt]}function Xe(Fe,Ne,Be){Be=Be||{};var Re=Be.maxIterations||Ne.length*200,rt=Be.nonZeroDelta||1.05,Xt=Be.zeroDelta||.001,ln=Be.minErrorDelta||1e-6,rr=Be.minErrorDelta||1e-5,Zn=Be.rho!==void 0?Be.rho:1,qn=Be.chi!==void 0?Be.chi:2,cn=Be.psi!==void 0?Be.psi:-.5,In=Be.sigma!==void 0?Be.sigma:.5,ir,dr=Ne.length,Vt=new Array(dr+1);Vt[0]=Ne,Vt[0].fx=Fe(Ne),Vt[0].id=0;for(var Kt=0;Kt<dr;++Kt){var Hr=Ne.slice();Hr[Kt]=Hr[Kt]?Hr[Kt]*rt:Xt,Vt[Kt+1]=Hr,Vt[Kt+1].fx=Fe(Hr),Vt[Kt+1].id=Kt+1}function er(It){for(var wn=0;wn<It.length;wn++)Vt[dr][wn]=It[wn];Vt[dr].fx=It.fx}for(var Oi=function(It,wn){return It.fx-wn.fx},$n=Ne.slice(),ii=Ne.slice(),Ui=Ne.slice(),Ha=Ne.slice(),ao=0;ao<Re;++ao){if(Vt.sort(Oi),Be.history){var So=Vt.map(function(It){var wn=It.slice();return wn.fx=It.fx,wn.id=It.id,wn});So.sort(function(It,wn){return It.id-wn.id}),Be.history.push({x:Vt[0].slice(),fx:Vt[0].fx,simplex:So})}for(ir=0,Kt=0;Kt<dr;++Kt)ir=Math.max(ir,Math.abs(Vt[0][Kt]-Vt[1][Kt]));if(Math.abs(Vt[0].fx-Vt[dr].fx)<ln&&ir<rr)break;for(Kt=0;Kt<dr;++Kt){$n[Kt]=0;for(var pi=0;pi<dr;++pi)$n[Kt]+=Vt[pi][Kt];$n[Kt]/=dr}var _a=Vt[dr];if(j(ii,1+Zn,$n,-Zn,_a),ii.fx=Fe(ii),ii.fx<Vt[0].fx)j(Ha,1+qn,$n,-qn,_a),Ha.fx=Fe(Ha),Ha.fx<ii.fx?er(Ha):er(ii);else if(ii.fx>=Vt[dr-1].fx){var un=!1;if(ii.fx>_a.fx?(j(Ui,1+cn,$n,-cn,_a),Ui.fx=Fe(Ui),Ui.fx<_a.fx?er(Ui):un=!0):(j(Ui,1-cn*Zn,$n,cn*Zn,_a),Ui.fx=Fe(Ui),Ui.fx<ii.fx?er(Ui):un=!0),un){if(In>=1)break;for(Kt=1;Kt<Vt.length;++Kt)j(Vt[Kt],1-In,Vt[0],In,Vt[Kt]),Vt[Kt].fx=Fe(Vt[Kt])}}else er(ii)}return Vt.sort(Oi),{fx:Vt[0].fx,x:Vt[0]}}function we(Fe,Ne,Be,Re,rt,Xt,ln){var rr=Be.fx,Zn=_t(Be.fxprime,Ne),qn=rr,cn=rr,In=Zn,ir=0;rt=rt||1,Xt=Xt||1e-6,ln=ln||.1;function dr(Kt,Hr,er){for(var Oi=0;Oi<16;++Oi)if(rt=(Kt+Hr)/2,j(Re.x,1,Be.x,rt,Ne),qn=Re.fx=Fe(Re.x,Re.fxprime),In=_t(Re.fxprime,Ne),qn>rr+Xt*rt*Zn||qn>=er)Hr=rt;else{if(Math.abs(In)<=-ln*Zn)return rt;In*(Hr-Kt)>=0&&(Hr=Kt),Kt=rt,er=qn}return 0}for(var Vt=0;Vt<10;++Vt){if(j(Re.x,1,Be.x,rt,Ne),qn=Re.fx=Fe(Re.x,Re.fxprime),In=_t(Re.fxprime,Ne),qn>rr+Xt*rt*Zn||Vt&&qn>=cn)return dr(ir,rt,cn);if(Math.abs(In)<=-ln*Zn)return rt;if(In>=0)return dr(rt,ir,qn);cn=qn,ir=rt,rt*=2}return rt}function D(Fe,Ne,Be){var Re={x:Ne.slice(),fx:0,fxprime:Ne.slice()},rt={x:Ne.slice(),fx:0,fxprime:Ne.slice()},Xt=Ne.slice(),ln,rr,Zn=1,qn;Be=Be||{},qn=Be.maxIterations||Ne.length*20,Re.fx=Fe(Re.x,Re.fxprime),ln=Re.fxprime.slice(),Qe(ln,Re.fxprime,-1);for(var cn=0;cn<qn;++cn){if(Zn=we(Fe,ln,Re,rt,Zn),Be.history&&Be.history.push({x:Re.x.slice(),fx:Re.fx,fxprime:Re.fxprime.slice(),alpha:Zn}),!Zn)Qe(ln,Re.fxprime,-1);else{j(Xt,1,rt.fxprime,-1,Re.fxprime);var In=_t(Re.fxprime,Re.fxprime),ir=Math.max(0,_t(Xt,rt.fxprime)/In);j(ln,ir,ln,-1,rt.fxprime),rr=Re,Re=rt,rt=rr}if(ne(Re.fxprime)<=1e-5)break}return Be.history&&Be.history.push({x:Re.x.slice(),fx:Re.fx,fxprime:Re.fxprime.slice(),alpha:Zn}),Re}function gt(Fe,Ne,Be){Be=Be||{};for(var Re=Be.maxIterations||Ne.length*100,rt=Be.learnRate||.001,Xt={x:Ne.slice(),fx:0,fxprime:Ne.slice()},ln=0;ln<Re&&(Xt.fx=Fe(Xt.x,Xt.fxprime),Be.history&&Be.history.push({x:Xt.x.slice(),fx:Xt.fx,fxprime:Xt.fxprime.slice()}),j(Xt.x,1,Xt.x,-rt,Xt.fxprime),!(ne(Xt.fxprime)<=1e-5));++ln);return Xt}function St(Fe,Ne,Be){Be=Be||{};var Re={x:Ne.slice(),fx:0,fxprime:Ne.slice()},rt={x:Ne.slice(),fx:0,fxprime:Ne.slice()},Xt=Be.maxIterations||Ne.length*100,ln=Be.learnRate||1,rr=Ne.slice(),Zn=Be.c1||.001,qn=Be.c2||.1,cn,In=[];if(Be.history){var ir=Fe;Fe=function(Vt,Kt){return In.push(Vt.slice()),ir(Vt,Kt)}}Re.fx=Fe(Re.x,Re.fxprime);for(var dr=0;dr<Xt&&(Qe(rr,Re.fxprime,-1),ln=we(Fe,rr,Re,rt,ln,Zn,qn),Be.history&&(Be.history.push({x:Re.x.slice(),fx:Re.fx,fxprime:Re.fxprime.slice(),functionCalls:In,learnRate:ln,alpha:ln}),In=[]),cn=Re,Re=rt,rt=cn,!(ln===0||ne(Re.fxprime)<1e-5));++dr);return Re}Y.bisect=se,Y.nelderMead=Xe,Y.conjugateGradient=D,Y.gradientDescent=gt,Y.gradientDescentLineSearch=St,Y.zeros=me,Y.zerosM=wt,Y.norm2=ne,Y.weightedSum=j,Y.scale=Qe})},73807:function(jn){"use strict";var Kn=jn.exports;jn.exports.isNumber=function(Y){return typeof Y=="number"},jn.exports.findMin=function(Y){if(Y.length===0)return 1/0;for(var se=Y[0],me=1;me<Y.length;me++)se=Math.min(se,Y[me]);return se},jn.exports.findMax=function(Y){if(Y.length===0)return-1/0;for(var se=Y[0],me=1;me<Y.length;me++)se=Math.max(se,Y[me]);return se},jn.exports.findMinMulti=function(Y){for(var se=Kn.findMin(Y[0]),me=1;me<Y.length;me++)se=Math.min(se,Kn.findMin(Y[me]));return se},jn.exports.findMaxMulti=function(Y){for(var se=Kn.findMax(Y[0]),me=1;me<Y.length;me++)se=Math.max(se,Kn.findMax(Y[me]));return se},jn.exports.inside=function(Y,se,me){return Y<=me&&me<=se}},53843:function(jn,Kn,Y){"use strict";var se=50,me=2,wt=Math.log(2),_t=jn.exports,ne=Y(73807);function Qe(Xe){return 1-Math.abs(Xe)}jn.exports.getUnifiedMinMax=function(Xe,we){return _t.getUnifiedMinMaxMulti([Xe],we)},jn.exports.getUnifiedMinMaxMulti=function(Xe,we){we=we||{};var D=!1,gt=!1,St=ne.isNumber(we.width)?we.width:me,Fe=ne.isNumber(we.size)?we.size:se,Ne=ne.isNumber(we.min)?we.min:(D=!0,ne.findMinMulti(Xe)),Be=ne.isNumber(we.max)?we.max:(gt=!0,ne.findMaxMulti(Xe)),Re=Be-Ne,rt=Re/(Fe-1);return D&&(Ne=Ne-2*St*rt),gt&&(Be=Be+2*St*rt),{min:Ne,max:Be}},jn.exports.create=function(Xe,we){if(we=we||{},!Xe||Xe.length===0)return[];var D=ne.isNumber(we.size)?we.size:se,gt=ne.isNumber(we.width)?we.width:me,St=_t.getUnifiedMinMax(Xe,{size:D,width:gt,min:we.min,max:we.max}),Fe=St.min,Ne=St.max,Be=Ne-Fe,Re=Be/(D-1);if(Be===0)return[{x:Fe,y:1}];for(var rt=[],Xt=0;Xt<D;Xt++)rt.push({x:Fe+Xt*Re,y:0});var ln=function(Vt){return Math.floor((Vt-Fe)/Re)},rr=j(Qe,gt),Zn=rr[gt],qn=rr[gt-1]-rr[gt-2],cn=0;Xe.forEach(function(Vt){var Kt=ln(Vt);if(!(Kt+gt<0||Kt-gt>=rt.length)){var Hr=Math.max(Kt-gt,0),er=Kt,Oi=Math.min(Kt+gt,rt.length-1),$n=Hr-(Kt-gt),ii=Kt+gt-Oi,Ui=rr[-gt-1+$n]||0,Ha=rr[-gt-1+ii]||0,ao=Zn/(Zn-Ui-Ha);$n>0&&(cn+=ao*($n-1)*qn);var So=Math.max(0,Kt-gt+1);ne.inside(0,rt.length-1,So)&&(rt[So].y+=ao*1*qn),ne.inside(0,rt.length-1,er+1)&&(rt[er+1].y-=ao*2*qn),ne.inside(0,rt.length-1,Oi+1)&&(rt[Oi+1].y+=ao*1*qn)}});var In=cn,ir=0,dr=0;return rt.forEach(function(Vt){ir+=Vt.y,In+=ir,Vt.y=In,dr+=In}),dr>0&&rt.forEach(function(Vt){Vt.y/=dr}),rt};function j(Xe,we){for(var D={},gt=0,St=-we;St<=we;St++)gt+=Xe(St/we),D[St]=gt;return D}jn.exports.getExpectedValueFromPdf=function(Xe){if(!(!Xe||Xe.length===0)){var we=0;return Xe.forEach(function(D){we+=D.x*D.y}),we}},jn.exports.getXWithLeftTailArea=function(Xe,we){if(!(!Xe||Xe.length===0)){for(var D=0,gt=0,St=0;St<Xe.length&&(gt=St,D+=Xe[St].y,!(D>=we));St++);return Xe[gt].x}},jn.exports.getPerplexity=function(Xe){if(!(!Xe||Xe.length===0)){var we=0;return Xe.forEach(function(D){var gt=Math.log(D.y);isFinite(gt)&&(we+=D.y*gt)}),we=-we/wt,Math.pow(2,we)}}},86851:function(jn,Kn,Y){"use strict";var se=Y(89594),me=Array.prototype.concat,wt=Array.prototype.slice,_t=jn.exports=function(Qe){for(var j=[],Xe=0,we=Qe.length;Xe<we;Xe++){var D=Qe[Xe];se(D)?j=me.call(j,wt.call(D)):j.push(D)}return j};_t.wrap=function(ne){return function(){return ne(_t(arguments))}}},89594:function(jn){jn.exports=function(Y){return!Y||typeof Y=="string"?!1:Y instanceof Array||Array.isArray(Y)||Y.length>=0&&(Y.splice instanceof Function||Object.getOwnPropertyDescriptor(Y,Y.length-1)&&Y.constructor.name!=="String")}},11742:function(jn){jn.exports=function(){var Kn=document.getSelection();if(!Kn.rangeCount)return function(){};for(var Y=document.activeElement,se=[],me=0;me<Kn.rangeCount;me++)se.push(Kn.getRangeAt(me));switch(Y.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":Y.blur();break;default:Y=null;break}return Kn.removeAllRanges(),function(){Kn.type==="Caret"&&Kn.removeAllRanges(),Kn.rangeCount||se.forEach(function(wt){Kn.addRange(wt)}),Y&&Y.focus()}}},64599:function(jn,Kn,Y){var se=Y(96263);function me(wt,_t){var ne=typeof Symbol!="undefined"&&wt[Symbol.iterator]||wt["@@iterator"];if(!ne){if(Array.isArray(wt)||(ne=se(wt))||_t&&wt&&typeof wt.length=="number"){ne&&(wt=ne);var Qe=0,j=function(){};return{s:j,n:function(){return Qe>=wt.length?{done:!0}:{done:!1,value:wt[Qe++]}},e:function(St){throw St},f:j}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Xe=!0,we=!1,D;return{s:function(){ne=ne.call(wt)},n:function(){var St=ne.next();return Xe=St.done,St},e:function(St){we=!0,D=St},f:function(){try{!Xe&&ne.return!=null&&ne.return()}finally{if(we)throw D}}}}jn.exports=me,jn.exports.__esModule=!0,jn.exports.default=jn.exports}}]);
|
|
}());
|