@antv/g2 5.2.9 → 5.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,4 +56,4 @@ function sA(t,e){var n=e.cx,r=void 0===n?0:n,i=e.cy,a=void 0===i?0:i,o=e.r;t.arc
56
56
  * @date 11/27/2024, 2:19:51 PM
57
57
  * @author AntVis
58
58
  * @docs https://g.antv.antgroup.com/
59
- */k_.tag="Dragndrop";var w_=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return el(this,e),(t=ul(this,e)).name="dragndrop",t.options=n,t}return hl(e,t),rl(e,[{key:"init",value:function(){this.addRenderingPlugin(new k_(tl({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)}}])}(Bu),M_=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],a=this._events["*"]||[],o=function(r){for(var i=r.length,a=0;a<i;a++)if(r[a]){var o=r[a],s=o.callback;o.once&&(r.splice(a,1),0===r.length&&delete e._events[t],i--,a--),s.apply(e,n)}};o(i),o(a)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),O_=M_;const E_={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"},S_=[["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 A_={}.toString,__=function(t,e){return A_.call(t)==="[object "+e+"]"},T_=function(t){return Array.isArray?Array.isArray(t):__(t,"Array")},P_=function(t){return"object"==typeof t&&null!==t},C_=function(t){if(!P_(t)||!__(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function L_(t,e,n,r){for(var i in n=n||0,r=r||5,e)if(e.hasOwnProperty(i)){var a=e[i];null!==a&&C_(a)?(C_(t[i])||(t[i]={}),n<r?L_(t[i],a,n+1,r):t[i]=e[i]):T_(a)?(t[i]=[],t[i]=t[i].concat(a)):void 0!==a&&(t[i]=a)}}var N_=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)L_(t,e[r]);return t},j_=function(t){return t};function R_(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce((function(t,e){return function(n){return e(t(n))}}),t):j_}function I_(t){return t instanceof Float32Array||t instanceof Array}var D_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},B_=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function F_(t,e,n){for(;t<e;)t+=2*Math.PI;for(;t>n;)t-=2*Math.PI;return t}var z_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},G_=function(t,e,n,r,i){var a,o,s=z_(t,2),c=s[0],l=s[1],u=lt();return o=[c,l],(a=u)[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=o[0],a[7]=o[1],a[8]=1,a},W_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},$_=function(t,e,n,r,i){var a=new oo({range:[e,e+r]}),o=new oo({range:[n,n+i]});return{transform:function(t){var e=W_(t,2),n=e[0],r=e[1];return[a.map(n),o.map(r)]},untransform:function(t){var e=W_(t,2),n=e[0],r=e[1];return[a.invert(n),o.invert(r)]}}},Y_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},H_=function(t,e,n,r,i){return(0,Y_(t,1)[0])(e,n,r,i)},V_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},q_=function(t,e,n,r,i){return V_(t,1)[0]},U_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},X_=function(t,e,n,r,i){var a=U_(t,4),o=a[0],s=a[1],c=a[2],l=a[3],u=new oo({range:[c,l]}),f=new oo({range:[o,s]}),h=i/r,d=h>1?1:h,p=h>1?1/h:1;return{transform:function(t){var e=U_(t,2),n=e[0],r=e[1],i=f.map(n),a=u.map(r);return[.5*(a*Math.cos(i)*d)+.5,.5*(a*Math.sin(i)*p)+.5]},untransform:function(t){var e=U_(t,2),n=e[0],r=e[1],i=2*(n-.5)/d,a=2*(r-.5)/p,c=Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),l=F_(Math.atan2(a,i),o,s);return[f.invert(l),u.invert(c)]}}},Z_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},K_=function(t,e,n,r,i){return{transform:function(t){var e=Z_(t,2),n=e[0];return[e[1],n]},untransform:function(t){var e=Z_(t,2),n=e[0];return[e[1],n]}}},Q_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},J_=function(t,e,n,r,i){var a,o,s=Q_(t,2),c=s[0],l=s[1],u=lt();return o=[c,l],(a=u)[0]=o[0],a[1]=0,a[2]=0,a[3]=0,a[4]=o[1],a[5]=0,a[6]=0,a[7]=0,a[8]=1,a},tT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},eT=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},nT=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J_.apply(void 0,eT([[-1,-1]],tT(e),!1))},rT=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J_.apply(void 0,eT([[-1,1]],tT(e),!1))},iT=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J_.apply(void 0,eT([[1,-1]],tT(e),!1))},aT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},oT=function(t,e,n,r,i){var a=aT(t,1)[0];return function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}(lt(),a)},sT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},cT=function(t,e,n,r,i){var a=sT(t,4),o=a[0],s=a[1],c=a[2],l=(a[3]-c)/((s-0)/(2*Math.PI)+1),u=l/(2*Math.PI),f=new oo({range:[c,c+.99*l]}),h=new oo({range:[o,s]}),d=i/r,p=d>1?1:d,g=d>1?1/d:1;return{transform:function(t){var e=sT(t,2),n=e[0],r=e[1],i=h.map(n),a=f.map(r);return[.5*(Math.cos(i)*(u*i+a)*p)+.5,.5*(Math.sin(i)*(u*i+a)*g)+.5]},untransform:function(t){var e=sT(t,2),n=e[0],r=e[1],i=2*(n-.5)/p,a=2*(r-.5)/g,c=Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),d=F_(Math.atan2(a,i)+Math.floor(c/l)*Math.PI*2,o,s),v=c-u*d;return[h.invert(d),f.invert(v)]}}},lT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},uT=function(t,e,n,r,i){var a=lT(t,4),o=a[0],s=a[1],c=a[2],l=a[3],u=new oo({range:[c,l]});return{transform:function(t){for(var e=[],n=t.length,r=new so({domain:new Array(n).fill(0).map((function(t,e){return e})),range:[o,s]}),i=0;i<n;i++){var a=t[i],c=r.map(i),l=u.map(a);e.push(c,l)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(u.invert(r))}return e}}},fT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function hT(t){return 1/Math.tan(t)}var dT=function(t,e,n,r,i){var a=hT(fT(t,1)[0]);return{transform:function(t){var e=fT(t,2),n=e[0],r=e[1];return[n+r*a,r]},untransform:function(t){var e=fT(t,2),n=e[0],r=e[1];return[n-r*a,r]}}},pT=function(t,e,n,r,i){var a=hT(fT(t,1)[0]);return{transform:function(t){var e=fT(t,2),n=e[0];return[n,e[1]+n*a]},untransform:function(t){var e=fT(t,2),n=e[0];return[n,e[1]-n*a]}}},gT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function vT(t,e,n,r,i){var a=t<e,o=(a?e-r:i-e)||i-r,s=a?-1:1;return s*o*(n+1)/(n+o/((t-e)*s))+e}function mT(t,e,n,r,i){var a=t<e,o=(a?e-r:i-e)||i-r;return o/(o*(n+1)/(t-e)-n*(a?-1:1))+e}function yT(t,e,n){return n?new oo({range:[0,1],domain:[0,e]}).map(t):t}var bT=function(t,e,n,r,i){var a=gT(t,3),o=a[0],s=a[1],c=a[2],l=yT(o,r,void 0!==c&&c);return{transform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[vT(n,l,s,0,1),r]},untransform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[mT(n,l,s,0,1),r]}}},xT=function(t,e,n,r,i){var a=gT(t,3),o=a[0],s=a[1],c=a[2],l=yT(o,i,void 0!==c&&c);return{transform:function(t){var e=gT(t,2);return[e[0],vT(e[1],l,s,0,1)]},untransform:function(t){var e=gT(t,2);return[e[0],mT(e[1],l,s,0,1)]}}},kT=function(t,e,n,r,i){var a=gT(t,5),o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],f=void 0!==u&&u,h=yT(o,r,f),d=yT(s,i,f);return{transform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[vT(n,h,c,0,1),vT(r,d,l,0,1)]},untransform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[mT(n,h,c,0,1),mT(r,d,l,0,1)]}}},wT=function(t,e,n,r,i){var a=gT(t,5),o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],f=void 0!==u&&u,h=new oo({range:[0,r]}),d=new oo({range:[0,i]}),p=f?o:h.map(o),g=f?s:d.map(s);return{transform:function(t){var e=gT(t,2),n=e[0],r=e[1],i=h.map(n)-p,a=d.map(r)-g,o=Math.sqrt(i*i+a*a);if(o>c)return[n,r];var s=vT(o,0,l,0,c),u=Math.atan2(a,i),f=p+s*Math.cos(u),v=g+s*Math.sin(u);return[h.invert(f),d.invert(v)]},untransform:function(t){var e=gT(t,2),n=e[0],r=e[1],i=h.map(n)-p,a=d.map(r)-g,o=Math.sqrt(i*i+a*a);if(o>c)return[n,r];var s=mT(o,0,l,0,c),u=Math.atan2(a,i),f=p+s*Math.cos(u),v=g+s*Math.sin(u);return[h.invert(f),d.invert(v)]}}},MT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},OT=function(t,e,n,r,i,a,o){var s=new oo({range:[e,e+i]}),c=new oo({range:[n,n+a]}),l=new oo({range:[r,r+o]});return{transform:function(t){var e=MT(t,3),n=e[0],r=e[1],i=e[2];return[s.map(n),c.map(r),l.map(i)]},untransform:function(t){var e=MT(t,3),n=e[0],r=e[1],i=e[2];return[s.invert(n),c.invert(r),l.invert(i)]}}},ET=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},ST=function(t,e,n,r,i,a,o){var s=ET(t,3),c=s[0],l=s[1],u=s[2];return Et(ft(),[c,l,u])},AT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},_T=function(t,e,n,r,i,a,o){return{transform:function(t){var e=AT(t,3),n=e[0];return[e[1],n,e[2]]},untransform:function(t){var e=AT(t,3),n=e[0];return[e[1],n,e[2]]}}},TT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},PT=function(t,e,n,r,i,a,o){var s=TT(t,3),c=s[0],l=s[1],u=s[2];return St(ft(),[c,l,u])},CT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},LT=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},NT=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jT=function(){function t(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:$_,translate:G_,custom:H_,matrix:q_,polar:X_,transpose:K_,scale:J_,"shear.x":dT,"shear.y":pT,reflect:nT,"reflect.x":rT,"reflect.y":iT,rotate:oT,helix:cT,parallel:uT,fisheye:kT,"fisheye.x":bT,"fisheye.y":xT,"fisheye.circular":wT},this.update(t)}return t.prototype.update=function(t){this.options=N_({},this.options,t),this.recoordinate()},t.prototype.clone=function(){return new t(this.options)},t.prototype.getOptions=function(){return this.options},t.prototype.clear=function(){this.update({transformations:[]})},t.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},t.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},t.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:LT(LT([],CT(n),!1),[LT([],CT(t),!1)],!1)}),this},t.prototype.map=function(t){return this.output(t)},t.prototype.invert=function(t){return this.input(t)},t.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},t.prototype.compose=function(t){var e,n;void 0===t&&(t=!1);var r=t?LT([],CT(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},a=[],o=[],s=function(t,e){return void 0===e&&(e=!0),o.push(e?function(t){return function(e){for(var n=[],r=0;r<e.length-1;r+=2){var i=[e[r],e[r+1]],a=t(i);n.push.apply(n,B_([],D_(a),!1))}return n}}(t):t)};try{for(var c=NT(r),l=c.next();!l.done;l=c.next()){var u=CT(l.value),f=u[0],h=u.slice(1),d=this.transformers[f];if(d){var p=this.options,g=p.x,v=p.y,m=p.width,y=p.height,b=d(LT([],CT(h),!1),g,v,m,y);if(I_(b))a.push(b);else{if(a.length)s(this.createMatrixTransform(a,t)),a.splice(0,a.length);s(i(b)||j_,"parallel"!==f)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}a.length&&s(this.createMatrixTransform(a,t));return R_.apply(void 0,LT([],CT(o),!1))},t.prototype.createMatrixTransform=function(t,e){var n,r,i=lt();return e&&t.reverse(),t.forEach((function(t){return ut(i,i,t)})),e&&function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=u*o-s*l,h=-u*a+s*c,d=l*a-o*c,p=n*f+r*h+i*d;p&&(p=1/p,t[0]=f*p,t[1]=(-u*r+i*l)*p,t[2]=(s*r-i*o)*p,t[3]=h*p,t[4]=(u*n-i*c)*p,t[5]=(-s*n+i*a)*p,t[6]=d*p,t[7]=(-l*n+r*c)*p,t[8]=(o*n-r*a)*p)}(i,(n=i,(r=new ct(9))[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r)),function(t){var e=[t[0],t[1],1];return ce(e,e,i),[e[0],e[1]]}},t}(),RT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},IT=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},DT=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},BT=function(){function t(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:OT,translate3D:ST,scale3D:PT,transpose3D:_T},this.update(t)}return t.prototype.update=function(t){this.options=N_({},this.options,t),this.recoordinate()},t.prototype.clone=function(){return new t(this.options)},t.prototype.getOptions=function(){return this.options},t.prototype.clear=function(){this.update({transformations:[]})},t.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},t.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y,r=t.z;return[(2*e+t.width)/2,(2*n+t.height)/2,(2*r+t.depth)/2]},t.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:IT(IT([],RT(n),!1),[IT([],RT(t),!1)],!1)}),this},t.prototype.map=function(t){return this.output(t)},t.prototype.invert=function(t){return this.input(t)},t.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},t.prototype.compose=function(t){var e,n;void 0===t&&(t=!1);var r=t?IT([],RT(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},a=[],o=[],s=function(t,e){return void 0===e&&(e=!0),o.push(e?function(t){return function(e){for(var n=[],r=0;r<e.length-1;r+=3){var i=[e[r],e[r+1],e[r+2]],a=t(i);n.push.apply(n,B_([],D_(a),!1))}return n}}(t):t)};try{for(var c=DT(r),l=c.next();!l.done;l=c.next()){var u=RT(l.value),f=u[0],h=u.slice(1),d=this.transformers[f];if(d){var p=this.options,g=p.x,v=p.y,m=p.z,y=p.width,b=p.height,x=p.depth,k=d(IT([],RT(h),!1),g,v,m,y,b,x);if(I_(k))a.push(k);else{if(a.length)s(this.createMatrixTransform(a,t)),a.splice(0,a.length);s(i(k)||j_,!0)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}a.length&&s(this.createMatrixTransform(a,t));return R_.apply(void 0,IT([],RT(o),!1))},t.prototype.createMatrixTransform=function(t,e){var n=ft();return e&&t.reverse(),t.forEach((function(t){return Ht(n,n,t)})),e&&yt(n,ht(n)),function(t){var e=[t[0],t[1],t[2],1];return ge(e,e,n),[e[0],e[1],e[2]]}},t}();function FT(t){return(e,...n)=>Z({},t(e,...n),e)}function zT(t){return(e,...n)=>Z({},e,t(e,...n))}function GT(t,e){if(!t)return e;if(Array.isArray(t))return t;if(function(t){return!(t instanceof Date)&&"object"==typeof t}(t)){const{value:n=e}=t,r=Pe(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}return t}const WT=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map((t=>{var{data:e,x:s,y:c,width:l,height:u}=t,f=Pe(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},f),{data:GT(e,o),x:null!=s?s:n,y:null!=c?c:r,width:null!=l?l:i,height:null!=u?u:a})}))};WT.props={};const $T=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map((()=>1)),padding:i=0,data:a}=t,[o,s,c,l]="col"===n?["y","height","width","x"]:["x","width","height","y"],u=r.reduce(((t,e)=>t+e)),f=t[s]-i*(e.length-1),h=r.map((t=>f*(t/u))),d=[];let p=t[o]||0;for(let n=0;n<h.length;n+=1){const r=e[n],{data:u}=r,f=Pe(r,["data"]),g=GT(u,a);d.push(Object.assign({[o]:p,[s]:h[n],[l]:t[l]||0,[c]:t[c],data:g},f)),p+=h[n]+i}return d};$T.props={};const YT=()=>t=>{const{children:e}=t,n=Pe(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:c=[]}=n,l=Pe(n,["data","scale","axis","legend","encode","transform"]),u=e.map((t=>{var{data:e,scale:n={},axis:l={},legend:u={},encode:f={},transform:h=[]}=t,d=Pe(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:GT(e,r),scale:Z({},i,n),encode:Z({},s,f),transform:[...c,...h],axis:!(!l||!a)&&Z({},a,l),legend:!(!u||!o)&&Z({},o,u)},d)}));return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};YT.props={};const HT=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,margin:g,marginLeft:v,marginBottom:m,marginTop:y,marginRight:b,data:x,coordinate:k,theme:w,component:M,interaction:O,x:E,y:S,z:A,key:_,frame:T,labelTransform:P,parentKey:C,clip:L,viewStyle:N,title:j}=e,R=Pe(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:E,y:S,z:A,key:_,width:n,height:r,depth:i,padding:l,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,paddingBottom:c,theme:w,coordinate:k,component:M,interaction:O,frame:T,labelTransform:P,margin:g,marginLeft:v,marginBottom:m,marginTop:y,marginRight:b,parentKey:C,clip:L,style:N},!t&&{title:j}),{marks:[Object.assign(Object.assign(Object.assign({},R),{key:`${_}-0`,data:x}),t&&{title:j})]})]};HT.props={};class VT{constructor(t){this.$value=t}static of(t){return new VT(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}const qT=FT((t=>{const{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:a,y:o}=e,s=(t,e)=>{var a;if(void 0===t||!i)return{};const o=Un(n,(e=>e[t])),s=(null===(a=null==r?void 0:r[e])||void 0===a?void 0:a.domain)||Array.from(o.keys()),c=s.map((t=>o.has(t)?o.get(t).length:1));return{domain:s,flex:c}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"top"}},void 0===a&&{paddingInner:0}),s(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===o?null:{position:"right"}},void 0===o&&{paddingInner:0}),s(o,"y"))}}})),UT=zT((t=>{const{data:e,scale:n,legend:r}=t,i=[t];let a,o,s;for(;i.length;){const t=i.shift(),{children:e,encode:n={},scale:r={},legend:c={}}=t,{color:l}=n,{color:u}=r,{color:f}=c;void 0!==l&&(a=l),void 0!==u&&(o=u),void 0!==f&&(s=f),Array.isArray(e)&&i.push(...e)}const c="string"==typeof a?a:"",[l,u]=(()=>{var t;const r=null===(t=null==n?void 0:n.color)||void 0===t?void 0:t.domain;if(void 0!==r)return[r];if(void 0===a)return[void 0];const i="function"==typeof a?a:t=>t[a],o=e.map(i);return o.some((t=>"number"==typeof t))?[$n(o)]:[Array.from(new Set(o)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=l?l:[]}},scale:{color:Z({},o,{domain:l,type:u})}},void 0===r&&{legend:{color:Z({title:c},s)}})})),XT=FT((()=>({animate:{enterType:"fadeIn"}}))),ZT=zT((()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}}))),KT=zT((()=>({type:"cell"}))),QT=zT((t=>{const{data:e}=t,n={type:"custom",callback:()=>{const{data:e,encode:n}=t,{x:r,y:i}=n,a=r?Array.from(new Set(e.map((t=>t[r])))):[],o=i?Array.from(new Set(e.map((t=>t[i])))):[];return(()=>{if(a.length&&o.length){const t=[];for(const e of a)for(const n of o)t.push({[r]:e,[i]:n});return t}return a.length?a.map((t=>({[r]:t}))):o.length?o.map((t=>({[i]:t}))):void 0})()}};return{data:{type:"inline",value:e,transform:[n]}}})),JT=zT(((t,e=tP,n=nP,r=rP,i={})=>{const{data:a,encode:o,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:h}=t,{value:d}=a,{x:p,y:g}=o,{color:v}=c,{domain:m}=v;return{children:(t,a,o)=>{const{x:c,y:v}=a,{paddingLeft:y,paddingTop:b,marginLeft:x,marginTop:k}=o,{domain:w}=c.getOptions(),{domain:M}=v.getOptions(),O=Ir(t),E=t.map(e),S=t.map((({x:t,y:e})=>[c.invert(t),v.invert(e)])),A=S.map((([t,e])=>n=>{const{[p]:r,[g]:i}=n;return(void 0===p||r===t)&&(void 0===g||i===e)})),_=A.map((t=>d.filter(t))),T=f?fr(_,(t=>t.length)):void 0,P=S.map((([t,e])=>({columnField:p,columnIndex:w.indexOf(t),columnValue:t,columnValuesLength:w.length,rowField:g,rowIndex:M.indexOf(e),rowValue:e,rowValuesLength:M.length}))),C=P.map((t=>Array.isArray(s)?s:[s(t)].flat(1)));return O.flatMap((t=>{const[e,a,o,s]=E[t],c=P[t],f=_[t];return C[t].map((v=>{var w,M,{scale:O,key:E,facet:S=!0,axis:A={},legend:_={}}=v,P=Pe(v,["scale","key","facet","axis","legend"]);const C=(null===(w=null==O?void 0:O.y)||void 0===w?void 0:w.guide)||A.y,L=(null===(M=null==O?void 0:O.x)||void 0===M?void 0:M.guide)||A.x,N={x:{tickCount:p?5:void 0},y:{tickCount:g?5:void 0}},j=S?f:0===f.length?[]:d,R={color:{domain:m}},I={x:iP(L,n)(c,j),y:iP(C,r)(c,j)};return Object.assign(Object.assign({key:`${E}-${t}`,data:j,margin:0,x:e+y+l+x,y:a+b+u+k,parentKey:h,width:o,height:s,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!j.length,dataDomain:T,scale:Z(N,O,R),axis:Z({},A,I),legend:!1},P),i)}))}))}}}));function tP(t){const{points:e}=t;return ks(e)}function eP(t,e){return e.length?Z({title:!1,tick:null,label:null},t):Z({title:!1,tick:null,label:null,grid:null},t)}function nP(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;if(r!==i-1)return eP(t,n);const s=a===o-1&&void 0,c=n.length?void 0:null;return Z({title:s,grid:c},t)}}function rP(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(0!==i)return eP(t,n);const a=0===r&&void 0,o=n.length?void 0:null;return Z({title:a,grid:o},t)}}function iP(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}const aP=()=>t=>[VT.of(t).call(KT).call(UT).call(XT).call(qT).call(ZT).call(QT).call(JT).value()];aP.props={};const oP=FT((t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),sP=zT((t=>{const{data:e,children:n,x:r=0,y:i=0,key:a}=t;return{children:(t,o,s)=>{const{x:c,y:l}=o,{paddingLeft:u,paddingTop:f,marginLeft:h,marginTop:d}=s,{domain:p}=c.getOptions(),{domain:g}=l.getOptions(),v=Ir(t),m=t.map((({points:t})=>ks(t))),y=t.map((({x:t,y:e})=>[c.invert(t),l.invert(e)])),b=y.map((([t,e])=>({columnField:t,columnIndex:p.indexOf(t),columnValue:t,columnValuesLength:p.length,rowField:e,rowIndex:g.indexOf(e),rowValue:e,rowValuesLength:g.length}))),x=b.map((t=>Array.isArray(n)?n:[n(t)].flat(1)));return v.flatMap((t=>{const[n,o,s,c]=m[t],[l,p]=y[t],g=b[t];return x[t].map((v=>{var m,y;const{scale:b,key:x,encode:k,axis:w,interaction:M}=v,O=Pe(v,["scale","key","encode","axis","interaction"]),E=null===(m=null==b?void 0:b.y)||void 0===m?void 0:m.guide,S={x:lP(null===(y=null==b?void 0:b.x)||void 0===y?void 0:y.guide)(g,e),y:uP(E)(g,e)};return Object.assign({data:e,parentKey:a,key:`${x}-${t}`,x:n+u+r+h,y:o+f+i+d,width:s,height:c,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Z({x:{facet:!1},y:{facet:!1}},b),axis:Z({x:{tickCount:5},y:{tickCount:5}},w,S),legend:!1,encode:Z({},k,{x:l,y:p}),interaction:Z({},M,{legendFilter:!1})},O)}))}))}}})),cP=zT((t=>{const{encode:e}=t,n=Pe(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=e,o=Pe(e,["position","x","y"]),s=[];for(const t of[i].flat(1))for(const e of[a].flat(1))s.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[i].flat(1).length&&{x:{paddingInner:0}}),1===[a].flat(1).length&&{y:{paddingInner:0}})})}));function lP(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return eP(t,n)}}function uP(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{columnIndex:r}=e;if(0!==r)return eP(t,n)}}const fP=()=>t=>[VT.of(t).call(KT).call(UT).call(sP).call(cP).call(XT).call(ZT).call(oP).value()],hP=FT((t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),dP=FT((t=>({coordinate:{type:"polar"}}))),pP=t=>{const{encode:e}=t,n=Pe(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function gP(t){return t=>null}function vP(t){const{points:e}=t,[n,r,i,a]=e,o=ms(n,a),s=gs(n,a),c=xs(s,gs(r,i)),l=1/Math.sin(c/2),u=o/(1+l),f=u*Math.sqrt(2),[h,d]=i,p=bs(s)+c/2,g=u*l;return[h+g*Math.sin(p)-f/2,d-g*Math.cos(p)-f/2,f,f]}const mP=()=>t=>[VT.of(t).call(KT).call(pP).call(UT).call(dP).call(QT).call(JT,vP,gP,gP,{frame:!1}).call(XT).call(ZT).call(hP).value()];function yP(t,e,n){const r=[0,n],i=[1-n,1];return"normal"===t?r:"reverse"===t?i:"alternate"===t?e%2==0?r:i:"reverse-alternate"===t?e%2==0?i:r:void 0}const bP=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=t,o=e.length;if(!Array.isArray(e)||0===o)return[];const{key:s}=e[0],c=e.map((t=>Object.assign(Object.assign({},t),{key:s}))).map((t=>function(t,e,n){const r=[t];for(;r.length;){const t=r.pop();t.animate=Z({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});const{children:i}=t;Array.isArray(i)&&r.push(...i)}return t}(t,n,a)));return function*(){let t,e=0;for(;"infinite"===r||e<r;){const[n,r]=yP(i,e,o);for(let e=n;e<r;e+=1){const n=Math.abs(e);t!==n&&(yield c[n]),t=n}e++}}};function xP(t,e){const{__data__:n}=t,{markKey:r,index:i,seriesIndex:a}=n,{markState:o}=e,s=Array.from(o.keys()).find((t=>t.key===r));if(s)return a?a.map((t=>s.data[t])):s.data[i]}function kP(t,e,n,r=t=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);const{target:a}=i;if(!a)return;const{className:o}=a;if("plot"===o)return;const s=Sj(a,(t=>"element"===t.className));const c=function(t){return Sj(t,(t=>"component"===t.className))}(a),l=function(t){return Sj(t,(t=>"label"===t.className))}(a),u=s||c||l;if(!u)return;const{className:f,markType:h}=u,d=Object.assign(Object.assign({},i),{nativeEvent:!0});"element"===f?(d.data={data:xP(u,e)},n.emit(`element:${t}`,d),n.emit(`${h}:${t}`,d)):"label"===f?(d.data={data:u.attributes.datum},n.emit(`label:${t}`,d),n.emit(`${o}:${t}`,d)):(n.emit(`component:${t}`,d),n.emit(`${o}:${t}`,d))}}function wP(){return(t,e,n)=>{const{container:r,view:i}=t,a=kP(E_.CLICK,i,n,(t=>1===t.detail)),o=kP(E_.DBLCLICK,i,n,(t=>2===t.detail)),s=kP(E_.POINTER_TAP,i,n),c=kP(E_.POINTER_DOWN,i,n),l=kP(E_.POINTER_UP,i,n),u=kP(E_.POINTER_OVER,i,n),f=kP(E_.POINTER_OUT,i,n),h=kP(E_.POINTER_MOVE,i,n),d=kP(E_.POINTER_ENTER,i,n),p=kP(E_.POINTER_LEAVE,i,n),g=kP(E_.POINTER_UPOUTSIDE,i,n),v=kP(E_.DRAG_START,i,n),m=kP(E_.DRAG,i,n),y=kP(E_.DRAG_END,i,n),b=kP(E_.DRAG_ENTER,i,n),x=kP(E_.DRAG_LEAVE,i,n),k=kP(E_.DRAG_OVER,i,n),w=kP(E_.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",v),r.addEventListener("drag",m),r.addEventListener("dragend",y),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",k),r.addEventListener("drop",w),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",v),r.removeEventListener("drag",m),r.removeEventListener("dragend",y),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",k),r.removeEventListener("drop",w)}}}function MP(t,e){const n=Object.assign(Object.assign({},{"component.axisRadar":QE,"component.axisLinear":qE,"component.axisArc":UE,"component.legendContinuousBlock":cS,"component.legendContinuousBlockSize":uS,"component.legendContinuousSize":lS,"interaction.event":wP,"composition.mark":HT,"composition.view":YT,"shape.label.label":uM}),e),r=e=>{if("string"!=typeof e)return e;const r=`${t}.${e}`;return n[r]||Or(`Unknown Component: ${r}`)};return[(t,e)=>{const{type:n}=t,i=Pe(t,["type"]);n||Or("Plot type is required!");const a=r(n);return null==a?void 0:a(i,e)},r]}function OP(t){const{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||Or("Cannot find library document")}function EP(t,e){const{coordinate:n={},coordinates:r}=t,i=Pe(t,["coordinate","coordinates"]);if(r)return t;const{type:a,transform:o=[]}=n,s=Pe(n,["type","transform"]);if(!a)return Object.assign(Object.assign({},i),{coordinates:o});const[,c]=MP("coordinate",e),{transform:l=!1}=c(a).props||{};if(l)throw new Error(`Unknown coordinate: ${a}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:a},s),...o]})}function SP(t,e){return t.filter((t=>t.type===e))}function AP(t){return SP(t,"polar").length>0}function _P(t){return SP(t,"transpose").length%2==1}function TP(t){return SP(t,"theta").length>0}function PP(t){return SP(t,"radial").length>0}function CP(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}bP.props={},wP.props={reapplyWhenUpdate:!0};var LP=CP("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),NP=CP("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),jP=CP("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),RP=CP("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),IP=CP("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),DP=CP("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),BP=CP("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),FP=CP("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),zP=CP("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),GP=CP("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),WP=CP("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var $P=t=>()=>t;function YP(t,e){return function(n){return t+n*e}}function HP(t){return 1==(t=+t)?VP:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):$P(isNaN(e)?n:e)}}function VP(t,e){var n=e-t;return n?YP(t,n):$P(isNaN(t)?e:t)}!function t(e){var n=HP(e);function r(t,e){var r=n((t=zl(t)).r,(e=zl(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=VP(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);var qP,UP=(qP=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return function(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}((n-r/e)*e,o,i,a,s)}},function(t){var e,n,r=t.length,i=new Array(r),a=new Array(r),o=new Array(r);for(e=0;e<r;++e)n=zl(t[e]),i[e]=n.r||0,a[e]=n.g||0,o[e]=n.b||0;return i=qP(i),a=qP(a),o=qP(o),n.opacity=1,function(t){return n.r=i(t),n.g=a(t),n.b=o(t),n+""}});function XP(t){return function e(n){function r(e,r){var i=t((e=lu(e)).h,(r=lu(r)).h),a=VP(e.s,r.s),o=VP(e.l,r.l),s=VP(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}XP((function(t,e){var n=e-t;return n?YP(t,n>180||n<-180?n-360*Math.round(n/360):n):$P(isNaN(t)?e:t)}));var ZP=XP(VP),KP=t=>UP(t[t.length-1]),QP=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(CP),JP=KP(QP),tC=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(CP),eC=KP(tC),nC=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(CP),rC=KP(nC),iC=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(CP),aC=KP(iC),oC=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(CP),sC=KP(oC),cC=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(CP),lC=KP(cC),uC=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(CP),fC=KP(uC),hC=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(CP),dC=KP(hC),pC=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(CP),gC=KP(pC),vC=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(CP),mC=KP(vC),yC=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(CP),bC=KP(yC),xC=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(CP),kC=KP(xC),wC=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(CP),MC=KP(wC),OC=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(CP),EC=KP(OC),SC=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(CP),AC=KP(SC),_C=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(CP),TC=KP(_C),PC=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(CP),CC=KP(PC),LC=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(CP),NC=KP(LC),jC=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(CP),RC=KP(jC),IC=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(CP),DC=KP(IC),BC=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(CP),FC=KP(BC),zC=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(CP),GC=KP(zC),WC=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(CP),$C=KP(WC),YC=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(CP),HC=KP(YC),VC=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(CP),qC=KP(VC),UC=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(CP),XC=KP(UC),ZC=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(CP),KC=KP(ZC);var QC=ZP(lu(300,.5,0),lu(-240,.5,1)),JC=ZP(lu(-100,.75,.35),lu(80,1.5,.8)),tL=ZP(lu(260,.75,.35),lu(80,1.5,.8)),eL=lu();var nL=zl(),rL=Math.PI/3,iL=2*Math.PI/3;function aL(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var oL=aL(CP("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),sL=aL(CP("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),cL=aL(CP("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),lL=aL(CP("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),uL=Object.freeze({__proto__:null,schemeCategory10:LP,schemeAccent:NP,schemeDark2:jP,schemeObservable10:RP,schemePaired:IP,schemePastel1:DP,schemePastel2:BP,schemeSet1:FP,schemeSet2:zP,schemeSet3:GP,schemeTableau10:WP,interpolateBrBG:JP,schemeBrBG:QP,interpolatePRGn:eC,schemePRGn:tC,interpolatePiYG:rC,schemePiYG:nC,interpolatePuOr:aC,schemePuOr:iC,interpolateRdBu:sC,schemeRdBu:oC,interpolateRdGy:lC,schemeRdGy:cC,interpolateRdYlBu:fC,schemeRdYlBu:uC,interpolateRdYlGn:dC,schemeRdYlGn:hC,interpolateSpectral:gC,schemeSpectral:pC,interpolateBuGn:mC,schemeBuGn:vC,interpolateBuPu:bC,schemeBuPu:yC,interpolateGnBu:kC,schemeGnBu:xC,interpolateOrRd:MC,schemeOrRd:wC,interpolatePuBuGn:EC,schemePuBuGn:OC,interpolatePuBu:AC,schemePuBu:SC,interpolatePuRd:TC,schemePuRd:_C,interpolateRdPu:CC,schemeRdPu:PC,interpolateYlGnBu:NC,schemeYlGnBu:LC,interpolateYlGn:RC,schemeYlGn:jC,interpolateYlOrBr:DC,schemeYlOrBr:IC,interpolateYlOrRd:FC,schemeYlOrRd:BC,interpolateBlues:GC,schemeBlues:zC,interpolateGreens:$C,schemeGreens:WC,interpolateGreys:HC,schemeGreys:YC,interpolatePurples:qC,schemePurples:VC,interpolateReds:XC,schemeReds:UC,interpolateOranges:KC,schemeOranges:ZC,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:QC,interpolateRainbow:function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return eL.h=360*t-100,eL.s=1.5-1.5*e,eL.l=.8-.9*e,eL+""},interpolateWarm:JC,interpolateCool:tL,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,nL.r=255*(e=Math.sin(t))*e,nL.g=255*(e=Math.sin(t+rL))*e,nL.b=255*(e=Math.sin(t+iL))*e,nL+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:oL,interpolateMagma:sL,interpolateInferno:cL,interpolatePlasma:lL});function fL(t,e,n,r,i,a){const{guide:o={}}=n,s=function(t,e,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;if(void 0!==r)return r;if(function(t){return AL(t,Lr)}(e))return"identity";if("string"==typeof a)return"linear";if((i||a||[]).length>2)return wL(t,s);if(void 0!==i)return EL([i])?wL(t,s):SL(e)?"time":ML(t,a,o);return EL(e)?wL(t,s):SL(e)?"time":ML(t,a,o)}(t,e,n);if("string"!=typeof s)return n;const c=function(t,e,n,r){const{domain:i}=r;if(void 0!==i)return i;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return OL(function(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const e of t)for(const t of e)Sr(t)&&(r=Math.min(r,+t),i=Math.max(i,+t));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}(n,r),r);case"band":case"ordinal":case"point":return function(t){return Array.from(new Set(t.flat()))}(n);case"quantile":return function(t){return t.flat().sort()}(n);case"sequential":return OL(function(t){let e=1/0,n=-1/0;for(const r of t)for(const t of r)Sr(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(n),r);default:return[]}}(s,0,e,n),l=function(t,e,n){const{ratio:r}=n;if(null==r)return e;if(yL({type:t}))return function(t,e,n){const r=t.map(Number),i=new oo({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return"time"===n?t.map((t=>new Date(i.map(t)))):t.map((t=>i.map(t)))}(e,r,t);return bL({type:t})?function(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}(e,r):e}(s,c,n);return Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t,e){const{interpolate:n=Ta,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}(0,r);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});const i=function(t,e,n){return"enterDelay"===e||"enterDuration"===e||"size"===e?0:"band"===t?TP(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:a=i,paddingOuter:o=i}=r;return Object.assign(Object.assign({},r),{paddingInner:a,paddingOuter:o,padding:i,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=G(e),i=uL[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(r);default:return r}}(s,t,0,n,r)),{domain:l,range:xL(s,t,e,n,l,i,a),expectedDomain:c,guide:o,name:t,type:s})}function hL(t,e){const n={};for(const r of t){const{values:t,name:i}=r,a=e[i];for(const e of t){const{name:t,value:r}=e;n[t]=r.map((t=>a.map(t)))}}return n}function dL(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:e}=r.getOptions();if(e in t){const i=n.filter((t=>t.startsWith(e))).map((t=>+(t.replace(e,"")||0))),a=fr(i)+1,o=`${e}${a}`;t[o]=r,r.getOptions().key=o}else t[e]=r}return t}function pL(t,e){const[n]=MP("scale",e),{relations:r}=t,[i]=function(t){if(!t||!Array.isArray(t))return[kr,kr];let e,n;return[r=>{var i;e=r.map.bind(r),n=null===(i=r.invert)||void 0===i?void 0:i.bind(r);const a=t.filter((([t])=>"function"==typeof t)),o=t.filter((([t])=>"function"!=typeof t)),s=new Map(o);if(r.map=t=>{for(const[e,n]of a)if(e(t))return n;return s.has(t)?s.get(t):e(t)},!n)return r;const c=new Map(o.map((([t,e])=>[e,t]))),l=new Map(a.map((([t,e])=>[e,t])));return r.invert=t=>l.has(t)?t:c.has(t)?c.get(t):n(t),r},t=>(null!==e&&(t.map=e),null!==n&&(t.invert=n),t)]}(r);return i(n(t))}function gL(t){const e=t.flatMap((t=>Array.from(t.values()))).flatMap((t=>t.channels.map((t=>t.scale))));mL(e,"x"),mL(e,"y")}function vL(t){const{channels:e=[],type:n,scale:r={}}=t,i=["shape","color","opacity","size"];return 0!==e.length?e:"axisX"===n?["x"]:"axisY"===n?["y"]:"legends"===n?Object.keys(r).filter((t=>i.includes(t))):[]}function mL(t,e){const n=t.filter((({name:t,facet:n=!0})=>n&&t===e)),r=n.flatMap((t=>t.domain)),i=n.every(yL)?$n(r):n.every(bL)?Array.from(new Set(r)):null;if(null!==i)for(const t of n)t.domain=i}function yL(t){const{type:e}=t;if("string"!=typeof e)return!1;return["linear","log","pow","time"].includes(e)}function bL(t){const{type:e}=t;if("string"!=typeof e)return!1;return["band","point","ordinal"].includes(e)}function xL(t,e,n,r,i,a,o){const{range:s}=r;if("string"==typeof s)return function(t){return t.split("-")}(s);if(void 0!==s)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const t=kL(n,r,i,a,o),[s,u]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[Dr(e),Br(e)]:"opacity"===t?[0,1]:"size"===t?[1,10]:[0,1]}(e,t);return[null!=c?c:s,null!=l?l:u]}case"band":case"point":return[null!=c?c:"size"===e?5:0,null!=l?l:"size"===e?10:1];case"ordinal":return kL(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function kL(t,e,n,r,i){const[a]=MP("palette",i),{category10:o,category20:s}=r,c=function(t){return Array.from(new Set(t))}(n).length<=o.length?o:s,{palette:l=c,offset:u}=e;if(Array.isArray(l))return l;try{return a({type:l})}catch(t){const e=function(t,e,n=t=>t){if(!t)return null;const r=G(t),i=uL[`scheme${r}`],a=uL[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const t=i[e.length];if(t)return t}return e.map(((t,r)=>a(n(r/e.length))))}(l,n,u);if(e)return e;throw new Error(`Unknown Component: ${l} `)}}function wL(t,e){return e||(function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal")}function ML(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function OL(t,e){if(0===t.length)return t;const{domainMin:n,domainMax:r}=e,[i,a]=t;return[null!=n?n:i,null!=r?r:a]}function EL(t){return AL(t,(t=>{const e=typeof t;return"string"===e||"boolean"===e}))}function SL(t){return AL(t,(t=>t instanceof Date))}function AL(t,e){for(const n of t)if(n.some(e))return!0;return!1}const _L={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},TL={threshold:"threshold",quantize:"quantize",quantile:"quantile"},PL={ordinal:"ordinal",band:"band",point:"point"},CL={constant:"constant"};function LL(t,e,n){const{coordinates:r=[],title:i}=e,[,a]=MP("component",n),o=t.filter((({guide:t})=>null!==t)),s=[],c=function(t,e,n){const[,r]=MP("component",n),{coordinates:i}=t;function a(t,e,n,a){const o=function(t,e,n=[]){return"x"===t?_P(n)?`${e}Y`:`${e}X`:"y"===t?_P(n)?`${e}X`:`${e}Y`:null}(e,t,i);if(!a||!o)return;const{props:s}=r(o),{defaultPosition:c,defaultSize:l,defaultOrder:u,defaultCrossPadding:[f]}=s;return Object.assign(Object.assign({position:c,defaultSize:l,order:u,type:o,crossPadding:f},a),{scales:[n]})}return e.filter((t=>t.slider||t.scrollbar)).flatMap((t=>{const{slider:e,scrollbar:n,name:r}=t;return[a("slider",r,t,e),a("scrollbar",r,t,n)]})).filter((t=>!!t))}(e,t,n);if(s.push(...c),i){const{props:t}=a("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:o,defaultCrossPadding:c}=t,l="string"==typeof i?{title:i}:i;s.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:c[0],defaultSize:o},l))}const l=function(t,e){const n=t.filter((t=>function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;const{type:e,domain:n,range:r,interpolator:i}=t,a=n&&n.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&a&&o)||!(!["sequential"].includes(e)||!a||!o&&!i)||!(!["constant","identity"].includes(e)||!o)}(t)));return[...RL(n),...DL(n,e)]}(o,r);return l.forEach((([t,e])=>{const{props:n}=a(t),{defaultPosition:i,defaultPlane:c="xy",defaultOrientation:l,defaultSize:u,defaultOrder:f,defaultLength:h,defaultPadding:d=[0,0],defaultCrossPadding:p=[0,0]}=n,g=Z({},...e),{guide:v,field:m}=g,y=Array.isArray(v)?v:[v];for(const n of y){const[a,g]=zL(t,i,l,n,e,o,r);if(!a&&!g)continue;const v="left"===a||"right"===a,y=v?d[1]:d[0],b=v?p[1]:p[0],{size:x,order:k=f,length:w=h,padding:M=y,crossPadding:O=b}=n;s.push(Object.assign(Object.assign({title:m},n),{defaultSize:u,length:w,position:a,plane:c,orientation:g,padding:M,order:k,crossPadding:O,size:x,type:t,scales:e}))}})),s}function NL(t,e,n,r,i){const[a]=MP("component",r),{scaleInstances:o,scale:s,bbox:c}=t,l={bbox:c,library:r};return a(Pe(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:i,scales:o,theme:n,value:l,scale:s})}function jL(t,e){const n=["left","right","bottom","top"],r=Xn(t,(({type:t,position:e,group:r})=>n.includes(e)?void 0===r?t.startsWith("legend")?`legend-${e}`:Symbol("independent"):"independent"===r?Symbol("independent"):r:Symbol("independent")));return r.flatMap((([,t])=>{if(1===t.length)return t[0];if(void 0!==e){const n=t.filter((t=>void 0!==t.length)).map((t=>t.length)),r=xr(n);if(r>e)return t.forEach((t=>t.group=Symbol("independent"))),t;const i=(e-r)/(t.length-n.length);t.forEach((t=>{void 0===t.length&&(t.length=i)}))}const n=fr(t,(t=>t.size)),r=fr(t,(t=>t.order)),i=fr(t,(t=>t.crossPadding));return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}}))}function RL(t,e){const n=["shape","size","color","opacity"],r=t.filter((({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!((t,e)=>"constant"===t&&"size"===e)(t,e))),i=r.filter((({type:t})=>"constant"===t)),a=Xn(r.filter((({type:t})=>"constant"!==t)),(t=>t.field?t.field:Symbol("independent"))).map((([t,e])=>[t,[...e,...i]])).filter((([,t])=>t.some((t=>"constant"!==t.type)))),o=new Map(a);if(0===o.size)return[];const s=t=>t.sort((([t],[e])=>t.localeCompare(e))),c=Array.from(o).map((([,t])=>{const e=function(t){if(1===t.length)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...zr(t,n));return e}(t).sort(((t,e)=>e.length-t.length)),n=e.map((t=>({combination:t,option:t.map((t=>[t.name,IL(t)]))})));for(const{option:t,combination:e}of n)if(!t.every((t=>"constant"===t[1]))&&t.every((t=>"discrete"===t[1]||"constant"===t[1])))return["legendCategory",e];for(const[t,e]of S_)for(const{option:r,combination:i}of n)if(e.some((t=>J(s(t),s(r)))))return[t,i];return null})).filter(Sr);return c}function IL(t){const{type:e}=t;return"string"!=typeof e?null:e in _L?"continuous":e in PL?"discrete":e in TL?"distribution":e in CL?"constant":null}function DL(t,e){return t.map((t=>{const{name:n}=t;if(function(t){return SP(t,"helix").length>0}(e)||TP(e))return null;if(_P(e)&&(AP(e)||PP(e)))return null;if(n.startsWith("x"))return AP(e)?["axisArc",[t]]:PP(e)?["axisLinear",[t]]:[_P(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return AP(e)?["axisLinear",[t]]:PP(e)?["axisArc",[t]]:[_P(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if(function(t){return SP(t,"radar").length>0}(e))return["axisRadar",[t]];if(!AP(e))return["axisY",[t]]}return null})).filter(Sr)}function BL(t){const e=SP(t,"polar");if(e.length){const t=e[e.length-1],{startAngle:r,endAngle:i}=n(t);return[r,i]}const r=SP(t,"radial");if(r.length){const t=r[r.length-1],{startAngle:e,endAngle:n}=o(t);return[e,n]}return[-Math.PI/2,Math.PI/2*3]}function FL(t,e,n,r,i){const{name:a}=n[0];if("axisRadar"===t){const t=r.filter((t=>t.name.startsWith("position"))),e=function(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}(a);if(a===t.slice(-1)[0].name||null===e)return[null,null];const[n,o]=BL(i);return["center",(o-n)/(t.length-1)*e+n]}if("axisY"===t&&function(t){return SP(t,"parallel").length>0}(i))return _P(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){const[t]=BL(i);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:AP(i)||PP(i)?["center",null]:"axisX"===t&&function(t){return SP(t,"reflect").length>0}(i)||"axisX"===t&&function(t){return SP(t,"reflectY").length>0}(i)?["top",null]:e}function zL(t,e,n,r,i,a,o){const[s]=BL(o),c=[r.position||e,null!=s?s:n];return"string"==typeof t&&t.startsWith("axis")?FL(t,c,i,a,o):"string"==typeof t&&t.startsWith("legend")&&AP(o)&&"center"===r.position?["center","vertical"]:c}function GL(t,e,n,r,i,a){const{type:o}=t;if(!["left","right","bottom","top"].includes(r))return;if("string"!=typeof o)return;const s=o;return(s.startsWith("axis")?VL:s.startsWith("group")?WL:s.startsWith("legendContinuous")?qL:"legendCategory"===s?UL:s.startsWith("slider")?HL:"title"===s?YL:s.startsWith("scrollbar")?$L:()=>{})(t,e,n,r,i,a)}function WL(t,e,n,r,i,a){const{children:o}=t,s=fr(o,(t=>t.crossPadding));o.forEach((t=>t.crossPadding=s)),o.forEach((t=>GL(t,e,n,r,i,a)));const c=fr(o,(t=>t.size));t.size=c,o.forEach((t=>t.size=c))}function $L(t,e,n,r,i,a){const{trackSize:o=6}=Z({},i.scrollbar,t);t.size=o}function YL(t,e,n,r,i,a){const o=Z({},i.title,t),{title:s,subtitle:c,spacing:l=0}=o,u=Pe(o,["title","subtitle","spacing"]);if(s){const e=tN(s,_r(u,"title"));t.size=e.height}if(c){const e=tN(c,_r(u,"subtitle"));t.size+=l+e.height}}function HL(t,e,n,r,i,a){const{trackSize:o,handleIconSize:s}=(()=>{const{slider:e}=i;return Z({},e,t)})(),c=Math.max(o,2.4*s);t.size=c}function VL(t,e,n,r,i,a){var o;t.transform=t.transform||[{type:"hide"}];const s="left"===r||"right"===r,c=QL(t,r,i),{tickLength:l=0,labelSpacing:u=0,titleSpacing:f=0,labelAutoRotate:h}=c,d=Pe(c,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),p=XL(t,a),g=ZL(d,p),v=l+u;if(g&&g.length){const r=fr(g,(t=>t.width)),i=fr(g,(t=>t.height));if(s)t.size=r+v;else{const{tickFilter:a,labelTransform:s}=t;!function(t,e,n,r,i){const a=xr(e,(t=>t.width));if(a>n)return!0;const o=t.clone();o.update({range:[0,n]});const s=JL(t,i),c=s.map((t=>o.map(t)+function(t,e){if(!t.getBandWidth)return 0;const n=t.getBandWidth(e)/2;return n}(o,t))),l=s.map(((t,e)=>e)),u=-r[0],f=n+r[1],h=(t,e)=>{const{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<l.length;t++){const n=c[t],[r,i]=h(n,e[t]);if(r<u||i>f)return!0;const a=c[t+1];if(a){const[n]=h(a,e[t+1]);if(i>n)return!0}}return!1}(p,g,e,n,a)||s||!1===h||null===h?(t.labelTransform=null!==(o=t.labelTransform)&&void 0!==o?o:"rotate(0)",t.size=i+v):(t.labelTransform="rotate(90)",t.size=r+v)}}else t.size=l;const m=KL(d);m&&(t.size+=s?f+m.width:f+m.height)}function qL(t,e,n,r,i,a){const o=(()=>{const{legendContinuous:e}=i;return Z({},e,t)})(),{labelSpacing:s=0,titleSpacing:c=0}=o,l=Pe(o,["labelSpacing","titleSpacing"]),u="left"===r||"right"===r,f=_r(l,"ribbon"),{size:h}=f,d=_r(l,"handleIcon"),{size:p}=d,g=Math.max(h,2.4*p);t.size=g;const v=ZL(l,XL(t,a));if(v){const e=u?"width":"height",n=fr(v,(t=>t[e]));t.size+=n+s}const m=KL(l);m&&(u?t.size=Math.max(t.size,m.width):t.size+=c+m.height)}function UL(t,e,n,r,i,a){const o=(()=>{const{legendCategory:e}=i,{title:n}=t,[r,a]=Array.isArray(n)?[n,void 0]:[void 0,n];return Z({title:r},e,Object.assign(Object.assign({},t),{title:a}))})(),{itemSpacing:s,itemMarkerSize:c,titleSpacing:l,rowPadding:u,colPadding:f,maxCols:h=1/0,maxRows:d=1/0}=o,p=Pe(o,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:v}=t,m=t=>Math.min(t,d),y=t=>Math.min(t,h),b="left"===r||"right"===r,x=void 0===v?e+(b?0:n[0]+n[1]):v,k=KL(p),w=ZL(p,XL(t,a),"itemLabel"),M=Math.max(w[0].height,c)+u,O=(t,e=0)=>c+t+s[0]+e;b?(()=>{let e=-1/0,n=0,r=1,i=0,a=-1/0,o=-1/0;const s=k?k.height:0,c=x-s;for(const{width:t}of w){const s=O(t,f);e=Math.max(e,s),n+M>c?(r++,a=Math.max(a,i),o=Math.max(o,n),i=1,n=M):(n+=M,i++)}r<=1&&(a=i,o=n),t.size=e*y(r),t.length=o+s,Z(t,{cols:y(r),gridRow:a})})():"number"==typeof g?(()=>{const e=Math.ceil(w.length/g),n=fr(w,(t=>O(t.width)))*g;t.size=M*m(e)-u,t.length=Math.min(n,x)})():(()=>{let e=1,n=0,r=-1/0;for(const{width:t}of w){const i=O(t,f);n+i>x?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=M*m(e)-u,t.length=r})(),k&&(b?t.size=Math.max(t.size,k.width):t.size+=l+k.height)}function XL(t,e){const[n]=MP("scale",e),{scales:r,tickCount:i,tickMethod:a}=t,o=r.find((t=>"constant"!==t.type&&"identity"!==t.type));return void 0!==i&&(o.tickCount=i),void 0!==a&&(o.tickMethod=a),n(o)}function ZL(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=t,o=Pe(t,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=function(t,e,n){const r=JL(t,n),i=r.map((t=>"number"==typeof t?mm(t):t)),a=e?"string"==typeof e?AE(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return i.map(a)}(e,r,i),c=_r(o,n),l=s.map(((t,e)=>Object.fromEntries(Object.entries(c).map((([n,r])=>[n,"function"==typeof r?r(t,e):r]))))),u=s.map(((t,e)=>tN(t,l[e]))),f=l.some((t=>t.transform));if(!f){const e=s.map(((t,e)=>e));t.indexBBox=new Map(e.map((t=>[t,[s[t],u[t]]])))}return u}function KL(t){const{title:e}=t,n=Pe(t,["title"]);if((t=>!1===t||null===t)(e)||void 0===e)return null;const r=_r(n,"title"),{direction:i,transform:a}=r,o=Array.isArray(e)?e.join(","):e;if("string"!=typeof o)return null;return tN(o,Object.assign(Object.assign({},r),{transform:a||("vertical"===i?"rotate(-90)":"")}))}function QL(t,e,n){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${Mr(e)}`]:s}=n;return Z({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function JL(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function tN(t,e){const n=function(t){return t instanceof Rg?t:new tv({style:{text:`${t}`}})}(t),r=Pe(e,["filter"]);n.attr(Object.assign(Object.assign({},r),{visibility:"none"}));return n.getBBox()}function eN(t,e,n,r){var i,a;const{width:o,height:s,depth:c,x:l=0,y:u=0,z:f=0,inset:h=(null!==(i=n.inset)&&void 0!==i?i:0),insetLeft:d=h,insetTop:p=h,insetBottom:g=h,insetRight:v=h,margin:m=(null!==(a=n.margin)&&void 0!==a?a:0),marginLeft:y=m,marginBottom:b=m,marginTop:x=m,marginRight:k=m,padding:w=n.padding,paddingBottom:M=w,paddingLeft:O=w,paddingRight:E=w,paddingTop:S=w}=function(t,e,n,r){const{coordinates:i}=e;if(!AP(i)&&!PP(i))return e;const a=t.filter((t=>"string"==typeof t.type&&t.type.startsWith("axis")));if(0===a.length)return e;const o=a.map((t=>QL(t,"axisArc"===t.type?"arc":"linear",n))),s=fr(o,(t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0})),c=a.flatMap(((t,e)=>ZL(o[e],XL(t,r)))).filter(Sr),l=fr(c,(t=>t.height))+s,u=a.flatMap(((t,e)=>KL(o[e]))).filter((t=>null!==t)),f=0===u.length?0:fr(u,(t=>t.height)),{inset:h=l,insetLeft:d=h,insetBottom:p=h,insetTop:g=h+f,insetRight:v=h}=e;return Object.assign(Object.assign({},e),{insetLeft:d,insetBottom:p,insetTop:g,insetRight:v})}(t,e,n,r),A=(t,n,r,i,a)=>{const{marks:o}=e;if(0===o.length)return[i,a];if(t-i-a-.25*t>0)return[i,a];const s=.75*t;return["auto"===n?s*i/(i+a):i,"auto"===r?s*a/(i+a):a]},_=t=>"auto"===t?20:null!=t?t:20,T=_(S),P=_(M),C=nN(t,s-T-P,[T+x,P+b],["left","right"],e,n,r),{paddingLeft:L,paddingRight:N}=C,j=o-y-k,[R,I]=A(j,O,E,L,N),D=j-R-I,B=nN(t,D,[R+y,I+k],["bottom","top"],e,n,r),{paddingTop:F,paddingBottom:z}=B,G=s-b-x,[W,$]=A(G,M,S,z,F);return{width:o,height:s,depth:c,insetLeft:d,insetTop:p,insetBottom:g,insetRight:v,innerWidth:D,innerHeight:G-W-$,paddingLeft:R,paddingRight:I,paddingTop:$,paddingBottom:W,marginLeft:y,marginBottom:b,marginTop:x,marginRight:k,x:l,y:u,z:f}}function nN(t,e,n,r,i,a,o){const s=Un(t,(t=>t.position)),{padding:c=a.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:h=c}=i,d={paddingBottom:f,paddingLeft:l,paddingTop:h,paddingRight:u};for(const t of r){const r=`padding${Mr(qw(t))}`,i=s.get(t)||[],c=d[r],l=t=>{void 0===t.size&&(t.size=t.defaultSize)},u=t=>{"group"===t.type?(t.children.forEach(l),t.size=fr(t.children,(t=>t.size))):t.size=t.defaultSize},f=r=>{r.size||("auto"!==c?u(r):(GL(r,e,n,t,a,o),l(r)))},h=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},p="bottom"===t||"top"===t,g=dr(i,(t=>t.order)),v=i.filter((t=>t.type.startsWith("axis")&&t.order==g));if(v.length&&(v[0].crossPadding=0),"number"==typeof c)i.forEach(l),i.forEach(h);else if(0===i.length)d[r]=0;else{const t=jL(i,p?e+n[0]+n[1]:e);t.forEach(f);const a=t.reduce(((t,{size:e,crossPadding:n=12})=>t+e+n),0);d[r]=a}}return d}function rN({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:h,insetLeft:d,insetRight:p,insetTop:g}){const v=n+o,m=i+s,y=r+l,b=a+c,x=t-o-l,k=[v+d,m+g,f-d-p,u-g-h,"center",null,null];return{top:[v,0,f,m,"vertical",!0,Cn,o,x],right:[t-y,m,y,u,"horizontal",!1,Cn],bottom:[v,e-b,f,b,"vertical",!1,Cn,o,x],left:[0,m,v,u,"horizontal",!0,Cn],"top-left":[v,0,f,m,"vertical",!0,Cn],"top-right":[v,0,f,m,"vertical",!0,Cn],"bottom-left":[v,e-b,f,b,"vertical",!1,Cn],"bottom-right":[v,e-b,f,b,"vertical",!1,Cn],center:k,inner:k,outer:k}}function iN(t,e,n,r){const[i,a]=Fr(t,(t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))));!function(t,e,n,r){"center"===r?function(t){return Yc(t)&&Gc(t)}(e)?function(t,e,n){const[r,i,a,o]=n;for(const e of t)e.bbox={x:r,y:i,width:a,height:o},e.radar={index:t.indexOf(e),count:t.length}}(t,0,n):Gc(e)?function(t,e,n){const[r,i,a,o]=n;for(const e of t)e.bbox={x:r,y:i,width:a,height:o}}(t,0,n):Yc(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){const[r,i,a]=n,o=new Array(t.length).fill(0),s=e.map(o),c=s.filter(((t,e)=>e%2==1)).map((t=>t+i));for(let e=0;e<t.length;e++){const n=t[e],i=c[e],o=c[e+1]-i;n.bbox={x:r,y:i,width:a,height:o}}}(t,e,n):"vertical"===r&&function(t,e,n){const[r,i,,a]=n,o=new Array(t.length).fill(0),s=e.map(o),c=s.filter(((t,e)=>e%2==0)).map((t=>t+r));for(let e=0;e<t.length;e++){const n=t[e],r=c[e],o=c[e+1]-r;n.bbox={x:r,y:i,width:o,height:a}}}(t,e,n)}(t,e,n,t[0].orientation):"inner"===r?function(t,e,n){const[r,i,,a]=n,[o,s]=e.getCenter(),[c]=qc(e),l=c*(a/2),u=o-l,f=s-l;for(let e=0;e<t.length;e++){t[e].bbox={x:r+u,y:i+f,width:2*l,height:2*l}}}(t,e,n):"outer"===r&&function(t,e,n){const[r,i,a,o]=n;for(const e of t)e.bbox={x:r,y:i,width:a,height:o}}(t,0,n)}(i,e,n,r),function(t,e,n){if(0===t.length)return;const[r,i,a,o]=n,[s]=qc(e),c=o/2*s/Math.sqrt(2),l=r+a/2,u=i+o/2;for(let e=0;e<t.length;e++){t[e].bbox={x:l-c,y:u-c,width:2*c,height:2*c}}}(a,e,n)}function aN(t,e,n){const[r,i,a,o,s,c,l,u,f]=n,[h,d,p,g,v,m,y,b]="vertical"===s?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];t.sort(((t,e)=>null==l?void 0:l(t.order,e.order)));const x=t=>"title"===t||"group"===t||t.startsWith("legend"),k=(t,e,n)=>void 0===n?e:x(t)?n:e,w=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=c?d+m:d;e<t.length;e++){const r=t[e],{crossPadding:i=0,type:a}=r,{size:o}=r;r.bbox={[h]:c?n-o-i:n+i,[p]:w(a,g,u),[v]:o,[y]:k(a,b,f)},n+=(o+i)*(c?-1:1)}const M=t.filter((t=>"group"===t.type));for(const t of M){const{bbox:e,children:n}=t,r=e[y],i=r/n.length,a=n.reduce(((t,e)=>{var n;const r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t}),"flex-start"),o=n.map(((t,e)=>{const{length:r=i,padding:a=0}=t;return r+(e===n.length-1?0:a)})),s=r-xr(o),c="flex-start"===a?0:"center"===a?s/2:s;for(let t=0,r=e[p]+c;t<n.length;t++){const i=n[t],{padding:s=0}=i,c=t===n.length-1?0:s;i.bbox={[v]:e[v],[h]:e[h],[p]:r,[y]:o[t]-c},Z(i,{layout:{justifyContent:a}}),r+=o[t]}}}function oN(t,e,n){const{encode:r={},scale:i={},transform:a=[]}=e,o=Pe(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function sN(t,e,n){return Le(this,void 0,void 0,(function*(){const{library:t}=n,{data:r}=e,[i]=MP("data",t),a=function(t){if(j(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:e="inline"}=t,n=Pe(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}(r),{transform:o=[]}=a,s=[Pe(a,["transform"]),...o].map((t=>i(t,n))),c=yield function(t){return t.reduce(((t,e)=>n=>Le(this,void 0,void 0,(function*(){const r=yield t(n);return e(r)}))),kr)}(s)(r),l=!r||Array.isArray(r)||Array.isArray(c)?c:{value:c};return[Array.isArray(c)?Ir(c):[],Object.assign(Object.assign({},e),{data:l})]}))}function cN(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i={};for(const[t,e]of Object.entries(r))if(Array.isArray(e))for(let n=0;n<e.length;n++){i[`${t}${0===n?"":n}`]=e[n]}else i[t]=e;return[t,Object.assign(Object.assign({},e),{encode:i})]}function lN(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const a=Rr(r,(t=>{if(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;const{type:e}=t;return Sr(e)}(t))return t;const e=function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some((t=>void 0!==t[e]))}(t,e)?"field":"constant"}(i,t);return{type:e,value:t}}));return[t,Object.assign(Object.assign({},e),{encode:a})]}function uN(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=Rr(r,((t,e)=>{const{type:n}=t;return"constant"!==n||function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||"enterDelay"===t||"enterDuration"===t||"updateDelay"===t||"updateDuration"===t||"exitDelay"===t||"exitDuration"===t}(e)?t:Object.assign(Object.assign({},t),{constant:!0})}));return[t,Object.assign(Object.assign({},e),{encode:i})]}function fN(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:a}=n,o=function(t){const[e]=MP("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:yN(n)})}(a),s=Rr(r,(t=>o(i,t)));return[t,Object.assign(Object.assign({},e),{encode:s})]}function hN(t,e,n){const{tooltip:r={}}=e;return Nr(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Lr(r)&&function(t){if(0===Object.keys(t).length)return!0;const{title:e,items:n}=t;return void 0!==e||void 0!==n}(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function dN(t,e,n){const{data:r,encode:i,tooltip:a={}}=e;if(Nr(a))return[t,e];const o=e=>{if(!e)return e;if("string"==typeof e)return t.map((t=>({name:e,value:r[t][e]})));if(Lr(e)){const{field:n,channel:a,color:o,name:s=n,valueFormatter:c=t=>t}=e,l="string"==typeof c?AE(c):c,u=a&&i[a],f=u&&i[a].field,h=s||f||a,d=[];for(const e of t){const t=n?r[e][n]:u?i[a].value[e]:null;d[e]={name:h,color:o,value:l(t)}}return d}if("function"==typeof e){const n=[];for(const a of t){const t=e(r[a],a,r,i);Lr(t)?n[a]=t:n[a]={value:t}}return n}return e},{title:s,items:c=[]}=a,l=Pe(a,["title","items"]),u=Object.assign({title:o(s),items:Array.isArray(c)?c.map(o):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function pN(t,e,n){const{encode:r}=e,i=Pe(e,["encode"]);if(!r)return[t,e];const a=Object.entries(r),o=a.filter((([,t])=>{const{value:e}=t;return Array.isArray(e[0])})).flatMap((([e,n])=>{const r=[[e,new Array(t.length).fill(void 0)]],{value:i}=n,a=Pe(n,["value"]);for(let n=0;n<i.length;n++){const a=i[n];if(Array.isArray(a))for(let i=0;i<a.length;i++){const o=r[i]||[`${e}${i}`,new Array(t).fill(void 0)];o[1][n]=a[i],r[i]=o}}return r.map((([t,e])=>[t,Object.assign({type:"column",value:e},a)]))})),s=Object.fromEntries([...a,...o]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function gN(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{if("boolean"==typeof t)return t?{}:null;const n=t[e];return void 0===n||n?n:null},c="object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return Z(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map((t=>{const e=s(o,t);return[t,Object.assign({guide:s(r,t),slider:s(a,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]})))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function vN(t,e,n){const{animate:r}=e;return r||void 0===r||Z(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function mN(t,e,n){return Le(this,void 0,void 0,(function*(){const[r,i]=yield function(t,e,n){return Le(this,void 0,void 0,(function*(){const{library:r}=n,[i]=MP("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:s=[]}=t,c=[oN,sN,cN,lN,uN,fN,pN,vN,gN,hN,...a.map(i),...s.map(i),...o.map(i),dN];let l=[],u=t;for(const t of c)[l,u]=yield t(l,u,n);return[l,u]}))}(t,e,n),{encode:a,scale:o,data:s,tooltip:c}=i;if(!1===Array.isArray(s))return null;const{channels:l}=e,u=Kn(Object.entries(a).filter((([,t])=>Sr(t))),(t=>t.map((([t,e])=>Object.assign({name:t},e)))),(([t])=>{var e;const n=null===(e=/([^\d]+)\d*$/.exec(t))||void 0===e?void 0:e[1],r=l.find((t=>t.name===n));return(null==r?void 0:r.independent)?t:n})),f=l.filter((t=>{const{name:e,required:n}=t;if(u.find((([t])=>t===e)))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1})).flatMap((t=>{const{name:e,scale:n,scaleKey:r,range:i,quantitative:a,ordinal:s}=t;return u.filter((([t])=>t.startsWith(e))).map((([t,e],c)=>{const l=e.some((t=>t.visual)),u=e.some((t=>t.constant)),f=o[t]||{},{independent:h=!1,key:d=r||t,type:p=(u?"constant":l?"identity":n)}=f,g=Pe(f,["independent","key","type"]),v="constant"===p,m=v?void 0:i;return{name:t,values:e,scaleKey:h||v?Symbol("independent"):d,scale:Object.assign(Object.assign({type:p,range:m},g),{quantitative:a,ordinal:s})}}))}));return[i,Object.assign(Object.assign({},e),{index:r,channels:f,tooltip:c})]}))}function yN(t){const{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}function bN(t,e,n){var r;return Le(this,void 0,void 0,(function*(){const{library:i}=n,[a]=MP("composition",i),[o]=MP("interaction",i),s=new Set(Object.keys(i).map((t=>{var e;return null===(e=/mark\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Sr)),c=new Set(Object.keys(i).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Sr)),l=t=>{const{type:e}=t;if("function"==typeof e){const{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||c.has(e)?"mark":e},u=t=>"mark"===l(t),f=t=>"standardView"===l(t),h=t=>{const{type:e}=t;return"string"==typeof e&&!!c.has(e)},d=t=>{if(f(t))return[t];const e=l(t);return a({type:e,static:h(t)})(t)},p=[],g=new Map,v=new Map,m=[t],y=[];for(;m.length;){const t=m.shift();if(f(t)){const e=v.get(t),[r,a]=e?EN(e,t,i):yield wN(t,n);g.set(r,t),p.push(r);const o=a.flatMap(d).map((t=>EP(t,i)));if(m.push(...o),o.every(f)){const t=yield Promise.all(o.map((t=>MN(t,n))));gL(t);for(let e=0;e<o.length;e++){const n=o[e],r=t[e];v.set(n,r)}}}else{const e=d(u(t)?t:yield zN(t,n));Array.isArray(e)?m.push(...e):"function"==typeof e&&y.push(e())}}n.emitter.emit(E_.BEFORE_PAINT);const x=new Map,k=new Map,w=[];e.selectAll(YN(nA)).data(p,(t=>t.key)).join((t=>t.append("g").attr("className",nA).attr("id",(t=>t.key)).call(xN).each((function(t,e,r){SN(t,pm(r),w,n),x.set(t,r)}))),(t=>t.call(xN).each((function(t,e,r){SN(t,pm(r),w,n),k.set(t,r)}))),(t=>t.each((function(t,e,n){const r=n.nameInteraction.values();for(const t of r)t.destroy()})).remove()));const M=(t,e,r)=>Array.from(t.entries()).map((([i,a])=>{const o=r||new Map,s=g.get(i),c=function(t,e,n){const{library:r}=n,i=function(t){const[,e]=MP("interaction",t);return t=>{const[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(r),a=t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate,o=FN(e),s=o.map(i).filter(a).map((t=>t[0]));return(e,r,i)=>Le(this,void 0,void 0,(function*(){const a=[],[o,c]=yield wN(e,n);SN(o,t,a,n);for(const i of s.filter((t=>t!==r)))kN(i,t,e,o,n);for(const e of c)bN(e,t,n);return i(),{options:e,view:o}}))}(pm(a),s,n);return{view:i,container:a,options:s,setState:(t,e=t=>t)=>o.set(t,e),update:(n,r)=>Le(this,void 0,void 0,(function*(){const i=wr(Array.from(o.values()))(s);return yield c(i,n,(()=>{b(r)&&e(t,r,o)}))}))}})),O=(t=k,e,r)=>{var i;const a=M(t,O,r);for(const t of a){const{options:r,container:s}=t,c=s.nameInteraction;let l=FN(r);e&&(l=l.filter((t=>e.includes(t[0]))));for(const e of l){const[r,s]=e,l=c.get(r);if(l&&(null===(i=l.destroy)||void 0===i||i.call(l)),s){const e=ON(t.view,r,s,o)(t,a,n.emitter);c.set(r,{destroy:e})}}}},E=M(x,O);for(const t of E){const{options:e}=t,r=new Map;t.container.nameInteraction=r;for(const i of FN(e)){const[e,a]=i;if(a){const i=ON(t.view,e,a,o)(t,E,n.emitter);r.set(e,{destroy:i})}}}O();const{width:S,height:A}=t,_=[];for(const t of y){const r=new Promise((r=>Le(this,void 0,void 0,(function*(){for(const r of t){const t=Object.assign({width:S,height:A},r);yield bN(t,e,n)}r()}))));_.push(r)}n.views=p,null===(r=n.animations)||void 0===r||r.forEach((t=>null==t?void 0:t.cancel())),n.animations=w,n.emitter.emit(E_.AFTER_PAINT);const T=w.filter(Sr).map(RN).map((t=>t.finished));return Promise.all([...T,..._])}))}function xN(t){t.style("transform",(t=>`translate(${t.layout.x}, ${t.layout.y})`))}function kN(t,e,n,r,i){var a;const{library:o}=i,[s]=MP("interaction",o),c=e.node().nameInteraction,l=FN(n).find((([e])=>e===t)),u=c.get(t);if(!u)return;if(null===(a=u.destroy)||void 0===a||a.call(u),!l[1])return;const f=ON(r,t,l[1],s),h={options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},d=f(h,[],i.emitter);c.set(t,{destroy:d})}function wN(t,e){return Le(this,void 0,void 0,(function*(){const{library:n}=e,r=yield function(t,e){return Le(this,void 0,void 0,(function*(){const{library:n}=e,[r,i]=MP("mark",n),a=new Set(Object.keys(n).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Sr)),{marks:o}=t,s=[],c=[],l=[...o],{width:u,height:f}=function(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:h=c,inset:d=0,insetLeft:p=d,insetRight:g=d,insetTop:v=d,insetBottom:m=d}=t,y=t=>"auto"===t?20:t;return{width:n-y(i)-y(a)-l-u-p-g,height:e-y(o)-y(s)-f-h-v-m}}(t),h={options:t,width:u,height:f};for(;l.length;){const[t]=l.splice(0,1),n=yield zN(t,e),{type:o=Or("G2Mark type is required."),key:u}=n;if(a.has(o))c.push(n);else{const{props:t={}}=i(o),{composite:e=!0}=t;if(e){const{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),i=yield r(e,h),a=Array.isArray(i)?i:[i];l.unshift(...a.map(((t,e)=>Object.assign(Object.assign({},t),{key:`${u}-${e}`}))))}else s.push(n)}}return Object.assign(Object.assign({},t),{marks:s,components:c})}))}(t,e),i=function(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,a=Pe(t,["coordinate","interaction","style","marks"]),o=i.map((t=>t.coordinate||{})),s=i.map((t=>t.interaction||{})),c=i.map((t=>t.viewStyle||{})),l=[...o,e].reduceRight(((t,e)=>Z(t,e)),{}),u=[n,...s].reduce(((t,e)=>Z(t,e)),{}),f=[...c,r].reduce(((t,e)=>Z(t,e)),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:l,interaction:u,style:f})}(r);t.interaction=i.interaction,t.coordinate=i.coordinate,t.marks=[...i.marks,...i.components];const a=EP(i,n);return EN(yield MN(a,e),a,n)}))}function MN(t,e){return Le(this,void 0,void 0,(function*(){const{library:n}=e,[r]=MP("theme",n),[,i]=MP("mark",n),{theme:a,marks:o,coordinates:s=[]}=t,c=r(BN(a)),l=new Map;for(const t of o){const{type:n}=t,{props:r={}}=i(n),a=yield mN(t,r,e);if(a){const[t,e]=a;l.set(t,e)}}const u=Un(Array.from(l.values()).flatMap((t=>t.channels)),(({scaleKey:t})=>t));for(const t of u.values()){const e=t.reduce(((t,{scale:e})=>Z(t,e)),{}),{scaleKey:r}=t[0],{values:i}=t[0],a=Array.from(new Set(i.map((t=>t.field)).filter(Sr))),o=Z({guide:{title:0===a.length?void 0:a},field:a[0]},e),{name:l}=t[0],u=t.flatMap((({values:t})=>t.map((t=>t.value)))),f=Object.assign(Object.assign({},fL(l,u,o,s,c,n)),{uid:Symbol("scale"),key:r});t.forEach((t=>t.scale=f))}return l}))}function ON(t,e,n,r){const i=t.theme,a="string"==typeof e&&i[e]||{};return r(Z(a,Object.assign({type:e},n)))}function EN(t,e,n){var r;const[i]=MP("mark",n),[a]=MP("theme",n),[o]=MP("labelTransform",n),{key:s,frame:c=!1,theme:l,clip:u,style:f={},labelTransform:h=[]}=e,d=a(BN(l)),p=Array.from(t.values()),g=function(t,e){var n;const{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(t.flatMap((t=>t.channels.map((t=>t.scale)))))),o=new Map(a.map((t=>[t.name,t])));for(const t of r){const e=vL(t);for(const r of e){const e=o.get(r),s=(null===(n=t.scale)||void 0===n?void 0:n[r])||{},{independent:c=!1}=s;if(e&&!c){const{guide:n}=e,r="boolean"==typeof n?{}:n;e.guide=Z({},r,t),Object.assign(e,s)}else{const e=Object.assign(Object.assign({},s),{expectedDomain:s.domain,name:r,guide:nt(t,i)});a.push(e)}}}return a}(p,e),v=function(t){return t.map((t=>{const e=Z(t,t.style);return delete e.style,e}))}(LL(function(t,e,n){var r;for(const[e]of n.entries())if("cell"===e.type)return t.filter((t=>"shape"!==t.name));if(1!==e.length||t.some((t=>"shape"===t.name)))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const a={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},o=(null===(r=t.find((t=>"color"===t.name)))||void 0===r?void 0:r.field)||null,s={field:o,name:"shape",type:"constant",domain:[],range:[a[i]]};return[...t,s]}(Array.from(g),p,t),e,n)),m=eN(v,e,d,n),y=function(t,e,n){const[r]=MP("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=(h=u).find((t=>"cartesian"===t.type||"cartesian3D"===t.type))?h:[...h,{type:"cartesian"}];var h;const d="cartesian3D"===f[0].type,p=Object.assign(Object.assign({},t),{x:o,y:s,width:a-o-c,height:i-l-s,transformations:f.flatMap(r)});return d?new BT(p):new jT(p)}(m,e,n),b=c?Z({mainLineWidth:1,mainStroke:"#000"},f):f;!function(t,e,n){const r=Un(t,(t=>`${t.plane||"xy"}-${t.position}`)),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:m,height:y,width:b,depth:x}=n,k={xy:rN({width:b,height:y,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:m}),yz:rN({width:x,height:y,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:y,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:rN({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[t,n]of r.entries()){const[r,i]=t.split("-"),a=k[r][i],[o,s]=Fr(n,(t=>"string"==typeof t.type&&("center"===i||!(!t.type.startsWith("axis")||!["inner","outer"].includes(i)))));o.length&&iN(o,e,a,i),s.length&&aN(n,0,a)}}(jL(v),y,m),function(t){const e=t.find((({type:t})=>"axisX"===t)),n=t.find((({type:t})=>"axisY"===t)),r=t.find((({type:t})=>"axisZ"===t));e&&n&&r&&(e.plane="xy",n.plane="xy",r.plane="yz",r.origin=[e.bbox.x,e.bbox.y,0],r.eulerAngles=[0,-90,0],r.bbox.x=e.bbox.x,r.bbox.y=e.bbox.y,t.push(Object.assign(Object.assign({},e),{plane:"xz",showLabel:!1,showTitle:!1,origin:[e.bbox.x,e.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},n),{plane:"yz",showLabel:!1,showTitle:!1,origin:[n.bbox.x+n.bbox.width,n.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},r),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})))}(v);const x=new Map(Array.from(t.values()).flatMap((t=>{const{channels:e}=t;return e.map((({scale:t})=>[t.uid,pL(t,n)]))})));!function(t,e){const n=Array.from(t.values()).flatMap((t=>t.channels)),r=Kn(n,(t=>t.map((t=>e.get(t.scale.uid)))),(t=>t.name)).filter((([,t])=>t.some((t=>"function"==typeof t.getOptions().groupTransform))&&t.every((t=>t.getTicks)))).map((t=>t[1]));r.forEach((t=>{const e=t.map((t=>t.getOptions().groupTransform))[0];e(t)}))}(t,x);const k={};for(const t of v){const{scales:e=[]}=t,i=[];for(const t of e){const{name:e,uid:a}=t,o=null!==(r=x.get(a))&&void 0!==r?r:pL(t,n);i.push(o),"y"===e&&o.update(Object.assign(Object.assign({},o.getOptions()),{xScale:k.x})),dL(k,{[e]:o})}t.scaleInstances=i}const w=[];for(const[e,n]of t.entries()){const{children:t,dataDomain:r,modifier:a,key:o}=e,{index:c,channels:l,tooltip:u}=n,f=Object.fromEntries(l.map((({name:t,scale:e})=>[t,e]))),h=Rr(f,(({uid:t})=>x.get(t)));dL(k,h);const d=hL(l,h),p=i(e),[g,v,b]=AN(p(c,h,d,y)),M=r||g.length,O=a?a(v,M,m):[],E=t=>{var e,n;return null===(n=null===(e=u.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},S=t=>u.items.map((e=>e[t])),A=g.map(((t,e)=>{const n=Object.assign({points:v[e],transform:O[e],index:t,markKey:o,viewKey:s},u&&{title:E(t),items:S(t)});for(const[r,i]of Object.entries(d))n[r]=i[t],b&&(n[`series${G(r)}`]=b[e].map((t=>i[t])));return b&&(n.seriesIndex=b[e]),b&&u&&(n.seriesItems=b[e].map((t=>S(t))),n.seriesTitle=b[e].map((t=>E(t)))),n}));n.data=A,n.index=g;const _=null==t?void 0:t(A,h,m);w.push(..._||[])}return[{layout:m,theme:d,coordinate:y,markState:t,key:s,clip:u,scale:k,style:b,components:v,labelTransform:wr(h.map(o))},w]}function SN(t,e,n,r){return Le(this,void 0,void 0,(function*(){const{library:i}=r,{components:a,theme:o,layout:s,markState:c,coordinate:l,key:u,style:f,clip:h,scale:d}=t,{x:p,y:g,width:v,height:m}=s,y=Pe(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map(((t,e)=>e)),k=b.map((t=>Tr(Object.assign({},o.view,f),t))),w=["a","margin","padding","inset"].map((t=>_r(y,t))),M=t=>t.style("x",(t=>_[t].x)).style("y",(t=>_[t].y)).style("width",(t=>_[t].width)).style("height",(t=>_[t].height)).each((function(t,e,n){!function(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}(pm(n),k[t])}));let O=0,E=0,S=v,A=m;const _=x.map((t=>{const e=w[t],{left:n=0,top:r=0,bottom:i=0,right:a=0}=e;return O+=n,E+=r,S-=n+a,A-=r+i,{x:O,y:E,width:S,height:A}}));e.selectAll(YN(oA)).data(x.filter((t=>Sr(k[t]))),(t=>b[t])).join((t=>t.append("rect").attr("className",oA).style("zIndex",-2).call(M)),(t=>t.call(M)),(t=>t.remove()));const T=function(t){let e=-1/0,n=1/0;for(const[r,i]of t){const{animate:t={}}=r,{data:a}=i,{enter:o={},update:s={},exit:c={}}=t,{type:l,duration:u=300,delay:f=0}=s,{type:h,duration:d=300,delay:p=0}=o,{type:g,duration:v=300,delay:m=0}=c;for(const t of a){const{updateType:r=l,updateDuration:i=u,updateDelay:a=f,enterType:o=h,enterDuration:s=d,enterDelay:c=p,exitDuration:y=v,exitDelay:b=m,exitType:x=g}=t;(void 0===r||r)&&(e=Math.max(e,i+a),n=Math.min(n,a)),(void 0===x||x)&&(e=Math.max(e,y+b),n=Math.min(n,b)),(void 0===o||o)&&(e=Math.max(e,s+c),n=Math.min(n,c))}}return e===-1/0?null:[n,e-n]}(c),P=!!T&&{duration:T[1]};for(const[,t]of Xn(a,(t=>`${t.type}-${t.position}`)))t.forEach(((t,e)=>t.index=e));const C=e.selectAll(YN(iA)).data(a,(t=>`${t.type}-${t.position}-${t.index}`)).join((t=>t.append("g").style("zIndex",(({zIndex:t})=>t||-1)).attr("className",iA).append((t=>NL(Z({animate:P,scale:d},t),l,o,i,c)))),(t=>t.transition((function(t,e,n){const{preserve:r=!1}=t;if(r)return;const a=NL(Z({animate:P,scale:d},t),l,o,i,c),{attributes:s}=a,[u]=n.childNodes;return u.update(s,!1)})))).transitions();n.push(...C.flat().filter(Sr));const L=e.selectAll(YN(rA)).data([s],(()=>u)).join((t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",rA).call(GN).call($N,Array.from(c.keys())).call(HN,h)),(t=>t.call($N,Array.from(c.keys())).call((t=>T?function(t,e){const[n,r]=e;t.transition((function(t,e,i){const{transform:a,width:o,height:s}=i.style,{paddingLeft:c,paddingTop:l,innerWidth:u,innerHeight:f,marginLeft:h,marginTop:d}=t,p=[{transform:a,width:o,height:s},{transform:`translate(${c+h}, ${l+d})`,width:u,height:f}];return i.animate(p,{delay:n,duration:r,fill:"both"})}))}(t,T):GN(t))).call(HN,h))).transitions();n.push(...L.flat());for(const[a,o]of c.entries()){const{data:s}=o,{key:c,class:l,type:u}=a,f=e.select(`#${c}`),h=CN(a,o,t,r),d=jN(a,o,t,i),p=IN(a,o,t,i),g=DN(a,o,t,i),v=TN(e,f,l,"element"),m=f.selectAll(YN(eA)).selectFacetAll(v).data(s,(t=>t.key),(t=>t.groupKey)).join((t=>t.append(h).attr("className",eA).attr("markType",u).transition((function(t,e,n){return d(t,[n])}))),(t=>t.call((t=>{const e=t.parent(),n=Ar((t=>{const[e,n]=t.getBounds().min;return[e,n]}));t.transition((function(t,r,i){PN(i,e,n);const a=h(t,r),o=p(t,[i],[a]);return null!==o||(i.nodeName===a.nodeName&&"g"!==a.nodeName?Er(i,a):(i.parentNode.replaceChild(a,i),a.className=eA,a.markType=u,a.__data__=i.__data__)),o})).attr("markType",u).attr("className",eA)}))),(t=>t.each((function(t,e,n){n.__removed__=!0})).transition((function(t,e,n){return g(t,[n])})).remove()),(t=>t.append(h).attr("className",eA).attr("markType",u).transition((function(t,e,n){const{__fromElements__:r}=n,i=p(t,r,[n]);return new gm(r,null,n.parentNode).transition(i).remove(),i}))),(t=>t.transition((function(t,e,n){const r=new gm([],n.__toData__,n.parentNode).append(h).attr("className",eA).attr("markType",u).nodes();return p(t,[n],r)})).remove())).transitions();n.push(...m.flat())}!function(t,e,n,r,i){const[a]=MP("labelTransform",r),{markState:o,labelTransform:s}=t,c=e.select(YN(tA)).node(),l=new Map,u=new Map,f=Array.from(o.entries()).flatMap((([n,a])=>{const{labels:o=[],key:s}=n,c=function(t,e,n,r,i){const[a]=MP("shape",r),{data:o,encode:s}=t,{data:c,defaultLabelShape:l}=e,u=c.map((t=>t.points)),f=Rr(s,(t=>t.value)),{theme:h,coordinate:d}=n,p=Object.assign(Object.assign({},i),{document:OP(i),theme:h,coordinate:d});return t=>{const{index:e,points:n}=t,r=o[e],{formatter:i=t=>`${t}`,transform:s,style:c,render:d,selector:g,element:v}=t,m=Pe(t,["formatter","transform","style","render","selector","element"]),y=Rr(Object.assign(Object.assign({},m),c),(t=>_N(t,r,e,o,{channel:f,element:v}))),{shape:b=l,text:x}=y,k=Pe(y,["shape","text"]),w="string"==typeof i?AE(i):i,M=Object.assign(Object.assign({},k),{text:w(x,r,e,o),datum:r}),O=Object.assign({type:`label.${b}`,render:d},k);return a(O,p)(n,M,LN(h,"label",b,"label"),u)}}(n,a,t,r,i),f=e.select(`#${s}`).selectAll(YN(eA)).nodes().filter((t=>!t.__removed__));return o.flatMap(((t,e)=>{const n=Pe(t,["transform"]);return f.flatMap((r=>{const i=function(t,e,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,c=function(t){const e=t.cloneNode(),n=t.getAnimations();e.style.visibility="hidden",n.forEach((t=>{const n=t.effect.getKeyframes();e.attr(n[n.length-1])})),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:i,max:a}=r;return[i,a]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:c,index:s,points:a,dependentElement:n})];const l=function(t){const{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw new Error(`Unknown selector: ${e}`)}(t),u=r.map(((r,o)=>Object.assign(Object.assign({},t),{key:`${i[o]}-${e}`,bounds:[a[o]],index:r,points:a,dependentElement:n})));return l?l(u):u}(n,e,r);return i.forEach((e=>{l.set(e,(t=>c(Object.assign(Object.assign({},t),{element:r})))),u.set(e,t)})),i}))}))})),h=pm(c).selectAll(YN(aA)).data(f,(t=>t.key)).join((t=>t.append((t=>l.get(t)(t))).attr("className",aA)),(t=>t.each((function(t,e,n){Er(n,l.get(t)(t))}))),(t=>t.remove())).nodes(),d=Un(h,(t=>u.get(t.__data__))),{coordinate:p,layout:g}=t,v={canvas:i.canvas,coordinate:p,layout:g};for(const[t,e]of d){const{transform:n=[]}=t;wr(n.map(a))(e,v)}s&&s(h,v)}(t,e,0,i,r)}))}function AN([t,e,n]){if(n)return[t,e,n];const r=[],i=[];for(let n=0;n<t.length;n++){const a=t[n],o=e[n];o.every((([t,e])=>Sr(t)&&Sr(e)))&&(r.push(a),i.push(o))}return[r,i]}function _N(t,e,n,r,i){return"function"==typeof t?t(e,n,r,i):"string"!=typeof t?t:Lr(e)&&void 0!==e[t]?e[t]:t}function TN(t,e,n,r){return t.node().parentElement.findAll((t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node())).flatMap((t=>t.getElementsByClassName(r)))}function PN(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=e.parentNode,[a,o]=n(r),[s,c]=n(i);!function(t,e){const{transform:n}=t.style,r=(t=>"none"===t||void 0===t)(n)?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${a-s}, ${o-c})`),e.append(t)}function CN(t,e,n,r){const{library:i}=r,[a]=MP("shape",i),{data:o,encode:s}=t,{defaultShape:c,data:l,shape:u}=e,f=Rr(s,(t=>t.value)),h=l.map((t=>t.points)),{theme:d,coordinate:p}=n,{type:g,style:v={}}=t,m=Object.assign(Object.assign({},r),{document:OP(r),coordinate:p,theme:d});return e=>{const{shape:n=c}=v,{shape:r=n,points:i,seriesIndex:s,index:l}=e,p=Pe(e,["shape","points","seriesIndex","index"]),y=Object.assign(Object.assign({},p),{index:l}),b=s?s.map((t=>o[t])):o[l],x=s||l,k=Rr(v,(t=>_N(t,b,x,o,{channel:f})));return(u[r]?u[r](k,m):a(Object.assign(Object.assign({},k),{type:WN(t,r)}),m))(i,y,LN(d,g,r,c),h)}}function LN(t,e,n,r){if("string"!=typeof e)return;const{color:i}=t,a=t[e]||{},o=a[n]||a[r];return Object.assign({color:i},o)}function NN(t,e,n,r,i){var a,o;const[,s]=MP("shape",i),[c]=MP("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:h}=r,d=`default${G(t)}Animation`,{[d]:p}=(null===(a=u[l])||void 0===a?void 0:a.props)||s(WN(e,l)).props,{[t]:g={}}=f,v=(null===(o=e.animate)||void 0===o?void 0:o[t])||{},m={coordinate:h};return(e,n,r)=>{const{[`${t}Type`]:i,[`${t}Delay`]:a,[`${t}Duration`]:o,[`${t}Easing`]:s}=e,l=Object.assign({type:i||p},v);if(!l.type)return null;const u=c(l,m)(n,r,Z(g,{delay:a,duration:o,easing:s}));return Array.isArray(u)?u:[u]}}function jN(t,e,n,r){return NN("enter",t,e,n,r)}function RN(t){return t.finished.then((()=>{t.cancel()})),t}function IN(t,e,n,r){return NN("update",t,e,n,r)}function DN(t,e,n,r){return NN("exit",t,e,n,r)}function BN(t={}){if("string"==typeof t)return{type:t};const{type:e="light"}=t,n=Pe(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function FN(t){const{interaction:e={}}=t;return Object.entries(Z({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function zN(t,e){return Le(this,void 0,void 0,(function*(){const{data:n}=t,r=Pe(t,["data"]);if(null==n)return t;const[,{data:i}]=yield sN(0,{data:n},e);return Object.assign({data:i},r)}))}function GN(t){t.style("transform",(t=>`translate(${t.paddingLeft+t.marginLeft}, ${t.paddingTop+t.marginTop})`)).style("width",(t=>t.innerWidth)).style("height",(t=>t.innerHeight))}function WN(t,e){const{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function $N(t,e){const n=t=>void 0!==t.class?`${t.class}`:"";if(0===t.nodes().length)return;t.selectAll(YN(JS)).data(e,(t=>t.key)).join((t=>t.append("g").attr("className",JS).attr("id",(t=>t.key)).style("facet",n).style("fill","transparent").style("zIndex",(t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}))),(t=>t.style("facet",n).style("fill","transparent").style("zIndex",(t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}))),(t=>t.remove()));t.select(YN(tA)).node()||t.append("g").attr("className",tA).style("zIndex",0)}function YN(...t){return t.map((t=>`.${t}`)).join("")}function HN(t,e){t.node()&&t.style("clipPath",(t=>{if(!e)return null;const{paddingTop:n,paddingLeft:r,marginLeft:i,marginTop:a,innerWidth:o,innerHeight:s}=t;return new Qg({style:{x:r+i,y:n+a,width:o,height:s}})}))}function VN(t){const{style:e,scale:n,type:r}=t,i={},a=tt(e,"columnWidthRatio");return a&&"interval"===r&&(i.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-a})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),i)})}function qN(t){const e=function(t){return function(...t){return e=>t.reduce(((t,e)=>e(t)),e)}(VN)(t)}(t);return e.children&&Array.isArray(e.children)&&(e.children=e.children.map((t=>qN(t)))),e}function UN(t){const e=Z({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){const t=i.shift();if(void 0===t.key){const e=n.get(t),i=r.get(t),a=null===e?"0":`${e.key}-${i}`;t.key=a}const{children:e=[]}=t;if(Array.isArray(e))for(let a=0;a<e.length;a++){const o=Z({},e[a]);e[a]=o,n.set(o,t),r.set(o,a),i.push(o)}}return e}function XN(t,e){const n=new x_;return n.registerPlugin(new w_),new gv({width:t,height:e,container:document.createElement("div"),renderer:n})}function ZN(t,e={},n=()=>{},r=t=>{throw t}){const{width:i=640,height:a=480,depth:o=0}=t,s=UN(qN(t)),{canvas:c=XN(i,a),emitter:l=new O_,library:u}=e;e.canvas=c,e.emitter=l;const{width:f,height:h}=c.getConfig();f===i&&h===a||c.resize(i,a),l.emit(E_.BEFORE_RENDER);const d=pm(c.document.documentElement);return c.ready.then((()=>bN(Object.assign(Object.assign({},s),{width:i,height:a,depth:o}),d,e))).then((()=>{if(o){const[t,e]=c.document.documentElement.getPosition();c.document.documentElement.setPosition(t,e,-o/2)}c.requestAnimationFrame((()=>{c.requestAnimationFrame((()=>{l.emit(E_.AFTER_RENDER),null==n||n()}))}))})).catch((t=>{null==r||r(t)})),"string"==typeof(p=c.getConfig().container)?document.getElementById(p):p;var p}function KN(t,e={},n=!1){const{canvas:r,emitter:i}=e;r&&(!function(t){const e=t.getRoot().querySelectorAll(`.${nA}`);null==e||e.forEach((t=>{const{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach((t=>{null==t||t.destroy()}))}))}(r),n?r.destroy():r.destroyChildren()),i.off()}const QN={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function JN(t,e){var n;return null!==(n=t.style[e])&&void 0!==n?n:QN[e]}function tj(t,e,n,r){t.style[e]=n,r&&t.children.forEach((t=>tj(t,e,n,r)))}function ej(t){tj(t,"visibility","hidden",!0)}function nj(t){tj(t,"visibility","visible",!0)}function rj(t){return pm(t).selectAll(`.${eA}`).nodes().filter((t=>!t.__removed__))}function ij(t,e){return aj(t,e).flatMap((({container:t})=>rj(t)))}function aj(t,e){return e.filter((e=>e!==t&&e.options.parentKey===t.options.key))}function oj(t){return pm(t).select(`.${rA}`).node()}function sj(t){if("g"===t.tagName)return t.getRenderBounds();const e=t.getGeometryBounds(),n=new Vu;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function cj(t,e){const{offsetX:n,offsetY:r}=e,i=sj(t),{min:[a,o],max:[s,c]}=i;return n<a||n>s||(r<o||r>c)?null:[n-a,r-o]}function lj(t,e){const{offsetX:n,offsetY:r}=e,[i,a,o,s]=function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return[n,r,i,a]}(t);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function uj(t){return t=>t.__data__.color}function fj(t){return t=>t.__data__.x}function hj(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap((t=>Array.from(t.markState.keys()).map((e=>[pj(t.key,e.key),e.data])))));return t=>{const{index:e,markKey:r,viewKey:i}=t.__data__;return n.get(pj(i,r))[e]}}function dj(t,e=(t,e)=>t,n=(t,e,n)=>t.setAttribute(e,n)){const r="__states__",i="__ordinal__",a=a=>{const{[r]:o=[],[i]:s={}}=a,c=o.reduce(((e,n)=>Object.assign(Object.assign({},e),t[n])),s);if(0!==Object.keys(c).length){for(const[t,r]of Object.entries(c)){const i=JN(a,t),o=e(r,a);n(a,t,o),t in s||(s[t]=i)}a[i]=s}},o=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{o(t),t[r]=[...e],a(t)},removeState:(t,...e)=>{o(t);for(const n of e){const e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}a(t)},hasState:(t,e)=>(o(t),-1!==t[r].indexOf(e))}}function pj(t,e){return`${t},${e}`}function gj(t,e){const n=(Array.isArray(t)?t:[t]).flatMap((t=>t.marks.map((e=>[pj(t.key,e.key),e.state])))),r={};for(const t of e){const[e,i]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce(((t,n)=>{const[r,a={}]=n,o=void 0===(s=a[e])||"object"==typeof s&&0===Object.keys(s).length?i:a[e];var s;for(const[e,n]of Object.entries(o)){const i=t[e],a=(t,e,a,o)=>{const s=pj(o.__data__.viewKey,o.__data__.markKey);return r!==s?null==i?void 0:i(t,e,a,o):"function"!=typeof n?n:n(t,e,a,o)};t[e]=a}return t}),{})}return r}function vj(t,e){const n=new Map(t.map(((t,e)=>[t,e]))),r=e?t.map(e):t;return(t,i)=>{if("function"!=typeof t)return t;const a=n.get(i);return t(e?e(i):i,a,r,i)}}function mj(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=Pe(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const a=t=>t.__data__.points,o=(t,e)=>{const[,n,r]=t,[i,,,a]=e;return[n,i,a,r]};return[t=>{var e;if(t.length<=1)return;const r=Jn(t,((t,e)=>{const{x:n}=t.__data__,{x:r}=e.__data__;return n-r}));for(let t=1;t<r.length;t++){const s=Ks(),c=r[t-1],l=r[t],[u,f,h,d]=o(a(c),a(l));s.moveTo(...u),s.lineTo(...f),s.lineTo(...h),s.lineTo(...d),s.closePath();const p=Rr(i,(t=>n(t,c))),{fill:g=c.getAttribute("fill")}=p,v=Pe(p,["fill"]),m=new qg({className:"element-link",style:Object.assign({d:s.toString(),fill:g,zIndex:-2},v)});null===(e=c.link)||void 0===e||e.remove(),c.parentNode.appendChild(m),c.link=m}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function yj(t,e,n){const r=e=>{const{transform:n}=t.style;return n?`${n} ${e}`:e};if(Gc(n)){const{points:i}=t.__data__,[a,o]=zc(n)?km(i):i,s=n.getCenter(),c=gs(a,s),l=gs(o,s),u=ys(c)+xs(c,l)/2;return r(`translate(${e*Math.cos(u)}, ${e*Math.sin(u)})`)}return zc(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function bj(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=Pe(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(t,e,n)=>{const r=t.invert(e),i=e+t.getBandWidth(r)/2,a=t.getStep(r)/2,o=a*n;return[i-a+o,i+a-o]},l=(t,n)=>{const{padding:a}=n,[o,s]=((t,e)=>{const{x:n}=r;if(!gS(n))return[0,1];const{__data__:i}=t,{x:a}=i,[o,s]=c(n,a,e);return[o,s]})(t,a),[l,u]=((t,e)=>{const{y:n}=r;if(!gS(n))return[0,1];const{__data__:i}=t,{y:a}=i,[o,s]=c(n,a,e);return[o,s]})(t,a),f=[[o,l],[s,l],[s,u],[o,u]].map((t=>i.map(t))),{__data__:h}=t,{y:d,y1:p}=h;return Sm(e,f,{y:d,y1:p},i,n)},u=(t,e)=>{const{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,a=Pe(e,["transform","transformOrigin","stroke"]),o=Object.assign({transform:n,transformOrigin:r,stroke:i},a),s=t.cloneNode(!0);for(const[t,e]of Object.entries(o))s.style[t]=e;return s};return[t=>{t.background&&t.background.remove();const e=Rr(o,(e=>a(e,t))),{fill:n="#CCD6EC",fillOpacity:i=.3,zIndex:c=-2,padding:f=.001,lineWidth:h=0}=e,d=Pe(e,["fill","fillOpacity","zIndex","padding","lineWidth"]),p=Object.assign(Object.assign({},d),{fill:n,fillOpacity:i,zIndex:c,padding:f,lineWidth:h}),g=(()=>{const{x:t,y:e}=r;return[t,e].some(gS)})()?l:u,v=g(t,p);v.className=s,t.parentNode.parentNode.appendChild(v),t.background=v},t=>{var e;null===(e=t.background)||void 0===e||e.remove(),t.background=null},t=>t.className===s]}function xj(t,e){const n=t.getRootNode().defaultView.getContextService().getDomElement();(null==n?void 0:n.style)&&(t.cursor=n.style.cursor,n.style.cursor=e)}function kj(t){xj(t,t.cursor)}function wj(t,e,n){return t.find((t=>Object.entries(e).every((([e,r])=>n(t)[e]===r))))}function Mj(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Oj(t,e=!1){const n=v(t,(t=>!!t)).map(((t,e)=>[0===e?"M":"L",...t]));return e&&n.push(["Z"]),n}function Ej(t){return t.querySelectorAll(".element")}function Sj(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function Aj(t,{elements:e,datum:n,groupKey:r=t=>t,link:i=!1,background:a=!1,delay:o=60,scale:s,coordinate:c,emitter:l,state:u={}}){var f;const h=e(t),d=new Set(h),p=Un(h,r),g=vj(h,n),[v,m]=mj(Object.assign({elements:h,valueof:g,link:i,coordinate:c},_r(u.active,"link"))),[y,b,x]=bj(Object.assign({document:t.ownerDocument,scale:s,coordinate:c,background:a,valueof:g},_r(u.active,"background"))),k=Z(u,{active:Object.assign({},(null===(f=u.active)||void 0===f?void 0:f.offset)&&{transform:(...t)=>{const e=u.active.offset(...t),[,n]=t;return yj(h[n],e,c)}})}),{setState:w,removeState:M,hasState:O}=dj(k,g);let E;const S=t=>{const{target:e,nativeEvent:i=!0}=t;if(!d.has(e))return;E&&clearTimeout(E);const a=r(e),o=p.get(a),s=new Set(o);for(const t of h)s.has(t)?O(t,"active")||w(t,"active"):(w(t,"inactive"),m(t)),t!==e&&b(t);y(e),v(o),i&&l.emit("element:highlight",{nativeEvent:i,data:{data:n(e),group:o.map(n)}})},A=(t=!0)=>{for(const t of h)M(t,"active","inactive"),b(t),m(t);t&&l.emit("element:unhighlight",{nativeEvent:t})},_=t=>{const{target:e}=t;a&&!x(e)||(a||d.has(e))&&(o>0?(E&&clearTimeout(E),E=setTimeout((()=>{A(),E=null}),o)):A())},T=()=>{A()};t.addEventListener("pointerover",S),t.addEventListener("pointerout",_),t.addEventListener("pointerleave",T);const P=t=>{const{nativeEvent:e}=t;e||A(!1)},C=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,i=wj(h,r,n);i&&S({target:i,nativeEvent:!1})};return l.on("element:highlight",C),l.on("element:unhighlight",P),()=>{t.removeEventListener("pointerover",S),t.removeEventListener("pointerout",_),t.removeEventListener("pointerleave",T),l.off("element:highlight",C),l.off("element:unhighlight",P);for(const t of h)b(t),m(t)}}function _j(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,a=Pe(t,["delay","createGroup","background","link"]);return(t,o,s)=>{const{container:c,view:l,options:u}=t,{scale:f,coordinate:h}=l;return Aj(oj(c),Object.assign({elements:rj,datum:hj(l),groupKey:n?n(l):void 0,coordinate:h,scale:f,state:gj(u,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:s},a))}}function Tj(t){return _j(Object.assign(Object.assign({},t),{createGroup:fj}))}function Pj(t){return _j(Object.assign(Object.assign({},t),{createGroup:uj}))}function Cj(t,{elements:e,datum:n,groupKey:r=t=>t,link:i=!1,single:a=!1,coordinate:o,background:s=!1,scale:c,emitter:l,state:u={}}){var f;const h=e(t),d=new Set(h),p=Un(h,r),g=vj(h,n),[v,m]=mj(Object.assign({link:i,elements:h,valueof:g,coordinate:o},_r(u.selected,"link"))),[y,b]=bj(Object.assign({document:t.ownerDocument,background:s,coordinate:o,scale:c,valueof:g},_r(u.selected,"background"))),x=Z(u,{selected:Object.assign({},(null===(f=u.selected)||void 0===f?void 0:f.offset)&&{transform:(...t)=>{const e=u.selected.offset(...t),[,n]=t;return yj(h[n],e,o)}})}),{setState:k,removeState:w,hasState:M}=dj(x,g),O=(t=!0)=>{for(const t of h)w(t,"selected","unselected"),m(t),b(t);t&&l.emit("element:unselect",{nativeEvent:!0})},E=t=>{const{target:e,nativeEvent:o=!0}=t;return d.has(e)?a?((t,e,i=!0)=>{if(M(e,"selected"))O();else{const a=r(e),o=p.get(a),s=new Set(o);for(const t of h)s.has(t)?k(t,"selected"):(k(t,"unselected"),m(t)),t!==e&&b(t);if(v(o),y(e),!i)return;l.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...o.map(n)]}}))}})(t,e,o):((t,e,a=!0)=>{const o=r(e),s=p.get(o),c=new Set(s);if(M(e,"selected")){if(!h.some((t=>!c.has(t)&&M(t,"selected"))))return O();for(const t of s)k(t,"unselected"),m(t),b(t)}else{const t=s.some((t=>M(t,"selected")));for(const t of h)c.has(t)?k(t,"selected"):M(t,"selected")||k(t,"unselected");!t&&i&&v(s),y(e)}a&&l.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:a,data:{data:h.filter((t=>M(t,"selected"))).map(n)}}))})(t,e,o):O()};t.addEventListener("click",E);const S=t=>{const{nativeEvent:e,data:r}=t;if(e)return;const i=a?r.data.slice(0,1):r.data;for(const t of i){const e=wj(h,t,n);E({target:e,nativeEvent:!1})}},A=()=>{O(!1)};return l.on("element:select",S),l.on("element:unselect",A),()=>{for(const t of h)m(t);t.removeEventListener("click",E),l.off("element:select",S),l.off("element:unselect",A)}}function Lj(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=Pe(t,["createGroup","background","link"]);return(t,a,o)=>{const{container:s,view:c,options:l}=t,{coordinate:u,scale:f}=c;return Cj(oj(s),Object.assign({elements:rj,datum:hj(c),groupKey:e?e(c):void 0,coordinate:u,scale:f,state:gj(l,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:o},i))}}function Nj(t){return Lj(Object.assign(Object.assign({},t),{createGroup:fj}))}function jj(t){return Lj(Object.assign(Object.assign({},t),{createGroup:uj}))}function Rj(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,a=Pe(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{view:o,container:s,update:c,setState:l}=t,{markState:u,scale:f,coordinate:h}=o,d=function(t,e,n){const[r]=Array.from(t.entries()).filter((([t])=>t.type===e)).map((([t])=>{const{encode:e}=t;return Object.fromEntries(n.map((t=>{const n=e[t];return[t,n?n.value:void 0]})))}));return r}(u,"line",["x","y","series"]);if(!d)return;const{y:p,x:g,series:v=[]}=d,m=p.map(((t,e)=>e)),y=Jn(m.map((t=>g[t]))),b=oj(s),x=s.getElementsByClassName(eA),k=Un(s.getElementsByClassName(aA),(t=>t.__data__.key.split("-")[0])),w=new Hg({style:Object.assign({x1:0,y1:0,x2:0,y2:b.getAttribute("height"),stroke:"black",lineWidth:1},_r(a,"rule"))}),M=new tv({style:Object.assign({x:0,y:b.getAttribute("height"),text:"",fontSize:10},_r(a,"label"))});w.append(M),b.appendChild(w);const O=(t,e,n)=>{const[r]=t.invert(n),i=e.invert(r);return y[Fn(y,i)]},E=(t,e)=>{w.setAttribute("x1",t[0]),w.setAttribute("x2",t[0]),M.setAttribute("text",i(e))};let S;const A=rt((t=>{const e=cj(b,t);e&&(t=>{const{scale:e,coordinate:n}=S,{x:r,y:i}=e,a=O(n,r,t);E(t,a);for(const t of x){const{seriesIndex:e,key:r}=t.__data__,o=e[Nn((t=>g[+t])).center(e,a)],s=[0,i.map(1)],c=[0,i.map(p[o]/p[e[0]])],[,l]=n.map(s),[,u]=n.map(c),f=l-u;t.setAttribute("transform",`translate(0, ${f})`);const h=k.get(r)||[];for(const t of h)t.setAttribute("dy",f)}})(e)}),e,{leading:n,trailing:r});return(t=>{Le(this,void 0,void 0,(function*(){const{x:e}=f,n=O(h,e,t);E(t,n),l("chartIndex",(t=>{const e=Z({},t),r=e.marks.find((t=>"line"===t.type)),i=fr(Zn(m,(t=>fr(t,(t=>+p[t]))/dr(t,(t=>+p[t]))),(t=>v[t])).values());Z(r,{scale:{y:{domain:[1/i,i]}}});const a=function(t){const{transform:e=[]}=t,n=e.find((t=>"normalizeY"===t.type));if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);a.groupBy="color",a.basis=(t,e)=>e[t[Nn((t=>g[+t])).center(t,n)]];for(const t of e.marks)t.animate=!1;return e}));const r=yield c("chartIndex");S=r.view}))})([0,0]),b.addEventListener("pointerenter",A),b.addEventListener("pointermove",A),b.addEventListener("pointerleave",A),()=>{w.remove(),b.removeEventListener("pointerenter",A),b.removeEventListener("pointermove",A),b.removeEventListener("pointerleave",A)}}}function Ij({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,c=oj(s),l=rt((t=>{const e=cj(c,t);if(!e)return o("fisheye"),void a();o("fisheye",(t=>{const n=Z({},t,{interaction:{tooltip:{preserve:!0}}});for(const t of n.marks)t.animate=!1;const[r,i]=e,a=function(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find((t=>"fisheye"===t.type));if(r)return r;const i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}(n);return a.focusX=r,a.focusY=i,a.visual=!0,n})),a()}),t,{leading:e,trailing:n});return c.addEventListener("pointerenter",l),c.addEventListener("pointermove",l),c.addEventListener("pointerleave",l),()=>{c.removeEventListener("pointerenter",l),c.removeEventListener("pointermove",l),c.removeEventListener("pointerleave",l)}}}function Dj(t,e){if(e)return"string"==typeof e?document.querySelector(e):e;return t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function Bj(t,e,n,r,i,a,o,s={},c=[10,10]){const l=new aw({className:"tooltip",style:{x:e,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:c,template:{prefixCls:"g2-"},style:Z({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},s)}});return t.appendChild(l.HTMLTooltipElement),l}function Fj({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f,offset:h}){const d=Dj(t,u),p=Dj(t),g=o?p:t,v=f||function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return{x:n,y:r,width:i-n,height:a-r}}(t),m=function(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(p,d),{tooltipElement:y=Bj(d,n,r,s,c,v,m,l,h)}=g,{items:b,title:x=""}=e;y.update(Object.assign({x:n,y:r,data:b,title:x,position:s,enterable:c,container:m},void 0!==i&&{content:i(a,{items:b,title:x})})),g.tooltipElement=y}function zj({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=Dj(t),o=e?a:t,{tooltipElement:s}=o;s&&s.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY),Uj(t),Xj(t),Zj(t)}function Gj({root:t,single:e}){const n=Dj(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),Uj(t),Xj(t),Zj(t)}function Wj(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function $j(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=(e&&"transparent"!==e?e:n)}=r;return i}function Yj(t,e=t=>t){const n=new Map(t.map((t=>[e(t),t])));return Array.from(n.values())}function Hj(t,e,n,r=t.map((t=>t.__data__)),i={}){const a=t=>t instanceof Date?+t:t,o=Yj(r.map((t=>t.title)),a).filter(Sr),s=r.flatMap(((r,a)=>{const o=t[a],{items:s=[],title:c}=r,l=s.filter(Sr),u=void 0!==n?n:s.length<=1;return l.map((t=>{var{color:n=$j(o)||i.color,name:a}=t,s=Pe(t,["color","name"]);const l=function(t,e){const{color:n,series:r,facet:i=!1}=t,{color:a,series:o}=e,s=t=>t&&t.invert&&!(t instanceof Wa)&&!(t instanceof Ya);if(s(r))return r.clone().invert(o);if(o&&r instanceof Wa&&r.invert(o)!==a&&!i)return r.invert(o);if(s(n)){const t=n.invert(a);return Array.isArray(t)?null:t}return null}(e,r),f=u?l||a:a||l;return Object.assign(Object.assign({},s),{color:n,name:f||c})}))})).map(Wj);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:Yj(s,(t=>`(${a(t.name)}, ${a(t.value)}, ${a(t.color)})`))})}function Vj(t,e,n,r){var{plotWidth:i,plotHeight:a,mainWidth:o,mainHeight:s,startX:c,startY:l,transposed:u,polar:f,insetLeft:h,insetTop:d}=r,p=Pe(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const g=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},p),v=((t,e)=>{if(1===e.length)return e[0];const n=e.map((e=>ms(e,t))),r=pr(n,(t=>t));return e[r]})(n,e);if(f){const[e,n,r]=(()=>{const t=c+h+o/2,e=l+d+s/2;return[t,e,ms([t,e],v)]})(),i=t.ruleX||((e,n,r)=>{const i=new Ig({style:Object.assign({cx:e,cy:n,r:r},g)});return t.appendChild(i),i})(e,n,r);i.style.cx=e,i.style.cy=n,i.style.r=r,t.ruleX=i}else{const[e,n,r,o]=u?[c+v[0],c+v[0],l,l+a]:[c,c+i,v[1]+l,v[1]+l],s=t.ruleX||((e,n,r,i)=>{const a=new Hg({style:Object.assign({x1:e,x2:n,y1:r,y2:i},g)});return t.appendChild(a),a})(e,n,r,o);s.style.x1=e,s.style.x2=n,s.style.y1=r,s.style.y2=o,t.ruleX=s}}function qj(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:s,startY:c,transposed:l,polar:u,insetLeft:f,insetTop:h}=n,d=Pe(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},d),g=e.map((t=>t[1])),v=e.map((t=>t[0])),m=yr(g),y=yr(v),[b,x,k,w]=(()=>{if(u){const t=Math.min(a,o)/2,e=s+f+a/2,n=c+h+o/2,r=ys(gs([y,m],[e,n]));return[e,e+t*Math.cos(r),n,n+t*Math.sin(r)]}return l?[s,s+r,m+c,m+c]:[y+s,y+s,c,c+i]})();if(v.length>0){const e=t.ruleY||(()=>{const e=new Hg({style:Object.assign({x1:b,x2:x,y1:k,y2:w},p)});return t.appendChild(e),e})();e.style.x1=b,e.style.x2=x,e.style.y1=k,e.style.y2=w,t.ruleY=e}}function Uj(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Xj(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function Zj(t){t.markers&&(t.markers.forEach((t=>t.remove())),t.markers=[])}function Kj(t,e){return Array.from(t.values()).some((t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]}))}function Qj(t,e){return void 0===t?e:t}function Jj(t){const{title:e,items:n}=t;return 0===n.length&&void 0===e}function tR(t,e){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,crosshairsX:c,crosshairsY:l,render:u,groupName:f,emitter:h,wait:d=50,leading:p=!0,trailing:g=!1,startX:v=0,startY:m=0,body:y=!0,single:b=!0,position:x,enterable:k,mount:w,bounding:M,theme:O,offset:E,disableNative:S=!1,marker:A=!0,preserve:_=!1,style:T={},css:P={}}=e,C=Pe(e,["elements","sort","filter","scale","coordinate","crosshairs","crosshairsX","crosshairsY","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","offset","disableNative","marker","preserve","style","css"]);const L=n(t),N=zc(o),j=Gc(o),R=Z(T,C),{innerWidth:I,innerHeight:D,width:B,height:F,insetLeft:G,insetTop:W}=o.getOptions(),$=[],Y=[];for(const t of L){const{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?$.push(t):(r||i)&&Y.push(t)}const H=Y.length&&Y.every((t=>"interval"===t.markType))&&!Gc(o),V=t=>t.__data__.x,q=!!a.x.getBandWidth&&Y.length>0;$.sort(((t,e)=>{const n=N?0:1,r=t=>t.getBounds().min[n];return N?r(e)-r(t):r(t)-r(e)}));const U=t=>{const e=N?1:0,{min:n,max:r}=t.getLocalBounds();return Jn([n[e],r[e]])};H?L.sort(((t,e)=>V(t)-V(e))):Y.sort(((t,e)=>{const[n,r]=U(t),[i,a]=U(e),o=(n+r)/2,s=(i+a)/2;return N?s-o:o-s}));const X=new Map($.map((t=>{const{__data__:e}=t,{seriesX:n}=e;return[t,[Jn(n.map(((t,e)=>e)),(t=>n[+t])),n]]}))),{x:K}=a,Q=(null==K?void 0:K.getBandWidth)?K.getBandWidth()/2:0,J=t=>{const[e]=o.invert(t);return e-Q},tt=(t,e,n,r)=>{const{_x:i}=t,a=void 0!==i?K.map(i):J(e),o=r.filter(Sr),[s,c]=Jn([o[0],o[o.length-1]]);if(!q&&(a<s||a>c)&&!(s===c))return null;const l=Nn((t=>r[+t])).center;return n[l(n,a)]},et=H?(t,e)=>{const n=e[(0,Nn(V).center)(e,J(t))];return Un(e,V).get(V(n))}:(t,e)=>{const n=t[N?1:0],r=e.filter((t=>{const[e,r]=U(t);return n>=e&&n<=r}));if(!q||r.length>0)return r;const i=Nn((t=>{const[e,n]=U(t);return(e+n)/2})).center;return[e[i(e,n)]].filter(Sr)},nt=(t,e)=>{const{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter((([t])=>t.startsWith("series")&&"series"!==t)).map((([t,n])=>{const r=n[e];return[z(t.replace("series","")),r]})))},it=rt((e=>{var n;const d=cj(t,e);if(!d)return;const p=sj(t),g=p.min[0],S=p.min[1],_=[d[0]-v,d[1]-m];if(!_)return;const T=et(_,Y),C=[],L=[];for(const t of $){const[n,r]=X.get(t),i=tt(e,_,n,r);if(null!==i){C.push(t);const e=nt(t,i),{x:n,y:r}=e,a=o.map([(n||0)+Q,r||0]);L.push([Object.assign(Object.assign({},e),{element:t}),a])}}const z=Array.from(new Set(L.map((t=>t[0].x)))),H=z[pr(z,(t=>Math.abs(t-J(_))))],V=L.filter((t=>t[0].x===H)),q=[...V.map((t=>t[0])),...T.map((t=>t.__data__))],U=[...C,...T],Z=Hj(U,a,f,q,O);if(r&&Z.items.sort(((t,e)=>r(t)-r(e))),i&&(Z.items=Z.items.filter(i)),0===U.length||Jj(Z))return void at(e);if(y&&Fj({root:t,data:Z,x:d[0]+g,y:d[1]+S,render:u,event:e,single:b,position:x,enterable:k,mount:w,bounding:M,css:P,offset:E}),s||c||l){const e=_r(R,"crosshairs"),n=Object.assign(Object.assign({},e),_r(R,"crosshairsX")),r=Object.assign(Object.assign({},e),_r(R,"crosshairsY")),i=V.map((t=>t[1]));c&&Vj(t,i,d,Object.assign(Object.assign({},n),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:G,insetTop:W,startX:v,startY:m,transposed:N,polar:j})),l&&qj(t,i,Object.assign(Object.assign({},r),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:G,insetTop:W,startX:v,startY:m,transposed:N,polar:j}))}if(A){const e=_r(R,"marker");!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach((t=>t.remove()));const{type:i=""}=n,a=e.filter((t=>{const[{x:e,y:n}]=t;return Sr(e)&&Sr(n)})).map((t=>{const[{color:e,element:a},o]=t,s=e||a.style.fill||a.style.stroke||r.color,c="hollow"===i?"transparent":s,l="hollow"===i?s:"#fff";return new Ig({className:"g2-tooltip-marker",style:Object.assign({cx:o[0],cy:o[1],fill:c,r:4,stroke:l,lineWidth:2},n)})}));for(const e of a)t.appendChild(e);t.markers=a}(t,{data:V,style:e,theme:O})}const K=null===(n=V[0])||void 0===n?void 0:n[0].x,rt=null!=K?K:J(_);h.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:{data:{x:vS(a.x,rt,!0)}}}))}),d,{leading:p,trailing:g}),at=e=>{zj({root:t,single:b,emitter:h,event:e})},ot=()=>{Gj({root:t,single:b})},st=e=>{var n,{nativeEvent:r,data:i,offsetX:s,offsetY:c}=e,l=Pe(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;const u=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.x,f=a.x.map(u),[h,d]=o.map([f,.5]),p=t.getRenderBounds(),g=p.min[0],v=p.min[1];it(Object.assign(Object.assign({},l),{offsetX:void 0!==s?s:g+h,offsetY:void 0!==c?c:v+d,_x:u}))},ct=()=>{zj({root:t,single:b,emitter:h,nativeEvent:!1})},lt=()=>{ht(),ot()},ut=()=>{ft()},ft=()=>{S||(t.addEventListener("pointerenter",it),t.addEventListener("pointermove",it),t.addEventListener("pointerleave",(e=>{cj(t,e)||at(e)})))},ht=()=>{S||(t.removeEventListener("pointerenter",it),t.removeEventListener("pointermove",it),t.removeEventListener("pointerleave",at))};return ft(),h.on("tooltip:show",st),h.on("tooltip:hide",ct),h.on("tooltip:disable",lt),h.on("tooltip:enable",ut),()=>{ht(),h.off("tooltip:show",st),h.off("tooltip:hide",ct),h.off("tooltip:disable",lt),h.off("tooltip:enable",ut),_?zj({root:t,single:b,emitter:h,nativeEvent:!1}):ot()}}function eR(t,{elements:e,coordinate:n,scale:r,render:i,groupName:a,sort:o,filter:s,emitter:c,wait:l=50,leading:u=!0,trailing:f=!1,groupKey:h=t=>t,single:d=!0,position:p,enterable:g,datum:v,view:m,mount:y,bounding:b,theme:x,offset:k,shared:w=!1,body:M=!0,disableNative:O=!1,preserve:E=!1,css:S={}}){var A,_;const T=e(t),P=Un(T,h),C=T.every((t=>"interval"===t.markType))&&!Gc(n),L=r.x,N=r.series,j=null!==(_=null===(A=null==L?void 0:L.getBandWidth)||void 0===A?void 0:A.call(L))&&void 0!==_?_:0,R=N?t=>{const e=Math.round(1/N.valueBandWidth);return t.__data__.x+t.__data__.series*j+j/(2*e)}:t=>t.__data__.x+j/2;C&&T.sort(((t,e)=>R(t)-R(e)));const I=t=>{const{target:e}=t;return Sj(e,(t=>!!t.classList&&t.classList.includes("element")))},D=C?e=>{const r=cj(t,e);if(!r)return;const[i]=n.invert(r),a=(0,Nn(R).center)(T,i),o=T[a];if(!w){const t=T.find((t=>t!==o&&R(t)===R(o)));if(t)return I(e)}return o}:I,B=rt((e=>{const n=D(e);if(!n)return void zj({root:t,single:d,emitter:c,event:e});const l=h(n),u=P.get(l);if(!u)return;const f=1!==u.length||w?Hj(u,r,a,void 0,x):function(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(Sr).map((e=>{var{color:n=$j(t)}=e,r=Pe(e,["color"]);return Object.assign(Object.assign({},r),{color:n})})).map(Wj);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}(u[0]);if(o&&f.items.sort(((t,e)=>o(t)-o(e))),s&&(f.items=f.items.filter(s)),Jj(f))return void zj({root:t,single:d,emitter:c,event:e});const{offsetX:v,offsetY:O}=e;M&&Fj({root:t,data:f,x:v,y:O,render:i,event:e,single:d,position:p,enterable:g,mount:y,bounding:b,css:S,offset:k}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:{data:xP(n,m)}}))}),l,{leading:u,trailing:f}),F=e=>{zj({root:t,single:d,emitter:c,event:e})},z=()=>{O||(t.addEventListener("pointermove",B),t.addEventListener("pointerleave",F))},G=()=>{O||(t.removeEventListener("pointermove",B),t.removeEventListener("pointerleave",F))},W=({nativeEvent:e,offsetX:n,offsetY:r,data:i})=>{if(e)return;const{data:a}=i,o=wj(T,a,v);if(!o)return;const s=o.getBBox(),{x:c,y:l,width:u,height:f}=s,h=t.getBBox();B({target:o,offsetX:void 0!==n?n+h.x:c+u/2,offsetY:void 0!==r?r+h.y:l+f/2})},$=({nativeEvent:e}={})=>{e||zj({root:t,single:d,emitter:c,nativeEvent:!1})};return c.on("tooltip:show",W),c.on("tooltip:hide",$),c.on("tooltip:enable",(()=>{z()})),c.on("tooltip:disable",(()=>{G(),Gj({root:t,single:d})})),z(),()=>{G(),c.off("tooltip:show",W),c.off("tooltip:hide",$),E?zj({root:t,single:d,emitter:c,nativeEvent:!1}):Gj({root:t,single:d})}}function nR(t){const{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:i,series:a,name:o,item:s=()=>({}),facet:c=!1}=t,l=Pe(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,o,u)=>{const{container:f,view:h}=t,{scale:d,markState:p,coordinate:g,theme:v}=h,m=Kj(p,"seriesTooltip"),y=Kj(p,"crosshairs"),b=oj(f),x=Qj(a,m),k=Qj(n,y);if(x&&function(t){return Array.from(t.values()).some((t=>{var e;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)&&t.tooltip}))}(p)&&!c)return tR(b,Object.assign(Object.assign({},l),{theme:v,elements:rj,scale:d,coordinate:g,crosshairs:k,crosshairsX:Qj(Qj(r,n),!1),crosshairsY:Qj(i,k),item:s,emitter:u}));if(x&&c){const e=o.filter((e=>e!==t&&e.options.parentKey===t.options.key)),a=ij(t,o),c=e[0].view.scale,f=b.getBounds(),h=f.min[0],d=f.min[1];return Object.assign(c,{facet:!0}),tR(b.parentNode.parentNode,Object.assign(Object.assign({},l),{theme:v,elements:()=>a,scale:c,coordinate:g,crosshairs:Qj(n,y),crosshairsX:Qj(Qj(r,n),!1),crosshairsY:Qj(i,k),item:s,startX:h,startY:d,emitter:u}))}return eR(b,Object.assign(Object.assign({},l),{datum:hj(h),elements:rj,scale:d,coordinate:g,groupKey:e?t=>t.__data__.x:void 0,item:s,emitter:u,view:h,theme:v,shared:e}))}}_j.props={reapplyWhenUpdate:!0},Tj.props={reapplyWhenUpdate:!0},Pj.props={reapplyWhenUpdate:!0},Lj.props={reapplyWhenUpdate:!0},Nj.props={reapplyWhenUpdate:!0},jj.props={reapplyWhenUpdate:!0},Rj.props={reapplyWhenUpdate:!0},nR.props={reapplyWhenUpdate:!0};const rR="legend-category";function iR(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function aR(t){return t.getElementsByClassName("legend-category-item-label")[0]}function oR(t){return t.getElementsByClassName("items-item")}function sR(t){return t.getElementsByClassName(rR)}function cR(t){return t.getElementsByClassName("legend-continuous")}function lR(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function uR(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return Le(this,void 0,void 0,(function*(){const{view:c,update:l,setState:u}=t;u(e,(t=>{const{marks:e}=t,l=e.map((t=>{if("legends"===t.type)return t;const{transform:e=[],data:l=[]}=t,u=e.findIndex((({type:t})=>t.startsWith("group")||t.startsWith("bin"))),f=[...e];l.length&&f.splice(u+1,0,{type:"filter",[n]:{value:r,ordinal:i}});const h=Object.fromEntries(a.map((t=>[t,{domain:c.scale[t].getOptions().domain}])));return Z({},t,Object.assign(Object.assign({transform:f,scale:h},!i&&{animate:!1}),{legend:!s&&Object.fromEntries(o.map((t=>[t,{preserve:!0}])))}))}));return Object.assign(Object.assign({},t),{marks:l})})),yield l()}))}function fR(t,e){for(const n of t)uR(n,Object.assign(Object.assign({},e),{facet:!0}))}function hR(){return(t,e,n)=>{const{container:r}=t,i=e.filter((e=>e!==t)),a=i.length>0,o=t=>lR(t).scales.map((t=>t.name)),s=[...sR(r),...cR(r)],c=s.flatMap(o),l=rt(a?fR:uR,50,{trailing:!0}),u=s.map((e=>{const{name:s,domain:u}=lR(e).scales[0],f={legend:e,channel:s,channels:o(e),allChannels:c};return e.className===rR?function(t,{legends:e,marker:n,label:r,datum:i,filter:a,emitter:o,channel:s,state:c={}}){const l=new Map,u=new Map,f=new Map,{unselected:h={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=c,d={unselected:_r(h,"marker")},p={unselected:_r(h,"label")},{setState:g,removeState:v}=dj(d,void 0),{setState:m,removeState:y}=dj(p,void 0),b=Array.from(e(t));let x=b.map(i);const k=()=>{for(const t of b){const e=i(t),a=n(t),o=r(t);x.includes(e)?(v(a,"unselected"),y(o,"unselected")):(g(a,"unselected"),m(o,"unselected"))}};for(const e of b){const n=()=>{xj(t,"pointer")},r=()=>{kj(t)},c=t=>Le(this,void 0,void 0,(function*(){const n=i(e),r=x.indexOf(n);-1===r?x.push(n):x.splice(r,1),yield a(x),k();const{nativeEvent:c=!0}=t;c&&(x.length===b.length?o.emit("legend:reset",{nativeEvent:c}):o.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:c,data:{channel:s,values:x}})))}));e.addEventListener("click",c),e.addEventListener("pointerenter",n),e.addEventListener("pointerout",r),l.set(e,c),u.set(e,n),f.set(e,r)}const w=t=>Le(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,values:i}=n;r===s&&(x=i,yield a(x),k())})),M=t=>Le(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;e||(x=b.map(i),yield a(x),k())}));return o.on("legend:filter",w),o.on("legend:reset",M),()=>{for(const t of b)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",u.get(t)),t.removeEventListener("pointerout",f.get(t)),o.off("legend:filter",w),o.off("legend:reset",M)}}(r,{legends:oR,marker:iR,label:aR,datum:t=>{const{__data__:e}=t,{index:n}=e;return u[n]},filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});l(a?i:t,n)},state:e.attributes.state,channel:s,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:i}){const a=({detail:{value:t}})=>{n(t),r.emit({nativeEvent:!0,data:{channel:i,values:t}})};return e.addEventListener("valuechange",a),()=>{e.removeEventListener("valuechange",a)}}(0,{legend:e,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!1});l(a?i:t,n)},emitter:n,channel:s})}));return()=>{u.forEach((t=>t()))}}}function dR(){return(t,e,n)=>{const{container:r,view:i,options:a}=t,o=sR(r),s=rj(r),c=t=>lR(t).scales[0].name,l=t=>{const{scale:{[t]:e}}=i;return e},u=gj(a,["active","inactive"]),f=vj(s,hj(i)),h=[];for(const t of o){const e=e=>{const{data:n}=t.attributes,{__data__:r}=e,{index:i}=r;return n[i].label},r=c(t),i=oR(t),a=l(r),o=Un(s,(t=>a.invert(t.__data__[r]))),{state:d={}}=t.attributes,{inactive:p={}}=d,{setState:g,removeState:v}=dj(u,f),m={inactive:_r(p,"marker")},y={inactive:_r(p,"label")},{setState:b,removeState:x}=dj(m),{setState:k,removeState:w}=dj(y),M=t=>{for(const e of i){const n=iR(e),r=aR(e);e===t||null===t?(x(n,"inactive"),w(r,"inactive")):(b(n,"inactive"),k(r,"inactive"))}},O=(t,i)=>{const a=e(i),c=new Set(o.get(a));for(const t of s)c.has(t)?g(t,"active"):g(t,"inactive");M(i);const{nativeEvent:l=!0}=t;l&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:l,data:{channel:r,value:a}}))},E=new Map;for(const t of i){const e=e=>{O(e,t)};t.addEventListener("pointerover",e),E.set(t,e)}const S=t=>{for(const t of s)v(t,"inactive","active");M(null);const{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},A=t=>{const{nativeEvent:n,data:a}=t;if(n)return;const{channel:o,value:s}=a;if(o!==r)return;const c=i.find((t=>e(t)===s));c&&O({nativeEvent:!1},c)},_=t=>{const{nativeEvent:e}=t;e||S({nativeEvent:!1})};t.addEventListener("pointerleave",S),n.on("legend:highlight",A),n.on("legend:unhighlight",_);const T=()=>{t.removeEventListener(S),n.off("legend:highlight",A),n.off("legend:unhighlight",_);for(const[t,e]of E)t.removeEventListener(e)};h.push(T)}return()=>h.forEach((t=>t()))}}function pR(t,e){const[n,r,i,a]=t,[o,s,c,l]=e;return!(o>i||c<n||s>a||l<r)}function gR(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function vR(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const mR=jm((t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:c=10,document:l}=e,u=Pe(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||void 0===i||void 0===a||void 0===n||void 0===r)return;const f=c/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));const{handle:r}=t;return r.attr(e),r},d=_r(Pr(u,"handleNW","handleNE"),"handleN"),{render:p=h}=d,g=Pe(d,["render"]),v=_r(u,"handleE"),{render:m=h}=v,y=Pe(v,["render"]),b=_r(Pr(u,"handleSE","handleSW"),"handleS"),{render:x=h}=b,k=Pe(b,["render"]),w=_r(u,"handleW"),{render:M=h}=w,O=Pe(w,["render"]),E=_r(u,"handleNW"),{render:S=h}=E,A=Pe(E,["render"]),_=_r(u,"handleNE"),{render:T=h}=_,P=Pe(_,["render"]),C=_r(u,"handleSE"),{render:L=h}=C,N=Pe(C,["render"]),j=_r(u,"handleSW"),{render:R=h}=j,I=Pe(j,["render"]),D=t=>()=>{const e=jm((e=>((t,e)=>{const{id:n}=t,r=e(t,t.attributes,l);r.id=n,r.style.draggable=!0})(e,t)));return new e({})},B=pm(t).attr("className",o).style("transform",`translate(${n}, ${r})`).style("draggable",!0);B.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(vR,Object.assign(Object.assign({width:i,height:a},Pr(u,"handle")),{transform:void 0})),B.maybeAppend("handle-n",D(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(vR,g),B.maybeAppend("handle-e",D(m)).style("x",i-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(vR,y),B.maybeAppend("handle-s",D(x)).style("x",f).style("y",a-f).style("width",i-c).style("height",c).style("fill","transparent").call(vR,k),B.maybeAppend("handle-w",D(M)).style("x",-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(vR,O),B.maybeAppend("handle-nw",D(S)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(vR,A),B.maybeAppend("handle-ne",D(T)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(vR,P),B.maybeAppend("handle-se",D(L)).style("x",i-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(vR,N),B.maybeAppend("handle-sw",D(R)).style("x",-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(vR,I)}));function yR(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=gR(t),brushRegion:c=(t,e,n,r,i)=>[t,e,n,r],reverse:l=!1,fill:u="#777",fillOpacity:f="0.3",stroke:h="#fff",selectedHandles:d=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,p=Pe(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let g=null,v=null,m=null,y=null,b=null,x=!1;const[k,w,M,O]=s;xj(t,"crosshair"),t.style.draggable=!0;const E=(t,e,n)=>{if(a(n),y&&y.remove(),b&&b.remove(),g=[t,e],l)return S();A()},S=()=>{b=new qg({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:h,pointerEvents:"none"})}),y=new mR({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(y)},A=()=>{y=new mR({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:h,draggable:!0}),className:"mask"}),t.appendChild(y)},_=(t=!0)=>{y&&y.remove(),b&&b.remove(),g=null,v=null,m=null,x=!1,y=null,b=null,r(t)},T=(t,e,r=!0)=>{const[i,a,o,u]=function(t,e,n,r,i){const[a,o,s,c]=i;return[Math.max(a,Math.min(t,n)),Math.max(o,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[f,h,d,p]=c(i,a,o,u,s);return l?C(f,h,d,p):P(f,h,d,p),n(f,h,d,p,r),[f,h,d,p]},P=(t,e,n,r)=>{y.style.x=t,y.style.y=e,y.style.width=n-t,y.style.height=r-e},C=(t,e,n,r)=>{b.style.d=`\n M${k},${w}L${M},${w}L${M},${O}L${k},${O}Z\n M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z\n `,y.style.x=t,y.style.y=e,y.style.width=n-t,y.style.height=r-e},L={"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"}},N=t=>R(t)||j(t),j=t=>{const{id:e}=t;return-1!==d.indexOf(e)&&new Set(Object.keys(L)).has(e)},R=t=>t===y.getElementById("selection"),I=e=>{const{target:n}=e,[r,i]=lj(t,e);if(!y||!N(n))return E(r,i,e),void(x=!0);N(n)&&(m=[r,i])},D=e=>{const{target:n}=e,r=lj(t,e);if(!g)return;if(!m)return T(g,r);if(R(n))return(t=>{const e=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,n=t[0]-m[0],r=t[1]-m[1],i=e(n,g[0],v[0],k,M),a=e(r,g[1],v[1],w,O),o=[g[0]+i,g[1]+a],s=[v[0]+i,v[1]+a];T(o,s)})(r);const[i,a]=[r[0]-m[0],r[1]-m[1]],{id:o}=n;if(L[o]){const[t,e,n,r]=L[o].vector;return T([g[0]+i*t,g[1]+a*e],[v[0]+i*n,v[1]+a*r])}},B=e=>{if(m){m=null;const{x:t,y:n,width:r,height:i}=y.style;return g=[t,n],v=[t+r,n+i],void o(t,n,t+r,n+i,e)}v=lj(t,e);const[n,r,a,s]=T(g,v);x=!1,i(n,r,a,s,e)},F=t=>{const{target:e}=t;y&&!N(e)&&_()},z=e=>{const{target:n}=e;y&&N(n)&&!x?R(n)?xj(t,"move"):j(n)&&xj(t,L[n.id].cursor):xj(t,"crosshair")},G=()=>{xj(t,"default")};return t.addEventListener("dragstart",I),t.addEventListener("drag",D),t.addEventListener("dragend",B),t.addEventListener("click",F),t.addEventListener("pointermove",z),t.addEventListener("pointerleave",G),{mask:y,move(t,e,n,r,i=!0){y||E(t,e,{}),g=[t,e],v=[n,r],T([t,e],[n,r],i)},remove(t=!0){y&&_(t)},destroy(){y&&_(!1),xj(t,"default"),t.removeEventListener("dragstart",I),t.removeEventListener("drag",D),t.removeEventListener("dragend",B),t.removeEventListener("click",F),t.removeEventListener("pointermove",z),t.removeEventListener("pointerleave",G)}}}function bR(t,e,n){return e.filter((e=>{if(e===t)return!1;const{interaction:r={}}=e.options;return Object.values(r).find((t=>t.brushKey===n))}))}function xR(t,e,n){return bR(t,e,n).map((t=>t.options))}function kR(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:a,brushRegion:o,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:h=t=>t,bboxOf:d=t=>{const{x:e,y:n,width:r,height:i}=t.style;return{x:e,y:n,width:r,height:i}},state:p={},emitter:g}=e,v=Pe(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const m=n(t),y=i(t),b=y.flatMap(n),x=vj(m,a),k=_r(v,"mask"),{setState:w,removeState:M}=dj(p,x),O=new Map,{width:E,height:S,x:A=0,y:_=0}=d(t),T=s||[0,0,E,S],P=()=>{for(const t of[...m,...b])M(t,"active","inactive")},C=(t,e,n,r)=>{var i;for(const t of y)null===(i=t.brush)||void 0===i||i.remove();const a=new Set;for(const i of m){const{min:o,max:s}=i.getLocalBounds(),[c,l]=o,[u,f]=s;pR([c,l,u,f],[t,e,n,r])?(w(i,"active"),a.add(h(i))):w(i,"inactive")}for(const t of b)a.has(h(t))?w(t,"active"):w(t,"inactive")},L=()=>{for(const t of m)M(t,"inactive");for(const t of O.values())t.remove();O.clear()},N=(e,n,r,i)=>{const a=t=>{const e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),O.set(t,e),e},o=new Qg({style:{x:e+A,y:n+_,width:r-e,height:i-n}});t.appendChild(o);for(const t of m){const e=O.get(t)||a(t);e.style.clipPath=o,w(t,"inactive"),w(e,"active")}},j=yR(t,Object.assign(Object.assign({},k),{extent:T,brushRegion:o,reverse:c,selectedHandles:r,brushended:t=>{const e=f?L:P;t&&g.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{const a=yS(t,e,n,r,l,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:a}});(f?N:C)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{const a=yS(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:a}}))},brushupdated:(t,e,n,r,i)=>{const a=yS(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:a}}))},brushstarted:t=>{g.emit("brush:start",t)}})),R=({nativeEvent:t,data:e})=>{if(t)return;const{selection:n}=e,[r,i,a,o]=function(t,e,n){const{x:r,y:i}=e,[a,o]=t,s=bS(a,r),c=bS(o,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,h]=n.map(l),[d,p]=n.map(u);return[f,h,d,p]}(n,l,u);j.move(r,i,a,o,!1)};g.on("brush:highlight",R);const I=({nativeEvent:t}={})=>{t||j.remove(!1)};g.on("brush:remove",I);const D=j.destroy.bind(j);return j.destroy=()=>{g.off("brush:highlight",R),g.off("brush:remove",I),D()},j}function wR(t){var{facet:e,brushKey:n}=t,r=Pe(t,["facet","brushKey"]);return(t,i,a)=>{const{container:o,view:s,options:c}=t,l=oj(o),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=s;if(e){const e=l.getBounds(),n=e.min[0],o=e.min[1],s=e.max[0],c=e.max[1];return kR(l.parentNode.parentNode,Object.assign(Object.assign({elements:()=>ij(t,i),datum:hj(aj(t,i).map((t=>t.view))),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,o,s,c],state:gj(aj(t,i).map((t=>t.options)),f),emitter:a,scale:h,coordinate:d,selectedHandles:void 0},u),r))}const p=kR(l,Object.assign(Object.assign({elements:rj,key:t=>t.__data__.key,siblings:()=>function(t,e,n){return bR(t,e,n).map((t=>oj(t.container)))}(t,i,n),datum:hj([s,...bR(t,i,n).map((t=>t.view))]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:gj([c,...xR(t,i,n)],f),emitter:a,scale:h,coordinate:d,selectedHandles:void 0},u),r));return l.brush=p,()=>p.destroy()}}function MR(t,e,n,r,i){const[,a,,o]=i;return[t,a,n,o]}function OR(t){return wR(Object.assign(Object.assign({},t),{brushRegion:MR,selectedHandles:["handle-e","handle-w"]}))}function ER(t,e,n,r,i){const[a,,o]=i;return[a,e,o,r]}function SR(t){return wR(Object.assign(Object.assign({},t),{brushRegion:ER,selectedHandles:["handle-n","handle-s"]}))}const AR="axis-hot-area";function _R(t){return t.getElementsByClassName("axis")}function TR(t){return t.getElementsByClassName("axis-line")[0]}function PR(t){return function(t){return t.getElementsByClassName("axis-main-group")[0]}(t).getLocalBounds()}function CR(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=Pe(e,["cross","offsetX","offsetY"]);const o=PR(t),s=TR(t),[c]=s.getLocalBounds().min,[l,u]=o.min,[f,h]=o.max,d=2*(f-l);return{brushRegion:ER,hotZone:new Qg({className:AR,style:Object.assign({width:n?d/2:d,transform:`translate(${(n?l:c-d/2).toFixed(2)}, ${u})`,height:h-u},a)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,i)=>[Math.floor(l-r),e,Math.ceil(f-r),i]}}function LR(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=Pe(e,["offsetY","offsetX","cross"]);const o=PR(t),s=TR(t),[,c]=s.getLocalBounds().min,[l,u]=o.min,[f,h]=o.max,d=h-u;return{brushRegion:MR,hotZone:new Qg({className:AR,style:Object.assign({width:f-l,height:i?d:2*d,transform:`translate(${l}, ${i?u:c-d})`},a)}),extent:i?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,i)=>[t,Math.floor(u-n),r,Math.ceil(h-n)]}}function NR(t){return(e,n,r)=>{const{container:i,view:a,options:o}=e,s=oj(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=a;return function(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:h}=e,d=Pe(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),g=n(t),v=vj(p,o),{setState:m,removeState:y}=dj(u,v),b=new Map,x=_r(d,"mask"),k=t=>Array.from(b.values()).every((([e,n,r,i])=>t.some((([t,a])=>t>=e&&t<=r&&a>=n&&a<=i)))),w=g.map((t=>t.attributes.scale)),M=t=>t.length>2?[t[0],t[t.length-1]]:t,O=new Map,E=()=>{O.clear();for(let t=0;t<g.length;t++){const e=w[t],{domain:n}=e.getOptions();O.set(t,M(n))}};E();const S=(t,e)=>{const n=[];for(const t of p){const e=i(t);k(e)?(m(t,"active"),n.push(t)):m(t,"inactive")}O.set(t,_(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!T)return Array.from(O.values());const t=[];for(const[e,n]of O){const r=w[e],{name:i}=r.getOptions();"x"===i?t[0]=n:t[1]=n}return t})()}})},A=t=>{for(const t of p)y(t,"active","inactive");E(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},_=(t,e)=>{const n=w[e],{name:r}=n.getOptions(),i=t.map((t=>{const e=t.__data__;return n.invert(e[r])}));return M(mS(n,i))},T=g.some(a)&&g.some((t=>!a(t))),P=[];for(let t=0;t<g.length;t++){const e=g[t],n=a(e)?LR:CR,{hotZone:r,brushRegion:i,extent:o}=n(e,{offsetY:s,offsetX:c,cross:T,zIndex:999,fill:"transparent"});e.parentNode.appendChild(r);const u=yR(r,Object.assign(Object.assign({},x),{reverse:l,brushRegion:i,brushended(n){b.delete(e),0===Array.from(b.entries()).length?A(n):S(t,n)},brushed(n,r,i,a,s){b.set(e,o(n,r,i,a)),S(t,s)}}));P.push(u)}const C=(t={})=>{const{nativeEvent:e}=t;e||P.forEach((t=>t.remove(!1)))},L=(t,e,n)=>{const[r,i]=t,o=N(r,e,n),s=N(i,e,n)+(t=>t.getStep?t.getStep():0)(e);return a(n)?[o,-1/0,s,1/0]:[-1/0,o,1/0,s]},N=(t,e,n)=>{const{height:r,width:i}=h.getOptions(),o=e.clone();return a(n)?o.update({range:[0,i]}):o.update({range:[r,0]}),o.map(t)},j=t=>{const{nativeEvent:e}=t;if(e)return;const{selection:n}=t.data;for(let t=0;t<P.length;t++){const e=n[t],r=P[t],i=g[t];if(e){const n=w[t];r.move(...L(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",C),f.on("brushAxis:highlight",j),()=>{P.forEach((t=>t.destroy())),f.off("brushAxis:remove",C),f.off("brushAxis:highlight",j)}}(i,Object.assign({elements:rj,axes:_R,offsetY:l,offsetX:c,points:t=>t.__data__.points,horizontal:t=>{const{startPos:[e,n],endPos:[r,i]}=t.attributes;return e!==r&&n===i},datum:hj(a),state:gj(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}function jR(t){var{hideX:e=!0,hideY:n=!0}=t,r=Pe(t,["hideX","hideY"]);return(t,i,a)=>{const{container:o,view:s,options:c,update:l,setState:u}=t,f=oj(o);let h=!1,d=!1,p=s;const{scale:g,coordinate:v}=s;return function(t,e){var{filter:n,reset:r,brushRegion:i,extent:a,reverse:o,emitter:s,scale:c,coordinate:l,selection:u,series:f=!1}=e;const h=_r(Pe(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:d,height:p}=t.getBBox(),g=a||[0,0,d,p],v=function(t=300){let e=null;return n=>{const{timeStamp:r}=n;return null!==e&&r-e<t?(e=r,!0):(e=r,!1)}}(),m=yR(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:function(t,e,r,i,a){a.nativeEvent=!0,n(u(t,e,r,i),a),m.remove()}}));function y(t){v(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",y);const b=({nativeEvent:t,data:e})=>{if(t)return;const{selection:r}=e;n(r,{nativeEvent:!1})};return s.on("brush:filter",b),()=>{m.destroy(),s.off("brush:filter",b),t.removeEventListener("click",y)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{const{scale:i,coordinate:a}=p;return yS(t,e,n,r,i,a)},filter:(t,r)=>Le(this,void 0,void 0,(function*(){if(d)return;d=!0;const[i,o]=t;u("brushFilter",(t=>{const{marks:r}=t,a=r.map((t=>Z({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:i,nice:!1},y:{domain:o,nice:!1}}})));return Object.assign(Object.assign({},c),{marks:a,clip:!0})})),a.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[i,o]}}));const s=yield l();p=s.view,d=!1,h=!0})),reset:t=>{if(d||!h)return;const{scale:e}=s,{x:n,y:r}=e,i=n.getOptions().domain,o=r.getOptions().domain;a.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[i,o]}})),h=!1,p=s,u("brushFilter"),l()},extent:void 0,emitter:a,scale:g,coordinate:v},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function RR(t){return jR(Object.assign(Object.assign({hideX:!0},t),{brushRegion:MR}))}function IR(t){return jR(Object.assign(Object.assign({hideY:!0},t),{brushRegion:ER}))}function DR(t,e,n,r=!1,i="x",a="y"){const{marks:o}=t,s=o.map((t=>{var o,s;return Z({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:e,[n]:Object.assign(Object.assign({},(null===(o=t[n])||void 0===o?void 0:o[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),(null===(s=t[n])||void 0===s?void 0:s[a])&&{[a]:{preserve:!0}}),animate:!1})}));return Object.assign(Object.assign({},t),{marks:s,clip:!0,animate:!1})}function BR(t,e,n){const[r,i]=t,a=n?t=>1-t:t=>t;return mS(e,[vS(e,a(r),!0),vS(e,a(i),!1)])}function FR(t){return[t[0],t[t.length-1]]}function zR({initDomain:t={},className:e="slider",prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1,getInitValues:c=t=>{var e;const n=null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.values;if(0!==n[0]||1!==n[1])return n}}){return(l,u,f)=>{const{container:h,view:d,update:p,setState:g}=l,v=h.getElementsByClassName(e);if(!v.length)return()=>{};let m=!1;const{scale:y,coordinate:b,layout:x}=d,{paddingLeft:k,paddingTop:w,paddingBottom:M,paddingRight:O}=x,{x:E,y:S}=y,A=zc(b),_=t=>{const e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return A?[n,e]:[e,n]},T=new Map,P=new Set,C={x:t.x||E.getOptions().domain,y:t.y||S.getOptions().domain};for(const t of v){const{orientation:e}=t.attributes,[l,u]=_(e),h=`${n}${G(l)}:filter`,d="x"===l,{ratio:v}=E.getOptions(),{ratio:b}=S.getOptions(),x=t=>{if(t.data){const{selection:e}=t.data,[n=FR(C.x),r=FR(C.y)]=e;return d?[mS(E,n,v),mS(S,r,b)]:[mS(S,r,b),mS(E,n,v)]}const{value:n}=t.detail;return[BR(n,y[l],A&&"horizontal"===e),C[u]]},L=rt((e=>Le(this,void 0,void 0,(function*(){const{initValue:r=!1}=e;if(m&&!r)return;m=!0;const{nativeEvent:a=!0}=e,[o,s]=x(e);if(C[l]=o,C[u]=s,a){const t=d?o:s,n=d?s:o;f.emit(h,Object.assign(Object.assign({},e),{nativeEvent:a,data:{selection:[FR(t),FR(n)]}}))}g(t,(t=>Object.assign(Object.assign({},DR(t,{[l]:{domain:o,nice:!1}},n,i,l,u)),{paddingLeft:k,paddingTop:w,paddingBottom:M,paddingRight:O}))),yield p(),m=!1}))),a,{leading:o,trailing:s}),N=e=>{const{nativeEvent:n}=e;if(n)return;const{data:i}=e,{selection:a}=i,[o,s]=a;t.dispatchEvent(new Rp("valuechange",{data:i,nativeEvent:!1}));const c=d?bS(o,E):bS(s,S);r(t,c)};f.on(h,N),t.addEventListener("valuechange",L),T.set(t,L),P.add([h,N]);const j=c(t);j&&t.dispatchEvent(new Rp("valuechange",{detail:{value:j},nativeEvent:!1,initValue:!0}))}return()=>{for(const[t,e]of T)t.removeEventListener("valuechange",e);for(const[t,e]of P)f.off(t,e)}}}const GR="g2-scrollbar";function WR(t={}){return(e,n,r)=>{const{view:i,container:a}=e;if(!a.getElementsByClassName(GR).length)return()=>{};const{scale:o}=i,{x:s,y:c}=o,l={x:[...s.getOptions().domain],y:[...c.getOptions().domain]};s.update({domain:s.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain});return zR(Object.assign(Object.assign({},t),{initDomain:l,className:GR,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0]),getInitValues:t=>{const e=t.slider.attributes.values;if(0!==e[0])return e}}))(e,n,r)}}function $R(t,e,n){return`<${t} style="${Object.entries(n).map((([t,e])=>{return`${n=t,n.replace(/([A-Z])/g,"-$1").toLowerCase()}:${e}`;var n})).join(";")}">${e}</${t}>`}const YR={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 HR(t){return"text"===t.nodeName&&!!t.isOverflowing()}function VR(t){var{offsetX:e=8,offsetY:n=8}=t,r=Pe(t,["offsetX","offsetY"]);return t=>{const{container:i}=t,[a,o]=i.getBounds().min,s=_r(r,"tip"),c=new Set,l=t=>{const{target:r}=t;if(!HR(r))return void t.stopPropagation();const{offsetX:l,offsetY:u}=t,f=l+e-a,h=u+n-o;if(r.tip)return r.tip.style.x=f,void(r.tip.style.y=h);const{text:d}=r.style,p=new Wg({className:"poptip",style:{innerHTML:$R("div",d,Object.assign(Object.assign({},YR),s)),x:f,y:h}});i.appendChild(p),r.tip=p,c.add(p)},u=t=>{const{target:e}=t;HR(e)?e.tip&&(e.tip.remove(),e.tip=null,c.delete(e.tip)):t.stopPropagation()};return i.addEventListener("pointerover",l),i.addEventListener("pointerout",u),()=>{i.removeEventListener("pointerover",l),i.removeEventListener("pointerout",u),c.forEach((t=>t.remove()))}}}VR.props={reapplyWhenUpdate:!0};const qR={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function UR(t={}){const{originData:e=[],layout:n}=t,r=Pe(t,["originData","layout"]),i=Z({},qR,r),a=_r(i,"breadCrumb"),o=_r(i,"active");return t=>{const{update:r,setState:i,container:s,options:c}=t,l=function(t){return pm(t).select(`.${rA}`).node()}(s),u=c.marks[0],{state:f}=u,h=new zg;l.appendChild(h);const d=(t,c)=>Le(this,void 0,void 0,(function*(){if(h.removeChildren(),c){let e="",n=a.y,r=0;const i=[],s=l.getBBox().width,c=t.map(((o,c)=>{e=`${e}${o}/`,i.push(o);const l=new tv({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:o,x:r,path:[...i],depth:c},a),{y:n})});h.appendChild(l),r+=l.getBBox().width;const u=new tv({style:Object.assign(Object.assign({x:r,text:" / "},a),{y:n})});return h.appendChild(u),r+=u.getBBox().width,r>s&&(n=h.getBBox().height+a.y,r=0,l.attr({x:r,y:n}),r+=l.getBBox().width,u.attr({x:r,y:n}),r+=u.getBBox().width),c===ot(t)-1&&u.remove(),l}));c.forEach(((t,e)=>{if(e===ot(c)-1)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",(()=>{t.attr(o)})),t.addEventListener("mouseleave",(()=>{t.attr(n)})),t.addEventListener("click",(()=>{d(tt(t,["style","path"]),tt(t,["style","depth"]))}))}))}!function(t,e){[...sR(t),...cR(t)].forEach((t=>{e(t,(t=>t))}))}(s,i),i("treemapDrillDown",(r=>{const{marks:i}=r,a=t.join("/"),o=i.map((t=>{if("rect"!==t.type)return t;let r=e;if(c){const t=e.filter((t=>{const e=tt(t,["id"]);return e&&(e.match(`${a}/`)||a.match(e))})).map((t=>({value:0===t.height?tt(t,["value"]):void 0,name:tt(t,["id"])}))),{paddingLeft:i,paddingBottom:o,paddingRight:s}=n,l=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||h.getBBox().height+10)/(c+1),paddingLeft:i/(c+1),paddingBottom:o/(c+1),paddingRight:s/(c+1),path:t=>t.name,layer:t=>t.depth===c+1});r=zO(t,l,{value:"value"})[0]}else r=e.filter((t=>1===t.depth));const i=[];return r.forEach((({path:t})=>{i.push(L(t))})),Z({},t,{data:r,scale:{color:{domain:i}}})}));return Object.assign(Object.assign({},r),{marks:o})})),yield r(void 0,["legendFilter"])})),p=t=>{const n=t.target;if("rect"!==tt(n,["markType"]))return;const r=tt(n,["__data__","key"]),i=A(e,(t=>t.id===r));tt(i,"height")&&d(tt(i,"path"),tt(i,"depth"))};l.addEventListener("click",p);const g=w(Object.assign(Object.assign({},f.active),f.inactive)),v=()=>{Ej(l).forEach((t=>{const n=tt(t,["style","cursor"]),r=A(e,(e=>e.id===tt(t,["__data__","key"])));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";const e=function(t,e){if(null===t||!S(t))return{};var n={};return k(e,(function(e){et.call(t,e)&&(n[e]=t[e])})),n}(t.attributes,g);t.addEventListener("mouseenter",(()=>{t.attr(f.active)})),t.addEventListener("mouseleave",(()=>{t.attr(Z(e,f.inactive))}))}}))};return v(),l.addEventListener("mousemove",v),()=>{h.remove(),l.removeEventListener("click",p),l.removeEventListener("mousemove",v)}}}const XR={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},ZR="movePoint",KR=t=>{const e=t.target,{markType:n}=e;"line"===n&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),"interval"===n&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},QR=t=>{const e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},JR=(t,e,n)=>{t.forEach(((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)}))},tI=(t,e,n,r)=>{const i=new qg({style:n}),a=new tv({style:r});return e.appendChild(a),t.appendChild(i),[i,a]},eI=(t,e)=>{if(!tt(t,["options","range","indexOf"]))return;const n=t.options.range.indexOf(e);return t.sortedDomain[n]},nI=(t,e,n)=>{const r=Mj(t,e),i=Mj(t,n)/r;return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]};function rI(t={}){const{selection:e=[],precision:n=2}=t,r=Pe(t,["selection","precision"]),i=Object.assign(Object.assign({},XR),r||{}),a=_r(i,"path"),o=_r(i,"label"),s=_r(i,"point");return(t,r,i)=>{const{update:c,setState:l,container:u,view:f,options:{marks:h,coordinate:d}}=t,p=oj(u);let g,v=Ej(p),m=e;const{transform:y=[],type:b}=d,x=!!A(y,(({type:t})=>"transpose"===t)),k="polar"===b,w="theta"===b,M=!!A(v,(({markType:t})=>"area"===t));M&&(v=v.filter((({markType:t})=>"area"===t)));const O=new zg({style:{zIndex:2}});p.appendChild(O);const E=()=>{i.emit("element-point:select",{nativeEvent:!0,data:{selection:m}})},S=t=>{const e=t.target;m=[e.parentNode.childNodes.indexOf(e)],E(),T(e)},_=t=>{const{data:{selection:e},nativeEvent:n}=t;if(n)return;m=e;const r=tt(v,[null==m?void 0:m[0]]);r&&T(r)},T=t=>{const{attributes:e,markType:r,__data__:d}=t,{stroke:p}=e,{points:v,seriesTitle:y,color:b,title:S,seriesX:_,y1:P}=d;if(x&&"interval"!==r)return;const{scale:C,coordinate:L}=(null==g?void 0:g.view)||f,{color:N,y:j,x:R}=C,I=L.getCenter();let D;O.removeChildren();const B=(t,e,n,r)=>Le(this,void 0,void 0,(function*(){return l("elementPointMove",(a=>{var o;const s=((null===(o=null==g?void 0:g.options)||void 0===o?void 0:o.marks)||h).map((a=>{if(!r.includes(a.type))return a;const{data:o,encode:s}=a,c=Object.keys(s).reduce(((r,i)=>{const a=s[i];return"x"===i&&(r[a]=t),"y"===i&&(r[a]=e),"color"===i&&(r[a]=n),r}),{}),l=((t,e,n)=>e.map((e=>{const r=["x","color"].reduce(((r,i)=>{const a=n[i];return a?e[a]===t[a]&&r:r}),!0);return r?Object.assign(Object.assign({},e),t):e})))(c,o,s);return((t,e)=>{i.emit("element-point:moved",{nativeEvent:!0,data:{changeData:t,data:e}})})(c,l),Z({},a,{data:l,animate:!1})}));return Object.assign(Object.assign({},a),{marks:s})})),yield c("elementPointMove")}));if(["line","area"].includes(r))v.forEach(((e,r)=>{const i=R.invert(_[r]);if(!i)return;const c=new Ig({name:ZR,style:Object.assign({cx:e[0],cy:e[1],fill:p},s)}),l=((t,e)=>{const n=tt(t,["__data__","seriesItems",e,"0","value"]),r=tt(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:a,transform:o}}=t.parentNode,s=A(o,(({type:t})=>"normalizeY"===t)),c=tt(a,["y","field"]),l=i[r][c];return t=>s?1===n?t:t/(1-t)/(n/(1-n))*l:t})(t,r);c.addEventListener("mousedown",(f=>{const h=L.output([_[r],0]),d=null==y?void 0:y.length;u.attr("cursor","move"),m[1]!==r&&(m[1]=r,E()),JR(O.childNodes,m,s);const[p,x]=tI(O,c,a,o),w=t=>{const i=e[1]+t.clientY-D[1];if(M)if(k){const a=e[0]+t.clientX-D[0],[o,s]=nI(I,h,[a,i]),[,u]=L.output([1,j.output(0)]),[,f]=L.invert([o,u-(v[r+d][1]-s)]),g=(r+1)%d,m=Oj([v[(r-1+d)%d],[o,s],y[g]&&v[g]]);x.attr("text",l(j.invert(f)).toFixed(n)),p.attr("d",m),c.attr("cx",o),c.attr("cy",s)}else{const[,t]=L.output([1,j.output(0)]),[,a]=L.invert([e[0],t-(v[r+d][1]-i)]),o=Oj([v[r-1],[e[0],i],y[r+1]&&v[r+1]]);x.attr("text",l(j.invert(a)).toFixed(n)),p.attr("d",o),c.attr("cy",i)}else{const[,t]=L.invert([e[0],i]),a=Oj([v[r-1],[e[0],i],v[r+1]]);x.attr("text",j.invert(t).toFixed(n)),p.attr("d",a),c.attr("cy",i)}};D=[f.clientX,f.clientY],window.addEventListener("mousemove",w);const S=()=>Le(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),window.removeEventListener("mousemove",w),u.removeEventListener("mouseup",S),$(x.attr("text")))return;const e=Number(x.attr("text")),n=eI(N,b);g=yield B(i,e,n,["line","area"]),x.remove(),p.remove(),T(t)}));u.addEventListener("mouseup",S)})),O.appendChild(c)})),JR(O.childNodes,m,s);else if("interval"===r){let e=[(v[0][0]+v[1][0])/2,v[0][1]];x?e=[v[0][0],(v[0][1]+v[1][1])/2]:w&&(e=v[0]);const i=(t=>{const e=tt(t,["__data__","y"]),n=tt(t,["__data__","y1"])-e,{__data__:{data:r,encode:i,transform:a},childNodes:o}=t.parentNode,s=A(a,(({type:t})=>"normalizeY"===t)),c=tt(i,["y","field"]),l=r[o.indexOf(t)][c];return(t,e=!1)=>s||e?t/(1-t)/(n/(1-n))*l:t})(t),c=new Ig({name:ZR,style:Object.assign(Object.assign({cx:e[0],cy:e[1],fill:p},s),{stroke:s.activeStroke})});c.addEventListener("mousedown",(s=>{u.attr("cursor","move");const l=eI(N,b),[f,h]=tI(O,c,a,o),d=t=>{if(x){const r=e[0]+t.clientX-D[0],[a]=L.output([j.output(0),j.output(0)]),[,o]=L.invert([a+(r-v[2][0]),e[1]]),s=Oj([[r,v[0][1]],[r,v[1][1]],v[2],v[3]],!0);h.attr("text",i(j.invert(o)).toFixed(n)),f.attr("d",s),c.attr("cx",r)}else if(w){const r=e[1]+t.clientY-D[1],a=e[0]+t.clientX-D[0],[o,s]=nI(I,[a,r],e),[l,u]=nI(I,[a,r],v[1]),d=L.invert([o,s])[1],p=P-d;if(p<0)return;const g=function(t,e,n=0){const r=[["M",...e[1]]],i=Mj(t,e[1]),a=Mj(t,e[0]);return 0===i?r.push(["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]),r}(I,[[o,s],[l,u],v[2],v[3]],p>.5?1:0);h.attr("text",i(p,!0).toFixed(n)),f.attr("d",g),c.attr("cx",o),c.attr("cy",s)}else{const r=e[1]+t.clientY-D[1],[,a]=L.output([1,j.output(0)]),[,o]=L.invert([e[0],a-(v[2][1]-r)]),s=Oj([[v[0][0],r],[v[1][0],r],v[2],v[3]],!0);h.attr("text",i(j.invert(o)).toFixed(n)),f.attr("d",s),c.attr("cy",r)}};D=[s.clientX,s.clientY],window.addEventListener("mousemove",d);const p=()=>Le(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),u.removeEventListener("mouseup",p),window.removeEventListener("mousemove",d),$(h.attr("text")))return;const e=Number(h.attr("text"));g=yield B(S,e,l,[r]),h.remove(),f.remove(),T(t)}));u.addEventListener("mouseup",p)})),O.appendChild(c)}};v.forEach(((t,e)=>{m[0]===e&&T(t),t.addEventListener("click",S),t.addEventListener("mouseenter",KR),t.addEventListener("mouseleave",QR)}));const P=t=>{const e=null==t?void 0:t.target;e&&(e.name===ZR||v.includes(e))||(m=[],E(),O.removeChildren())};return i.on("element-point:select",_),i.on("element-point:unselect",P),u.addEventListener("mousedown",P),()=>{O.remove(),i.off("element-point:select",_),i.off("element-point:unselect",P),u.removeEventListener("mousedown",P),v.forEach((t=>{t.removeEventListener("click",S),t.removeEventListener("mouseenter",KR),t.removeEventListener("mouseleave",QR)}))}}}var iI={},aI={};function oI(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function sI(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function cI(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function lI(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+cI(-t,6):t>9999?"+"+cI(t,6):cI(t,4)}(t.getUTCFullYear())+"-"+cI(t.getUTCMonth()+1,2)+"-"+cI(t.getUTCDate(),2)+(i?"T"+cI(e,2)+":"+cI(n,2)+":"+cI(r,2)+"."+cI(i,3)+"Z":r?"T"+cI(e,2)+":"+cI(n,2)+":"+cI(r,2)+"Z":n||e?"T"+cI(e,2)+":"+cI(n,2)+"Z":"")}function uI(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,l=!1;function u(){if(c)return aI;if(l)return l=!1,iI;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=u())!==aI;){for(var f=[];r!==iI&&r!==aI;)f.push(r),r=u();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?lI(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=oI(t);return function(r,i){return e(n(r),i,t)}}(t,e):oI(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=sI(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=sI(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function fI(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;hI&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const hI=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),dI=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>Le(void 0,void 0,void 0,(function*(){const t=yield fetch(e);if("csv"===n){const e=yield t.text();return uI(r).parse(e,i?fI:kr)}if("json"===n)return yield t.json();throw new Error(`Unknown format: ${n}.`)}))};dI.props={};const pI=t=>{const{fields:e,key:n="key",value:r="value"}=t;return t=>{return(i=e)&&0!==Object.keys(i).length?t.flatMap((t=>e.map((e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))))):t;var i}};function gI(t){return null!=t&&!Number.isNaN(t)}pI.props={};const vI=t=>{const{callback:e=gI}=t;return t=>t.filter(e)};vI.props={};const mI=t=>{const{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};mI.props={};const yI=t=>{const{fields:e}=t;return t=>t.map((t=>function(t,e=[]){return e.reduce(((e,n)=>(n in t&&(e[n]=t[n]),e)),{})}(t,e)))};yI.props={};const bI=t=>e=>{if(!t||(n=t,0===Object.keys(n).length))return e;var n;return e.map((e=>Object.entries(e).reduce(((e,[n,r])=>(e[t[n]||n]=r,e)),{})))};bI.props={};const xI=t=>{const{fields:e=[]}=t,n=(r=!0,e.map((t=>{if(Array.isArray(t)){const[e,n=r]=t;return[e,n]}return[t,r]})));var r;return t=>[...t].sort(((t,e)=>n.reduce(((n,[r,i=!0])=>0!==n?n:i?t[r]<e[r]?-1:+(t[r]!==e[r]):t[r]>e[r]?-1:+(t[r]!==e[r])),0)))};xI.props={};const kI=t=>{const{value:e}=t;return()=>e};kI.props={};const wI=t=>{const{callback:e=kr}=t;return t=>e(t)};wI.props={};const MI=t=>{const{callback:e=kr}=t;return t=>Array.isArray(t)?t.map(e):t};MI.props={};const OI=Math.PI/180,EI=2048;function SI(t){return t.text}function AI(){return"serif"}function _I(){return"normal"}function TI(t){return t.value}function PI(){return 90*~~(2*Math.random())}function CI(){return 1}function LI(){}function NI(t,e,n,r){if(e.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,2048/a,EI/a);let o=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/a)+"px "+e.font;let t=i.measureText(e.text+"m").width*a,l=e.size<<1;if(e.rotate){const n=Math.sin(e.rotate*OI),r=Math.cos(e.rotate*OI),i=t*r,a=t*n,o=l*r,s=l*n;t=Math.max(Math.abs(i+s),Math.abs(i-s))+31>>5<<5,l=~~Math.max(Math.abs(a+o),Math.abs(a-o))}else t=t+31>>5<<5;if(l>c&&(c=l),o+t>=2048&&(o=0,s+=c,c=0),s+l>=EI)break;i.translate((o+(t>>1))/a,(s+(l>>1))/a),e.rotate&&i.rotate(e.rotate*OI),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=l,e.xoff=o,e.yoff=s,e.x1=t>>1,e.y1=l>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=t}const u=i.getImageData(0,0,2048/a,EI/a).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;const t=e.width,i=t>>5;let a=e.y1-e.y0;for(let t=0;t<a*i;t++)f[t]=0;if(o=e.xoff,null==o)return;s=e.yoff;let c=0,l=-1;for(let n=0;n<a;n++){for(let e=0;e<t;e++){const t=i*n+(e>>5),r=u[2048*(s+n)+(o+e)<<2]?1<<31-e%32:0;f[t]|=r,c|=r}c?l=n:(e.y0++,a--,n--,s++)}e.y1=e.y0+l,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}function jI(t,e,n){n>>=5;const r=t.sprite,i=t.width>>5,a=t.x-(i<<4),o=127&a,s=32-o,c=t.y1-t.y0;let l,u=(t.y+t.y0)*n+(a>>5);for(let t=0;t<c;t++){l=0;for(let n=0;n<=i;n++)if((l<<s|(n<i?(l=r[t*i+n])>>>o:0))&e[u+n])return!0;u+=n}return!1}function RI(t,e){const n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function II(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function DI(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function BI(){return document.createElement("canvas")}function FI(t){return"function"==typeof t?t:function(){return t}}const zI={archimedean:II,rectangular:function(t){const e=4*t[0]/t[1];let n=0,r=0;return function(t){const i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};function GI(){let t=[256,256],e=SI,n=AI,r=TI,i=_I,a=PI,o=CI,s=II,c=Math.random,l=LI,u=[],f=null,h=1/0,d=BI;const p=_I,g={};function v(e,n,r){const i=n.x,a=n.y,o=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=s(t),u=c()<.5?1:-1;let f,h,d,p=-u;for(;(f=l(p+=u))&&(h=~~f[0],d=~~f[1],!(Math.min(Math.abs(h),Math.abs(d))>=o));)if(n.x=i+h,n.y=a+d,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&jI(n,e,t[0])||r&&(v=r,!((g=n).x+g.x1>v[0].x&&g.x+g.x0<v[1].x&&g.y+g.y1>v[0].y&&g.y+g.y0<v[1].y)))){const r=n.sprite,i=n.width>>5,a=t[0]>>5,o=n.x-(i<<4),s=127&o,c=32-s,l=n.y1-n.y0;let u,f=(n.y+n.y0)*a+(o>>5);for(let t=0;t<l;t++){u=0;for(let n=0;n<=i;n++)e[f+n]|=u<<c|(n<i?(u=r[t*i+n])>>>s:0);f+=a}return delete n.sprite,!0}var g,v;return!1}return g.start=function(){const[s,m]=t,y=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=EI/e;const n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",n.textBaseline="middle",{context:n,ratio:e}}(d()),b=g.board?g.board:DI((t[0]>>5)*t[1]),x=u.length,k=[],w=u.map((function(t,s,c){return t.text=e.call(this,t,s,c),t.font=n.call(this,t,s,c),t.style=p.call(this,t,s,c),t.weight=i.call(this,t,s,c),t.rotate=a.call(this,t,s,c),t.size=~~r.call(this,t,s,c),t.padding=o.call(this,t,s,c),t})).sort((function(t,e){return e.size-t.size}));let M=-1,O=g.board?[{x:0,y:0},{x:s,y:m}]:void 0;function E(){const e=Date.now();for(;Date.now()-e<h&&++M<x;){const e=w[M];e.x=s*(c()+.5)>>1,e.y=m*(c()+.5)>>1,NI(y,e,w,M),e.hasText&&v(b,e,O)&&(l.call(null,"word",{cloud:g,word:e}),k.push(e),O?g.hasImage||RI(O,e):O=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}g._tags=k,g._bounds=O,M>=x&&(g.stop(),l.call(null,"end",{cloud:g,words:k,bounds:O}))}return f&&clearInterval(f),f=setInterval(E,0),E(),g},g.stop=function(){return f&&(clearInterval(f),f=null),g},g.createMask=e=>{const n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;const a=r>>5,o=DI((r>>5)*i);n.width=r,n.height=i;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,i);const c=s.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=a*t+(e>>5),i=t*r+e<<2,s=c[i]>=250&&c[i+1]>=250&&c[i+2]>=250?1<<31-e%32:0;o[n]|=s}g.board=o,g.hasImage=!0},g.timeInterval=function(t){h=null==t?1/0:t},g.words=function(t){u=t},g.size=function(e=[]){t=[+e[0],+e[1]]},g.text=function(t){e=FI(t)},g.font=function(t){n=FI(t)},g.fontWeight=function(t){i=FI(t)},g.rotate=function(t){a=FI(t)},g.canvas=function(t){d=FI(t)},g.spiral=function(t){s=zI[t]||t},g.fontSize=function(t){r=FI(t)},g.padding=function(t){o=FI(t)},g.random=function(t){c=FI(t)},g.on=function(t){l=FI(t)},g}const WI={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return 30*(~~(6*Math.random())-3)}};function $I(t){return new Promise(((e,n)=>{if(t instanceof HTMLImageElement)e(t);else{if("string"==typeof t){const r=new Image;return r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),void(r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()})}n()}}))}const YI=(t,e)=>n=>Le(void 0,void 0,void 0,(function*(){const r=Object.assign({},WI,t,{canvas:e.createCanvas}),i=GI();var a,o;yield(a=i,o=r,{set(t,e,n){if(void 0===o[t])return this;const r=e?e.call(null,o[t]):o[t];return n?n.call(null,r):"function"==typeof a[t]?a[t](r):a[t]=r,this},setAsync(t,e,n){return Le(this,void 0,void 0,(function*(){if(void 0===o[t])return this;const r=e?yield e.call(null,o[t]):o[t];return n?n.call(null,r):"function"==typeof a[t]?a[t](r):a[t]=r,this}))}}).set("fontSize",(t=>{const e=n.map((t=>t.value));return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[i,a]=e;return a===i?()=>(r+n)/2:({value:t})=>(r-n)/(a-i)*(t-i)+n}return()=>t}(t,[dr(e),fr(e)])})).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",$I,i.createMask),i.words([...n]);const s=i.start(),[c,l]=r.size,u=[{x:0,y:0},{x:c,y:l}],{_bounds:f=u,_tags:h,hasImage:d}=s,p=h.map((t=>{var{x:e,y:n,font:r}=t,i=Pe(t,["x","y","font"]);return Object.assign(Object.assign({},i),{x:e+c/2,y:n+l/2,fontFamily:r})})),[{x:g,y:v},{x:m,y:y}]=f,b={text:"",value:0,opacity:0,fontSize:0};return p.push(Object.assign(Object.assign({},b),{x:d?0:g,y:d?0:v}),Object.assign(Object.assign({},b),{x:d?c:m,y:d?l:y})),p}));function HI(t){return"string"==typeof t?e=>e[t]:t}YI.props={};const VI=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=n,c=HI(s),l=HI(o),u=Zn(e,(([t])=>t),(t=>c(t)));return t=>t.map((t=>{const e=u.get(l(t));return Object.assign(Object.assign({},t),r.reduce(((t,n,r)=>(t[i[r]]=e?e[n]:a,t)),{}))}))};VI.props={};const qI=t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)};qI.props={};var UI={exports:{}},XI={exports:{}};!function(t){var e=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},t.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},t.exports.findMinMulti=function(t){for(var n=e.findMin(t[0]),r=1;r<t.length;r++)n=Math.min(n,e.findMin(t[r]));return n},t.exports.findMaxMulti=function(t){for(var n=e.findMax(t[0]),r=1;r<t.length;r++)n=Math.max(n,e.findMax(t[r]));return n},t.exports.inside=function(t,e,n){return t<=n&&n<=e}}(XI),function(t){var e=Math.log(2),n=t.exports,r=XI.exports;function i(t){return 1-Math.abs(t)}t.exports.getUnifiedMinMax=function(t,e){return n.getUnifiedMinMaxMulti([t],e)},t.exports.getUnifiedMinMaxMulti=function(t,e){e=e||{};var n=!1,i=!1,a=r.isNumber(e.width)?e.width:2,o=r.isNumber(e.size)?e.size:50,s=r.isNumber(e.min)?e.min:(n=!0,r.findMinMulti(t)),c=r.isNumber(e.max)?e.max:(i=!0,r.findMaxMulti(t)),l=(c-s)/(o-1);return n&&(s-=2*a*l),i&&(c+=2*a*l),{min:s,max:c}},t.exports.create=function(t,e){if(e=e||{},!t||0===t.length)return[];var a=r.isNumber(e.size)?e.size:50,o=r.isNumber(e.width)?e.width:2,s=n.getUnifiedMinMax(t,{size:a,width:o,min:e.min,max:e.max}),c=s.min,l=s.max-c,u=l/(a-1);if(0===l)return[{x:c,y:1}];for(var f=[],h=0;h<a;h++)f.push({x:c+h*u,y:0});var d=function(t,e){for(var n={},r=0,i=-e;i<=e;i++)r+=t(i/e),n[i]=r;return n}(i,o),p=d[o],g=d[o-1]-d[o-2],v=0;t.forEach((function(t){var e=function(t){return Math.floor((t-c)/u)}(t);if(!(e+o<0||e-o>=f.length)){var n=Math.max(e-o,0),i=e,a=Math.min(e+o,f.length-1),s=n-(e-o),l=e+o-a,h=d[-o-1+s]||0,m=d[-o-1+l]||0,y=p/(p-h-m);s>0&&(v+=y*(s-1)*g);var b=Math.max(0,e-o+1);r.inside(0,f.length-1,b)&&(f[b].y+=1*y*g),r.inside(0,f.length-1,i+1)&&(f[i+1].y-=2*y*g),r.inside(0,f.length-1,a+1)&&(f[a+1].y+=1*y*g)}}));var m=v,y=0,b=0;return f.forEach((function(t){y+=t.y,m+=y,t.y=m,b+=m})),b>0&&f.forEach((function(t){t.y/=b})),f},t.exports.getExpectedValueFromPdf=function(t){if(t&&0!==t.length){var e=0;return t.forEach((function(t){e+=t.x*t.y})),e}},t.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,r=0,i=0;i<t.length&&(r=i,!((n+=t[i].y)>=e));i++);return t[r].x}},t.exports.getPerplexity=function(t){if(t&&0!==t.length){var n=0;return t.forEach((function(t){var e=Math.log(t.y);isFinite(e)&&(n+=t.y*e)})),n=-n/e,Math.pow(2,n)}}}(UI);var ZI=UI.exports;const KI=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=t,[c,l]=r;return t=>{const r=Array.from(Un(t,(t=>n.map((e=>t[e])).join("-"))).values());return r.map((t=>{const n=ZI.create(t.map((t=>t[e])),{min:i,max:a,size:o,width:s}),r=n.map((t=>t.x)),u=n.map((t=>t.y));return Object.assign(Object.assign({},t[0]),{[c]:r,[l]:u})}))}};KI.props={};const QI=()=>t=>(console.log("G2 data section:",t),t);QI.props={};const JI=t=>{const{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{const i=t.map((t=>t[e])),a=function(t,e){if(e<0||e>1)throw new Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0];const r=[];for(const i of t){if(null==i){r.push(i),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=i);const a=n*e+(1-e)*i;r.push(a),n=a}return r}(i,n);return t.map(((t,e)=>Object.assign(Object.assign({},t),{[r]:a[e]})))}};function tD(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function eD(t,e){const[n,r]=t,[i,a]=e;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}JI.props={};const nD=t=>{const{priority:e}=t;return t=>{const n=[];return e&&t.sort(e),t.forEach((t=>{nj(t);const e=t.getLocalBounds(),r=n.some((t=>function(t,e){const[n,r]=t,[i,a]=e;return n[0]<a[0]&&r[0]>i[0]&&n[1]<a[1]&&r[1]>i[1]}(tD(e),tD(t.getLocalBounds()))));r?ej(t):n.push(t)})),t}};function rD([t,e],[n,r]){return r>t&&e>n}function iD(){const t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function aD(t){const e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);const{min:r,max:i}=e.getRenderBounds();return e.destroy(),{min:r,max:i}}const oD=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{const i=t.length;if(i<=1)return t;const[a,o]=iD(),[s,c]=iD(),[l,u]=iD(),[f,h]=iD();for(const e of t){const{min:t,max:n}=aD(e),[r,i]=t,[a,s]=n;o(e,i),c(e,i),u(e,s-i),h(e,[r,a])}for(let a=0;a<e;a++){t.sort(((t,e)=>Cn(s(t),s(e))));let e=0;for(let n=0;n<i-1;n++){const i=t[n];let a,o=n+1;for(;(a=t[o])&&!rD(f(i),f(a));)o+=1;if(a){const t=s(i),n=l(i),o=s(a),u=o-(t+n);if(u<r){const n=(r-u)/2;e=Math.max(e,n),c(i,t-n),c(a,o+n)}}}if(e<n)break}for(const e of t)e.style.y+=s(e)-a(e);return t}};function sD(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function cD(t,e,n){return.2126*sD(t)+.7152*sD(e)+.0722*sD(n)}function lD(t,e){if(!t||!e||t===e)return 1;const{r:n,g:r,b:i}=t,{r:a,g:o,b:s}=e,c=cD(n,r,i),l=cD(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function uD(t,e){const n=hr(e,(e=>lD(t,function(t){return"object"==typeof t?t:hh(t)}(e))));return e[n]}const fD=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach((t=>{const r=t.attr("dependentElement").parsedStyle.fill;lD(t.parsedStyle.fill,r)<e&&t.attr("fill",uD(r,n))})),t)},hD=()=>t=>(t.forEach((t=>{nj(t);const e=t.attr("bounds"),n=function(t,e){const[n,r]=t;return!(eD(n,e)&&eD(r,e))}(tD(t.getLocalBounds()),e);n&&ej(t)})),t),dD=()=>(t,{canvas:e,layout:n})=>(t.forEach((t=>{nj(t);const{max:e,min:r}=t.getRenderBounds(),[i,a]=e,[o,s]=r,c=((t,e)=>{const[[n,r],[i,a]]=e,[[o,s],[c,l]]=t;let u=0,f=0;return o<n?u=n-o:c>i&&(u=i-c),s<r?f=r-s:l>a&&(f=a-l),[u,f]})([[o,s],[i,a]],[[n.x,n.y],[n.x+n.width,n.y+n.height]]);t.style.connector&&t.style.connectorPoints&&(t.style.connectorPoints[0][0]-=c[0],t.style.connectorPoints[0][1]-=c[1]),t.style.x+=c[0],t.style.y+=c[1]})),t);function pD(){return{"data.fetch":dI,"data.inline":kI,"data.sortBy":xI,"data.sort":mI,"data.filter":vI,"data.pick":yI,"data.rename":bI,"data.fold":pI,"data.slice":qI,"data.custom":wI,"data.map":MI,"data.join":VI,"data.kde":KI,"data.log":QI,"data.wordCloud":YI,"data.ema":JI,"transform.stackY":Zr,"transform.binX":_s,"transform.bin":As,"transform.dodgeX":xi,"transform.jitter":Do,"transform.jitterX":Bo,"transform.jitterY":Fo,"transform.symmetryY":zo,"transform.diffY":Go,"transform.stackEnter":ki,"transform.normalizeY":wi,"transform.select":Vo,"transform.selectX":qo,"transform.selectY":Uo,"transform.groupX":os,"transform.groupY":ss,"transform.groupColor":cs,"transform.group":as,"transform.sortX":fs,"transform.sortY":ds,"transform.sortColor":hs,"transform.flexX":ps,"transform.pack":Os,"transform.sample":Ps,"transform.filter":Cs,"coordinate.cartesian":e,"coordinate.polar":r,"coordinate.transpose":i,"coordinate.theta":a,"coordinate.parallel":c,"coordinate.fisheye":l,"coordinate.radial":s,"coordinate.radar":u,"encode.constant":f,"encode.field":d,"encode.transform":h,"encode.column":p,"mark.interval":MM,"mark.rect":EM,"mark.line":TM,"mark.point":CM,"mark.text":NM,"mark.cell":RM,"mark.area":DM,"mark.link":FM,"mark.image":GM,"mark.polygon":$M,"mark.box":HM,"mark.vector":qM,"mark.lineX":KM,"mark.lineY":XM,"mark.connector":JM,"mark.range":rO,"mark.rangeX":aO,"mark.rangeY":sO,"mark.path":lO,"mark.shape":GO,"mark.density":YO,"mark.heatmap":VO,"mark.wordCloud":WO,"palette.category10":qO,"palette.category20":UO,"scale.linear":ZO,"scale.ordinal":KO,"scale.band":XO,"scale.identity":QO,"scale.point":JO,"scale.time":tE,"scale.log":eE,"scale.pow":nE,"scale.sqrt":oE,"scale.threshold":rE,"scale.quantile":iE,"scale.quantize":aE,"scale.sequential":sE,"scale.constant":cE,"theme.classic":hE,"theme.classicDark":gE,"theme.academy":mE,"theme.light":fE,"theme.dark":pE,"component.axisX":XE,"component.axisY":ZE,"component.legendCategory":nS,"component.legendContinuous":sS,"component.legends":AS,"component.title":pS,"component.sliderX":wS,"component.sliderY":MS,"component.scrollbarX":ES,"component.scrollbarY":SS,"animation.scaleInX":_S,"animation.scaleOutX":TS,"animation.scaleInY":PS,"animation.scaleOutY":CS,"animation.waveIn":qS,"animation.fadeIn":LS,"animation.fadeOut":NS,"animation.zoomIn":US,"animation.zoomOut":XS,"animation.pathIn":ZS,"animation.morphing":VS,"animation.growInX":KS,"animation.growInY":QS,"interaction.elementHighlight":_j,"interaction.elementHighlightByX":Tj,"interaction.elementHighlightByColor":Pj,"interaction.elementSelect":Lj,"interaction.elementSelectByX":Nj,"interaction.elementSelectByColor":jj,"interaction.fisheye":Ij,"interaction.chartIndex":Rj,"interaction.tooltip":nR,"interaction.legendFilter":hR,"interaction.legendHighlight":dR,"interaction.brushHighlight":wR,"interaction.brushXHighlight":OR,"interaction.brushYHighlight":SR,"interaction.brushAxisHighlight":NR,"interaction.brushFilter":jR,"interaction.brushXFilter":RR,"interaction.brushYFilter":IR,"interaction.sliderFilter":zR,"interaction.scrollbarFilter":WR,"interaction.poptip":VR,"interaction.treemapDrillDown":UR,"interaction.elementPointMove":rI,"composition.spaceLayer":WT,"composition.spaceFlex":$T,"composition.facetRect":aP,"composition.repeatMatrix":fP,"composition.facetCircle":mP,"composition.timingKeyframe":bP,"labelTransform.overlapHide":nD,"labelTransform.overlapDodgeY":oD,"labelTransform.overflowHide":hD,"labelTransform.contrastReverse":fD,"labelTransform.exceedAdjust":dD}}function gD(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}const vD={};const mD=t=>t?parseInt(t):0;function yD(t,e){const n=[t];for(;n.length;){const t=n.shift();e&&e(t);const r=t.children||[];for(const t of r)n.push(t)}}class bD{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){const e=t(this.value);return this.value=e,this}attr(t,e){return 1===arguments.length?this.value[t]:this.map((n=>(n[t]=e,n)))}append(t){const e=new t({});return e.children=[],this.push(e),e}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){const t=this.parentNode;if(t){const{children:e}=t,n=e.findIndex((t=>t===this));e.splice(n,1)}return this}getNodeByKey(t){let e=null;return yD(this,(n=>{t===n.attr("key")&&(e=n)})),e}getNodesByType(t){const e=[];return yD(this,(n=>{t===n.type&&e.push(n)})),e}getNodeByType(t){let e=null;return yD(this,(n=>{e||t===n.type&&(e=n)})),e}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}const xD=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],kD="__remove__",wD="__callback__";function MD(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function OD(t,e){const{width:n,height:r,autoFit:i,depth:a=0}=t;let o=640,s=480;if(i){const{width:t,height:n}=function(t){const e=getComputedStyle(t),n=t.clientWidth||mD(e.width),r=t.clientHeight||mD(e.height);return{width:n-(mD(e.paddingLeft)+mD(e.paddingRight)),height:r-(mD(e.paddingTop)+mD(e.paddingBottom))}}(e);o=t||o,s=n||s}return o=n||o,s=r||s,{width:Math.max(j(o)?o:1,1),height:Math.max(j(s)?s:1,1),depth:a}}function ED(t){const e=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];for(const n of xD)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,MD(e));n.length;){const t=n.pop(),e=r.get(t),{children:i=[]}=t;for(const t of i)if(t.type===wD)e.children=t.value;else{const i=MD(t),{children:a=[]}=e;a.push(i),n.push(t),r.set(t,i),e.children=a}}return r.get(e)}function SD(t,e,n,r,i){const{type:a}=t,{type:o=n||a}=e;if(function(t,e){return"function"!=typeof t&&new Set(Object.keys(e)).has(t)}(o,i)){for(const n of xD)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(function(t,e){return"function"==typeof t||new Set(Object.keys(e)).has(t)}(o,r)){const t={type:"view"},n=Object.assign({},e);for(const e of xD)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}function AD(t,e,n){if("function"==typeof t){const e=new bD;return e.value=t,e.type=wD,e}const{type:r,children:i}=t,a=Pe(t,["type","children"]),o=function(t,e,n){if("function"==typeof t)return e.mark;const r=Object.assign(Object.assign({},e),n)[t];if(!r)throw new Error(`Unknown mark: ${t}.`);return r}(r,e,n),s=new o;return s.value=a,s.type=r,s}function _D(t,e){const{type:n,children:r}=e,i=Pe(e,["type","children"]);t.type===n||void 0===n?jr(t.value,i):"string"==typeof n&&(t.type=n,t.value=i)}function TD(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[t,e]=i.shift(),a=AD(e,n,r);Array.isArray(t.children)&&t.push(a);const{children:o}=e;if(Array.isArray(o))for(const t of o)i.push([a,t]);else"function"==typeof o&&i.push([a,o])}}function PD(t,e,{key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function CD(t,e,{key:n=e}){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(n);if(Array.isArray(t))return this.attr(n,t);const e=[...this.attr(n)||[],t];return this.attr(n,e)}}function LD(t,e,{key:n=e}){t.prototype[e]=function(t,e){if(0===arguments.length)return this.attr(n);if(1===arguments.length&&"string"!=typeof t)return this.attr(n,t);const r=this.attr(n)||{};return r[t]=1===arguments.length||e,this.attr(n,r)}}function ND(t,e,n){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(e);if(Array.isArray(t))return this.attr(e,{items:t});if(Lr(t)&&(void 0!==t.title||void 0!==t.items))return this.attr(e,t);if(null===t||!1===t)return this.attr(e,t);const n=this.attr(e)||{},{items:r=[]}=n;return r.push(t),n.items=r,this.attr(e,n)}}function jD(t,e,{ctor:n}){t.prototype[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}function RD(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function ID(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:t}=r;"value"===t?PD(e,n,r):"array"===t?CD(e,n,r):"object"===t?LD(e,n,r):"node"===t?jD(e,n,r):"container"===t?RD(e,n,r):"mix"===t&&ND(e,n)}return e}}function DD(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,{type:"node",ctor:e}])))}const BD={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"}},FD=Object.assign(Object.assign({},BD),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),zD=Object.assign(Object.assign({},BD),{labelTransform:{type:"array"}});let GD=class extends bD{changeData(t){var e;const n=this.getRoot();if(n)return this.attr("data",t),(null===(e=this.children)||void 0===e?void 0:e.length)&&this.children.forEach((e=>{e.attr("data",t)})),null==n?void 0:n.render()}getView(){const t=this.getRoot(),{views:e}=t.getContext();if(null==e?void 0:e.length)return e.find((t=>t.key===this._key))}getScale(){var t;return null===(t=this.getView())||void 0===t?void 0:t.scale}getScaleByChannel(t){const e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null===(t=this.getView())||void 0===t?void 0:t.coordinate}getTheme(){var t;return null===(t=this.getView())||void 0===t?void 0:t.theme}getGroup(){const t=this._key;if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){const t=this.getGroup();t&&!t.isVisible()&&nj(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&ej(t)}};GD=Ce([ID(zD)],GD);let WD=class extends bD{changeData(t){const e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(!e)return;const{markState:n}=e,r=Array.from(n.keys()).find((t=>t.key===this.attr("key")));return n.get(r)}getScale(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;const r=null===(e=this.getRoot())||void 0===e?void 0:e.getView();if(r)return null===(n=null==r?void 0:r.scale)||void 0===n?void 0:n[t]}getGroup(){const t=this.attr("key");if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};WD=Ce([ID(FD)],WD);const $D="G2_CHART_KEY";class YD extends GD{constructor(t){const{container:e,canvas:n,renderer:r,plugins:i,lib:a,createCanvas:o}=t;super(Pe(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=V((()=>{this.forceFit()}),300),this._renderer=r||new x_,this._plugins=i||[],this._container=function(t){if(void 0===t){const t=document.createElement("div");return t[kD]=!0,t}if("string"==typeof t)return document.getElementById(t);return t}(e),this._emitter=new O_,this._context={library:Object.assign(Object.assign({},a),vD),emitter:this._emitter,canvas:n,createCanvas:o},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(((t,e)=>ZN(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e)))),[e,n,r]=function(){let t,e;return[new Promise(((n,r)=>{e=n,t=r})),e,t]}();return t.then(n).catch(r).then((()=>this._renderTrailing())),e}options(t){if(0===arguments.length)return ED(this);const{type:e}=t;return e&&(this._previousDefinedType=e),function(t,e,n,r,i){const a=[[null,t,SD(t,e,n,r,i)]];for(;a.length;){const[t,e,n]=a.shift();if(e)if(n){_D(e,n);const{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++){const n=t[i],o=r[i];a.push([e,o,n])}}else"function"==typeof t&&a.push([e,null,t])}else e.remove();else TD(t,n,r,i)}}(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){this.options();this.emit(E_.BEFORE_CLEAR),this._reset(),KN(0,this._context,!1),this.emit(E_.AFTER_CLEAR)}destroy(){this.options();this.emit(E_.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),KN(0,this._context,!0),this._container[kD]&&function(t){const e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(E_.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:t,height:e}=OD(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(E_.BEFORE_CHANGE_SIZE);const n=this.render();return n.then((()=>{this.emit(E_.AFTER_CHANGE_SIZE)})),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(E_.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",e);const n=this.render();return n.then((()=>{this.emit(E_.AFTER_CHANGE_SIZE)})),n}_create(){const{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter((t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t))];this._marks={};for(const t of e){const e=t.split(".").pop();class n extends WD{constructor(){super({},e)}}this._marks[e]=n,this[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}const n=["composition.view",...Object.keys(t).filter((t=>t.startsWith("composition.")&&"composition.mark"!==t))];this._compositions=Object.fromEntries(n.map((t=>{const e=t.split(".").pop();let n=class extends GD{constructor(){super({},e)}};return n=Ce([ID(DD(this._marks))],n),[e,n]})));for(const t of Object.values(this._compositions))ID(DD(this._compositions))(t);for(const t of n){const e=t.split(".").pop();this[e]=function(){const t=this._compositions[e];return this.type=null,this.append(t)}}}_reset(){const t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter((([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||t.includes(e)))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then((()=>{const t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)})).catch((t=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(t)})))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return e=>{this._rendering=!1,t(e)}}_computedOptions(){const t=this.options(),{key:e=$D}=t,{width:n,height:r,depth:i}=OD(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r,depth:i})}_createCanvas(){const{width:t,height:e}=OD(this.options(),this._container);this._plugins.push(new w_),this._plugins.forEach((t=>this._renderer.registerPlugin(t))),this._context.canvas=new gv({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){var t;null===(t=this._trailingResolve)||void 0===t||t.call(this,this),this._trailing=!0;return new Promise(((t,e)=>{this._trailingResolve=t,this._trailingReject=e}))}_bindAutoFit(){const t=this.options(),{autoFit:e}=t;this._hasBindAutoFit?e||this._unbindAutoFit():e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}const HD=gD(YD,Object.assign({},pD()));t.AREA_CLASS_NAME=oA,t.Academy=mE,t.Bin=As,t.BinX=_s,t.COMPONENT_CLASS_NAME=iA,t.Chart=HD,t.ChartEvent=E_,t.Classic=hE,t.ClassicDark=gE,t.Dark=pE,t.DiffY=Go,t.DodgeX=xi,t.ELEMENT_CLASS_NAME=eA,t.Filter=Cs,t.FlexX=ps,t.Group=as,t.GroupColor=cs,t.GroupX=os,t.GroupY=ss,t.Jitter=Do,t.JitterX=Bo,t.JitterY=Fo,t.LABEL_CLASS_NAME=aA,t.LABEL_LAYER_CLASS_NAME=tA,t.Light=fE,t.LinearAxis=qE,t.MAIN_LAYER_CLASS_NAME=JS,t.MASK_CLASS_NAME="mask",t.MaybeDefaultX=hi,t.MaybeDefaultY=di,t.MaybeFunctionAttribute=mi,t.MaybeGradient=bi,t.MaybeIdentityX=fi,t.MaybeIdentityY=ui,t.MaybeKey=oi,t.MaybeSeries=si,t.MaybeSize=ai,t.MaybeStackY=Qr,t.MaybeTitle=ei,t.MaybeTooltip=pi,t.MaybeTuple=yi,t.MaybeTupleX=li,t.MaybeTupleY=ci,t.MaybeVisualPosition=vi,t.MaybeZeroPadding=gi,t.MaybeZeroX=ni,t.MaybeZeroY=ri,t.MaybeZeroY1=Pn,t.MaybeZeroZ=ii,t.NormalizeY=wi,t.PLOT_CLASS_NAME=rA,t.Pack=Os,t.Runtime=YD,t.Sample=Ps,t.Select=Vo,t.SelectX=qo,t.SelectY=Uo,t.Selection=gm,t.SortColor=hs,t.SortX=fs,t.SortY=ds,t.StackEnter=ki,t.StackY=Zr,t.SymmetryY=zo,t.VIEW_CLASS_NAME=nA,t.corelib=pD,t.extend=gD,t.register=function(t,e){var n,r;t.startsWith("symbol.")?(n=t.split(".").pop(),r=e,my.set(n,r)):Object.assign(vD,{[t]:e})},t.render=ZN,t.renderToMountedElement=function(t,e={},n=()=>{},r=t=>{throw t}){var i;const{width:a=640,height:o=480}=t,s=UN(t),{group:c=new zg,emitter:l=new O_,library:u}=e;(null==c?void 0:c.parentElement)||Or("renderToMountedElement can't render chart to unmounted group.");const f=pm(c);return e.group=c,e.emitter=l,e.canvas=e.canvas||(null===(i=null==c?void 0:c.ownerDocument)||void 0===i?void 0:i.defaultView),l.emit(E_.BEFORE_RENDER),bN(Object.assign(Object.assign({},s),{width:a,height:o}),f,e).then((()=>{var t;null===(t=e.canvas)||void 0===t||t.requestAnimationFrame((()=>{l.emit(E_.AFTER_RENDER),null==n||n()}))})).catch((t=>{null==r||r(t)})),c},t.select=pm,Object.defineProperty(t,"__esModule",{value:!0})}));
59
+ */k_.tag="Dragndrop";var w_=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return el(this,e),(t=ul(this,e)).name="dragndrop",t.options=n,t}return hl(e,t),rl(e,[{key:"init",value:function(){this.addRenderingPlugin(new k_(tl({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)}}])}(Bu),M_=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],a=this._events["*"]||[],o=function(r){for(var i=r.length,a=0;a<i;a++)if(r[a]){var o=r[a],s=o.callback;o.once&&(r.splice(a,1),0===r.length&&delete e._events[t],i--,a--),s.apply(e,n)}};o(i),o(a)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),O_=M_;const E_={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"},S_=[["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 A_={}.toString,__=function(t,e){return A_.call(t)==="[object "+e+"]"},T_=function(t){return Array.isArray?Array.isArray(t):__(t,"Array")},P_=function(t){return"object"==typeof t&&null!==t},C_=function(t){if(!P_(t)||!__(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function L_(t,e,n,r){for(var i in n=n||0,r=r||5,e)if(e.hasOwnProperty(i)){var a=e[i];null!==a&&C_(a)?(C_(t[i])||(t[i]={}),n<r?L_(t[i],a,n+1,r):t[i]=e[i]):T_(a)?(t[i]=[],t[i]=t[i].concat(a)):void 0!==a&&(t[i]=a)}}var N_=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)L_(t,e[r]);return t},j_=function(t){return t};function R_(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce((function(t,e){return function(n){return e(t(n))}}),t):j_}function I_(t){return t instanceof Float32Array||t instanceof Array}var D_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},B_=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function F_(t,e,n){for(;t<e;)t+=2*Math.PI;for(;t>n;)t-=2*Math.PI;return t}var z_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},G_=function(t,e,n,r,i){var a,o,s=z_(t,2),c=s[0],l=s[1],u=lt();return o=[c,l],(a=u)[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=o[0],a[7]=o[1],a[8]=1,a},W_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},$_=function(t,e,n,r,i){var a=new oo({range:[e,e+r]}),o=new oo({range:[n,n+i]});return{transform:function(t){var e=W_(t,2),n=e[0],r=e[1];return[a.map(n),o.map(r)]},untransform:function(t){var e=W_(t,2),n=e[0],r=e[1];return[a.invert(n),o.invert(r)]}}},Y_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},H_=function(t,e,n,r,i){return(0,Y_(t,1)[0])(e,n,r,i)},V_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},q_=function(t,e,n,r,i){return V_(t,1)[0]},U_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},X_=function(t,e,n,r,i){var a=U_(t,4),o=a[0],s=a[1],c=a[2],l=a[3],u=new oo({range:[c,l]}),f=new oo({range:[o,s]}),h=i/r,d=h>1?1:h,p=h>1?1/h:1;return{transform:function(t){var e=U_(t,2),n=e[0],r=e[1],i=f.map(n),a=u.map(r);return[.5*(a*Math.cos(i)*d)+.5,.5*(a*Math.sin(i)*p)+.5]},untransform:function(t){var e=U_(t,2),n=e[0],r=e[1],i=2*(n-.5)/d,a=2*(r-.5)/p,c=Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),l=F_(Math.atan2(a,i),o,s);return[f.invert(l),u.invert(c)]}}},Z_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},K_=function(t,e,n,r,i){return{transform:function(t){var e=Z_(t,2),n=e[0];return[e[1],n]},untransform:function(t){var e=Z_(t,2),n=e[0];return[e[1],n]}}},Q_=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},J_=function(t,e,n,r,i){var a,o,s=Q_(t,2),c=s[0],l=s[1],u=lt();return o=[c,l],(a=u)[0]=o[0],a[1]=0,a[2]=0,a[3]=0,a[4]=o[1],a[5]=0,a[6]=0,a[7]=0,a[8]=1,a},tT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},eT=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},nT=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J_.apply(void 0,eT([[-1,-1]],tT(e),!1))},rT=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J_.apply(void 0,eT([[-1,1]],tT(e),!1))},iT=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J_.apply(void 0,eT([[1,-1]],tT(e),!1))},aT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},oT=function(t,e,n,r,i){var a=aT(t,1)[0];return function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}(lt(),a)},sT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},cT=function(t,e,n,r,i){var a=sT(t,4),o=a[0],s=a[1],c=a[2],l=(a[3]-c)/((s-0)/(2*Math.PI)+1),u=l/(2*Math.PI),f=new oo({range:[c,c+.99*l]}),h=new oo({range:[o,s]}),d=i/r,p=d>1?1:d,g=d>1?1/d:1;return{transform:function(t){var e=sT(t,2),n=e[0],r=e[1],i=h.map(n),a=f.map(r);return[.5*(Math.cos(i)*(u*i+a)*p)+.5,.5*(Math.sin(i)*(u*i+a)*g)+.5]},untransform:function(t){var e=sT(t,2),n=e[0],r=e[1],i=2*(n-.5)/p,a=2*(r-.5)/g,c=Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),d=F_(Math.atan2(a,i)+Math.floor(c/l)*Math.PI*2,o,s),v=c-u*d;return[h.invert(d),f.invert(v)]}}},lT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},uT=function(t,e,n,r,i){var a=lT(t,4),o=a[0],s=a[1],c=a[2],l=a[3],u=new oo({range:[c,l]});return{transform:function(t){for(var e=[],n=t.length,r=new so({domain:new Array(n).fill(0).map((function(t,e){return e})),range:[o,s]}),i=0;i<n;i++){var a=t[i],c=r.map(i),l=u.map(a);e.push(c,l)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(u.invert(r))}return e}}},fT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function hT(t){return 1/Math.tan(t)}var dT=function(t,e,n,r,i){var a=hT(fT(t,1)[0]);return{transform:function(t){var e=fT(t,2),n=e[0],r=e[1];return[n+r*a,r]},untransform:function(t){var e=fT(t,2),n=e[0],r=e[1];return[n-r*a,r]}}},pT=function(t,e,n,r,i){var a=hT(fT(t,1)[0]);return{transform:function(t){var e=fT(t,2),n=e[0];return[n,e[1]+n*a]},untransform:function(t){var e=fT(t,2),n=e[0];return[n,e[1]-n*a]}}},gT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function vT(t,e,n,r,i){var a=t<e,o=(a?e-r:i-e)||i-r,s=a?-1:1;return s*o*(n+1)/(n+o/((t-e)*s))+e}function mT(t,e,n,r,i){var a=t<e,o=(a?e-r:i-e)||i-r;return o/(o*(n+1)/(t-e)-n*(a?-1:1))+e}function yT(t,e,n){return n?new oo({range:[0,1],domain:[0,e]}).map(t):t}var bT=function(t,e,n,r,i){var a=gT(t,3),o=a[0],s=a[1],c=a[2],l=yT(o,r,void 0!==c&&c);return{transform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[vT(n,l,s,0,1),r]},untransform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[mT(n,l,s,0,1),r]}}},xT=function(t,e,n,r,i){var a=gT(t,3),o=a[0],s=a[1],c=a[2],l=yT(o,i,void 0!==c&&c);return{transform:function(t){var e=gT(t,2);return[e[0],vT(e[1],l,s,0,1)]},untransform:function(t){var e=gT(t,2);return[e[0],mT(e[1],l,s,0,1)]}}},kT=function(t,e,n,r,i){var a=gT(t,5),o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],f=void 0!==u&&u,h=yT(o,r,f),d=yT(s,i,f);return{transform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[vT(n,h,c,0,1),vT(r,d,l,0,1)]},untransform:function(t){var e=gT(t,2),n=e[0],r=e[1];return[mT(n,h,c,0,1),mT(r,d,l,0,1)]}}},wT=function(t,e,n,r,i){var a=gT(t,5),o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],f=void 0!==u&&u,h=new oo({range:[0,r]}),d=new oo({range:[0,i]}),p=f?o:h.map(o),g=f?s:d.map(s);return{transform:function(t){var e=gT(t,2),n=e[0],r=e[1],i=h.map(n)-p,a=d.map(r)-g,o=Math.sqrt(i*i+a*a);if(o>c)return[n,r];var s=vT(o,0,l,0,c),u=Math.atan2(a,i),f=p+s*Math.cos(u),v=g+s*Math.sin(u);return[h.invert(f),d.invert(v)]},untransform:function(t){var e=gT(t,2),n=e[0],r=e[1],i=h.map(n)-p,a=d.map(r)-g,o=Math.sqrt(i*i+a*a);if(o>c)return[n,r];var s=mT(o,0,l,0,c),u=Math.atan2(a,i),f=p+s*Math.cos(u),v=g+s*Math.sin(u);return[h.invert(f),d.invert(v)]}}},MT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},OT=function(t,e,n,r,i,a,o){var s=new oo({range:[e,e+i]}),c=new oo({range:[n,n+a]}),l=new oo({range:[r,r+o]});return{transform:function(t){var e=MT(t,3),n=e[0],r=e[1],i=e[2];return[s.map(n),c.map(r),l.map(i)]},untransform:function(t){var e=MT(t,3),n=e[0],r=e[1],i=e[2];return[s.invert(n),c.invert(r),l.invert(i)]}}},ET=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},ST=function(t,e,n,r,i,a,o){var s=ET(t,3),c=s[0],l=s[1],u=s[2];return Et(ft(),[c,l,u])},AT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},_T=function(t,e,n,r,i,a,o){return{transform:function(t){var e=AT(t,3),n=e[0];return[e[1],n,e[2]]},untransform:function(t){var e=AT(t,3),n=e[0];return[e[1],n,e[2]]}}},TT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},PT=function(t,e,n,r,i,a,o){var s=TT(t,3),c=s[0],l=s[1],u=s[2];return St(ft(),[c,l,u])},CT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},LT=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},NT=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jT=function(){function t(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:$_,translate:G_,custom:H_,matrix:q_,polar:X_,transpose:K_,scale:J_,"shear.x":dT,"shear.y":pT,reflect:nT,"reflect.x":rT,"reflect.y":iT,rotate:oT,helix:cT,parallel:uT,fisheye:kT,"fisheye.x":bT,"fisheye.y":xT,"fisheye.circular":wT},this.update(t)}return t.prototype.update=function(t){this.options=N_({},this.options,t),this.recoordinate()},t.prototype.clone=function(){return new t(this.options)},t.prototype.getOptions=function(){return this.options},t.prototype.clear=function(){this.update({transformations:[]})},t.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},t.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},t.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:LT(LT([],CT(n),!1),[LT([],CT(t),!1)],!1)}),this},t.prototype.map=function(t){return this.output(t)},t.prototype.invert=function(t){return this.input(t)},t.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},t.prototype.compose=function(t){var e,n;void 0===t&&(t=!1);var r=t?LT([],CT(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},a=[],o=[],s=function(t,e){return void 0===e&&(e=!0),o.push(e?function(t){return function(e){for(var n=[],r=0;r<e.length-1;r+=2){var i=[e[r],e[r+1]],a=t(i);n.push.apply(n,B_([],D_(a),!1))}return n}}(t):t)};try{for(var c=NT(r),l=c.next();!l.done;l=c.next()){var u=CT(l.value),f=u[0],h=u.slice(1),d=this.transformers[f];if(d){var p=this.options,g=p.x,v=p.y,m=p.width,y=p.height,b=d(LT([],CT(h),!1),g,v,m,y);if(I_(b))a.push(b);else{if(a.length)s(this.createMatrixTransform(a,t)),a.splice(0,a.length);s(i(b)||j_,"parallel"!==f)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}a.length&&s(this.createMatrixTransform(a,t));return R_.apply(void 0,LT([],CT(o),!1))},t.prototype.createMatrixTransform=function(t,e){var n,r,i=lt();return e&&t.reverse(),t.forEach((function(t){return ut(i,i,t)})),e&&function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=u*o-s*l,h=-u*a+s*c,d=l*a-o*c,p=n*f+r*h+i*d;p&&(p=1/p,t[0]=f*p,t[1]=(-u*r+i*l)*p,t[2]=(s*r-i*o)*p,t[3]=h*p,t[4]=(u*n-i*c)*p,t[5]=(-s*n+i*a)*p,t[6]=d*p,t[7]=(-l*n+r*c)*p,t[8]=(o*n-r*a)*p)}(i,(n=i,(r=new ct(9))[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r)),function(t){var e=[t[0],t[1],1];return ce(e,e,i),[e[0],e[1]]}},t}(),RT=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},IT=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},DT=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},BT=function(){function t(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:OT,translate3D:ST,scale3D:PT,transpose3D:_T},this.update(t)}return t.prototype.update=function(t){this.options=N_({},this.options,t),this.recoordinate()},t.prototype.clone=function(){return new t(this.options)},t.prototype.getOptions=function(){return this.options},t.prototype.clear=function(){this.update({transformations:[]})},t.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},t.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y,r=t.z;return[(2*e+t.width)/2,(2*n+t.height)/2,(2*r+t.depth)/2]},t.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:IT(IT([],RT(n),!1),[IT([],RT(t),!1)],!1)}),this},t.prototype.map=function(t){return this.output(t)},t.prototype.invert=function(t){return this.input(t)},t.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},t.prototype.compose=function(t){var e,n;void 0===t&&(t=!1);var r=t?IT([],RT(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},a=[],o=[],s=function(t,e){return void 0===e&&(e=!0),o.push(e?function(t){return function(e){for(var n=[],r=0;r<e.length-1;r+=3){var i=[e[r],e[r+1],e[r+2]],a=t(i);n.push.apply(n,B_([],D_(a),!1))}return n}}(t):t)};try{for(var c=DT(r),l=c.next();!l.done;l=c.next()){var u=RT(l.value),f=u[0],h=u.slice(1),d=this.transformers[f];if(d){var p=this.options,g=p.x,v=p.y,m=p.z,y=p.width,b=p.height,x=p.depth,k=d(IT([],RT(h),!1),g,v,m,y,b,x);if(I_(k))a.push(k);else{if(a.length)s(this.createMatrixTransform(a,t)),a.splice(0,a.length);s(i(k)||j_,!0)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}a.length&&s(this.createMatrixTransform(a,t));return R_.apply(void 0,IT([],RT(o),!1))},t.prototype.createMatrixTransform=function(t,e){var n=ft();return e&&t.reverse(),t.forEach((function(t){return Ht(n,n,t)})),e&&yt(n,ht(n)),function(t){var e=[t[0],t[1],t[2],1];return ge(e,e,n),[e[0],e[1],e[2]]}},t}();function FT(t){return(e,...n)=>Z({},t(e,...n),e)}function zT(t){return(e,...n)=>Z({},e,t(e,...n))}function GT(t,e){if(!t)return e;if(Array.isArray(t))return t;if(function(t){return!(t instanceof Date)&&"object"==typeof t}(t)){const{value:n=e}=t,r=Pe(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}return t}const WT=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map((t=>{var{data:e,x:s,y:c,width:l,height:u}=t,f=Pe(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},f),{data:GT(e,o),x:null!=s?s:n,y:null!=c?c:r,width:null!=l?l:i,height:null!=u?u:a})}))};WT.props={};const $T=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map((()=>1)),padding:i=0,data:a}=t,[o,s,c,l]="col"===n?["y","height","width","x"]:["x","width","height","y"],u=r.reduce(((t,e)=>t+e)),f=t[s]-i*(e.length-1),h=r.map((t=>f*(t/u))),d=[];let p=t[o]||0;for(let n=0;n<h.length;n+=1){const r=e[n],{data:u}=r,f=Pe(r,["data"]),g=GT(u,a);d.push(Object.assign({[o]:p,[s]:h[n],[l]:t[l]||0,[c]:t[c],data:g},f)),p+=h[n]+i}return d};$T.props={};const YT=()=>t=>{const{children:e}=t,n=Pe(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:c=[]}=n,l=Pe(n,["data","scale","axis","legend","encode","transform"]),u=e.map((t=>{var{data:e,scale:n={},axis:l={},legend:u={},encode:f={},transform:h=[]}=t,d=Pe(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:GT(e,r),scale:Z({},i,n),encode:Z({},s,f),transform:[...c,...h],axis:!(!l||!a)&&Z({},a,l),legend:!(!u||!o)&&Z({},o,u)},d)}));return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};YT.props={};const HT=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,margin:g,marginLeft:v,marginBottom:m,marginTop:y,marginRight:b,data:x,coordinate:k,theme:w,component:M,interaction:O,x:E,y:S,z:A,key:_,frame:T,labelTransform:P,parentKey:C,clip:L,viewStyle:N,title:j}=e,R=Pe(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:E,y:S,z:A,key:_,width:n,height:r,depth:i,padding:l,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,paddingBottom:c,theme:w,coordinate:k,component:M,interaction:O,frame:T,labelTransform:P,margin:g,marginLeft:v,marginBottom:m,marginTop:y,marginRight:b,parentKey:C,clip:L,style:N},!t&&{title:j}),{marks:[Object.assign(Object.assign(Object.assign({},R),{key:`${_}-0`,data:x}),t&&{title:j})]})]};HT.props={};class VT{constructor(t){this.$value=t}static of(t){return new VT(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}const qT=FT((t=>{const{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:a,y:o}=e,s=(t,e)=>{var a;if(void 0===t||!i)return{};const o=Un(n,(e=>e[t])),s=(null===(a=null==r?void 0:r[e])||void 0===a?void 0:a.domain)||Array.from(o.keys()),c=s.map((t=>o.has(t)?o.get(t).length:1));return{domain:s,flex:c}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"top"}},void 0===a&&{paddingInner:0}),s(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===o?null:{position:"right"}},void 0===o&&{paddingInner:0}),s(o,"y"))}}})),UT=zT((t=>{const{data:e,scale:n,legend:r}=t,i=[t];let a,o,s;for(;i.length;){const t=i.shift(),{children:e,encode:n={},scale:r={},legend:c={}}=t,{color:l}=n,{color:u}=r,{color:f}=c;void 0!==l&&(a=l),void 0!==u&&(o=u),void 0!==f&&(s=f),Array.isArray(e)&&i.push(...e)}const c="string"==typeof a?a:"",[l,u]=(()=>{var t;const r=null===(t=null==n?void 0:n.color)||void 0===t?void 0:t.domain;if(void 0!==r)return[r];if(void 0===a)return[void 0];const i="function"==typeof a?a:t=>t[a],o=e.map(i);return o.some((t=>"number"==typeof t))?[$n(o)]:[Array.from(new Set(o)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=l?l:[]}},scale:{color:Z({},o,{domain:l,type:u})}},void 0===r&&{legend:{color:Z({title:c},s)}})})),XT=FT((()=>({animate:{enterType:"fadeIn"}}))),ZT=zT((()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}}))),KT=zT((()=>({type:"cell"}))),QT=zT((t=>{const{data:e}=t,n={type:"custom",callback:()=>{const{data:e,encode:n}=t,{x:r,y:i}=n,a=r?Array.from(new Set(e.map((t=>t[r])))):[],o=i?Array.from(new Set(e.map((t=>t[i])))):[];return(()=>{if(a.length&&o.length){const t=[];for(const e of a)for(const n of o)t.push({[r]:e,[i]:n});return t}return a.length?a.map((t=>({[r]:t}))):o.length?o.map((t=>({[i]:t}))):void 0})()}};return{data:{type:"inline",value:e,transform:[n]}}})),JT=zT(((t,e=tP,n=nP,r=rP,i={})=>{const{data:a,encode:o,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:h}=t,{value:d}=a,{x:p,y:g}=o,{color:v}=c,{domain:m}=v;return{children:(t,a,o)=>{const{x:c,y:v}=a,{paddingLeft:y,paddingTop:b,marginLeft:x,marginTop:k}=o,{domain:w}=c.getOptions(),{domain:M}=v.getOptions(),O=Ir(t),E=t.map(e),S=t.map((({x:t,y:e})=>[c.invert(t),v.invert(e)])),A=S.map((([t,e])=>n=>{const{[p]:r,[g]:i}=n;return(void 0===p||r===t)&&(void 0===g||i===e)})),_=A.map((t=>d.filter(t))),T=f?fr(_,(t=>t.length)):void 0,P=S.map((([t,e])=>({columnField:p,columnIndex:w.indexOf(t),columnValue:t,columnValuesLength:w.length,rowField:g,rowIndex:M.indexOf(e),rowValue:e,rowValuesLength:M.length}))),C=P.map((t=>Array.isArray(s)?s:[s(t)].flat(1)));return O.flatMap((t=>{const[e,a,o,s]=E[t],c=P[t],f=_[t];return C[t].map((v=>{var w,M,{scale:O,key:E,facet:S=!0,axis:A={},legend:_={}}=v,P=Pe(v,["scale","key","facet","axis","legend"]);const C=(null===(w=null==O?void 0:O.y)||void 0===w?void 0:w.guide)||A.y,L=(null===(M=null==O?void 0:O.x)||void 0===M?void 0:M.guide)||A.x,N={x:{tickCount:p?5:void 0},y:{tickCount:g?5:void 0}},j=S?f:0===f.length?[]:d,R={color:{domain:m}},I={x:iP(L,n)(c,j),y:iP(C,r)(c,j)};return Object.assign(Object.assign({key:`${E}-${t}`,data:j,margin:0,x:e+y+l+x,y:a+b+u+k,parentKey:h,width:o,height:s,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!j.length,dataDomain:T,scale:Z(N,O,R),axis:Z({},A,I),legend:!1},P),i)}))}))}}}));function tP(t){const{points:e}=t;return ks(e)}function eP(t,e){return e.length?Z({title:!1,tick:null,label:null},t):Z({title:!1,tick:null,label:null,grid:null},t)}function nP(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;if(r!==i-1)return eP(t,n);const s=a===o-1&&void 0,c=n.length?void 0:null;return Z({title:s,grid:c},t)}}function rP(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(0!==i)return eP(t,n);const a=0===r&&void 0,o=n.length?void 0:null;return Z({title:a,grid:o},t)}}function iP(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}const aP=()=>t=>[VT.of(t).call(KT).call(UT).call(XT).call(qT).call(ZT).call(QT).call(JT).value()];aP.props={};const oP=FT((t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),sP=zT((t=>{const{data:e,children:n,x:r=0,y:i=0,key:a}=t;return{children:(t,o,s)=>{const{x:c,y:l}=o,{paddingLeft:u,paddingTop:f,marginLeft:h,marginTop:d}=s,{domain:p}=c.getOptions(),{domain:g}=l.getOptions(),v=Ir(t),m=t.map((({points:t})=>ks(t))),y=t.map((({x:t,y:e})=>[c.invert(t),l.invert(e)])),b=y.map((([t,e])=>({columnField:t,columnIndex:p.indexOf(t),columnValue:t,columnValuesLength:p.length,rowField:e,rowIndex:g.indexOf(e),rowValue:e,rowValuesLength:g.length}))),x=b.map((t=>Array.isArray(n)?n:[n(t)].flat(1)));return v.flatMap((t=>{const[n,o,s,c]=m[t],[l,p]=y[t],g=b[t];return x[t].map((v=>{var m,y;const{scale:b,key:x,encode:k,axis:w,interaction:M}=v,O=Pe(v,["scale","key","encode","axis","interaction"]),E=null===(m=null==b?void 0:b.y)||void 0===m?void 0:m.guide,S={x:lP(null===(y=null==b?void 0:b.x)||void 0===y?void 0:y.guide)(g,e),y:uP(E)(g,e)};return Object.assign({data:e,parentKey:a,key:`${x}-${t}`,x:n+u+r+h,y:o+f+i+d,width:s,height:c,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Z({x:{facet:!1},y:{facet:!1}},b),axis:Z({x:{tickCount:5},y:{tickCount:5}},w,S),legend:!1,encode:Z({},k,{x:l,y:p}),interaction:Z({},M,{legendFilter:!1})},O)}))}))}}})),cP=zT((t=>{const{encode:e}=t,n=Pe(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=e,o=Pe(e,["position","x","y"]),s=[];for(const t of[i].flat(1))for(const e of[a].flat(1))s.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[i].flat(1).length&&{x:{paddingInner:0}}),1===[a].flat(1).length&&{y:{paddingInner:0}})})}));function lP(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return eP(t,n)}}function uP(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{columnIndex:r}=e;if(0!==r)return eP(t,n)}}const fP=()=>t=>[VT.of(t).call(KT).call(UT).call(sP).call(cP).call(XT).call(ZT).call(oP).value()],hP=FT((t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),dP=FT((t=>({coordinate:{type:"polar"}}))),pP=t=>{const{encode:e}=t,n=Pe(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function gP(t){return t=>null}function vP(t){const{points:e}=t,[n,r,i,a]=e,o=ms(n,a),s=gs(n,a),c=xs(s,gs(r,i)),l=1/Math.sin(c/2),u=o/(1+l),f=u*Math.sqrt(2),[h,d]=i,p=bs(s)+c/2,g=u*l;return[h+g*Math.sin(p)-f/2,d-g*Math.cos(p)-f/2,f,f]}const mP=()=>t=>[VT.of(t).call(KT).call(pP).call(UT).call(dP).call(QT).call(JT,vP,gP,gP,{frame:!1}).call(XT).call(ZT).call(hP).value()];function yP(t,e,n){const r=[0,n],i=[1-n,1];return"normal"===t?r:"reverse"===t?i:"alternate"===t?e%2==0?r:i:"reverse-alternate"===t?e%2==0?i:r:void 0}const bP=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=t,o=e.length;if(!Array.isArray(e)||0===o)return[];const{key:s}=e[0],c=e.map((t=>Object.assign(Object.assign({},t),{key:s}))).map((t=>function(t,e,n){const r=[t];for(;r.length;){const t=r.pop();t.animate=Z({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});const{children:i}=t;Array.isArray(i)&&r.push(...i)}return t}(t,n,a)));return function*(){let t,e=0;for(;"infinite"===r||e<r;){const[n,r]=yP(i,e,o);for(let e=n;e<r;e+=1){const n=Math.abs(e);t!==n&&(yield c[n]),t=n}e++}}};function xP(t,e){const{__data__:n}=t,{markKey:r,index:i,seriesIndex:a}=n,{markState:o}=e,s=Array.from(o.keys()).find((t=>t.key===r));if(s)return a?a.map((t=>s.data[t])):s.data[i]}function kP(t,e,n,r=t=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);const{target:a}=i;if(!a)return;const{className:o}=a;if("plot"===o)return;const s=Sj(a,(t=>"element"===t.className));const c=function(t){return Sj(t,(t=>"component"===t.className))}(a),l=function(t){return Sj(t,(t=>"label"===t.className))}(a),u=s||c||l;if(!u)return;const{className:f,markType:h}=u,d=Object.assign(Object.assign({},i),{nativeEvent:!0});"element"===f?(d.data={data:xP(u,e)},n.emit(`element:${t}`,d),n.emit(`${h}:${t}`,d)):"label"===f?(d.data={data:u.attributes.datum},n.emit(`label:${t}`,d),n.emit(`${o}:${t}`,d)):(n.emit(`component:${t}`,d),n.emit(`${o}:${t}`,d))}}function wP(){return(t,e,n)=>{const{container:r,view:i}=t,a=kP(E_.CLICK,i,n,(t=>1===t.detail)),o=kP(E_.DBLCLICK,i,n,(t=>2===t.detail)),s=kP(E_.POINTER_TAP,i,n),c=kP(E_.POINTER_DOWN,i,n),l=kP(E_.POINTER_UP,i,n),u=kP(E_.POINTER_OVER,i,n),f=kP(E_.POINTER_OUT,i,n),h=kP(E_.POINTER_MOVE,i,n),d=kP(E_.POINTER_ENTER,i,n),p=kP(E_.POINTER_LEAVE,i,n),g=kP(E_.POINTER_UPOUTSIDE,i,n),v=kP(E_.DRAG_START,i,n),m=kP(E_.DRAG,i,n),y=kP(E_.DRAG_END,i,n),b=kP(E_.DRAG_ENTER,i,n),x=kP(E_.DRAG_LEAVE,i,n),k=kP(E_.DRAG_OVER,i,n),w=kP(E_.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",v),r.addEventListener("drag",m),r.addEventListener("dragend",y),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",k),r.addEventListener("drop",w),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",v),r.removeEventListener("drag",m),r.removeEventListener("dragend",y),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",k),r.removeEventListener("drop",w)}}}function MP(t,e){const n=Object.assign(Object.assign({},{"component.axisRadar":QE,"component.axisLinear":qE,"component.axisArc":UE,"component.legendContinuousBlock":cS,"component.legendContinuousBlockSize":uS,"component.legendContinuousSize":lS,"interaction.event":wP,"composition.mark":HT,"composition.view":YT,"shape.label.label":uM}),e),r=e=>{if("string"!=typeof e)return e;const r=`${t}.${e}`;return n[r]||Or(`Unknown Component: ${r}`)};return[(t,e)=>{const{type:n}=t,i=Pe(t,["type"]);n||Or("Plot type is required!");const a=r(n);return null==a?void 0:a(i,e)},r]}function OP(t){const{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||Or("Cannot find library document")}function EP(t,e){const{coordinate:n={},coordinates:r}=t,i=Pe(t,["coordinate","coordinates"]);if(r)return t;const{type:a,transform:o=[]}=n,s=Pe(n,["type","transform"]);if(!a)return Object.assign(Object.assign({},i),{coordinates:o});const[,c]=MP("coordinate",e),{transform:l=!1}=c(a).props||{};if(l)throw new Error(`Unknown coordinate: ${a}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:a},s),...o]})}function SP(t,e){return t.filter((t=>t.type===e))}function AP(t){return SP(t,"polar").length>0}function _P(t){return SP(t,"transpose").length%2==1}function TP(t){return SP(t,"theta").length>0}function PP(t){return SP(t,"radial").length>0}function CP(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}bP.props={},wP.props={reapplyWhenUpdate:!0};var LP=CP("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),NP=CP("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),jP=CP("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),RP=CP("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),IP=CP("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),DP=CP("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),BP=CP("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),FP=CP("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),zP=CP("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),GP=CP("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),WP=CP("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var $P=t=>()=>t;function YP(t,e){return function(n){return t+n*e}}function HP(t){return 1==(t=+t)?VP:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):$P(isNaN(e)?n:e)}}function VP(t,e){var n=e-t;return n?YP(t,n):$P(isNaN(t)?e:t)}!function t(e){var n=HP(e);function r(t,e){var r=n((t=zl(t)).r,(e=zl(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=VP(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);var qP,UP=(qP=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return function(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}((n-r/e)*e,o,i,a,s)}},function(t){var e,n,r=t.length,i=new Array(r),a=new Array(r),o=new Array(r);for(e=0;e<r;++e)n=zl(t[e]),i[e]=n.r||0,a[e]=n.g||0,o[e]=n.b||0;return i=qP(i),a=qP(a),o=qP(o),n.opacity=1,function(t){return n.r=i(t),n.g=a(t),n.b=o(t),n+""}});function XP(t){return function e(n){function r(e,r){var i=t((e=lu(e)).h,(r=lu(r)).h),a=VP(e.s,r.s),o=VP(e.l,r.l),s=VP(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}XP((function(t,e){var n=e-t;return n?YP(t,n>180||n<-180?n-360*Math.round(n/360):n):$P(isNaN(t)?e:t)}));var ZP=XP(VP),KP=t=>UP(t[t.length-1]),QP=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(CP),JP=KP(QP),tC=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(CP),eC=KP(tC),nC=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(CP),rC=KP(nC),iC=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(CP),aC=KP(iC),oC=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(CP),sC=KP(oC),cC=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(CP),lC=KP(cC),uC=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(CP),fC=KP(uC),hC=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(CP),dC=KP(hC),pC=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(CP),gC=KP(pC),vC=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(CP),mC=KP(vC),yC=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(CP),bC=KP(yC),xC=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(CP),kC=KP(xC),wC=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(CP),MC=KP(wC),OC=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(CP),EC=KP(OC),SC=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(CP),AC=KP(SC),_C=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(CP),TC=KP(_C),PC=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(CP),CC=KP(PC),LC=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(CP),NC=KP(LC),jC=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(CP),RC=KP(jC),IC=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(CP),DC=KP(IC),BC=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(CP),FC=KP(BC),zC=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(CP),GC=KP(zC),WC=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(CP),$C=KP(WC),YC=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(CP),HC=KP(YC),VC=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(CP),qC=KP(VC),UC=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(CP),XC=KP(UC),ZC=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(CP),KC=KP(ZC);var QC=ZP(lu(300,.5,0),lu(-240,.5,1)),JC=ZP(lu(-100,.75,.35),lu(80,1.5,.8)),tL=ZP(lu(260,.75,.35),lu(80,1.5,.8)),eL=lu();var nL=zl(),rL=Math.PI/3,iL=2*Math.PI/3;function aL(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var oL=aL(CP("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),sL=aL(CP("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),cL=aL(CP("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),lL=aL(CP("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),uL=Object.freeze({__proto__:null,schemeCategory10:LP,schemeAccent:NP,schemeDark2:jP,schemeObservable10:RP,schemePaired:IP,schemePastel1:DP,schemePastel2:BP,schemeSet1:FP,schemeSet2:zP,schemeSet3:GP,schemeTableau10:WP,interpolateBrBG:JP,schemeBrBG:QP,interpolatePRGn:eC,schemePRGn:tC,interpolatePiYG:rC,schemePiYG:nC,interpolatePuOr:aC,schemePuOr:iC,interpolateRdBu:sC,schemeRdBu:oC,interpolateRdGy:lC,schemeRdGy:cC,interpolateRdYlBu:fC,schemeRdYlBu:uC,interpolateRdYlGn:dC,schemeRdYlGn:hC,interpolateSpectral:gC,schemeSpectral:pC,interpolateBuGn:mC,schemeBuGn:vC,interpolateBuPu:bC,schemeBuPu:yC,interpolateGnBu:kC,schemeGnBu:xC,interpolateOrRd:MC,schemeOrRd:wC,interpolatePuBuGn:EC,schemePuBuGn:OC,interpolatePuBu:AC,schemePuBu:SC,interpolatePuRd:TC,schemePuRd:_C,interpolateRdPu:CC,schemeRdPu:PC,interpolateYlGnBu:NC,schemeYlGnBu:LC,interpolateYlGn:RC,schemeYlGn:jC,interpolateYlOrBr:DC,schemeYlOrBr:IC,interpolateYlOrRd:FC,schemeYlOrRd:BC,interpolateBlues:GC,schemeBlues:zC,interpolateGreens:$C,schemeGreens:WC,interpolateGreys:HC,schemeGreys:YC,interpolatePurples:qC,schemePurples:VC,interpolateReds:XC,schemeReds:UC,interpolateOranges:KC,schemeOranges:ZC,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:QC,interpolateRainbow:function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return eL.h=360*t-100,eL.s=1.5-1.5*e,eL.l=.8-.9*e,eL+""},interpolateWarm:JC,interpolateCool:tL,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,nL.r=255*(e=Math.sin(t))*e,nL.g=255*(e=Math.sin(t+rL))*e,nL.b=255*(e=Math.sin(t+iL))*e,nL+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:oL,interpolateMagma:sL,interpolateInferno:cL,interpolatePlasma:lL});function fL(t,e,n,r,i,a){const{guide:o={}}=n,s=function(t,e,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;if(void 0!==r)return r;if(function(t){return AL(t,Lr)}(e))return"identity";if("string"==typeof a)return"linear";if((i||a||[]).length>2)return wL(t,s);if(void 0!==i)return EL([i])?wL(t,s):SL(e)?"time":ML(t,a,o);return EL(e)?wL(t,s):SL(e)?"time":ML(t,a,o)}(t,e,n);if("string"!=typeof s)return n;const c=function(t,e,n,r){const{domain:i}=r;if(void 0!==i)return i;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return OL(function(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const e of t)for(const t of e)Sr(t)&&(r=Math.min(r,+t),i=Math.max(i,+t));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}(n,r),r);case"band":case"ordinal":case"point":return function(t){return Array.from(new Set(t.flat()))}(n);case"quantile":return function(t){return t.flat().sort()}(n);case"sequential":return OL(function(t){let e=1/0,n=-1/0;for(const r of t)for(const t of r)Sr(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(n),r);default:return[]}}(s,0,e,n),l=function(t,e,n){const{ratio:r}=n;if(null==r)return e;if(yL({type:t}))return function(t,e,n){const r=t.map(Number),i=new oo({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return"time"===n?t.map((t=>new Date(i.map(t)))):t.map((t=>i.map(t)))}(e,r,t);return bL({type:t})?function(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}(e,r):e}(s,c,n);return Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t,e){const{interpolate:n=Ta,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}(0,r);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});const i=function(t,e,n){return"enterDelay"===e||"enterDuration"===e||"size"===e?0:"band"===t?TP(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:a=i,paddingOuter:o=i}=r;return Object.assign(Object.assign({},r),{paddingInner:a,paddingOuter:o,padding:i,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=G(e),i=uL[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(r);default:return r}}(s,t,0,n,r)),{domain:l,range:xL(s,t,e,n,l,i,a),expectedDomain:c,guide:o,name:t,type:s})}function hL(t,e){const n={};for(const r of t){const{values:t,name:i}=r,a=e[i];for(const e of t){const{name:t,value:r}=e;n[t]=r.map((t=>a.map(t)))}}return n}function dL(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:e}=r.getOptions();if(e in t){const i=n.filter((t=>t.startsWith(e))).map((t=>+(t.replace(e,"")||0))),a=fr(i)+1,o=`${e}${a}`;t[o]=r,r.getOptions().key=o}else t[e]=r}return t}function pL(t,e){const[n]=MP("scale",e),{relations:r}=t,[i]=function(t){if(!t||!Array.isArray(t))return[kr,kr];let e,n;return[r=>{var i;e=r.map.bind(r),n=null===(i=r.invert)||void 0===i?void 0:i.bind(r);const a=t.filter((([t])=>"function"==typeof t)),o=t.filter((([t])=>"function"!=typeof t)),s=new Map(o);if(r.map=t=>{for(const[e,n]of a)if(e(t))return n;return s.has(t)?s.get(t):e(t)},!n)return r;const c=new Map(o.map((([t,e])=>[e,t]))),l=new Map(a.map((([t,e])=>[e,t])));return r.invert=t=>l.has(t)?t:c.has(t)?c.get(t):n(t),r},t=>(null!==e&&(t.map=e),null!==n&&(t.invert=n),t)]}(r);return i(n(t))}function gL(t){const e=t.flatMap((t=>Array.from(t.values()))).flatMap((t=>t.channels.map((t=>t.scale))));mL(e,"x"),mL(e,"y")}function vL(t){const{channels:e=[],type:n,scale:r={}}=t,i=["shape","color","opacity","size"];return 0!==e.length?e:"axisX"===n?["x"]:"axisY"===n?["y"]:"legends"===n?Object.keys(r).filter((t=>i.includes(t))):[]}function mL(t,e){const n=t.filter((({name:t,facet:n=!0})=>n&&t===e)),r=n.flatMap((t=>t.domain)),i=n.every(yL)?$n(r):n.every(bL)?Array.from(new Set(r)):null;if(null!==i)for(const t of n)t.domain=i}function yL(t){const{type:e}=t;if("string"!=typeof e)return!1;return["linear","log","pow","time"].includes(e)}function bL(t){const{type:e}=t;if("string"!=typeof e)return!1;return["band","point","ordinal"].includes(e)}function xL(t,e,n,r,i,a,o){const{range:s}=r;if("string"==typeof s)return function(t){return t.split("-")}(s);if(void 0!==s)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const t=kL(n,r,i,a,o),[s,u]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[Dr(e),Br(e)]:"opacity"===t?[0,1]:"size"===t?[1,10]:[0,1]}(e,t);return[null!=c?c:s,null!=l?l:u]}case"band":case"point":return[null!=c?c:"size"===e?5:0,null!=l?l:"size"===e?10:1];case"ordinal":return kL(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function kL(t,e,n,r,i){const[a]=MP("palette",i),{category10:o,category20:s}=r,c=function(t){return Array.from(new Set(t))}(n).length<=o.length?o:s,{palette:l=c,offset:u}=e;if(Array.isArray(l))return l;try{return a({type:l})}catch(t){const e=function(t,e,n=t=>t){if(!t)return null;const r=G(t),i=uL[`scheme${r}`],a=uL[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const t=i[e.length];if(t)return t}return e.map(((t,r)=>a(n(r/e.length))))}(l,n,u);if(e)return e;throw new Error(`Unknown Component: ${l} `)}}function wL(t,e){return e||(function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal")}function ML(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function OL(t,e){if(0===t.length)return t;const{domainMin:n,domainMax:r}=e,[i,a]=t;return[null!=n?n:i,null!=r?r:a]}function EL(t){return AL(t,(t=>{const e=typeof t;return"string"===e||"boolean"===e}))}function SL(t){return AL(t,(t=>t instanceof Date))}function AL(t,e){for(const n of t)if(n.some(e))return!0;return!1}const _L={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},TL={threshold:"threshold",quantize:"quantize",quantile:"quantile"},PL={ordinal:"ordinal",band:"band",point:"point"},CL={constant:"constant"};function LL(t,e,n){const{coordinates:r=[],title:i}=e,[,a]=MP("component",n),o=t.filter((({guide:t})=>null!==t)),s=[],c=function(t,e,n){const[,r]=MP("component",n),{coordinates:i}=t;function a(t,e,n,a){const o=function(t,e,n=[]){return"x"===t?_P(n)?`${e}Y`:`${e}X`:"y"===t?_P(n)?`${e}X`:`${e}Y`:null}(e,t,i);if(!a||!o)return;const{props:s}=r(o),{defaultPosition:c,defaultSize:l,defaultOrder:u,defaultCrossPadding:[f]}=s;return Object.assign(Object.assign({position:c,defaultSize:l,order:u,type:o,crossPadding:f},a),{scales:[n]})}return e.filter((t=>t.slider||t.scrollbar)).flatMap((t=>{const{slider:e,scrollbar:n,name:r}=t;return[a("slider",r,t,e),a("scrollbar",r,t,n)]})).filter((t=>!!t))}(e,t,n);if(s.push(...c),i){const{props:t}=a("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:o,defaultCrossPadding:c}=t,l="string"==typeof i?{title:i}:i;s.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:c[0],defaultSize:o},l))}const l=function(t,e){const n=t.filter((t=>function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;const{type:e,domain:n,range:r,interpolator:i}=t,a=n&&n.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&a&&o)||!(!["sequential"].includes(e)||!a||!o&&!i)||!(!["constant","identity"].includes(e)||!o)}(t)));return[...RL(n),...DL(n,e)]}(o,r);return l.forEach((([t,e])=>{const{props:n}=a(t),{defaultPosition:i,defaultPlane:c="xy",defaultOrientation:l,defaultSize:u,defaultOrder:f,defaultLength:h,defaultPadding:d=[0,0],defaultCrossPadding:p=[0,0]}=n,g=Z({},...e),{guide:v,field:m}=g,y=Array.isArray(v)?v:[v];for(const n of y){const[a,g]=zL(t,i,l,n,e,o,r);if(!a&&!g)continue;const v="left"===a||"right"===a,y=v?d[1]:d[0],b=v?p[1]:p[0],{size:x,order:k=f,length:w=h,padding:M=y,crossPadding:O=b}=n;s.push(Object.assign(Object.assign({title:m},n),{defaultSize:u,length:w,position:a,plane:c,orientation:g,padding:M,order:k,crossPadding:O,size:x,type:t,scales:e}))}})),s}function NL(t,e,n,r,i){const[a]=MP("component",r),{scaleInstances:o,scale:s,bbox:c}=t,l={bbox:c,library:r};return a(Pe(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:i,scales:o,theme:n,value:l,scale:s})}function jL(t,e){const n=["left","right","bottom","top"],r=Xn(t,(({type:t,position:e,group:r})=>n.includes(e)?void 0===r?t.startsWith("legend")?`legend-${e}`:Symbol("independent"):"independent"===r?Symbol("independent"):r:Symbol("independent")));return r.flatMap((([,t])=>{if(1===t.length)return t[0];if(void 0!==e){const n=t.filter((t=>void 0!==t.length)).map((t=>t.length)),r=xr(n);if(r>e)return t.forEach((t=>t.group=Symbol("independent"))),t;const i=(e-r)/(t.length-n.length);t.forEach((t=>{void 0===t.length&&(t.length=i)}))}const n=fr(t,(t=>t.size)),r=fr(t,(t=>t.order)),i=fr(t,(t=>t.crossPadding));return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}}))}function RL(t,e){const n=["shape","size","color","opacity"],r=t.filter((({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!((t,e)=>"constant"===t&&"size"===e)(t,e))),i=r.filter((({type:t})=>"constant"===t)),a=Xn(r.filter((({type:t})=>"constant"!==t)),(t=>t.field?t.field:Symbol("independent"))).map((([t,e])=>[t,[...e,...i]])).filter((([,t])=>t.some((t=>"constant"!==t.type)))),o=new Map(a);if(0===o.size)return[];const s=t=>t.sort((([t],[e])=>t.localeCompare(e))),c=Array.from(o).map((([,t])=>{const e=function(t){if(1===t.length)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...zr(t,n));return e}(t).sort(((t,e)=>e.length-t.length)),n=e.map((t=>({combination:t,option:t.map((t=>[t.name,IL(t)]))})));for(const{option:t,combination:e}of n)if(!t.every((t=>"constant"===t[1]))&&t.every((t=>"discrete"===t[1]||"constant"===t[1])))return["legendCategory",e];for(const[t,e]of S_)for(const{option:r,combination:i}of n)if(e.some((t=>J(s(t),s(r)))))return[t,i];return null})).filter(Sr);return c}function IL(t){const{type:e}=t;return"string"!=typeof e?null:e in _L?"continuous":e in PL?"discrete":e in TL?"distribution":e in CL?"constant":null}function DL(t,e){return t.map((t=>{const{name:n}=t;if(function(t){return SP(t,"helix").length>0}(e)||TP(e))return null;if(_P(e)&&(AP(e)||PP(e)))return null;if(n.startsWith("x"))return AP(e)?["axisArc",[t]]:PP(e)?["axisLinear",[t]]:[_P(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return AP(e)?["axisLinear",[t]]:PP(e)?["axisArc",[t]]:[_P(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if(function(t){return SP(t,"radar").length>0}(e))return["axisRadar",[t]];if(!AP(e))return["axisY",[t]]}return null})).filter(Sr)}function BL(t){const e=SP(t,"polar");if(e.length){const t=e[e.length-1],{startAngle:r,endAngle:i}=n(t);return[r,i]}const r=SP(t,"radial");if(r.length){const t=r[r.length-1],{startAngle:e,endAngle:n}=o(t);return[e,n]}return[-Math.PI/2,Math.PI/2*3]}function FL(t,e,n,r,i){const{name:a}=n[0];if("axisRadar"===t){const t=r.filter((t=>t.name.startsWith("position"))),e=function(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}(a);if(a===t.slice(-1)[0].name||null===e)return[null,null];const[n,o]=BL(i);return["center",(o-n)/(t.length-1)*e+n]}if("axisY"===t&&function(t){return SP(t,"parallel").length>0}(i))return _P(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){const[t]=BL(i);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:AP(i)||PP(i)?["center",null]:"axisX"===t&&function(t){return SP(t,"reflect").length>0}(i)||"axisX"===t&&function(t){return SP(t,"reflectY").length>0}(i)?["top",null]:e}function zL(t,e,n,r,i,a,o){const[s]=BL(o),c=[r.position||e,null!=s?s:n];return"string"==typeof t&&t.startsWith("axis")?FL(t,c,i,a,o):"string"==typeof t&&t.startsWith("legend")&&AP(o)&&"center"===r.position?["center","vertical"]:c}function GL(t,e,n,r,i,a){const{type:o}=t;if(!["left","right","bottom","top"].includes(r))return;if("string"!=typeof o)return;const s=o;return(s.startsWith("axis")?VL:s.startsWith("group")?WL:s.startsWith("legendContinuous")?qL:"legendCategory"===s?UL:s.startsWith("slider")?HL:"title"===s?YL:s.startsWith("scrollbar")?$L:()=>{})(t,e,n,r,i,a)}function WL(t,e,n,r,i,a){const{children:o}=t,s=fr(o,(t=>t.crossPadding));o.forEach((t=>t.crossPadding=s)),o.forEach((t=>GL(t,e,n,r,i,a)));const c=fr(o,(t=>t.size));t.size=c,o.forEach((t=>t.size=c))}function $L(t,e,n,r,i,a){const{trackSize:o=6}=Z({},i.scrollbar,t);t.size=o}function YL(t,e,n,r,i,a){const o=Z({},i.title,t),{title:s,subtitle:c,spacing:l=0}=o,u=Pe(o,["title","subtitle","spacing"]);if(s){const e=tN(s,_r(u,"title"));t.size=e.height}if(c){const e=tN(c,_r(u,"subtitle"));t.size+=l+e.height}}function HL(t,e,n,r,i,a){const{trackSize:o,handleIconSize:s}=(()=>{const{slider:e}=i;return Z({},e,t)})(),c=Math.max(o,2.4*s);t.size=c}function VL(t,e,n,r,i,a){var o;t.transform=t.transform||[{type:"hide"}];const s="left"===r||"right"===r,c=QL(t,r,i),{tickLength:l=0,labelSpacing:u=0,titleSpacing:f=0,labelAutoRotate:h}=c,d=Pe(c,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),p=XL(t,a),g=ZL(d,p),v=l+u;if(g&&g.length){const r=fr(g,(t=>t.width)),i=fr(g,(t=>t.height));if(s)t.size=r+v;else{const{tickFilter:a,labelTransform:s}=t;!function(t,e,n,r,i){const a=xr(e,(t=>t.width));if(a>n)return!0;const o=t.clone();o.update({range:[0,n]});const s=JL(t,i),c=s.map((t=>o.map(t)+function(t,e){if(!t.getBandWidth)return 0;const n=t.getBandWidth(e)/2;return n}(o,t))),l=s.map(((t,e)=>e)),u=-r[0],f=n+r[1],h=(t,e)=>{const{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<l.length;t++){const n=c[t],[r,i]=h(n,e[t]);if(r<u||i>f)return!0;const a=c[t+1];if(a){const[n]=h(a,e[t+1]);if(i>n)return!0}}return!1}(p,g,e,n,a)||s||!1===h||null===h?(t.labelTransform=null!==(o=t.labelTransform)&&void 0!==o?o:"rotate(0)",t.size=i+v):(t.labelTransform="rotate(90)",t.size=r+v)}}else t.size=l;const m=KL(d);m&&(t.size+=s?f+m.width:f+m.height)}function qL(t,e,n,r,i,a){const o=(()=>{const{legendContinuous:e}=i;return Z({},e,t)})(),{labelSpacing:s=0,titleSpacing:c=0}=o,l=Pe(o,["labelSpacing","titleSpacing"]),u="left"===r||"right"===r,f=_r(l,"ribbon"),{size:h}=f,d=_r(l,"handleIcon"),{size:p}=d,g=Math.max(h,2.4*p);t.size=g;const v=ZL(l,XL(t,a));if(v){const e=u?"width":"height",n=fr(v,(t=>t[e]));t.size+=n+s}const m=KL(l);m&&(u?t.size=Math.max(t.size,m.width):t.size+=c+m.height)}function UL(t,e,n,r,i,a){const o=(()=>{const{legendCategory:e}=i,{title:n}=t,[r,a]=Array.isArray(n)?[n,void 0]:[void 0,n];return Z({title:r},e,Object.assign(Object.assign({},t),{title:a}))})(),{itemSpacing:s,itemMarkerSize:c,titleSpacing:l,rowPadding:u,colPadding:f,maxCols:h=1/0,maxRows:d=1/0}=o,p=Pe(o,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:v}=t,m=t=>Math.min(t,d),y=t=>Math.min(t,h),b="left"===r||"right"===r,x=void 0===v?e+(b?0:n[0]+n[1]):v,k=KL(p),w=ZL(p,XL(t,a),"itemLabel"),M=Math.max(w[0].height,c)+u,O=(t,e=0)=>c+t+s[0]+e;b?(()=>{let e=-1/0,n=0,r=1,i=0,a=-1/0,o=-1/0;const s=k?k.height:0,c=x-s;for(const{width:t}of w){const s=O(t,f);e=Math.max(e,s),n+M>c?(r++,a=Math.max(a,i),o=Math.max(o,n),i=1,n=M):(n+=M,i++)}r<=1&&(a=i,o=n),t.size=e*y(r),t.length=o+s,Z(t,{cols:y(r),gridRow:a})})():"number"==typeof g?(()=>{const e=Math.ceil(w.length/g),n=fr(w,(t=>O(t.width)))*g;t.size=M*m(e)-u,t.length=Math.min(n,x)})():(()=>{let e=1,n=0,r=-1/0;for(const{width:t}of w){const i=O(t,f);n+i>x?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=M*m(e)-u,t.length=r})(),k&&(b?t.size=Math.max(t.size,k.width):t.size+=l+k.height)}function XL(t,e){const[n]=MP("scale",e),{scales:r,tickCount:i,tickMethod:a}=t,o=r.find((t=>"constant"!==t.type&&"identity"!==t.type));return void 0!==i&&(o.tickCount=i),void 0!==a&&(o.tickMethod=a),n(o)}function ZL(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=t,o=Pe(t,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=function(t,e,n){const r=JL(t,n),i=r.map((t=>"number"==typeof t?mm(t):t)),a=e?"string"==typeof e?AE(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return i.map(a)}(e,r,i),c=_r(o,n),l=s.map(((t,e)=>Object.fromEntries(Object.entries(c).map((([n,r])=>[n,"function"==typeof r?r(t,e):r]))))),u=s.map(((t,e)=>tN(t,l[e]))),f=l.some((t=>t.transform));if(!f){const e=s.map(((t,e)=>e));t.indexBBox=new Map(e.map((t=>[t,[s[t],u[t]]])))}return u}function KL(t){const{title:e}=t,n=Pe(t,["title"]);if((t=>!1===t||null===t)(e)||void 0===e)return null;const r=_r(n,"title"),{direction:i,transform:a}=r,o=Array.isArray(e)?e.join(","):e;if("string"!=typeof o)return null;return tN(o,Object.assign(Object.assign({},r),{transform:a||("vertical"===i?"rotate(-90)":"")}))}function QL(t,e,n){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${Mr(e)}`]:s}=n;return Z({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function JL(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function tN(t,e){const n=function(t){return t instanceof Rg?t:new tv({style:{text:`${t}`}})}(t),r=Pe(e,["filter"]);n.attr(Object.assign(Object.assign({},r),{visibility:"none"}));return n.getBBox()}function eN(t,e,n,r){var i,a;const{width:o,height:s,depth:c,x:l=0,y:u=0,z:f=0,inset:h=(null!==(i=n.inset)&&void 0!==i?i:0),insetLeft:d=h,insetTop:p=h,insetBottom:g=h,insetRight:v=h,margin:m=(null!==(a=n.margin)&&void 0!==a?a:0),marginLeft:y=m,marginBottom:b=m,marginTop:x=m,marginRight:k=m,padding:w=n.padding,paddingBottom:M=w,paddingLeft:O=w,paddingRight:E=w,paddingTop:S=w}=function(t,e,n,r){const{coordinates:i}=e;if(!AP(i)&&!PP(i))return e;const a=t.filter((t=>"string"==typeof t.type&&t.type.startsWith("axis")));if(0===a.length)return e;const o=a.map((t=>QL(t,"axisArc"===t.type?"arc":"linear",n))),s=fr(o,(t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0})),c=a.flatMap(((t,e)=>ZL(o[e],XL(t,r)))).filter(Sr),l=fr(c,(t=>t.height))+s,u=a.flatMap(((t,e)=>KL(o[e]))).filter((t=>null!==t)),f=0===u.length?0:fr(u,(t=>t.height)),{inset:h=l,insetLeft:d=h,insetBottom:p=h,insetTop:g=h+f,insetRight:v=h}=e;return Object.assign(Object.assign({},e),{insetLeft:d,insetBottom:p,insetTop:g,insetRight:v})}(t,e,n,r),A=(t,n,r,i,a)=>{const{marks:o}=e;if(0===o.length)return[i,a];if(t-i-a-.25*t>0)return[i,a];const s=.75*t;return["auto"===n?s*i/(i+a):i,"auto"===r?s*a/(i+a):a]},_=t=>"auto"===t?20:null!=t?t:20,T=_(S),P=_(M),C=nN(t,s-T-P,[T+x,P+b],["left","right"],e,n,r),{paddingLeft:L,paddingRight:N}=C,j=o-y-k,[R,I]=A(j,O,E,L,N),D=j-R-I,B=nN(t,D,[R+y,I+k],["bottom","top"],e,n,r),{paddingTop:F,paddingBottom:z}=B,G=s-b-x,[W,$]=A(G,M,S,z,F);return{width:o,height:s,depth:c,insetLeft:d,insetTop:p,insetBottom:g,insetRight:v,innerWidth:D,innerHeight:G-W-$,paddingLeft:R,paddingRight:I,paddingTop:$,paddingBottom:W,marginLeft:y,marginBottom:b,marginTop:x,marginRight:k,x:l,y:u,z:f}}function nN(t,e,n,r,i,a,o){const s=Un(t,(t=>t.position)),{padding:c=a.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:h=c}=i,d={paddingBottom:f,paddingLeft:l,paddingTop:h,paddingRight:u};for(const t of r){const r=`padding${Mr(qw(t))}`,i=s.get(t)||[],c=d[r],l=t=>{void 0===t.size&&(t.size=t.defaultSize)},u=t=>{"group"===t.type?(t.children.forEach(l),t.size=fr(t.children,(t=>t.size))):t.size=t.defaultSize},f=r=>{r.size||("auto"!==c?u(r):(GL(r,e,n,t,a,o),l(r)))},h=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},p="bottom"===t||"top"===t,g=dr(i,(t=>t.order)),v=i.filter((t=>t.type.startsWith("axis")&&t.order==g));if(v.length&&(v[0].crossPadding=0),"number"==typeof c)i.forEach(l),i.forEach(h);else if(0===i.length)d[r]=0;else{const t=jL(i,p?e+n[0]+n[1]:e);t.forEach(f);const a=t.reduce(((t,{size:e,crossPadding:n=12})=>t+e+n),0);d[r]=a}}return d}function rN({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:h,insetLeft:d,insetRight:p,insetTop:g}){const v=n+o,m=i+s,y=r+l,b=a+c,x=t-o-l,k=[v+d,m+g,f-d-p,u-g-h,"center",null,null];return{top:[v,0,f,m,"vertical",!0,Cn,o,x],right:[t-y,m,y,u,"horizontal",!1,Cn],bottom:[v,e-b,f,b,"vertical",!1,Cn,o,x],left:[0,m,v,u,"horizontal",!0,Cn],"top-left":[v,0,f,m,"vertical",!0,Cn],"top-right":[v,0,f,m,"vertical",!0,Cn],"bottom-left":[v,e-b,f,b,"vertical",!1,Cn],"bottom-right":[v,e-b,f,b,"vertical",!1,Cn],center:k,inner:k,outer:k}}function iN(t,e,n,r){const[i,a]=Fr(t,(t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))));!function(t,e,n,r){"center"===r?function(t){return Yc(t)&&Gc(t)}(e)?function(t,e,n){const[r,i,a,o]=n;for(const e of t)e.bbox={x:r,y:i,width:a,height:o},e.radar={index:t.indexOf(e),count:t.length}}(t,0,n):Gc(e)?function(t,e,n){const[r,i,a,o]=n;for(const e of t)e.bbox={x:r,y:i,width:a,height:o}}(t,0,n):Yc(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){const[r,i,a]=n,o=new Array(t.length).fill(0),s=e.map(o),c=s.filter(((t,e)=>e%2==1)).map((t=>t+i));for(let e=0;e<t.length;e++){const n=t[e],i=c[e],o=c[e+1]-i;n.bbox={x:r,y:i,width:a,height:o}}}(t,e,n):"vertical"===r&&function(t,e,n){const[r,i,,a]=n,o=new Array(t.length).fill(0),s=e.map(o),c=s.filter(((t,e)=>e%2==0)).map((t=>t+r));for(let e=0;e<t.length;e++){const n=t[e],r=c[e],o=c[e+1]-r;n.bbox={x:r,y:i,width:o,height:a}}}(t,e,n)}(t,e,n,t[0].orientation):"inner"===r?function(t,e,n){const[r,i,,a]=n,[o,s]=e.getCenter(),[c]=qc(e),l=c*(a/2),u=o-l,f=s-l;for(let e=0;e<t.length;e++){t[e].bbox={x:r+u,y:i+f,width:2*l,height:2*l}}}(t,e,n):"outer"===r&&function(t,e,n){const[r,i,a,o]=n;for(const e of t)e.bbox={x:r,y:i,width:a,height:o}}(t,0,n)}(i,e,n,r),function(t,e,n){if(0===t.length)return;const[r,i,a,o]=n,[s]=qc(e),c=o/2*s/Math.sqrt(2),l=r+a/2,u=i+o/2;for(let e=0;e<t.length;e++){t[e].bbox={x:l-c,y:u-c,width:2*c,height:2*c}}}(a,e,n)}function aN(t,e,n){const[r,i,a,o,s,c,l,u,f]=n,[h,d,p,g,v,m,y,b]="vertical"===s?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];t.sort(((t,e)=>null==l?void 0:l(t.order,e.order)));const x=t=>"title"===t||"group"===t||t.startsWith("legend"),k=(t,e,n)=>void 0===n?e:x(t)?n:e,w=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=c?d+m:d;e<t.length;e++){const r=t[e],{crossPadding:i=0,type:a}=r,{size:o}=r;r.bbox={[h]:c?n-o-i:n+i,[p]:w(a,g,u),[v]:o,[y]:k(a,b,f)},n+=(o+i)*(c?-1:1)}const M=t.filter((t=>"group"===t.type));for(const t of M){const{bbox:e,children:n}=t,r=e[y],i=r/n.length,a=n.reduce(((t,e)=>{var n;const r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t}),"flex-start"),o=n.map(((t,e)=>{const{length:r=i,padding:a=0}=t;return r+(e===n.length-1?0:a)})),s=r-xr(o),c="flex-start"===a?0:"center"===a?s/2:s;for(let t=0,r=e[p]+c;t<n.length;t++){const i=n[t],{padding:s=0}=i,c=t===n.length-1?0:s;i.bbox={[v]:e[v],[h]:e[h],[p]:r,[y]:o[t]-c},Z(i,{layout:{justifyContent:a}}),r+=o[t]}}}function oN(t,e,n){const{encode:r={},scale:i={},transform:a=[]}=e,o=Pe(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function sN(t,e,n){return Le(this,void 0,void 0,(function*(){const{library:t}=n,{data:r}=e,[i]=MP("data",t),a=function(t){if(j(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:e="inline"}=t,n=Pe(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}(r),{transform:o=[]}=a,s=[Pe(a,["transform"]),...o].map((t=>i(t,n))),c=yield function(t){return t.reduce(((t,e)=>n=>Le(this,void 0,void 0,(function*(){const r=yield t(n);return e(r)}))),kr)}(s)(r),l=!r||Array.isArray(r)||Array.isArray(c)?c:{value:c};return[Array.isArray(c)?Ir(c):[],Object.assign(Object.assign({},e),{data:l})]}))}function cN(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i={};for(const[t,e]of Object.entries(r))if(Array.isArray(e))for(let n=0;n<e.length;n++){i[`${t}${0===n?"":n}`]=e[n]}else i[t]=e;return[t,Object.assign(Object.assign({},e),{encode:i})]}function lN(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const a=Rr(r,(t=>{if(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;const{type:e}=t;return Sr(e)}(t))return t;const e=function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some((t=>void 0!==t[e]))}(t,e)?"field":"constant"}(i,t);return{type:e,value:t}}));return[t,Object.assign(Object.assign({},e),{encode:a})]}function uN(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=Rr(r,((t,e)=>{const{type:n}=t;return"constant"!==n||function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||"enterDelay"===t||"enterDuration"===t||"updateDelay"===t||"updateDuration"===t||"exitDelay"===t||"exitDuration"===t}(e)?t:Object.assign(Object.assign({},t),{constant:!0})}));return[t,Object.assign(Object.assign({},e),{encode:i})]}function fN(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:a}=n,o=function(t){const[e]=MP("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:yN(n)})}(a),s=Rr(r,(t=>o(i,t)));return[t,Object.assign(Object.assign({},e),{encode:s})]}function hN(t,e,n){const{tooltip:r={}}=e;return Nr(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Lr(r)&&function(t){if(0===Object.keys(t).length)return!0;const{title:e,items:n}=t;return void 0!==e||void 0!==n}(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function dN(t,e,n){const{data:r,encode:i,tooltip:a={}}=e;if(Nr(a))return[t,e];const o=e=>{if(!e)return e;if("string"==typeof e)return t.map((t=>({name:e,value:r[t][e]})));if(Lr(e)){const{field:n,channel:a,color:o,name:s=n,valueFormatter:c=t=>t}=e,l="string"==typeof c?AE(c):c,u=a&&i[a],f=u&&i[a].field,h=s||f||a,d=[];for(const e of t){const t=n?r[e][n]:u?i[a].value[e]:null;d[e]={name:h,color:o,value:l(t)}}return d}if("function"==typeof e){const n=[];for(const a of t){const t=e(r[a],a,r,i);Lr(t)?n[a]=t:n[a]={value:t}}return n}return e},{title:s,items:c=[]}=a,l=Pe(a,["title","items"]),u=Object.assign({title:o(s),items:Array.isArray(c)?c.map(o):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function pN(t,e,n){const{encode:r}=e,i=Pe(e,["encode"]);if(!r)return[t,e];const a=Object.entries(r),o=a.filter((([,t])=>{const{value:e}=t;return Array.isArray(e[0])})).flatMap((([e,n])=>{const r=[[e,new Array(t.length).fill(void 0)]],{value:i}=n,a=Pe(n,["value"]);for(let n=0;n<i.length;n++){const a=i[n];if(Array.isArray(a))for(let i=0;i<a.length;i++){const o=r[i]||[`${e}${i}`,new Array(t).fill(void 0)];o[1][n]=a[i],r[i]=o}}return r.map((([t,e])=>[t,Object.assign({type:"column",value:e},a)]))})),s=Object.fromEntries([...a,...o]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function gN(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{if("boolean"==typeof t)return t?{}:null;const n=t[e];return void 0===n||n?n:null},c="object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return Z(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map((t=>{const e=s(o,t);return[t,Object.assign({guide:s(r,t),slider:s(a,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]})))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function vN(t,e,n){const{animate:r}=e;return r||void 0===r||Z(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function mN(t,e,n){return Le(this,void 0,void 0,(function*(){const[r,i]=yield function(t,e,n){return Le(this,void 0,void 0,(function*(){const{library:r}=n,[i]=MP("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:s=[]}=t,c=[oN,sN,cN,lN,uN,fN,pN,vN,gN,hN,...a.map(i),...s.map(i),...o.map(i),dN];let l=[],u=t;for(const t of c)[l,u]=yield t(l,u,n);return[l,u]}))}(t,e,n),{encode:a,scale:o,data:s,tooltip:c}=i;if(!1===Array.isArray(s))return null;const{channels:l}=e,u=Kn(Object.entries(a).filter((([,t])=>Sr(t))),(t=>t.map((([t,e])=>Object.assign({name:t},e)))),(([t])=>{var e;const n=null===(e=/([^\d]+)\d*$/.exec(t))||void 0===e?void 0:e[1],r=l.find((t=>t.name===n));return(null==r?void 0:r.independent)?t:n})),f=l.filter((t=>{const{name:e,required:n}=t;if(u.find((([t])=>t===e)))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1})).flatMap((t=>{const{name:e,scale:n,scaleKey:r,range:i,quantitative:a,ordinal:s}=t;return u.filter((([t])=>t.startsWith(e))).map((([t,e],c)=>{const l=e.some((t=>t.visual)),u=e.some((t=>t.constant)),f=o[t]||{},{independent:h=!1,key:d=r||t,type:p=(u?"constant":l?"identity":n)}=f,g=Pe(f,["independent","key","type"]),v="constant"===p,m=v?void 0:i;return{name:t,values:e,scaleKey:h||v?Symbol("independent"):d,scale:Object.assign(Object.assign({type:p,range:m},g),{quantitative:a,ordinal:s})}}))}));return[i,Object.assign(Object.assign({},e),{index:r,channels:f,tooltip:c})]}))}function yN(t){const{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}function bN(t,e,n){var r;return Le(this,void 0,void 0,(function*(){const{library:i}=n,[a]=MP("composition",i),[o]=MP("interaction",i),s=new Set(Object.keys(i).map((t=>{var e;return null===(e=/mark\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Sr)),c=new Set(Object.keys(i).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Sr)),l=t=>{const{type:e}=t;if("function"==typeof e){const{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||c.has(e)?"mark":e},u=t=>"mark"===l(t),f=t=>"standardView"===l(t),h=t=>{const{type:e}=t;return"string"==typeof e&&!!c.has(e)},d=t=>{if(f(t))return[t];const e=l(t);return a({type:e,static:h(t)})(t)},p=[],g=new Map,v=new Map,m=[t],y=[];for(;m.length;){const t=m.shift();if(f(t)){const e=v.get(t),[r,a]=e?EN(e,t,i):yield wN(t,n);g.set(r,t),p.push(r);const o=a.flatMap(d).map((t=>EP(t,i)));if(m.push(...o),o.every(f)){const t=yield Promise.all(o.map((t=>MN(t,n))));gL(t);for(let e=0;e<o.length;e++){const n=o[e],r=t[e];v.set(n,r)}}}else{const e=d(u(t)?t:yield zN(t,n));Array.isArray(e)?m.push(...e):"function"==typeof e&&y.push(e())}}n.emitter.emit(E_.BEFORE_PAINT);const x=new Map,k=new Map,w=[];e.selectAll(YN(nA)).data(p,(t=>t.key)).join((t=>t.append("g").attr("className",nA).attr("id",(t=>t.key)).call(xN).each((function(t,e,r){SN(t,pm(r),w,n),x.set(t,r)}))),(t=>t.call(xN).each((function(t,e,r){SN(t,pm(r),w,n),k.set(t,r)}))),(t=>t.each((function(t,e,n){const r=n.nameInteraction.values();for(const t of r)t.destroy()})).remove()));const M=(t,e,r)=>Array.from(t.entries()).map((([i,a])=>{const o=r||new Map,s=g.get(i),c=function(t,e,n){const{library:r}=n,i=function(t){const[,e]=MP("interaction",t);return t=>{const[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(r),a=t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate,o=FN(e),s=o.map(i).filter(a).map((t=>t[0]));return(e,r,i)=>Le(this,void 0,void 0,(function*(){const a=[],[o,c]=yield wN(e,n);SN(o,t,a,n);for(const i of s.filter((t=>t!==r)))kN(i,t,e,o,n);for(const e of c)bN(e,t,n);return i(),{options:e,view:o}}))}(pm(a),s,n);return{view:i,container:a,options:s,setState:(t,e=t=>t)=>o.set(t,e),update:(n,r)=>Le(this,void 0,void 0,(function*(){const i=wr(Array.from(o.values()))(s);return yield c(i,n,(()=>{b(r)&&e(t,r,o)}))}))}})),O=(t=k,e,r)=>{var i;const a=M(t,O,r);for(const t of a){const{options:r,container:s}=t,c=s.nameInteraction;let l=FN(r);e&&(l=l.filter((t=>e.includes(t[0]))));for(const e of l){const[r,s]=e,l=c.get(r);if(l&&(null===(i=l.destroy)||void 0===i||i.call(l)),s){const e=ON(t.view,r,s,o)(t,a,n.emitter);c.set(r,{destroy:e})}}}},E=M(x,O);for(const t of E){const{options:e}=t,r=new Map;t.container.nameInteraction=r;for(const i of FN(e)){const[e,a]=i;if(a){const i=ON(t.view,e,a,o)(t,E,n.emitter);r.set(e,{destroy:i})}}}O();const{width:S,height:A}=t,_=[];for(const t of y){const r=new Promise((r=>Le(this,void 0,void 0,(function*(){for(const r of t){const t=Object.assign({width:S,height:A},r);yield bN(t,e,n)}r()}))));_.push(r)}n.views=p,null===(r=n.animations)||void 0===r||r.forEach((t=>null==t?void 0:t.cancel())),n.animations=w,n.emitter.emit(E_.AFTER_PAINT);const T=w.filter(Sr).map(RN).map((t=>t.finished));return Promise.all([...T,..._])}))}function xN(t){t.style("transform",(t=>`translate(${t.layout.x}, ${t.layout.y})`))}function kN(t,e,n,r,i){var a;const{library:o}=i,[s]=MP("interaction",o),c=e.node().nameInteraction,l=FN(n).find((([e])=>e===t)),u=c.get(t);if(!u)return;if(null===(a=u.destroy)||void 0===a||a.call(u),!l[1])return;const f=ON(r,t,l[1],s),h={options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},d=f(h,[],i.emitter);c.set(t,{destroy:d})}function wN(t,e){return Le(this,void 0,void 0,(function*(){const{library:n}=e,r=yield function(t,e){return Le(this,void 0,void 0,(function*(){const{library:n}=e,[r,i]=MP("mark",n),a=new Set(Object.keys(n).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Sr)),{marks:o}=t,s=[],c=[],l=[...o],{width:u,height:f}=function(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:h=c,inset:d=0,insetLeft:p=d,insetRight:g=d,insetTop:v=d,insetBottom:m=d}=t,y=t=>"auto"===t?20:t;return{width:n-y(i)-y(a)-l-u-p-g,height:e-y(o)-y(s)-f-h-v-m}}(t),h={options:t,width:u,height:f};for(;l.length;){const[t]=l.splice(0,1),n=yield zN(t,e),{type:o=Or("G2Mark type is required."),key:u}=n;if(a.has(o))c.push(n);else{const{props:t={}}=i(o),{composite:e=!0}=t;if(e){const{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),i=yield r(e,h),a=Array.isArray(i)?i:[i];l.unshift(...a.map(((t,e)=>Object.assign(Object.assign({},t),{key:`${u}-${e}`}))))}else s.push(n)}}return Object.assign(Object.assign({},t),{marks:s,components:c})}))}(t,e),i=function(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,a=Pe(t,["coordinate","interaction","style","marks"]),o=i.map((t=>t.coordinate||{})),s=i.map((t=>t.interaction||{})),c=i.map((t=>t.viewStyle||{})),l=[...o,e].reduceRight(((t,e)=>Z(t,e)),{}),u=[n,...s].reduce(((t,e)=>Z(t,e)),{}),f=[...c,r].reduce(((t,e)=>Z(t,e)),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:l,interaction:u,style:f})}(r);t.interaction=i.interaction,t.coordinate=i.coordinate,t.marks=[...i.marks,...i.components];const a=EP(i,n);return EN(yield MN(a,e),a,n)}))}function MN(t,e){return Le(this,void 0,void 0,(function*(){const{library:n}=e,[r]=MP("theme",n),[,i]=MP("mark",n),{theme:a,marks:o,coordinates:s=[]}=t,c=r(BN(a)),l=new Map;for(const t of o){const{type:n}=t,{props:r={}}=i(n),a=yield mN(t,r,e);if(a){const[t,e]=a;l.set(t,e)}}const u=Un(Array.from(l.values()).flatMap((t=>t.channels)),(({scaleKey:t})=>t));for(const t of u.values()){const e=t.reduce(((t,{scale:e})=>Z(t,e)),{}),{scaleKey:r}=t[0],{values:i}=t[0],a=Array.from(new Set(i.map((t=>t.field)).filter(Sr))),o=Z({guide:{title:0===a.length?void 0:a},field:a[0]},e),{name:l}=t[0],u=t.flatMap((({values:t})=>t.map((t=>t.value)))),f=Object.assign(Object.assign({},fL(l,u,o,s,c,n)),{uid:Symbol("scale"),key:r});t.forEach((t=>t.scale=f))}return l}))}function ON(t,e,n,r){const i=t.theme,a="string"==typeof e&&i[e]||{};return r(Z(a,Object.assign({type:e},n)))}function EN(t,e,n){var r;const[i]=MP("mark",n),[a]=MP("theme",n),[o]=MP("labelTransform",n),{key:s,frame:c=!1,theme:l,clip:u,style:f={},labelTransform:h=[]}=e,d=a(BN(l)),p=Array.from(t.values()),g=function(t,e){var n;const{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(t.flatMap((t=>t.channels.map((t=>t.scale)))))),o=new Map(a.map((t=>[t.name,t])));for(const t of r){const e=vL(t);for(const r of e){const e=o.get(r),s=(null===(n=t.scale)||void 0===n?void 0:n[r])||{},{independent:c=!1}=s;if(e&&!c){const{guide:n}=e,r="boolean"==typeof n?{}:n;e.guide=Z({},r,t),Object.assign(e,s)}else{const e=Object.assign(Object.assign({},s),{expectedDomain:s.domain,name:r,guide:nt(t,i)});a.push(e)}}}return a}(p,e),v=function(t){return t.map((t=>{const e=Z(t,t.style);return delete e.style,e}))}(LL(function(t,e,n){var r;for(const[e]of n.entries())if("cell"===e.type)return t.filter((t=>"shape"!==t.name));if(1!==e.length||t.some((t=>"shape"===t.name)))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const a={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},o=(null===(r=t.find((t=>"color"===t.name)))||void 0===r?void 0:r.field)||null,s={field:o,name:"shape",type:"constant",domain:[],range:[a[i]]};return[...t,s]}(Array.from(g),p,t),e,n)),m=eN(v,e,d,n),y=function(t,e,n){const[r]=MP("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=(h=u).find((t=>"cartesian"===t.type||"cartesian3D"===t.type))?h:[...h,{type:"cartesian"}];var h;const d="cartesian3D"===f[0].type,p=Object.assign(Object.assign({},t),{x:o,y:s,width:a-o-c,height:i-l-s,transformations:f.flatMap(r)});return d?new BT(p):new jT(p)}(m,e,n),b=c?Z({mainLineWidth:1,mainStroke:"#000"},f):f;!function(t,e,n){const r=Un(t,(t=>`${t.plane||"xy"}-${t.position}`)),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:m,height:y,width:b,depth:x}=n,k={xy:rN({width:b,height:y,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:m}),yz:rN({width:x,height:y,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:y,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:rN({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[t,n]of r.entries()){const[r,i]=t.split("-"),a=k[r][i],[o,s]=Fr(n,(t=>"string"==typeof t.type&&("center"===i||!(!t.type.startsWith("axis")||!["inner","outer"].includes(i)))));o.length&&iN(o,e,a,i),s.length&&aN(n,0,a)}}(jL(v),y,m),function(t){const e=t.find((({type:t})=>"axisX"===t)),n=t.find((({type:t})=>"axisY"===t)),r=t.find((({type:t})=>"axisZ"===t));e&&n&&r&&(e.plane="xy",n.plane="xy",r.plane="yz",r.origin=[e.bbox.x,e.bbox.y,0],r.eulerAngles=[0,-90,0],r.bbox.x=e.bbox.x,r.bbox.y=e.bbox.y,t.push(Object.assign(Object.assign({},e),{plane:"xz",showLabel:!1,showTitle:!1,origin:[e.bbox.x,e.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},n),{plane:"yz",showLabel:!1,showTitle:!1,origin:[n.bbox.x+n.bbox.width,n.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},r),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})))}(v);const x=new Map(Array.from(t.values()).flatMap((t=>{const{channels:e}=t;return e.map((({scale:t})=>[t.uid,pL(t,n)]))})));!function(t,e){const n=Array.from(t.values()).flatMap((t=>t.channels)),r=Kn(n,(t=>t.map((t=>e.get(t.scale.uid)))),(t=>t.name)).filter((([,t])=>t.some((t=>"function"==typeof t.getOptions().groupTransform))&&t.every((t=>t.getTicks)))).map((t=>t[1]));r.forEach((t=>{const e=t.map((t=>t.getOptions().groupTransform))[0];e(t)}))}(t,x);const k={};for(const t of v){const{scales:e=[]}=t,i=[];for(const t of e){const{name:e,uid:a}=t,o=null!==(r=x.get(a))&&void 0!==r?r:pL(t,n);i.push(o),"y"===e&&o.update(Object.assign(Object.assign({},o.getOptions()),{xScale:k.x})),dL(k,{[e]:o})}t.scaleInstances=i}const w=[];for(const[e,n]of t.entries()){const{children:t,dataDomain:r,modifier:a,key:o}=e,{index:c,channels:l,tooltip:u}=n,f=Object.fromEntries(l.map((({name:t,scale:e})=>[t,e]))),h=Rr(f,(({uid:t})=>x.get(t)));dL(k,h);const d=hL(l,h),p=i(e),[g,v,b]=AN(p(c,h,d,y)),M=r||g.length,O=a?a(v,M,m):[],E=t=>{var e,n;return null===(n=null===(e=u.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},S=t=>u.items.map((e=>e[t])),A=g.map(((t,e)=>{const n=Object.assign({points:v[e],transform:O[e],index:t,markKey:o,viewKey:s},u&&{title:E(t),items:S(t)});for(const[r,i]of Object.entries(d))n[r]=i[t],b&&(n[`series${G(r)}`]=b[e].map((t=>i[t])));return b&&(n.seriesIndex=b[e]),b&&u&&(n.seriesItems=b[e].map((t=>S(t))),n.seriesTitle=b[e].map((t=>E(t)))),n}));n.data=A,n.index=g;const _=null==t?void 0:t(A,h,m);w.push(..._||[])}return[{layout:m,theme:d,coordinate:y,markState:t,key:s,clip:u,scale:k,style:b,components:v,labelTransform:wr(h.map(o))},w]}function SN(t,e,n,r){return Le(this,void 0,void 0,(function*(){const{library:i}=r,{components:a,theme:o,layout:s,markState:c,coordinate:l,key:u,style:f,clip:h,scale:d}=t,{x:p,y:g,width:v,height:m}=s,y=Pe(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map(((t,e)=>e)),k=b.map((t=>Tr(Object.assign({},o.view,f),t))),w=["a","margin","padding","inset"].map((t=>_r(y,t))),M=t=>t.style("x",(t=>_[t].x)).style("y",(t=>_[t].y)).style("width",(t=>_[t].width)).style("height",(t=>_[t].height)).each((function(t,e,n){!function(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}(pm(n),k[t])}));let O=0,E=0,S=v,A=m;const _=x.map((t=>{const e=w[t],{left:n=0,top:r=0,bottom:i=0,right:a=0}=e;return O+=n,E+=r,S-=n+a,A-=r+i,{x:O,y:E,width:S,height:A}}));e.selectAll(YN(oA)).data(x.filter((t=>Sr(k[t]))),(t=>b[t])).join((t=>t.append("rect").attr("className",oA).style("zIndex",-2).call(M)),(t=>t.call(M)),(t=>t.remove()));const T=function(t){let e=-1/0,n=1/0;for(const[r,i]of t){const{animate:t={}}=r,{data:a}=i,{enter:o={},update:s={},exit:c={}}=t,{type:l,duration:u=300,delay:f=0}=s,{type:h,duration:d=300,delay:p=0}=o,{type:g,duration:v=300,delay:m=0}=c;for(const t of a){const{updateType:r=l,updateDuration:i=u,updateDelay:a=f,enterType:o=h,enterDuration:s=d,enterDelay:c=p,exitDuration:y=v,exitDelay:b=m,exitType:x=g}=t;(void 0===r||r)&&(e=Math.max(e,i+a),n=Math.min(n,a)),(void 0===x||x)&&(e=Math.max(e,y+b),n=Math.min(n,b)),(void 0===o||o)&&(e=Math.max(e,s+c),n=Math.min(n,c))}}return e===-1/0?null:[n,e-n]}(c),P=!!T&&{duration:T[1]};for(const[,t]of Xn(a,(t=>`${t.type}-${t.position}`)))t.forEach(((t,e)=>t.index=e));const C=e.selectAll(YN(iA)).data(a,(t=>`${t.type}-${t.position}-${t.index}`)).join((t=>t.append("g").style("zIndex",(({zIndex:t})=>t||-1)).attr("className",iA).append((t=>NL(Z({animate:P,scale:d},t),l,o,i,c)))),(t=>t.transition((function(t,e,n){const{preserve:r=!1}=t;if(r)return;const a=NL(Z({animate:P,scale:d},t),l,o,i,c),{attributes:s}=a,[u]=n.childNodes;return u.update(s,!1)})))).transitions();n.push(...C.flat().filter(Sr));const L=e.selectAll(YN(rA)).data([s],(()=>u)).join((t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",rA).call(GN).call($N,Array.from(c.keys())).call(HN,h)),(t=>t.call($N,Array.from(c.keys())).call((t=>T?function(t,e){const[n,r]=e;t.transition((function(t,e,i){const{transform:a,width:o,height:s}=i.style,{paddingLeft:c,paddingTop:l,innerWidth:u,innerHeight:f,marginLeft:h,marginTop:d}=t,p=[{transform:a,width:o,height:s},{transform:`translate(${c+h}, ${l+d})`,width:u,height:f}];return i.animate(p,{delay:n,duration:r,fill:"both"})}))}(t,T):GN(t))).call(HN,h))).transitions();n.push(...L.flat());for(const[a,o]of c.entries()){const{data:s}=o,{key:c,class:l,type:u}=a,f=e.select(`#${c}`),h=CN(a,o,t,r),d=jN(a,o,t,i),p=IN(a,o,t,i),g=DN(a,o,t,i),v=TN(e,f,l,"element"),m=f.selectAll(YN(eA)).selectFacetAll(v).data(s,(t=>t.key),(t=>t.groupKey)).join((t=>t.append(h).attr("className",eA).attr("markType",u).transition((function(t,e,n){return d(t,[n])}))),(t=>t.call((t=>{const e=t.parent(),n=Ar((t=>{const[e,n]=t.getBounds().min;return[e,n]}));t.transition((function(t,r,i){PN(i,e,n);const a=h(t,r),o=p(t,[i],[a]);return null!==o||(i.nodeName===a.nodeName&&"g"!==a.nodeName?Er(i,a):(i.parentNode.replaceChild(a,i),a.className=eA,a.markType=u,a.__data__=i.__data__)),o})).attr("markType",u).attr("className",eA)}))),(t=>t.each((function(t,e,n){n.__removed__=!0})).transition((function(t,e,n){return g(t,[n])})).remove()),(t=>t.append(h).attr("className",eA).attr("markType",u).transition((function(t,e,n){const{__fromElements__:r}=n,i=p(t,r,[n]);return new gm(r,null,n.parentNode).transition(i).remove(),i}))),(t=>t.transition((function(t,e,n){const r=new gm([],n.__toData__,n.parentNode).append(h).attr("className",eA).attr("markType",u).nodes();return p(t,[n],r)})).remove())).transitions();n.push(...m.flat())}!function(t,e,n,r,i){const[a]=MP("labelTransform",r),{markState:o,labelTransform:s}=t,c=e.select(YN(tA)).node(),l=new Map,u=new Map,f=Array.from(o.entries()).flatMap((([n,a])=>{const{labels:o=[],key:s}=n,c=function(t,e,n,r,i){const[a]=MP("shape",r),{data:o,encode:s}=t,{data:c,defaultLabelShape:l}=e,u=c.map((t=>t.points)),f=Rr(s,(t=>t.value)),{theme:h,coordinate:d}=n,p=Object.assign(Object.assign({},i),{document:OP(i),theme:h,coordinate:d});return t=>{const{index:e,points:n}=t,r=o[e],{formatter:i=t=>`${t}`,transform:s,style:c,render:d,selector:g,element:v}=t,m=Pe(t,["formatter","transform","style","render","selector","element"]),y=Rr(Object.assign(Object.assign({},m),c),(t=>_N(t,r,e,o,{channel:f,element:v}))),{shape:b=l,text:x}=y,k=Pe(y,["shape","text"]),w="string"==typeof i?AE(i):i,M=Object.assign(Object.assign({},k),{text:w(x,r,e,o),datum:r}),O=Object.assign({type:`label.${b}`,render:d},k);return a(O,p)(n,M,LN(h,"label",b,"label"),u)}}(n,a,t,r,i),f=e.select(`#${s}`).selectAll(YN(eA)).nodes().filter((t=>!t.__removed__));return o.flatMap(((t,e)=>{const n=Pe(t,["transform"]);return f.flatMap((r=>{const i=function(t,e,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,c=function(t){const e=t.cloneNode(),n=t.getAnimations();e.style.visibility="hidden",n.forEach((t=>{const n=t.effect.getKeyframes();e.attr(n[n.length-1])})),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:i,max:a}=r;return[i,a]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:c,index:s,points:a,dependentElement:n})];const l=function(t){const{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw new Error(`Unknown selector: ${e}`)}(t),u=r.map(((r,o)=>Object.assign(Object.assign({},t),{key:`${i[o]}-${e}`,bounds:[a[o]],index:r,points:a,dependentElement:n})));return l?l(u):u}(n,e,r);return i.forEach((e=>{l.set(e,(t=>c(Object.assign(Object.assign({},t),{element:r})))),u.set(e,t)})),i}))}))})),h=pm(c).selectAll(YN(aA)).data(f,(t=>t.key)).join((t=>t.append((t=>l.get(t)(t))).attr("className",aA)),(t=>t.each((function(t,e,n){Er(n,l.get(t)(t))}))),(t=>t.remove())).nodes(),d=Un(h,(t=>u.get(t.__data__))),{coordinate:p,layout:g}=t,v={canvas:i.canvas,coordinate:p,layout:g};for(const[t,e]of d){const{transform:n=[]}=t;wr(n.map(a))(e,v)}s&&s(h,v)}(t,e,0,i,r)}))}function AN([t,e,n]){if(n)return[t,e,n];const r=[],i=[];for(let n=0;n<t.length;n++){const a=t[n],o=e[n];o.every((([t,e])=>Sr(t)&&Sr(e)))&&(r.push(a),i.push(o))}return[r,i]}function _N(t,e,n,r,i){return"function"==typeof t?t(e,n,r,i):"string"!=typeof t?t:Lr(e)&&void 0!==e[t]?e[t]:t}function TN(t,e,n,r){return t.node().parentElement.findAll((t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node())).flatMap((t=>t.getElementsByClassName(r)))}function PN(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=e.parentNode,[a,o]=n(r),[s,c]=n(i);!function(t,e){const{transform:n}=t.style,r=(t=>"none"===t||void 0===t)(n)?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${a-s}, ${o-c})`),e.append(t)}function CN(t,e,n,r){const{library:i}=r,[a]=MP("shape",i),{data:o,encode:s}=t,{defaultShape:c,data:l,shape:u}=e,f=Rr(s,(t=>t.value)),h=l.map((t=>t.points)),{theme:d,coordinate:p}=n,{type:g,style:v={}}=t,m=Object.assign(Object.assign({},r),{document:OP(r),coordinate:p,theme:d});return e=>{const{shape:n=c}=v,{shape:r=n,points:i,seriesIndex:s,index:l}=e,p=Pe(e,["shape","points","seriesIndex","index"]),y=Object.assign(Object.assign({},p),{index:l}),b=s?s.map((t=>o[t])):o[l],x=s||l,k=Rr(v,(t=>_N(t,b,x,o,{channel:f})));return(u[r]?u[r](k,m):a(Object.assign(Object.assign({},k),{type:WN(t,r)}),m))(i,y,LN(d,g,r,c),h)}}function LN(t,e,n,r){if("string"!=typeof e)return;const{color:i}=t,a=t[e]||{},o=a[n]||a[r];return Object.assign({color:i},o)}function NN(t,e,n,r,i){var a,o;const[,s]=MP("shape",i),[c]=MP("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:h}=r,d=`default${G(t)}Animation`,{[d]:p}=(null===(a=u[l])||void 0===a?void 0:a.props)||s(WN(e,l)).props,{[t]:g={}}=f,v=(null===(o=e.animate)||void 0===o?void 0:o[t])||{},m={coordinate:h};return(e,n,r)=>{const{[`${t}Type`]:i,[`${t}Delay`]:a,[`${t}Duration`]:o,[`${t}Easing`]:s}=e,l=Object.assign({type:i||p},v);if(!l.type)return null;const u=c(l,m)(n,r,Z(g,{delay:a,duration:o,easing:s}));return Array.isArray(u)?u:[u]}}function jN(t,e,n,r){return NN("enter",t,e,n,r)}function RN(t){return t.finished.then((()=>{t.cancel()})),t}function IN(t,e,n,r){return NN("update",t,e,n,r)}function DN(t,e,n,r){return NN("exit",t,e,n,r)}function BN(t={}){if("string"==typeof t)return{type:t};const{type:e="light"}=t,n=Pe(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function FN(t){const{interaction:e={}}=t;return Object.entries(Z({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function zN(t,e){return Le(this,void 0,void 0,(function*(){const{data:n}=t,r=Pe(t,["data"]);if(null==n)return t;const[,{data:i}]=yield sN(0,{data:n},e);return Object.assign({data:i},r)}))}function GN(t){t.style("transform",(t=>`translate(${t.paddingLeft+t.marginLeft}, ${t.paddingTop+t.marginTop})`)).style("width",(t=>t.innerWidth)).style("height",(t=>t.innerHeight))}function WN(t,e){const{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function $N(t,e){const n=t=>void 0!==t.class?`${t.class}`:"";if(0===t.nodes().length)return;t.selectAll(YN(JS)).data(e,(t=>t.key)).join((t=>t.append("g").attr("className",JS).attr("id",(t=>t.key)).style("facet",n).style("fill","transparent").style("zIndex",(t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}))),(t=>t.style("facet",n).style("fill","transparent").style("zIndex",(t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}))),(t=>t.remove()));t.select(YN(tA)).node()||t.append("g").attr("className",tA).style("zIndex",0)}function YN(...t){return t.map((t=>`.${t}`)).join("")}function HN(t,e){t.node()&&t.style("clipPath",(t=>{if(!e)return null;const{paddingTop:n,paddingLeft:r,marginLeft:i,marginTop:a,innerWidth:o,innerHeight:s}=t;return new Qg({style:{x:r+i,y:n+a,width:o,height:s}})}))}function VN(t){const{style:e,scale:n,type:r}=t,i={},a=tt(e,"columnWidthRatio");return a&&"interval"===r&&(i.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-a})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),i)})}function qN(t){const e=function(t){return function(...t){return e=>t.reduce(((t,e)=>e(t)),e)}(VN)(t)}(t);return e.children&&Array.isArray(e.children)&&(e.children=e.children.map((t=>qN(t)))),e}function UN(t){const e=Z({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){const t=i.shift();if(void 0===t.key){const e=n.get(t),i=r.get(t),a=null===e?"0":`${e.key}-${i}`;t.key=a}const{children:e=[]}=t;if(Array.isArray(e))for(let a=0;a<e.length;a++){const o=Z({},e[a]);e[a]=o,n.set(o,t),r.set(o,a),i.push(o)}}return e}function XN(t,e){const n=new x_;return n.registerPlugin(new w_),new gv({width:t,height:e,container:document.createElement("div"),renderer:n})}function ZN(t,e={},n=()=>{},r=t=>{throw t}){const{width:i=640,height:a=480,depth:o=0}=t,s=UN(qN(t)),{canvas:c=XN(i,a),emitter:l=new O_,library:u}=e;e.canvas=c,e.emitter=l;const{width:f,height:h}=c.getConfig();f===i&&h===a||c.resize(i,a),l.emit(E_.BEFORE_RENDER);const d=pm(c.document.documentElement);return c.ready.then((()=>bN(Object.assign(Object.assign({},s),{width:i,height:a,depth:o}),d,e))).then((()=>{if(o){const[t,e]=c.document.documentElement.getPosition();c.document.documentElement.setPosition(t,e,-o/2)}c.requestAnimationFrame((()=>{c.requestAnimationFrame((()=>{l.emit(E_.AFTER_RENDER),null==n||n()}))}))})).catch((t=>{null==r||r(t)})),"string"==typeof(p=c.getConfig().container)?document.getElementById(p):p;var p}function KN(t,e={},n=!1){const{canvas:r,emitter:i}=e;r&&(!function(t){const e=t.getRoot().querySelectorAll(`.${nA}`);null==e||e.forEach((t=>{const{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach((t=>{null==t||t.destroy()}))}))}(r),n?r.destroy():r.destroyChildren()),i.off()}const QN={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function JN(t,e){var n;return null!==(n=t.style[e])&&void 0!==n?n:QN[e]}function tj(t,e,n,r){t.style[e]=n,r&&t.children.forEach((t=>tj(t,e,n,r)))}function ej(t){tj(t,"visibility","hidden",!0)}function nj(t){tj(t,"visibility","visible",!0)}function rj(t){return pm(t).selectAll(`.${eA}`).nodes().filter((t=>!t.__removed__))}function ij(t,e){return aj(t,e).flatMap((({container:t})=>rj(t)))}function aj(t,e){return e.filter((e=>e!==t&&e.options.parentKey===t.options.key))}function oj(t){return pm(t).select(`.${rA}`).node()}function sj(t){if("g"===t.tagName)return t.getRenderBounds();const e=t.getGeometryBounds(),n=new Vu;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function cj(t,e){const{offsetX:n,offsetY:r}=e,i=sj(t),{min:[a,o],max:[s,c]}=i;return n<a||n>s||(r<o||r>c)?null:[n-a,r-o]}function lj(t,e){const{offsetX:n,offsetY:r}=e,[i,a,o,s]=function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return[n,r,i,a]}(t);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function uj(t){return t=>t.__data__.color}function fj(t){return t=>t.__data__.x}function hj(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap((t=>Array.from(t.markState.keys()).map((e=>[pj(t.key,e.key),e.data])))));return t=>{const{index:e,markKey:r,viewKey:i}=t.__data__;return n.get(pj(i,r))[e]}}function dj(t,e=(t,e)=>t,n=(t,e,n)=>t.setAttribute(e,n)){const r="__states__",i="__ordinal__",a=a=>{const{[r]:o=[],[i]:s={}}=a,c=o.reduce(((e,n)=>Object.assign(Object.assign({},e),t[n])),s);if(0!==Object.keys(c).length){for(const[t,r]of Object.entries(c)){const i=JN(a,t),o=e(r,a);n(a,t,o),t in s||(s[t]=i)}a[i]=s}},o=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{o(t),t[r]=[...e],a(t)},removeState:(t,...e)=>{o(t);for(const n of e){const e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}a(t)},hasState:(t,e)=>(o(t),-1!==t[r].indexOf(e))}}function pj(t,e){return`${t},${e}`}function gj(t,e){const n=(Array.isArray(t)?t:[t]).flatMap((t=>t.marks.map((e=>[pj(t.key,e.key),e.state])))),r={};for(const t of e){const[e,i]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce(((t,n)=>{const[r,a={}]=n,o=void 0===(s=a[e])||"object"==typeof s&&0===Object.keys(s).length?i:a[e];var s;for(const[e,n]of Object.entries(o)){const i=t[e],a=(t,e,a,o)=>{const s=pj(o.__data__.viewKey,o.__data__.markKey);return r!==s?null==i?void 0:i(t,e,a,o):"function"!=typeof n?n:n(t,e,a,o)};t[e]=a}return t}),{})}return r}function vj(t,e){const n=new Map(t.map(((t,e)=>[t,e]))),r=e?t.map(e):t;return(t,i)=>{if("function"!=typeof t)return t;const a=n.get(i);return t(e?e(i):i,a,r,i)}}function mj(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=Pe(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const a=t=>t.__data__.points,o=(t,e)=>{const[,n,r]=t,[i,,,a]=e;return[n,i,a,r]};return[t=>{var e;if(t.length<=1)return;const r=Jn(t,((t,e)=>{const{x:n}=t.__data__,{x:r}=e.__data__;return n-r}));for(let t=1;t<r.length;t++){const s=Ks(),c=r[t-1],l=r[t],[u,f,h,d]=o(a(c),a(l));s.moveTo(...u),s.lineTo(...f),s.lineTo(...h),s.lineTo(...d),s.closePath();const p=Rr(i,(t=>n(t,c))),{fill:g=c.getAttribute("fill")}=p,v=Pe(p,["fill"]),m=new qg({className:"element-link",style:Object.assign({d:s.toString(),fill:g,zIndex:-2},v)});null===(e=c.link)||void 0===e||e.remove(),c.parentNode.appendChild(m),c.link=m}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function yj(t,e,n){const r=e=>{const{transform:n}=t.style;return n?`${n} ${e}`:e};if(Gc(n)){const{points:i}=t.__data__,[a,o]=zc(n)?km(i):i,s=n.getCenter(),c=gs(a,s),l=gs(o,s),u=ys(c)+xs(c,l)/2;return r(`translate(${e*Math.cos(u)}, ${e*Math.sin(u)})`)}return zc(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function bj(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=Pe(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(t,e,n)=>{const r=t.invert(e),i=e+t.getBandWidth(r)/2,a=t.getStep(r)/2,o=a*n;return[i-a+o,i+a-o]},l=(t,n)=>{const{padding:a}=n,[o,s]=((t,e)=>{const{x:n}=r;if(!gS(n))return[0,1];const{__data__:i}=t,{x:a}=i,[o,s]=c(n,a,e);return[o,s]})(t,a),[l,u]=((t,e)=>{const{y:n}=r;if(!gS(n))return[0,1];const{__data__:i}=t,{y:a}=i,[o,s]=c(n,a,e);return[o,s]})(t,a),f=[[o,l],[s,l],[s,u],[o,u]].map((t=>i.map(t))),{__data__:h}=t,{y:d,y1:p}=h;return Sm(e,f,{y:d,y1:p},i,n)},u=(t,e)=>{const{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,a=Pe(e,["transform","transformOrigin","stroke"]),o=Object.assign({transform:n,transformOrigin:r,stroke:i},a),s=t.cloneNode(!0);for(const[t,e]of Object.entries(o))s.style[t]=e;return s};return[t=>{t.background&&t.background.remove();const e=Rr(o,(e=>a(e,t))),{fill:n="#CCD6EC",fillOpacity:i=.3,zIndex:c=-2,padding:f=.001,lineWidth:h=0}=e,d=Pe(e,["fill","fillOpacity","zIndex","padding","lineWidth"]),p=Object.assign(Object.assign({},d),{fill:n,fillOpacity:i,zIndex:c,padding:f,lineWidth:h}),g=(()=>{const{x:t,y:e}=r;return[t,e].some(gS)})()?l:u,v=g(t,p);v.className=s,t.parentNode.parentNode.appendChild(v),t.background=v},t=>{var e;null===(e=t.background)||void 0===e||e.remove(),t.background=null},t=>t.className===s]}function xj(t,e){const n=t.getRootNode().defaultView.getContextService().getDomElement();(null==n?void 0:n.style)&&(t.cursor=n.style.cursor,n.style.cursor=e)}function kj(t){xj(t,t.cursor)}function wj(t,e,n){return t.find((t=>Object.entries(e).every((([e,r])=>n(t)[e]===r))))}function Mj(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Oj(t,e=!1){const n=v(t,(t=>!!t)).map(((t,e)=>[0===e?"M":"L",...t]));return e&&n.push(["Z"]),n}function Ej(t){return t.querySelectorAll(".element")}function Sj(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function Aj(t,{elements:e,datum:n,groupKey:r=t=>t,link:i=!1,background:a=!1,delay:o=60,scale:s,coordinate:c,emitter:l,state:u={}}){var f;const h=e(t),d=new Set(h),p=Un(h,r),g=vj(h,n),[v,m]=mj(Object.assign({elements:h,valueof:g,link:i,coordinate:c},_r(u.active,"link"))),[y,b,x]=bj(Object.assign({document:t.ownerDocument,scale:s,coordinate:c,background:a,valueof:g},_r(u.active,"background"))),k=Z(u,{active:Object.assign({},(null===(f=u.active)||void 0===f?void 0:f.offset)&&{transform:(...t)=>{const e=u.active.offset(...t),[,n]=t;return yj(h[n],e,c)}})}),{setState:w,removeState:M,hasState:O}=dj(k,g);let E;const S=t=>{const{target:e,nativeEvent:i=!0}=t;if(!d.has(e))return;E&&clearTimeout(E);const a=r(e),o=p.get(a),s=new Set(o);for(const t of h)s.has(t)?O(t,"active")||w(t,"active"):(w(t,"inactive"),m(t)),t!==e&&b(t);y(e),v(o),i&&l.emit("element:highlight",{nativeEvent:i,data:{data:n(e),group:o.map(n)}})},A=(t=!0)=>{for(const t of h)M(t,"active","inactive"),b(t),m(t);t&&l.emit("element:unhighlight",{nativeEvent:t})},_=t=>{const{target:e}=t;a&&!x(e)||(a||d.has(e))&&(o>0?(E&&clearTimeout(E),E=setTimeout((()=>{A(),E=null}),o)):A())},T=()=>{A()};t.addEventListener("pointerover",S),t.addEventListener("pointerout",_),t.addEventListener("pointerleave",T);const P=t=>{const{nativeEvent:e}=t;e||A(!1)},C=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,i=wj(h,r,n);i&&S({target:i,nativeEvent:!1})};return l.on("element:highlight",C),l.on("element:unhighlight",P),()=>{t.removeEventListener("pointerover",S),t.removeEventListener("pointerout",_),t.removeEventListener("pointerleave",T),l.off("element:highlight",C),l.off("element:unhighlight",P);for(const t of h)b(t),m(t)}}function _j(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,a=Pe(t,["delay","createGroup","background","link"]);return(t,o,s)=>{const{container:c,view:l,options:u}=t,{scale:f,coordinate:h}=l;return Aj(oj(c),Object.assign({elements:rj,datum:hj(l),groupKey:n?n(l):void 0,coordinate:h,scale:f,state:gj(u,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:s},a))}}function Tj(t){return _j(Object.assign(Object.assign({},t),{createGroup:fj}))}function Pj(t){return _j(Object.assign(Object.assign({},t),{createGroup:uj}))}function Cj(t,{elements:e,datum:n,groupKey:r=t=>t,link:i=!1,single:a=!1,coordinate:o,background:s=!1,scale:c,emitter:l,state:u={}}){var f;const h=e(t),d=new Set(h),p=Un(h,r),g=vj(h,n),[v,m]=mj(Object.assign({link:i,elements:h,valueof:g,coordinate:o},_r(u.selected,"link"))),[y,b]=bj(Object.assign({document:t.ownerDocument,background:s,coordinate:o,scale:c,valueof:g},_r(u.selected,"background"))),x=Z(u,{selected:Object.assign({},(null===(f=u.selected)||void 0===f?void 0:f.offset)&&{transform:(...t)=>{const e=u.selected.offset(...t),[,n]=t;return yj(h[n],e,o)}})}),{setState:k,removeState:w,hasState:M}=dj(x,g),O=(t=!0)=>{for(const t of h)w(t,"selected","unselected"),m(t),b(t);t&&l.emit("element:unselect",{nativeEvent:!0})},E=t=>{const{target:e,nativeEvent:o=!0}=t;return d.has(e)?a?((t,e,i=!0)=>{if(M(e,"selected"))O();else{const a=r(e),o=p.get(a),s=new Set(o);for(const t of h)s.has(t)?k(t,"selected"):(k(t,"unselected"),m(t)),t!==e&&b(t);if(v(o),y(e),!i)return;l.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...o.map(n)]}}))}})(t,e,o):((t,e,a=!0)=>{const o=r(e),s=p.get(o),c=new Set(s);if(M(e,"selected")){if(!h.some((t=>!c.has(t)&&M(t,"selected"))))return O();for(const t of s)k(t,"unselected"),m(t),b(t)}else{const t=s.some((t=>M(t,"selected")));for(const t of h)c.has(t)?k(t,"selected"):M(t,"selected")||k(t,"unselected");!t&&i&&v(s),y(e)}a&&l.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:a,data:{data:h.filter((t=>M(t,"selected"))).map(n)}}))})(t,e,o):O()};t.addEventListener("click",E);const S=t=>{const{nativeEvent:e,data:r}=t;if(e)return;const i=a?r.data.slice(0,1):r.data;for(const t of i){const e=wj(h,t,n);E({target:e,nativeEvent:!1})}},A=()=>{O(!1)};return l.on("element:select",S),l.on("element:unselect",A),()=>{for(const t of h)m(t);t.removeEventListener("click",E),l.off("element:select",S),l.off("element:unselect",A)}}function Lj(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=Pe(t,["createGroup","background","link"]);return(t,a,o)=>{const{container:s,view:c,options:l}=t,{coordinate:u,scale:f}=c;return Cj(oj(s),Object.assign({elements:rj,datum:hj(c),groupKey:e?e(c):void 0,coordinate:u,scale:f,state:gj(l,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:o},i))}}function Nj(t){return Lj(Object.assign(Object.assign({},t),{createGroup:fj}))}function jj(t){return Lj(Object.assign(Object.assign({},t),{createGroup:uj}))}function Rj(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,a=Pe(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{view:o,container:s,update:c,setState:l}=t,{markState:u,scale:f,coordinate:h}=o,d=function(t,e,n){const[r]=Array.from(t.entries()).filter((([t])=>t.type===e)).map((([t])=>{const{encode:e}=t;return Object.fromEntries(n.map((t=>{const n=e[t];return[t,n?n.value:void 0]})))}));return r}(u,"line",["x","y","series"]);if(!d)return;const{y:p,x:g,series:v=[]}=d,m=p.map(((t,e)=>e)),y=Jn(m.map((t=>g[t]))),b=oj(s),x=s.getElementsByClassName(eA),k=Un(s.getElementsByClassName(aA),(t=>t.__data__.key.split("-")[0])),w=new Hg({style:Object.assign({x1:0,y1:0,x2:0,y2:b.getAttribute("height"),stroke:"black",lineWidth:1},_r(a,"rule"))}),M=new tv({style:Object.assign({x:0,y:b.getAttribute("height"),text:"",fontSize:10},_r(a,"label"))});w.append(M),b.appendChild(w);const O=(t,e,n)=>{const[r]=t.invert(n),i=e.invert(r);return y[Fn(y,i)]},E=(t,e)=>{w.setAttribute("x1",t[0]),w.setAttribute("x2",t[0]),M.setAttribute("text",i(e))};let S;const A=rt((t=>{const e=cj(b,t);e&&(t=>{const{scale:e,coordinate:n}=S,{x:r,y:i}=e,a=O(n,r,t);E(t,a);for(const t of x){const{seriesIndex:e,key:r}=t.__data__,o=e[Nn((t=>g[+t])).center(e,a)],s=[0,i.map(1)],c=[0,i.map(p[o]/p[e[0]])],[,l]=n.map(s),[,u]=n.map(c),f=l-u;t.setAttribute("transform",`translate(0, ${f})`);const h=k.get(r)||[];for(const t of h)t.setAttribute("dy",f)}})(e)}),e,{leading:n,trailing:r});return(t=>{Le(this,void 0,void 0,(function*(){const{x:e}=f,n=O(h,e,t);E(t,n),l("chartIndex",(t=>{const e=Z({},t),r=e.marks.find((t=>"line"===t.type)),i=fr(Zn(m,(t=>fr(t,(t=>+p[t]))/dr(t,(t=>+p[t]))),(t=>v[t])).values());Z(r,{scale:{y:{domain:[1/i,i]}}});const a=function(t){const{transform:e=[]}=t,n=e.find((t=>"normalizeY"===t.type));if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);a.groupBy="color",a.basis=(t,e)=>e[t[Nn((t=>g[+t])).center(t,n)]];for(const t of e.marks)t.animate=!1;return e}));const r=yield c("chartIndex");S=r.view}))})([0,0]),b.addEventListener("pointerenter",A),b.addEventListener("pointermove",A),b.addEventListener("pointerleave",A),()=>{w.remove(),b.removeEventListener("pointerenter",A),b.removeEventListener("pointermove",A),b.removeEventListener("pointerleave",A)}}}function Ij({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,c=oj(s),l=rt((t=>{const e=cj(c,t);if(!e)return o("fisheye"),void a();o("fisheye",(t=>{const n=Z({},t,{interaction:{tooltip:{preserve:!0}}});for(const t of n.marks)t.animate=!1;const[r,i]=e,a=function(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find((t=>"fisheye"===t.type));if(r)return r;const i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}(n);return a.focusX=r,a.focusY=i,a.visual=!0,n})),a()}),t,{leading:e,trailing:n});return c.addEventListener("pointerenter",l),c.addEventListener("pointermove",l),c.addEventListener("pointerleave",l),()=>{c.removeEventListener("pointerenter",l),c.removeEventListener("pointermove",l),c.removeEventListener("pointerleave",l)}}}function Dj(t,e){if(e)return"string"==typeof e?document.querySelector(e):e;return t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function Bj(t,e,n,r,i,a,o,s={},c=[10,10]){const l=new aw({className:"tooltip",style:{x:e,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:c,template:{prefixCls:"g2-"},style:Z({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},s)}});return t.appendChild(l.HTMLTooltipElement),l}function Fj({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f,offset:h}){const d=Dj(t,u),p=Dj(t),g=o?p:t,v=f||function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return{x:n,y:r,width:i-n,height:a-r}}(t),m=function(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(p,d),{tooltipElement:y=Bj(d,n,r,s,c,v,m,l,h)}=g,{items:b,title:x=""}=e;y.update(Object.assign({x:n,y:r,data:b,title:x,position:s,enterable:c,container:m},void 0!==i&&{content:i(a,{items:b,title:x})})),g.tooltipElement=y}function zj({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=Dj(t),o=e?a:t,{tooltipElement:s}=o;s&&s.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY),Uj(t),Xj(t),Zj(t)}function Gj({root:t,single:e}){const n=Dj(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),Uj(t),Xj(t),Zj(t)}function Wj(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function $j(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=(e&&"transparent"!==e?e:n)}=r;return i}function Yj(t,e=t=>t){const n=new Map(t.map((t=>[e(t),t])));return Array.from(n.values())}function Hj(t,e,n,r=t.map((t=>t.__data__)),i={}){const a=t=>t instanceof Date?+t:t,o=Yj(r.map((t=>t.title)),a).filter(Sr),s=r.flatMap(((r,a)=>{const o=t[a],{items:s=[],title:c}=r,l=s.filter(Sr),u=void 0!==n?n:s.length<=1;return l.map((t=>{var{color:n=$j(o)||i.color,name:a}=t,s=Pe(t,["color","name"]);const l=function(t,e){const{color:n,series:r,facet:i=!1}=t,{color:a,series:o}=e,s=t=>t&&t.invert&&!(t instanceof Wa)&&!(t instanceof Ya);if(s(r))return r.clone().invert(o);if(o&&r instanceof Wa&&r.invert(o)!==a&&!i)return r.invert(o);if(s(n)){const t=n.invert(a);return Array.isArray(t)?null:t}return null}(e,r),f=u?l||a:a||l;return Object.assign(Object.assign({},s),{color:n,name:f||c})}))})).map(Wj);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:Yj(s,(t=>`(${a(t.name)}, ${a(t.value)}, ${a(t.color)})`))})}function Vj(t,e,n,r){var{plotWidth:i,plotHeight:a,mainWidth:o,mainHeight:s,startX:c,startY:l,transposed:u,polar:f,insetLeft:h,insetTop:d}=r,p=Pe(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const g=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},p),v=((t,e)=>{if(1===e.length)return e[0];const n=e.map((e=>ms(e,t))),r=pr(n,(t=>t));return e[r]})(n,e);if(f){const[e,n,r]=(()=>{const t=c+h+o/2,e=l+d+s/2;return[t,e,ms([t,e],v)]})(),i=t.ruleX||((e,n,r)=>{const i=new Ig({style:Object.assign({cx:e,cy:n,r:r},g)});return t.appendChild(i),i})(e,n,r);i.style.cx=e,i.style.cy=n,i.style.r=r,t.ruleX=i}else{const[e,n,r,o]=u?[c+v[0],c+v[0],l,l+a]:[c,c+i,v[1]+l,v[1]+l],s=t.ruleX||((e,n,r,i)=>{const a=new Hg({style:Object.assign({x1:e,x2:n,y1:r,y2:i},g)});return t.appendChild(a),a})(e,n,r,o);s.style.x1=e,s.style.x2=n,s.style.y1=r,s.style.y2=o,t.ruleX=s}}function qj(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:s,startY:c,transposed:l,polar:u,insetLeft:f,insetTop:h}=n,d=Pe(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},d),g=e.map((t=>t[1])),v=e.map((t=>t[0])),m=yr(g),y=yr(v),[b,x,k,w]=(()=>{if(u){const t=Math.min(a,o)/2,e=s+f+a/2,n=c+h+o/2,r=ys(gs([y,m],[e,n]));return[e,e+t*Math.cos(r),n,n+t*Math.sin(r)]}return l?[s,s+r,m+c,m+c]:[y+s,y+s,c,c+i]})();if(v.length>0){const e=t.ruleY||(()=>{const e=new Hg({style:Object.assign({x1:b,x2:x,y1:k,y2:w},p)});return t.appendChild(e),e})();e.style.x1=b,e.style.x2=x,e.style.y1=k,e.style.y2=w,t.ruleY=e}}function Uj(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Xj(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function Zj(t){t.markers&&(t.markers.forEach((t=>t.remove())),t.markers=[])}function Kj(t,e){return Array.from(t.values()).some((t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]}))}function Qj(t,e){return void 0===t?e:t}function Jj(t){const{title:e,items:n}=t;return 0===n.length&&void 0===e}function tR(t,e){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,crosshairsX:c,crosshairsY:l,render:u,groupName:f,emitter:h,wait:d=50,leading:p=!0,trailing:g=!1,startX:v=0,startY:m=0,body:y=!0,single:b=!0,position:x,enterable:k,mount:w,bounding:M,theme:O,offset:E,disableNative:S=!1,marker:A=!0,preserve:_=!1,style:T={},css:P={}}=e,C=Pe(e,["elements","sort","filter","scale","coordinate","crosshairs","crosshairsX","crosshairsY","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","offset","disableNative","marker","preserve","style","css"]);const L=n(t),N=zc(o),j=Gc(o),R=Z(T,C),{innerWidth:I,innerHeight:D,width:B,height:F,insetLeft:G,insetTop:W}=o.getOptions(),$=[],Y=[];for(const t of L){const{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?$.push(t):(r||i)&&Y.push(t)}const H=Y.length&&Y.every((t=>"interval"===t.markType))&&!Gc(o),V=t=>t.__data__.x,q=!!a.x.getBandWidth&&Y.length>0;$.sort(((t,e)=>{const n=N?0:1,r=t=>t.getBounds().min[n];return N?r(e)-r(t):r(t)-r(e)}));const U=t=>{const e=N?1:0,{min:n,max:r}=t.getLocalBounds();return Jn([n[e],r[e]])};H?L.sort(((t,e)=>V(t)-V(e))):Y.sort(((t,e)=>{const[n,r]=U(t),[i,a]=U(e),o=(n+r)/2,s=(i+a)/2;return N?s-o:o-s}));const X=new Map($.map((t=>{const{__data__:e}=t,{seriesX:n}=e;return[t,[Jn(n.map(((t,e)=>e)),(t=>n[+t])),n]]}))),{x:K}=a,Q=(null==K?void 0:K.getBandWidth)?K.getBandWidth()/2:0,J=t=>{const[e]=o.invert(t);return e-Q},tt=(t,e,n,r)=>{const{_x:i}=t,a=void 0!==i?K.map(i):J(e),o=r.filter(Sr),[s,c]=Jn([o[0],o[o.length-1]]);if(!q&&(a<s||a>c)&&!(s===c))return null;const l=Nn((t=>r[+t])).center;return n[l(n,a)]},et=H?(t,e)=>{const n=e[(0,Nn(V).center)(e,J(t))];return Un(e,V).get(V(n))}:(t,e)=>{const n=t[N?1:0],r=e.filter((t=>{const[e,r]=U(t);return n>=e&&n<=r}));if(!q||r.length>0)return r;const i=Nn((t=>{const[e,n]=U(t);return(e+n)/2})).center;return[e[i(e,n)]].filter(Sr)},nt=(t,e)=>{const{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter((([t])=>t.startsWith("series")&&"series"!==t)).map((([t,n])=>{const r=n[e];return[z(t.replace("series","")),r]})))},it=rt((e=>{var n;const d=cj(t,e);if(!d)return;const p=sj(t),g=p.min[0],S=p.min[1],_=[d[0]-v,d[1]-m];if(!_)return;const T=et(_,Y),C=[],L=[];for(const t of $){const[n,r]=X.get(t),i=tt(e,_,n,r);if(null!==i){C.push(t);const e=nt(t,i),{x:n,y:r}=e,a=o.map([(n||0)+Q,r||0]);L.push([Object.assign(Object.assign({},e),{element:t}),a])}}const z=Array.from(new Set(L.map((t=>t[0].x)))),H=z[pr(z,(t=>Math.abs(t-J(_))))],V=L.filter((t=>t[0].x===H)),q=[...V.map((t=>t[0])),...T.map((t=>t.__data__))],U=[...C,...T],Z=Hj(U,a,f,q,O);if(r&&Z.items.sort(((t,e)=>r(t)-r(e))),i&&(Z.items=Z.items.filter(i)),0===U.length||Jj(Z))return void at(e);if(y&&Fj({root:t,data:Z,x:d[0]+g,y:d[1]+S,render:u,event:e,single:b,position:x,enterable:k,mount:w,bounding:M,css:P,offset:E}),s||c||l){const e=_r(R,"crosshairs"),n=Object.assign(Object.assign({},e),_r(R,"crosshairsX")),r=Object.assign(Object.assign({},e),_r(R,"crosshairsY")),i=V.map((t=>t[1]));c&&Vj(t,i,d,Object.assign(Object.assign({},n),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:G,insetTop:W,startX:v,startY:m,transposed:N,polar:j})),l&&qj(t,i,Object.assign(Object.assign({},r),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:G,insetTop:W,startX:v,startY:m,transposed:N,polar:j}))}if(A){const e=_r(R,"marker");!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach((t=>t.remove()));const{type:i=""}=n,a=e.filter((t=>{const[{x:e,y:n}]=t;return Sr(e)&&Sr(n)})).map((t=>{const[{color:e,element:a},o]=t,s=e||a.style.fill||a.style.stroke||r.color,c="hollow"===i?"transparent":s,l="hollow"===i?s:"#fff";return new Ig({className:"g2-tooltip-marker",style:Object.assign({cx:o[0],cy:o[1],fill:c,r:4,stroke:l,lineWidth:2},n)})}));for(const e of a)t.appendChild(e);t.markers=a}(t,{data:V,style:e,theme:O})}const K=null===(n=V[0])||void 0===n?void 0:n[0].x,rt=null!=K?K:J(_);h.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},Z),{data:{x:vS(a.x,rt,!0)}})}))}),d,{leading:p,trailing:g}),at=e=>{zj({root:t,single:b,emitter:h,event:e})},ot=()=>{Gj({root:t,single:b})},st=e=>{var n,{nativeEvent:r,data:i,offsetX:s,offsetY:c}=e,l=Pe(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;const u=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.x,f=a.x.map(u),[h,d]=o.map([f,.5]),p=t.getRenderBounds(),g=p.min[0],v=p.min[1];it(Object.assign(Object.assign({},l),{offsetX:void 0!==s?s:g+h,offsetY:void 0!==c?c:v+d,_x:u}))},ct=()=>{zj({root:t,single:b,emitter:h,nativeEvent:!1})},lt=()=>{ht(),ot()},ut=()=>{ft()},ft=()=>{S||(t.addEventListener("pointerenter",it),t.addEventListener("pointermove",it),t.addEventListener("pointerleave",(e=>{cj(t,e)||at(e)})))},ht=()=>{S||(t.removeEventListener("pointerenter",it),t.removeEventListener("pointermove",it),t.removeEventListener("pointerleave",at))};return ft(),h.on("tooltip:show",st),h.on("tooltip:hide",ct),h.on("tooltip:disable",lt),h.on("tooltip:enable",ut),()=>{ht(),h.off("tooltip:show",st),h.off("tooltip:hide",ct),h.off("tooltip:disable",lt),h.off("tooltip:enable",ut),_?zj({root:t,single:b,emitter:h,nativeEvent:!1}):ot()}}function eR(t,{elements:e,coordinate:n,scale:r,render:i,groupName:a,sort:o,filter:s,emitter:c,wait:l=50,leading:u=!0,trailing:f=!1,groupKey:h=t=>t,single:d=!0,position:p,enterable:g,datum:v,view:m,mount:y,bounding:b,theme:x,offset:k,shared:w=!1,body:M=!0,disableNative:O=!1,preserve:E=!1,css:S={}}){var A,_;const T=e(t),P=Un(T,h),C=T.every((t=>"interval"===t.markType))&&!Gc(n),L=r.x,N=r.series,j=null!==(_=null===(A=null==L?void 0:L.getBandWidth)||void 0===A?void 0:A.call(L))&&void 0!==_?_:0,R=N?t=>{const e=Math.round(1/N.valueBandWidth);return t.__data__.x+t.__data__.series*j+j/(2*e)}:t=>t.__data__.x+j/2;C&&T.sort(((t,e)=>R(t)-R(e)));const I=t=>{const{target:e}=t;return Sj(e,(t=>!!t.classList&&t.classList.includes("element")))},D=C?e=>{const r=cj(t,e);if(!r)return;const[i]=n.invert(r),a=(0,Nn(R).center)(T,i),o=T[a];if(!w){const t=T.find((t=>t!==o&&R(t)===R(o)));if(t)return I(e)}return o}:I,B=rt((e=>{const n=D(e);if(!n)return void zj({root:t,single:d,emitter:c,event:e});const l=h(n),u=P.get(l);if(!u)return;const f=1!==u.length||w?Hj(u,r,a,void 0,x):function(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(Sr).map((e=>{var{color:n=$j(t)}=e,r=Pe(e,["color"]);return Object.assign(Object.assign({},r),{color:n})})).map(Wj);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}(u[0]);if(o&&f.items.sort(((t,e)=>o(t)-o(e))),s&&(f.items=f.items.filter(s)),Jj(f))return void zj({root:t,single:d,emitter:c,event:e});const{offsetX:v,offsetY:O}=e;M&&Fj({root:t,data:f,x:v,y:O,render:i,event:e,single:d,position:p,enterable:g,mount:y,bounding:b,css:S,offset:k}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},f),{data:xP(n,m)})}))}),l,{leading:u,trailing:f}),F=e=>{zj({root:t,single:d,emitter:c,event:e})},z=()=>{O||(t.addEventListener("pointermove",B),t.addEventListener("pointerleave",F))},G=()=>{O||(t.removeEventListener("pointermove",B),t.removeEventListener("pointerleave",F))},W=({nativeEvent:e,offsetX:n,offsetY:r,data:i})=>{if(e)return;const{data:a}=i,o=wj(T,a,v);if(!o)return;const s=o.getBBox(),{x:c,y:l,width:u,height:f}=s,h=t.getBBox();B({target:o,offsetX:void 0!==n?n+h.x:c+u/2,offsetY:void 0!==r?r+h.y:l+f/2})},$=({nativeEvent:e}={})=>{e||zj({root:t,single:d,emitter:c,nativeEvent:!1})};return c.on("tooltip:show",W),c.on("tooltip:hide",$),c.on("tooltip:enable",(()=>{z()})),c.on("tooltip:disable",(()=>{G(),Gj({root:t,single:d})})),z(),()=>{G(),c.off("tooltip:show",W),c.off("tooltip:hide",$),E?zj({root:t,single:d,emitter:c,nativeEvent:!1}):Gj({root:t,single:d})}}function nR(t){const{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:i,series:a,name:o,item:s=()=>({}),facet:c=!1}=t,l=Pe(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,o,u)=>{const{container:f,view:h}=t,{scale:d,markState:p,coordinate:g,theme:v}=h,m=Kj(p,"seriesTooltip"),y=Kj(p,"crosshairs"),b=oj(f),x=Qj(a,m),k=Qj(n,y);if(x&&function(t){return Array.from(t.values()).some((t=>{var e;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)&&t.tooltip}))}(p)&&!c)return tR(b,Object.assign(Object.assign({},l),{theme:v,elements:rj,scale:d,coordinate:g,crosshairs:k,crosshairsX:Qj(Qj(r,n),!1),crosshairsY:Qj(i,k),item:s,emitter:u}));if(x&&c){const e=o.filter((e=>e!==t&&e.options.parentKey===t.options.key)),a=ij(t,o),c=e[0].view.scale,f=b.getBounds(),h=f.min[0],d=f.min[1];return Object.assign(c,{facet:!0}),tR(b.parentNode.parentNode,Object.assign(Object.assign({},l),{theme:v,elements:()=>a,scale:c,coordinate:g,crosshairs:Qj(n,y),crosshairsX:Qj(Qj(r,n),!1),crosshairsY:Qj(i,k),item:s,startX:h,startY:d,emitter:u}))}return eR(b,Object.assign(Object.assign({},l),{datum:hj(h),elements:rj,scale:d,coordinate:g,groupKey:e?t=>t.__data__.x:void 0,item:s,emitter:u,view:h,theme:v,shared:e}))}}_j.props={reapplyWhenUpdate:!0},Tj.props={reapplyWhenUpdate:!0},Pj.props={reapplyWhenUpdate:!0},Lj.props={reapplyWhenUpdate:!0},Nj.props={reapplyWhenUpdate:!0},jj.props={reapplyWhenUpdate:!0},Rj.props={reapplyWhenUpdate:!0},nR.props={reapplyWhenUpdate:!0};const rR="legend-category";function iR(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function aR(t){return t.getElementsByClassName("legend-category-item-label")[0]}function oR(t){return t.getElementsByClassName("items-item")}function sR(t){return t.getElementsByClassName(rR)}function cR(t){return t.getElementsByClassName("legend-continuous")}function lR(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function uR(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return Le(this,void 0,void 0,(function*(){const{view:c,update:l,setState:u}=t;u(e,(t=>{const{marks:e}=t,l=e.map((t=>{if("legends"===t.type)return t;const{transform:e=[],data:l=[]}=t,u=e.findIndex((({type:t})=>t.startsWith("group")||t.startsWith("bin"))),f=[...e];l.length&&f.splice(u+1,0,{type:"filter",[n]:{value:r,ordinal:i}});const h=Object.fromEntries(a.map((t=>[t,{domain:c.scale[t].getOptions().domain}])));return Z({},t,Object.assign(Object.assign({transform:f,scale:h},!i&&{animate:!1}),{legend:!s&&Object.fromEntries(o.map((t=>[t,{preserve:!0}])))}))}));return Object.assign(Object.assign({},t),{marks:l})})),yield l()}))}function fR(t,e){for(const n of t)uR(n,Object.assign(Object.assign({},e),{facet:!0}))}function hR(){return(t,e,n)=>{const{container:r}=t,i=e.filter((e=>e!==t)),a=i.length>0,o=t=>lR(t).scales.map((t=>t.name)),s=[...sR(r),...cR(r)],c=s.flatMap(o),l=rt(a?fR:uR,50,{trailing:!0}),u=s.map((e=>{const{name:s,domain:u}=lR(e).scales[0],f={legend:e,channel:s,channels:o(e),allChannels:c};return e.className===rR?function(t,{legends:e,marker:n,label:r,datum:i,filter:a,emitter:o,channel:s,state:c={}}){const l=new Map,u=new Map,f=new Map,{unselected:h={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=c,d={unselected:_r(h,"marker")},p={unselected:_r(h,"label")},{setState:g,removeState:v}=dj(d,void 0),{setState:m,removeState:y}=dj(p,void 0),b=Array.from(e(t));let x=b.map(i);const k=()=>{for(const t of b){const e=i(t),a=n(t),o=r(t);x.includes(e)?(v(a,"unselected"),y(o,"unselected")):(g(a,"unselected"),m(o,"unselected"))}};for(const e of b){const n=()=>{xj(t,"pointer")},r=()=>{kj(t)},c=t=>Le(this,void 0,void 0,(function*(){const n=i(e),r=x.indexOf(n);-1===r?x.push(n):x.splice(r,1),yield a(x),k();const{nativeEvent:c=!0}=t;c&&(x.length===b.length?o.emit("legend:reset",{nativeEvent:c}):o.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:c,data:{channel:s,values:x}})))}));e.addEventListener("click",c),e.addEventListener("pointerenter",n),e.addEventListener("pointerout",r),l.set(e,c),u.set(e,n),f.set(e,r)}const w=t=>Le(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,values:i}=n;r===s&&(x=i,yield a(x),k())})),M=t=>Le(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;e||(x=b.map(i),yield a(x),k())}));return o.on("legend:filter",w),o.on("legend:reset",M),()=>{for(const t of b)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",u.get(t)),t.removeEventListener("pointerout",f.get(t)),o.off("legend:filter",w),o.off("legend:reset",M)}}(r,{legends:oR,marker:iR,label:aR,datum:t=>{const{__data__:e}=t,{index:n}=e;return u[n]},filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});l(a?i:t,n)},state:e.attributes.state,channel:s,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:i}){const a=({detail:{value:t}})=>{n(t),r.emit({nativeEvent:!0,data:{channel:i,values:t}})};return e.addEventListener("valuechange",a),()=>{e.removeEventListener("valuechange",a)}}(0,{legend:e,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!1});l(a?i:t,n)},emitter:n,channel:s})}));return()=>{u.forEach((t=>t()))}}}function dR(){return(t,e,n)=>{const{container:r,view:i,options:a}=t,o=sR(r),s=rj(r),c=t=>lR(t).scales[0].name,l=t=>{const{scale:{[t]:e}}=i;return e},u=gj(a,["active","inactive"]),f=vj(s,hj(i)),h=[];for(const t of o){const e=e=>{const{data:n}=t.attributes,{__data__:r}=e,{index:i}=r;return n[i].label},r=c(t),i=oR(t),a=l(r),o=Un(s,(t=>a.invert(t.__data__[r]))),{state:d={}}=t.attributes,{inactive:p={}}=d,{setState:g,removeState:v}=dj(u,f),m={inactive:_r(p,"marker")},y={inactive:_r(p,"label")},{setState:b,removeState:x}=dj(m),{setState:k,removeState:w}=dj(y),M=t=>{for(const e of i){const n=iR(e),r=aR(e);e===t||null===t?(x(n,"inactive"),w(r,"inactive")):(b(n,"inactive"),k(r,"inactive"))}},O=(t,i)=>{const a=e(i),c=new Set(o.get(a));for(const t of s)c.has(t)?g(t,"active"):g(t,"inactive");M(i);const{nativeEvent:l=!0}=t;l&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:l,data:{channel:r,value:a}}))},E=new Map;for(const t of i){const e=e=>{O(e,t)};t.addEventListener("pointerover",e),E.set(t,e)}const S=t=>{for(const t of s)v(t,"inactive","active");M(null);const{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},A=t=>{const{nativeEvent:n,data:a}=t;if(n)return;const{channel:o,value:s}=a;if(o!==r)return;const c=i.find((t=>e(t)===s));c&&O({nativeEvent:!1},c)},_=t=>{const{nativeEvent:e}=t;e||S({nativeEvent:!1})};t.addEventListener("pointerleave",S),n.on("legend:highlight",A),n.on("legend:unhighlight",_);const T=()=>{t.removeEventListener(S),n.off("legend:highlight",A),n.off("legend:unhighlight",_);for(const[t,e]of E)t.removeEventListener(e)};h.push(T)}return()=>h.forEach((t=>t()))}}function pR(t,e){const[n,r,i,a]=t,[o,s,c,l]=e;return!(o>i||c<n||s>a||l<r)}function gR(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function vR(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const mR=jm((t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:c=10,document:l}=e,u=Pe(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||void 0===i||void 0===a||void 0===n||void 0===r)return;const f=c/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));const{handle:r}=t;return r.attr(e),r},d=_r(Pr(u,"handleNW","handleNE"),"handleN"),{render:p=h}=d,g=Pe(d,["render"]),v=_r(u,"handleE"),{render:m=h}=v,y=Pe(v,["render"]),b=_r(Pr(u,"handleSE","handleSW"),"handleS"),{render:x=h}=b,k=Pe(b,["render"]),w=_r(u,"handleW"),{render:M=h}=w,O=Pe(w,["render"]),E=_r(u,"handleNW"),{render:S=h}=E,A=Pe(E,["render"]),_=_r(u,"handleNE"),{render:T=h}=_,P=Pe(_,["render"]),C=_r(u,"handleSE"),{render:L=h}=C,N=Pe(C,["render"]),j=_r(u,"handleSW"),{render:R=h}=j,I=Pe(j,["render"]),D=t=>()=>{const e=jm((e=>((t,e)=>{const{id:n}=t,r=e(t,t.attributes,l);r.id=n,r.style.draggable=!0})(e,t)));return new e({})},B=pm(t).attr("className",o).style("transform",`translate(${n}, ${r})`).style("draggable",!0);B.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(vR,Object.assign(Object.assign({width:i,height:a},Pr(u,"handle")),{transform:void 0})),B.maybeAppend("handle-n",D(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(vR,g),B.maybeAppend("handle-e",D(m)).style("x",i-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(vR,y),B.maybeAppend("handle-s",D(x)).style("x",f).style("y",a-f).style("width",i-c).style("height",c).style("fill","transparent").call(vR,k),B.maybeAppend("handle-w",D(M)).style("x",-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(vR,O),B.maybeAppend("handle-nw",D(S)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(vR,A),B.maybeAppend("handle-ne",D(T)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(vR,P),B.maybeAppend("handle-se",D(L)).style("x",i-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(vR,N),B.maybeAppend("handle-sw",D(R)).style("x",-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(vR,I)}));function yR(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=gR(t),brushRegion:c=(t,e,n,r,i)=>[t,e,n,r],reverse:l=!1,fill:u="#777",fillOpacity:f="0.3",stroke:h="#fff",selectedHandles:d=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,p=Pe(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let g=null,v=null,m=null,y=null,b=null,x=!1;const[k,w,M,O]=s;xj(t,"crosshair"),t.style.draggable=!0;const E=(t,e,n)=>{if(a(n),y&&y.remove(),b&&b.remove(),g=[t,e],l)return S();A()},S=()=>{b=new qg({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:h,pointerEvents:"none"})}),y=new mR({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(y)},A=()=>{y=new mR({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:h,draggable:!0}),className:"mask"}),t.appendChild(y)},_=(t=!0)=>{y&&y.remove(),b&&b.remove(),g=null,v=null,m=null,x=!1,y=null,b=null,r(t)},T=(t,e,r=!0)=>{const[i,a,o,u]=function(t,e,n,r,i){const[a,o,s,c]=i;return[Math.max(a,Math.min(t,n)),Math.max(o,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[f,h,d,p]=c(i,a,o,u,s);return l?C(f,h,d,p):P(f,h,d,p),n(f,h,d,p,r),[f,h,d,p]},P=(t,e,n,r)=>{y.style.x=t,y.style.y=e,y.style.width=n-t,y.style.height=r-e},C=(t,e,n,r)=>{b.style.d=`\n M${k},${w}L${M},${w}L${M},${O}L${k},${O}Z\n M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z\n `,y.style.x=t,y.style.y=e,y.style.width=n-t,y.style.height=r-e},L={"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"}},N=t=>R(t)||j(t),j=t=>{const{id:e}=t;return-1!==d.indexOf(e)&&new Set(Object.keys(L)).has(e)},R=t=>t===y.getElementById("selection"),I=e=>{const{target:n}=e,[r,i]=lj(t,e);if(!y||!N(n))return E(r,i,e),void(x=!0);N(n)&&(m=[r,i])},D=e=>{const{target:n}=e,r=lj(t,e);if(!g)return;if(!m)return T(g,r);if(R(n))return(t=>{const e=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,n=t[0]-m[0],r=t[1]-m[1],i=e(n,g[0],v[0],k,M),a=e(r,g[1],v[1],w,O),o=[g[0]+i,g[1]+a],s=[v[0]+i,v[1]+a];T(o,s)})(r);const[i,a]=[r[0]-m[0],r[1]-m[1]],{id:o}=n;if(L[o]){const[t,e,n,r]=L[o].vector;return T([g[0]+i*t,g[1]+a*e],[v[0]+i*n,v[1]+a*r])}},B=e=>{if(m){m=null;const{x:t,y:n,width:r,height:i}=y.style;return g=[t,n],v=[t+r,n+i],void o(t,n,t+r,n+i,e)}v=lj(t,e);const[n,r,a,s]=T(g,v);x=!1,i(n,r,a,s,e)},F=t=>{const{target:e}=t;y&&!N(e)&&_()},z=e=>{const{target:n}=e;y&&N(n)&&!x?R(n)?xj(t,"move"):j(n)&&xj(t,L[n.id].cursor):xj(t,"crosshair")},G=()=>{xj(t,"default")};return t.addEventListener("dragstart",I),t.addEventListener("drag",D),t.addEventListener("dragend",B),t.addEventListener("click",F),t.addEventListener("pointermove",z),t.addEventListener("pointerleave",G),{mask:y,move(t,e,n,r,i=!0){y||E(t,e,{}),g=[t,e],v=[n,r],T([t,e],[n,r],i)},remove(t=!0){y&&_(t)},destroy(){y&&_(!1),xj(t,"default"),t.removeEventListener("dragstart",I),t.removeEventListener("drag",D),t.removeEventListener("dragend",B),t.removeEventListener("click",F),t.removeEventListener("pointermove",z),t.removeEventListener("pointerleave",G)}}}function bR(t,e,n){return e.filter((e=>{if(e===t)return!1;const{interaction:r={}}=e.options;return Object.values(r).find((t=>t.brushKey===n))}))}function xR(t,e,n){return bR(t,e,n).map((t=>t.options))}function kR(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:a,brushRegion:o,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:h=t=>t,bboxOf:d=t=>{const{x:e,y:n,width:r,height:i}=t.style;return{x:e,y:n,width:r,height:i}},state:p={},emitter:g}=e,v=Pe(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const m=n(t),y=i(t),b=y.flatMap(n),x=vj(m,a),k=_r(v,"mask"),{setState:w,removeState:M}=dj(p,x),O=new Map,{width:E,height:S,x:A=0,y:_=0}=d(t),T=s||[0,0,E,S],P=()=>{for(const t of[...m,...b])M(t,"active","inactive")},C=(t,e,n,r)=>{var i;for(const t of y)null===(i=t.brush)||void 0===i||i.remove();const a=new Set;for(const i of m){const{min:o,max:s}=i.getLocalBounds(),[c,l]=o,[u,f]=s;pR([c,l,u,f],[t,e,n,r])?(w(i,"active"),a.add(h(i))):w(i,"inactive")}for(const t of b)a.has(h(t))?w(t,"active"):w(t,"inactive")},L=()=>{for(const t of m)M(t,"inactive");for(const t of O.values())t.remove();O.clear()},N=(e,n,r,i)=>{const a=t=>{const e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),O.set(t,e),e},o=new Qg({style:{x:e+A,y:n+_,width:r-e,height:i-n}});t.appendChild(o);for(const t of m){const e=O.get(t)||a(t);e.style.clipPath=o,w(t,"inactive"),w(e,"active")}},j=yR(t,Object.assign(Object.assign({},k),{extent:T,brushRegion:o,reverse:c,selectedHandles:r,brushended:t=>{const e=f?L:P;t&&g.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{const a=yS(t,e,n,r,l,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:a}});(f?N:C)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{const a=yS(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:a}}))},brushupdated:(t,e,n,r,i)=>{const a=yS(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:a}}))},brushstarted:t=>{g.emit("brush:start",t)}})),R=({nativeEvent:t,data:e})=>{if(t)return;const{selection:n}=e,[r,i,a,o]=function(t,e,n){const{x:r,y:i}=e,[a,o]=t,s=bS(a,r),c=bS(o,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,h]=n.map(l),[d,p]=n.map(u);return[f,h,d,p]}(n,l,u);j.move(r,i,a,o,!1)};g.on("brush:highlight",R);const I=({nativeEvent:t}={})=>{t||j.remove(!1)};g.on("brush:remove",I);const D=j.destroy.bind(j);return j.destroy=()=>{g.off("brush:highlight",R),g.off("brush:remove",I),D()},j}function wR(t){var{facet:e,brushKey:n}=t,r=Pe(t,["facet","brushKey"]);return(t,i,a)=>{const{container:o,view:s,options:c}=t,l=oj(o),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=s;if(e){const e=l.getBounds(),n=e.min[0],o=e.min[1],s=e.max[0],c=e.max[1];return kR(l.parentNode.parentNode,Object.assign(Object.assign({elements:()=>ij(t,i),datum:hj(aj(t,i).map((t=>t.view))),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,o,s,c],state:gj(aj(t,i).map((t=>t.options)),f),emitter:a,scale:h,coordinate:d,selectedHandles:void 0},u),r))}const p=kR(l,Object.assign(Object.assign({elements:rj,key:t=>t.__data__.key,siblings:()=>function(t,e,n){return bR(t,e,n).map((t=>oj(t.container)))}(t,i,n),datum:hj([s,...bR(t,i,n).map((t=>t.view))]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:gj([c,...xR(t,i,n)],f),emitter:a,scale:h,coordinate:d,selectedHandles:void 0},u),r));return l.brush=p,()=>p.destroy()}}function MR(t,e,n,r,i){const[,a,,o]=i;return[t,a,n,o]}function OR(t){return wR(Object.assign(Object.assign({},t),{brushRegion:MR,selectedHandles:["handle-e","handle-w"]}))}function ER(t,e,n,r,i){const[a,,o]=i;return[a,e,o,r]}function SR(t){return wR(Object.assign(Object.assign({},t),{brushRegion:ER,selectedHandles:["handle-n","handle-s"]}))}const AR="axis-hot-area";function _R(t){return t.getElementsByClassName("axis")}function TR(t){return t.getElementsByClassName("axis-line")[0]}function PR(t){return function(t){return t.getElementsByClassName("axis-main-group")[0]}(t).getLocalBounds()}function CR(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=Pe(e,["cross","offsetX","offsetY"]);const o=PR(t),s=TR(t),[c]=s.getLocalBounds().min,[l,u]=o.min,[f,h]=o.max,d=2*(f-l);return{brushRegion:ER,hotZone:new Qg({className:AR,style:Object.assign({width:n?d/2:d,transform:`translate(${(n?l:c-d/2).toFixed(2)}, ${u})`,height:h-u},a)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,i)=>[Math.floor(l-r),e,Math.ceil(f-r),i]}}function LR(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=Pe(e,["offsetY","offsetX","cross"]);const o=PR(t),s=TR(t),[,c]=s.getLocalBounds().min,[l,u]=o.min,[f,h]=o.max,d=h-u;return{brushRegion:MR,hotZone:new Qg({className:AR,style:Object.assign({width:f-l,height:i?d:2*d,transform:`translate(${l}, ${i?u:c-d})`},a)}),extent:i?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,i)=>[t,Math.floor(u-n),r,Math.ceil(h-n)]}}function NR(t){return(e,n,r)=>{const{container:i,view:a,options:o}=e,s=oj(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=a;return function(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:h}=e,d=Pe(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),g=n(t),v=vj(p,o),{setState:m,removeState:y}=dj(u,v),b=new Map,x=_r(d,"mask"),k=t=>Array.from(b.values()).every((([e,n,r,i])=>t.some((([t,a])=>t>=e&&t<=r&&a>=n&&a<=i)))),w=g.map((t=>t.attributes.scale)),M=t=>t.length>2?[t[0],t[t.length-1]]:t,O=new Map,E=()=>{O.clear();for(let t=0;t<g.length;t++){const e=w[t],{domain:n}=e.getOptions();O.set(t,M(n))}};E();const S=(t,e)=>{const n=[];for(const t of p){const e=i(t);k(e)?(m(t,"active"),n.push(t)):m(t,"inactive")}O.set(t,_(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!T)return Array.from(O.values());const t=[];for(const[e,n]of O){const r=w[e],{name:i}=r.getOptions();"x"===i?t[0]=n:t[1]=n}return t})()}})},A=t=>{for(const t of p)y(t,"active","inactive");E(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},_=(t,e)=>{const n=w[e],{name:r}=n.getOptions(),i=t.map((t=>{const e=t.__data__;return n.invert(e[r])}));return M(mS(n,i))},T=g.some(a)&&g.some((t=>!a(t))),P=[];for(let t=0;t<g.length;t++){const e=g[t],n=a(e)?LR:CR,{hotZone:r,brushRegion:i,extent:o}=n(e,{offsetY:s,offsetX:c,cross:T,zIndex:999,fill:"transparent"});e.parentNode.appendChild(r);const u=yR(r,Object.assign(Object.assign({},x),{reverse:l,brushRegion:i,brushended(n){b.delete(e),0===Array.from(b.entries()).length?A(n):S(t,n)},brushed(n,r,i,a,s){b.set(e,o(n,r,i,a)),S(t,s)}}));P.push(u)}const C=(t={})=>{const{nativeEvent:e}=t;e||P.forEach((t=>t.remove(!1)))},L=(t,e,n)=>{const[r,i]=t,o=N(r,e,n),s=N(i,e,n)+(t=>t.getStep?t.getStep():0)(e);return a(n)?[o,-1/0,s,1/0]:[-1/0,o,1/0,s]},N=(t,e,n)=>{const{height:r,width:i}=h.getOptions(),o=e.clone();return a(n)?o.update({range:[0,i]}):o.update({range:[r,0]}),o.map(t)},j=t=>{const{nativeEvent:e}=t;if(e)return;const{selection:n}=t.data;for(let t=0;t<P.length;t++){const e=n[t],r=P[t],i=g[t];if(e){const n=w[t];r.move(...L(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",C),f.on("brushAxis:highlight",j),()=>{P.forEach((t=>t.destroy())),f.off("brushAxis:remove",C),f.off("brushAxis:highlight",j)}}(i,Object.assign({elements:rj,axes:_R,offsetY:l,offsetX:c,points:t=>t.__data__.points,horizontal:t=>{const{startPos:[e,n],endPos:[r,i]}=t.attributes;return e!==r&&n===i},datum:hj(a),state:gj(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}function jR(t){var{hideX:e=!0,hideY:n=!0}=t,r=Pe(t,["hideX","hideY"]);return(t,i,a)=>{const{container:o,view:s,options:c,update:l,setState:u}=t,f=oj(o);let h=!1,d=!1,p=s;const{scale:g,coordinate:v}=s;return function(t,e){var{filter:n,reset:r,brushRegion:i,extent:a,reverse:o,emitter:s,scale:c,coordinate:l,selection:u,series:f=!1}=e;const h=_r(Pe(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:d,height:p}=t.getBBox(),g=a||[0,0,d,p],v=function(t=300){let e=null;return n=>{const{timeStamp:r}=n;return null!==e&&r-e<t?(e=r,!0):(e=r,!1)}}(),m=yR(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:function(t,e,r,i,a){a.nativeEvent=!0,n(u(t,e,r,i),a),m.remove()}}));function y(t){v(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",y);const b=({nativeEvent:t,data:e})=>{if(t)return;const{selection:r}=e;n(r,{nativeEvent:!1})};return s.on("brush:filter",b),()=>{m.destroy(),s.off("brush:filter",b),t.removeEventListener("click",y)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{const{scale:i,coordinate:a}=p;return yS(t,e,n,r,i,a)},filter:(t,r)=>Le(this,void 0,void 0,(function*(){if(d)return;d=!0;const[i,o]=t;u("brushFilter",(t=>{const{marks:r}=t,a=r.map((t=>Z({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:i,nice:!1},y:{domain:o,nice:!1}}})));return Object.assign(Object.assign({},c),{marks:a,clip:!0})})),a.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[i,o]}}));const s=yield l();p=s.view,d=!1,h=!0})),reset:t=>{if(d||!h)return;const{scale:e}=s,{x:n,y:r}=e,i=n.getOptions().domain,o=r.getOptions().domain;a.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[i,o]}})),h=!1,p=s,u("brushFilter"),l()},extent:void 0,emitter:a,scale:g,coordinate:v},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function RR(t){return jR(Object.assign(Object.assign({hideX:!0},t),{brushRegion:MR}))}function IR(t){return jR(Object.assign(Object.assign({hideY:!0},t),{brushRegion:ER}))}function DR(t,e,n,r=!1,i="x",a="y"){const{marks:o}=t,s=o.map((t=>{var o,s;return Z({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:e,[n]:Object.assign(Object.assign({},(null===(o=t[n])||void 0===o?void 0:o[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),(null===(s=t[n])||void 0===s?void 0:s[a])&&{[a]:{preserve:!0}}),animate:!1})}));return Object.assign(Object.assign({},t),{marks:s,clip:!0,animate:!1})}function BR(t,e,n){const[r,i]=t,a=n?t=>1-t:t=>t;return mS(e,[vS(e,a(r),!0),vS(e,a(i),!1)])}function FR(t){return[t[0],t[t.length-1]]}function zR({initDomain:t={},className:e="slider",prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1,getInitValues:c=t=>{var e;const n=null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.values;if(0!==n[0]||1!==n[1])return n}}){return(l,u,f)=>{const{container:h,view:d,update:p,setState:g}=l,v=h.getElementsByClassName(e);if(!v.length)return()=>{};let m=!1;const{scale:y,coordinate:b,layout:x}=d,{paddingLeft:k,paddingTop:w,paddingBottom:M,paddingRight:O}=x,{x:E,y:S}=y,A=zc(b),_=t=>{const e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return A?[n,e]:[e,n]},T=new Map,P=new Set,C={x:t.x||E.getOptions().domain,y:t.y||S.getOptions().domain};for(const t of v){const{orientation:e}=t.attributes,[l,u]=_(e),h=`${n}${G(l)}:filter`,d="x"===l,{ratio:v}=E.getOptions(),{ratio:b}=S.getOptions(),x=t=>{if(t.data){const{selection:e}=t.data,[n=FR(C.x),r=FR(C.y)]=e;return d?[mS(E,n,v),mS(S,r,b)]:[mS(S,r,b),mS(E,n,v)]}const{value:n}=t.detail;return[BR(n,y[l],A&&"horizontal"===e),C[u]]},L=rt((e=>Le(this,void 0,void 0,(function*(){const{initValue:r=!1}=e;if(m&&!r)return;m=!0;const{nativeEvent:a=!0}=e,[o,s]=x(e);if(C[l]=o,C[u]=s,a){const t=d?o:s,n=d?s:o;f.emit(h,Object.assign(Object.assign({},e),{nativeEvent:a,data:{selection:[FR(t),FR(n)]}}))}g(t,(t=>Object.assign(Object.assign({},DR(t,{[l]:{domain:o,nice:!1}},n,i,l,u)),{paddingLeft:k,paddingTop:w,paddingBottom:M,paddingRight:O}))),yield p(),m=!1}))),a,{leading:o,trailing:s}),N=e=>{const{nativeEvent:n}=e;if(n)return;const{data:i}=e,{selection:a}=i,[o,s]=a;t.dispatchEvent(new Rp("valuechange",{data:i,nativeEvent:!1}));const c=d?bS(o,E):bS(s,S);r(t,c)};f.on(h,N),t.addEventListener("valuechange",L),T.set(t,L),P.add([h,N]);const j=c(t);j&&t.dispatchEvent(new Rp("valuechange",{detail:{value:j},nativeEvent:!1,initValue:!0}))}return()=>{for(const[t,e]of T)t.removeEventListener("valuechange",e);for(const[t,e]of P)f.off(t,e)}}}const GR="g2-scrollbar";function WR(t={}){return(e,n,r)=>{const{view:i,container:a}=e;if(!a.getElementsByClassName(GR).length)return()=>{};const{scale:o}=i,{x:s,y:c}=o,l={x:[...s.getOptions().domain],y:[...c.getOptions().domain]};s.update({domain:s.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain});return zR(Object.assign(Object.assign({},t),{initDomain:l,className:GR,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0]),getInitValues:t=>{const e=t.slider.attributes.values;if(0!==e[0])return e}}))(e,n,r)}}function $R(t,e,n){return`<${t} style="${Object.entries(n).map((([t,e])=>{return`${n=t,n.replace(/([A-Z])/g,"-$1").toLowerCase()}:${e}`;var n})).join(";")}">${e}</${t}>`}const YR={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 HR(t){return"text"===t.nodeName&&!!t.isOverflowing()}function VR(t){var{offsetX:e=8,offsetY:n=8}=t,r=Pe(t,["offsetX","offsetY"]);return t=>{const{container:i}=t,[a,o]=i.getBounds().min,s=_r(r,"tip"),c=new Set,l=t=>{const{target:r}=t;if(!HR(r))return void t.stopPropagation();const{offsetX:l,offsetY:u}=t,f=l+e-a,h=u+n-o;if(r.tip)return r.tip.style.x=f,void(r.tip.style.y=h);const{text:d}=r.style,p=new Wg({className:"poptip",style:{innerHTML:$R("div",d,Object.assign(Object.assign({},YR),s)),x:f,y:h}});i.appendChild(p),r.tip=p,c.add(p)},u=t=>{const{target:e}=t;HR(e)?e.tip&&(e.tip.remove(),e.tip=null,c.delete(e.tip)):t.stopPropagation()};return i.addEventListener("pointerover",l),i.addEventListener("pointerout",u),()=>{i.removeEventListener("pointerover",l),i.removeEventListener("pointerout",u),c.forEach((t=>t.remove()))}}}VR.props={reapplyWhenUpdate:!0};const qR={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function UR(t={}){const{originData:e=[],layout:n}=t,r=Pe(t,["originData","layout"]),i=Z({},qR,r),a=_r(i,"breadCrumb"),o=_r(i,"active");return t=>{const{update:r,setState:i,container:s,options:c}=t,l=function(t){return pm(t).select(`.${rA}`).node()}(s),u=c.marks[0],{state:f}=u,h=new zg;l.appendChild(h);const d=(t,c)=>Le(this,void 0,void 0,(function*(){if(h.removeChildren(),c){let e="",n=a.y,r=0;const i=[],s=l.getBBox().width,c=t.map(((o,c)=>{e=`${e}${o}/`,i.push(o);const l=new tv({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:o,x:r,path:[...i],depth:c},a),{y:n})});h.appendChild(l),r+=l.getBBox().width;const u=new tv({style:Object.assign(Object.assign({x:r,text:" / "},a),{y:n})});return h.appendChild(u),r+=u.getBBox().width,r>s&&(n=h.getBBox().height+a.y,r=0,l.attr({x:r,y:n}),r+=l.getBBox().width,u.attr({x:r,y:n}),r+=u.getBBox().width),c===ot(t)-1&&u.remove(),l}));c.forEach(((t,e)=>{if(e===ot(c)-1)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",(()=>{t.attr(o)})),t.addEventListener("mouseleave",(()=>{t.attr(n)})),t.addEventListener("click",(()=>{d(tt(t,["style","path"]),tt(t,["style","depth"]))}))}))}!function(t,e){[...sR(t),...cR(t)].forEach((t=>{e(t,(t=>t))}))}(s,i),i("treemapDrillDown",(r=>{const{marks:i}=r,a=t.join("/"),o=i.map((t=>{if("rect"!==t.type)return t;let r=e;if(c){const t=e.filter((t=>{const e=tt(t,["id"]);return e&&(e.match(`${a}/`)||a.match(e))})).map((t=>({value:0===t.height?tt(t,["value"]):void 0,name:tt(t,["id"])}))),{paddingLeft:i,paddingBottom:o,paddingRight:s}=n,l=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||h.getBBox().height+10)/(c+1),paddingLeft:i/(c+1),paddingBottom:o/(c+1),paddingRight:s/(c+1),path:t=>t.name,layer:t=>t.depth===c+1});r=zO(t,l,{value:"value"})[0]}else r=e.filter((t=>1===t.depth));const i=[];return r.forEach((({path:t})=>{i.push(L(t))})),Z({},t,{data:r,scale:{color:{domain:i}}})}));return Object.assign(Object.assign({},r),{marks:o})})),yield r(void 0,["legendFilter"])})),p=t=>{const n=t.target;if("rect"!==tt(n,["markType"]))return;const r=tt(n,["__data__","key"]),i=A(e,(t=>t.id===r));tt(i,"height")&&d(tt(i,"path"),tt(i,"depth"))};l.addEventListener("click",p);const g=w(Object.assign(Object.assign({},f.active),f.inactive)),v=()=>{Ej(l).forEach((t=>{const n=tt(t,["style","cursor"]),r=A(e,(e=>e.id===tt(t,["__data__","key"])));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";const e=function(t,e){if(null===t||!S(t))return{};var n={};return k(e,(function(e){et.call(t,e)&&(n[e]=t[e])})),n}(t.attributes,g);t.addEventListener("mouseenter",(()=>{t.attr(f.active)})),t.addEventListener("mouseleave",(()=>{t.attr(Z(e,f.inactive))}))}}))};return v(),l.addEventListener("mousemove",v),()=>{h.remove(),l.removeEventListener("click",p),l.removeEventListener("mousemove",v)}}}const XR={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},ZR="movePoint",KR=t=>{const e=t.target,{markType:n}=e;"line"===n&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),"interval"===n&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},QR=t=>{const e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},JR=(t,e,n)=>{t.forEach(((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)}))},tI=(t,e,n,r)=>{const i=new qg({style:n}),a=new tv({style:r});return e.appendChild(a),t.appendChild(i),[i,a]},eI=(t,e)=>{if(!tt(t,["options","range","indexOf"]))return;const n=t.options.range.indexOf(e);return t.sortedDomain[n]},nI=(t,e,n)=>{const r=Mj(t,e),i=Mj(t,n)/r;return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]};function rI(t={}){const{selection:e=[],precision:n=2}=t,r=Pe(t,["selection","precision"]),i=Object.assign(Object.assign({},XR),r||{}),a=_r(i,"path"),o=_r(i,"label"),s=_r(i,"point");return(t,r,i)=>{const{update:c,setState:l,container:u,view:f,options:{marks:h,coordinate:d}}=t,p=oj(u);let g,v=Ej(p),m=e;const{transform:y=[],type:b}=d,x=!!A(y,(({type:t})=>"transpose"===t)),k="polar"===b,w="theta"===b,M=!!A(v,(({markType:t})=>"area"===t));M&&(v=v.filter((({markType:t})=>"area"===t)));const O=new zg({style:{zIndex:2}});p.appendChild(O);const E=()=>{i.emit("element-point:select",{nativeEvent:!0,data:{selection:m}})},S=t=>{const e=t.target;m=[e.parentNode.childNodes.indexOf(e)],E(),T(e)},_=t=>{const{data:{selection:e},nativeEvent:n}=t;if(n)return;m=e;const r=tt(v,[null==m?void 0:m[0]]);r&&T(r)},T=t=>{const{attributes:e,markType:r,__data__:d}=t,{stroke:p}=e,{points:v,seriesTitle:y,color:b,title:S,seriesX:_,y1:P}=d;if(x&&"interval"!==r)return;const{scale:C,coordinate:L}=(null==g?void 0:g.view)||f,{color:N,y:j,x:R}=C,I=L.getCenter();let D;O.removeChildren();const B=(t,e,n,r)=>Le(this,void 0,void 0,(function*(){return l("elementPointMove",(a=>{var o;const s=((null===(o=null==g?void 0:g.options)||void 0===o?void 0:o.marks)||h).map((a=>{if(!r.includes(a.type))return a;const{data:o,encode:s}=a,c=Object.keys(s).reduce(((r,i)=>{const a=s[i];return"x"===i&&(r[a]=t),"y"===i&&(r[a]=e),"color"===i&&(r[a]=n),r}),{}),l=((t,e,n)=>e.map((e=>{const r=["x","color"].reduce(((r,i)=>{const a=n[i];return a?e[a]===t[a]&&r:r}),!0);return r?Object.assign(Object.assign({},e),t):e})))(c,o,s);return((t,e)=>{i.emit("element-point:moved",{nativeEvent:!0,data:{changeData:t,data:e}})})(c,l),Z({},a,{data:l,animate:!1})}));return Object.assign(Object.assign({},a),{marks:s})})),yield c("elementPointMove")}));if(["line","area"].includes(r))v.forEach(((e,r)=>{const i=R.invert(_[r]);if(!i)return;const c=new Ig({name:ZR,style:Object.assign({cx:e[0],cy:e[1],fill:p},s)}),l=((t,e)=>{const n=tt(t,["__data__","seriesItems",e,"0","value"]),r=tt(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:a,transform:o}}=t.parentNode,s=A(o,(({type:t})=>"normalizeY"===t)),c=tt(a,["y","field"]),l=i[r][c];return t=>s?1===n?t:t/(1-t)/(n/(1-n))*l:t})(t,r);c.addEventListener("mousedown",(f=>{const h=L.output([_[r],0]),d=null==y?void 0:y.length;u.attr("cursor","move"),m[1]!==r&&(m[1]=r,E()),JR(O.childNodes,m,s);const[p,x]=tI(O,c,a,o),w=t=>{const i=e[1]+t.clientY-D[1];if(M)if(k){const a=e[0]+t.clientX-D[0],[o,s]=nI(I,h,[a,i]),[,u]=L.output([1,j.output(0)]),[,f]=L.invert([o,u-(v[r+d][1]-s)]),g=(r+1)%d,m=Oj([v[(r-1+d)%d],[o,s],y[g]&&v[g]]);x.attr("text",l(j.invert(f)).toFixed(n)),p.attr("d",m),c.attr("cx",o),c.attr("cy",s)}else{const[,t]=L.output([1,j.output(0)]),[,a]=L.invert([e[0],t-(v[r+d][1]-i)]),o=Oj([v[r-1],[e[0],i],y[r+1]&&v[r+1]]);x.attr("text",l(j.invert(a)).toFixed(n)),p.attr("d",o),c.attr("cy",i)}else{const[,t]=L.invert([e[0],i]),a=Oj([v[r-1],[e[0],i],v[r+1]]);x.attr("text",j.invert(t).toFixed(n)),p.attr("d",a),c.attr("cy",i)}};D=[f.clientX,f.clientY],window.addEventListener("mousemove",w);const S=()=>Le(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),window.removeEventListener("mousemove",w),u.removeEventListener("mouseup",S),$(x.attr("text")))return;const e=Number(x.attr("text")),n=eI(N,b);g=yield B(i,e,n,["line","area"]),x.remove(),p.remove(),T(t)}));u.addEventListener("mouseup",S)})),O.appendChild(c)})),JR(O.childNodes,m,s);else if("interval"===r){let e=[(v[0][0]+v[1][0])/2,v[0][1]];x?e=[v[0][0],(v[0][1]+v[1][1])/2]:w&&(e=v[0]);const i=(t=>{const e=tt(t,["__data__","y"]),n=tt(t,["__data__","y1"])-e,{__data__:{data:r,encode:i,transform:a},childNodes:o}=t.parentNode,s=A(a,(({type:t})=>"normalizeY"===t)),c=tt(i,["y","field"]),l=r[o.indexOf(t)][c];return(t,e=!1)=>s||e?t/(1-t)/(n/(1-n))*l:t})(t),c=new Ig({name:ZR,style:Object.assign(Object.assign({cx:e[0],cy:e[1],fill:p},s),{stroke:s.activeStroke})});c.addEventListener("mousedown",(s=>{u.attr("cursor","move");const l=eI(N,b),[f,h]=tI(O,c,a,o),d=t=>{if(x){const r=e[0]+t.clientX-D[0],[a]=L.output([j.output(0),j.output(0)]),[,o]=L.invert([a+(r-v[2][0]),e[1]]),s=Oj([[r,v[0][1]],[r,v[1][1]],v[2],v[3]],!0);h.attr("text",i(j.invert(o)).toFixed(n)),f.attr("d",s),c.attr("cx",r)}else if(w){const r=e[1]+t.clientY-D[1],a=e[0]+t.clientX-D[0],[o,s]=nI(I,[a,r],e),[l,u]=nI(I,[a,r],v[1]),d=L.invert([o,s])[1],p=P-d;if(p<0)return;const g=function(t,e,n=0){const r=[["M",...e[1]]],i=Mj(t,e[1]),a=Mj(t,e[0]);return 0===i?r.push(["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]),r}(I,[[o,s],[l,u],v[2],v[3]],p>.5?1:0);h.attr("text",i(p,!0).toFixed(n)),f.attr("d",g),c.attr("cx",o),c.attr("cy",s)}else{const r=e[1]+t.clientY-D[1],[,a]=L.output([1,j.output(0)]),[,o]=L.invert([e[0],a-(v[2][1]-r)]),s=Oj([[v[0][0],r],[v[1][0],r],v[2],v[3]],!0);h.attr("text",i(j.invert(o)).toFixed(n)),f.attr("d",s),c.attr("cy",r)}};D=[s.clientX,s.clientY],window.addEventListener("mousemove",d);const p=()=>Le(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),u.removeEventListener("mouseup",p),window.removeEventListener("mousemove",d),$(h.attr("text")))return;const e=Number(h.attr("text"));g=yield B(S,e,l,[r]),h.remove(),f.remove(),T(t)}));u.addEventListener("mouseup",p)})),O.appendChild(c)}};v.forEach(((t,e)=>{m[0]===e&&T(t),t.addEventListener("click",S),t.addEventListener("mouseenter",KR),t.addEventListener("mouseleave",QR)}));const P=t=>{const e=null==t?void 0:t.target;e&&(e.name===ZR||v.includes(e))||(m=[],E(),O.removeChildren())};return i.on("element-point:select",_),i.on("element-point:unselect",P),u.addEventListener("mousedown",P),()=>{O.remove(),i.off("element-point:select",_),i.off("element-point:unselect",P),u.removeEventListener("mousedown",P),v.forEach((t=>{t.removeEventListener("click",S),t.removeEventListener("mouseenter",KR),t.removeEventListener("mouseleave",QR)}))}}}var iI={},aI={};function oI(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function sI(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function cI(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function lI(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+cI(-t,6):t>9999?"+"+cI(t,6):cI(t,4)}(t.getUTCFullYear())+"-"+cI(t.getUTCMonth()+1,2)+"-"+cI(t.getUTCDate(),2)+(i?"T"+cI(e,2)+":"+cI(n,2)+":"+cI(r,2)+"."+cI(i,3)+"Z":r?"T"+cI(e,2)+":"+cI(n,2)+":"+cI(r,2)+"Z":n||e?"T"+cI(e,2)+":"+cI(n,2)+"Z":"")}function uI(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,l=!1;function u(){if(c)return aI;if(l)return l=!1,iI;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=u())!==aI;){for(var f=[];r!==iI&&r!==aI;)f.push(r),r=u();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?lI(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=oI(t);return function(r,i){return e(n(r),i,t)}}(t,e):oI(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=sI(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=sI(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function fI(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;hI&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const hI=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),dI=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>Le(void 0,void 0,void 0,(function*(){const t=yield fetch(e);if("csv"===n){const e=yield t.text();return uI(r).parse(e,i?fI:kr)}if("json"===n)return yield t.json();throw new Error(`Unknown format: ${n}.`)}))};dI.props={};const pI=t=>{const{fields:e,key:n="key",value:r="value"}=t;return t=>{return(i=e)&&0!==Object.keys(i).length?t.flatMap((t=>e.map((e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))))):t;var i}};function gI(t){return null!=t&&!Number.isNaN(t)}pI.props={};const vI=t=>{const{callback:e=gI}=t;return t=>t.filter(e)};vI.props={};const mI=t=>{const{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};mI.props={};const yI=t=>{const{fields:e}=t;return t=>t.map((t=>function(t,e=[]){return e.reduce(((e,n)=>(n in t&&(e[n]=t[n]),e)),{})}(t,e)))};yI.props={};const bI=t=>e=>{if(!t||(n=t,0===Object.keys(n).length))return e;var n;return e.map((e=>Object.entries(e).reduce(((e,[n,r])=>(e[t[n]||n]=r,e)),{})))};bI.props={};const xI=t=>{const{fields:e=[]}=t,n=(r=!0,e.map((t=>{if(Array.isArray(t)){const[e,n=r]=t;return[e,n]}return[t,r]})));var r;return t=>[...t].sort(((t,e)=>n.reduce(((n,[r,i=!0])=>0!==n?n:i?t[r]<e[r]?-1:+(t[r]!==e[r]):t[r]>e[r]?-1:+(t[r]!==e[r])),0)))};xI.props={};const kI=t=>{const{value:e}=t;return()=>e};kI.props={};const wI=t=>{const{callback:e=kr}=t;return t=>e(t)};wI.props={};const MI=t=>{const{callback:e=kr}=t;return t=>Array.isArray(t)?t.map(e):t};MI.props={};const OI=Math.PI/180,EI=2048;function SI(t){return t.text}function AI(){return"serif"}function _I(){return"normal"}function TI(t){return t.value}function PI(){return 90*~~(2*Math.random())}function CI(){return 1}function LI(){}function NI(t,e,n,r){if(e.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,2048/a,EI/a);let o=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/a)+"px "+e.font;let t=i.measureText(e.text+"m").width*a,l=e.size<<1;if(e.rotate){const n=Math.sin(e.rotate*OI),r=Math.cos(e.rotate*OI),i=t*r,a=t*n,o=l*r,s=l*n;t=Math.max(Math.abs(i+s),Math.abs(i-s))+31>>5<<5,l=~~Math.max(Math.abs(a+o),Math.abs(a-o))}else t=t+31>>5<<5;if(l>c&&(c=l),o+t>=2048&&(o=0,s+=c,c=0),s+l>=EI)break;i.translate((o+(t>>1))/a,(s+(l>>1))/a),e.rotate&&i.rotate(e.rotate*OI),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=l,e.xoff=o,e.yoff=s,e.x1=t>>1,e.y1=l>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=t}const u=i.getImageData(0,0,2048/a,EI/a).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;const t=e.width,i=t>>5;let a=e.y1-e.y0;for(let t=0;t<a*i;t++)f[t]=0;if(o=e.xoff,null==o)return;s=e.yoff;let c=0,l=-1;for(let n=0;n<a;n++){for(let e=0;e<t;e++){const t=i*n+(e>>5),r=u[2048*(s+n)+(o+e)<<2]?1<<31-e%32:0;f[t]|=r,c|=r}c?l=n:(e.y0++,a--,n--,s++)}e.y1=e.y0+l,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}function jI(t,e,n){n>>=5;const r=t.sprite,i=t.width>>5,a=t.x-(i<<4),o=127&a,s=32-o,c=t.y1-t.y0;let l,u=(t.y+t.y0)*n+(a>>5);for(let t=0;t<c;t++){l=0;for(let n=0;n<=i;n++)if((l<<s|(n<i?(l=r[t*i+n])>>>o:0))&e[u+n])return!0;u+=n}return!1}function RI(t,e){const n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function II(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function DI(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function BI(){return document.createElement("canvas")}function FI(t){return"function"==typeof t?t:function(){return t}}const zI={archimedean:II,rectangular:function(t){const e=4*t[0]/t[1];let n=0,r=0;return function(t){const i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};function GI(){let t=[256,256],e=SI,n=AI,r=TI,i=_I,a=PI,o=CI,s=II,c=Math.random,l=LI,u=[],f=null,h=1/0,d=BI;const p=_I,g={};function v(e,n,r){const i=n.x,a=n.y,o=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=s(t),u=c()<.5?1:-1;let f,h,d,p=-u;for(;(f=l(p+=u))&&(h=~~f[0],d=~~f[1],!(Math.min(Math.abs(h),Math.abs(d))>=o));)if(n.x=i+h,n.y=a+d,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&jI(n,e,t[0])||r&&(v=r,!((g=n).x+g.x1>v[0].x&&g.x+g.x0<v[1].x&&g.y+g.y1>v[0].y&&g.y+g.y0<v[1].y)))){const r=n.sprite,i=n.width>>5,a=t[0]>>5,o=n.x-(i<<4),s=127&o,c=32-s,l=n.y1-n.y0;let u,f=(n.y+n.y0)*a+(o>>5);for(let t=0;t<l;t++){u=0;for(let n=0;n<=i;n++)e[f+n]|=u<<c|(n<i?(u=r[t*i+n])>>>s:0);f+=a}return delete n.sprite,!0}var g,v;return!1}return g.start=function(){const[s,m]=t,y=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=EI/e;const n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",n.textBaseline="middle",{context:n,ratio:e}}(d()),b=g.board?g.board:DI((t[0]>>5)*t[1]),x=u.length,k=[],w=u.map((function(t,s,c){return t.text=e.call(this,t,s,c),t.font=n.call(this,t,s,c),t.style=p.call(this,t,s,c),t.weight=i.call(this,t,s,c),t.rotate=a.call(this,t,s,c),t.size=~~r.call(this,t,s,c),t.padding=o.call(this,t,s,c),t})).sort((function(t,e){return e.size-t.size}));let M=-1,O=g.board?[{x:0,y:0},{x:s,y:m}]:void 0;function E(){const e=Date.now();for(;Date.now()-e<h&&++M<x;){const e=w[M];e.x=s*(c()+.5)>>1,e.y=m*(c()+.5)>>1,NI(y,e,w,M),e.hasText&&v(b,e,O)&&(l.call(null,"word",{cloud:g,word:e}),k.push(e),O?g.hasImage||RI(O,e):O=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}g._tags=k,g._bounds=O,M>=x&&(g.stop(),l.call(null,"end",{cloud:g,words:k,bounds:O}))}return f&&clearInterval(f),f=setInterval(E,0),E(),g},g.stop=function(){return f&&(clearInterval(f),f=null),g},g.createMask=e=>{const n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;const a=r>>5,o=DI((r>>5)*i);n.width=r,n.height=i;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,i);const c=s.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=a*t+(e>>5),i=t*r+e<<2,s=c[i]>=250&&c[i+1]>=250&&c[i+2]>=250?1<<31-e%32:0;o[n]|=s}g.board=o,g.hasImage=!0},g.timeInterval=function(t){h=null==t?1/0:t},g.words=function(t){u=t},g.size=function(e=[]){t=[+e[0],+e[1]]},g.text=function(t){e=FI(t)},g.font=function(t){n=FI(t)},g.fontWeight=function(t){i=FI(t)},g.rotate=function(t){a=FI(t)},g.canvas=function(t){d=FI(t)},g.spiral=function(t){s=zI[t]||t},g.fontSize=function(t){r=FI(t)},g.padding=function(t){o=FI(t)},g.random=function(t){c=FI(t)},g.on=function(t){l=FI(t)},g}const WI={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return 30*(~~(6*Math.random())-3)}};function $I(t){return new Promise(((e,n)=>{if(t instanceof HTMLImageElement)e(t);else{if("string"==typeof t){const r=new Image;return r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),void(r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()})}n()}}))}const YI=(t,e)=>n=>Le(void 0,void 0,void 0,(function*(){const r=Object.assign({},WI,t,{canvas:e.createCanvas}),i=GI();var a,o;yield(a=i,o=r,{set(t,e,n){if(void 0===o[t])return this;const r=e?e.call(null,o[t]):o[t];return n?n.call(null,r):"function"==typeof a[t]?a[t](r):a[t]=r,this},setAsync(t,e,n){return Le(this,void 0,void 0,(function*(){if(void 0===o[t])return this;const r=e?yield e.call(null,o[t]):o[t];return n?n.call(null,r):"function"==typeof a[t]?a[t](r):a[t]=r,this}))}}).set("fontSize",(t=>{const e=n.map((t=>t.value));return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[i,a]=e;return a===i?()=>(r+n)/2:({value:t})=>(r-n)/(a-i)*(t-i)+n}return()=>t}(t,[dr(e),fr(e)])})).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",$I,i.createMask),i.words([...n]);const s=i.start(),[c,l]=r.size,u=[{x:0,y:0},{x:c,y:l}],{_bounds:f=u,_tags:h,hasImage:d}=s,p=h.map((t=>{var{x:e,y:n,font:r}=t,i=Pe(t,["x","y","font"]);return Object.assign(Object.assign({},i),{x:e+c/2,y:n+l/2,fontFamily:r})})),[{x:g,y:v},{x:m,y:y}]=f,b={text:"",value:0,opacity:0,fontSize:0};return p.push(Object.assign(Object.assign({},b),{x:d?0:g,y:d?0:v}),Object.assign(Object.assign({},b),{x:d?c:m,y:d?l:y})),p}));function HI(t){return"string"==typeof t?e=>e[t]:t}YI.props={};const VI=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=n,c=HI(s),l=HI(o),u=Zn(e,(([t])=>t),(t=>c(t)));return t=>t.map((t=>{const e=u.get(l(t));return Object.assign(Object.assign({},t),r.reduce(((t,n,r)=>(t[i[r]]=e?e[n]:a,t)),{}))}))};VI.props={};const qI=t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)};qI.props={};var UI={exports:{}},XI={exports:{}};!function(t){var e=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},t.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},t.exports.findMinMulti=function(t){for(var n=e.findMin(t[0]),r=1;r<t.length;r++)n=Math.min(n,e.findMin(t[r]));return n},t.exports.findMaxMulti=function(t){for(var n=e.findMax(t[0]),r=1;r<t.length;r++)n=Math.max(n,e.findMax(t[r]));return n},t.exports.inside=function(t,e,n){return t<=n&&n<=e}}(XI),function(t){var e=Math.log(2),n=t.exports,r=XI.exports;function i(t){return 1-Math.abs(t)}t.exports.getUnifiedMinMax=function(t,e){return n.getUnifiedMinMaxMulti([t],e)},t.exports.getUnifiedMinMaxMulti=function(t,e){e=e||{};var n=!1,i=!1,a=r.isNumber(e.width)?e.width:2,o=r.isNumber(e.size)?e.size:50,s=r.isNumber(e.min)?e.min:(n=!0,r.findMinMulti(t)),c=r.isNumber(e.max)?e.max:(i=!0,r.findMaxMulti(t)),l=(c-s)/(o-1);return n&&(s-=2*a*l),i&&(c+=2*a*l),{min:s,max:c}},t.exports.create=function(t,e){if(e=e||{},!t||0===t.length)return[];var a=r.isNumber(e.size)?e.size:50,o=r.isNumber(e.width)?e.width:2,s=n.getUnifiedMinMax(t,{size:a,width:o,min:e.min,max:e.max}),c=s.min,l=s.max-c,u=l/(a-1);if(0===l)return[{x:c,y:1}];for(var f=[],h=0;h<a;h++)f.push({x:c+h*u,y:0});var d=function(t,e){for(var n={},r=0,i=-e;i<=e;i++)r+=t(i/e),n[i]=r;return n}(i,o),p=d[o],g=d[o-1]-d[o-2],v=0;t.forEach((function(t){var e=function(t){return Math.floor((t-c)/u)}(t);if(!(e+o<0||e-o>=f.length)){var n=Math.max(e-o,0),i=e,a=Math.min(e+o,f.length-1),s=n-(e-o),l=e+o-a,h=d[-o-1+s]||0,m=d[-o-1+l]||0,y=p/(p-h-m);s>0&&(v+=y*(s-1)*g);var b=Math.max(0,e-o+1);r.inside(0,f.length-1,b)&&(f[b].y+=1*y*g),r.inside(0,f.length-1,i+1)&&(f[i+1].y-=2*y*g),r.inside(0,f.length-1,a+1)&&(f[a+1].y+=1*y*g)}}));var m=v,y=0,b=0;return f.forEach((function(t){y+=t.y,m+=y,t.y=m,b+=m})),b>0&&f.forEach((function(t){t.y/=b})),f},t.exports.getExpectedValueFromPdf=function(t){if(t&&0!==t.length){var e=0;return t.forEach((function(t){e+=t.x*t.y})),e}},t.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,r=0,i=0;i<t.length&&(r=i,!((n+=t[i].y)>=e));i++);return t[r].x}},t.exports.getPerplexity=function(t){if(t&&0!==t.length){var n=0;return t.forEach((function(t){var e=Math.log(t.y);isFinite(e)&&(n+=t.y*e)})),n=-n/e,Math.pow(2,n)}}}(UI);var ZI=UI.exports;const KI=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=t,[c,l]=r;return t=>{const r=Array.from(Un(t,(t=>n.map((e=>t[e])).join("-"))).values());return r.map((t=>{const n=ZI.create(t.map((t=>t[e])),{min:i,max:a,size:o,width:s}),r=n.map((t=>t.x)),u=n.map((t=>t.y));return Object.assign(Object.assign({},t[0]),{[c]:r,[l]:u})}))}};KI.props={};const QI=()=>t=>(console.log("G2 data section:",t),t);QI.props={};const JI=t=>{const{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{const i=t.map((t=>t[e])),a=function(t,e){if(e<0||e>1)throw new Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0];const r=[];for(const i of t){if(null==i){r.push(i),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=i);const a=n*e+(1-e)*i;r.push(a),n=a}return r}(i,n);return t.map(((t,e)=>Object.assign(Object.assign({},t),{[r]:a[e]})))}};function tD(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function eD(t,e){const[n,r]=t,[i,a]=e;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}JI.props={};const nD=t=>{const{priority:e}=t;return t=>{const n=[];return e&&t.sort(e),t.forEach((t=>{nj(t);const e=t.getLocalBounds(),r=n.some((t=>function(t,e){const[n,r]=t,[i,a]=e;return n[0]<a[0]&&r[0]>i[0]&&n[1]<a[1]&&r[1]>i[1]}(tD(e),tD(t.getLocalBounds()))));r?ej(t):n.push(t)})),t}};function rD([t,e],[n,r]){return r>t&&e>n}function iD(){const t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function aD(t){const e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);const{min:r,max:i}=e.getRenderBounds();return e.destroy(),{min:r,max:i}}const oD=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{const i=t.length;if(i<=1)return t;const[a,o]=iD(),[s,c]=iD(),[l,u]=iD(),[f,h]=iD();for(const e of t){const{min:t,max:n}=aD(e),[r,i]=t,[a,s]=n;o(e,i),c(e,i),u(e,s-i),h(e,[r,a])}for(let a=0;a<e;a++){t.sort(((t,e)=>Cn(s(t),s(e))));let e=0;for(let n=0;n<i-1;n++){const i=t[n];let a,o=n+1;for(;(a=t[o])&&!rD(f(i),f(a));)o+=1;if(a){const t=s(i),n=l(i),o=s(a),u=o-(t+n);if(u<r){const n=(r-u)/2;e=Math.max(e,n),c(i,t-n),c(a,o+n)}}}if(e<n)break}for(const e of t)e.style.y+=s(e)-a(e);return t}};function sD(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function cD(t,e,n){return.2126*sD(t)+.7152*sD(e)+.0722*sD(n)}function lD(t,e){if(!t||!e||t===e)return 1;const{r:n,g:r,b:i}=t,{r:a,g:o,b:s}=e,c=cD(n,r,i),l=cD(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function uD(t,e){const n=hr(e,(e=>lD(t,function(t){return"object"==typeof t?t:hh(t)}(e))));return e[n]}const fD=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach((t=>{const r=t.attr("dependentElement").parsedStyle.fill;lD(t.parsedStyle.fill,r)<e&&t.attr("fill",uD(r,n))})),t)},hD=()=>t=>(t.forEach((t=>{nj(t);const e=t.attr("bounds"),n=function(t,e){const[n,r]=t;return!(eD(n,e)&&eD(r,e))}(tD(t.getLocalBounds()),e);n&&ej(t)})),t),dD=()=>(t,{canvas:e,layout:n})=>(t.forEach((t=>{nj(t);const{max:e,min:r}=t.getRenderBounds(),[i,a]=e,[o,s]=r,c=((t,e)=>{const[[n,r],[i,a]]=e,[[o,s],[c,l]]=t;let u=0,f=0;return o<n?u=n-o:c>i&&(u=i-c),s<r?f=r-s:l>a&&(f=a-l),[u,f]})([[o,s],[i,a]],[[n.x,n.y],[n.x+n.width,n.y+n.height]]);t.style.connector&&t.style.connectorPoints&&(t.style.connectorPoints[0][0]-=c[0],t.style.connectorPoints[0][1]-=c[1]),t.style.x+=c[0],t.style.y+=c[1]})),t);function pD(){return{"data.fetch":dI,"data.inline":kI,"data.sortBy":xI,"data.sort":mI,"data.filter":vI,"data.pick":yI,"data.rename":bI,"data.fold":pI,"data.slice":qI,"data.custom":wI,"data.map":MI,"data.join":VI,"data.kde":KI,"data.log":QI,"data.wordCloud":YI,"data.ema":JI,"transform.stackY":Zr,"transform.binX":_s,"transform.bin":As,"transform.dodgeX":xi,"transform.jitter":Do,"transform.jitterX":Bo,"transform.jitterY":Fo,"transform.symmetryY":zo,"transform.diffY":Go,"transform.stackEnter":ki,"transform.normalizeY":wi,"transform.select":Vo,"transform.selectX":qo,"transform.selectY":Uo,"transform.groupX":os,"transform.groupY":ss,"transform.groupColor":cs,"transform.group":as,"transform.sortX":fs,"transform.sortY":ds,"transform.sortColor":hs,"transform.flexX":ps,"transform.pack":Os,"transform.sample":Ps,"transform.filter":Cs,"coordinate.cartesian":e,"coordinate.polar":r,"coordinate.transpose":i,"coordinate.theta":a,"coordinate.parallel":c,"coordinate.fisheye":l,"coordinate.radial":s,"coordinate.radar":u,"encode.constant":f,"encode.field":d,"encode.transform":h,"encode.column":p,"mark.interval":MM,"mark.rect":EM,"mark.line":TM,"mark.point":CM,"mark.text":NM,"mark.cell":RM,"mark.area":DM,"mark.link":FM,"mark.image":GM,"mark.polygon":$M,"mark.box":HM,"mark.vector":qM,"mark.lineX":KM,"mark.lineY":XM,"mark.connector":JM,"mark.range":rO,"mark.rangeX":aO,"mark.rangeY":sO,"mark.path":lO,"mark.shape":GO,"mark.density":YO,"mark.heatmap":VO,"mark.wordCloud":WO,"palette.category10":qO,"palette.category20":UO,"scale.linear":ZO,"scale.ordinal":KO,"scale.band":XO,"scale.identity":QO,"scale.point":JO,"scale.time":tE,"scale.log":eE,"scale.pow":nE,"scale.sqrt":oE,"scale.threshold":rE,"scale.quantile":iE,"scale.quantize":aE,"scale.sequential":sE,"scale.constant":cE,"theme.classic":hE,"theme.classicDark":gE,"theme.academy":mE,"theme.light":fE,"theme.dark":pE,"component.axisX":XE,"component.axisY":ZE,"component.legendCategory":nS,"component.legendContinuous":sS,"component.legends":AS,"component.title":pS,"component.sliderX":wS,"component.sliderY":MS,"component.scrollbarX":ES,"component.scrollbarY":SS,"animation.scaleInX":_S,"animation.scaleOutX":TS,"animation.scaleInY":PS,"animation.scaleOutY":CS,"animation.waveIn":qS,"animation.fadeIn":LS,"animation.fadeOut":NS,"animation.zoomIn":US,"animation.zoomOut":XS,"animation.pathIn":ZS,"animation.morphing":VS,"animation.growInX":KS,"animation.growInY":QS,"interaction.elementHighlight":_j,"interaction.elementHighlightByX":Tj,"interaction.elementHighlightByColor":Pj,"interaction.elementSelect":Lj,"interaction.elementSelectByX":Nj,"interaction.elementSelectByColor":jj,"interaction.fisheye":Ij,"interaction.chartIndex":Rj,"interaction.tooltip":nR,"interaction.legendFilter":hR,"interaction.legendHighlight":dR,"interaction.brushHighlight":wR,"interaction.brushXHighlight":OR,"interaction.brushYHighlight":SR,"interaction.brushAxisHighlight":NR,"interaction.brushFilter":jR,"interaction.brushXFilter":RR,"interaction.brushYFilter":IR,"interaction.sliderFilter":zR,"interaction.scrollbarFilter":WR,"interaction.poptip":VR,"interaction.treemapDrillDown":UR,"interaction.elementPointMove":rI,"composition.spaceLayer":WT,"composition.spaceFlex":$T,"composition.facetRect":aP,"composition.repeatMatrix":fP,"composition.facetCircle":mP,"composition.timingKeyframe":bP,"labelTransform.overlapHide":nD,"labelTransform.overlapDodgeY":oD,"labelTransform.overflowHide":hD,"labelTransform.contrastReverse":fD,"labelTransform.exceedAdjust":dD}}function gD(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}const vD={};const mD=t=>t?parseInt(t):0;function yD(t,e){const n=[t];for(;n.length;){const t=n.shift();e&&e(t);const r=t.children||[];for(const t of r)n.push(t)}}class bD{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){const e=t(this.value);return this.value=e,this}attr(t,e){return 1===arguments.length?this.value[t]:this.map((n=>(n[t]=e,n)))}append(t){const e=new t({});return e.children=[],this.push(e),e}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){const t=this.parentNode;if(t){const{children:e}=t,n=e.findIndex((t=>t===this));e.splice(n,1)}return this}getNodeByKey(t){let e=null;return yD(this,(n=>{t===n.attr("key")&&(e=n)})),e}getNodesByType(t){const e=[];return yD(this,(n=>{t===n.type&&e.push(n)})),e}getNodeByType(t){let e=null;return yD(this,(n=>{e||t===n.type&&(e=n)})),e}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}const xD=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],kD="__remove__",wD="__callback__";function MD(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function OD(t,e){const{width:n,height:r,autoFit:i,depth:a=0}=t;let o=640,s=480;if(i){const{width:t,height:n}=function(t){const e=getComputedStyle(t),n=t.clientWidth||mD(e.width),r=t.clientHeight||mD(e.height);return{width:n-(mD(e.paddingLeft)+mD(e.paddingRight)),height:r-(mD(e.paddingTop)+mD(e.paddingBottom))}}(e);o=t||o,s=n||s}return o=n||o,s=r||s,{width:Math.max(j(o)?o:1,1),height:Math.max(j(s)?s:1,1),depth:a}}function ED(t){const e=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];for(const n of xD)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,MD(e));n.length;){const t=n.pop(),e=r.get(t),{children:i=[]}=t;for(const t of i)if(t.type===wD)e.children=t.value;else{const i=MD(t),{children:a=[]}=e;a.push(i),n.push(t),r.set(t,i),e.children=a}}return r.get(e)}function SD(t,e,n,r,i){const{type:a}=t,{type:o=n||a}=e;if(function(t,e){return"function"!=typeof t&&new Set(Object.keys(e)).has(t)}(o,i)){for(const n of xD)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(function(t,e){return"function"==typeof t||new Set(Object.keys(e)).has(t)}(o,r)){const t={type:"view"},n=Object.assign({},e);for(const e of xD)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}function AD(t,e,n){if("function"==typeof t){const e=new bD;return e.value=t,e.type=wD,e}const{type:r,children:i}=t,a=Pe(t,["type","children"]),o=function(t,e,n){if("function"==typeof t)return e.mark;const r=Object.assign(Object.assign({},e),n)[t];if(!r)throw new Error(`Unknown mark: ${t}.`);return r}(r,e,n),s=new o;return s.value=a,s.type=r,s}function _D(t,e){const{type:n,children:r}=e,i=Pe(e,["type","children"]);t.type===n||void 0===n?jr(t.value,i):"string"==typeof n&&(t.type=n,t.value=i)}function TD(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[t,e]=i.shift(),a=AD(e,n,r);Array.isArray(t.children)&&t.push(a);const{children:o}=e;if(Array.isArray(o))for(const t of o)i.push([a,t]);else"function"==typeof o&&i.push([a,o])}}function PD(t,e,{key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function CD(t,e,{key:n=e}){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(n);if(Array.isArray(t))return this.attr(n,t);const e=[...this.attr(n)||[],t];return this.attr(n,e)}}function LD(t,e,{key:n=e}){t.prototype[e]=function(t,e){if(0===arguments.length)return this.attr(n);if(1===arguments.length&&"string"!=typeof t)return this.attr(n,t);const r=this.attr(n)||{};return r[t]=1===arguments.length||e,this.attr(n,r)}}function ND(t,e,n){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(e);if(Array.isArray(t))return this.attr(e,{items:t});if(Lr(t)&&(void 0!==t.title||void 0!==t.items))return this.attr(e,t);if(null===t||!1===t)return this.attr(e,t);const n=this.attr(e)||{},{items:r=[]}=n;return r.push(t),n.items=r,this.attr(e,n)}}function jD(t,e,{ctor:n}){t.prototype[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}function RD(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function ID(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:t}=r;"value"===t?PD(e,n,r):"array"===t?CD(e,n,r):"object"===t?LD(e,n,r):"node"===t?jD(e,n,r):"container"===t?RD(e,n,r):"mix"===t&&ND(e,n)}return e}}function DD(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,{type:"node",ctor:e}])))}const BD={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"}},FD=Object.assign(Object.assign({},BD),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),zD=Object.assign(Object.assign({},BD),{labelTransform:{type:"array"}});let GD=class extends bD{changeData(t){var e;const n=this.getRoot();if(n)return this.attr("data",t),(null===(e=this.children)||void 0===e?void 0:e.length)&&this.children.forEach((e=>{e.attr("data",t)})),null==n?void 0:n.render()}getView(){const t=this.getRoot(),{views:e}=t.getContext();if(null==e?void 0:e.length)return e.find((t=>t.key===this._key))}getScale(){var t;return null===(t=this.getView())||void 0===t?void 0:t.scale}getScaleByChannel(t){const e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null===(t=this.getView())||void 0===t?void 0:t.coordinate}getTheme(){var t;return null===(t=this.getView())||void 0===t?void 0:t.theme}getGroup(){const t=this._key;if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){const t=this.getGroup();t&&!t.isVisible()&&nj(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&ej(t)}};GD=Ce([ID(zD)],GD);let WD=class extends bD{changeData(t){const e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(!e)return;const{markState:n}=e,r=Array.from(n.keys()).find((t=>t.key===this.attr("key")));return n.get(r)}getScale(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;const r=null===(e=this.getRoot())||void 0===e?void 0:e.getView();if(r)return null===(n=null==r?void 0:r.scale)||void 0===n?void 0:n[t]}getGroup(){const t=this.attr("key");if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};WD=Ce([ID(FD)],WD);const $D="G2_CHART_KEY";class YD extends GD{constructor(t){const{container:e,canvas:n,renderer:r,plugins:i,lib:a,createCanvas:o}=t;super(Pe(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=V((()=>{this.forceFit()}),300),this._renderer=r||new x_,this._plugins=i||[],this._container=function(t){if(void 0===t){const t=document.createElement("div");return t[kD]=!0,t}if("string"==typeof t)return document.getElementById(t);return t}(e),this._emitter=new O_,this._context={library:Object.assign(Object.assign({},a),vD),emitter:this._emitter,canvas:n,createCanvas:o},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(((t,e)=>ZN(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e)))),[e,n,r]=function(){let t,e;return[new Promise(((n,r)=>{e=n,t=r})),e,t]}();return t.then(n).catch(r).then((()=>this._renderTrailing())),e}options(t){if(0===arguments.length)return ED(this);const{type:e}=t;return e&&(this._previousDefinedType=e),function(t,e,n,r,i){const a=[[null,t,SD(t,e,n,r,i)]];for(;a.length;){const[t,e,n]=a.shift();if(e)if(n){_D(e,n);const{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++){const n=t[i],o=r[i];a.push([e,o,n])}}else"function"==typeof t&&a.push([e,null,t])}else e.remove();else TD(t,n,r,i)}}(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){this.options();this.emit(E_.BEFORE_CLEAR),this._reset(),KN(0,this._context,!1),this.emit(E_.AFTER_CLEAR)}destroy(){this.options();this.emit(E_.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),KN(0,this._context,!0),this._container[kD]&&function(t){const e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(E_.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:t,height:e}=OD(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(E_.BEFORE_CHANGE_SIZE);const n=this.render();return n.then((()=>{this.emit(E_.AFTER_CHANGE_SIZE)})),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(E_.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",e);const n=this.render();return n.then((()=>{this.emit(E_.AFTER_CHANGE_SIZE)})),n}_create(){const{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter((t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t))];this._marks={};for(const t of e){const e=t.split(".").pop();class n extends WD{constructor(){super({},e)}}this._marks[e]=n,this[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}const n=["composition.view",...Object.keys(t).filter((t=>t.startsWith("composition.")&&"composition.mark"!==t))];this._compositions=Object.fromEntries(n.map((t=>{const e=t.split(".").pop();let n=class extends GD{constructor(){super({},e)}};return n=Ce([ID(DD(this._marks))],n),[e,n]})));for(const t of Object.values(this._compositions))ID(DD(this._compositions))(t);for(const t of n){const e=t.split(".").pop();this[e]=function(){const t=this._compositions[e];return this.type=null,this.append(t)}}}_reset(){const t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter((([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||t.includes(e)))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then((()=>{const t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)})).catch((t=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(t)})))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return e=>{this._rendering=!1,t(e)}}_computedOptions(){const t=this.options(),{key:e=$D}=t,{width:n,height:r,depth:i}=OD(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r,depth:i})}_createCanvas(){const{width:t,height:e}=OD(this.options(),this._container);this._plugins.push(new w_),this._plugins.forEach((t=>this._renderer.registerPlugin(t))),this._context.canvas=new gv({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){var t;null===(t=this._trailingResolve)||void 0===t||t.call(this,this),this._trailing=!0;return new Promise(((t,e)=>{this._trailingResolve=t,this._trailingReject=e}))}_bindAutoFit(){const t=this.options(),{autoFit:e}=t;this._hasBindAutoFit?e||this._unbindAutoFit():e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}const HD=gD(YD,Object.assign({},pD()));t.AREA_CLASS_NAME=oA,t.Academy=mE,t.Bin=As,t.BinX=_s,t.COMPONENT_CLASS_NAME=iA,t.Chart=HD,t.ChartEvent=E_,t.Classic=hE,t.ClassicDark=gE,t.Dark=pE,t.DiffY=Go,t.DodgeX=xi,t.ELEMENT_CLASS_NAME=eA,t.Filter=Cs,t.FlexX=ps,t.Group=as,t.GroupColor=cs,t.GroupX=os,t.GroupY=ss,t.Jitter=Do,t.JitterX=Bo,t.JitterY=Fo,t.LABEL_CLASS_NAME=aA,t.LABEL_LAYER_CLASS_NAME=tA,t.Light=fE,t.LinearAxis=qE,t.MAIN_LAYER_CLASS_NAME=JS,t.MASK_CLASS_NAME="mask",t.MaybeDefaultX=hi,t.MaybeDefaultY=di,t.MaybeFunctionAttribute=mi,t.MaybeGradient=bi,t.MaybeIdentityX=fi,t.MaybeIdentityY=ui,t.MaybeKey=oi,t.MaybeSeries=si,t.MaybeSize=ai,t.MaybeStackY=Qr,t.MaybeTitle=ei,t.MaybeTooltip=pi,t.MaybeTuple=yi,t.MaybeTupleX=li,t.MaybeTupleY=ci,t.MaybeVisualPosition=vi,t.MaybeZeroPadding=gi,t.MaybeZeroX=ni,t.MaybeZeroY=ri,t.MaybeZeroY1=Pn,t.MaybeZeroZ=ii,t.NormalizeY=wi,t.PLOT_CLASS_NAME=rA,t.Pack=Os,t.Runtime=YD,t.Sample=Ps,t.Select=Vo,t.SelectX=qo,t.SelectY=Uo,t.Selection=gm,t.SortColor=hs,t.SortX=fs,t.SortY=ds,t.StackEnter=ki,t.StackY=Zr,t.SymmetryY=zo,t.VIEW_CLASS_NAME=nA,t.corelib=pD,t.extend=gD,t.register=function(t,e){var n,r;t.startsWith("symbol.")?(n=t.split(".").pop(),r=e,my.set(n,r)):Object.assign(vD,{[t]:e})},t.render=ZN,t.renderToMountedElement=function(t,e={},n=()=>{},r=t=>{throw t}){var i;const{width:a=640,height:o=480}=t,s=UN(t),{group:c=new zg,emitter:l=new O_,library:u}=e;(null==c?void 0:c.parentElement)||Or("renderToMountedElement can't render chart to unmounted group.");const f=pm(c);return e.group=c,e.emitter=l,e.canvas=e.canvas||(null===(i=null==c?void 0:c.ownerDocument)||void 0===i?void 0:i.defaultView),l.emit(E_.BEFORE_RENDER),bN(Object.assign(Object.assign({},s),{width:a,height:o}),f,e).then((()=>{var t;null===(t=e.canvas)||void 0===t||t.requestAnimationFrame((()=>{l.emit(E_.AFTER_RENDER),null==n||n()}))})).catch((t=>{null==r||r(t)})),c},t.select=pm,Object.defineProperty(t,"__esModule",{value:!0})}));