@antv/g2 5.3.4-beta.2 → 5.3.4-beta.3

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.
package/dist/g2.min.js CHANGED
@@ -64,4 +64,4 @@ function VT(t,e){var n=e.cx,r=void 0===n?0:n,i=e.cy,o=void 0===i?0:i,a=e.r;t.arc
64
64
  * @date 5/9/2025, 8:22:49 AM
65
65
  * @author AntVis
66
66
  * @docs https://g.antv.antgroup.com/
67
- */sN.tag="Dragndrop";var cN=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return hl(this,e),(t=wl(this,e)).name="dragndrop",t.options=n,t}return Ml(e,t),pl(e,[{key:"init",value:function(){this.addRenderingPlugin(new sN(fl({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)}}])}(nu),lN=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],o=this._events["*"]||[],a=function(r){for(var i=r.length,o=0;o<i;o++)if(r[o]){var a=r[o],s=a.callback;a.once&&(r.splice(o,1),0===r.length&&delete e._events[t],i--,o--),s.apply(e,n)}};a(i),a(o)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),uN=lN;const fN={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"},hN={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow};class dN extends Error{constructor(t,e,n){super(t),this.position=e,this.token=n,this.name="ExpressionError"}}var pN;!function(t){t[t.STRING=0]="STRING",t[t.NUMBER=1]="NUMBER",t[t.BOOLEAN=2]="BOOLEAN",t[t.NULL=3]="NULL",t[t.IDENTIFIER=4]="IDENTIFIER",t[t.OPERATOR=5]="OPERATOR",t[t.FUNCTION=6]="FUNCTION",t[t.DOT=7]="DOT",t[t.BRACKET_LEFT=8]="BRACKET_LEFT",t[t.BRACKET_RIGHT=9]="BRACKET_RIGHT",t[t.PAREN_LEFT=10]="PAREN_LEFT",t[t.PAREN_RIGHT=11]="PAREN_RIGHT",t[t.COMMA=12]="COMMA",t[t.QUESTION=13]="QUESTION",t[t.COLON=14]="COLON",t[t.DOLLAR=15]="DOLLAR"}(pN||(pN={}));const gN=new Set([32,9,10,13]),vN=new Set([43,45,42,47,37,33,38,124,61,60,62]),yN=new Map([["true",pN.BOOLEAN],["false",pN.BOOLEAN],["null",pN.NULL]]),mN=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),bN=new Map([[46,pN.DOT],[91,pN.BRACKET_LEFT],[93,pN.BRACKET_RIGHT],[40,pN.PAREN_LEFT],[41,pN.PAREN_RIGHT],[44,pN.COMMA],[63,pN.QUESTION],[58,pN.COLON],[36,pN.DOLLAR]]),xN=new Map;for(const[t,e]of bN.entries())xN.set(t,{type:e,value:String.fromCharCode(t)});function wN(t){return t>=48&&t<=57}function kN(t){return t>=97&&t<=122||t>=65&&t<=90||95===t}function MN(t){return kN(t)||wN(t)}function EN(t){return vN.has(t)}var ON;!function(t){t[t.Program=0]="Program",t[t.Literal=1]="Literal",t[t.Identifier=2]="Identifier",t[t.MemberExpression=3]="MemberExpression",t[t.CallExpression=4]="CallExpression",t[t.BinaryExpression=5]="BinaryExpression",t[t.UnaryExpression=6]="UnaryExpression",t[t.ConditionalExpression=7]="ConditionalExpression"}(ON||(ON={}));const _N=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),SN={type:ON.Literal,value:null},AN={type:ON.Literal,value:!0},TN={type:ON.Literal,value:!1},PN=t=>{let e=0;const n=t.length,r=()=>e>=n?null:t[e],i=()=>t[e++],o=t=>{const e=r();return null!==e&&e.type===t},a=t=>t.type===pN.OPERATOR?_N.get(t.value)||-1:t.type===pN.DOT||t.type===pN.BRACKET_LEFT?9:t.type===pN.QUESTION?1:-1,s=t=>{let n,a;if(i().type===pN.DOT){if(!o(pN.IDENTIFIER)){const t=r();throw new dN("Expected property name",e,t?t.value:"<end of input>")}const t=i();n={type:ON.Identifier,name:t.value},a=!1}else{if(n=l(0),!o(pN.BRACKET_RIGHT)){const t=r();throw new dN("Expected closing bracket",e,t?t.value:"<end of input>")}i(),a=!0}return{type:ON.MemberExpression,object:t,property:n,computed:a}},c=()=>{const t=r();if(!t)throw new dN("Unexpected end of input",e,"<end of input>");if(t.type===pN.OPERATOR&&("!"===t.value||"-"===t.value)){i();const e=c();return{type:ON.UnaryExpression,operator:t.value,argument:e,prefix:!0}}switch(t.type){case pN.NUMBER:return i(),{type:ON.Literal,value:Number(t.value)};case pN.STRING:return i(),{type:ON.Literal,value:t.value};case pN.BOOLEAN:return i(),"true"===t.value?AN:TN;case pN.NULL:return i(),SN;case pN.IDENTIFIER:return i(),{type:ON.Identifier,name:t.value};case pN.FUNCTION:return(()=>{const t=i(),n=[];if(!o(pN.PAREN_LEFT)){const t=r();throw new dN("Expected opening parenthesis after function name",e,t?t.value:"<end of input>")}for(i();;){if(o(pN.PAREN_RIGHT)){i();break}if(!r()){const t=r();throw new dN("Expected closing parenthesis",e,t?t.value:"<end of input>")}if(n.length>0){if(!o(pN.COMMA)){const t=r();throw new dN("Expected comma between function arguments",e,t?t.value:"<end of input>")}i()}const t=l(0);n.push(t)}return{type:ON.CallExpression,callee:{type:ON.Identifier,name:t.value},arguments:n}})();case pN.PAREN_LEFT:{i();const t=l(0);if(!o(pN.PAREN_RIGHT)){const t=r();throw new dN("Expected closing parenthesis",e,t?t.value:"<end of input>")}return i(),t}default:throw new dN(`Unexpected token: ${t.type}`,e,t.value)}},l=(u=0)=>{let f=c();for(;e<n;){const n=t[e],c=a(n);if(c<=u)break;if(n.type!==pN.QUESTION)if(n.type!==pN.OPERATOR){if(n.type!==pN.DOT&&n.type!==pN.BRACKET_LEFT)break;f=s(f)}else{i();const t=l(c);f={type:ON.BinaryExpression,operator:n.value,left:f,right:t}}else{i();const t=l(0);if(!o(pN.COLON)){const t=r();throw new dN("Expected : in conditional expression",e,t?t.value:"<end of input>")}i();const n=l(0);f={type:ON.ConditionalExpression,test:f,consequent:t,alternate:n}}}return f},u=l();return{type:ON.Program,body:u}},NN=(t,e,n)=>{let r=e;n&&(r={...e,context:{...e.context,...n}});const i=t=>{switch(t.type){case ON.Literal:return(t=>t.value)(t);case ON.Identifier:return(t=>{if(!(t.name in r.context))throw new dN(`Undefined variable: ${t.name}`);return r.context[t.name]})(t);case ON.MemberExpression:return(t=>{const e=i(t.object);if(null==e)throw new dN("Cannot access property of null or undefined");return e[t.computed?i(t.property):t.property.name]})(t);case ON.CallExpression:return(t=>{const e=r.functions[t.callee.name];if(!e)throw new dN(`Undefined function: ${t.callee.name}`);return e(...t.arguments.map((t=>i(t))))})(t);case ON.BinaryExpression:return(t=>{if("&&"===t.operator){const e=i(t.left);return e?i(t.right):e}if("||"===t.operator)return i(t.left)||i(t.right);const e=i(t.left),n=i(t.right);switch(t.operator){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n;case"%":return e%n;case"===":return e===n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n;default:throw new dN(`Unknown operator: ${t.operator}`)}})(t);case ON.UnaryExpression:return(t=>{const e=i(t.argument);if(t.prefix)switch(t.operator){case"!":return!e;case"-":if("number"!=typeof e)throw new dN(`Cannot apply unary - to non-number: ${e}`);return-e;default:throw new dN(`Unknown operator: ${t.operator}`)}throw new dN(`Postfix operators are not supported: ${t.operator}`)})(t);case ON.ConditionalExpression:return(t=>{const e=i(t.test);return i(e?t.consequent:t.alternate)})(t);default:throw new dN(`Evaluation error: Unsupported node type: ${t.type}`)}};return i(t.body)};const CN=["style","encode","labels","children"],LN=gM((t=>{const e=function(t){const e=(t=>{const e=t,n=e.length,r=new Array(Math.ceil(n/3));let i=0,o=0;function a(t){const r=o+1;o++;let i="",a=!1;for(;o<n;){const n=e.charCodeAt(o);if(n===t)return a||(i=e.substring(r,o)),o++,{type:pN.STRING,value:i};92===n?(a||(i=e.substring(r,o),a=!0),o++,i+=e[o]):a&&(i+=e[o]),o++}throw new dN(`Unterminated string starting with ${String.fromCharCode(t)}`,o,e.substring(Math.max(0,o-10),o))}function s(){const t=o;for(45===e.charCodeAt(o)&&o++;o<n&&wN(e.charCodeAt(o));)o++;if(o<n&&46===e.charCodeAt(o))for(o++;o<n&&wN(e.charCodeAt(o));)o++;const r=e.slice(t,o);return{type:pN.NUMBER,value:r}}function c(){o++;const t=o;if(o<n&&kN(e.charCodeAt(o)))for(o++;o<n&&MN(e.charCodeAt(o));)o++;const r=e.slice(t,o);return{type:pN.FUNCTION,value:r}}function l(){const t=o++;for(;o<n&&MN(e.charCodeAt(o));)o++;const r=e.slice(t,o),i=yN.get(r);return i?{type:i,value:r}:{type:pN.IDENTIFIER,value:r}}function u(){if(o+2<n){const t=e.substring(o,o+3);if(mN.has(t))return o+=3,{type:pN.OPERATOR,value:t}}if(o+1<n){const t=e.substring(o,o+2);if(mN.has(t))return o+=2,{type:pN.OPERATOR,value:t}}const t=e[o];if(mN.has(t))return o++,{type:pN.OPERATOR,value:t};throw new dN(`Unknown operator at position ${o}: ${e.substring(o,o+1)}`,o,e.substring(Math.max(0,o-10),o))}for(;o<n;){const t=e.charCodeAt(o);if(f=t,gN.has(f)){o++;continue}const h=xN.get(t);if(h)r[i++]=h,o++;else if(34!==t&&39!==t)if(wN(t)||45===t&&o+1<n&&wN(e.charCodeAt(o+1)))r[i++]=s();else if(64!==t)if(kN(t))r[i++]=l();else{if(!EN(t))throw new dN(`Unexpected character: ${e[o]}`,o,e.substring(Math.max(0,o-10),o));r[i++]=u()}else r[i++]=c();else r[i++]=a(t)}var f;return i===r.length?r:r.slice(0,i)})(t),n=PN(e),r=((t={},e={})=>({context:t,functions:e}))({},hN);return(t={})=>NN(n,r,t)}(t);return(...t)=>{const n=Array.from({length:t.length},((t,e)=>String.fromCharCode(97+e))),r=Object.fromEntries(t.map(((t,e)=>[n[e],t])));return e(Object.assign(Object.assign({},r),{global:Object.assign({},r)}))}}),(t=>t),128);function jN(t,e=!0){if(Array.isArray(t))return t.map(((n,r)=>jN(t[r],e)));if("object"==typeof t&&t)return function(t,e){void 0===e&&(e=nt);var n={};return w(t)&&!b(t)&&Object.keys(t).forEach((function(r){n[r]=e(t[r],r)})),n}(t,((t,n)=>e&&CN.includes(n)?jN(t,"children"===n):e?t:jN(t,!1)));if("string"==typeof t){const e=t.trim();if(e.startsWith("{")&&e.endsWith("}"))return LN(e.slice(1,-1))}return t}const RN=[["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 IN={}.toString,DN=function(t,e){return IN.call(t)==="[object "+e+"]"},BN=function(t){return Array.isArray?Array.isArray(t):DN(t,"Array")},FN=function(t){return"object"==typeof t&&null!==t},zN=function(t){if(!FN(t)||!DN(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function $N(t,e,n,r){for(var i in n=n||0,r=r||5,e)if(e.hasOwnProperty(i)){var o=e[i];null!==o&&zN(o)?(zN(t[i])||(t[i]={}),n<r?$N(t[i],o,n+1,r):t[i]=e[i]):BN(o)?(t[i]=[],t[i]=t[i].concat(o)):void 0!==o&&(t[i]=o)}}var WN=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)$N(t,e[r]);return t},GN=function(t){return t};function HN(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):GN}function YN(t){return t instanceof Float32Array||t instanceof Array}var qN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},VN=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function UN(t,e,n){for(;t<e;)t+=2*Math.PI;for(;t>n;)t-=2*Math.PI;return t}var XN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},ZN=function(t,e,n,r,i){var o,a,s=XN(t,2),c=s[0],l=s[1],u=ht();return a=[c,l],(o=u)[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=a[0],o[7]=a[1],o[8]=1,o},KN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},QN=function(t,e,n,r,i){var o=new po({range:[e,e+r]}),a=new po({range:[n,n+i]});return{transform:function(t){var e=KN(t,2),n=e[0],r=e[1];return[o.map(n),a.map(r)]},untransform:function(t){var e=KN(t,2),n=e[0],r=e[1];return[o.invert(n),a.invert(r)]}}},JN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},tC=function(t,e,n,r,i){return(0,JN(t,1)[0])(e,n,r,i)},eC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},nC=function(t,e,n,r,i){return eC(t,1)[0]},rC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},iC=function(t,e,n,r,i){var o=rC(t,4),a=o[0],s=o[1],c=o[2],l=o[3],u=new po({range:[c,l]}),f=new po({range:[a,s]}),h=i/r,d=h>1?1:h,p=h>1?1/h:1;return{transform:function(t){var e=rC(t,2),n=e[0],r=e[1],i=f.map(n),o=u.map(r);return[.5*(o*Math.cos(i)*d)+.5,.5*(o*Math.sin(i)*p)+.5]},untransform:function(t){var e=rC(t,2),n=e[0],r=e[1],i=2*(n-.5)/d,o=2*(r-.5)/p,c=Math.sqrt(Math.pow(i,2)+Math.pow(o,2)),l=UN(Math.atan2(o,i),a,s);return[f.invert(l),u.invert(c)]}}},oC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},aC=function(t,e,n,r,i){return{transform:function(t){var e=oC(t,2),n=e[0];return[e[1],n]},untransform:function(t){var e=oC(t,2),n=e[0];return[e[1],n]}}},sC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},cC=function(t,e,n,r,i){var o,a,s=sC(t,2),c=s[0],l=s[1],u=ht();return a=[c,l],(o=u)[0]=a[0],o[1]=0,o[2]=0,o[3]=0,o[4]=a[1],o[5]=0,o[6]=0,o[7]=0,o[8]=1,o},lC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},uC=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},fC=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return cC.apply(void 0,uC([[-1,-1]],lC(e),!1))},hC=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return cC.apply(void 0,uC([[-1,1]],lC(e),!1))},dC=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return cC.apply(void 0,uC([[1,-1]],lC(e),!1))},pC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},gC=function(t,e,n,r,i){var o=pC(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}(ht(),o)},vC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},yC=function(t,e,n,r,i){var o=vC(t,4),a=o[0],s=o[1],c=o[2],l=(o[3]-c)/((s-0)/(2*Math.PI)+1),u=l/(2*Math.PI),f=new po({range:[c,c+.99*l]}),h=new po({range:[a,s]}),d=i/r,p=d>1?1:d,g=d>1?1/d:1;return{transform:function(t){var e=vC(t,2),n=e[0],r=e[1],i=h.map(n),o=f.map(r);return[.5*(Math.cos(i)*(u*i+o)*p)+.5,.5*(Math.sin(i)*(u*i+o)*g)+.5]},untransform:function(t){var e=vC(t,2),n=e[0],r=e[1],i=2*(n-.5)/p,o=2*(r-.5)/g,c=Math.sqrt(Math.pow(i,2)+Math.pow(o,2)),d=UN(Math.atan2(o,i)+Math.floor(c/l)*Math.PI*2,a,s),v=c-u*d;return[h.invert(d),f.invert(v)]}}},mC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},bC=function(t,e,n,r,i){var o=mC(t,4),a=o[0],s=o[1],c=o[2],l=o[3],u=new po({range:[c,l]});return{transform:function(t){for(var e=[],n=t.length,r=new go({domain:new Array(n).fill(0).map((function(t,e){return e})),range:[a,s]}),i=0;i<n;i++){var o=t[i],c=r.map(i),l=u.map(o);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}}},xC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function wC(t){return 1/Math.tan(t)}var kC=function(t,e,n,r,i){var o=wC(xC(t,1)[0]);return{transform:function(t){var e=xC(t,2),n=e[0],r=e[1];return[n+r*o,r]},untransform:function(t){var e=xC(t,2),n=e[0],r=e[1];return[n-r*o,r]}}},MC=function(t,e,n,r,i){var o=wC(xC(t,1)[0]);return{transform:function(t){var e=xC(t,2),n=e[0];return[n,e[1]+n*o]},untransform:function(t){var e=xC(t,2),n=e[0];return[n,e[1]-n*o]}}},EC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function OC(t,e,n,r,i){var o=t<e,a=(o?e-r:i-e)||i-r,s=o?-1:1;return s*a*(n+1)/(n+a/((t-e)*s))+e}function _C(t,e,n,r,i){var o=t<e,a=(o?e-r:i-e)||i-r;return a/(a*(n+1)/(t-e)-n*(o?-1:1))+e}function SC(t,e,n){return n?new po({range:[0,1],domain:[0,e]}).map(t):t}var AC=function(t,e,n,r,i){var o=EC(t,3),a=o[0],s=o[1],c=o[2],l=SC(a,r,void 0!==c&&c);return{transform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[OC(n,l,s,0,1),r]},untransform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[_C(n,l,s,0,1),r]}}},TC=function(t,e,n,r,i){var o=EC(t,3),a=o[0],s=o[1],c=o[2],l=SC(a,i,void 0!==c&&c);return{transform:function(t){var e=EC(t,2);return[e[0],OC(e[1],l,s,0,1)]},untransform:function(t){var e=EC(t,2);return[e[0],_C(e[1],l,s,0,1)]}}},PC=function(t,e,n,r,i){var o=EC(t,5),a=o[0],s=o[1],c=o[2],l=o[3],u=o[4],f=void 0!==u&&u,h=SC(a,r,f),d=SC(s,i,f);return{transform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[OC(n,h,c,0,1),OC(r,d,l,0,1)]},untransform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[_C(n,h,c,0,1),_C(r,d,l,0,1)]}}},NC=function(t,e,n,r,i){var o=EC(t,5),a=o[0],s=o[1],c=o[2],l=o[3],u=o[4],f=void 0!==u&&u,h=new po({range:[0,r]}),d=new po({range:[0,i]}),p=f?a:h.map(a),g=f?s:d.map(s);return{transform:function(t){var e=EC(t,2),n=e[0],r=e[1],i=h.map(n)-p,o=d.map(r)-g,a=Math.sqrt(i*i+o*o);if(a>c)return[n,r];var s=OC(a,0,l,0,c),u=Math.atan2(o,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=EC(t,2),n=e[0],r=e[1],i=h.map(n)-p,o=d.map(r)-g,a=Math.sqrt(i*i+o*o);if(a>c)return[n,r];var s=_C(a,0,l,0,c),u=Math.atan2(o,i),f=p+s*Math.cos(u),v=g+s*Math.sin(u);return[h.invert(f),d.invert(v)]}}},CC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},LC=function(t,e,n,r,i,o,a){var s=new po({range:[e,e+i]}),c=new po({range:[n,n+o]}),l=new po({range:[r,r+a]});return{transform:function(t){var e=CC(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=CC(t,3),n=e[0],r=e[1],i=e[2];return[s.invert(n),c.invert(r),l.invert(i)]}}},jC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},RC=function(t,e,n,r,i,o,a){var s=jC(t,3),c=s[0],l=s[1],u=s[2];return At(pt(),[c,l,u])},IC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},DC=function(t,e,n,r,i,o,a){return{transform:function(t){var e=IC(t,3),n=e[0];return[e[1],n,e[2]]},untransform:function(t){var e=IC(t,3),n=e[0];return[e[1],n,e[2]]}}},BC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},FC=function(t,e,n,r,i,o,a){var s=BC(t,3),c=s[0],l=s[1],u=s[2];return Tt(pt(),[c,l,u])},zC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},$C=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},WC=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.")},GC=function(){function t(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:QN,translate:ZN,custom:tC,matrix:nC,polar:iC,transpose:aC,scale:cC,"shear.x":kC,"shear.y":MC,reflect:fC,"reflect.x":hC,"reflect.y":dC,rotate:gC,helix:yC,parallel:bC,fisheye:PC,"fisheye.x":AC,"fisheye.y":TC,"fisheye.circular":NC},this.update(t)}return t.prototype.update=function(t){this.options=WN({},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:$C($C([],zC(n),!1),[$C([],zC(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?$C([],zC(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},o=[],a=[],s=function(t,e){return void 0===e&&(e=!0),a.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]],o=t(i);n.push.apply(n,VN([],qN(o),!1))}return n}}(t):t)};try{for(var c=WC(r),l=c.next();!l.done;l=c.next()){var u=zC(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,y=p.width,m=p.height,b=d($C([],zC(h),!1),g,v,y,m);if(YN(b))o.push(b);else{if(o.length)s(this.createMatrixTransform(o,t)),o.splice(0,o.length);s(i(b)||GN,"parallel"!==f)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}o.length&&s(this.createMatrixTransform(o,t));return HN.apply(void 0,$C([],zC(a),!1))},t.prototype.createMatrixTransform=function(t,e){var n=ht();return e&&t.reverse(),t.forEach((function(t){return dt(n,n,t)})),e&&function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=u*a-s*l,h=-u*o+s*c,d=l*o-a*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*a)*p,t[3]=h*p,t[4]=(u*n-i*c)*p,t[5]=(-s*n+i*o)*p,t[6]=d*p,t[7]=(-l*n+r*c)*p,t[8]=(a*n-r*o)*p)}(n,function(t){var e=new ft(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}(n)),function(t){var e=[t[0],t[1],1];return fe(e,e,n),[e[0],e[1]]}},t}(),HC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},YC=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},qC=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.")},VC=function(){function t(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:LC,translate3D:RC,scale3D:FC,transpose3D:DC},this.update(t)}return t.prototype.update=function(t){this.options=WN({},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:YC(YC([],HC(n),!1),[YC([],HC(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?YC([],HC(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},o=[],a=[],s=function(t,e){return void 0===e&&(e=!0),a.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]],o=t(i);n.push.apply(n,VN([],qN(o),!1))}return n}}(t):t)};try{for(var c=qC(r),l=c.next();!l.done;l=c.next()){var u=HC(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,y=p.z,m=p.width,b=p.height,x=p.depth,w=d(YC([],HC(h),!1),g,v,y,m,b,x);if(YN(w))o.push(w);else{if(o.length)s(this.createMatrixTransform(o,t)),o.splice(0,o.length);s(i(w)||GN,!0)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}o.length&&s(this.createMatrixTransform(o,t));return HN.apply(void 0,YC([],HC(a),!1))},t.prototype.createMatrixTransform=function(t,e){var n=pt();return e&&t.reverse(),t.forEach((function(t){return Ut(n,n,t)})),e&&wt(n,gt(n)),function(t){var e=[t[0],t[1],t[2],1];return me(e,e,n),[e[0],e[1],e[2]]}},t}();function UC(t){return(e,...n)=>Q({},t(e,...n),e)}function XC(t){return(e,...n)=>Q({},e,t(e,...n))}function ZC(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=Le(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}return t}const KC=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map((t=>{var{data:e,x:s,y:c,width:l,height:u}=t,f=Le(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},f),{data:ZC(e,a),x:null!=s?s:n,y:null!=c?c:r,width:null!=l?l:i,height:null!=u?u:o})}))};KC.props={};const QC=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map((()=>1)),padding:i=0,data:o}=t,[a,s,c,l]="col"===n?["y","height","width","x"]:["x","width","height","y"],u=r.reduce(((t,e)=>t+e)),f=t[s]-i*(e.length-1),h=r.map((t=>f*(t/u))),d=[];let p=t[a]||0;for(let n=0;n<h.length;n+=1){const r=e[n],{data:u}=r,f=Le(r,["data"]),g=ZC(u,o);d.push(Object.assign({[a]:p,[s]:h[n],[l]:t[l]||0,[c]:t[c],data:g},f)),p+=h[n]+i}return d};QC.props={};const JC=()=>t=>{const{children:e}=t,n=Le(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:o={},legend:a={},encode:s={},transform:c=[]}=n,l=Le(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=Le(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:ZC(e,r),scale:Q({},i,n),encode:Q({},s,f),transform:[...c,...h],axis:!(!l||!o)&&Q({},o,l),legend:!(!u||!a)&&Q({},a,u)},d)}));return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};JC.props={};const tL=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:o,paddingRight:a,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,margin:g,marginLeft:v,marginBottom:y,marginTop:m,marginRight:b,data:x,coordinate:w,theme:k,component:M,interaction:E,x:O,y:_,z:S,key:A,frame:T,labelTransform:P,parentKey:N,clip:C,viewStyle:L,title:j}=e,R=Le(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:O,y:_,z:S,key:A,width:n,height:r,depth:i,padding:l,paddingLeft:o,paddingRight:a,paddingTop:s,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,paddingBottom:c,theme:k,coordinate:w,component:M,interaction:E,frame:T,labelTransform:P,margin:g,marginLeft:v,marginBottom:y,marginTop:m,marginRight:b,parentKey:N,clip:C,style:L},!t&&{title:j}),{marks:[Object.assign(Object.assign(Object.assign({},R),{key:`${A}-0`,data:x}),t&&{title:j})]})]};tL.props={};class eL{constructor(t){this.$value=t}static of(t){return new eL(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}const nL=UC((t=>{const{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:o,y:a}=e,s=(t,e)=>{var o;if(void 0===t||!i)return{};const a=Jn(n,(e=>e[t])),s=(null===(o=null==r?void 0:r[e])||void 0===o?void 0:o.domain)||Array.from(a.keys()),c=s.map((t=>a.has(t)?a.get(t).length:1));return{domain:s,flex:c}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===o?null:{position:"top"}},void 0===o&&{paddingInner:0}),s(o,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"right"}},void 0===a&&{paddingInner:0}),s(a,"y"))}}})),rL=XC((t=>{const{data:e,scale:n,legend:r}=t,i=[t];let o,a,s;for(;i.length;){const t=i.shift(),{children:e,encode:n={},scale:r={},legend:c={}}=t,{color:l}=n,{color:u}=r,{color:f}=c;void 0!==l&&(o=l),void 0!==u&&(a=u),void 0!==f&&(s=f),Array.isArray(e)&&i.push(...e)}const c="string"==typeof o?o:"",[l,u]=(()=>{var t;const r=null===(t=null==n?void 0:n.color)||void 0===t?void 0:t.domain;if(void 0!==r)return[r];if(void 0===o)return[void 0];const i="function"==typeof o?o:t=>t[o],a=e.map(i);return a.some((t=>"number"==typeof t))?[Vn(a)]:[Array.from(new Set(a)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=l?l:[]}},scale:{color:Q({},a,{domain:l,type:u})}},void 0===r&&{legend:{color:Q({title:c},s)}})})),iL=UC((()=>({animate:{enterType:"fadeIn"}}))),oL=XC((()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}}))),aL=XC((()=>({type:"cell"}))),sL=XC((t=>{const{data:e}=t,n={type:"custom",callback:()=>{const{data:e,encode:n}=t,{x:r,y:i}=n,o=r?Array.from(new Set(e.map((t=>t[r])))):[],a=i?Array.from(new Set(e.map((t=>t[i])))):[];return(()=>{if(o.length&&a.length){const t=[];for(const e of o)for(const n of a)t.push({[r]:e,[i]:n});return t}return o.length?o.map((t=>({[r]:t}))):a.length?a.map((t=>({[i]:t}))):void 0})()}};return{data:{type:"inline",value:e,transform:[n]}}})),cL=XC(((t,e=lL,n=fL,r=hL,i={})=>{const{data:o,encode:a,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:h}=t,{value:d}=o,{x:p,y:g}=a,{color:v}=c,{domain:y}=v;return{children:(t,o,a)=>{const{x:c,y:v}=o,{paddingLeft:m,paddingTop:b,marginLeft:x,marginTop:w}=a,{domain:k}=c.getOptions(),{domain:M}=v.getOptions(),E=aa(t),O=t.map(e),_=t.map((({x:t,y:e})=>[c.invert(t),v.invert(e)])),S=_.map((([t,e])=>n=>{const{[p]:r,[g]:i}=n;return(void 0===p||r===t)&&(void 0===g||i===e)})),A=S.map((t=>d.filter(t))),T=f?vr(A,(t=>t.length)):void 0,P=_.map((([t,e])=>({columnField:p,columnIndex:k.indexOf(t),columnValue:t,columnValuesLength:k.length,rowField:g,rowIndex:M.indexOf(e),rowValue:e,rowValuesLength:M.length}))),N=P.map((t=>Array.isArray(s)?s:[s(t)].flat(1)));return E.flatMap((t=>{const[e,o,a,s]=O[t],c=P[t],f=A[t];return N[t].map((v=>{var k,M,{scale:E,key:O,facet:_=!0,axis:S={},legend:A={}}=v,P=Le(v,["scale","key","facet","axis","legend"]);const N=(null===(k=null==E?void 0:E.y)||void 0===k?void 0:k.guide)||S.y,C=(null===(M=null==E?void 0:E.x)||void 0===M?void 0:M.guide)||S.x,L={x:{tickCount:p?5:void 0},y:{tickCount:g?5:void 0}},j=_?f:0===f.length?[]:d,R={color:{domain:y}},I={x:dL(C,n)(c,j),y:dL(N,r)(c,j)};return Object.assign(Object.assign({key:`${O}-${t}`,data:j,margin:0,x:e+m+l+x,y:o+b+u+w,parentKey:h,width:a,height:s,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!j.length,dataDomain:T,scale:Q(L,E,R),axis:Q({},S,I),legend:!1},P),i)}))}))}}}));function lL(t){const{points:e}=t;return Cs(e)}function uL(t,e){return e.length?Q({title:!1,tick:null,label:null},t):Q({title:!1,tick:null,label:null,grid:null},t)}function fL(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:o,columnValuesLength:a}=e;if(r!==i-1)return uL(t,n);const s=o===a-1&&void 0,c=n.length?void 0:null;return Q({title:s,grid:c},t)}}function hL(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(0!==i)return uL(t,n);const o=0===r&&void 0,a=n.length?void 0:null;return Q({title:o,grid:a},t)}}function dL(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}const pL=()=>t=>[eL.of(t).call(aL).call(rL).call(iL).call(nL).call(oL).call(sL).call(cL).value()];pL.props={};const gL=UC((t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),vL=XC((t=>{const{data:e,children:n,x:r=0,y:i=0,key:o}=t;return{children:(t,a,s)=>{const{x:c,y:l}=a,{paddingLeft:u,paddingTop:f,marginLeft:h,marginTop:d}=s,{domain:p}=c.getOptions(),{domain:g}=l.getOptions(),v=aa(t),y=t.map((({points:t})=>Cs(t))),m=t.map((({x:t,y:e})=>[c.invert(t),l.invert(e)])),b=m.map((([t,e])=>({columnField:t,columnIndex:p.indexOf(t),columnValue:t,columnValuesLength:p.length,rowField:e,rowIndex:g.indexOf(e),rowValue:e,rowValuesLength:g.length}))),x=b.map((t=>Array.isArray(n)?n:[n(t)].flat(1)));return v.flatMap((t=>{const[n,a,s,c]=y[t],[l,p]=m[t],g=b[t];return x[t].map((v=>{var y,m;const{scale:b,key:x,encode:w,axis:k,interaction:M}=v,E=Le(v,["scale","key","encode","axis","interaction"]),O=null===(y=null==b?void 0:b.y)||void 0===y?void 0:y.guide,_={x:mL(null===(m=null==b?void 0:b.x)||void 0===m?void 0:m.guide)(g,e),y:bL(O)(g,e)};return Object.assign({data:e,parentKey:o,key:`${x}-${t}`,x:n+u+r+h,y:a+f+i+d,width:s,height:c,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Q({x:{facet:!1},y:{facet:!1}},b),axis:Q({x:{tickCount:5},y:{tickCount:5}},k,_),legend:!1,encode:Q({},w,{x:l,y:p}),interaction:Q({},M,{legendFilter:!1})},E)}))}))}}})),yL=XC((t=>{const{encode:e}=t,n=Le(t,["encode"]),{position:r=[],x:i=r,y:o=[...r].reverse()}=e,a=Le(e,["position","x","y"]),s=[];for(const t of[i].flat(1))for(const e of[o].flat(1))s.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},a),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[i].flat(1).length&&{x:{paddingInner:0}}),1===[o].flat(1).length&&{y:{paddingInner:0}})})}));function mL(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return uL(t,n)}}function bL(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{columnIndex:r}=e;if(0!==r)return uL(t,n)}}const xL=()=>t=>[eL.of(t).call(aL).call(rL).call(vL).call(yL).call(iL).call(oL).call(gL).value()],wL=UC((t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),kL=UC((t=>({coordinate:{type:"polar"}}))),ML=t=>{const{encode:e}=t,n=Le(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function EL(t){return t=>null}function OL(t){const{points:e}=t,[n,r,i,o]=e,a=As(n,o),s=_s(n,o),c=Ns(s,_s(r,i)),l=1/Math.sin(c/2),u=a/(1+l),f=u*Math.sqrt(2),[h,d]=i,p=Ps(s)+c/2,g=u*l;return[h+g*Math.sin(p)-f/2,d-g*Math.cos(p)-f/2,f,f]}const _L=()=>t=>[eL.of(t).call(aL).call(ML).call(rL).call(kL).call(sL).call(cL,OL,EL,EL,{frame:!1}).call(iL).call(oL).call(wL).value()];function SL(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 AL=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:o="ease-in-out-sine"}=t,a=e.length;if(!Array.isArray(e)||0===a)return[];const{key:s}=e[0],c=e.map((t=>Object.assign(Object.assign({},t),{key:s}))).map((t=>function(t,e,n){const r=[t];for(;r.length;){const t=r.pop();t.animate=Q({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});const{children:i}=t;Array.isArray(i)&&r.push(...i)}return t}(t,n,o)));return function*(){let t,e=0;for(;"infinite"===r||e<r;){const[n,r]=SL(i,e,a);for(let e=n;e<r;e+=1){const n=Math.abs(e);t!==n&&(yield c[n]),t=n}e++}}};AL.props={};const TL=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:s,state:c}=t,l=Le(t,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},l),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:c}]})]};TL.props={};var PL=1e-6,NL=Math.PI,CL=NL/2,LL=NL/4,jL=2*NL,RL=180/NL,IL=NL/180,DL=Math.abs,BL=Math.atan,FL=Math.atan2,zL=Math.cos,$L=Math.ceil,WL=Math.exp,GL=Math.log,HL=Math.pow,YL=Math.sin,qL=Math.sign||function(t){return t>0?1:t<0?-1:0},VL=Math.sqrt,UL=Math.tan;function XL(t){return t>1?0:t<-1?NL:Math.acos(t)}function ZL(t){return t>1?CL:t<-1?-CL:Math.asin(t)}function KL(){}function QL(t,e){t&&tj.hasOwnProperty(t.type)&&tj[t.type](t,e)}var JL={Feature:function(t,e){QL(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)QL(n[r].geometry,e)}},tj={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){ej(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ej(n[r],e,0)},Polygon:function(t,e){nj(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)nj(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)QL(n[r],e)}};function ej(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function nj(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)ej(t[n],e,1);e.polygonEnd()}function rj(t,e){t&&JL.hasOwnProperty(t.type)?JL[t.type](t,e):QL(t,e)}function ij(t){return[FL(t[1],t[0]),ZL(t[2])]}function oj(t){var e=t[0],n=t[1],r=zL(n);return[r*zL(e),r*YL(e),YL(n)]}function aj(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function sj(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function cj(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function lj(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function uj(t){var e=VL(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function fj(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function hj(t,e){return DL(t)>NL&&(t-=Math.round(t/jL)*jL),[t,e]}function dj(t,e,n){return(t%=jL)?e||n?fj(gj(t),vj(e,n)):gj(t):e||n?vj(e,n):hj}function pj(t){return function(e,n){return DL(e+=t)>NL&&(e-=Math.round(e/jL)*jL),[e,n]}}function gj(t){var e=pj(t);return e.invert=pj(-t),e}function vj(t,e){var n=zL(t),r=YL(t),i=zL(e),o=YL(e);function a(t,e){var a=zL(e),s=zL(t)*a,c=YL(t)*a,l=YL(e),u=l*n+s*r;return[FL(c*i-u*o,s*n-l*r),ZL(u*i+c*o)]}return a.invert=function(t,e){var a=zL(e),s=zL(t)*a,c=YL(t)*a,l=YL(e),u=l*i-c*o;return[FL(c*i+l*o,s*n+u*r),ZL(u*n-s*r)]},a}function yj(t,e){(e=oj(e))[0]-=t,uj(e);var n=XL(-e[1]);return((-e[2]<0?-n:n)+jL-PL)%jL}function mj(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:KL,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function bj(t,e){return DL(t[0]-e[0])<PL&&DL(t[1]-e[1])<PL}function xj(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function wj(t,e,n,r,i){var o,a,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(bj(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new xj(r,t,null,!0)),c.push(n.o=new xj(r,null,n,!1)),s.push(n=new xj(a,t,null,!1)),c.push(n.o=new xj(a,null,n,!0))}})),s.length){for(c.sort(e),kj(s),kj(c),o=0,a=c.length;o<a;++o)c[o].e=n=!n;for(var l,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=l.length;o<a;++o)i.point((u=l[o])[0],u[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((u=l[o])[0],u[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function kj(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function Mj(t){return DL(t[0])<=NL?t[0]:qL(t[0])*((DL(t[0])+NL)%jL-NL)}function Ej(t,e,n,r){return function(i){var o,a,s,c=e(i),l=mj(),u=e(l),f=!1,h={point:d,lineStart:g,lineEnd:v,polygonStart:function(){h.point=y,h.lineStart=m,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=v,a=Sr(a);var t=function(t,e){var n=Mj(e),r=e[1],i=YL(r),o=[YL(n),-zL(n),0],a=0,s=0,c=new Un;1===i?r=CL+PL:-1===i&&(r=-CL-PL);for(var l=0,u=t.length;l<u;++l)if(h=(f=t[l]).length)for(var f,h,d=f[h-1],p=Mj(d),g=d[1]/2+LL,v=YL(g),y=zL(g),m=0;m<h;++m,p=x,v=k,y=M,d=b){var b=f[m],x=Mj(b),w=b[1]/2+LL,k=YL(w),M=zL(w),E=x-p,O=E>=0?1:-1,_=O*E,S=_>NL,A=v*k;if(c.add(FL(A*O*YL(_),y*M+A*zL(_))),a+=S?E+O*jL:E,S^p>=n^x>=n){var T=sj(oj(d),oj(b));uj(T);var P=sj(o,T);uj(P);var N=(S^E>=0?-1:1)*ZL(P[2]);(r>N||r===N&&(T[0]||T[1]))&&(s+=S^E>=0?1:-1)}}return(a<-PL||a<PL&&c<-1e-12)^1&s}(o,r);a.length?(f||(i.polygonStart(),f=!0),wj(a,_j,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){h.point=p,c.lineStart()}function v(){h.point=d,c.lineEnd()}function y(t,e){s.push([t,e]),u.point(t,e)}function m(){u.lineStart(),s=[]}function b(){y(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),h=l.result(),d=h.length;if(s.pop(),o.push(s),s=null,d)if(1&c){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(Oj))}return h}}function Oj(t){return t.length>1}function _j(t,e){return((t=t.x)[0]<0?t[1]-CL-PL:CL-t[1])-((e=e.x)[0]<0?e[1]-CL-PL:CL-e[1])}hj.invert=hj;var Sj=Ej((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?NL:-NL,c=DL(o-n);DL(c-NL)<PL?(t.point(n,r=(r+a)/2>0?CL:-CL),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&c>=NL&&(DL(n-i)<PL&&(n-=i*PL),DL(o-s)<PL&&(o-=s*PL),r=function(t,e,n,r){var i,o,a=YL(t-n);return DL(a)>PL?BL((YL(e)*(o=zL(r))*YL(n)-YL(r)*(i=zL(e))*YL(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*CL,r.point(-NL,i),r.point(0,i),r.point(NL,i),r.point(NL,0),r.point(NL,-i),r.point(0,-i),r.point(-NL,-i),r.point(-NL,0),r.point(-NL,i);else if(DL(t[0]-e[0])>PL){var o=t[0]<e[0]?NL:-NL;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-NL,-CL]);function Aj(t){var e=zL(t),n=2*IL,r=e>0,i=DL(e)>PL;function o(t,n){return zL(t)*zL(n)>e}function a(t,n,r){var i=[1,0,0],o=sj(oj(t),oj(n)),a=aj(o,o),s=o[0],c=a-s*s;if(!c)return!r&&t;var l=e*a/c,u=-e*s/c,f=sj(i,o),h=lj(i,l);cj(h,lj(o,u));var d=f,p=aj(h,d),g=aj(d,d),v=p*p-g*(aj(h,h)-1);if(!(v<0)){var y=VL(v),m=lj(d,(-p-y)/g);if(cj(m,h),m=ij(m),!r)return m;var b,x=t[0],w=n[0],k=t[1],M=n[1];w<x&&(b=x,x=w,w=b);var E=w-x,O=DL(E-NL)<PL;if(!O&&M<k&&(b=k,k=M,M=b),O||E<PL?O?k+M>0^m[1]<(DL(m[0]-x)<PL?k:M):k<=m[1]&&m[1]<=M:E>NL^(x<=m[0]&&m[0]<=w)){var _=lj(d,(-p+y)/g);return cj(_,h),[m,ij(_)]}}}function s(e,n){var i=r?t:NL-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Ej(o,(function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(f,h){var d,p=[f,h],g=o(f,h),v=r?g?0:s(f,h):g?s(f+(f<0?NL:-NL),h):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(d=a(e,p))||bj(e,d)||bj(p,d))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),d=a(p,e),t.point(d[0],d[1])):(d=a(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var y;v&n||!(y=a(p,e,!0))||(u=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&bj(e,p)||t.point(p[0],p[1]),e=p,c=g,n=v},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=zL(e),s=YL(e),c=r*n;null==i?(i=e+r*jL,o=e-c/2):(i=yj(a,i),o=yj(a,o),(r>0?i<o:i>o)&&(i+=r*jL));for(var l,u=i;r>0?u>o:u<o;u-=c)l=ij([a,-s*zL(u),-s*YL(u)]),t.point(l[0],l[1])}}(o,t,n,i,e,r)}),r?[0,-t]:[-NL,t-NL])}var Tj=1e9,Pj=-Tj;function Nj(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,l){var u=0,f=0;if(null==i||(u=a(i,s))!==(f=a(o,s))||c(i,o)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==f);else l.point(o[0],o[1])}function a(r,i){return DL(r[0]-t)<PL?i>0?0:3:DL(r[0]-n)<PL?i>0?2:1:DL(r[1]-e)<PL?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var c,l,u,f,h,d,p,g,v,y,m,b=a,x=mj(),w={point:k,lineStart:function(){w.point=M,l&&l.push(u=[]);y=!0,v=!1,p=g=NaN},lineEnd:function(){c&&(M(f,h),d&&v&&x.rejoin(),c.push(x.result()));w.point=k,v&&b.lineEnd()},polygonStart:function(){b=x,c=[],l=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var o,a,s=l[n],c=1,u=s.length,f=s[0],h=f[0],d=f[1];c<u;++c)o=h,a=d,h=(f=s[c])[0],d=f[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(t-o)&&++e:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--e;return e}(),n=m&&e,i=(c=Sr(c)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&wj(c,s,e,o,a),a.polygonEnd());b=a,c=l=u=null}};function k(t,e){i(t,e)&&b.point(t,e)}function M(o,a){var s=i(o,a);if(l&&u.push([o,a]),y)f=o,h=a,d=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&v)b.point(o,a);else{var c=[p=Math.max(Pj,Math.min(Tj,p)),g=Math.max(Pj,Math.min(Tj,g))],x=[o=Math.max(Pj,Math.min(Tj,o)),a=Math.max(Pj,Math.min(Tj,a))];!function(t,e,n,r,i,o){var a,s=t[0],c=t[1],l=0,u=1,f=e[0]-s,h=e[1]-c;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<u&&(u=a)}else if(f>0){if(a>u)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<u&&(u=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<u&&(u=a)}else if(h>0){if(a>u)return;a>l&&(l=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<u&&(u=a)}return l>0&&(t[0]=s+l*f,t[1]=c+l*h),u<1&&(e[0]=s+u*f,e[1]=c+u*h),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(o,a),m=!1):(v||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=o,g=a,v=s}return w}}function Cj(t,e,n){var r=Ar(t,e-PL,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Lj(t,e,n){var r=Ar(t,e-PL,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function jj(){return function(){var t,e,n,r,i,o,a,s,c,l,u,f,h=10,d=h,p=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return Ar($L(r/p)*p,n,p).map(u).concat(Ar($L(s/g)*g,a,g).map(f)).concat(Ar($L(e/h)*h,t,h).filter((function(t){return DL(t%p)>PL})).map(c)).concat(Ar($L(o/d)*d,i,d).filter((function(t){return DL(t%g)>PL})).map(l))}return y.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(f(a).slice(1),u(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(v)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),y.precision(v)):[[e,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],y):[p,g]},y.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],y):[h,d]},y.precision=function(h){return arguments.length?(v=+h,c=Cj(o,i,90),l=Lj(e,t,v),u=Cj(s,a,90),f=Lj(r,n,v),y):v},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}var Rj,Ij,Dj,Bj,Fj=t=>t,zj=new Un,$j=new Un,Wj={point:KL,lineStart:KL,lineEnd:KL,polygonStart:function(){Wj.lineStart=Gj,Wj.lineEnd=qj},polygonEnd:function(){Wj.lineStart=Wj.lineEnd=Wj.point=KL,zj.add(DL($j)),$j=new Un},result:function(){var t=zj/2;return zj=new Un,t}};function Gj(){Wj.point=Hj}function Hj(t,e){Wj.point=Yj,Rj=Dj=t,Ij=Bj=e}function Yj(t,e){$j.add(Bj*t-Dj*e),Dj=t,Bj=e}function qj(){Yj(Rj,Ij)}var Vj=Wj,Uj=1/0,Xj=Uj,Zj=-Uj,Kj=Zj,Qj={point:function(t,e){t<Uj&&(Uj=t);t>Zj&&(Zj=t);e<Xj&&(Xj=e);e>Kj&&(Kj=e)},lineStart:KL,lineEnd:KL,polygonStart:KL,polygonEnd:KL,result:function(){var t=[[Uj,Xj],[Zj,Kj]];return Zj=Kj=-(Xj=Uj=1/0),t}};var Jj,tR,eR,nR,rR=Qj,iR=0,oR=0,aR=0,sR=0,cR=0,lR=0,uR=0,fR=0,hR=0,dR={point:pR,lineStart:gR,lineEnd:mR,polygonStart:function(){dR.lineStart=bR,dR.lineEnd=xR},polygonEnd:function(){dR.point=pR,dR.lineStart=gR,dR.lineEnd=mR},result:function(){var t=hR?[uR/hR,fR/hR]:lR?[sR/lR,cR/lR]:aR?[iR/aR,oR/aR]:[NaN,NaN];return iR=oR=aR=sR=cR=lR=uR=fR=hR=0,t}};function pR(t,e){iR+=t,oR+=e,++aR}function gR(){dR.point=vR}function vR(t,e){dR.point=yR,pR(eR=t,nR=e)}function yR(t,e){var n=t-eR,r=e-nR,i=VL(n*n+r*r);sR+=i*(eR+t)/2,cR+=i*(nR+e)/2,lR+=i,pR(eR=t,nR=e)}function mR(){dR.point=pR}function bR(){dR.point=wR}function xR(){kR(Jj,tR)}function wR(t,e){dR.point=kR,pR(Jj=eR=t,tR=nR=e)}function kR(t,e){var n=t-eR,r=e-nR,i=VL(n*n+r*r);sR+=i*(eR+t)/2,cR+=i*(nR+e)/2,lR+=i,uR+=(i=nR*t-eR*e)*(eR+t),fR+=i*(nR+e),hR+=3*i,pR(eR=t,nR=e)}var MR=dR;function ER(t){this._context=t}ER.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,jL)}},result:KL};var OR,_R,SR,AR,TR,PR=new Un,NR={point:KL,lineStart:function(){NR.point=CR},lineEnd:function(){OR&&LR(_R,SR),NR.point=KL},polygonStart:function(){OR=!0},polygonEnd:function(){OR=null},result:function(){var t=+PR;return PR=new Un,t}};function CR(t,e){NR.point=LR,_R=AR=t,SR=TR=e}function LR(t,e){AR-=t,TR-=e,PR.add(VL(AR*AR+TR*TR)),AR=t,TR=e}var jR=NR;let RR,IR,DR,BR;class FR{constructor(t){this._append=null==t?zR:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return zR;if(e!==RR){const t=10**e;RR=e,IR=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return IR}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==DR||this._append!==IR){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,DR=t,IR=this._append,BR=this._,this._=e}this._+=BR}}result(){const t=this._;return this._="",t.length?t:null}}function zR(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function $R(t,e){let n,r,i=3,o=4.5;function a(t){return t&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),rj(t,n(r))),r.result()}return a.area=function(t){return rj(t,n(Vj)),Vj.result()},a.measure=function(t){return rj(t,n(jR)),jR.result()},a.bounds=function(t){return rj(t,n(rR)),rR.result()},a.centroid=function(t){return rj(t,n(MR)),MR.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Fj):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new FR(i)):new ER(e=t),"function"!=typeof o&&r.pointRadius(o),a):e},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(r.pointRadius(+t),+t),a):o},a.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new FR(i)),a},a.projection(t).digits(i).context(e)}function WR(t){return function(e){var n=new GR;for(var r in t)n[r]=t[r];return n.stream=e,n}}function GR(){}function HR(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),rj(n,t.stream(rR)),e(rR.result()),null!=r&&t.clipExtent(r),t}function YR(t,e,n){return HR(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}function qR(t,e,n){return YR(t,[[0,0],e],n)}function VR(t,e,n){return HR(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function UR(t,e,n){return HR(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}GR.prototype={constructor:GR,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var XR=zL(30*IL);function ZR(t,e){return+e?function(t,e){function n(r,i,o,a,s,c,l,u,f,h,d,p,g,v){var y=l-r,m=u-i,b=y*y+m*m;if(b>4*e&&g--){var x=a+h,w=s+d,k=c+p,M=VL(x*x+w*w+k*k),E=ZL(k/=M),O=DL(DL(k)-1)<PL||DL(o-f)<PL?(o+f)/2:FL(w,x),_=t(O,E),S=_[0],A=_[1],T=S-r,P=A-i,N=m*T-y*P;(N*N/b>e||DL((y*T+m*P)/b-.5)>.3||a*h+s*d+c*p<XR)&&(n(r,i,o,a,s,c,S,A,O,x/=M,w/=M,k,g,v),v.point(S,A),n(S,A,O,x,w,k,l,u,f,h,d,p,g,v))}}return function(e){var r,i,o,a,s,c,l,u,f,h,d,p,g={point:v,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){u=NaN,g.point=m,e.lineStart()}function m(r,i){var o=oj([r,i]),a=t(r,i);n(u,f,l,h,d,p,u=a[0],f=a[1],l=r,h=o[0],d=o[1],p=o[2],16,e),e.point(u,f)}function b(){g.point=v,e.lineEnd()}function x(){y(),g.point=w,g.lineEnd=k}function w(t,e){m(r=t,e),i=u,o=f,a=h,s=d,c=p,g.point=m}function k(){n(u,f,l,h,d,p,i,o,r,a,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return WR({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var KR=WR({point:function(t,e){this.stream.point(t*IL,e*IL)}});function QR(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=zL(o),s=YL(o),c=a*t,l=s*t,u=a/t,f=s/t,h=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(t,o){return[c*(t*=r)-l*(o*=i)+e,n-l*t-c*o]}return p.invert=function(t,e){return[r*(u*t-f*e+h),i*(d-f*t-u*e)]},p}function JR(t){return tI((function(){return t}))()}function tI(t){var e,n,r,i,o,a,s,c,l,u,f=150,h=480,d=250,p=0,g=0,v=0,y=0,m=0,b=0,x=1,w=1,k=null,M=Sj,E=null,O=Fj,_=.5;function S(t){return c(t[0]*IL,t[1]*IL)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*RL,t[1]*RL]}function T(){var t=QR(f,0,0,x,w,b).apply(null,e(p,g)),r=QR(f,h-t[0],d-t[1],x,w,b);return n=dj(v,y,m),s=fj(e,r),c=fj(n,s),a=ZR(s,_),P()}function P(){return l=u=null,S}return S.stream=function(t){return l&&u===t?l:l=KR(function(t){return WR({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(M(a(O(u=t)))))},S.preclip=function(t){return arguments.length?(M=t,k=void 0,P()):M},S.postclip=function(t){return arguments.length?(O=t,E=r=i=o=null,P()):O},S.clipAngle=function(t){return arguments.length?(M=+t?Aj(k=t*IL):(k=null,Sj),P()):k*RL},S.clipExtent=function(t){return arguments.length?(O=null==t?(E=r=i=o=null,Fj):Nj(E=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),P()):null==E?null:[[E,r],[i,o]]},S.scale=function(t){return arguments.length?(f=+t,T()):f},S.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],T()):[h,d]},S.center=function(t){return arguments.length?(p=t[0]%360*IL,g=t[1]%360*IL,T()):[p*RL,g*RL]},S.rotate=function(t){return arguments.length?(v=t[0]%360*IL,y=t[1]%360*IL,m=t.length>2?t[2]%360*IL:0,T()):[v*RL,y*RL,m*RL]},S.angle=function(t){return arguments.length?(b=t%360*IL,T()):b*RL},S.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},S.precision=function(t){return arguments.length?(a=ZR(s,_=t*t),P()):VL(_)},S.fitExtent=function(t,e){return YR(S,t,e)},S.fitSize=function(t,e){return qR(S,t,e)},S.fitWidth=function(t,e){return VR(S,t,e)},S.fitHeight=function(t,e){return UR(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,T()}}function eI(t){var e=0,n=NL/3,r=tI(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*IL,n=t[1]*IL):[e*RL,n*RL]},i}function nI(t,e){var n=YL(t),r=(n+YL(e))/2;if(DL(r)<PL)return function(t){var e=zL(t);function n(t,n){return[t*e,YL(n)/e]}return n.invert=function(t,n){return[t/e,ZL(n*e)]},n}(t);var i=1+n*(2*r-n),o=VL(i)/r;function a(t,e){var n=VL(i-2*r*YL(e))/r;return[n*YL(t*=r),o-n*zL(t)]}return a.invert=function(t,e){var n=o-e,a=FL(t,DL(n))*qL(n);return n*r<0&&(a-=NL*qL(t)*qL(n)),[a/r,ZL((i-(t*t+n*n)*r*r)/(2*r))]},a}function rI(){return eI(nI).scale(155.424).center([0,33.6442])}function iI(){return rI().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function oI(t){return function(e,n){var r=zL(e),i=zL(n),o=t(r*i);return o===1/0?[2,0]:[o*i*YL(e),o*YL(n)]}}function aI(t){return function(e,n){var r=VL(e*e+n*n),i=t(r),o=YL(i),a=zL(i);return[FL(e*o,r*a),ZL(r&&n*o/r)]}}var sI=oI((function(t){return VL(2/(1+t))}));sI.invert=aI((function(t){return 2*ZL(t/2)}));var cI=oI((function(t){return(t=XL(t))&&t/YL(t)}));function lI(t,e){return[t,GL(UL((CL+e)/2))]}function uI(t){var e,n,r,i=JR(t),o=i.center,a=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var o=NL*a(),s=i(function(t){function e(e){return(e=t(e[0]*IL,e[1]*IL))[0]*=RL,e[1]*=RL,e}return t=dj(t[0]*IL,t[1]*IL,t.length>2?t[2]*IL:0),e.invert=function(e){return(e=t.invert(e[0]*IL,e[1]*IL))[0]*=RL,e[1]*=RL,e},e}(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===lI?[[Math.max(s[0]-o,l),e],[Math.min(s[0]+o,n),r]]:[[l,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),u()):a()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(o(t),u()):o()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function fI(t){return UL((CL+t)/2)}function hI(t,e){var n=zL(t),r=t===e?YL(t):GL(n/zL(e))/GL(fI(e)/fI(t)),i=n*HL(fI(t),r)/r;if(!r)return lI;function o(t,e){i>0?e<-CL+PL&&(e=-CL+PL):e>CL-PL&&(e=CL-PL);var n=i/HL(fI(e),r);return[n*YL(r*t),i-n*zL(r*t)]}return o.invert=function(t,e){var n=i-e,o=qL(r)*VL(t*t+n*n),a=FL(t,DL(n))*qL(n);return n*r<0&&(a-=NL*qL(t)*qL(n)),[a/r,2*BL(HL(i/o,1/r))-CL]},o}function dI(t,e){return[t,e]}function pI(t,e){var n=zL(t),r=t===e?YL(t):(n-zL(e))/(e-t),i=n/r+t;if(DL(r)<PL)return dI;function o(t,e){var n=i-e,o=r*t;return[n*YL(o),i-n*zL(o)]}return o.invert=function(t,e){var n=i-e,o=FL(t,DL(n))*qL(n);return n*r<0&&(o-=NL*qL(t)*qL(n)),[o/r,i-qL(r)*VL(t*t+n*n)]},o}cI.invert=aI((function(t){return t})),lI.invert=function(t,e){return[t,2*BL(WL(e))-CL]},dI.invert=dI;var gI=1.340264,vI=-.081106,yI=893e-6,mI=.003796,bI=VL(3)/2;function xI(t,e){var n=ZL(bI*YL(e)),r=n*n,i=r*r*r;return[t*zL(n)/(bI*(gI+3*vI*r+i*(7*yI+9*mI*r))),n*(gI+vI*r+i*(yI+mI*r))]}function wI(t,e){var n=zL(e),r=zL(t)*n;return[n*YL(t)/r,YL(e)/r]}function kI(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function MI(t,e){return[zL(e)*YL(t),YL(e)]}function EI(t,e){var n=zL(e),r=1+zL(t)*n;return[n*YL(t)/r,YL(e)/r]}function OI(t,e){return[GL(UL((CL+e)/2)),-t]}xI.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(gI+vI*i+o*(yI+mI*i))-e)/(gI+3*vI*i+o*(7*yI+9*mI*i)))*r)*i*i,!(DL(n)<1e-12));++a);return[bI*t*(gI+3*vI*i+o*(7*yI+9*mI*i))/zL(r),ZL(YL(r)/bI)]},wI.invert=aI(BL),kI.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(DL(n)>PL&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},MI.invert=aI(ZL),EI.invert=aI((function(t){return 2*BL(t)})),OI.invert=function(t,e){return[-e,2*BL(WL(t))-CL]};var _I=Object.freeze({__proto__:null,geoAlbersUsa:function(){var t,e,n,r,i,o,a=iI(),s=rI().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rI().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){o=[t,e]}};function u(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},u.stream=function(n){return t&&e===n?t:t=function(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}([a.stream(e=n),s.stream(n),c.stream(n)])},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),c.precision(t),f()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),c.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,u-.238*e],[o+.455*e,u+.238*e]]).stream(l),r=s.translate([o-.307*e,u+.201*e]).clipExtent([[o-.425*e+PL,u+.12*e+PL],[o-.214*e-PL,u+.234*e-PL]]).stream(l),i=c.translate([o-.205*e,u+.212*e]).clipExtent([[o-.214*e+PL,u+.166*e+PL],[o-.115*e-PL,u+.234*e-PL]]).stream(l),f()},u.fitExtent=function(t,e){return YR(u,t,e)},u.fitSize=function(t,e){return qR(u,t,e)},u.fitWidth=function(t,e){return VR(u,t,e)},u.fitHeight=function(t,e){return UR(u,t,e)},u.scale(1070)},geoAlbers:iI,geoAzimuthalEqualArea:function(){return JR(sI).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:sI,geoAzimuthalEquidistant:function(){return JR(cI).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:cI,geoConicConformal:function(){return eI(hI).scale(109.5).parallels([30,30])},geoConicConformalRaw:hI,geoConicEqualArea:rI,geoConicEqualAreaRaw:nI,geoConicEquidistant:function(){return eI(pI).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:pI,geoEqualEarth:function(){return JR(xI).scale(177.158)},geoEqualEarthRaw:xI,geoEquirectangular:function(){return JR(dI).scale(152.63)},geoEquirectangularRaw:dI,geoGnomonic:function(){return JR(wI).scale(144.049).clipAngle(60)},geoGnomonicRaw:wI,geoIdentity:function(){var t,e,n,r,i,o,a,s=1,c=0,l=0,u=1,f=1,h=0,d=null,p=1,g=1,v=WR({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),y=Fj;function m(){return p=s*u,g=s*f,o=a=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(h){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+c,i+l]}return b.invert=function(n){var r=n[0]-c,i=n[1]-l;if(h){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/p,i/g]},b.stream=function(t){return o&&a===t?o:o=v(y(a=t))},b.postclip=function(t){return arguments.length?(y=t,d=n=r=i=null,m()):y},b.clipExtent=function(t){return arguments.length?(y=null==t?(d=n=r=i=null,Fj):Nj(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),m()):null==d?null:[[d,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,m()):s},b.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],m()):[c,l]},b.angle=function(n){return arguments.length?(e=YL(h=n%360*IL),t=zL(h),m()):h*RL},b.reflectX=function(t){return arguments.length?(u=t?-1:1,m()):u<0},b.reflectY=function(t){return arguments.length?(f=t?-1:1,m()):f<0},b.fitExtent=function(t,e){return YR(b,t,e)},b.fitSize=function(t,e){return qR(b,t,e)},b.fitWidth=function(t,e){return VR(b,t,e)},b.fitHeight=function(t,e){return UR(b,t,e)},b},geoProjection:JR,geoProjectionMutator:tI,geoMercator:function(){return uI(lI).scale(961/jL)},geoMercatorRaw:lI,geoNaturalEarth1:function(){return JR(kI).scale(175.295)},geoNaturalEarth1Raw:kI,geoOrthographic:function(){return JR(MI).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:MI,geoStereographic:function(){return JR(EI).scale(250).clipAngle(142)},geoStereographicRaw:EI,geoTransverseMercator:function(){var t=uI(OI),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:OI});function SI(t,e,n,r){const i=()=>{const t=e.filter(TI),n=t.find((t=>t.sphere));return n?{type:"Sphere"}:(r=t.filter((t=>!t.sphere)).flatMap((t=>t.data.value)),{type:"FeatureCollection",features:r.flatMap((t=>function(t){const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!t||!t.type)return null;const n=e[t.type];return n?"geometry"===n?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===n?{type:"FeatureCollection",features:[t]}:"featureCollection"===n?t:void 0:null}(t).features))});var r},{outline:o=i()}=r,{size:a="fitExtent"}=r;return"fitExtent"===a?function(t,e,n){const{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(t,o,n):"fitWidth"===a?function(t,e,n){const{width:r,height:i}=n,[[o,a],[s,c]]=$R(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-a),u=Math.min(Math.ceil(s-o),l),f=t.scale()*(u-1)/u,[h,d]=t.translate(),p=d+(i-l)/2;t.scale(f).translate([h,p]).precision(.2)}(t,o,n):void 0}function AI(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[jj()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function TI(t){return"geoPath"===t.type}const PI=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=Le(n,["type"]),o=function(t){if("function"==typeof t)return t;const e=`geo${G(t)}`,n=_I[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}(r),a=e.map(AI);let s;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const c=o();SI(c,a,{x:t,y:e,width:n,height:r},i),function(t,e){var n;for(const[r,i]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,i)}(c,i),s=$R(c);const l=new po({domain:[t,t+n]}),u=new po({domain:[e,e+r]});return{transform:t=>(t=>{const e=c(t);if(!e)return[null,null];const[n,r]=e;return[l.map(n),u.map(r)]})(t),untransform:t=>(t=>{if(!t)return null;const[e,n]=t,r=[l.invert(e),u.invert(n)];return c.invert(r)})(t)}}]]}},children:a.flatMap((t=>TI(t)?function(t){const{style:e,tooltip:n={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:CE(n,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},e),{d:t=>s(t)||[]})})}(t):t))})]};function NI(t,e,n,r=t=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);const{target:o}=i;if(!o)return;const{className:a}=o;if("plot"===a)return;const s=I$(o,(t=>"element"===t.className));const c=function(t){return I$(t,(t=>"component"===t.className))}(o),l=function(t){return I$(t,(t=>"label"===t.className))}(o),u=s||c||l;if(!u)return;const{className:f,markType:h}=u,d=Object.assign(Object.assign({},i),{nativeEvent:!0});"element"===f?(d.data={data:Go(u,e)},n.emit(`element:${t}`,d),n.emit(`${h}:${t}`,d)):"label"===f?(d.data={data:u.attributes.datum},n.emit(`label:${t}`,d),n.emit(`${a}:${t}`,d)):(n.emit(`component:${t}`,d),n.emit(`${a}:${t}`,d))}}function CI(){return(t,e,n)=>{const{container:r,view:i}=t,o=NI(fN.CLICK,i,n,(t=>1===t.detail)),a=NI(fN.DBLCLICK,i,n,(t=>2===t.detail)),s=NI(fN.POINTER_TAP,i,n),c=NI(fN.POINTER_DOWN,i,n),l=NI(fN.POINTER_UP,i,n),u=NI(fN.POINTER_OVER,i,n),f=NI(fN.POINTER_OUT,i,n),h=NI(fN.POINTER_MOVE,i,n),d=NI(fN.POINTER_ENTER,i,n),p=NI(fN.POINTER_LEAVE,i,n),g=NI(fN.POINTER_UPOUTSIDE,i,n),v=NI(fN.DRAG_START,i,n),y=NI(fN.DRAG,i,n),m=NI(fN.DRAG_END,i,n),b=NI(fN.DRAG_ENTER,i,n),x=NI(fN.DRAG_LEAVE,i,n),w=NI(fN.DRAG_OVER,i,n),k=NI(fN.DROP,i,n);return r.addEventListener("click",o),r.addEventListener("click",a),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",v),r.addEventListener("drag",y),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",k),()=>{r.removeEventListener("click",o),r.removeEventListener("click",a),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",v),r.removeEventListener("drag",y),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",k)}}}function LI(t,e){const n=Object.assign(Object.assign({},{"component.axisRadar":BA,"component.axisLinear":LA,"component.axisArc":jA,"component.legendContinuousBlock":UA,"component.legendContinuousBlockSize":ZA,"component.legendContinuousSize":XA,"interaction.event":CI,"composition.mark":tL,"composition.view":JC,"shape.label.label":lM}),e),r=e=>{if("string"!=typeof e)return e;const r=`${t}.${e}`;return n[r]||Uo(`Unknown Component: ${r}`)};return[(t,e)=>{const{type:n}=t,i=Le(t,["type"]);n||Uo("Plot type is required!");const o=r(n);return null==o?void 0:o(i,e)},r]}function jI(t){const{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||Uo("Cannot find library document")}function RI(t,e){const{coordinate:n={},coordinates:r}=t,i=Le(t,["coordinate","coordinates"]);if(r)return t;const{type:o,transform:a=[]}=n,s=Le(n,["type","transform"]);if(!o)return Object.assign(Object.assign({},i),{coordinates:a});const[,c]=LI("coordinate",e),{transform:l=!1}=c(o).props||{};if(l)throw new Error(`Unknown coordinate: ${o}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:o},s),...a]})}function II(t,e){return t.filter((t=>t.type===e))}function DI(t){return II(t,"polar").length>0}function BI(t){return II(t,"transpose").length%2==1}function FI(t){return II(t,"theta").length>0}function zI(t){return II(t,"radial").length>0}function $I(t){return II(t,"radar").length>0}function WI(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}PI.props={},CI.props={reapplyWhenUpdate:!0};var GI=WI("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),HI=WI("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),YI=WI("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),qI=WI("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),VI=WI("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),UI=WI("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),XI=WI("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ZI=WI("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),KI=WI("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),QI=WI("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),JI=WI("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function tD(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function eD(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function nD(){}var rD=.7,iD=1/rD,oD="\\s*([+-]?\\d+)\\s*",aD="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sD="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cD=/^#([0-9a-f]{3,8})$/,lD=new RegExp(`^rgb\\(${oD},${oD},${oD}\\)$`),uD=new RegExp(`^rgb\\(${sD},${sD},${sD}\\)$`),fD=new RegExp(`^rgba\\(${oD},${oD},${oD},${aD}\\)$`),hD=new RegExp(`^rgba\\(${sD},${sD},${sD},${aD}\\)$`),dD=new RegExp(`^hsl\\(${aD},${sD},${sD}\\)$`),pD=new RegExp(`^hsla\\(${aD},${sD},${sD},${aD}\\)$`),gD={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function vD(){return this.rgb().formatHex()}function yD(){return this.rgb().formatRgb()}function mD(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=cD.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?bD(e):3===n?new MD(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?xD(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?xD(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lD.exec(t))?new MD(e[1],e[2],e[3],1):(e=uD.exec(t))?new MD(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=fD.exec(t))?xD(e[1],e[2],e[3],e[4]):(e=hD.exec(t))?xD(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=dD.exec(t))?TD(e[1],e[2]/100,e[3]/100,1):(e=pD.exec(t))?TD(e[1],e[2]/100,e[3]/100,e[4]):gD.hasOwnProperty(t)?bD(gD[t]):"transparent"===t?new MD(NaN,NaN,NaN,0):null}function bD(t){return new MD(t>>16&255,t>>8&255,255&t,1)}function xD(t,e,n,r){return r<=0&&(t=e=n=NaN),new MD(t,e,n,r)}function wD(t){return t instanceof nD||(t=mD(t)),t?new MD((t=t.rgb()).r,t.g,t.b,t.opacity):new MD}function kD(t,e,n,r){return 1===arguments.length?wD(t):new MD(t,e,n,null==r?1:r)}function MD(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ED(){return`#${AD(this.r)}${AD(this.g)}${AD(this.b)}`}function OD(){const t=_D(this.opacity);return`${1===t?"rgb(":"rgba("}${SD(this.r)}, ${SD(this.g)}, ${SD(this.b)}${1===t?")":`, ${t})`}`}function _D(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function SD(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function AD(t){return((t=SD(t))<16?"0":"")+t.toString(16)}function TD(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ND(t,e,n,r)}function PD(t){if(t instanceof ND)return new ND(t.h,t.s,t.l,t.opacity);if(t instanceof nD||(t=mD(t)),!t)return new ND;if(t instanceof ND)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new ND(a,s,c,t.opacity)}function ND(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function CD(t){return(t=(t||0)%360)<0?t+360:t}function LD(t){return Math.max(0,Math.min(1,t||0))}function jD(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}tD(nD,mD,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:vD,formatHex:vD,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return PD(this).formatHsl()},formatRgb:yD,toString:yD}),tD(MD,kD,eD(nD,{brighter(t){return t=null==t?iD:Math.pow(iD,t),new MD(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?rD:Math.pow(rD,t),new MD(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new MD(SD(this.r),SD(this.g),SD(this.b),_D(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ED,formatHex:ED,formatHex8:function(){return`#${AD(this.r)}${AD(this.g)}${AD(this.b)}${AD(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:OD,toString:OD})),tD(ND,(function(t,e,n,r){return 1===arguments.length?PD(t):new ND(t,e,n,null==r?1:r)}),eD(nD,{brighter(t){return t=null==t?iD:Math.pow(iD,t),new ND(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rD:Math.pow(rD,t),new ND(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new MD(jD(t>=240?t-240:t+120,i,r),jD(t,i,r),jD(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ND(CD(this.h),LD(this.s),LD(this.l),_D(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_D(this.opacity);return`${1===t?"hsl(":"hsla("}${CD(this.h)}, ${100*LD(this.s)}%, ${100*LD(this.l)}%${1===t?")":`, ${t})`}`}}));const RD=Math.PI/180,ID=180/Math.PI;var DD=-.14861,BD=1.78277,FD=-.29227,zD=-.90649,$D=1.97294,WD=$D*zD,GD=$D*BD,HD=BD*FD-zD*DD;function YD(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof qD)return new qD(t.h,t.s,t.l,t.opacity);t instanceof MD||(t=wD(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(HD*r+WD*e-GD*n)/(HD+WD-GD),o=r-i,a=($D*(n-i)-FD*o)/zD,s=Math.sqrt(a*a+o*o)/($D*i*(1-i)),c=s?Math.atan2(a,o)*ID-120:NaN;return new qD(c<0?c+360:c,s,i,t.opacity)}(t):new qD(t,e,n,null==r?1:r)}function qD(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}tD(qD,YD,eD(nD,{brighter(t){return t=null==t?iD:Math.pow(iD,t),new qD(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rD:Math.pow(rD,t),new qD(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*RD,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new MD(255*(e+n*(DD*r+BD*i)),255*(e+n*(FD*r+zD*i)),255*(e+n*($D*r)),this.opacity)}}));var VD=t=>()=>t;function UD(t,e){return function(n){return t+n*e}}function XD(t){return 1===(t=+t)?ZD: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):VD(isNaN(e)?n:e)}}function ZD(t,e){var n=e-t;return n?UD(t,n):VD(isNaN(t)?e:t)}!function t(e){var n=XD(e);function r(t,e){var r=n((t=kD(t)).r,(e=kD(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ZD(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);var KD,QD=(KD=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return function(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}((n-r/e)*e,a,i,o,s)}},function(t){var e,n,r=t.length,i=new Array(r),o=new Array(r),a=new Array(r);for(e=0;e<r;++e)n=kD(t[e]),i[e]=n.r||0,o[e]=n.g||0,a[e]=n.b||0;return i=KD(i),o=KD(o),a=KD(a),n.opacity=1,function(t){return n.r=i(t),n.g=o(t),n.b=a(t),n+""}});function JD(t){return function e(n){function r(e,r){var i=t((e=YD(e)).h,(r=YD(r)).h),o=ZD(e.s,r.s),a=ZD(e.l,r.l),s=ZD(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}JD((function(t,e){var n=e-t;return n?UD(t,n>180||n<-180?n-360*Math.round(n/360):n):VD(isNaN(t)?e:t)}));var tB=JD(ZD),eB=t=>QD(t[t.length-1]),nB=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(WI),rB=eB(nB),iB=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(WI),oB=eB(iB),aB=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(WI),sB=eB(aB),cB=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(WI),lB=eB(cB),uB=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(WI),fB=eB(uB),hB=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(WI),dB=eB(hB),pB=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(WI),gB=eB(pB),vB=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(WI),yB=eB(vB),mB=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(WI),bB=eB(mB),xB=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(WI),wB=eB(xB),kB=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(WI),MB=eB(kB),EB=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(WI),OB=eB(EB),_B=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(WI),SB=eB(_B),AB=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(WI),TB=eB(AB),PB=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(WI),NB=eB(PB),CB=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(WI),LB=eB(CB),jB=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(WI),RB=eB(jB),IB=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(WI),DB=eB(IB),BB=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(WI),FB=eB(BB),zB=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(WI),$B=eB(zB),WB=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(WI),GB=eB(WB),HB=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(WI),YB=eB(HB),qB=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(WI),VB=eB(qB),UB=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(WI),XB=eB(UB),ZB=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(WI),KB=eB(ZB),QB=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(WI),JB=eB(QB),tF=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(WI),eF=eB(tF);var nF=tB(YD(300,.5,0),YD(-240,.5,1)),rF=tB(YD(-100,.75,.35),YD(80,1.5,.8)),iF=tB(YD(260,.75,.35),YD(80,1.5,.8)),oF=YD();var aF=kD(),sF=Math.PI/3,cF=2*Math.PI/3;function lF(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var uF=lF(WI("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),fF=lF(WI("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),hF=lF(WI("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),dF=lF(WI("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),pF=Object.freeze({__proto__:null,schemeCategory10:GI,schemeAccent:HI,schemeDark2:YI,schemeObservable10:qI,schemePaired:VI,schemePastel1:UI,schemePastel2:XI,schemeSet1:ZI,schemeSet2:KI,schemeSet3:QI,schemeTableau10:JI,interpolateBrBG:rB,schemeBrBG:nB,interpolatePRGn:oB,schemePRGn:iB,interpolatePiYG:sB,schemePiYG:aB,interpolatePuOr:lB,schemePuOr:cB,interpolateRdBu:fB,schemeRdBu:uB,interpolateRdGy:dB,schemeRdGy:hB,interpolateRdYlBu:gB,schemeRdYlBu:pB,interpolateRdYlGn:yB,schemeRdYlGn:vB,interpolateSpectral:bB,schemeSpectral:mB,interpolateBuGn:wB,schemeBuGn:xB,interpolateBuPu:MB,schemeBuPu:kB,interpolateGnBu:OB,schemeGnBu:EB,interpolateOrRd:SB,schemeOrRd:_B,interpolatePuBuGn:TB,schemePuBuGn:AB,interpolatePuBu:NB,schemePuBu:PB,interpolatePuRd:LB,schemePuRd:CB,interpolateRdPu:RB,schemeRdPu:jB,interpolateYlGnBu:DB,schemeYlGnBu:IB,interpolateYlGn:FB,schemeYlGn:BB,interpolateYlOrBr:$B,schemeYlOrBr:zB,interpolateYlOrRd:GB,schemeYlOrRd:WB,interpolateBlues:YB,schemeBlues:HB,interpolateGreens:VB,schemeGreens:qB,interpolateGreys:XB,schemeGreys:UB,interpolatePurples:KB,schemePurples:ZB,interpolateReds:JB,schemeReds:QB,interpolateOranges:eF,schemeOranges:tF,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:nF,interpolateRainbow:function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return oF.h=360*t-100,oF.s=1.5-1.5*e,oF.l=.8-.9*e,oF+""},interpolateWarm:rF,interpolateCool:iF,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,aF.r=255*(e=Math.sin(t))*e,aF.g=255*(e=Math.sin(t+sF))*e,aF.b=255*(e=Math.sin(t+cF))*e,aF+""},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:uF,interpolateMagma:fF,interpolateInferno:hF,interpolatePlasma:dF});function gF(t,e,n,r,i,o){const{guide:a={}}=n,s=function(t,e,n){const{type:r,domain:i,range:o,quantitative:a,ordinal:s}=n;if(void 0!==r)return r;if(function(t){return NF(t,na)}(e))return"identity";if("string"==typeof o)return"linear";if((i||o||[]).length>2)return _F(t,s);if(void 0!==i)return TF([i])?_F(t,s):PF(e)?"time":SF(t,o,a);return TF(e)?_F(t,s):PF(e)?"time":SF(t,o,a)}(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 AF(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)Zo(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 AF(function(t){let e=1/0,n=-1/0;for(const r of t)for(const t of r)Zo(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(kF({type:t}))return function(t,e,n){const r=t.map(Number),i=new po({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 MF({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=Ii,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?FI(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:o=i,paddingOuter:a=i}=r;return Object.assign(Object.assign({},r),{paddingInner:o,paddingOuter:a,padding:i,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=G(e),i=pF[`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:EF(s,t,e,n,l,i,o),expectedDomain:c,guide:a,name:t,type:s})}function vF(t,e){const n={};for(const r of t){const{values:t,name:i}=r,o=e[i];for(const e of t){const{name:t,value:r}=e;n[t]=r.map((t=>o.map(t)))}}return n}function yF(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:e}=r.getOptions();if(e in t){const i=n.filter((t=>t.startsWith(e))).map((t=>+(t.replace(e,"")||0))),o=vr(i)+1,a=`${e}${o}`;t[a]=r,r.getOptions().key=a}else t[e]=r}return t}function mF(t,e){const[n]=LI("scale",e),{relations:r}=t,[i]=function(t){if(!t||!Array.isArray(t))return[Yo,Yo];let e,n;return[r=>{var i;e=r.map.bind(r),n=null===(i=r.invert)||void 0===i?void 0:i.bind(r);const o=t.filter((([t])=>"function"==typeof t)),a=t.filter((([t])=>"function"!=typeof t)),s=new Map(a);if(r.map=t=>{for(const[e,n]of o)if(e(t))return n;return s.has(t)?s.get(t):e(t)},!n)return r;const c=new Map(a.map((([t,e])=>[e,t]))),l=new Map(o.map((([t,e])=>[e,t])));return r.invert=t=>l.has(t)?t:c.has(t)?c.get(t):n(t),r},t=>(null!==e&&(t.map=e),null!==n&&(t.invert=n),t)]}(r);return i(n(t))}function bF(t){const e=t.flatMap((t=>Array.from(t.values()))).flatMap((t=>t.channels.map((t=>t.scale))));wF(e,"x"),wF(e,"y")}function xF(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 wF(t,e){const n=t.filter((({name:t,facet:n=!0})=>n&&t===e)),r=n.flatMap((t=>t.domain)),i=n.every(kF)?Vn(r):n.every(MF)?Array.from(new Set(r)):null;if(null!==i)for(const t of n)t.domain=i}function kF(t){const{type:e}=t;if("string"!=typeof e)return!1;return["linear","log","pow","time"].includes(e)}function MF(t){const{type:e}=t;if("string"!=typeof e)return!1;return["band","point","ordinal"].includes(e)}function EF(t,e,n,r,i,o,a){const{range:s}=r;if("string"==typeof s)return function(t){return t.split("-")}(s);if(void 0!==s)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const t=OF(n,r,i,o,a),[s,u]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[sa(e),ca(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 OF(n,r,i,o,a);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function OF(t,e,n,r,i){const[o]=LI("palette",i),{category10:a,category20:s}=r,c=function(t){return Array.from(new Set(t))}(n).length<=a.length?a:s,{palette:l=c,offset:u}=e;if(Array.isArray(l))return l;try{return o({type:l})}catch(t){const e=function(t,e,n=t=>t){if(!t)return null;const r=G(t),i=pF[`scheme${r}`],o=pF[`interpolate${r}`];if(!i&&!o)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)=>o(n(r/e.length))))}(l,n,u);if(e)return e;throw new Error(`Unknown Component: ${l} `)}}function _F(t,e){return e||(function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal")}function SF(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function AF(t,e){if(0===t.length)return t;const{domainMin:n,domainMax:r}=e,[i,o]=t;return[null!=n?n:i,null!=r?r:o]}function TF(t){return NF(t,(t=>{const e=typeof t;return"string"===e||"boolean"===e}))}function PF(t){return NF(t,(t=>t instanceof Date))}function NF(t,e){for(const n of t)if(n.some(e))return!0;return!1}const CF={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},LF={threshold:"threshold",quantize:"quantize",quantile:"quantile"},jF={ordinal:"ordinal",band:"band",point:"point"},RF={constant:"constant"};function IF(t,e,n){const{coordinates:r=[],title:i}=e,[,o]=LI("component",n),a=t.filter((({guide:t})=>null!==t)),s=[],c=function(t,e,n){const[,r]=LI("component",n),{coordinates:i}=t;function o(t,e,n,o){const a=function(t,e,n=[]){return"x"===t?BI(n)?`${e}Y`:`${e}X`:"y"===t?BI(n)?`${e}X`:`${e}Y`:null}(e,t,i);if(!o||!a)return;const{props:s}=r(a),{defaultPosition:c,defaultSize:l,defaultOrder:u,defaultCrossPadding:[f]}=s;return Object.assign(Object.assign({position:c,defaultSize:l,order:u,type:a,crossPadding:f},o),{scales:[n]})}return e.filter((t=>t.slider||t.scrollbar)).flatMap((t=>{const{slider:e,scrollbar:n,name:r}=t;return[o("slider",r,t,e),o("scrollbar",r,t,n)]})).filter((t=>!!t))}(e,t,n);if(s.push(...c),i){const{props:t}=o("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:a,defaultCrossPadding:c}=t,l="string"==typeof i?{title:i}:i;s.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:c[0],defaultSize:a},l))}const l=function(t,e){const n=t.filter((t=>function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;const{type:e,domain:n,range:r,interpolator:i}=t,o=n&&n.length>0,a=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&o&&a)||!(!["sequential"].includes(e)||!o||!a&&!i)||!(!["constant","identity"].includes(e)||!a)}(t)));return[...FF(n),...$F(n,e)]}(a,r);return l.forEach((([t,e])=>{const{props:n}=o(t),{defaultPosition:i,defaultPlane:c="xy",defaultOrientation:l,defaultSize:u,defaultOrder:f,defaultLength:h,defaultPadding:d=[0,0],defaultCrossPadding:p=[0,0]}=n,g=Q({},...e),{guide:v,field:y}=g,m=Array.isArray(v)?v:[v];for(const n of m){const[o,g]=HF(t,i,l,n,e,a,r);if(!o&&!g)continue;const v="left"===o||"right"===o,m=v?d[1]:d[0],b=v?p[1]:p[0],{size:x,order:w=f,length:k=h,padding:M=m,crossPadding:E=b}=n;s.push(Object.assign(Object.assign({title:y},n),{defaultSize:u,length:k,position:o,plane:c,orientation:g,padding:M,order:w,crossPadding:E,size:x,type:t,scales:e}))}})),s}function DF(t,e,n,r,i){const[o]=LI("component",r),{scaleInstances:a,scale:s,bbox:c}=t,l={bbox:c,library:r};return o(Le(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:i,scales:a,theme:n,value:l,scale:s})}function BF(t,e){const n=["left","right","bottom","top"],r=tr(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=Tr(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=vr(t,(t=>t.size)),r=vr(t,(t=>t.order)),i=vr(t,(t=>t.crossPadding));return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}}))}function FF(t,e){const n=["shape","size","color","opacity"],r=t.filter((({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!((t,e)=>"constant"===t&&"size"===e)(t,e))),i=r.filter((({type:t})=>"constant"===t)),o=tr(r.filter((({type:t})=>"constant"!==t)),(t=>t.field?t.field:Symbol("independent"))).map((([t,e])=>[t,[...e,...i]])).filter((([,t])=>t.some((t=>"constant"!==t.type)))),a=new Map(o);if(0===a.size)return[];const s=t=>t.sort((([t],[e])=>t.localeCompare(e))),c=Array.from(a).map((([,t])=>{const e=function(t){if(1===t.length)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...ua(t,n));return e}(t).sort(((t,e)=>e.length-t.length)),n=e.map((t=>({combination:t,option:t.map((t=>[t.name,zF(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 RN)for(const{option:r,combination:i}of n)if(e.some((t=>et(s(t),s(r)))))return[t,i];return null})).filter(Zo);return c}function zF(t){const{type:e}=t;return"string"!=typeof e?null:e in CF?"continuous":e in jF?"discrete":e in LF?"distribution":e in RF?"constant":null}function $F(t,e){return t.map((t=>{const{name:n}=t;if(function(t){return II(t,"helix").length>0}(e)||FI(e))return null;if(BI(e)&&(DI(e)||zI(e)))return null;if(n.startsWith("x"))return DI(e)?["axisArc",[t]]:zI(e)?["axisLinear",[t]]:[BI(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return DI(e)?["axisLinear",[t]]:zI(e)?["axisArc",[t]]:[BI(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if($I(e))return["axisRadar",[t]];if(!DI(e))return["axisY",[t]]}return null})).filter(Zo)}function WF(t){const e=II(t,"polar");if(e.length){const t=e[e.length-1],{startAngle:r,endAngle:i}=n(t);return[r,i]}const r=II(t,"radial");if(r.length){const t=r[r.length-1],{startAngle:e,endAngle:n}=s(t);return[e,n]}return[-Math.PI/2,Math.PI/2*3]}function GF(t,e,n,r,i){const{name:o}=n[0];if("axisRadar"===t){const t=r.filter((t=>t.name.startsWith("position"))),e=function(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}(o);if(null===e)return[null,null];const[n,a]=WF(i);return["center",(a-n)/($I(i)?t.length:t.length-1)*e+n]}if("axisY"===t&&function(t){return II(t,"parallel").length>0}(i))return BI(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){const[t]=WF(i);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:DI(i)||zI(i)?["center",null]:"axisX"===t&&function(t){return II(t,"reflect").length>0}(i)||"axisX"===t&&function(t){return II(t,"reflectY").length>0}(i)?["top",null]:e}function HF(t,e,n,r,i,o,a){const[s]=WF(a),c=[r.position||e,null!=s?s:n];return"string"==typeof t&&t.startsWith("axis")?GF(t,c,i,o,a):"string"==typeof t&&t.startsWith("legend")&&DI(a)&&"center"===r.position?["center","vertical"]:c}function YF(t,e,n,r,i,o){const{type:a}=t;if(!["left","right","bottom","top"].includes(r))return;if("string"!=typeof a)return;const s=a;return(s.startsWith("axis")?ZF:s.startsWith("group")?qF:s.startsWith("legendContinuous")?KF:"legendCategory"===s?QF:s.startsWith("slider")?XF:"title"===s?UF:s.startsWith("scrollbar")?VF:()=>{})(t,e,n,r,i,o)}function qF(t,e,n,r,i,o){const{children:a}=t,s=vr(a,(t=>t.crossPadding));a.forEach((t=>t.crossPadding=s)),a.forEach((t=>YF(t,e,n,r,i,o)));const c=vr(a,(t=>t.size));t.size=c,a.forEach((t=>t.size=c))}function VF(t,e,n,r,i,o){const{trackSize:a=6}=Q({},i.scrollbar,t);t.size=a}function UF(t,e,n,r,i,o){const a=Q({},i.title,t),{title:s,subtitle:c,spacing:l=0}=a,u=Le(a,["title","subtitle","spacing"]);if(s){const e=iz(s,Qo(u,"title"));t.size=e.height}if(c){const e=iz(c,Qo(u,"subtitle"));t.size+=l+e.height}}function XF(t,e,n,r,i,o){const{trackSize:a,handleIconSize:s}=(()=>{const{slider:e}=i;return Q({},e,t)})(),c=Math.max(a,2.4*s);t.size=c}function ZF(t,e,n,r,i,o){var a;t.transform=t.transform||[{type:"hide"}];const s="left"===r||"right"===r,c=nz(t,r,i),{tickLength:l=0,labelSpacing:u=0,titleSpacing:f=0,labelAutoRotate:h}=c,d=Le(c,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),p=JF(t,o),g=tz(d,p),v=l+u;if(g&&g.length){const r=vr(g,(t=>t.width)),i=vr(g,(t=>t.height));if(s)t.size=r+v;else{const{tickFilter:o,labelTransform:s}=t;!function(t,e,n,r,i){const o=Tr(e,(t=>t.width));if(o>n)return!0;const a=t.clone();a.update({range:[0,n]});const s=rz(t,i),c=s.map((t=>a.map(t)+function(t,e){if(!t.getBandWidth)return 0;const n=t.getBandWidth(e)/2;return n}(a,t))),l=s.map(((t,e)=>e)),u=-r[0],f=n+r[1],h=(t,e)=>{const{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<l.length;t++){const n=c[t],[r,i]=h(n,e[t]);if(r<u||i>f)return!0;const o=c[t+1];if(o){const[n]=h(o,e[t+1]);if(i>n)return!0}}return!1}(p,g,e,n,o)||s||!1===h||null===h?(t.labelTransform=null!==(a=t.labelTransform)&&void 0!==a?a:"rotate(0)",t.size=i+v):(t.labelTransform="rotate(90)",t.size=r+v)}}else t.size=l;const y=ez(d);y&&(t.size+=s?f+y.width:f+y.height)}function KF(t,e,n,r,i,o){const a=(()=>{const{legendContinuous:e}=i;return Q({},e,t)})(),{labelSpacing:s=0,titleSpacing:c=0}=a,l=Le(a,["labelSpacing","titleSpacing"]),u="left"===r||"right"===r,f=Qo(l,"ribbon"),{size:h}=f,d=Qo(l,"handleIcon"),{size:p}=d,g=Math.max(h,2.4*p);t.size=g;const v=tz(l,JF(t,o));if(v){const e=u?"width":"height",n=vr(v,(t=>t[e]));t.size+=n+s}const y=ez(l);y&&(u?t.size=Math.max(t.size,y.width):t.size+=c+y.height)}function QF(t,e,n,r,i,o){const a=(()=>{const{legendCategory:e}=i,{title:n}=t,[r,o]=Array.isArray(n)?[n,void 0]:[void 0,n];return Q({title:r},e,Object.assign(Object.assign({},t),{title:o}))})(),{itemSpacing:s,itemMarkerSize:c,titleSpacing:l,rowPadding:u,colPadding:f,maxCols:h=1/0,maxRows:d=1/0}=a,p=Le(a,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:v}=t,y=t=>Math.min(t,d),m=t=>Math.min(t,h),b="left"===r||"right"===r,x=void 0===v?e+(b?0:n[0]+n[1]):v,w=ez(p),k=tz(p,JF(t,o),"itemLabel"),M=Math.max(k[0].height,c)+u,E=(t,e=0)=>c+t+s[0]+e;b?(()=>{let e=-1/0,n=0,r=1,i=0,o=-1/0,a=-1/0;const s=w?w.height:0,c=x-s;for(const{width:t}of k){const s=E(t,f);e=Math.max(e,s),n+M>c?(r++,o=Math.max(o,i),a=Math.max(a,n),i=1,n=M):(n+=M,i++)}r<=1&&(o=i,a=n),t.size=e*m(r),t.length=a+s,Q(t,{cols:m(r),gridRow:o})})():"number"==typeof g?(()=>{const e=Math.ceil(k.length/g),n=vr(k,(t=>E(t.width)))*g;t.size=M*y(e)-u,t.length=Math.min(n,x)})():(()=>{let e=1,n=0,r=-1/0;for(const{width:t}of k){const i=E(t,f);n+i>x?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=M*y(e)-u,t.length=r})(),w&&(b?t.size=Math.max(t.size,w.width):t.size+=l+w.height)}function JF(t,e){const[n]=LI("scale",e),{scales:r,tickCount:i,tickMethod:o}=t,a=r.find((t=>"constant"!==t.type&&"identity"!==t.type));return void 0!==i&&(a.tickCount=i),void 0!==o&&(a.tickMethod=o),n(a)}function tz(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:o=!0}=t,a=Le(t,["labelFormatter","tickFilter","label"]);if(!o)return null;const s=function(t,e,n){const r=rz(t,n),i=r.map((t=>"number"==typeof t?dy(t):t)),o=e?"string"==typeof e?dA(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return i.map(o)}(e,r,i),c=Qo(a,n),l=s.map(((t,e)=>Object.fromEntries(Object.entries(c).map((([n,r])=>[n,"function"==typeof r?r(t,e):r]))))),u=s.map(((t,e)=>iz(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 ez(t){const{title:e}=t,n=Le(t,["title"]);if((t=>!1===t||null===t)(e)||void 0===e)return null;const r=Qo(n,"title"),{direction:i,transform:o}=r,a=Array.isArray(e)?e.join(","):e;if("string"!=typeof a)return null;return iz(a,Object.assign(Object.assign({},r),{transform:o||("vertical"===i?"rotate(-90)":"")}))}function nz(t,e,n){const{title:r}=t,[i,o]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:a,[`axis${Vo(e)}`]:s}=n;return Q({title:i},a,s,Object.assign(Object.assign({},t),{title:o}))}function rz(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function iz(t,e){const n=function(t){return t instanceof Ng?t:new Zg({style:{text:`${t}`}})}(t),r=Le(e,["filter"]);n.attr(Object.assign(Object.assign({},r),{visibility:"none"}));return n.getBBox()}function oz(t,e,n,r){var i,o;const{width:a,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:y=(null!==(o=n.margin)&&void 0!==o?o:0),marginLeft:m=y,marginBottom:b=y,marginTop:x=y,marginRight:w=y,padding:k=n.padding,paddingBottom:M=k,paddingLeft:E=k,paddingRight:O=k,paddingTop:_=k}=function(t,e,n,r){const{coordinates:i}=e;if(!DI(i)&&!zI(i))return e;const o=t.filter((t=>"string"==typeof t.type&&t.type.startsWith("axis")));if(0===o.length)return e;const a=o.map((t=>nz(t,"axisArc"===t.type?"arc":"linear",n))),s=vr(a,(t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0})),c=o.flatMap(((t,e)=>tz(a[e],JF(t,r)))).filter(Zo),l=vr(c,(t=>t.height))+s,u=o.flatMap(((t,e)=>ez(a[e]))).filter((t=>null!==t)),f=0===u.length?0:vr(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),S=(t,n,r,i,o)=>{const{marks:a}=e;if(0===a.length)return[i,o];if(t-i-o-.25*t>0)return[i,o];const s=.75*t;return["auto"===n?s*i/(i+o):i,"auto"===r?s*o/(i+o):o]},A=t=>"auto"===t?20:null!=t?t:20,T=A(_),P=A(M),N=az(t,s-T-P,[T+x,P+b],["left","right"],e,n,r),{paddingLeft:C,paddingRight:L}=N,j=a-m-w,[R,I]=S(j,E,O,C,L),D=j-R-I,B=az(t,D,[R+m,I+w],["bottom","top"],e,n,r),{paddingTop:F,paddingBottom:z}=B,$=s-b-x,[W,G]=S($,M,_,z,F);return{width:a,height:s,depth:c,insetLeft:d,insetTop:p,insetBottom:g,insetRight:v,innerWidth:D,innerHeight:$-W-G,paddingLeft:R,paddingRight:I,paddingTop:G,paddingBottom:W,marginLeft:m,marginBottom:b,marginTop:x,marginRight:w,x:l,y:u,z:f}}function az(t,e,n,r,i,o,a){const s=Jn(t,(t=>t.position)),{padding:c=o.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:h=c}=i,d={paddingBottom:f,paddingLeft:l,paddingTop:h,paddingRight:u};for(const t of r){const r=`padding${Vo(pm(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=vr(t.children,(t=>t.size))):t.size=t.defaultSize},f=r=>{r.size||("auto"!==c?u(r):(YF(r,e,n,t,o,a),l(r)))},h=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},p="bottom"===t||"top"===t,g=mr(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=BF(i,p?e+n[0]+n[1]:e);t.forEach(f);const o=t.reduce(((t,{size:e,crossPadding:n=12})=>t+e+n),0);d[r]=o}}return d}function sz({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o,marginLeft:a,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:h,insetLeft:d,insetRight:p,insetTop:g}){const v=n+a,y=i+s,m=r+l,b=o+c,x=t-a-l,w=[v+d,y+g,f-d-p,u-g-h,"center",null,null];return{top:[v,0,f,y,"vertical",!0,Rn,a,x],right:[t-m,y,m,u,"horizontal",!1,Rn],bottom:[v,e-b,f,b,"vertical",!1,Rn,a,x],left:[0,y,v,u,"horizontal",!0,Rn],"top-left":[v,0,f,y,"vertical",!0,Rn],"top-right":[v,0,f,y,"vertical",!0,Rn],"bottom-left":[v,e-b,f,b,"vertical",!1,Rn],"bottom-right":[v,e-b,f,b,"vertical",!1,Rn],center:w,inner:w,outer:w}}function cz(t,e,n,r){const[i,o]=la(t,(t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))));!function(t,e,n,r){"center"===r?function(t){return el(t)&&Qc(t)}(e)?function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a},e.radar={index:t.indexOf(e),count:t.length}}(t,0,n):Qc(e)?function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,0,n):el(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){const[r,i,o]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter(((t,e)=>e%2==1)).map((t=>t+i));for(let e=0;e<t.length;e++){const n=t[e],i=c[e],a=c[e+1]-i;n.bbox={x:r,y:i,width:o,height:a}}}(t,e,n):"vertical"===r&&function(t,e,n){const[r,i,,o]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter(((t,e)=>e%2==0)).map((t=>t+r));for(let e=0;e<t.length;e++){const n=t[e],r=c[e],a=c[e+1]-r;n.bbox={x:r,y:i,width:a,height:o}}}(t,e,n)}(t,e,n,t[0].orientation):"inner"===r?function(t,e,n){const[r,i,,o]=n,[a,s]=e.getCenter(),[c]=il(e),l=o/2,u=c*l,f=a-u,h=s-u;for(let e=0;e<t.length;e++){t[e].bbox={x:r+f,y:i+h,width:2*u,height:2*u}}}(t,e,n):"outer"===r&&function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,0,n)}(i,e,n,r),function(t,e,n){if(0===t.length)return;const[r,i,o,a]=n,[s]=il(e),c=a/2*s/Math.sqrt(2),l=r+o/2,u=i+a/2;for(let e=0;e<t.length;e++){t[e].bbox={x:l-c,y:u-c,width:2*c,height:2*c}}}(o,e,n)}function lz(t,e,n){const[r,i,o,a,s,c,l,u,f]=n,[h,d,p,g,v,y,m,b]="vertical"===s?["y",i,"x",r,"height",a,"width",o]:["x",r,"y",i,"width",o,"height",a];t.sort(((t,e)=>null==l?void 0:l(t.order,e.order)));const x=t=>"title"===t||"group"===t||t.startsWith("legend"),w=(t,e,n)=>void 0===n?e:x(t)?n:e,k=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=c?d+y:d;e<t.length;e++){const r=t[e],{crossPadding:i=0,type:o}=r,{size:a}=r;r.bbox={[h]:c?n-a-i:n+i,[p]:k(o,g,u),[v]:a,[m]:w(o,b,f)},n+=(a+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[m],i=r/n.length,o=n.reduce(((t,e)=>{var n;const r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t}),"flex-start"),a=n.map(((t,e)=>{const{length:r=i,padding:o=0}=t;return r+(e===n.length-1?0:o)})),s=r-Tr(a),c="flex-start"===o?0:"center"===o?s/2:s;for(let t=0,r=e[p]+c;t<n.length;t++){const i=n[t],{padding:s=0}=i,c=t===n.length-1?0:s;i.bbox={[v]:e[v],[h]:e[h],[p]:r,[m]:a[t]-c},Q(i,{layout:{justifyContent:o}}),r+=a[t]}}}const uz=Symbol("CALLBACK_ITEM");function fz(t,e,n){const{encode:r={},scale:i={},transform:o=[]}=e,a=Le(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},a),{encode:r,scale:i,transform:o})]}function hz(t,e,n){return Re(this,void 0,void 0,(function*(){const{library:t}=n,{data:r}=e,[i]=LI("data",t),o=function(t){if(I(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=Le(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}(r),{transform:a=[]}=o,s=[Le(o,["transform"]),...a].map((t=>i(t,n))),c=yield function(t){return t.reduce(((t,e)=>n=>Re(this,void 0,void 0,(function*(){const r=yield t(n);return e(r)}))),Yo)}(s)(r),l=!r||Array.isArray(r)||Array.isArray(c)?c:{value:c};return[Array.isArray(c)?aa(c):[],Object.assign(Object.assign({},e),{data:l})]}))}function dz(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 pz(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const o=oa(r,(t=>{if(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;const{type:e}=t;return Zo(e)}(t))return t;const e=function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some((t=>void 0!==t[e]))}(t,e)?"field":"constant"}(i,t);return{type:e,value:t}}));return[t,Object.assign(Object.assign({},e),{encode:o})]}function gz(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=oa(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 vz(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:o}=n,a=function(t){const[e]=LI("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:Mz(n)})}(o),s=oa(r,(t=>a(i,t)));return[t,Object.assign(Object.assign({},e),{encode:s})]}function yz(t,e,n){const{tooltip:r={}}=e;return ra(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:na(r)&&LE(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function mz(t,e,n){const{data:r,encode:i,tooltip:o={}}=e;if(ra(o))return[t,e];const a=e=>{if(!e)return e;if("string"==typeof e)return t.map((t=>({name:e,value:r[t][e]})));if(na(e)){const{field:n,channel:o,color:a,name:s=n,valueFormatter:c=t=>t}=e,l="string"==typeof c?dA(c):c,u=o&&i[o],f=u&&i[o].field,h=s||f||o,d=[];for(const e of t){const t=n?r[e][n]:u?i[o].value[e]:null;d[e]={name:h,color:a,value:l(t)}}return d}if("function"==typeof e){const n=[];for(const o of t){const t=e(r[o],o,r,i);na(t)?n[o]=Object.assign(Object.assign({},t),{[uz]:!0}):n[o]={value:t}}return n}return e},{title:s,items:c=[]}=o,l=Le(o,["title","items"]),u=Object.assign({title:a(s),items:Array.isArray(c)?c.map(a):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function bz(t,e,n){const{encode:r}=e,i=Le(e,["encode"]);if(!r)return[t,e];const o=Object.entries(r),a=o.filter((([,t])=>{const{value:e}=t;return Array.isArray(e[0])})).flatMap((([e,n])=>{const r=[[e,new Array(t.length).fill(void 0)]],{value:i}=n,o=Le(n,["value"]);for(let n=0;n<i.length;n++){const o=i[n];if(Array.isArray(o))for(let i=0;i<o.length;i++){const a=r[i]||[`${e}${i}`,new Array(t).fill(void 0)];a[1][n]=o[i],r[i]=a}}return r.map((([t,e])=>[t,Object.assign({type:"column",value:e},o)]))})),s=Object.fromEntries([...o,...a]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function xz(t,e,n){const{axis:r={},legend:i={},slider:o={},scrollbar:a={}}=e,s=(t,e)=>{if("boolean"==typeof t)return t?{}:null;const n=t[e];return void 0===n||n?n:null},c="object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return Q(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map((t=>{const e=s(a,t);return[t,Object.assign({guide:s(r,t),slider:s(o,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]})))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function wz(t,e,n){const{animate:r}=e;return r||void 0===r||Q(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function kz(t,e,n){return Re(this,void 0,void 0,(function*(){const[r,i]=yield function(t,e,n){return Re(this,void 0,void 0,(function*(){const{library:r}=n,[i]=LI("transform",r),{preInference:o=[],postInference:a=[]}=e,{transform:s=[]}=t,c=[fz,hz,dz,pz,gz,vz,bz,wz,xz,yz,...o.map(i),...s.map(i),...a.map(i),mz];let l=[],u=t;for(const t of c)[l,u]=yield t(l,u,n);return[l,u]}))}(t,e,n),{encode:o,scale:a,data:s,tooltip:c}=i;if(!1===Array.isArray(s))return null;const{channels:l}=e,u=nr(Object.entries(o).filter((([,t])=>Zo(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:o,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=a[t]||{},{independent:h=!1,key:d=r||t,type:p=(u?"constant":l?"identity":n)}=f,g=Le(f,["independent","key","type"]),v="constant"===p,y=v?void 0:i;return{name:t,values:e,scaleKey:h||v?Symbol("independent"):d,scale:Object.assign(Object.assign({type:p,range:y},g),{quantitative:o,ordinal:s})}}))}));return[i,Object.assign(Object.assign({},e),{index:r,channels:f,tooltip:c})]}))}function Mz(t){const{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}function Ez(t,e,n){var r;return Re(this,void 0,void 0,(function*(){const{library:i}=n,[o]=LI("composition",i),[a]=LI("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(Zo)),c=new Set(Object.keys(i).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Zo)),l=t=>{const{type:e}=t;if("function"==typeof e){const{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||c.has(e)?"mark":e},u=t=>"mark"===l(t),f=t=>"standardView"===l(t),h=t=>{const{type:e}=t;return"string"==typeof e&&!!c.has(e)},d=t=>{if(f(t))return[t];const e=l(t);return o({type:e,static:h(t)})(t)},p=[],g=new Map,v=new Map,y=[t],m=[];for(;y.length;){const t=y.shift();if(f(t)){const e=v.get(t),[r,o]=e?Pz(e,t,i):yield Sz(t,n);g.set(r,t),p.push(r);const a=o.flatMap(d).map((t=>RI(t,i)));if(y.push(...a),a.every(f)){const t=yield Promise.all(a.map((t=>Az(t,n))));bF(t);for(let e=0;e<a.length;e++){const n=a[e],r=t[e];v.set(n,r)}}}else{const e=d(u(t)?t:yield Yz(t,n));Array.isArray(e)?y.push(...e):"function"==typeof e&&m.push(e())}}n.emitter.emit(fN.BEFORE_PAINT);const b=new Map,w=new Map,k=[];e.selectAll(Xz(WT)).data(p,(t=>t.key)).join((t=>t.append("g").attr("className",WT).attr("id",(t=>t.key)).call(Oz).each((function(t,e,r){Nz(t,uy(r),k,n),b.set(t,r)}))),(t=>t.call(Oz).each((function(t,e,r){Nz(t,uy(r),k,n),w.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,o])=>{const a=r||new Map,s=g.get(i),c=function(t,e,n){const{library:r}=n,i=function(t){const[,e]=LI("interaction",t);return t=>{const[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(r),o=t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate,a=Hz(e),s=a.map(i).filter(o).map((t=>t[0]));return(e,r,i)=>Re(this,void 0,void 0,(function*(){const o=[],[a,c]=yield Sz(e,n);Nz(a,t,o,n);for(const i of s.filter((t=>t!==r)))_z(i,t,e,a,n);for(const e of c)Ez(e,t,n);return i(),{options:e,view:a}}))}(uy(o),s,n);return{view:i,container:o,options:s,setState:(t,e=t=>t)=>a.set(t,e),update:(n,r)=>Re(this,void 0,void 0,(function*(){const i=qo(Array.from(a.values()))(s);return yield c(i,n,(()=>{x(r)&&e(t,r,a)}))}))}})),E=(t=w,e,r)=>{var i;const o=M(t,E,r);for(const t of o){const{options:r,container:s}=t,c=s.nameInteraction;let l=Hz(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=Tz(t.view,r,s,a)(t,o,n.emitter);c.set(r,{destroy:e})}}}},O=M(b,E);for(const t of O){const{options:e}=t,r=new Map;t.container.nameInteraction=r;for(const i of Hz(e)){const[e,o]=i;if(o){const i=Tz(t.view,e,o,a)(t,O,n.emitter);r.set(e,{destroy:i})}}}E();const{width:_,height:S}=t,A=[];for(const t of m){const r=new Promise((r=>Re(this,void 0,void 0,(function*(){for(const r of t){const t=Object.assign({width:_,height:S},r);yield Ez(t,e,n)}r()}))));A.push(r)}n.views=p,null===(r=n.animations)||void 0===r||r.forEach((t=>null==t?void 0:t.cancel())),n.animations=k,n.emitter.emit(fN.AFTER_PAINT);const T=k.filter(Zo).map(zz).map((t=>t.finished));return Promise.all([...T,...A])}))}function Oz(t){t.style("transform",(t=>`translate(${t.layout.x}, ${t.layout.y})`))}function _z(t,e,n,r,i){var o;const{library:a}=i,[s]=LI("interaction",a),c=e.node().nameInteraction,l=Hz(n).find((([e])=>e===t)),u=c.get(t);if(!u)return;if(null===(o=u.destroy)||void 0===o||o.call(u),!l[1])return;const f=Tz(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 Sz(t,e){return Re(this,void 0,void 0,(function*(){const{library:n}=e,r=yield function(t,e){return Re(this,void 0,void 0,(function*(){const{library:n}=e,[r,i]=LI("mark",n),o=new Set(Object.keys(n).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Zo)),{marks:a}=t,s=[],c=[],l=[...a],{width:u,height:f}=function(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:o=r,paddingTop:a=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:h=c,inset:d=0,insetLeft:p=d,insetRight:g=d,insetTop:v=d,insetBottom:y=d}=t,m=t=>"auto"===t?20:t;return{width:n-m(i)-m(o)-l-u-p-g,height:e-m(a)-m(s)-f-h-v-y}}(t),h={options:t,width:u,height:f};for(;l.length;){const[t]=l.splice(0,1),n=yield Yz(t,e),{type:a=Uo("G2Mark type is required."),key:u}=n;if(o.has(a))c.push(n);else{const{props:t={}}=i(a),{composite:e=!0}=t;if(e){const{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),i=yield r(e,h),o=Array.isArray(i)?i:[i];l.unshift(...o.map(((t,e)=>Object.assign(Object.assign({},t),{key:`${u}-${e}`}))))}else s.push(n)}}return Object.assign(Object.assign({},t),{marks:s,components:c})}))}(t,e),i=function(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,o=Le(t,["coordinate","interaction","style","marks"]),a=i.map((t=>t.coordinate||{})),s=i.map((t=>t.interaction||{})),c=i.map((t=>t.viewStyle||{})),l=[...a,e].reduceRight(((t,e)=>Q(t,e)),{}),u=[n,...s].reduce(((t,e)=>Q(t,e)),{}),f=[...c,r].reduce(((t,e)=>Q(t,e)),{});return Object.assign(Object.assign({},o),{marks:i,coordinate:l,interaction:u,style:f})}(r);t.interaction=i.interaction,t.coordinate=i.coordinate,t.marks=[...i.marks,...i.components];const o=RI(i,n);return Pz(yield Az(o,e),o,n)}))}function Az(t,e){return Re(this,void 0,void 0,(function*(){const{library:n}=e,[r]=LI("theme",n),[,i]=LI("mark",n),{theme:o,marks:a,coordinates:s=[]}=t,c=r(Gz(o)),l=new Map;for(const t of a){const{type:n}=t,{props:r={}}=i(n),o=yield kz(t,r,e);if(o){const[t,e]=o;l.set(t,e)}}const u=Jn(Array.from(l.values()).flatMap((t=>t.channels)),(({scaleKey:t})=>t));for(const t of u.values()){const e=t.reduce(((t,{scale:e})=>Q(t,e)),{}),{scaleKey:r}=t[0],{values:i}=t[0],o=Array.from(new Set(i.map((t=>t.field)).filter(Zo))),a=Q({guide:{title:0===o.length?void 0:o},field:o[0]},e),{name:l}=t[0],u=t.flatMap((({values:t})=>t.map((t=>t.value)))),f=Object.assign(Object.assign({},gF(l,u,a,s,c,n)),{uid:Symbol("scale"),key:r});t.forEach((t=>t.scale=f))}return l}))}function Tz(t,e,n,r){const i=t.theme,o="string"==typeof e&&i[e]||{};return r(Q(o,Object.assign({type:e},n)))}function Pz(t,e,n){var r;const[i]=LI("mark",n),[o]=LI("theme",n),[a]=LI("labelTransform",n),{key:s,frame:c=!1,theme:l,clip:u,style:f={},labelTransform:h=[]}=e,d=o(Gz(l)),p=Array.from(t.values()),g=function(t,e){var n;const{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],o=Array.from(new Set(t.flatMap((t=>t.channels.map((t=>t.scale)))))),a=new Map(o.map((t=>[t.name,t])));for(const t of r){const e=xF(t);for(const r of e){const e=a.get(r),s=(null===(n=t.scale)||void 0===n?void 0:n[r])||{},{independent:c=!1}=s;if(e&&!c){const{guide:n}=e,r="boolean"==typeof n?{}:n;e.guide=Q({},r,t),Object.assign(e,s)}else{const e=Object.assign(Object.assign({},s),{expectedDomain:s.domain,name:r,guide:ot(t,i)});o.push(e)}}}return o}(p,e),v=function(t){return t.map((t=>{const e=Q(t,t.style);return delete e.style,e}))}(IF(function(t,e,n){var r;for(const[e]of n.entries())if("cell"===e.type)return t.filter((t=>"shape"!==t.name));if(1!==e.length||t.some((t=>"shape"===t.name)))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},a=(null===(r=t.find((t=>"color"===t.name)))||void 0===r?void 0:r.field)||null,s={field:a,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...t,s]}(Array.from(g),p,t),e,n)),y=oz(v,e,d,n),m=function(t,e,n){const[r]=LI("coordinate",n),{innerHeight:i,innerWidth:o,insetLeft:a,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=(h=u).find((t=>"cartesian"===t.type||"cartesian3D"===t.type))?h:[...h,{type:"cartesian"}];var h;const d="cartesian3D"===f[0].type,p=Object.assign(Object.assign({},t),{x:a,y:s,width:o-a-c,height:i-l-s,transformations:f.flatMap(r)});return d?new VC(p):new GC(p)}(y,e,n),b=c?Q({mainLineWidth:1,mainStroke:"#000"},f):f;!function(t,e,n){const r=Jn(t,(t=>`${t.plane||"xy"}-${t.position}`)),{paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:y,height:m,width:b,depth:x}=n,w={xy:sz({width:b,height:m,paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:y}),yz:sz({width:x,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:sz({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[t,n]of r.entries()){const[r,i]=t.split("-"),o=w[r][i],[a,s]=la(n,(t=>"string"==typeof t.type&&("center"===i||!(!t.type.startsWith("axis")||!["inner","outer"].includes(i)))));a.length&&cz(a,e,o,i),s.length&&lz(n,0,o)}}(BF(v),m,y),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,mF(t,n)]))})));!function(t,e){const n=Array.from(t.values()).flatMap((t=>t.channels)),r=nr(n,(t=>t.map((t=>e.get(t.scale.uid)))),(t=>t.name)).filter((([,t])=>t.some((t=>"function"==typeof t.getOptions().groupTransform))&&t.every((t=>t.getTicks)))).map((t=>t[1]));r.forEach((t=>{const e=t.map((t=>t.getOptions().groupTransform))[0];e(t)}))}(t,x);const w={};for(const t of v){const{scales:e=[]}=t,i=[];for(const t of e){const{name:e,uid:o}=t,a=null!==(r=x.get(o))&&void 0!==r?r:mF(t,n);i.push(a),"y"===e&&a.update(Object.assign(Object.assign({},a.getOptions()),{xScale:w.x})),yF(w,{[e]:a})}t.scaleInstances=i}const k=[],M=new Map;for(const[e,n]of t.entries()){const{children:t,dataDomain:r,modifier:o,key:a,data:c}=e;M.set(a,c);const{index:l,channels:u,tooltip:f}=n,h=Object.fromEntries(u.map((({name:t,scale:e})=>[t,e]))),d=oa(h,(({uid:t})=>x.get(t)));yF(w,d);const p=vF(u,d),g=i(e),[v,b,E]=Cz(g(l,d,p,m)),O=r||v.length,_=o?o(b,O,y):[],S=t=>{var e,n;return null===(n=null===(e=f.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},A=t=>f.items.map((e=>e[t])),T=v.map(((t,e)=>{const n=Object.assign({points:b[e],transform:_[e],index:t,markKey:a,viewKey:s,data:c[t]},f&&{title:S(t),items:A(t)});for(const[r,i]of Object.entries(p))n[r]=i[t],E&&(n[`series${G(r)}`]=E[e].map((t=>i[t])));return E&&(n.seriesIndex=E[e]),E&&f&&(n.seriesItems=E[e].map((t=>A(t))),n.seriesTitle=E[e].map((t=>S(t)))),n}));n.data=T,n.index=v;const P=null==t?void 0:t(T,d,y);k.push(...P||[])}return[{layout:y,theme:d,coordinate:m,markState:t,key:s,clip:u,scale:w,style:b,components:v,data:M,labelTransform:qo(h.map(a))},k]}function Nz(t,e,n,r){return Re(this,void 0,void 0,(function*(){const{library:i}=r,{components:o,theme:a,layout:s,markState:c,coordinate:l,key:u,style:f,clip:h,scale:d}=t,{x:p,y:g,width:v,height:y}=s,m=Le(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map(((t,e)=>e)),w=b.map((t=>Jo(Object.assign({},a.view,f),t))),k=["a","margin","padding","inset"].map((t=>Qo(m,t))),M=t=>t.style("x",(t=>A[t].x)).style("y",(t=>A[t].y)).style("width",(t=>A[t].width)).style("height",(t=>A[t].height)).each((function(t,e,n){!function(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}(uy(n),w[t])}));let E=0,O=0,_=v,S=y;const A=x.map((t=>{const e=k[t],{left:n=0,top:r=0,bottom:i=0,right:o=0}=e;return E+=n,O+=r,_-=n+o,S-=r+i,{x:E,y:O,width:_,height:S}}));e.selectAll(Xz(qT)).data(x.filter((t=>Zo(w[t]))),(t=>b[t])).join((t=>t.append("rect").attr("className",qT).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:o}=i,{enter:a={},update:s={},exit:c={}}=t,{type:l,duration:u=300,delay:f=0}=s,{type:h,duration:d=300,delay:p=0}=a,{type:g,duration:v=300,delay:y=0}=c;for(const t of o){const{updateType:r=l,updateDuration:i=u,updateDelay:o=f,enterType:a=h,enterDuration:s=d,enterDelay:c=p,exitDuration:m=v,exitDelay:b=y,exitType:x=g}=t;(void 0===r||r)&&(e=Math.max(e,i+o),n=Math.min(n,o)),(void 0===x||x)&&(e=Math.max(e,m+b),n=Math.min(n,b)),(void 0===a||a)&&(e=Math.max(e,s+c),n=Math.min(n,c))}}return e===-1/0?null:[n,e-n]}(c),P=!!T&&{duration:T[1]};for(const[,t]of tr(o,(t=>`${t.type}-${t.position}`)))t.forEach(((t,e)=>t.index=e));const N=e.selectAll(Xz(HT)).data(o,(t=>`${t.type}-${t.position}-${t.index}`)).join((t=>t.append("g").style("zIndex",(({zIndex:t})=>t||-1)).attr("className",HT).append((t=>DF(Q({animate:P,scale:d},t),l,a,i,c)))),(t=>t.transition((function(t,e,n){const{preserve:r=!1}=t;if(r)return;const o=DF(Q({animate:P,scale:d},t),l,a,i,c),{attributes:s}=o,[u]=n.childNodes;return u.update(s,!1)})))).transitions();n.push(...N.flat().filter(Zo));const C=e.selectAll(Xz(GT)).data([s],(()=>u)).join((t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",GT).call(qz).call(Uz,Array.from(c.keys())).call(Zz,h)),(t=>t.call(Uz,Array.from(c.keys())).call((t=>T?function(t,e){const[n,r]=e;t.transition((function(t,e,i){const{transform:o,width:a,height:s}=i.style,{paddingLeft:c,paddingTop:l,innerWidth:u,innerHeight:f,marginLeft:h,marginTop:d}=t,p=[{transform:o,width:a,height:s},{transform:`translate(${c+h}, ${l+d})`,width:u,height:f}];return i.animate(p,{delay:n,duration:r,fill:"both"})}))}(t,T):qz(t))).call(Zz,h))).transitions();n.push(...C.flat());for(const[o,a]of c.entries()){const{data:s}=a,{key:c,class:l,type:u}=o,f=e.select(`#${c}`),h=Iz(o,a,t,r),d=Fz(o,a,t,i),p=$z(o,a,t,i),g=Wz(o,a,t,i),v=jz(e,f,l,"element"),y=f.selectAll(Xz($T)).selectFacetAll(v).data(s,(t=>t.key),(t=>t.groupKey)).join((t=>t.append(h).attr("className",$T).attr("markType",u).transition((function(t,e,n){return d(t,[n])}))),(t=>t.call((t=>{const e=t.parent(),n=Ko((t=>{const[e,n]=t.getBounds().min;return[e,n]}));t.transition((function(t,r,i){Rz(i,e,n);const o=h(t,r),a=p(t,[i],[o]);return(null==a?void 0:a.length)||(i.nodeName===o.nodeName&&"g"!==o.nodeName?Xo(i,o):(i.parentNode.replaceChild(o,i),o.className=$T,o.markType=u,o.__data__=i.__data__)),a})).attr("markType",u).attr("className",$T)}))),(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",$T).attr("markType",u).transition((function(t,e,n){const{__fromElements__:r}=n,i=p(t,r,[n]);return new fy(r,null,n.parentNode).transition(i).remove(),i}))),(t=>t.transition((function(t,e,n){const r=new fy([],n.__toData__,n.parentNode).append(h).attr("className",$T).attr("markType",u).nodes();return p(t,[n],r)})).remove())).transitions();n.push(...y.flat())}!function(t,e,n,r,i){const[o]=LI("labelTransform",r),{markState:a,labelTransform:s}=t,c=e.select(Xz(zT)).node(),l=new Map,u=new Map,f=Array.from(a.entries()).flatMap((([n,o])=>{const{labels:a=[],key:s}=n,c=function(t,e,n,r,i){const[o]=LI("shape",r),{data:a,encode:s}=t,{data:c,defaultLabelShape:l}=e,u=c.map((t=>t.points)),f=oa(s,(t=>t.value)),{theme:h,coordinate:d}=n,p=Object.assign(Object.assign({},i),{document:jI(i),theme:h,coordinate:d});return t=>{const{index:e,points:n}=t,r=a[e],{formatter:i=t=>`${t}`,transform:s,style:c,render:d,selector:g,element:v}=t,y=Le(t,["formatter","transform","style","render","selector","element"]),m=oa(Object.assign(Object.assign({},y),c),(t=>Lz(t,r,e,a,{channel:f,element:v}))),{shape:b=l,text:x}=m,w=Le(m,["shape","text"]),k="string"==typeof i?dA(i):i,M=Object.assign(Object.assign({},w),{text:k(x,r,e,a),datum:r}),E=Object.assign({type:`label.${b}`,render:d},w);return o(E,p)(n,M,Dz(h,"label",b,"label"),u)}}(n,o,t,r,i),f=e.select(`#${s}`).selectAll(Xz($T)).nodes().filter((t=>!t.__removed__));return a.flatMap(((t,e)=>{const n=Le(t,["transform"]);return f.flatMap((r=>{const i=function(t,e,n){const{seriesIndex:r,seriesKey:i,points:o,key:a,index:s}=n.__data__,c=function(t){const e=t.cloneNode(!0),n=t.getAnimations();e.style.visibility="hidden",n.forEach((t=>{const n=t.effect.getKeyframes();e.attr(n[n.length-1])})),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:i,max:o}=r;return[i,o]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${a}-${e}`,bounds:c,index:s,points:o,dependentElement:n})];const l=function(t){const{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw new Error(`Unknown selector: ${e}`)}(t),u=r.map(((r,a)=>Object.assign(Object.assign({},t),{key:`${i[a]}-${e}`,bounds:[o[a]],index:r,points:o,dependentElement:n})));return l?l(u):u}(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=uy(c).selectAll(Xz(YT)).data(f,(t=>t.key)).join((t=>t.append((t=>l.get(t)(t))).attr("className",YT)),(t=>t.each((function(t,e,n){Xo(n,l.get(t)(t))}))),(t=>t.remove())).nodes(),d=Jn(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;qo(n.map(o))(e,v)}s&&s(h,v)}(t,e,0,i,r)}))}function Cz([t,e,n]){if(n)return[t,e,n];const r=[],i=[];for(let n=0;n<t.length;n++){const o=t[n],a=e[n];a.every((([t,e])=>Zo(t)&&Zo(e)))&&(r.push(o),i.push(a))}return[r,i]}function Lz(t,e,n,r,i){return"function"==typeof t?t(e,n,r,i):"string"!=typeof t?t:na(e)&&void 0!==e[t]?e[t]:t}function jz(t,e,n,r){const i=t.node().parentElement;return i&&"function"==typeof i.findAll?i.findAll((t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node())).flatMap((t=>t.getElementsByClassName(r))):[]}function Rz(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=e.parentNode,[o,a]=n(r),[s,c]=n(i);!function(t,e){const{transform:n}=t.style,r=(t=>"none"===t||void 0===t)(n)?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${o-s}, ${a-c})`),e.append(t)}function Iz(t,e,n,r){const{library:i}=r,[o]=LI("shape",i),{data:a,encode:s}=t,{defaultShape:c,data:l,shape:u}=e,f=oa(s,(t=>t.value)),h=l.map((t=>t.points)),{theme:d,coordinate:p}=n,{type:g,style:v={}}=t,y=Object.assign(Object.assign({},r),{document:jI(r),coordinate:p,theme:d});return e=>{const{shape:n=c}=v,{shape:r=n,points:i,seriesIndex:s,index:l}=e,p=Le(e,["shape","points","seriesIndex","index"]),m=Object.assign(Object.assign({},p),{index:l}),b=s?s.map((t=>a[t])):a[l],x=s||l,w=oa(v,(t=>Lz(t,b,x,a,{channel:f})));return(u[r]?u[r](w,y):o(Object.assign(Object.assign({},w),{type:Vz(t,r)}),y))(i,m,Dz(d,g,r,c),h)}}function Dz(t,e,n,r){if("string"!=typeof e)return;const{color:i}=t,o=t[e]||{},a=o[n]||o[r];return Object.assign({color:i},a)}function Bz(t,e,n,r,i){var o,a;const[,s]=LI("shape",i),[c]=LI("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:h}=r,d=`default${G(t)}Animation`,{[d]:p}=(null===(o=u[l])||void 0===o?void 0:o.props)||s(Vz(e,l)).props,{[t]:g={}}=f,v=(null===(a=e.animate)||void 0===a?void 0:a[t])||{},y={coordinate:h};return(e,n,r)=>{const{[`${t}Type`]:i,[`${t}Delay`]:o,[`${t}Duration`]:a,[`${t}Easing`]:s}=e,l=Object.assign({type:i||p},v);if(!l.type)return null;const u=c(l,y)(n,r,Q(g,{delay:o,duration:a,easing:s}));let f=[];return f=Array.isArray(u)?u:[u],f.filter(Boolean)}}function Fz(t,e,n,r){return Bz("enter",t,e,n,r)}function zz(t){return t.finished.then((()=>{t.cancel()})),t}function $z(t,e,n,r){return Bz("update",t,e,n,r)}function Wz(t,e,n,r){return Bz("exit",t,e,n,r)}function Gz(t={}){if("string"==typeof t)return{type:t};const{type:e="light"}=t,n=Le(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Hz(t){const{interaction:e={}}=t;return Object.entries(Q({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function Yz(t,e){return Re(this,void 0,void 0,(function*(){const{data:n}=t,r=Le(t,["data"]);if(null==n)return t;const[,{data:i}]=yield hz(0,{data:n},e);return Object.assign({data:i},r)}))}function qz(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 Vz(t,e){const{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function Uz(t,e){const n=t=>void 0!==t.class?`${t.class}`:"";if(0===t.nodes().length)return;t.selectAll(Xz(FT)).data(e,(t=>t.key)).join((t=>t.append("g").attr("className",FT).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(Xz(zT)).node()||t.append("g").attr("className",zT).style("zIndex",0)}function Xz(...t){return t.map((t=>`.${t}`)).join("")}function Zz(t,e){t.node()&&t.style("clipPath",(t=>{if(!e)return null;const{paddingTop:n,paddingLeft:r,marginLeft:i,marginTop:o,innerWidth:a,innerHeight:s}=t;return new Ug({style:{x:r+i,y:n+o,width:a,height:s}})}))}function Kz(t){const{style:e,scale:n,type:r}=t,i={},o=rt(e,"columnWidthRatio");return o&&"interval"===r&&(i.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-o})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),i)})}function Qz(t){const e=function(t){return function(...t){return e=>t.reduce(((t,e)=>e(t)),e)}(Kz)(t)}(t);return e.children&&Array.isArray(e.children)&&(e.children=e.children.map((t=>Qz(t)))),e}function Jz(t){const e=Q({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){const t=i.shift();if(void 0===t.key){const e=n.get(t),i=r.get(t),o=null===e?"0":`${e.key}-${i}`;t.key=o}const{children:e=[]}=t;if(Array.isArray(e))for(let o=0;o<e.length;o++){const a=Q({},e[o]);e[o]=a,n.set(a,t),r.set(a,o),i.push(a)}}return e}function t$(t,e){const n=new aN;return n.registerPlugin(new cN),new fv({width:t,height:e,container:document.createElement("div"),renderer:n})}function e$(t,e={},n=()=>{},r=t=>{throw t}){const i=jN(t),{width:o=640,height:a=480,depth:s=0}=i,c=Jz(Qz(i)),{canvas:l=t$(o,a),emitter:u=new uN,library:f}=e;e.canvas=l,e.emitter=u;const{width:h,height:d}=l.getConfig();h===o&&d===a||l.resize(o,a),u.emit(fN.BEFORE_RENDER);const p=uy(l.document.documentElement);return l.ready.then((()=>Ez(Object.assign(Object.assign({},c),{width:o,height:a,depth:s}),p,e))).then((()=>{if(s){const[t,e]=l.document.documentElement.getPosition();l.document.documentElement.setPosition(t,e,-s/2)}l.requestAnimationFrame((()=>{l.requestAnimationFrame((()=>{u.emit(fN.AFTER_RENDER),null==n||n()}))}))})).catch((t=>{null==r||r(t)})),"string"==typeof(g=l.getConfig().container)?document.getElementById(g):g;var g}function n$(t,e={},n=!1,r=!0){const{canvas:i,emitter:o}=e;i&&(!function(t){const e=t.getRoot().querySelectorAll(`.${WT}`);null==e||e.forEach((t=>{const{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach((t=>{null==t||t.destroy()}))}))}(i),n?i.destroy():i.destroyChildren()),r&&o.off()}function r$(t,e){if(e(t))return!0;if("g"===t.tagName){const{childNodes:n=[]}=t;for(const t of n)if(r$(t,e))return!0}return!1}const i$={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function o$(t,e){let n;return r$(t,(t=>{var r;return"g"!==t.tagName&&void 0!==(null===(r=t.style)||void 0===r?void 0:r[e])&&(n=t.style[e],!0)})),null!=n?n:i$[e]}function a$(t,e,n,r){t.style[e]=n,r&&t.children.forEach((t=>a$(t,e,n,r)))}function s$(t){a$(t,"visibility","hidden",!0)}function c$(t){a$(t,"visibility","visible",!0)}function l$(t){return uy(t).selectAll(`.${$T}`).nodes().filter((t=>!t.__removed__))}function u$(t,e){return f$(t,e).flatMap((({container:t})=>l$(t)))}function f$(t,e){return e.filter((e=>e!==t&&e.options.parentKey===t.options.key))}function h$(t){return uy(t).select(`.${GT}`).node()}function d$(t){if("g"===t.tagName)return t.getRenderBounds();const e=t.getGeometryBounds(),n=new uu;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function p$(t,e){const{offsetX:n,offsetY:r}=e,i=d$(t),{min:[o,a],max:[s,c]}=i;return n<o||n>s||(r<a||r>c)?null:[n-o,r-a]}function g$(t,e){const{offsetX:n,offsetY:r}=e,[i,o,a,s]=function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,o]}=e;return[n,r,i,o]}(t);return[Math.min(a,Math.max(i,n))-i,Math.min(s,Math.max(o,r))-o]}function v$(t){return t=>t.__data__.color}function y$(t){return t=>t.__data__.x}function m$(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap((t=>Array.from(t.markState.keys()).map((e=>[E$(t.key,e.key),e.data])))));return t=>{const{index:e,markKey:r,viewKey:i}=t.__data__;return n.get(E$(i,r))[e]}}const b$={selected:3,unselected:3,active:2,inactive:2,default:1},x$={selection:["selected","unselected"],highlight:["active","inactive"]},w$=(t,e,n)=>{r$(t,(t=>{"setAttribute"in t&&"function"==typeof t.setAttribute&&t.setAttribute(e,n)}))};function k$(t,e){return e.forEach((e=>{const n=e.__interactionStyle__;e.__interactionStyle__=n?Object.assign(Object.assign({},n),t):t})),(t=(t,e)=>t,e=w$)=>M$(void 0,t,e)}function M$(t,e=(t,e)=>t,n=w$){const r="__states__",i="__ordinal__",o=t=>b$[t]||b$.default,a=t=>{var e;return null===(e=Object.entries(x$).find((([e,n])=>n.includes(t))))||void 0===e?void 0:e[0]},s=a=>{var s;const{[r]:c=[],[i]:l={}}=a,u=[...c].sort(((t,e)=>o(e)-o(t))),f=new Map;for(const e of u){const n=(null===(s=null!=t?t:a.__interactionStyle__)||void 0===s?void 0:s[e])||{};for(const[t,e]of Object.entries(n))f.has(t)||f.set(t,e)}const h=Object.assign({},l);for(const[t,e]of f.entries())h[t]=e;if(0!==Object.keys(h).length){for(const[t,r]of Object.entries(h)){const i=o$(a,t),o=e(r,a);n(a,t,o),t in l||(l[t]=i)}a[i]=l}},c=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{c(t),t[r]=[...e],s(t)},updateState:(t,...e)=>{c(t);const n=t[r],i=new Set(e.map((t=>a(t))).filter((t=>void 0!==t))),o=n.filter((t=>!i.has(a(t))));t[r]=[...o,...e],s(t)},removeState:(t,...e)=>{c(t);for(const n of e){const e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}s(t)},hasState:(t,e)=>(c(t),-1!==t[r].indexOf(e))}}function E$(t,e){return`${t},${e}`}function O$(t,e){const n=(Array.isArray(t)?t:[t]).flatMap((t=>t.marks.map((e=>[E$(t.key,e.key),e.state])))),r={};for(const t of e){const[e,i]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce(((t,n)=>{const[r,o={}]=n,a=void 0===(s=o[e])||"object"==typeof s&&0===Object.keys(s).length?i:o[e];var s;for(const[e,n]of Object.entries(a)){const i=t[e],o=(t,e,o,a)=>{const s=E$(a.__data__.viewKey,a.__data__.markKey);return r!==s?null==i?void 0:i(t,e,o,a):"function"!=typeof n?n:n(t,e,o,a)};t[e]=o}return t}),{})}return r}function _$(t,e){const n=new Map(t.map(((t,e)=>[t,e]))),r=e?t.map(e):t;return(t,i)=>{if("function"!=typeof t)return t;const o=n.get(i);return t(e?e(i):i,o,r,i)}}function S$(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=Le(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const o=t=>t.__data__.points,a=(t,e)=>{const[,n,r]=t,[i,,,o]=e;return[n,i,o,r]};return[t=>{var e;if(t.length<=1)return;const r=ir(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=cc(),c=r[t-1],l=r[t],[u,f,h,d]=a(o(c),o(l));s.moveTo(...u),s.lineTo(...f),s.lineTo(...h),s.lineTo(...d),s.closePath();const p=oa(i,(t=>n(t,c))),{fill:g=c.getAttribute("fill")}=p,v=Le(p,["fill"]),y=new Gg({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(y),c.link=y}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function A$(t,e,n){const r=e=>{const{transform:n}=t.style;return n?`${n} ${e}`:e};if(Qc(n)){const{points:i}=t.__data__,[o,a]=Kc(n)?yy(i):i,s=n.getCenter(),c=_s(o,s),l=_s(a,s),u=Ts(c)+Ns(c,l)/2;return r(`translate(${e*Math.cos(u)}, ${e*Math.sin(u)})`)}return Kc(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function T$(t){var{document:e,background:n,scale:r,coordinate:i,valueof:o}=t,a=Le(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(t,e,n)=>{const r=t.invert(e),i=e+t.getBandWidth(r)/2,o=t.getStep(r)/2,a=o*n;return[i-o+a,i+o-a]},l=(t,n)=>{const{padding:o}=n,[a,s]=((t,e)=>{const{x:n}=r;if(!eT(n))return[0,1];const{__data__:i}=t,{x:o}=i,[a,s]=c(n,o,e);return[a,s]})(t,o),[l,u]=((t,e)=>{const{y:n}=r;if(!eT(n))return[0,1];const{__data__:i}=t,{y:o}=i,[a,s]=c(n,o,e);return[a,s]})(t,o),f=[[a,l],[s,l],[s,u],[a,u]].map((t=>i.map(t))),{__data__:h}=t,{y:d,y1:p}=h;return ky(e,f,{y:d,y1:p},i,n)},u=(t,e)=>{const{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,o=Le(e,["transform","transformOrigin","stroke"]),a=Object.assign({transform:n,transformOrigin:r,stroke:i},o),s=t.cloneNode(!0);for(const[t,e]of Object.entries(a))s.style[t]=e;return s};return[t=>{t.background&&t.background.remove();const e=oa(a,(e=>o(e,t))),{fill:n="#CCD6EC",fillOpacity:i=.3,zIndex:c=-2,padding:f=.001,lineWidth:h=0}=e,d=Le(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(eT)})()?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 P$(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 N$(t){P$(t,t.cursor)}function C$(t,e,n){return t.find((t=>Object.entries(e).every((([e,r])=>n(t)[e]===r))))}function L$(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function j$(t,e=!1){const n=y(t,(t=>!!t)).map(((t,e)=>[0===e?"M":"L",...t]));return e&&n.push(["Z"]),n}function R$(t){return t.querySelectorAll(".element")}function I$(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}const D$=["interval","point","density"];function B$({elementsof:t,root:e,coordinate:n,scale:r,validFindByXMarks:i=D$}){var o,a;let s=t(e);const c=t=>i.includes(t.markType);if(s.find(c)){s=s.filter(c);const t=r.x,i=r.series,l=null!==(a=null===(o=null==t?void 0:t.getBandWidth)||void 0===o?void 0:o.call(t))&&void 0!==a?a:0,u=i?t=>{var e,n;const r=Math.round(1/(null!==(e=i.valueBandWidth)&&void 0!==e?e:1));return t.__data__.x+(null!==(n=t.__data__.series)&&void 0!==n?n:0)*l+l/(2*r)}:t=>t.__data__.x+l/2;return s.sort(((t,e)=>u(t)-u(e))),t=>{const r=p$(e,t);if(!r)return;const[i]=n.invert(r),o=(0,Dn(u).center)(s,i);return s[o]}}return t=>{const{target:e}=t;return I$(e,(t=>!!t.classList&&t.classList.includes("element")))}}function F$(t){var{delay:e,createGroup:n,createRegionGroup:r,background:i=!1,link:o=!1}=t,a=Le(t,["delay","createGroup","createRegionGroup","background","link"]);return(t,s,c)=>{const{container:l,view:u,options:f}=t,{scale:h,coordinate:d}=u;return function(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:i=t=>t,link:o=!1,background:a=!1,delay:s=60,scale:c,coordinate:l,emitter:u,state:f={},region:h=!1,regionEleFilter:d=t=>D$.includes(t.markType)}){var p,g;const v=null!==(p=e(t))&&void 0!==p?p:[],y=h?v.filter(d):v,m=new Set(y),b=h?i:r,x=Jn(y,b),w=B$({elementsof:e,root:t,coordinate:l,scale:c}),k=_$(y,n),[M,E]=S$(Object.assign({elements:y,valueof:k,link:o,coordinate:l},Qo(f.active,"link"))),[O,_,S]=T$(Object.assign({document:t.ownerDocument,scale:c,coordinate:l,background:a,valueof:k},Qo(f.active,"background"))),A=Q(f,{active:Object.assign({},(null===(g=f.active)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=f.active.offset(...t),[,n]=t;return A$(y[n],e,l)}})}),T=k$(A,y),{updateState:P,removeState:N,hasState:C}=T(k);let L;const j=t=>{const{nativeEvent:e=!0}=t;let r=t.target;if(h&&(r=w(t)),!m.has(r))return;L&&clearTimeout(L);const i=b(r),o=x.get(i),a=new Set(o);for(const t of y)a.has(t)?C(t,"active")||P(t,"active"):(P(t,"inactive"),E(t)),t!==r&&_(t);O(r),M(o),e&&u.emit("element:highlight",{nativeEvent:e,data:{data:n(r),group:o.map(n)}})},R=()=>{L&&clearTimeout(L),L=setTimeout((()=>{I(),L=null}),s)},I=(t=!0)=>{for(const t of y)N(t,"active","inactive"),_(t),E(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},D=t=>{let e=t.target;h&&(e=w(t)),e?a&&!S(e)||(a||m.has(e))&&(s>0?R():I()):s>0?R():I()},B=()=>{I()};t.addEventListener("pointerover",j),t.addEventListener("pointermove",j),t.addEventListener("pointerout",D),t.addEventListener("pointerleave",B);const F=t=>{const{nativeEvent:e}=t;e||I(!1)},z=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,i=C$(y,r,n);i&&j({target:i,nativeEvent:!1})};return u.on("element:highlight",z),u.on("element:unhighlight",F),()=>{t.removeEventListener("pointerover",j),t.removeEventListener("pointermove",j),t.removeEventListener("pointerout",D),t.removeEventListener("pointerleave",B),u.off("element:highlight",z),u.off("element:unhighlight",F);for(const t of y)_(t),E(t)}}(h$(l),Object.assign({elements:l$,datum:m$(u),groupKey:n?n(u):void 0,regionGroupKey:r?r(u):t=>t.__data__.x,coordinate:d,scale:h,state:O$(f,[["active",i?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:i,link:o,delay:e,emitter:c},a))}}function z$(t){return F$(Object.assign(Object.assign({},t),{createGroup:y$}))}function $$(t){return F$(Object.assign(Object.assign({},t),{createGroup:v$}))}function W$(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:i=t=>t,link:o=!1,single:a=!1,multipleSelectHotkey:s,coordinate:c,background:l=!1,scale:u,emitter:f,state:h={},region:d=!1,regionEleFilter:p=t=>D$.includes(t.markType)}){var g;const v=e(t),y=new Set(v),m=B$({elementsof:e,root:t,coordinate:c,scale:u}),b=Jn(v,r),x=Jn(v,i),w=_$(v,n),[k,M]=S$(Object.assign({link:o,elements:v,valueof:w,coordinate:c},Qo(h.selected,"link"))),[E,O]=T$(Object.assign({document:t.ownerDocument,background:l,coordinate:c,scale:u,valueof:w},Qo(h.selected,"background"))),_=Q(h,{selected:Object.assign({},(null===(g=h.selected)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=h.selected.offset(...t),[,n]=t;return A$(v[n],e,c)}})}),S=k$(_,v),{updateState:A,removeState:T,hasState:P}=S(w);let N=!a,C=null;const L=(t=!0)=>{for(const t of v)T(t,"selected","unselected"),M(t),O(t);t&&f.emit("element:unselect",{nativeEvent:!0})},j=({event:t,element:e,nativeEvent:i=!0,filter:o=t=>!0,groupBy:a=r,groupMap:s=b})=>{const c=v.filter(o);if(P(e,"selected"))L();else{const r=a(e),o=s.get(r),l=new Set(o);for(const t of c)l.has(t)?A(t,"selected"):(A(t,"unselected"),M(t)),t!==e&&O(t);if(k(o),E(e),!i)return;f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...o.map(n)]}}))}},R=({event:t,element:e,nativeEvent:i=!0,filter:a=t=>!0,groupBy:s=r,groupMap:c=b})=>{const l=s(e),u=c.get(l),h=new Set(u),d=v.filter(a);if(P(e,"selected")){const t=v.some((t=>!h.has(t)&&P(t,"selected")));if(!t)return L();for(const t of u)A(t,"unselected"),M(t),O(t)}else{const t=u.some((t=>P(t,"selected")));for(const t of d)h.has(t)?A(t,"selected"):P(t,"selected")||A(t,"unselected");!t&&o&&k(u),E(e)}i&&f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:v.filter((t=>P(t,"selected"))).map(n)}}))},I=t=>{if(y.has(t))return t;for(const e of y){let n=null;if(r$(e,(r=>{r===t&&(n=e)})),n)return n}return t},D=t=>{const{target:e,nativeEvent:n=!0}=t,o=N?R:j;let a=e;const s=(t=>{if(y.has(t))return!0;for(const e of y)if(r$(e,(e=>e===t)))return!0;return!1})(e);return!d||s?s?o({event:t,element:I(a),nativeEvent:n,groupBy:r}):L():(a=m(t),y.has(a)?o({event:t,element:a,nativeEvent:n,filter:p,groupBy:i,groupMap:x}):L())},B=Array.isArray(s)?s:[s],F=t=>{B.includes(t.code)&&!C&&(C=t.code,N=!0)},z=t=>{t.code===C&&(C=null,N=!1)};t.addEventListener("click",D),s&&(N=!1,document.addEventListener("keydown",F),document.addEventListener("keyup",z));const $=t=>{const{nativeEvent:e,data:r}=t;if(e)return;const i=N?r.data:r.data.slice(0,1);for(const t of i){const e=C$(v,t,n);D({target:e,nativeEvent:!1})}},W=()=>{L(!1)};return f.on("element:select",$),f.on("element:unselect",W),()=>{for(const t of v)M(t);t.removeEventListener("click",D),s&&(document.removeEventListener("keydown",F),document.removeEventListener("keyup",z)),f.off("element:select",$),f.off("element:unselect",W)}}function G$(t){var{createGroup:e,createRegionGroup:n,background:r=!1,link:i=!1}=t,o=Le(t,["createGroup","createRegionGroup","background","link"]);return(t,a,s)=>{const{container:c,view:l,options:u}=t,{coordinate:f,scale:h}=l;return W$(h$(c),Object.assign({elements:l$,datum:m$(l),groupKey:e?e(l):void 0,regionGroupKey:n?n(l):t=>t.__data__.x,coordinate:f,scale:h,state:O$(u,[["selected",r?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:r,link:i,emitter:s},o))}}function H$(t){return G$(Object.assign(Object.assign({},t),{createGroup:y$}))}function Y$(t){return G$(Object.assign(Object.assign({},t),{createGroup:v$}))}function q$(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,o=Le(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{view:a,container:s,update:c,setState:l}=t,{markState:u,scale:f,coordinate:h}=a,d=function(t,e,n){const[r]=Array.from(t.entries()).filter((([t])=>t.type===e)).map((([t])=>{const{encode:e}=t;return Object.fromEntries(n.map((t=>{const n=e[t];return[t,n?n.value:void 0]})))}));return r}(u,"line",["x","y","series"]);if(!d)return;const{y:p,x:g,series:v=[]}=d,y=p.map(((t,e)=>e)),m=ir(y.map((t=>g[t]))),b=h$(s),x=s.getElementsByClassName($T),w=Jn(s.getElementsByClassName(YT),(t=>t.__data__.key.split("-")[0])),k=new $g({style:Object.assign({x1:0,y1:0,x2:0,y2:b.getAttribute("height"),stroke:"black",lineWidth:1},Qo(o,"rule"))}),M=new Zg({style:Object.assign({x:0,y:b.getAttribute("height"),text:"",fontSize:10},Qo(o,"label"))});k.append(M),b.appendChild(k);const E=(t,e,n)=>{const[r]=t.invert(n),i=e.invert(r);return m[Gn(m,i)]},O=(t,e)=>{k.setAttribute("x1",t[0]),k.setAttribute("x2",t[0]),M.setAttribute("text",i(e))};let _;const S=at((t=>{const e=p$(b,t);e&&(t=>{const{scale:e,coordinate:n}=_,{x:r,y:i}=e,o=E(n,r,t);O(t,o);for(const t of x){const{seriesIndex:e,key:r}=t.__data__,a=e[Dn((t=>g[+t])).center(e,o)],s=[0,i.map(1)],c=[0,i.map(p[a]/p[e[0]])],[,l]=n.map(s),[,u]=n.map(c),f=l-u;t.setAttribute("transform",`translate(0, ${f})`);const h=w.get(r)||[];for(const t of h)t.setAttribute("dy",f)}})(e)}),e,{leading:n,trailing:r});return(t=>{Re(this,void 0,void 0,(function*(){const{x:e}=f,n=E(h,e,t);O(t,n),l("chartIndex",(t=>{const e=Q({},t),r=e.marks.find((t=>"line"===t.type)),i=vr(er(y,(t=>vr(t,(t=>+p[t]))/mr(t,(t=>+p[t]))),(t=>v[t])).values());Q(r,{scale:{y:{domain:[1/i,i]}}});const o=function(t){const{transform:e=[]}=t,n=e.find((t=>"normalizeY"===t.type));if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);o.groupBy="color",o.basis=(t,e)=>e[t[Dn((t=>g[+t])).center(t,n)]];for(const t of e.marks)t.animate=!1;return e}));const r=yield c("chartIndex");_=r.view}))})([0,0]),b.addEventListener("pointerenter",S),b.addEventListener("pointermove",S),b.addEventListener("pointerleave",S),()=>{k.remove(),b.removeEventListener("pointerenter",S),b.removeEventListener("pointermove",S),b.removeEventListener("pointerleave",S)}}}function V$({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:o,setState:a,container:s}=r,c=h$(s),l=at((t=>{const e=p$(c,t);if(!e)return a("fisheye"),void o();a("fisheye",(t=>{const n=Q({},t,{interaction:{tooltip:{preserve:!0}}});for(const t of n.marks)t.animate=!1;const[r,i]=e,o=function(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find((t=>"fisheye"===t.type));if(r)return r;const i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}(n);return o.focusX=r,o.focusY=i,o.visual=!0,n})),o()}),t,{leading:e,trailing:n});return c.addEventListener("pointerenter",l),c.addEventListener("pointermove",l),c.addEventListener("pointerleave",l),()=>{c.removeEventListener("pointerenter",l),c.removeEventListener("pointermove",l),c.removeEventListener("pointerleave",l)}}}function U$(t,e){var n;if(e)return"string"==typeof e?document.querySelector(e):e;const r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r)return;return r.getContextService().getDomElement().parentElement}function X$(t,e,n,r,i,o,a,s={},c=[10,10]){const l=new nk({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:o,position:r,enterable:i,title:"",offset:c,template:{prefixCls:"g2-"},style:Q({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},s)}});return t.appendChild(l.HTMLTooltipElement),l}function Z$({root:t,data:e,x:n,y:r,render:i,event:o,single:a,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f,offset:h}){const d=U$(t,u),p=U$(t),g=a?p:t,v=f||function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,o]}=e;return{x:n,y:r,width:i-n,height:o-r}}(t),y=function(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(p,d),{tooltipElement:m=X$(d,n,r,s,c,v,y,l,h)}=g,{items:b,title:x=""}=e;m.update(Object.assign({x:n,y:r,data:b,title:x,position:s,enterable:c,container:y},void 0!==i&&{content:i(o,{items:b,title:x})})),g.tooltipElement=m}function K$({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const o=U$(t),a=e?o:t,{tooltipElement:s}=a;s&&s.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY),oW(t),aW(t),sW(t)}function Q$({root:t,single:e}){const n=U$(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),oW(t),aW(t),sW(t)}function J$(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function tW(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=(e&&"transparent"!==e?e:n)}=r;return i}function eW(t,e=t=>t){const n=new Map(t.map((t=>[e(t),t])));return Array.from(n.values())}function nW(t,e,n,r=t.map((t=>t.__data__)),i={}){const o=t=>t instanceof Date?+t:t,a=eW(r.map((t=>t.title)),o).filter(Zo),s=r.flatMap(((r,o)=>{const a=t[o],{items:s=[],title:c}=r,l=s.filter(Zo),u=void 0!==n?n:s.length<=1;return l.map((t=>{var{color:n=tW(a)||i.color,name:o}=t,s=Le(t,["color","name"]);const l=Ho(e,r),f=u&&!(uz in s)?l||o:o||l;return Object.assign(Object.assign({},s),{color:n,name:f||c})}))})).map(J$);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:eW(s,(t=>`(${o(t.name)}, ${o(t.value)}, ${o(t.color)})`))})}function rW(t,e,n,r){var{plotWidth:i,plotHeight:o,mainWidth:a,mainHeight:s,startX:c,startY:l,transposed:u,polar:f,insetLeft:h,insetTop:d}=r,p=Le(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=>As(e,t))),r=br(n,(t=>t));return e[r]})(n,e);if(f){const[e,n,r]=(()=>{const t=c+h+a/2,e=l+d+s/2;return[t,e,As([t,e],v)]})(),i=t.ruleX||((e,n,r)=>{const i=new Cg({style:Object.assign({cx:e,cy:n,r:r},g)});return t.appendChild(i),i})(e,n,r);i.style.cx=e,i.style.cy=n,i.style.r=r,t.ruleX=i}else{const[e,n,r,a]=u?[c+v[0],c+v[0],l,l+o]:[c,c+i,v[1]+l,v[1]+l],s=t.ruleX||((e,n,r,i)=>{const o=new $g({style:Object.assign({x1:e,x2:n,y1:r,y2:i},g)});return t.appendChild(o),o})(e,n,r,a);s.style.x1=e,s.style.x2=n,s.style.y1=r,s.style.y2=a,t.ruleX=s}}function iW(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:o,mainHeight:a,startX:s,startY:c,transposed:l,polar:u,insetLeft:f,insetTop:h}=n,d=Le(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])),y=Er(g),m=Er(v),[b,x,w,k]=(()=>{if(u){const t=Math.min(o,a)/2,e=s+f+o/2,n=c+h+a/2,r=Ts(_s([m,y],[e,n]));return[e,e+t*Math.cos(r),n,n+t*Math.sin(r)]}return l?[s,s+r,y+c,y+c]:[m+s,m+s,c,c+i]})();if(v.length>0){const e=t.ruleY||(()=>{const e=new $g({style:Object.assign({x1:b,x2:x,y1:w,y2:k},p)});return t.appendChild(e),e})();e.style.x1=b,e.style.x2=x,e.style.y1=w,e.style.y2=k,t.ruleY=e}}function oW(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function aW(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function sW(t){t.markers&&(t.markers.forEach((t=>t.remove())),t.markers=[])}function cW(t,e){return Array.from(t.values()).some((t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]}))}function lW(t,e){return void 0===t?e:t}function uW(t){const{title:e,items:n}=t;return 0===n.length&&void 0===e}function fW({root:t,event:e,elements:n,coordinate:r,scale:i,shared:o}){var a,s;const c=n.every((t=>"interval"===t.markType))&&!Qc(r),l=i.x,u=i.series,f=null!==(s=null===(a=null==l?void 0:l.getBandWidth)||void 0===a?void 0:a.call(l))&&void 0!==s?s:0,h=u?t=>{const e=Math.round(1/u.valueBandWidth);return t.__data__.x+t.__data__.series*f+f/(2*e)}:t=>t.__data__.x+f/2;c&&n.sort(((t,e)=>h(t)-h(e)));const d=t=>{const{target:e}=t;return I$(e,(t=>!!t.classList&&t.classList.includes("element")))},p=c?e=>{const i=p$(t,e);if(!i)return;const[a]=r.invert(i),s=(0,Dn(h).center)(n,a),c=n[s];if(!o){const t=n.find((t=>t!==c&&h(t)===h(c)));if(t)return d(e)}return c}:d;return p(e)}function hW({root:t,event:e,elements:n,coordinate:r,scale:i,startX:o,startY:a}){const s=Kc(r),c=[],l=[];for(const t of n){const{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?c.push(t):(r||i)&&l.push(t)}const u=l.length&&l.every((t=>"interval"===t.markType))&&!Qc(r),f=t=>t.__data__.x,h=!!i.x.getBandWidth&&l.length>0;c.sort(((t,e)=>{const n=s?0:1,r=t=>t.getBounds().min[n];return s?r(e)-r(t):r(t)-r(e)}));const d=t=>{const e=s?1:0,{min:n,max:r}=t.getLocalBounds();return ir([n[e],r[e]])};u?n.sort(((t,e)=>f(t)-f(e))):l.sort(((t,e)=>{const[n,r]=d(t),[i,o]=d(e),a=(n+r)/2,c=(i+o)/2;return s?c-a:a-c}));const p=new Map(c.map((t=>{const{__data__:e}=t,{seriesX:n}=e,r=n.map(((t,e)=>e)),i=ir(r,(t=>n[+t]));return[t,[i,n]]}))),{x:g}=i,v=(null==g?void 0:g.getBandWidth)?g.getBandWidth()/2:0,y=t=>{const[e]=r.invert(t);return e-v},m=(t,e,n,r)=>{const{_x:i}=t,o=void 0!==i?g.map(i):y(e),a=r.filter(Zo),[s,c]=ir([a[0],a[a.length-1]]);if(!h&&(o<s||o>c)&&!(s===c))return null;const l=Dn((t=>r[+t])).center;return n[l(n,o)]},b=u?(t,e)=>{const n=e[(0,Dn(f).center)(e,y(t))];return Jn(e,f).get(f(n))}:(t,e)=>{const n=t[s?1:0],r=e.filter((t=>{const[e,r]=d(t);return n>=e&&n<=r}));if(!h||r.length>0)return r;const i=Dn((t=>{const[e,n]=d(t);return(e+n)/2})).center;return[e[i(e,n)]].filter(Zo)},x=(t,e)=>{const{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter((([t])=>t.startsWith("series")&&"series"!==t)).map((([t,n])=>{const r=n[e];return[W(t.replace("series","")),r]})))},w=p$(t,e);if(!w)return;const k=[w[0]-o,w[1]-a];if(!k)return;const M=b(k,l),E=[],O=[];for(const t of c){const[n,i]=p.get(t),o=m(e,k,n,i);if(null!==o){E.push(t);const e=x(t,o),{x:n,y:i}=e,a=r.map([(n||0)+v,i||0]);O.push([Object.assign(Object.assign({},e),{element:t}),a])}}const _=Array.from(new Set(O.map((t=>t[0].x)))),S=_[br(_,(t=>Math.abs(t-y(k))))],A=O.filter((t=>t[0].x===S)),T=[...A.map((t=>t[0])),...M.map((t=>t.__data__))];return{selectedElements:[...E,...M],selectedData:T,filteredSeriesData:A,abstractX:y}}function dW(t,e){var{elements:n,sort:r,filter:i,scale:o,coordinate:a,crosshairs:s,crosshairsX:c,crosshairsY:l,render:u,groupName:f,emitter:h,wait:d=50,leading:p=!0,trailing:g=!1,startX:v=0,startY:y=0,body:m=!0,single:b=!0,position:x,enterable:w,mount:k,bounding:M,theme:E,offset:O,disableNative:_=!1,marker:S=!0,preserve:A=!1,style:T={},css:P={}}=e,N=Le(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 C=n(t),L=Q(T,N),j=Qc(a),R=Kc(a),{innerWidth:I,innerHeight:D,width:B,height:F,insetLeft:z,insetTop:$}=a.getOptions(),W=at((e=>{var n;const d=p$(t,e);if(!d)return;const p=d$(t),g=p.min[0],_=p.min[1],{selectedElements:A,selectedData:T,filteredSeriesData:N,abstractX:W}=hW({root:t,event:e,elements:C,coordinate:a,scale:o,startX:v,startY:y}),H=nW(A,o,f,T,E);if(r&&H.items.sort(((t,e)=>r(t)-r(e))),i&&(H.items=H.items.filter(i)),0===A.length||uW(H))return void G(e);if(m&&Z$({root:t,data:H,x:d[0]+g,y:d[1]+_,render:u,event:e,single:b,position:x,enterable:w,mount:k,bounding:M,css:P,offset:O}),s||c||l){const e=Qo(L,"crosshairs"),n=Object.assign(Object.assign({},e),Qo(L,"crosshairsX")),r=Object.assign(Object.assign({},e),Qo(L,"crosshairsY")),i=N.map((t=>t[1]));c&&rW(t,i,d,Object.assign(Object.assign({},n),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:z,insetTop:$,startX:v,startY:y,transposed:R,polar:j})),l&&iW(t,i,Object.assign(Object.assign({},r),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:z,insetTop:$,startX:v,startY:y,transposed:R,polar:j}))}if(S){const e=Qo(L,"marker");!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach((t=>t.remove()));const{type:i=""}=n,o=e.filter((t=>{const[{x:e,y:n}]=t;return Zo(e)&&Zo(n)})).map((t=>{const[{color:e,element:o},a]=t,s=e||o.style.fill||o.style.stroke||r.color,c="hollow"===i?"transparent":s,l="hollow"===i?s:"#fff";return new Cg({className:"g2-tooltip-marker",style:Object.assign({cx:a[0],cy:a[1],fill:c,r:4,stroke:l,lineWidth:2,pointerEvents:"none"},n)})}));for(const e of o)t.appendChild(e);t.markers=o}(t,{data:N,style:e,theme:E})}const Y=null===(n=N[0])||void 0===n?void 0:n[0].x,q=null!=Y?Y:W(focus);h.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},H),{data:{x:nT(o.x,q,!0)}})}))}),d,{leading:p,trailing:g}),G=e=>{K$({root:t,single:b,emitter:h,event:e})},H=()=>{Q$({root:t,single:b})},Y=e=>{var n,{nativeEvent:r,data:i,offsetX:s,offsetY:c}=e,l=Le(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;const u=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.x,f=o.x.map(u),[h,d]=a.map([f,.5]),p=t.getRenderBounds(),g=p.min[0],v=p.min[1];W(Object.assign(Object.assign({},l),{offsetX:void 0!==s?s:g+h,offsetY:void 0!==c?c:v+d,_x:u}))},q=()=>{K$({root:t,single:b,emitter:h,nativeEvent:!1})},V=()=>{Z(),H()},U=()=>{X()},X=()=>{_||(t.addEventListener("pointerdown",W),t.addEventListener("pointerenter",W),t.addEventListener("pointermove",W),t.addEventListener("pointerleave",(e=>{p$(t,e)||G(e)})),t.addEventListener("pointerup",G))},Z=()=>{_||(t.removeEventListener("pointerdown",W),t.removeEventListener("pointerenter",W),t.removeEventListener("pointermove",W),t.removeEventListener("pointerleave",G),t.removeEventListener("pointerup",G))};return X(),h.on("tooltip:show",Y),h.on("tooltip:hide",q),h.on("tooltip:disable",V),h.on("tooltip:enable",U),()=>{Z(),h.off("tooltip:show",Y),h.off("tooltip:hide",q),h.off("tooltip:disable",V),h.off("tooltip:enable",U),A?K$({root:t,single:b,emitter:h,nativeEvent:!1}):H()}}function pW(t,{elements:e,coordinate:n,scale:r,render:i,groupName:o,sort:a,filter:s,emitter:c,wait:l=50,leading:u=!0,trailing:f=!1,groupKey:h=t=>t,single:d=!0,position:p,enterable:g,datum:v,view:y,mount:m,bounding:b,theme:x,offset:w,shared:k=!1,body:M=!0,disableNative:E=!1,preserve:O=!1,css:_={}}){const S=e(t),A=Jn(S,h),T=at((e=>{const l=fW({root:t,event:e,elements:S,coordinate:n,scale:r,shared:k});if(!l)return void K$({root:t,single:d,emitter:c,event:e});const u=h(l),f=A.get(u);if(!f)return;const v=1!==f.length||k?nW(f,r,o,void 0,x):function(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(Zo).map((e=>{var{color:n=tW(t)}=e,r=Le(e,["color"]);return Object.assign(Object.assign({},r),{color:n})})).map(J$);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}(f[0]);if(a&&v.items.sort(((t,e)=>a(t)-a(e))),s&&(v.items=v.items.filter(s)),uW(v))return void K$({root:t,single:d,emitter:c,event:e});const{offsetX:E,offsetY:O}=e;M&&Z$({root:t,data:v,x:E,y:O,render:i,event:e,single:d,position:p,enterable:g,mount:m,bounding:b,css:_,offset:w}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},v),{data:Go(l,y)})}))}),l,{leading:u,trailing:f}),P=e=>{K$({root:t,single:d,emitter:c,event:e})},N=()=>{E||(t.addEventListener("pointerdown",T),t.addEventListener("pointermove",T),t.addEventListener("pointerleave",P),t.addEventListener("pointerup",P))},C=()=>{E||(t.removeEventListener("pointerdown",T),t.removeEventListener("pointermove",T),t.removeEventListener("pointerleave",P),t.removeEventListener("pointerup",P))},L=({nativeEvent:e,offsetX:n,offsetY:r,data:i})=>{if(e)return;const{data:o}=i,a=C$(S,o,v);if(!a)return;const s=a.getBBox(),{x:c,y:l,width:u,height:f}=s,h=t.getBBox();T({target:a,offsetX:void 0!==n?n+h.x:c+u/2,offsetY:void 0!==r?r+h.y:l+f/2})},j=({nativeEvent:e}={})=>{e||K$({root:t,single:d,emitter:c,nativeEvent:!1})};return c.on("tooltip:show",L),c.on("tooltip:hide",j),c.on("tooltip:enable",(()=>{N()})),c.on("tooltip:disable",(()=>{C(),Q$({root:t,single:d})})),N(),()=>{C(),c.off("tooltip:show",L),c.off("tooltip:hide",j),O?K$({root:t,single:d,emitter:c,nativeEvent:!1}):Q$({root:t,single:d})}}function gW(t){const{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:i,series:o,name:a,item:s=()=>({}),facet:c=!1}=t,l=Le(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,a,u)=>{const{container:f,view:h}=t,{scale:d,markState:p,coordinate:g,theme:v}=h,y=cW(p,"seriesTooltip"),m=cW(p,"crosshairs"),b=h$(f),x=lW(o,y),w=lW(n,m);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 dW(b,Object.assign(Object.assign({},l),{theme:v,elements:l$,scale:d,coordinate:g,crosshairs:w,crosshairsX:lW(lW(r,n),!1),crosshairsY:lW(i,w),item:s,emitter:u}));if(x&&c){const e=a.filter((e=>e!==t&&e.options.parentKey===t.options.key)),o=u$(t,a),c=e[0].view.scale,f=b.getBounds(),h=f.min[0],d=f.min[1];return Object.assign(c,{facet:!0}),dW(b.parentNode.parentNode,Object.assign(Object.assign({},l),{theme:v,elements:()=>o,scale:c,coordinate:g,crosshairs:lW(n,m),crosshairsX:lW(lW(r,n),!1),crosshairsY:lW(i,w),item:s,startX:h,startY:d,emitter:u}))}return pW(b,Object.assign(Object.assign({},l),{datum:m$(h),elements:l$,scale:d,coordinate:g,groupKey:e?t=>t.__data__.x:void 0,item:s,emitter:u,view:h,theme:v,shared:e}))}}F$.props={reapplyWhenUpdate:!0},z$.props={reapplyWhenUpdate:!0},$$.props={reapplyWhenUpdate:!0},G$.props={reapplyWhenUpdate:!0},H$.props={reapplyWhenUpdate:!0},Y$.props={reapplyWhenUpdate:!0},q$.props={reapplyWhenUpdate:!0},gW.props={reapplyWhenUpdate:!0};const vW="legend-category";function yW(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function mW(t){return t.getElementsByClassName("legend-category-item-label")[0]}function bW(t){return t.getElementsByClassName("items-item")}function xW(t){return t.getElementsByClassName(vW)}function wW(t){return t.getElementsByClassName("legend-continuous")}function kW(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function MW(t,{legend:e,channel:n,value:r,ordinal:i,channels:o,allChannels:a,facet:s=!1}){return Re(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(o.map((t=>[t,{domain:c.scale[t].getOptions().domain}])));return Q({},t,Object.assign(Object.assign({transform:f,scale:h},!i&&{animate:!1}),{legend:!s&&Object.fromEntries(a.map((t=>[t,{preserve:!0}])))}))}));return Object.assign(Object.assign({},t),{marks:l})})),yield l()}))}function EW(t,e){for(const n of t)MW(n,Object.assign(Object.assign({},e),{facet:!0}))}function OW(){return(t,e,n)=>{const{container:r}=t,i=e.filter((e=>e!==t)),o=i.length>0,a=t=>kW(t).scales.map((t=>t.name)),s=[...xW(r),...wW(r)],c=s.flatMap(a),l=at(o?EW:MW,50,{trailing:!0}),u=s.map((e=>{const{name:s,domain:u}=kW(e).scales[0],f={legend:e,channel:s,channels:a(e),allChannels:c};return e.className===vW?function(t,{legends:e,marker:n,label:r,datum:i,filter:o,emitter:a,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:Qo(h,"marker")},p={unselected:Qo(h,"label")},{setState:g,removeState:v}=M$(d,void 0),{setState:y,removeState:m}=M$(p,void 0),b=Array.from(e(t));let x=b.map(i);const w=()=>{for(const t of b){const e=i(t),o=n(t),a=r(t);x.includes(e)?(v(o,"unselected"),m(a,"unselected")):(g(o,"unselected"),y(a,"unselected"))}};for(const e of b){const n=()=>{P$(t,"pointer")},r=()=>{N$(t)},c=t=>Re(this,void 0,void 0,(function*(){const n=i(e),r=x.indexOf(n);-1===r?x.push(n):x.splice(r,1),yield o(x),w();const{nativeEvent:c=!0}=t;c&&(x.length===b.length?a.emit("legend:reset",{nativeEvent:c}):a.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 k=t=>Re(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 o(x),w())})),M=t=>Re(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;e||(x=b.map(i),yield o(x),w())}));return a.on("legend:filter",k),a.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)),a.off("legend:filter",k),a.off("legend:reset",M)}}(r,{legends:bW,marker:yW,label:mW,datum:t=>{const{__data__:e}=t,{index:n}=e;return u[n]},filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});l(o?i:t,n)},state:e.attributes.state,channel:s,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:i}){const o=({detail:{value:t}})=>{n(t),r.emit({nativeEvent:!0,data:{channel:i,values:t}})};return e.addEventListener("valuechange",o),()=>{e.removeEventListener("valuechange",o)}}(0,{legend:e,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!1});l(o?i:t,n)},emitter:n,channel:s})}));return()=>{u.forEach((t=>t()))}}}function _W(){return(t,e,n)=>{const{container:r,view:i,options:o}=t,a=xW(r),s=l$(r),c=t=>kW(t).scales[0].name,l=t=>{const{scale:{[t]:e}}=i;return e},u=O$(o,["active","inactive"]),f=_$(s,m$(i)),h=[];for(const t of a){const e=e=>{const{data:n}=t.attributes,{__data__:r}=e,{index:i}=r;return n[i].label},r=c(t),i=bW(t),o=l(r),a=Jn(s,(t=>o.invert(t.__data__[r]))),{state:d={}}=t.attributes,{inactive:p={}}=d,{setState:g,removeState:v}=M$(u,f),y={inactive:Qo(p,"marker")},m={inactive:Qo(p,"label")},{setState:b,removeState:x}=M$(y),{setState:w,removeState:k}=M$(m),M=t=>{for(const e of i){const n=yW(e),r=mW(e);e===t||null===t?(x(n,"inactive"),k(r,"inactive")):(b(n,"inactive"),w(r,"inactive"))}},E=(t,i)=>{const o=e(i),c=new Set(a.get(o));for(const t of s)c.has(t)?g(t,"active"):g(t,"inactive");M(i);const{nativeEvent:l=!0}=t;l&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:l,data:{channel:r,value:o}}))},O=new Map;for(const t of i){const e=e=>{E(e,t)};t.addEventListener("pointerover",e),O.set(t,e)}const _=t=>{for(const t of s)v(t,"inactive","active");M(null);const{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},S=t=>{const{nativeEvent:n,data:o}=t;if(n)return;const{channel:a,value:s}=o;if(a!==r)return;const c=i.find((t=>e(t)===s));c&&E({nativeEvent:!1},c)},A=t=>{const{nativeEvent:e}=t;e||_({nativeEvent:!1})};t.addEventListener("pointerleave",_),n.on("legend:highlight",S),n.on("legend:unhighlight",A);const T=()=>{t.removeEventListener(_),n.off("legend:highlight",S),n.off("legend:unhighlight",A);for(const[t,e]of O)t.removeEventListener(e)};h.push(T)}return()=>h.forEach((t=>t()))}}function SW(t,e){const[n,r,i,o]=t,[a,s,c,l]=e;return!(a>i||c<n||s>o||l<r)}function AW(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function TW(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const PW=Py((t=>{const e=t.attributes,{x:n,y:r,width:i,height:o,class:a,renders:s={},handleSize:c=10,document:l}=e,u=Le(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||void 0===i||void 0===o||void 0===n||void 0===r)return;const f=c/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));const{handle:r}=t;return r.attr(e),r},d=Qo(ta(u,"handleNW","handleNE"),"handleN"),{render:p=h}=d,g=Le(d,["render"]),v=Qo(u,"handleE"),{render:y=h}=v,m=Le(v,["render"]),b=Qo(ta(u,"handleSE","handleSW"),"handleS"),{render:x=h}=b,w=Le(b,["render"]),k=Qo(u,"handleW"),{render:M=h}=k,E=Le(k,["render"]),O=Qo(u,"handleNW"),{render:_=h}=O,S=Le(O,["render"]),A=Qo(u,"handleNE"),{render:T=h}=A,P=Le(A,["render"]),N=Qo(u,"handleSE"),{render:C=h}=N,L=Le(N,["render"]),j=Qo(u,"handleSW"),{render:R=h}=j,I=Le(j,["render"]),D=t=>()=>{const e=Py((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=uy(t).attr("className",a).style("transform",`translate(${n}, ${r})`).style("draggable",!0);B.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(TW,Object.assign(Object.assign({width:i,height:o},ta(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(TW,g),B.maybeAppend("handle-e",D(y)).style("x",i-f).style("y",f).style("width",c).style("height",o-c).style("fill","transparent").call(TW,m),B.maybeAppend("handle-s",D(x)).style("x",f).style("y",o-f).style("width",i-c).style("height",c).style("fill","transparent").call(TW,w),B.maybeAppend("handle-w",D(M)).style("x",-f).style("y",f).style("width",c).style("height",o-c).style("fill","transparent").call(TW,E),B.maybeAppend("handle-nw",D(_)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(TW,S),B.maybeAppend("handle-ne",D(T)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(TW,P),B.maybeAppend("handle-se",D(C)).style("x",i-f).style("y",o-f).style("width",c).style("height",c).style("fill","transparent").call(TW,L),B.maybeAppend("handle-sw",D(R)).style("x",-f).style("y",o-f).style("width",c).style("height",c).style("fill","transparent").call(TW,I)}));function NW(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:o=()=>{},brushupdated:a=()=>{},extent:s=AW(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=Le(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let g=null,v=null,y=null,m=null,b=null,x=!1;const[w,k,M,E]=s;P$(t,"crosshair"),t.style.draggable=!0;const O=(t,e,n)=>{if(o(n),m&&m.remove(),b&&b.remove(),g=[t,e],l)return _();S()},_=()=>{b=new Gg({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:h,pointerEvents:"none"})}),m=new PW({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},S=()=>{m=new PW({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:h,draggable:!0}),className:"mask"}),t.appendChild(m)},A=(t=!0)=>{m&&m.remove(),b&&b.remove(),g=null,v=null,y=null,x=!1,m=null,b=null,r(t)},T=(t,e,r=!0)=>{const[i,o,a,u]=function(t,e,n,r,i){const[o,a,s,c]=i;return[Math.max(o,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[f,h,d,p]=c(i,o,a,u,s);return l?N(f,h,d,p):P(f,h,d,p),n(f,h,d,p,r),[f,h,d,p]},P=(t,e,n,r)=>{m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},N=(t,e,n,r)=>{b.style.d=`\n M${w},${k}L${M},${k}L${M},${E}L${w},${E}Z\n M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z\n `,m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},C={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},L=t=>R(t)||j(t),j=t=>{const{id:e}=t;return-1!==d.indexOf(e)&&new Set(Object.keys(C)).has(e)},R=t=>t===m.getElementById("selection"),I=e=>{const{target:n}=e,[r,i]=g$(t,e);if(!m||!L(n))return O(r,i,e),void(x=!0);L(n)&&(y=[r,i])},D=e=>{const{target:n}=e,r=g$(t,e);if(!g)return;if(!y)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]-y[0],r=t[1]-y[1],i=e(n,g[0],v[0],w,M),o=e(r,g[1],v[1],k,E),a=[g[0]+i,g[1]+o],s=[v[0]+i,v[1]+o];T(a,s)})(r);const[i,o]=[r[0]-y[0],r[1]-y[1]],{id:a}=n;if(C[a]){const[t,e,n,r]=C[a].vector;return T([g[0]+i*t,g[1]+o*e],[v[0]+i*n,v[1]+o*r])}},B=e=>{if(y){y=null;const{x:t,y:n,width:r,height:i}=m.style;return g=[t,n],v=[t+r,n+i],void a(t,n,t+r,n+i,e)}v=g$(t,e);const[n,r,o,s]=T(g,v);x=!1,i(n,r,o,s,e)},F=t=>{const{target:e}=t;m&&!L(e)&&A()},z=e=>{const{target:n}=e;m&&L(n)&&!x?R(n)?P$(t,"move"):j(n)&&P$(t,C[n.id].cursor):P$(t,"crosshair")},$=()=>{P$(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",$),{mask:m,move(t,e,n,r,i=!0){m||O(t,e,{}),g=[t,e],v=[n,r],T([t,e],[n,r],i)},remove(t=!0){m&&A(t)},destroy(){m&&A(!1),P$(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",$)}}}function CW(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 LW(t,e,n){return CW(t,e,n).map((t=>t.options))}function jW(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:o,brushRegion:a,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:h=t=>t,bboxOf:d=t=>{const{x:e,y:n,width:r,height:i}=t.style;return{x:e,y:n,width:r,height:i}},state:p={},emitter:g}=e,v=Le(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(t),m=i(t),b=m.flatMap(n),x=_$(y,o),w=Qo(v,"mask"),{setState:k,removeState:M}=M$(p,x),E=new Map,{width:O,height:_,x:S=0,y:A=0}=d(t),T=s||[0,0,O,_],P=()=>{for(const t of[...y,...b])M(t,"active","inactive")},N=(t,e,n,r)=>{var i;for(const t of m)null===(i=t.brush)||void 0===i||i.remove();const o=new Set;for(const i of y){const{min:a,max:s}=i.getLocalBounds(),[c,l]=a,[u,f]=s;SW([c,l,u,f],[t,e,n,r])?(k(i,"active"),o.add(h(i))):k(i,"inactive")}for(const t of b)o.has(h(t))?k(t,"active"):k(t,"inactive")},C=()=>{for(const t of y)M(t,"inactive");for(const t of E.values())t.remove();E.clear()},L=(e,n,r,i)=>{const o=t=>{const e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),E.set(t,e),e},a=new Ug({style:{x:e+S,y:n+A,width:r-e,height:i-n}});t.appendChild(a);for(const t of y){const e=E.get(t)||o(t);e.style.clipPath=a,k(t,"inactive"),k(e,"active")}},j=NW(t,Object.assign(Object.assign({},w),{extent:T,brushRegion:a,reverse:c,selectedHandles:r,brushended:t=>{const e=f?C:P;t&&g.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{const o=iT(t,e,n,r,l,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}});(f?L:N)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{const o=iT(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushupdated:(t,e,n,r,i)=>{const o=iT(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushstarted:t=>{g.emit("brush:start",t)}})),R=({nativeEvent:t,data:e})=>{if(t)return;const{selection:n}=e,[r,i,o,a]=function(t,e,n){const{x:r,y:i}=e,[o,a]=t,s=oT(o,r),c=oT(a,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,h]=n.map(l),[d,p]=n.map(u);return[f,h,d,p]}(n,l,u);j.move(r,i,o,a,!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 RW(t){var{facet:e,brushKey:n}=t,r=Le(t,["facet","brushKey"]);return(t,i,o)=>{const{container:a,view:s,options:c}=t,l=h$(a),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=s;if(e){const e=l.getBounds(),n=e.min[0],a=e.min[1],s=e.max[0],c=e.max[1];return jW(l.parentNode.parentNode,Object.assign(Object.assign({elements:()=>u$(t,i),datum:m$(f$(t,i).map((t=>t.view))),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,s,c],state:O$(f$(t,i).map((t=>t.options)),f),emitter:o,scale:h,coordinate:d,selectedHandles:void 0},u),r))}const p=jW(l,Object.assign(Object.assign({elements:l$,key:t=>t.__data__.key,siblings:()=>function(t,e,n){return CW(t,e,n).map((t=>h$(t.container)))}(t,i,n),datum:m$([s,...CW(t,i,n).map((t=>t.view))]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:O$([c,...LW(t,i,n)],f),emitter:o,scale:h,coordinate:d,selectedHandles:void 0},u),r));return l.brush=p,()=>p.destroy()}}function IW(t,e,n,r,i){const[,o,,a]=i;return[t,o,n,a]}function DW(t){return RW(Object.assign(Object.assign({},t),{brushRegion:IW,selectedHandles:["handle-e","handle-w"]}))}function BW(t,e,n,r,i){const[o,,a]=i;return[o,e,a,r]}function FW(t){return RW(Object.assign(Object.assign({},t),{brushRegion:BW,selectedHandles:["handle-n","handle-s"]}))}const zW="axis-hot-area";function $W(t){return t.getElementsByClassName("axis")}function WW(t){return t.getElementsByClassName("axis-line")[0]}function GW(t){return function(t){return t.getElementsByClassName("axis-main-group")[0]}(t).getLocalBounds()}function HW(t,e){var{cross:n,offsetX:r,offsetY:i}=e,o=Le(e,["cross","offsetX","offsetY"]);const a=GW(t),s=WW(t),[c]=s.getLocalBounds().min,[l,u]=a.min,[f,h]=a.max,d=2*(f-l);return{brushRegion:BW,hotZone:new Ug({className:zW,style:Object.assign({width:n?d/2:d,transform:`translate(${(n?l:c-d/2).toFixed(2)}, ${u})`,height:h-u},o)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,i)=>[Math.floor(l-r),e,Math.ceil(f-r),i]}}function YW(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,o=Le(e,["offsetY","offsetX","cross"]);const a=GW(t),s=WW(t),[,c]=s.getLocalBounds().min,[l,u]=a.min,[f,h]=a.max,d=h-u;return{brushRegion:IW,hotZone:new Ug({className:zW,style:Object.assign({width:f-l,height:i?d:2*d,transform:`translate(${l}, ${i?u:c-d})`},o)}),extent:i?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,i)=>[t,Math.floor(u-n),r,Math.ceil(h-n)]}}function qW(t){return(e,n,r)=>{const{container:i,view:o,options:a}=e,s=h$(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=o;return function(t,e){var{axes:n,elements:r,points:i,horizontal:o,datum:a,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:h}=e,d=Le(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),g=n(t),v=_$(p,a),{setState:y,removeState:m}=M$(u,v),b=new Map,x=Qo(d,"mask"),w=t=>Array.from(b.values()).every((([e,n,r,i])=>t.some((([t,o])=>t>=e&&t<=r&&o>=n&&o<=i)))),k=g.map((t=>t.attributes.scale)),M=t=>t.length>2?[t[0],t[t.length-1]]:t,E=new Map,O=()=>{E.clear();for(let t=0;t<g.length;t++){const e=k[t],{domain:n}=e.getOptions();E.set(t,M(n))}};O();const _=(t,e)=>{const n=[];for(const t of p){const e=i(t);w(e)?(y(t,"active"),n.push(t)):y(t,"inactive")}E.set(t,A(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!T)return Array.from(E.values());const t=[];for(const[e,n]of E){const r=k[e],{name:i}=r.getOptions();"x"===i?t[0]=n:t[1]=n}return t})()}})},S=t=>{for(const t of p)m(t,"active","inactive");O(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},A=(t,e)=>{const n=k[e],{name:r}=n.getOptions(),i=t.map((t=>{const e=t.__data__;return n.invert(e[r])}));return M(rT(n,i))},T=g.some(o)&&g.some((t=>!o(t))),P=[];for(let t=0;t<g.length;t++){const e=g[t],n=o(e)?YW:HW,{hotZone:r,brushRegion:i,extent:a}=n(e,{offsetY:s,offsetX:c,cross:T,zIndex:999,fill:"transparent"});e.parentNode.appendChild(r);const u=NW(r,Object.assign(Object.assign({},x),{reverse:l,brushRegion:i,brushended(n){b.delete(e),0===Array.from(b.entries()).length?S(n):_(t,n)},brushed(n,r,i,o,s){b.set(e,a(n,r,i,o)),_(t,s)}}));P.push(u)}const N=(t={})=>{const{nativeEvent:e}=t;e||P.forEach((t=>t.remove(!1)))},C=(t,e,n)=>{const[r,i]=t,a=L(r,e,n),s=L(i,e,n)+(t=>t.getStep?t.getStep():0)(e);return o(n)?[a,-1/0,s,1/0]:[-1/0,a,1/0,s]},L=(t,e,n)=>{const{height:r,width:i}=h.getOptions(),a=e.clone();return o(n)?a.update({range:[0,i]}):a.update({range:[r,0]}),a.map(t)},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=k[t];r.move(...C(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",N),f.on("brushAxis:highlight",j),()=>{P.forEach((t=>t.destroy())),f.off("brushAxis:remove",N),f.off("brushAxis:highlight",j)}}(i,Object.assign({elements:l$,axes:$W,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:m$(o),state:O$(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}function VW(t){var{hideX:e=!0,hideY:n=!0}=t,r=Le(t,["hideX","hideY"]);return(t,i,o)=>{const{container:a,view:s,options:c,update:l,setState:u}=t,f=h$(a);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:o,reverse:a,emitter:s,scale:c,coordinate:l,selection:u,series:f=!1}=e;const h=Qo(Le(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:d,height:p}=t.getBBox(),g=o||[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)}}(),y=NW(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:a,brushcreated:function(t,e,r,i,o){t===r&&e===i||(o.nativeEvent=!0,n(u(t,e,r,i),o),y.remove())}}));function m(t){v(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",m);const b=({nativeEvent:t,data:e})=>{if(t)return;const{selection:r}=e;n(r,{nativeEvent:!1})};return s.on("brush:filter",b),()=>{y.destroy(),s.off("brush:filter",b),t.removeEventListener("click",m)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{const{scale:i,coordinate:o}=p;return iT(t,e,n,r,i,o)},filter:(t,r)=>Re(this,void 0,void 0,(function*(){if(d)return;d=!0;const[i,a]=t;u("brushFilter",(t=>{const{marks:r}=t,o=r.map((t=>Q({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:i,nice:!1},y:{domain:a,nice:!1}}})));return Object.assign(Object.assign({},c),{marks:o,clip:!0})})),o.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[i,a]}}));const s=yield l();p=s.view,d=!1,h=!0})),reset:t=>{if(d||!h)return;const{scale:e}=s,{x:n,y:r}=e,i=n.getOptions().domain,a=r.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[i,a]}})),h=!1,p=s,u("brushFilter"),l()},extent:void 0,emitter:o,scale:g,coordinate:v},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function UW(t){return VW(Object.assign(Object.assign({hideX:!0},t),{brushRegion:IW}))}function XW(t){return VW(Object.assign(Object.assign({hideY:!0},t),{brushRegion:BW}))}function ZW(t,e,n,r=!1,i="x",o="y"){const{marks:a}=t,s=a.map((t=>{var a,s;return Q({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:e,[n]:Object.assign(Object.assign({},(null===(a=t[n])||void 0===a?void 0:a[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),(null===(s=t[n])||void 0===s?void 0:s[o])&&{[o]:{preserve:!0}}),animate:!1})}));return Object.assign(Object.assign({},t),{marks:s,clip:!0,animate:!1})}function KW(t,e,n){const[r,i]=t,o=n?t=>1-t:t=>t;return rT(e,[nT(e,o(r),!0),nT(e,o(i),!1)])}function QW(t){return[t[0],t[t.length-1]]}function JW({initDomain:t={},className:e="slider",prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:i=!1,wait:o=50,leading:a=!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 y=!1;const{scale:m,coordinate:b,layout:x}=d,{paddingLeft:w,paddingTop:k,paddingBottom:M,paddingRight:E}=x,{x:O,y:_}=m,S=Kc(b),A=t=>{const e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return S?[n,e]:[e,n]},T=new Map,P=new Set,N={x:t.x||O.getOptions().domain,y:t.y||_.getOptions().domain};for(const t of v){const{orientation:e}=t.attributes,[l,u]=A(e),h=`${n}${G(l)}:filter`,d="x"===l,{ratio:v}=O.getOptions(),{ratio:b}=_.getOptions(),x=t=>{if(t.data){const{selection:e}=t.data,[n=QW(N.x),r=QW(N.y)]=e;return d?[rT(O,n,v),rT(_,r,b)]:[rT(_,r,b),rT(O,n,v)]}const{value:n}=t.detail;return[KW(n,m[l],S&&"horizontal"===e),N[u]]},C=at((e=>Re(this,void 0,void 0,(function*(){const{initValue:r=!1}=e;if(y&&!r)return;y=!0;const{nativeEvent:o=!0}=e,[a,s]=x(e);if(N[l]=a,N[u]=s,o){const t=d?a:s,n=d?s:a;f.emit(h,Object.assign(Object.assign({},e),{nativeEvent:o,data:{selection:[QW(t),QW(n)]}}))}g(t,(t=>Object.assign(Object.assign({},ZW(t,{[l]:{domain:a,nice:!1}},n,i,l,u)),{paddingLeft:w,paddingTop:k,paddingBottom:M,paddingRight:E}))),yield p(),y=!1}))),o,{leading:a,trailing:s}),L=e=>{const{nativeEvent:n}=e;if(n)return;const{data:i}=e,{selection:o}=i,[a,s]=o;t.dispatchEvent(new Np("valuechange",{data:i,nativeEvent:!1}));const c=d?oT(a,O):oT(s,_);r(t,c)};f.on(h,L),t.addEventListener("valuechange",C),T.set(t,C),P.add([h,L]);const j=c(t);j&&t.dispatchEvent(new Np("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 tG="g2-scrollbar";function eG(t={}){return(e,n,r)=>{const{view:i,container:o}=e;if(!o.getElementsByClassName(tG).length)return()=>{};const{scale:a}=i,{x:s,y:c}=a,l={x:[...s.getOptions().domain],y:[...c.getOptions().domain]};s.update({domain:s.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain});return JW(Object.assign(Object.assign({},t),{initDomain:l,className:tG,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 nG(t,e,n){return`<${t} style="${Object.entries(n).map((([t,e])=>`${function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}(t)}:${e}`)).join(";")}">${e}</${t}>`}const rG={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 iG(t){return"text"===t.nodeName&&!!t.isOverflowing()}function oG(t){var{offsetX:e=8,offsetY:n=8}=t,r=Le(t,["offsetX","offsetY"]);return t=>{const{container:i}=t,[o,a]=i.getBounds().min,s=Qo(r,"tip"),c=new Set,l=t=>{const{target:r}=t;if(!iG(r))return void t.stopPropagation();const{offsetX:l,offsetY:u}=t,f=l+e-o,h=u+n-a;if(r.tip)return r.tip.style.x=f,void(r.tip.style.y=h);const{text:d}=r.style,p=new Bg({className:"poptip",style:{innerHTML:nG("div",d,Object.assign(Object.assign({},rG),s)),x:f,y:h}});i.appendChild(p),r.tip=p,c.add(p)},u=t=>{const{target:e}=t;iG(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()))}}}oG.props={reapplyWhenUpdate:!0};const aG={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function sG(t={}){const{originData:e=[],layout:n}=t,r=Le(t,["originData","layout"]),i=Q({},aG,r),o=Qo(i,"breadCrumb"),a=Qo(i,"active");return t=>{const{update:r,setState:i,container:s,options:c}=t,l=function(t){return uy(t).select(`.${GT}`).node()}(s),u=c.marks[0],{state:f}=u,h=new Ig;l.appendChild(h);const d=(t,c)=>Re(this,void 0,void 0,(function*(){if(h.removeChildren(),c){let e="",n=o.y,r=0;const i=[],s=l.getBBox().width,c=t.map(((a,c)=>{e=`${e}${a}/`,i.push(a);const l=new Zg({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:a,x:r,path:[...i],depth:c},o),{y:n})});h.appendChild(l),r+=l.getBBox().width;const u=new Zg({style:Object.assign(Object.assign({x:r,text:" / "},o),{y:n})});return h.appendChild(u),r+=u.getBBox().width,r>s&&(n=h.getBBox().height+o.y,r=0,l.attr({x:r,y:n}),r+=l.getBBox().width,u.attr({x:r,y:n}),r+=u.getBBox().width),c===lt(t)-1&&u.remove(),l}));c.forEach(((t,e)=>{if(e===lt(c)-1)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",(()=>{t.attr(a)})),t.addEventListener("mouseleave",(()=>{t.attr(n)})),t.addEventListener("click",(()=>{d(rt(t,["style","path"]),rt(t,["style","depth"]))}))}))}!function(t,e){[...xW(t),...wW(t)].forEach((t=>{e(t,(t=>t))}))}(s,i),i("treemapDrillDown",(r=>{const{marks:i}=r,o=t.join("/"),a=i.map((t=>{if("rect"!==t.type)return t;let r=e;if(c){const t=e.filter((t=>{const e=rt(t,["id"]);return e&&(e.match(`${o}/`)||o.match(e))})).map((t=>({value:0===t.height?rt(t,["value"]):void 0,name:rt(t,["id"])}))),{paddingLeft:i,paddingBottom:a,paddingRight:s}=n,l=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||h.getBBox().height+10)/(c+1),paddingLeft:i/(c+1),paddingBottom:a/(c+1),paddingRight:s/(c+1),path:t=>t.name,layer:t=>t.depth===c+1});r=n_(t,l,{value:"value"})[0]}else r=e.filter((t=>1===t.depth));const i=[];return r.forEach((({path:t})=>{i.push(j(t))})),Q({},t,{data:r,scale:{color:{domain:i}}})}));return Object.assign(Object.assign({},r),{marks:a})})),yield r(void 0,["legendFilter"])})),p=t=>{const n=t.target,{markType:r,nodeName:i,attributes:o}=n||{};if("rect"!==r&&i!==tu.TEXT)return;const a=i===tu.TEXT&&!0===rt(o,"isTreemapLabel")?(t=>t.attributes.key.split("-")[0])(n):(t=>rt(t,["__data__","key"]))(n),s=A(e,(t=>t.id===a));rt(s,"height")&&d(rt(s,"path"),rt(s,"depth"))};l.addEventListener("click",p);const g=M(Object.assign(Object.assign({},f.active),f.inactive)),v=()=>{R$(l).forEach((t=>{const n=rt(t,["style","cursor"]),r=A(e,(e=>e.id===rt(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){it.call(t,e)&&(n[e]=t[e])})),n}(t.attributes,g);t.addEventListener("mouseenter",(()=>{t.attr(f.active)})),t.addEventListener("mouseleave",(()=>{t.attr(Q(e,f.inactive))}))}}))};return v(),l.addEventListener("mousemove",v),()=>{h.remove(),l.removeEventListener("click",p),l.removeEventListener("mousemove",v)}}}const cG={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},lG="movePoint",uG=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")))},fG=t=>{const e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},hG=(t,e,n)=>{t.forEach(((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)}))},dG=(t,e,n,r)=>{const i=new Gg({style:n}),o=new Zg({style:r});return e.appendChild(o),t.appendChild(i),[i,o]},pG=(t,e)=>{if(!rt(t,["options","range","indexOf"]))return;const n=t.options.range.indexOf(e);return t.sortedDomain[n]},gG=(t,e,n)=>{const r=L$(t,e),i=L$(t,n)/r;return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]};function vG(t={}){const{selection:e=[],precision:n=2}=t,r=Le(t,["selection","precision"]),i=Object.assign(Object.assign({},cG),r||{}),o=Qo(i,"path"),a=Qo(i,"label"),s=Qo(i,"point");return(t,r,i)=>{const{update:c,setState:l,container:u,view:f,options:{marks:h,coordinate:d}}=t,p=h$(u);let g,v=R$(p),y=e;const{transform:m=[],type:b}=d,x=!!A(m,(({type:t})=>"transpose"===t)),w="polar"===b,k="theta"===b,M=!!A(v,(({markType:t})=>"area"===t));M&&(v=v.filter((({markType:t})=>"area"===t)));const E=new Ig({style:{zIndex:2}});p.appendChild(E);const O=()=>{i.emit("element-point:select",{nativeEvent:!0,data:{selection:y}})},_=t=>{const e=t.target;y=[e.parentNode.childNodes.indexOf(e)],O(),T(e)},S=t=>{const{data:{selection:e},nativeEvent:n}=t;if(n)return;y=e;const r=rt(v,[null==y?void 0:y[0]]);r&&T(r)},T=t=>{const{attributes:e,markType:r,__data__:d}=t,{stroke:p}=e,{points:v,seriesTitle:m,color:b,title:_,seriesX:S,y1:P}=d;if(x&&"interval"!==r)return;const{scale:N,coordinate:C}=(null==g?void 0:g.view)||f,{color:L,y:j,x:R}=N,I=C.getCenter();let D;E.removeChildren();const B=(t,e,n,r)=>Re(this,void 0,void 0,(function*(){return l("elementPointMove",(o=>{var a;const s=((null===(a=null==g?void 0:g.options)||void 0===a?void 0:a.marks)||h).map((o=>{if(!r.includes(o.type))return o;const{data:a,encode:s}=o,c=Object.keys(s).reduce(((r,i)=>{const o=s[i];return"x"===i&&(r[o]=t),"y"===i&&(r[o]=e),"color"===i&&(r[o]=n),r}),{}),l=((t,e,n)=>e.map((e=>{const r=["x","color"].reduce(((r,i)=>{const o=n[i];return o?e[o]===t[o]&&r:r}),!0);return r?Object.assign(Object.assign({},e),t):e})))(c,a,s);return((t,e)=>{i.emit("element-point:moved",{nativeEvent:!0,data:{changeData:t,data:e}})})(c,l),Q({},o,{data:l,animate:!1})}));return Object.assign(Object.assign({},o),{marks:s})})),yield c("elementPointMove")}));if(["line","area"].includes(r))v.forEach(((e,r)=>{const i=R.invert(S[r]);if(!i)return;const c=new Cg({name:lG,style:Object.assign({cx:e[0],cy:e[1],fill:p},s)}),l=((t,e)=>{const n=rt(t,["__data__","seriesItems",e,"0","value"]),r=rt(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:o,transform:a}}=t.parentNode,s=A(a,(({type:t})=>"normalizeY"===t)),c=rt(o,["y","field"]),l=i[r][c];return t=>s?1===n?t:t/(1-t)/(n/(1-n))*l:t})(t,r);c.addEventListener("mousedown",(f=>{const h=C.output([S[r],0]),d=null==m?void 0:m.length;u.attr("cursor","move"),y[1]!==r&&(y[1]=r,O()),hG(E.childNodes,y,s);const[p,x]=dG(E,c,o,a),k=t=>{const i=e[1]+t.clientY-D[1];if(M)if(w){const o=e[0]+t.clientX-D[0],[a,s]=gG(I,h,[o,i]),[,u]=C.output([1,j.output(0)]),[,f]=C.invert([a,u-(v[r+d][1]-s)]),g=(r+1)%d,y=j$([v[(r-1+d)%d],[a,s],m[g]&&v[g]]);x.attr("text",l(j.invert(f)).toFixed(n)),p.attr("d",y),c.attr("cx",a),c.attr("cy",s)}else{const[,t]=C.output([1,j.output(0)]),[,o]=C.invert([e[0],t-(v[r+d][1]-i)]),a=j$([v[r-1],[e[0],i],m[r+1]&&v[r+1]]);x.attr("text",l(j.invert(o)).toFixed(n)),p.attr("d",a),c.attr("cy",i)}else{const[,t]=C.invert([e[0],i]),o=j$([v[r-1],[e[0],i],v[r+1]]);x.attr("text",j.invert(t).toFixed(n)),p.attr("d",o),c.attr("cy",i)}};D=[f.clientX,f.clientY],window.addEventListener("mousemove",k);const _=()=>Re(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),window.removeEventListener("mousemove",k),u.removeEventListener("mouseup",_),Y(x.attr("text")))return;const e=Number(x.attr("text")),n=pG(L,b);g=yield B(i,e,n,["line","area"]),x.remove(),p.remove(),T(t)}));u.addEventListener("mouseup",_)})),E.appendChild(c)})),hG(E.childNodes,y,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]:k&&(e=v[0]);const i=(t=>{const e=rt(t,["__data__","y"]),n=rt(t,["__data__","y1"])-e,{__data__:{data:r,encode:i,transform:o},childNodes:a}=t.parentNode,s=A(o,(({type:t})=>"normalizeY"===t)),c=rt(i,["y","field"]),l=r[a.indexOf(t)][c];return(t,e=!1)=>s||e?t/(1-t)/(n/(1-n))*l:t})(t),c=new Cg({name:lG,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=pG(L,b),[f,h]=dG(E,c,o,a),d=t=>{if(x){const r=e[0]+t.clientX-D[0],[o]=C.output([j.output(0),j.output(0)]),[,a]=C.invert([o+(r-v[2][0]),e[1]]),s=j$([[r,v[0][1]],[r,v[1][1]],v[2],v[3]],!0);h.attr("text",i(j.invert(a)).toFixed(n)),f.attr("d",s),c.attr("cx",r)}else if(k){const r=e[1]+t.clientY-D[1],o=e[0]+t.clientX-D[0],[a,s]=gG(I,[o,r],e),[l,u]=gG(I,[o,r],v[1]),d=C.invert([a,s])[1],p=P-d;if(p<0)return;const g=function(t,e,n=0){const r=[["M",...e[1]]],i=L$(t,e[1]),o=L$(t,e[0]);return 0===i?r.push(["L",...e[3]],["A",o,o,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",o,o,0,n,1,...e[0]],["Z"]),r}(I,[[a,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",a),c.attr("cy",s)}else{const r=e[1]+t.clientY-D[1],[,o]=C.output([1,j.output(0)]),[,a]=C.invert([e[0],o-(v[2][1]-r)]),s=j$([[v[0][0],r],[v[1][0],r],v[2],v[3]],!0);h.attr("text",i(j.invert(a)).toFixed(n)),f.attr("d",s),c.attr("cy",r)}};D=[s.clientX,s.clientY],window.addEventListener("mousemove",d);const p=()=>Re(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),u.removeEventListener("mouseup",p),window.removeEventListener("mousemove",d),Y(h.attr("text")))return;const e=Number(h.attr("text"));g=yield B(_,e,l,[r]),h.remove(),f.remove(),T(t)}));u.addEventListener("mouseup",p)})),E.appendChild(c)}};v.forEach(((t,e)=>{y[0]===e&&T(t),t.addEventListener("click",_),t.addEventListener("mouseenter",uG),t.addEventListener("mouseleave",fG)}));const P=t=>{const e=null==t?void 0:t.target;e&&(e.name===lG||v.includes(e))||(y=[],O(),E.removeChildren())};return i.on("element-point:select",S),i.on("element-point:unselect",P),u.addEventListener("mousedown",P),()=>{E.remove(),i.off("element-point:select",S),i.off("element-point:unselect",P),u.removeEventListener("mousedown",P),v.forEach((t=>{t.removeEventListener("click",_),t.removeEventListener("mouseenter",uG),t.removeEventListener("mouseleave",fG)}))}}}var yG={},mG={};function bG(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function xG(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 wG(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function kG(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+wG(-t,6):t>9999?"+"+wG(t,6):wG(t,4)}(t.getUTCFullYear())+"-"+wG(t.getUTCMonth()+1,2)+"-"+wG(t.getUTCDate(),2)+(i?"T"+wG(e,2)+":"+wG(n,2)+":"+wG(r,2)+"."+wG(i,3)+"Z":r?"T"+wG(e,2)+":"+wG(n,2)+":"+wG(r,2)+"Z":n||e?"T"+wG(e,2)+":"+wG(n,2)+"Z":"")}function MG(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,c=o<=0,l=!1;function u(){if(c)return mG;if(l)return l=!1,yG;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?c=!0:10===(r=t.charCodeAt(a++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(e=a++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=u())!==mG;){for(var f=[];r!==yG&&r!==mG;)f.push(r),r=u();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function o(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?kG(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=bG(t);return function(r,i){return e(n(r),i,t)}}(t,e):bG(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=xG(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=xG(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}function EG(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;OG&&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 OG=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),_G=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>Re(void 0,void 0,void 0,(function*(){const t=yield fetch(e);if("csv"===n){const e=yield t.text();return MG(r).parse(e,i?EG:Yo)}if("json"===n)return yield t.json();throw new Error(`Unknown format: ${n}.`)}))};_G.props={};const SG=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 AG(t){return null!=t&&!Number.isNaN(t)}SG.props={};const TG=t=>{const{callback:e=AG}=t;return t=>t.filter(e)};TG.props={};const PG=t=>{const{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};PG.props={};const NG=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)))};NG.props={};const CG=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)),{})))};CG.props={};const LG=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)))};LG.props={};const jG=t=>{const{value:e}=t;return()=>e};jG.props={};const RG=t=>{const{callback:e=Yo}=t;return t=>e(t)};RG.props={};const IG=t=>{const{callback:e=Yo}=t;return t=>Array.isArray(t)?t.map(e):t};IG.props={};const DG=Math.PI/180,BG=2048;function FG(t){return t.text}function zG(){return"serif"}function $G(){return"normal"}function WG(t){return t.value}function GG(){return 90*~~(2*Math.random())}function HG(){return 1}function YG(){}function qG(t,e,n,r){if(e.sprite)return;const i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,BG/o);let a=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,l=e.size<<1;if(e.rotate){const n=Math.sin(e.rotate*DG),r=Math.cos(e.rotate*DG),i=t*r,o=t*n,a=l*r,s=l*n;t=Math.max(Math.abs(i+s),Math.abs(i-s))+31>>5<<5,l=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(l>c&&(c=l),a+t>=2048&&(a=0,s+=c,c=0),s+l>=BG)break;i.translate((a+(t>>1))/o,(s+(l>>1))/o),e.rotate&&i.rotate(e.rotate*DG),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=l,e.xoff=a,e.yoff=s,e.x1=t>>1,e.y1=l>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}const u=i.getImageData(0,0,2048/o,BG/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;const t=e.width,i=t>>5;let o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(a=e.xoff,null==a)return;s=e.yoff;let c=0,l=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){const t=i*n+(e>>5),r=u[2048*(s+n)+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,c|=r}c?l=n:(e.y0++,o--,n--,s++)}e.y1=e.y0+l,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}function VG(t,e,n){n>>=5;const r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,s=32-a,c=t.y1-t.y0;let l,u=(t.y+t.y0)*n+(o>>5);for(let t=0;t<c;t++){l=0;for(let n=0;n<=i;n++)if((l<<s|(n<i?(l=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}function UG(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 XG(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function ZG(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function KG(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function QG(){return document.createElement("canvas")}function JG(t){return"function"==typeof t?t:function(){return t}}const tH={archimedean:ZG,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 eH(){let t=[256,256],e=FG,n=zG,r=WG,i=$G,o=GG,a=HG,s=ZG,c=Math.random,l=YG,u=[],f=null,h=1/0,d=QG;const p=$G,g={};function v(e,n,r){const i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=s(t),u=c()<.5?1:-1;let f,h,d,p=-u;for(;(f=l(p+=u))&&(h=~~f[0],d=~~f[1],!(Math.min(Math.abs(h),Math.abs(d))>=a));)if(n.x=i+h,n.y=o+d,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||!VG(n,e,t[0]))&&(!r||XG(n,r))){const r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),s=127&a,c=32-s,l=n.y1-n.y0;let u,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<l;t++){u=0;for(let n=0;n<=i;n++)e[f+n]|=u<<c|(n<i?(u=r[t*i+n])>>>s:0);f+=o}return delete n.sprite,!0}return!1}return g.start=function(){const[s,y]=t,m=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=BG/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:KG((t[0]>>5)*t[1]),x=u.length,w=[],k=u.map((function(t,s,c){return t.text=e.call(this,t,s,c),t.font=n.call(this,t,s,c),t.style=p.call(this,t,s,c),t.weight=i.call(this,t,s,c),t.rotate=o.call(this,t,s,c),t.size=~~r.call(this,t,s,c),t.padding=a.call(this,t,s,c),t})).sort((function(t,e){return e.size-t.size}));let M=-1,E=g.board?[{x:0,y:0},{x:s,y:y}]:void 0;function O(){const e=Date.now();for(;Date.now()-e<h&&++M<x;){const e=k[M];e.x=s*(c()+.5)>>1,e.y=y*(c()+.5)>>1,qG(m,e,k,M),e.hasText&&v(b,e,E)&&(l.call(null,"word",{cloud:g,word:e}),w.push(e),E?g.hasImage||UG(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}g._tags=w,g._bounds=E,M>=x&&(g.stop(),l.call(null,"end",{cloud:g,words:w,bounds:E}))}return f&&clearInterval(f),f=setInterval(O,0),O(),g},g.stop=function(){return f&&(clearInterval(f),f=null),g},g.createMask=e=>{const n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;const o=r>>5,a=KG((r>>5)*i);n.width=r,n.height=i;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,i);const c=s.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=o*t+(e>>5),i=t*r+e<<2,s=c[i]>=250&&c[i+1]>=250&&c[i+2]>=250?1<<31-e%32:0;a[n]|=s}g.board=a,g.hasImage=!0},g.timeInterval=function(t){h=null==t?1/0:t},g.words=function(t){u=t},g.size=function(e=[]){t=[+e[0],+e[1]]},g.text=function(t){e=JG(t)},g.font=function(t){n=JG(t)},g.fontWeight=function(t){i=JG(t)},g.rotate=function(t){o=JG(t)},g.canvas=function(t){d=JG(t)},g.spiral=function(t){s=tH[t]||t},g.fontSize=function(t){r=JG(t)},g.padding=function(t){a=JG(t)},g.random=function(t){c=JG(t)},g.on=function(t){l=JG(t)},g}const nH={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return 30*(~~(6*Math.random())-3)}};function rH(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 iH=(t,e)=>n=>Re(void 0,void 0,void 0,(function*(){const r=Object.assign({},nH,t,{canvas:e.createCanvas}),i=eH();var o,a;yield(o=i,a=r,{set(t,e,n){if(void 0===a[t])return this;const r=e?e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof o[t]?o[t](r):o[t]=r,this},setAsync(t,e,n){return Re(this,void 0,void 0,(function*(){if(void 0===a[t])return this;const r=e?yield e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof o[t]?o[t](r):o[t]=r,this}))}}).set("fontSize",(t=>{const e=n.map((t=>t.value));return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[i,o]=e;return o===i?()=>(r+n)/2:({value:t})=>(r-n)/(o-i)*(t-i)+n}return()=>t}(t,[mr(e),vr(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",rH,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=Le(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:y,y:m}]=f,b={text:"",value:0,opacity:0,fontSize:0};return p.push(Object.assign(Object.assign({},b),{x:d?0:g,y:d?0:v}),Object.assign(Object.assign({},b),{x:d?c:y,y:d?l:m})),p}));function oH(t){return"string"==typeof t?e=>e[t]:t}iH.props={};const aH=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:o=NaN}=t,[a,s]=n,c=oH(s),l=oH(a),u=er(e,(([t])=>t),(t=>c(t)));return t=>t.map((t=>{const e=u.get(l(t));return Object.assign(Object.assign({},t),r.reduce(((t,n,r)=>(t[i[r]]=e?e[n]:o,t)),{}))}))};aH.props={};const sH=t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)};sH.props={};var cH={exports:{}},lH={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}}(lH),function(t){var e=Math.log(2),n=t.exports,r=lH.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,o=r.isNumber(e.width)?e.width:2,a=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)/(a-1);return n&&(s-=2*o*l),i&&(c+=2*o*l),{min:s,max:c}},t.exports.create=function(t,e){if(e=e||{},!t||0===t.length)return[];var o=r.isNumber(e.size)?e.size:50,a=r.isNumber(e.width)?e.width:2,s=n.getUnifiedMinMax(t,{size:o,width:a,min:e.min,max:e.max}),c=s.min,l=s.max-c,u=l/(o-1);if(0===l)return[{x:c,y:1}];for(var f=[],h=0;h<o;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,a),p=d[a],g=d[a-1]-d[a-2],v=0;t.forEach((function(t){var e=function(t){return Math.floor((t-c)/u)}(t);if(!(e+a<0||e-a>=f.length)){var n=Math.max(e-a,0),i=e,o=Math.min(e+a,f.length-1),s=n-(e-a),l=e+a-o,h=d[-a-1+s]||0,y=d[-a-1+l]||0,m=p/(p-h-y);s>0&&(v+=m*(s-1)*g);var b=Math.max(0,e-a+1);r.inside(0,f.length-1,b)&&(f[b].y+=1*m*g),r.inside(0,f.length-1,i+1)&&(f[i+1].y-=2*m*g),r.inside(0,f.length-1,o+1)&&(f[o+1].y+=1*m*g)}}));var y=v,m=0,b=0;return f.forEach((function(t){m+=t.y,y+=m,t.y=y,b+=y})),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)}}}(cH);var uH=cH.exports;const fH=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:i,max:o,size:a=10,width:s}=t,[c,l]=r;return t=>{const r=Array.from(Jn(t,(t=>n.map((e=>t[e])).join("-"))).values());return r.map((t=>{const n=uH.create(t.map((t=>t[e])),{min:i,max:o,size:a,width:s}),r=n.map((t=>t.x)),u=n.map((t=>t.y));return Object.assign(Object.assign({},t[0]),{[c]:r,[l]:u})}))}};function hH(t){const e=new Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function dH(t,e){return hH(t).map((()=>hH(e)))}function pH(t,e){let n=0;for(let r=0;r<t.length;++r)n+=t[r]*e[r];return n}function gH(t){return Math.sqrt(pH(t,t))}function vH(t,e,n){for(let r=0;r<e.length;++r)t[r]=e[r]*n}function yH(t,e,n,r,i){for(let o=0;o<t.length;++o)t[o]=e*n[o]+r*i[o]}function mH(t,e,n,r,i,o,a){const s=n.fx,c=pH(n.fxprime,e);let l=s,u=s,f=c,h=0;function d(u,h,d){for(let p=0;p<16;++p)if(i=(u+h)/2,yH(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),f=pH(r.fxprime,e),l>s+o*i*c||l>=d)h=i;else{if(Math.abs(f)<=-a*c)return i;f*(h-u)>=0&&(h=u),u=i,d=l}return 0}i=i||1,o=o||1e-6,a=a||.1;for(let p=0;p<10;++p){if(yH(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),f=pH(r.fxprime,e),l>s+o*i*c||p&&l>=u)return d(h,i,u);if(Math.abs(f)<=-a*c)return i;if(f>=0)return d(i,h,l);u=l,h=i,i*=2}return i}function bH(t,e,n){let r={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const o=e.slice();let a,s=1;const c=(n=n||{}).maxIterations||20*e.length;r.fx=t(r.x,r.fxprime);const l=r.fxprime.slice();vH(l,r.fxprime,-1);for(let e=0;e<c;++e){if(s=mH(t,l,r,i,s),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),s){yH(o,1,i.fxprime,-1,r.fxprime);const t=pH(r.fxprime,r.fxprime);yH(l,Math.max(0,pH(o,i.fxprime)/t),l,-1,i.fxprime),a=r,r=i,i=a}else vH(l,r.fxprime,-1);if(gH(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),r}fH.props={};const xH=1e-10;function wH(t,e){const n=function(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=OH(t[n],t[r]);for(let t=0;t<i.length;++t){const o=i[t];o.parentIndex=[n,r],e.push(o)}}return e}(t),r=n.filter((function(e){return function(t,e){for(let n=0;n<e.length;++n)if(MH(t,e[n])>e[n].radius+xH)return!1;return!0}(e,t)}));let i,o=0,a=0;const s=[];if(r.length>1){const e=function(t){const e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}(r);for(i=0;i<r.length;++i){const t=r[i];t.angle=Math.atan2(t.x-e.x,t.y-e.y)}r.sort((function(t,e){return e.angle-t.angle}));let n=r[r.length-1];for(i=0;i<r.length;++i){const e=r[i];a+=(n.x+e.x)*(e.y-n.y);const c={x:(e.x+n.x)/2,y:(e.y+n.y)/2};let l=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.indexOf(e.parentIndex[r])>-1){const i=t[e.parentIndex[r]],o=Math.atan2(e.x-i.x,e.y-i.y),a=Math.atan2(n.x-i.x,n.y-i.y);let s=a-o;s<0&&(s+=2*Math.PI);const u=a-s/2;let f=MH(c,{x:i.x+i.radius*Math.sin(u),y:i.y+i.radius*Math.cos(u)});f>2*i.radius&&(f=2*i.radius),(null===l||l.width>f)&&(l={circle:i,width:f,p1:e,p2:n})}null!==l&&(s.push(l),o+=kH(l.circle.radius,l.width),n=e)}}else{let e=t[0];for(i=1;i<t.length;++i)t[i].radius<e.radius&&(e=t[i]);let n=!1;for(i=0;i<t.length;++i)if(MH(t[i],e)>Math.abs(e.radius-t[i].radius)){n=!0;break}n?o=a=0:(o=e.radius*e.radius*Math.PI,s.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-xH,y:e.y+e.radius},width:2*e.radius}))}return a/=2,e&&(e.area=o+a,e.arcArea=o,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),o+a}function kH(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function MH(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function EH(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=e-(n*n-t*t+e*e)/(2*n);return kH(t,t-(n*n-e*e+t*t)/(2*n))+kH(e,r)}function OH(t,e){const n=MH(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const o=(r*r-i*i+n*n)/(2*n),a=Math.sqrt(r*r-o*o),s=t.x+o*(e.x-t.x)/n,c=t.y+o*(e.y-t.y)/n,l=-(e.y-t.y)*(a/n),u=-(e.x-t.x)*(a/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function _H(t,e){(e=e||{}).maxIterations=e.maxIterations||500;const n=e.initialLayout||TH,r=e.lossFunction||PH;t=function(t){t=t.slice();const e=[],n={};let r,i,o,a;for(r=0;r<t.length;++r){const i=t[r];1==i.sets.length?e.push(i.sets[0]):2==i.sets.length&&(o=i.sets[0],a=i.sets[1],n[[o,a]]=!0,n[[a,o]]=!0)}for(e.sort(((t,e)=>t>e?1:-1)),r=0;r<e.length;++r)for(o=e[r],i=r+1;i<e.length;++i)a=e[i],[o,a]in n||t.push({sets:[o,a],size:0});return t}(t);const i=n(t,e),o=[],a=[];let s;for(s in i)i.hasOwnProperty(s)&&(o.push(i[s].x),o.push(i[s].y),a.push(s));const c=function(t,e,n){const r=(n=n||{}).maxIterations||200*e.length,i=n.nonZeroDelta||1.05,o=n.zeroDelta||.001,a=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=void 0!==n.rho?n.rho:1,l=void 0!==n.chi?n.chi:2,u=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5;let h;const d=e.length,p=new Array(d+1);p[0]=e,p[0].fx=t(e),p[0].id=0;for(let n=0;n<d;++n){const r=e.slice();r[n]=r[n]?r[n]*i:o,p[n+1]=r,p[n+1].fx=t(r),p[n+1].id=n+1}function g(t){for(let e=0;e<t.length;e++)p[d][e]=t[e];p[d].fx=t.fx}const v=(t,e)=>t.fx-e.fx,y=e.slice(),m=e.slice(),b=e.slice(),x=e.slice();for(let e=0;e<r;++e){if(p.sort(v),n.history){const t=p.map((t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e}));t.sort(((t,e)=>t.id-e.id)),n.history.push({x:p[0].slice(),fx:p[0].fx,simplex:t})}h=0;for(let t=0;t<d;++t)h=Math.max(h,Math.abs(p[0][t]-p[1][t]));if(Math.abs(p[0].fx-p[d].fx)<a&&h<s)break;for(let t=0;t<d;++t){y[t]=0;for(let e=0;e<d;++e)y[t]+=p[e][t];y[t]/=d}const e=p[d];if(yH(m,1+c,y,-c,e),m.fx=t(m),m.fx<p[0].fx)yH(x,1+l,y,-l,e),x.fx=t(x),x.fx<m.fx?g(x):g(m);else if(m.fx>=p[d-1].fx){let n=!1;if(m.fx>e.fx?(yH(b,1+u,y,-u,e),b.fx=t(b),b.fx<e.fx?g(b):n=!0):(yH(b,1-u*c,y,u*c,e),b.fx=t(b),b.fx<m.fx?g(b):n=!0),n){if(f>=1)break;for(let e=1;e<p.length;++e)yH(p[e],1-f,p[0],f,p[e]),p[e].fx=t(p[e])}}else g(m)}return p.sort(v),{fx:p[0].fx,x:p[0]}}((function(e){const n={};for(let t=0;t<a.length;++t){const r=a[t];n[r]={x:e[2*t],y:e[2*t+1],radius:i[r].radius}}return r(n,t)}),o,e),l=c.x;for(let t=0;t<a.length;++t)s=a[t],i[s].x=l[2*t],i[s].y=l[2*t+1];return i}const SH=1e-10;function AH(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+SH?Math.abs(t-e):function(t,e,n,r){const i=(r=r||{}).maxIterations||100,o=r.tolerance||1e-10,a=t(e),s=t(n);let c=n-e;if(a*s>0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===s)return n;for(let n=0;n<i;++n){c/=2;const n=e+c,r=t(n);if(r*a>=0&&(e=n),Math.abs(c)<o||0===r)return n}return e+c}((function(r){return EH(t,e,r)-n}),0,t+e)}function TH(t,e){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:PH,r={},i={};let o;for(let e=0;e<t.length;++e){const n=t[e];1==n.sets.length&&(o=n.sets[0],r[o]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:n.size,radius:Math.sqrt(n.size/Math.PI)},i[o]=[])}t=t.filter((function(t){return 2==t.sets.length}));for(let e=0;e<t.length;++e){const n=t[e];let o=n.hasOwnProperty("weight")?n.weight:1;const a=n.sets[0],s=n.sets[1];n.size+SH>=Math.min(r[a].size,r[s].size)&&(o=0),i[a].push({set:s,size:n.size,weight:o}),i[s].push({set:a,size:n.size,weight:o})}const a=[];for(o in i)if(i.hasOwnProperty(o)){let t=0;for(let e=0;e<i[o].length;++e)t+=i[o][e].size*i[o][e].weight;a.push({set:o,size:t})}function s(t,e){return e.size-t.size}a.sort(s);const c={};function l(t){return t.set in c}function u(t,e){r[e].x=t.x,r[e].y=t.y,c[e]=!0}u({x:0,y:0},a[0].set);for(let e=1;e<a.length;++e){const c=a[e].set,f=i[c].filter(l);if(o=r[c],f.sort(s),0===f.length)throw"ERROR: missing pairwise overlap information";const h=[];for(let t=0;t<f.length;++t){const e=r[f[t].set],n=AH(o.radius,e.radius,f[t].size);h.push({x:e.x+n,y:e.y}),h.push({x:e.x-n,y:e.y}),h.push({y:e.y+n,x:e.x}),h.push({y:e.y-n,x:e.x});for(let i=t+1;i<f.length;++i){const t=r[f[i].set],a=AH(o.radius,t.radius,f[i].size),s=OH({x:e.x,y:e.y,radius:n},{x:t.x,y:t.y,radius:a});for(let t=0;t<s.length;++t)h.push(s[t])}}let d=1e50,p=h[0];for(let e=0;e<h.length;++e){r[c].x=h[e].x,r[c].y=h[e].y;const i=n(r,t);i<d&&(d=i,p=h[e])}u(p,c)}return r}(t,e);const r=e.lossFunction||PH;if(t.length>=8){const i=function(t,e){e=e||{};const n=e.restarts||10,r=[],i={};let o;for(o=0;o<t.length;++o){const e=t[o];1==e.sets.length&&(i[e.sets[0]]=r.length,r.push(e))}const a=function(t,e,n){const r=dH(e.length,e.length),i=dH(e.length,e.length);return t.filter((function(t){return 2==t.sets.length})).map((function(t){const o=n[t.sets[0]],a=n[t.sets[1]],s=AH(Math.sqrt(e[o].size/Math.PI),Math.sqrt(e[a].size/Math.PI),t.size);r[o][a]=r[a][o]=s;let c=0;t.size+1e-10>=Math.min(e[o].size,e[a].size)?c=1:t.size<=1e-10&&(c=-1),i[o][a]=i[a][o]=c})),{distances:r,constraints:i}}(t,r,i);let s=a.distances;const c=a.constraints,l=gH(s.map(gH))/s.length;s=s.map((function(t){return t.map((function(t){return t/l}))}));const u=function(t,e){return function(t,e,n,r){let i,o=0;for(i=0;i<e.length;++i)e[i]=0;for(i=0;i<n.length;++i){const a=t[2*i],s=t[2*i+1];for(let c=i+1;c<n.length;++c){const l=t[2*c],u=t[2*c+1],f=n[i][c],h=r[i][c],d=(l-a)*(l-a)+(u-s)*(u-s),p=Math.sqrt(d),g=d-f*f;h>0&&p<=f||h<0&&p>=f||(o+=2*g*g,e[2*i]+=4*g*(a-l),e[2*i+1]+=4*g*(s-u),e[2*c]+=4*g*(l-a),e[2*c+1]+=4*g*(u-s))}}return o}(t,e,s,c)};let f,h;for(o=0;o<n;++o){h=bH(u,hH(2*s.length).map(Math.random),e),(!f||h.fx<f.fx)&&(f=h)}const d=f.x,p={};for(o=0;o<r.length;++o){const t=r[o];p[t.sets[0]]={x:d[2*o]*l,y:d[2*o+1]*l,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(o=0;o<e.history.length;++o)vH(e.history[o].x,l);return p}(t,e);r(i,t)+1e-8<r(n,t)&&(n=i)}return n}function PH(t,e){let n=0;for(let r=0;r<e.length;++r){const i=e[r];let o;if(1==i.sets.length)continue;if(2==i.sets.length){const e=t[i.sets[0]],n=t[i.sets[1]];o=EH(e.radius,n.radius,MH(e,n))}else o=wH(i.sets.map((function(e){return t[e]})));n+=(i.hasOwnProperty("weight")?i.weight:1)*(o-i.size)*(o-i.size)}return n}function NH(t,e,n,r){const i=[],o=[];for(const e in t)t.hasOwnProperty(e)&&(o.push(e),i.push(t[e]));e-=2*r,n-=2*r;const a=function(t){const e=function(e){const n=Math.max.apply(null,t.map((function(t){return t[e]+t.radius}))),r=Math.min.apply(null,t.map((function(t){return t[e]-t.radius})));return{max:n,min:r}};return{xRange:e("x"),yRange:e("y")}}(i),s=a.xRange,c=a.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=e/(s.max-s.min),u=n/(c.max-c.min),f=Math.min(u,l),h=(e-(s.max-s.min)*f)/2,d=(n-(c.max-c.min)*f)/2,p={};for(let t=0;t<i.length;++t){const e=i[t];p[o[t]]={radius:f*e.radius,x:r+h+(e.x-s.min)*f,y:r+d+(e.y-c.min)*f}}return p}const CH=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[o,a]=r;return t=>{const r=t.map((t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[o]:t.sets.join("&")})));r.sort(((t,e)=>t.sets.length-e.sets.length));const s=_H(r);let c;return r.map((t=>{const n=t[e];return Object.assign(Object.assign({},t),{[a]:({width:t,height:e})=>{c=c||NH(s,t,e,i);const r=n.map((t=>c[t]));let o=function(t){const e={};wH(t,e);const n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){const t=n[0].circle;return function(t,e,n){const r=[],i=t-n,o=e;return r.push("M",i,o),r.push("A",n,n,0,1,0,i+2*n,o),r.push("A",n,n,0,1,0,i,o),r.join(" ")}(t.x,t.y,t.radius)}{const t=["\nM",n[0].p2.x,n[0].p2.y];for(let e=0;e<n.length;++e){const r=n[e],i=r.circle.radius,o=r.width>i;t.push("\nA",i,i,0,o?1:0,1,r.p1.x,r.p1.y)}return t.join(" ")}}(r);return/[zZ]$/.test(o)||(o+=" Z"),o}})}))}};CH.props={};const LH=()=>t=>(console.log("G2 data section:",t),t);LH.props={};const jH=t=>{const{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{const i=t.map((t=>t[e])),o=function(t,e){if(e<0||e>1)throw new Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0];const r=[];for(const i of t){if(null==i){r.push(i),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=i);const o=n*e+(1-e)*i;r.push(o),n=o}return r}(i,n);return t.map(((t,e)=>Object.assign(Object.assign({},t),{[r]:o[e]})))}};jH.props={};function RH(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function IH(t,e,n=.01){const[r,i]=t,[o,a]=e;return r>=o[0]-n&&r<=a[0]+n&&i>=o[1]-n&&i<=a[1]+n}const DH=t=>{const{priority:e}=t;return t=>{const n=[];return e&&t.sort(e),t.forEach((t=>{c$(t);const e=t.getLocalBounds(),r=n.some((t=>function(t,e){const[n,r]=t,[i,o]=e;return n[0]<o[0]&&r[0]>i[0]&&n[1]<o[1]&&r[1]>i[1]}(RH(e),RH(t.getLocalBounds()))));r?s$(t):n.push(t)})),t}};function BH([t,e],[n,r]){return r>t&&e>n}function FH(){const t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function zH(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 $H=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{const i=t.length;if(i<=1)return t;const[o,a]=FH(),[s,c]=FH(),[l,u]=FH(),[f,h]=FH();for(const e of t){const{min:t,max:n}=zH(e),[r,i]=t,[o,s]=n;a(e,i),c(e,i),u(e,s-i),h(e,[r,o])}for(let o=0;o<e;o++){t.sort(((t,e)=>Rn(s(t),s(e))));let e=0;for(let n=0;n<i-1;n++){const i=t[n];let o,a=n+1;for(;(o=t[a])&&!BH(f(i),f(o));)a+=1;if(o){const t=s(i),n=l(i),a=s(o),u=a-(t+n);if(u<r){const n=(r-u)/2;e=Math.max(e,n),c(i,t-n),c(o,a+n)}}}if(e<n)break}for(const e of t)e.style.y+=s(e)-o(e);return t}};function WH(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function GH(t,e,n){return.2126*WH(t)+.7152*WH(e)+.0722*WH(n)}function HH(t,e){if(!t||!e||t===e)return 1;const{r:n,g:r,b:i}=t,{r:o,g:a,b:s}=e,c=GH(n,r,i),l=GH(o,a,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function YH(t,e){const n=yr(e,(e=>HH(t,function(t){return"object"==typeof t?t:lh(t)}(e))));return e[n]}const qH=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach((t=>{const r=t.attr("dependentElement").parsedStyle.fill;HH(t.parsedStyle.fill,r)<e&&t.attr("fill",YH(r,n))})),t)},VH=()=>t=>(t.forEach((t=>{c$(t);const e=t.attr("bounds"),n=function(t,e,n=.01){const[r,i]=t;return!(IH(r,e,n)&&IH(i,e,n))}(RH(t.getLocalBounds()),e);n&&s$(t)})),t),UH=()=>(t,{canvas:e,layout:n})=>(t.forEach((t=>{c$(t);const{max:e,min:r}=t.getRenderBounds(),[i,o]=e,[a,s]=r,c=((t,e)=>{const[[n,r],[i,o]]=e,[[a,s],[c,l]]=t;let u=0,f=0;return a<n?u=n-a:c>i&&(u=i-c),s<r?f=r-s:l>o&&(f=o-l),[u,f]})([[a,s],[i,o]],[[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 XH(){return{"data.fetch":_G,"data.inline":jG,"data.sortBy":LG,"data.sort":PG,"data.filter":TG,"data.pick":NG,"data.rename":CG,"data.fold":SG,"data.slice":sH,"data.custom":RG,"data.map":IG,"data.join":aH,"data.kde":fH,"data.log":LH,"data.wordCloud":iH,"data.ema":jH,"transform.stackY":xa,"transform.binX":Fs,"transform.bin":Bs,"transform.dodgeX":Ha,"transform.jitter":Xa,"transform.jitterX":Za,"transform.jitterY":Ka,"transform.symmetryY":Qa,"transform.diffY":Ja,"transform.stackEnter":Ya,"transform.normalizeY":qa,"transform.select":is,"transform.selectX":os,"transform.selectY":as,"transform.groupX":ms,"transform.groupY":bs,"transform.groupColor":xs,"transform.group":ys,"transform.sortX":ks,"transform.sortY":Es,"transform.sortColor":Ms,"transform.flexX":Os,"transform.pack":Rs,"transform.sample":$s,"transform.filter":Ws,"coordinate.cartesian":e,"coordinate.polar":r,"coordinate.transpose":o,"coordinate.theta":a,"coordinate.parallel":l,"coordinate.fisheye":u,"coordinate.radial":c,"coordinate.radar":f,"coordinate.helix":i,"encode.constant":h,"encode.field":p,"encode.transform":d,"encode.column":g,"mark.interval":PM,"mark.rect":CM,"mark.line":IM,"mark.point":BM,"mark.text":zM,"mark.cell":WM,"mark.area":HM,"mark.link":qM,"mark.image":UM,"mark.polygon":ZM,"mark.box":QM,"mark.vector":tE,"mark.lineX":iE,"mark.lineY":nE,"mark.connector":aE,"mark.range":uE,"mark.rangeX":hE,"mark.rangeY":pE,"mark.path":ZE,"mark.shape":b_,"mark.density":SS,"mark.heatmap":TS,"mark.wordCloud":bS,"palette.category10":LS,"palette.category20":jS,"scale.linear":IS,"scale.ordinal":DS,"scale.band":RS,"scale.identity":BS,"scale.point":FS,"scale.time":zS,"scale.log":$S,"scale.pow":WS,"scale.sqrt":qS,"scale.threshold":GS,"scale.quantile":HS,"scale.quantize":YS,"scale.sequential":VS,"scale.constant":US,"theme.classic":QS,"theme.classicDark":eA,"theme.academy":rA,"theme.light":KS,"theme.dark":tA,"component.axisX":RA,"component.axisY":IA,"component.legendCategory":WA,"component.legendContinuous":VA,"component.legends":dT,"component.title":tT,"component.sliderX":cT,"component.sliderY":lT,"component.scrollbarX":fT,"component.scrollbarY":hT,"animation.scaleInX":pT,"animation.scaleOutX":gT,"animation.scaleInY":vT,"animation.scaleOutY":yT,"animation.waveIn":LT,"animation.fadeIn":mT,"animation.fadeOut":bT,"animation.zoomIn":jT,"animation.zoomOut":RT,"animation.pathIn":IT,"animation.morphing":CT,"animation.growInX":DT,"animation.growInY":BT,"interaction.elementHighlight":F$,"interaction.elementHighlightByX":z$,"interaction.elementHighlightByColor":$$,"interaction.elementSelect":G$,"interaction.elementSelectByX":H$,"interaction.elementSelectByColor":Y$,"interaction.fisheye":V$,"interaction.chartIndex":q$,"interaction.tooltip":gW,"interaction.legendFilter":OW,"interaction.legendHighlight":_W,"interaction.brushHighlight":RW,"interaction.brushXHighlight":DW,"interaction.brushYHighlight":FW,"interaction.brushAxisHighlight":qW,"interaction.brushFilter":VW,"interaction.brushXFilter":UW,"interaction.brushYFilter":XW,"interaction.sliderFilter":JW,"interaction.scrollbarFilter":eG,"interaction.poptip":oG,"interaction.treemapDrillDown":sG,"interaction.elementPointMove":vG,"composition.spaceLayer":KC,"composition.spaceFlex":QC,"composition.facetRect":pL,"composition.repeatMatrix":xL,"composition.facetCircle":_L,"composition.timingKeyframe":AL,"labelTransform.overlapHide":DH,"labelTransform.overlapDodgeY":$H,"labelTransform.overflowHide":VH,"labelTransform.contrastReverse":qH,"labelTransform.exceedAdjust":UH}}function ZH(){return{"composition.geoView":PI,"composition.geoPath":TL}}function KH(){return{"data.arc":GE,"data.cluster":hS,"mark.forceGraph":uS,"mark.tree":mS,"mark.pack":l_,"mark.sankey":FE,"mark.chord":UE,"mark.treemap":a_}}function QH(){return{"data.venn":CH,"mark.boxplot":m_,"mark.gauge":OS,"mark.wordCloud":bS,"mark.liquid":CS}}function JH(){return Object.assign(Object.assign(Object.assign(Object.assign({},ZH()),KH()),QH()),XH())}function tY(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}const eY={};const nY=t=>t?parseInt(t):0;function rY(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 iY{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 rY(this,(n=>{t===n.attr("key")&&(e=n)})),e}getNodesByType(t){const e=[];return rY(this,(n=>{t===n.type&&e.push(n)})),e}getNodeByType(t){let e=null;return rY(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 oY=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],aY="__remove__",sY="__callback__";function cY(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function lY(t,e){const{width:n,height:r,autoFit:i,depth:o=0}=t;let a=640,s=480;if(i){const{width:t,height:n}=function(t){const e=getComputedStyle(t),n=t.clientWidth||nY(e.width),r=t.clientHeight||nY(e.height);return{width:n-(nY(e.paddingLeft)+nY(e.paddingRight)),height:r-(nY(e.paddingTop)+nY(e.paddingBottom))}}(e);a=t||a,s=n||s}return a=n||a,s=r||s,{width:Math.max(I(a)?a:1,1),height:Math.max(I(s)?s:1,1),depth:o}}function uY(t){const e=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];for(const n of oY)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,cY(e));n.length;){const t=n.pop(),e=r.get(t),{children:i=[]}=t;for(const t of i)if(t.type===sY)e.children=t.value;else{const i=cY(t),{children:o=[]}=e;o.push(i),n.push(t),r.set(t,i),e.children=o}}return r.get(e)}function fY(t,e,n,r,i){const{type:o}=t,{type:a=n||o}=e;if(function(t,e){return"function"!=typeof t&&new Set(Object.keys(e)).has(t)}(a,i)){for(const n of oY)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(function(t,e){return"function"==typeof t||new Set(Object.keys(e)).has(t)}(a,r)){const t={type:"view"},n=Object.assign({},e);for(const e of oY)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}function hY(t,e,n){if("function"==typeof t){const e=new iY;return e.value=t,e.type=sY,e}const{type:r,children:i}=t,o=Le(t,["type","children"]),a=function(t,e,n){if("function"==typeof t)return e.mark;const r=Object.assign(Object.assign({},e),n)[t];if(!r)throw new Error(`Unknown mark: ${t}.`);return r}(r,e,n),s=new a;return s.value=o,s.type=r,s}function dY(t,e){const{type:n,children:r}=e,i=Le(e,["type","children"]);t.type===n||void 0===n?ia(t.value,i):"string"==typeof n&&(t.type=n,t.value=i)}function pY(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[t,e]=i.shift(),o=hY(e,n,r);Array.isArray(t.children)&&t.push(o);const{children:a}=e;if(Array.isArray(a))for(const t of a)i.push([o,t]);else"function"==typeof a&&i.push([o,a])}}function gY(t,e,{key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function vY(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 yY(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 mY(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(na(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 bY(t,e,{ctor:n}){t.prototype[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}function xY(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function wY(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:t}=r;"value"===t?gY(e,n,r):"array"===t?vY(e,n,r):"object"===t?yY(e,n,r):"node"===t?bY(e,n,r):"container"===t?xY(e,n,r):"mix"===t&&mY(e,n)}return e}}function kY(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,{type:"node",ctor:e}])))}const MY={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"}},EY=Object.assign(Object.assign({},MY),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),OY=Object.assign(Object.assign({},MY),{labelTransform:{type:"array"}});let _Y=class extends iY{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()&&c$(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&s$(t)}};_Y=je([wY(OY)],_Y);let SY=class extends iY{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)}};SY=je([wY(EY)],SY);const AY="G2_CHART_KEY";class TY extends _Y{constructor(t){const{container:e,canvas:n,renderer:r,plugins:i,lib:o,createCanvas:a}=t;super(Le(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=U((()=>{this.forceFit()}),300),this._renderer=r||new aN,this._plugins=i||[],this._container=function(t){if(void 0===t){const t=document.createElement("div");return t[aY]=!0,t}if("string"==typeof t)return document.getElementById(t);return t}(e),this._emitter=new uN,this._context={library:Object.assign(Object.assign({},o),eY),emitter:this._emitter,canvas:n,createCanvas:a},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const t=new Promise(((t,e)=>e$(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e)))),[e,n,r]=function(){let t,e;return[new Promise(((n,r)=>{e=n,t=r})),e,t]}();return t.then(n).then((()=>{if(this._trailingClear){const t=this.options();this._trailingClear(),this._trailing&&this.options(t)}})).catch(r).then((()=>{this._trailingClear=null,this._renderTrailing()})),e}options(t){if(0===arguments.length)return uY(this);const{type:e}=t;return e&&(this._previousDefinedType=e),function(t,e,n,r,i){const o=[[null,t,fY(t,e,n,r,i)]];for(;o.length;){const[t,e,n]=o.shift();if(e)if(n){dY(e,n);const{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++){const n=t[i],a=r[i];o.push([e,a,n])}}else"function"==typeof t&&o.push([e,null,t])}else e.remove();else pY(t,n,r,i)}}(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(t=!0){if(this._rendering)return this._trailingClear=()=>{this.clear(t)},void this._reset();this.options();this.emit(fN.BEFORE_CLEAR),this._reset(),n$(0,this._context,!1,t),this.emit(fN.AFTER_CLEAR)}destroy(){this.options();this.emit(fN.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),n$(0,this._context,!0),this._container[aY]&&function(t){const e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(fN.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:t,height:e}=lY(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(fN.BEFORE_CHANGE_SIZE);const n=this.render();return n.then((()=>{this.emit(fN.AFTER_CHANGE_SIZE)})),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(fN.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",e);const n=this.render();return n.then((()=>{this.emit(fN.AFTER_CHANGE_SIZE)})),n}getDataByXY(t,e={}){const{shared:n=!1,series:r,facet:i=!1,startX:o=0,startY:a=0}=e,{canvas:s,views:c}=this._context,{document:l}=s,{x:u,y:f}=t,{coordinate:h,scale:d,markState:p,data:g,key:v}=c[0],y=l.getElementsByClassName($T),m=n?t=>t.__data__.x:t=>t,b=Jn(y,m),x=h$(l.getElementsByClassName(WT)[0]),w=t=>Array.from(t.values()).some((t=>{var e,n;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)||(null===(n=t.channels)||void 0===n?void 0:n.some((t=>"series"===t.name&&void 0!==t.values)))})),k=lW(r,w(p)),M=t=>rt(t,"__data__.data",null);try{if(k&&w(p)&&!i){const{selectedData:t}=hW({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:h,scale:d,startX:o,startY:a}),e=g.get(`${v}-0`);return t.map((({index:t})=>e[t]))}const t=m(fW({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:h,scale:d,shared:n})),e=b.get(t);return e?e.map(M):[]}catch(t){const e=s.document.elementFromPointSync(u,f);return e?M(e):[]}}_create(){const{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter((t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t))];this._marks={};for(const t of e){const e=t.split(".").pop();class n extends SY{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 _Y{constructor(){super({},e)}};return n=je([wY(kY(this._marks))],n),[e,n]})));for(const t of Object.values(this._compositions))wY(kY(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=AY}=t,{width:n,height:r,depth:i}=lY(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}=lY(this.options(),this._container);this._plugins.push(new cN),this._plugins.forEach((t=>this._renderer.registerPlugin(t))),this._context.canvas=new fv({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 PY=tY(TY,Object.assign({},JH()));t.AREA_CLASS_NAME=qT,t.Academy=rA,t.Bin=Bs,t.BinX=Fs,t.COMPONENT_CLASS_NAME=HT,t.Chart=PY,t.ChartEvent=fN,t.Classic=QS,t.ClassicDark=eA,t.Dark=tA,t.DiffY=Ja,t.DodgeX=Ha,t.ELEMENT_CLASS_NAME=$T,t.Filter=Ws,t.FlexX=Os,t.Group=ys,t.GroupColor=xs,t.GroupX=ms,t.GroupY=bs,t.Jitter=Xa,t.JitterX=Za,t.JitterY=Ka,t.LABEL_CLASS_NAME=YT,t.LABEL_LAYER_CLASS_NAME=zT,t.Light=KS,t.LinearAxis=LA,t.MAIN_LAYER_CLASS_NAME=FT,t.MASK_CLASS_NAME="mask",t.MaybeDefaultX=Ia,t.MaybeDefaultY=Da,t.MaybeFunctionAttribute=$a,t.MaybeGradient=Ga,t.MaybeIdentityX=Ra,t.MaybeIdentityY=ja,t.MaybeKey=Pa,t.MaybeSeries=Na,t.MaybeSize=Ta,t.MaybeStackY=ka,t.MaybeTitle=Oa,t.MaybeTooltip=Ba,t.MaybeTuple=Wa,t.MaybeTupleX=La,t.MaybeTupleY=Ca,t.MaybeVisualPosition=za,t.MaybeZeroPadding=Fa,t.MaybeZeroX=_a,t.MaybeZeroY=Sa,t.MaybeZeroY1=jn,t.MaybeZeroZ=Aa,t.NormalizeY=qa,t.PLOT_CLASS_NAME=GT,t.Pack=Rs,t.Runtime=TY,t.Sample=$s,t.Select=is,t.SelectX=os,t.SelectY=as,t.Selection=fy,t.SortColor=Ms,t.SortX=ks,t.SortY=Es,t.StackEnter=Ya,t.StackY=xa,t.SymmetryY=Qa,t.VIEW_CLASS_NAME=WT,t.corelib=XH,t.dataOf=Go,t.extend=tY,t.geolib=ZH,t.graphlib=KH,t.plotlib=QH,t.register=function(t,e){var n,r;t.startsWith("symbol.")?(n=t.split(".").pop(),r=e,dm.set(n,r)):Object.assign(eY,{[t]:e})},t.render=e$,t.renderToMountedElement=function(t,e={},n=()=>{},r=t=>{throw t}){var i;const{width:o=640,height:a=480}=t,s=Jz(t),{group:c=new Ig,emitter:l=new uN,library:u}=e;(null==c?void 0:c.parentElement)||Uo("renderToMountedElement can't render chart to unmounted group.");const f=uy(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(fN.BEFORE_RENDER),Ez(Object.assign(Object.assign({},s),{width:o,height:a}),f,e).then((()=>{var t;null===(t=e.canvas)||void 0===t||t.requestAnimationFrame((()=>{l.emit(fN.AFTER_RENDER),null==n||n()}))})).catch((t=>{null==r||r(t)})),c},t.select=uy,t.selectG2Elements=l$,t.selectPlotArea=h$,t.seriesOf=function(t){const e=Wo(t).__data__,{scale:n}=e;return Ho(n,t.__data__)},t.stdlib=JH,Object.defineProperty(t,"__esModule",{value:!0})}));
67
+ */sN.tag="Dragndrop";var cN=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return hl(this,e),(t=wl(this,e)).name="dragndrop",t.options=n,t}return Ml(e,t),pl(e,[{key:"init",value:function(){this.addRenderingPlugin(new sN(fl({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)}}])}(nu),lN=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],o=this._events["*"]||[],a=function(r){for(var i=r.length,o=0;o<i;o++)if(r[o]){var a=r[o],s=a.callback;a.once&&(r.splice(o,1),0===r.length&&delete e._events[t],i--,o--),s.apply(e,n)}};a(i),a(o)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),uN=lN;const fN={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"},hN={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow};class dN extends Error{constructor(t,e,n){super(t),this.position=e,this.token=n,this.name="ExpressionError"}}var pN;!function(t){t[t.STRING=0]="STRING",t[t.NUMBER=1]="NUMBER",t[t.BOOLEAN=2]="BOOLEAN",t[t.NULL=3]="NULL",t[t.IDENTIFIER=4]="IDENTIFIER",t[t.OPERATOR=5]="OPERATOR",t[t.FUNCTION=6]="FUNCTION",t[t.DOT=7]="DOT",t[t.BRACKET_LEFT=8]="BRACKET_LEFT",t[t.BRACKET_RIGHT=9]="BRACKET_RIGHT",t[t.PAREN_LEFT=10]="PAREN_LEFT",t[t.PAREN_RIGHT=11]="PAREN_RIGHT",t[t.COMMA=12]="COMMA",t[t.QUESTION=13]="QUESTION",t[t.COLON=14]="COLON",t[t.DOLLAR=15]="DOLLAR"}(pN||(pN={}));const gN=new Set([32,9,10,13]),vN=new Set([43,45,42,47,37,33,38,124,61,60,62]),yN=new Map([["true",pN.BOOLEAN],["false",pN.BOOLEAN],["null",pN.NULL]]),mN=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),bN=new Map([[46,pN.DOT],[91,pN.BRACKET_LEFT],[93,pN.BRACKET_RIGHT],[40,pN.PAREN_LEFT],[41,pN.PAREN_RIGHT],[44,pN.COMMA],[63,pN.QUESTION],[58,pN.COLON],[36,pN.DOLLAR]]),xN=new Map;for(const[t,e]of bN.entries())xN.set(t,{type:e,value:String.fromCharCode(t)});function wN(t){return t>=48&&t<=57}function kN(t){return t>=97&&t<=122||t>=65&&t<=90||95===t}function MN(t){return kN(t)||wN(t)}function EN(t){return vN.has(t)}var ON;!function(t){t[t.Program=0]="Program",t[t.Literal=1]="Literal",t[t.Identifier=2]="Identifier",t[t.MemberExpression=3]="MemberExpression",t[t.CallExpression=4]="CallExpression",t[t.BinaryExpression=5]="BinaryExpression",t[t.UnaryExpression=6]="UnaryExpression",t[t.ConditionalExpression=7]="ConditionalExpression"}(ON||(ON={}));const _N=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),SN={type:ON.Literal,value:null},AN={type:ON.Literal,value:!0},TN={type:ON.Literal,value:!1},PN=t=>{let e=0;const n=t.length,r=()=>e>=n?null:t[e],i=()=>t[e++],o=t=>{const e=r();return null!==e&&e.type===t},a=t=>t.type===pN.OPERATOR?_N.get(t.value)||-1:t.type===pN.DOT||t.type===pN.BRACKET_LEFT?9:t.type===pN.QUESTION?1:-1,s=t=>{let n,a;if(i().type===pN.DOT){if(!o(pN.IDENTIFIER)){const t=r();throw new dN("Expected property name",e,t?t.value:"<end of input>")}const t=i();n={type:ON.Identifier,name:t.value},a=!1}else{if(n=l(0),!o(pN.BRACKET_RIGHT)){const t=r();throw new dN("Expected closing bracket",e,t?t.value:"<end of input>")}i(),a=!0}return{type:ON.MemberExpression,object:t,property:n,computed:a}},c=()=>{const t=r();if(!t)throw new dN("Unexpected end of input",e,"<end of input>");if(t.type===pN.OPERATOR&&("!"===t.value||"-"===t.value)){i();const e=c();return{type:ON.UnaryExpression,operator:t.value,argument:e,prefix:!0}}switch(t.type){case pN.NUMBER:return i(),{type:ON.Literal,value:Number(t.value)};case pN.STRING:return i(),{type:ON.Literal,value:t.value};case pN.BOOLEAN:return i(),"true"===t.value?AN:TN;case pN.NULL:return i(),SN;case pN.IDENTIFIER:return i(),{type:ON.Identifier,name:t.value};case pN.FUNCTION:return(()=>{const t=i(),n=[];if(!o(pN.PAREN_LEFT)){const t=r();throw new dN("Expected opening parenthesis after function name",e,t?t.value:"<end of input>")}for(i();;){if(o(pN.PAREN_RIGHT)){i();break}if(!r()){const t=r();throw new dN("Expected closing parenthesis",e,t?t.value:"<end of input>")}if(n.length>0){if(!o(pN.COMMA)){const t=r();throw new dN("Expected comma between function arguments",e,t?t.value:"<end of input>")}i()}const t=l(0);n.push(t)}return{type:ON.CallExpression,callee:{type:ON.Identifier,name:t.value},arguments:n}})();case pN.PAREN_LEFT:{i();const t=l(0);if(!o(pN.PAREN_RIGHT)){const t=r();throw new dN("Expected closing parenthesis",e,t?t.value:"<end of input>")}return i(),t}default:throw new dN(`Unexpected token: ${t.type}`,e,t.value)}},l=(u=0)=>{let f=c();for(;e<n;){const n=t[e],c=a(n);if(c<=u)break;if(n.type!==pN.QUESTION)if(n.type!==pN.OPERATOR){if(n.type!==pN.DOT&&n.type!==pN.BRACKET_LEFT)break;f=s(f)}else{i();const t=l(c);f={type:ON.BinaryExpression,operator:n.value,left:f,right:t}}else{i();const t=l(0);if(!o(pN.COLON)){const t=r();throw new dN("Expected : in conditional expression",e,t?t.value:"<end of input>")}i();const n=l(0);f={type:ON.ConditionalExpression,test:f,consequent:t,alternate:n}}}return f},u=l();return{type:ON.Program,body:u}},NN=(t,e,n)=>{let r=e;n&&(r={...e,context:{...e.context,...n}});const i=t=>{switch(t.type){case ON.Literal:return(t=>t.value)(t);case ON.Identifier:return(t=>{if(!(t.name in r.context))throw new dN(`Undefined variable: ${t.name}`);return r.context[t.name]})(t);case ON.MemberExpression:return(t=>{const e=i(t.object);if(null==e)throw new dN("Cannot access property of null or undefined");return e[t.computed?i(t.property):t.property.name]})(t);case ON.CallExpression:return(t=>{const e=r.functions[t.callee.name];if(!e)throw new dN(`Undefined function: ${t.callee.name}`);return e(...t.arguments.map((t=>i(t))))})(t);case ON.BinaryExpression:return(t=>{if("&&"===t.operator){const e=i(t.left);return e?i(t.right):e}if("||"===t.operator)return i(t.left)||i(t.right);const e=i(t.left),n=i(t.right);switch(t.operator){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n;case"%":return e%n;case"===":return e===n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n;default:throw new dN(`Unknown operator: ${t.operator}`)}})(t);case ON.UnaryExpression:return(t=>{const e=i(t.argument);if(t.prefix)switch(t.operator){case"!":return!e;case"-":if("number"!=typeof e)throw new dN(`Cannot apply unary - to non-number: ${e}`);return-e;default:throw new dN(`Unknown operator: ${t.operator}`)}throw new dN(`Postfix operators are not supported: ${t.operator}`)})(t);case ON.ConditionalExpression:return(t=>{const e=i(t.test);return i(e?t.consequent:t.alternate)})(t);default:throw new dN(`Evaluation error: Unsupported node type: ${t.type}`)}};return i(t.body)};const CN=["style","encode","labels","children"],LN=gM((t=>{const e=function(t){const e=(t=>{const e=t,n=e.length,r=new Array(Math.ceil(n/3));let i=0,o=0;function a(t){const r=o+1;o++;let i="",a=!1;for(;o<n;){const n=e.charCodeAt(o);if(n===t)return a||(i=e.substring(r,o)),o++,{type:pN.STRING,value:i};92===n?(a||(i=e.substring(r,o),a=!0),o++,i+=e[o]):a&&(i+=e[o]),o++}throw new dN(`Unterminated string starting with ${String.fromCharCode(t)}`,o,e.substring(Math.max(0,o-10),o))}function s(){const t=o;for(45===e.charCodeAt(o)&&o++;o<n&&wN(e.charCodeAt(o));)o++;if(o<n&&46===e.charCodeAt(o))for(o++;o<n&&wN(e.charCodeAt(o));)o++;const r=e.slice(t,o);return{type:pN.NUMBER,value:r}}function c(){o++;const t=o;if(o<n&&kN(e.charCodeAt(o)))for(o++;o<n&&MN(e.charCodeAt(o));)o++;const r=e.slice(t,o);return{type:pN.FUNCTION,value:r}}function l(){const t=o++;for(;o<n&&MN(e.charCodeAt(o));)o++;const r=e.slice(t,o),i=yN.get(r);return i?{type:i,value:r}:{type:pN.IDENTIFIER,value:r}}function u(){if(o+2<n){const t=e.substring(o,o+3);if(mN.has(t))return o+=3,{type:pN.OPERATOR,value:t}}if(o+1<n){const t=e.substring(o,o+2);if(mN.has(t))return o+=2,{type:pN.OPERATOR,value:t}}const t=e[o];if(mN.has(t))return o++,{type:pN.OPERATOR,value:t};throw new dN(`Unknown operator at position ${o}: ${e.substring(o,o+1)}`,o,e.substring(Math.max(0,o-10),o))}for(;o<n;){const t=e.charCodeAt(o);if(f=t,gN.has(f)){o++;continue}const h=xN.get(t);if(h)r[i++]=h,o++;else if(34!==t&&39!==t)if(wN(t)||45===t&&o+1<n&&wN(e.charCodeAt(o+1)))r[i++]=s();else if(64!==t)if(kN(t))r[i++]=l();else{if(!EN(t))throw new dN(`Unexpected character: ${e[o]}`,o,e.substring(Math.max(0,o-10),o));r[i++]=u()}else r[i++]=c();else r[i++]=a(t)}var f;return i===r.length?r:r.slice(0,i)})(t),n=PN(e),r=((t={},e={})=>({context:t,functions:e}))({},hN);return(t={})=>NN(n,r,t)}(t);return(...t)=>{const n=Array.from({length:t.length},((t,e)=>String.fromCharCode(97+e))),r=Object.fromEntries(t.map(((t,e)=>[n[e],t])));return e(Object.assign(Object.assign({},r),{global:Object.assign({},r)}))}}),(t=>t),128);function jN(t,e=!0){if(Array.isArray(t))return t.map(((n,r)=>jN(t[r],e)));if("object"==typeof t&&t)return function(t,e){void 0===e&&(e=nt);var n={};return w(t)&&!b(t)&&Object.keys(t).forEach((function(r){n[r]=e(t[r],r)})),n}(t,((t,n)=>e&&CN.includes(n)?jN(t,"children"===n):e?t:jN(t,!1)));if("string"==typeof t){const e=t.trim();if(e.startsWith("{")&&e.endsWith("}"))return LN(e.slice(1,-1))}return t}const RN=[["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 IN={}.toString,DN=function(t,e){return IN.call(t)==="[object "+e+"]"},BN=function(t){return Array.isArray?Array.isArray(t):DN(t,"Array")},FN=function(t){return"object"==typeof t&&null!==t},zN=function(t){if(!FN(t)||!DN(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function $N(t,e,n,r){for(var i in n=n||0,r=r||5,e)if(e.hasOwnProperty(i)){var o=e[i];null!==o&&zN(o)?(zN(t[i])||(t[i]={}),n<r?$N(t[i],o,n+1,r):t[i]=e[i]):BN(o)?(t[i]=[],t[i]=t[i].concat(o)):void 0!==o&&(t[i]=o)}}var WN=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)$N(t,e[r]);return t},GN=function(t){return t};function HN(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):GN}function YN(t){return t instanceof Float32Array||t instanceof Array}var qN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},VN=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function UN(t,e,n){for(;t<e;)t+=2*Math.PI;for(;t>n;)t-=2*Math.PI;return t}var XN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},ZN=function(t,e,n,r,i){var o,a,s=XN(t,2),c=s[0],l=s[1],u=ht();return a=[c,l],(o=u)[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=a[0],o[7]=a[1],o[8]=1,o},KN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},QN=function(t,e,n,r,i){var o=new po({range:[e,e+r]}),a=new po({range:[n,n+i]});return{transform:function(t){var e=KN(t,2),n=e[0],r=e[1];return[o.map(n),a.map(r)]},untransform:function(t){var e=KN(t,2),n=e[0],r=e[1];return[o.invert(n),a.invert(r)]}}},JN=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},tC=function(t,e,n,r,i){return(0,JN(t,1)[0])(e,n,r,i)},eC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},nC=function(t,e,n,r,i){return eC(t,1)[0]},rC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},iC=function(t,e,n,r,i){var o=rC(t,4),a=o[0],s=o[1],c=o[2],l=o[3],u=new po({range:[c,l]}),f=new po({range:[a,s]}),h=i/r,d=h>1?1:h,p=h>1?1/h:1;return{transform:function(t){var e=rC(t,2),n=e[0],r=e[1],i=f.map(n),o=u.map(r);return[.5*(o*Math.cos(i)*d)+.5,.5*(o*Math.sin(i)*p)+.5]},untransform:function(t){var e=rC(t,2),n=e[0],r=e[1],i=2*(n-.5)/d,o=2*(r-.5)/p,c=Math.sqrt(Math.pow(i,2)+Math.pow(o,2)),l=UN(Math.atan2(o,i),a,s);return[f.invert(l),u.invert(c)]}}},oC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},aC=function(t,e,n,r,i){return{transform:function(t){var e=oC(t,2),n=e[0];return[e[1],n]},untransform:function(t){var e=oC(t,2),n=e[0];return[e[1],n]}}},sC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},cC=function(t,e,n,r,i){var o,a,s=sC(t,2),c=s[0],l=s[1],u=ht();return a=[c,l],(o=u)[0]=a[0],o[1]=0,o[2]=0,o[3]=0,o[4]=a[1],o[5]=0,o[6]=0,o[7]=0,o[8]=1,o},lC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},uC=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},fC=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return cC.apply(void 0,uC([[-1,-1]],lC(e),!1))},hC=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return cC.apply(void 0,uC([[-1,1]],lC(e),!1))},dC=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return cC.apply(void 0,uC([[1,-1]],lC(e),!1))},pC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},gC=function(t,e,n,r,i){var o=pC(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}(ht(),o)},vC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},yC=function(t,e,n,r,i){var o=vC(t,4),a=o[0],s=o[1],c=o[2],l=(o[3]-c)/((s-0)/(2*Math.PI)+1),u=l/(2*Math.PI),f=new po({range:[c,c+.99*l]}),h=new po({range:[a,s]}),d=i/r,p=d>1?1:d,g=d>1?1/d:1;return{transform:function(t){var e=vC(t,2),n=e[0],r=e[1],i=h.map(n),o=f.map(r);return[.5*(Math.cos(i)*(u*i+o)*p)+.5,.5*(Math.sin(i)*(u*i+o)*g)+.5]},untransform:function(t){var e=vC(t,2),n=e[0],r=e[1],i=2*(n-.5)/p,o=2*(r-.5)/g,c=Math.sqrt(Math.pow(i,2)+Math.pow(o,2)),d=UN(Math.atan2(o,i)+Math.floor(c/l)*Math.PI*2,a,s),v=c-u*d;return[h.invert(d),f.invert(v)]}}},mC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},bC=function(t,e,n,r,i){var o=mC(t,4),a=o[0],s=o[1],c=o[2],l=o[3],u=new po({range:[c,l]});return{transform:function(t){for(var e=[],n=t.length,r=new go({domain:new Array(n).fill(0).map((function(t,e){return e})),range:[a,s]}),i=0;i<n;i++){var o=t[i],c=r.map(i),l=u.map(o);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}}},xC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function wC(t){return 1/Math.tan(t)}var kC=function(t,e,n,r,i){var o=wC(xC(t,1)[0]);return{transform:function(t){var e=xC(t,2),n=e[0],r=e[1];return[n+r*o,r]},untransform:function(t){var e=xC(t,2),n=e[0],r=e[1];return[n-r*o,r]}}},MC=function(t,e,n,r,i){var o=wC(xC(t,1)[0]);return{transform:function(t){var e=xC(t,2),n=e[0];return[n,e[1]+n*o]},untransform:function(t){var e=xC(t,2),n=e[0];return[n,e[1]-n*o]}}},EC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function OC(t,e,n,r,i){var o=t<e,a=(o?e-r:i-e)||i-r,s=o?-1:1;return s*a*(n+1)/(n+a/((t-e)*s))+e}function _C(t,e,n,r,i){var o=t<e,a=(o?e-r:i-e)||i-r;return a/(a*(n+1)/(t-e)-n*(o?-1:1))+e}function SC(t,e,n){return n?new po({range:[0,1],domain:[0,e]}).map(t):t}var AC=function(t,e,n,r,i){var o=EC(t,3),a=o[0],s=o[1],c=o[2],l=SC(a,r,void 0!==c&&c);return{transform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[OC(n,l,s,0,1),r]},untransform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[_C(n,l,s,0,1),r]}}},TC=function(t,e,n,r,i){var o=EC(t,3),a=o[0],s=o[1],c=o[2],l=SC(a,i,void 0!==c&&c);return{transform:function(t){var e=EC(t,2);return[e[0],OC(e[1],l,s,0,1)]},untransform:function(t){var e=EC(t,2);return[e[0],_C(e[1],l,s,0,1)]}}},PC=function(t,e,n,r,i){var o=EC(t,5),a=o[0],s=o[1],c=o[2],l=o[3],u=o[4],f=void 0!==u&&u,h=SC(a,r,f),d=SC(s,i,f);return{transform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[OC(n,h,c,0,1),OC(r,d,l,0,1)]},untransform:function(t){var e=EC(t,2),n=e[0],r=e[1];return[_C(n,h,c,0,1),_C(r,d,l,0,1)]}}},NC=function(t,e,n,r,i){var o=EC(t,5),a=o[0],s=o[1],c=o[2],l=o[3],u=o[4],f=void 0!==u&&u,h=new po({range:[0,r]}),d=new po({range:[0,i]}),p=f?a:h.map(a),g=f?s:d.map(s);return{transform:function(t){var e=EC(t,2),n=e[0],r=e[1],i=h.map(n)-p,o=d.map(r)-g,a=Math.sqrt(i*i+o*o);if(a>c)return[n,r];var s=OC(a,0,l,0,c),u=Math.atan2(o,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=EC(t,2),n=e[0],r=e[1],i=h.map(n)-p,o=d.map(r)-g,a=Math.sqrt(i*i+o*o);if(a>c)return[n,r];var s=_C(a,0,l,0,c),u=Math.atan2(o,i),f=p+s*Math.cos(u),v=g+s*Math.sin(u);return[h.invert(f),d.invert(v)]}}},CC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},LC=function(t,e,n,r,i,o,a){var s=new po({range:[e,e+i]}),c=new po({range:[n,n+o]}),l=new po({range:[r,r+a]});return{transform:function(t){var e=CC(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=CC(t,3),n=e[0],r=e[1],i=e[2];return[s.invert(n),c.invert(r),l.invert(i)]}}},jC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},RC=function(t,e,n,r,i,o,a){var s=jC(t,3),c=s[0],l=s[1],u=s[2];return At(pt(),[c,l,u])},IC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},DC=function(t,e,n,r,i,o,a){return{transform:function(t){var e=IC(t,3),n=e[0];return[e[1],n,e[2]]},untransform:function(t){var e=IC(t,3),n=e[0];return[e[1],n,e[2]]}}},BC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},FC=function(t,e,n,r,i,o,a){var s=BC(t,3),c=s[0],l=s[1],u=s[2];return Tt(pt(),[c,l,u])},zC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},$C=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},WC=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.")},GC=function(){function t(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:QN,translate:ZN,custom:tC,matrix:nC,polar:iC,transpose:aC,scale:cC,"shear.x":kC,"shear.y":MC,reflect:fC,"reflect.x":hC,"reflect.y":dC,rotate:gC,helix:yC,parallel:bC,fisheye:PC,"fisheye.x":AC,"fisheye.y":TC,"fisheye.circular":NC},this.update(t)}return t.prototype.update=function(t){this.options=WN({},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:$C($C([],zC(n),!1),[$C([],zC(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?$C([],zC(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},o=[],a=[],s=function(t,e){return void 0===e&&(e=!0),a.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]],o=t(i);n.push.apply(n,VN([],qN(o),!1))}return n}}(t):t)};try{for(var c=WC(r),l=c.next();!l.done;l=c.next()){var u=zC(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,y=p.width,m=p.height,b=d($C([],zC(h),!1),g,v,y,m);if(YN(b))o.push(b);else{if(o.length)s(this.createMatrixTransform(o,t)),o.splice(0,o.length);s(i(b)||GN,"parallel"!==f)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}o.length&&s(this.createMatrixTransform(o,t));return HN.apply(void 0,$C([],zC(a),!1))},t.prototype.createMatrixTransform=function(t,e){var n=ht();return e&&t.reverse(),t.forEach((function(t){return dt(n,n,t)})),e&&function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=u*a-s*l,h=-u*o+s*c,d=l*o-a*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*a)*p,t[3]=h*p,t[4]=(u*n-i*c)*p,t[5]=(-s*n+i*o)*p,t[6]=d*p,t[7]=(-l*n+r*c)*p,t[8]=(a*n-r*o)*p)}(n,function(t){var e=new ft(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}(n)),function(t){var e=[t[0],t[1],1];return fe(e,e,n),[e[0],e[1]]}},t}(),HC=window&&window.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},YC=window&&window.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},qC=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.")},VC=function(){function t(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:LC,translate3D:RC,scale3D:FC,transpose3D:DC},this.update(t)}return t.prototype.update=function(t){this.options=WN({},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:YC(YC([],HC(n),!1),[YC([],HC(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?YC([],HC(this.options.transformations),!1).reverse():this.options.transformations,i=t?function(t){return t.untransform}:function(t){return t.transform},o=[],a=[],s=function(t,e){return void 0===e&&(e=!0),a.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]],o=t(i);n.push.apply(n,VN([],qN(o),!1))}return n}}(t):t)};try{for(var c=qC(r),l=c.next();!l.done;l=c.next()){var u=HC(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,y=p.z,m=p.width,b=p.height,x=p.depth,w=d(YC([],HC(h),!1),g,v,y,m,b,x);if(YN(w))o.push(w);else{if(o.length)s(this.createMatrixTransform(o,t)),o.splice(0,o.length);s(i(w)||GN,!0)}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}o.length&&s(this.createMatrixTransform(o,t));return HN.apply(void 0,YC([],HC(a),!1))},t.prototype.createMatrixTransform=function(t,e){var n=pt();return e&&t.reverse(),t.forEach((function(t){return Ut(n,n,t)})),e&&wt(n,gt(n)),function(t){var e=[t[0],t[1],t[2],1];return me(e,e,n),[e[0],e[1],e[2]]}},t}();function UC(t){return(e,...n)=>Q({},t(e,...n),e)}function XC(t){return(e,...n)=>Q({},e,t(e,...n))}function ZC(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=Le(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}return t}const KC=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map((t=>{var{data:e,x:s,y:c,width:l,height:u}=t,f=Le(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},f),{data:ZC(e,a),x:null!=s?s:n,y:null!=c?c:r,width:null!=l?l:i,height:null!=u?u:o})}))};KC.props={};const QC=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map((()=>1)),padding:i=0,data:o}=t,[a,s,c,l]="col"===n?["y","height","width","x"]:["x","width","height","y"],u=r.reduce(((t,e)=>t+e)),f=t[s]-i*(e.length-1),h=r.map((t=>f*(t/u))),d=[];let p=t[a]||0;for(let n=0;n<h.length;n+=1){const r=e[n],{data:u}=r,f=Le(r,["data"]),g=ZC(u,o);d.push(Object.assign({[a]:p,[s]:h[n],[l]:t[l]||0,[c]:t[c],data:g},f)),p+=h[n]+i}return d};QC.props={};const JC=()=>t=>{const{children:e}=t,n=Le(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:o={},legend:a={},encode:s={},transform:c=[]}=n,l=Le(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=Le(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:ZC(e,r),scale:Q({},i,n),encode:Q({},s,f),transform:[...c,...h],axis:!(!l||!o)&&Q({},o,l),legend:!(!u||!a)&&Q({},a,u)},d)}));return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};JC.props={};const tL=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:o,paddingRight:a,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,margin:g,marginLeft:v,marginBottom:y,marginTop:m,marginRight:b,data:x,coordinate:w,theme:k,component:M,interaction:E,x:O,y:_,z:S,key:A,frame:T,labelTransform:P,parentKey:N,clip:C,viewStyle:L,title:j}=e,R=Le(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:O,y:_,z:S,key:A,width:n,height:r,depth:i,padding:l,paddingLeft:o,paddingRight:a,paddingTop:s,inset:u,insetLeft:f,insetTop:h,insetRight:d,insetBottom:p,paddingBottom:c,theme:k,coordinate:w,component:M,interaction:E,frame:T,labelTransform:P,margin:g,marginLeft:v,marginBottom:y,marginTop:m,marginRight:b,parentKey:N,clip:C,style:L},!t&&{title:j}),{marks:[Object.assign(Object.assign(Object.assign({},R),{key:`${A}-0`,data:x}),t&&{title:j})]})]};tL.props={};class eL{constructor(t){this.$value=t}static of(t){return new eL(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}const nL=UC((t=>{const{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:o,y:a}=e,s=(t,e)=>{var o;if(void 0===t||!i)return{};const a=Jn(n,(e=>e[t])),s=(null===(o=null==r?void 0:r[e])||void 0===o?void 0:o.domain)||Array.from(a.keys()),c=s.map((t=>a.has(t)?a.get(t).length:1));return{domain:s,flex:c}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===o?null:{position:"top"}},void 0===o&&{paddingInner:0}),s(o,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"right"}},void 0===a&&{paddingInner:0}),s(a,"y"))}}})),rL=XC((t=>{const{data:e,scale:n,legend:r}=t,i=[t];let o,a,s;for(;i.length;){const t=i.shift(),{children:e,encode:n={},scale:r={},legend:c={}}=t,{color:l}=n,{color:u}=r,{color:f}=c;void 0!==l&&(o=l),void 0!==u&&(a=u),void 0!==f&&(s=f),Array.isArray(e)&&i.push(...e)}const c="string"==typeof o?o:"",[l,u]=(()=>{var t;const r=null===(t=null==n?void 0:n.color)||void 0===t?void 0:t.domain;if(void 0!==r)return[r];if(void 0===o)return[void 0];const i="function"==typeof o?o:t=>t[o],a=e.map(i);return a.some((t=>"number"==typeof t))?[Vn(a)]:[Array.from(new Set(a)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=l?l:[]}},scale:{color:Q({},a,{domain:l,type:u})}},void 0===r&&{legend:{color:Q({title:c},s)}})})),iL=UC((()=>({animate:{enterType:"fadeIn"}}))),oL=XC((()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}}))),aL=XC((()=>({type:"cell"}))),sL=XC((t=>{const{data:e}=t,n={type:"custom",callback:()=>{const{data:e,encode:n}=t,{x:r,y:i}=n,o=r?Array.from(new Set(e.map((t=>t[r])))):[],a=i?Array.from(new Set(e.map((t=>t[i])))):[];return(()=>{if(o.length&&a.length){const t=[];for(const e of o)for(const n of a)t.push({[r]:e,[i]:n});return t}return o.length?o.map((t=>({[r]:t}))):a.length?a.map((t=>({[i]:t}))):void 0})()}};return{data:{type:"inline",value:e,transform:[n]}}})),cL=XC(((t,e=lL,n=fL,r=hL,i={})=>{const{data:o,encode:a,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:h}=t,{value:d}=o,{x:p,y:g}=a,{color:v}=c,{domain:y}=v;return{children:(t,o,a)=>{const{x:c,y:v}=o,{paddingLeft:m,paddingTop:b,marginLeft:x,marginTop:w}=a,{domain:k}=c.getOptions(),{domain:M}=v.getOptions(),E=aa(t),O=t.map(e),_=t.map((({x:t,y:e})=>[c.invert(t),v.invert(e)])),S=_.map((([t,e])=>n=>{const{[p]:r,[g]:i}=n;return(void 0===p||r===t)&&(void 0===g||i===e)})),A=S.map((t=>d.filter(t))),T=f?vr(A,(t=>t.length)):void 0,P=_.map((([t,e])=>({columnField:p,columnIndex:k.indexOf(t),columnValue:t,columnValuesLength:k.length,rowField:g,rowIndex:M.indexOf(e),rowValue:e,rowValuesLength:M.length}))),N=P.map((t=>Array.isArray(s)?s:[s(t)].flat(1)));return E.flatMap((t=>{const[e,o,a,s]=O[t],c=P[t],f=A[t];return N[t].map((v=>{var k,M,{scale:E,key:O,facet:_=!0,axis:S={},legend:A={}}=v,P=Le(v,["scale","key","facet","axis","legend"]);const N=(null===(k=null==E?void 0:E.y)||void 0===k?void 0:k.guide)||S.y,C=(null===(M=null==E?void 0:E.x)||void 0===M?void 0:M.guide)||S.x,L={x:{tickCount:p?5:void 0},y:{tickCount:g?5:void 0}},j=_?f:0===f.length?[]:d,R={color:{domain:y}},I={x:dL(C,n)(c,j),y:dL(N,r)(c,j)};return Object.assign(Object.assign({key:`${O}-${t}`,data:j,margin:0,x:e+m+l+x,y:o+b+u+w,parentKey:h,width:a,height:s,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!j.length,dataDomain:T,scale:Q(L,E,R),axis:Q({},S,I),legend:!1},P),i)}))}))}}}));function lL(t){const{points:e}=t;return Cs(e)}function uL(t,e){return e.length?Q({title:!1,tick:null,label:null},t):Q({title:!1,tick:null,label:null,grid:null},t)}function fL(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:o,columnValuesLength:a}=e;if(r!==i-1)return uL(t,n);const s=o===a-1&&void 0,c=n.length?void 0:null;return Q({title:s,grid:c},t)}}function hL(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(0!==i)return uL(t,n);const o=0===r&&void 0,a=n.length?void 0:null;return Q({title:o,grid:a},t)}}function dL(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}const pL=()=>t=>[eL.of(t).call(aL).call(rL).call(iL).call(nL).call(oL).call(sL).call(cL).value()];pL.props={};const gL=UC((t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),vL=XC((t=>{const{data:e,children:n,x:r=0,y:i=0,key:o}=t;return{children:(t,a,s)=>{const{x:c,y:l}=a,{paddingLeft:u,paddingTop:f,marginLeft:h,marginTop:d}=s,{domain:p}=c.getOptions(),{domain:g}=l.getOptions(),v=aa(t),y=t.map((({points:t})=>Cs(t))),m=t.map((({x:t,y:e})=>[c.invert(t),l.invert(e)])),b=m.map((([t,e])=>({columnField:t,columnIndex:p.indexOf(t),columnValue:t,columnValuesLength:p.length,rowField:e,rowIndex:g.indexOf(e),rowValue:e,rowValuesLength:g.length}))),x=b.map((t=>Array.isArray(n)?n:[n(t)].flat(1)));return v.flatMap((t=>{const[n,a,s,c]=y[t],[l,p]=m[t],g=b[t];return x[t].map((v=>{var y,m;const{scale:b,key:x,encode:w,axis:k,interaction:M}=v,E=Le(v,["scale","key","encode","axis","interaction"]),O=null===(y=null==b?void 0:b.y)||void 0===y?void 0:y.guide,_={x:mL(null===(m=null==b?void 0:b.x)||void 0===m?void 0:m.guide)(g,e),y:bL(O)(g,e)};return Object.assign({data:e,parentKey:o,key:`${x}-${t}`,x:n+u+r+h,y:a+f+i+d,width:s,height:c,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Q({x:{facet:!1},y:{facet:!1}},b),axis:Q({x:{tickCount:5},y:{tickCount:5}},k,_),legend:!1,encode:Q({},w,{x:l,y:p}),interaction:Q({},M,{legendFilter:!1})},E)}))}))}}})),yL=XC((t=>{const{encode:e}=t,n=Le(t,["encode"]),{position:r=[],x:i=r,y:o=[...r].reverse()}=e,a=Le(e,["position","x","y"]),s=[];for(const t of[i].flat(1))for(const e of[o].flat(1))s.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},a),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[i].flat(1).length&&{x:{paddingInner:0}}),1===[o].flat(1).length&&{y:{paddingInner:0}})})}));function mL(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return uL(t,n)}}function bL(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{columnIndex:r}=e;if(0!==r)return uL(t,n)}}const xL=()=>t=>[eL.of(t).call(aL).call(rL).call(vL).call(yL).call(iL).call(oL).call(gL).value()],wL=UC((t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),kL=UC((t=>({coordinate:{type:"polar"}}))),ML=t=>{const{encode:e}=t,n=Le(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function EL(t){return t=>null}function OL(t){const{points:e}=t,[n,r,i,o]=e,a=As(n,o),s=_s(n,o),c=Ns(s,_s(r,i)),l=1/Math.sin(c/2),u=a/(1+l),f=u*Math.sqrt(2),[h,d]=i,p=Ps(s)+c/2,g=u*l;return[h+g*Math.sin(p)-f/2,d-g*Math.cos(p)-f/2,f,f]}const _L=()=>t=>[eL.of(t).call(aL).call(ML).call(rL).call(kL).call(sL).call(cL,OL,EL,EL,{frame:!1}).call(iL).call(oL).call(wL).value()];function SL(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 AL=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:o="ease-in-out-sine"}=t,a=e.length;if(!Array.isArray(e)||0===a)return[];const{key:s}=e[0],c=e.map((t=>Object.assign(Object.assign({},t),{key:s}))).map((t=>function(t,e,n){const r=[t];for(;r.length;){const t=r.pop();t.animate=Q({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});const{children:i}=t;Array.isArray(i)&&r.push(...i)}return t}(t,n,o)));return function*(){let t,e=0;for(;"infinite"===r||e<r;){const[n,r]=SL(i,e,a);for(let e=n;e<r;e+=1){const n=Math.abs(e);t!==n&&(yield c[n]),t=n}e++}}};AL.props={};const TL=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:s,state:c}=t,l=Le(t,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},l),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:c}]})]};TL.props={};var PL=1e-6,NL=Math.PI,CL=NL/2,LL=NL/4,jL=2*NL,RL=180/NL,IL=NL/180,DL=Math.abs,BL=Math.atan,FL=Math.atan2,zL=Math.cos,$L=Math.ceil,WL=Math.exp,GL=Math.log,HL=Math.pow,YL=Math.sin,qL=Math.sign||function(t){return t>0?1:t<0?-1:0},VL=Math.sqrt,UL=Math.tan;function XL(t){return t>1?0:t<-1?NL:Math.acos(t)}function ZL(t){return t>1?CL:t<-1?-CL:Math.asin(t)}function KL(){}function QL(t,e){t&&tj.hasOwnProperty(t.type)&&tj[t.type](t,e)}var JL={Feature:function(t,e){QL(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)QL(n[r].geometry,e)}},tj={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){ej(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ej(n[r],e,0)},Polygon:function(t,e){nj(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)nj(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)QL(n[r],e)}};function ej(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function nj(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)ej(t[n],e,1);e.polygonEnd()}function rj(t,e){t&&JL.hasOwnProperty(t.type)?JL[t.type](t,e):QL(t,e)}function ij(t){return[FL(t[1],t[0]),ZL(t[2])]}function oj(t){var e=t[0],n=t[1],r=zL(n);return[r*zL(e),r*YL(e),YL(n)]}function aj(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function sj(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function cj(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function lj(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function uj(t){var e=VL(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function fj(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function hj(t,e){return DL(t)>NL&&(t-=Math.round(t/jL)*jL),[t,e]}function dj(t,e,n){return(t%=jL)?e||n?fj(gj(t),vj(e,n)):gj(t):e||n?vj(e,n):hj}function pj(t){return function(e,n){return DL(e+=t)>NL&&(e-=Math.round(e/jL)*jL),[e,n]}}function gj(t){var e=pj(t);return e.invert=pj(-t),e}function vj(t,e){var n=zL(t),r=YL(t),i=zL(e),o=YL(e);function a(t,e){var a=zL(e),s=zL(t)*a,c=YL(t)*a,l=YL(e),u=l*n+s*r;return[FL(c*i-u*o,s*n-l*r),ZL(u*i+c*o)]}return a.invert=function(t,e){var a=zL(e),s=zL(t)*a,c=YL(t)*a,l=YL(e),u=l*i-c*o;return[FL(c*i+l*o,s*n+u*r),ZL(u*n-s*r)]},a}function yj(t,e){(e=oj(e))[0]-=t,uj(e);var n=XL(-e[1]);return((-e[2]<0?-n:n)+jL-PL)%jL}function mj(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:KL,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function bj(t,e){return DL(t[0]-e[0])<PL&&DL(t[1]-e[1])<PL}function xj(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function wj(t,e,n,r,i){var o,a,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(bj(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new xj(r,t,null,!0)),c.push(n.o=new xj(r,null,n,!1)),s.push(n=new xj(a,t,null,!1)),c.push(n.o=new xj(a,null,n,!0))}})),s.length){for(c.sort(e),kj(s),kj(c),o=0,a=c.length;o<a;++o)c[o].e=n=!n;for(var l,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=l.length;o<a;++o)i.point((u=l[o])[0],u[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((u=l[o])[0],u[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function kj(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function Mj(t){return DL(t[0])<=NL?t[0]:qL(t[0])*((DL(t[0])+NL)%jL-NL)}function Ej(t,e,n,r){return function(i){var o,a,s,c=e(i),l=mj(),u=e(l),f=!1,h={point:d,lineStart:g,lineEnd:v,polygonStart:function(){h.point=y,h.lineStart=m,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=v,a=Sr(a);var t=function(t,e){var n=Mj(e),r=e[1],i=YL(r),o=[YL(n),-zL(n),0],a=0,s=0,c=new Un;1===i?r=CL+PL:-1===i&&(r=-CL-PL);for(var l=0,u=t.length;l<u;++l)if(h=(f=t[l]).length)for(var f,h,d=f[h-1],p=Mj(d),g=d[1]/2+LL,v=YL(g),y=zL(g),m=0;m<h;++m,p=x,v=k,y=M,d=b){var b=f[m],x=Mj(b),w=b[1]/2+LL,k=YL(w),M=zL(w),E=x-p,O=E>=0?1:-1,_=O*E,S=_>NL,A=v*k;if(c.add(FL(A*O*YL(_),y*M+A*zL(_))),a+=S?E+O*jL:E,S^p>=n^x>=n){var T=sj(oj(d),oj(b));uj(T);var P=sj(o,T);uj(P);var N=(S^E>=0?-1:1)*ZL(P[2]);(r>N||r===N&&(T[0]||T[1]))&&(s+=S^E>=0?1:-1)}}return(a<-PL||a<PL&&c<-1e-12)^1&s}(o,r);a.length?(f||(i.polygonStart(),f=!0),wj(a,_j,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){h.point=p,c.lineStart()}function v(){h.point=d,c.lineEnd()}function y(t,e){s.push([t,e]),u.point(t,e)}function m(){u.lineStart(),s=[]}function b(){y(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),h=l.result(),d=h.length;if(s.pop(),o.push(s),s=null,d)if(1&c){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(Oj))}return h}}function Oj(t){return t.length>1}function _j(t,e){return((t=t.x)[0]<0?t[1]-CL-PL:CL-t[1])-((e=e.x)[0]<0?e[1]-CL-PL:CL-e[1])}hj.invert=hj;var Sj=Ej((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?NL:-NL,c=DL(o-n);DL(c-NL)<PL?(t.point(n,r=(r+a)/2>0?CL:-CL),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&c>=NL&&(DL(n-i)<PL&&(n-=i*PL),DL(o-s)<PL&&(o-=s*PL),r=function(t,e,n,r){var i,o,a=YL(t-n);return DL(a)>PL?BL((YL(e)*(o=zL(r))*YL(n)-YL(r)*(i=zL(e))*YL(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*CL,r.point(-NL,i),r.point(0,i),r.point(NL,i),r.point(NL,0),r.point(NL,-i),r.point(0,-i),r.point(-NL,-i),r.point(-NL,0),r.point(-NL,i);else if(DL(t[0]-e[0])>PL){var o=t[0]<e[0]?NL:-NL;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-NL,-CL]);function Aj(t){var e=zL(t),n=2*IL,r=e>0,i=DL(e)>PL;function o(t,n){return zL(t)*zL(n)>e}function a(t,n,r){var i=[1,0,0],o=sj(oj(t),oj(n)),a=aj(o,o),s=o[0],c=a-s*s;if(!c)return!r&&t;var l=e*a/c,u=-e*s/c,f=sj(i,o),h=lj(i,l);cj(h,lj(o,u));var d=f,p=aj(h,d),g=aj(d,d),v=p*p-g*(aj(h,h)-1);if(!(v<0)){var y=VL(v),m=lj(d,(-p-y)/g);if(cj(m,h),m=ij(m),!r)return m;var b,x=t[0],w=n[0],k=t[1],M=n[1];w<x&&(b=x,x=w,w=b);var E=w-x,O=DL(E-NL)<PL;if(!O&&M<k&&(b=k,k=M,M=b),O||E<PL?O?k+M>0^m[1]<(DL(m[0]-x)<PL?k:M):k<=m[1]&&m[1]<=M:E>NL^(x<=m[0]&&m[0]<=w)){var _=lj(d,(-p+y)/g);return cj(_,h),[m,ij(_)]}}}function s(e,n){var i=r?t:NL-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Ej(o,(function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(f,h){var d,p=[f,h],g=o(f,h),v=r?g?0:s(f,h):g?s(f+(f<0?NL:-NL),h):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(d=a(e,p))||bj(e,d)||bj(p,d))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),d=a(p,e),t.point(d[0],d[1])):(d=a(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var y;v&n||!(y=a(p,e,!0))||(u=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&bj(e,p)||t.point(p[0],p[1]),e=p,c=g,n=v},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=zL(e),s=YL(e),c=r*n;null==i?(i=e+r*jL,o=e-c/2):(i=yj(a,i),o=yj(a,o),(r>0?i<o:i>o)&&(i+=r*jL));for(var l,u=i;r>0?u>o:u<o;u-=c)l=ij([a,-s*zL(u),-s*YL(u)]),t.point(l[0],l[1])}}(o,t,n,i,e,r)}),r?[0,-t]:[-NL,t-NL])}var Tj=1e9,Pj=-Tj;function Nj(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,l){var u=0,f=0;if(null==i||(u=a(i,s))!==(f=a(o,s))||c(i,o)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==f);else l.point(o[0],o[1])}function a(r,i){return DL(r[0]-t)<PL?i>0?0:3:DL(r[0]-n)<PL?i>0?2:1:DL(r[1]-e)<PL?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var c,l,u,f,h,d,p,g,v,y,m,b=a,x=mj(),w={point:k,lineStart:function(){w.point=M,l&&l.push(u=[]);y=!0,v=!1,p=g=NaN},lineEnd:function(){c&&(M(f,h),d&&v&&x.rejoin(),c.push(x.result()));w.point=k,v&&b.lineEnd()},polygonStart:function(){b=x,c=[],l=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var o,a,s=l[n],c=1,u=s.length,f=s[0],h=f[0],d=f[1];c<u;++c)o=h,a=d,h=(f=s[c])[0],d=f[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(t-o)&&++e:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--e;return e}(),n=m&&e,i=(c=Sr(c)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&wj(c,s,e,o,a),a.polygonEnd());b=a,c=l=u=null}};function k(t,e){i(t,e)&&b.point(t,e)}function M(o,a){var s=i(o,a);if(l&&u.push([o,a]),y)f=o,h=a,d=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&v)b.point(o,a);else{var c=[p=Math.max(Pj,Math.min(Tj,p)),g=Math.max(Pj,Math.min(Tj,g))],x=[o=Math.max(Pj,Math.min(Tj,o)),a=Math.max(Pj,Math.min(Tj,a))];!function(t,e,n,r,i,o){var a,s=t[0],c=t[1],l=0,u=1,f=e[0]-s,h=e[1]-c;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<u&&(u=a)}else if(f>0){if(a>u)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<u&&(u=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<u&&(u=a)}else if(h>0){if(a>u)return;a>l&&(l=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<u&&(u=a)}return l>0&&(t[0]=s+l*f,t[1]=c+l*h),u<1&&(e[0]=s+u*f,e[1]=c+u*h),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(o,a),m=!1):(v||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=o,g=a,v=s}return w}}function Cj(t,e,n){var r=Ar(t,e-PL,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Lj(t,e,n){var r=Ar(t,e-PL,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function jj(){return function(){var t,e,n,r,i,o,a,s,c,l,u,f,h=10,d=h,p=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return Ar($L(r/p)*p,n,p).map(u).concat(Ar($L(s/g)*g,a,g).map(f)).concat(Ar($L(e/h)*h,t,h).filter((function(t){return DL(t%p)>PL})).map(c)).concat(Ar($L(o/d)*d,i,d).filter((function(t){return DL(t%g)>PL})).map(l))}return y.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(f(a).slice(1),u(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(v)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),y.precision(v)):[[e,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],y):[p,g]},y.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],y):[h,d]},y.precision=function(h){return arguments.length?(v=+h,c=Cj(o,i,90),l=Lj(e,t,v),u=Cj(s,a,90),f=Lj(r,n,v),y):v},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}var Rj,Ij,Dj,Bj,Fj=t=>t,zj=new Un,$j=new Un,Wj={point:KL,lineStart:KL,lineEnd:KL,polygonStart:function(){Wj.lineStart=Gj,Wj.lineEnd=qj},polygonEnd:function(){Wj.lineStart=Wj.lineEnd=Wj.point=KL,zj.add(DL($j)),$j=new Un},result:function(){var t=zj/2;return zj=new Un,t}};function Gj(){Wj.point=Hj}function Hj(t,e){Wj.point=Yj,Rj=Dj=t,Ij=Bj=e}function Yj(t,e){$j.add(Bj*t-Dj*e),Dj=t,Bj=e}function qj(){Yj(Rj,Ij)}var Vj=Wj,Uj=1/0,Xj=Uj,Zj=-Uj,Kj=Zj,Qj={point:function(t,e){t<Uj&&(Uj=t);t>Zj&&(Zj=t);e<Xj&&(Xj=e);e>Kj&&(Kj=e)},lineStart:KL,lineEnd:KL,polygonStart:KL,polygonEnd:KL,result:function(){var t=[[Uj,Xj],[Zj,Kj]];return Zj=Kj=-(Xj=Uj=1/0),t}};var Jj,tR,eR,nR,rR=Qj,iR=0,oR=0,aR=0,sR=0,cR=0,lR=0,uR=0,fR=0,hR=0,dR={point:pR,lineStart:gR,lineEnd:mR,polygonStart:function(){dR.lineStart=bR,dR.lineEnd=xR},polygonEnd:function(){dR.point=pR,dR.lineStart=gR,dR.lineEnd=mR},result:function(){var t=hR?[uR/hR,fR/hR]:lR?[sR/lR,cR/lR]:aR?[iR/aR,oR/aR]:[NaN,NaN];return iR=oR=aR=sR=cR=lR=uR=fR=hR=0,t}};function pR(t,e){iR+=t,oR+=e,++aR}function gR(){dR.point=vR}function vR(t,e){dR.point=yR,pR(eR=t,nR=e)}function yR(t,e){var n=t-eR,r=e-nR,i=VL(n*n+r*r);sR+=i*(eR+t)/2,cR+=i*(nR+e)/2,lR+=i,pR(eR=t,nR=e)}function mR(){dR.point=pR}function bR(){dR.point=wR}function xR(){kR(Jj,tR)}function wR(t,e){dR.point=kR,pR(Jj=eR=t,tR=nR=e)}function kR(t,e){var n=t-eR,r=e-nR,i=VL(n*n+r*r);sR+=i*(eR+t)/2,cR+=i*(nR+e)/2,lR+=i,uR+=(i=nR*t-eR*e)*(eR+t),fR+=i*(nR+e),hR+=3*i,pR(eR=t,nR=e)}var MR=dR;function ER(t){this._context=t}ER.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,jL)}},result:KL};var OR,_R,SR,AR,TR,PR=new Un,NR={point:KL,lineStart:function(){NR.point=CR},lineEnd:function(){OR&&LR(_R,SR),NR.point=KL},polygonStart:function(){OR=!0},polygonEnd:function(){OR=null},result:function(){var t=+PR;return PR=new Un,t}};function CR(t,e){NR.point=LR,_R=AR=t,SR=TR=e}function LR(t,e){AR-=t,TR-=e,PR.add(VL(AR*AR+TR*TR)),AR=t,TR=e}var jR=NR;let RR,IR,DR,BR;class FR{constructor(t){this._append=null==t?zR:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return zR;if(e!==RR){const t=10**e;RR=e,IR=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return IR}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==DR||this._append!==IR){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,DR=t,IR=this._append,BR=this._,this._=e}this._+=BR}}result(){const t=this._;return this._="",t.length?t:null}}function zR(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function $R(t,e){let n,r,i=3,o=4.5;function a(t){return t&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),rj(t,n(r))),r.result()}return a.area=function(t){return rj(t,n(Vj)),Vj.result()},a.measure=function(t){return rj(t,n(jR)),jR.result()},a.bounds=function(t){return rj(t,n(rR)),rR.result()},a.centroid=function(t){return rj(t,n(MR)),MR.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Fj):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new FR(i)):new ER(e=t),"function"!=typeof o&&r.pointRadius(o),a):e},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(r.pointRadius(+t),+t),a):o},a.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new FR(i)),a},a.projection(t).digits(i).context(e)}function WR(t){return function(e){var n=new GR;for(var r in t)n[r]=t[r];return n.stream=e,n}}function GR(){}function HR(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),rj(n,t.stream(rR)),e(rR.result()),null!=r&&t.clipExtent(r),t}function YR(t,e,n){return HR(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}function qR(t,e,n){return YR(t,[[0,0],e],n)}function VR(t,e,n){return HR(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function UR(t,e,n){return HR(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}GR.prototype={constructor:GR,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var XR=zL(30*IL);function ZR(t,e){return+e?function(t,e){function n(r,i,o,a,s,c,l,u,f,h,d,p,g,v){var y=l-r,m=u-i,b=y*y+m*m;if(b>4*e&&g--){var x=a+h,w=s+d,k=c+p,M=VL(x*x+w*w+k*k),E=ZL(k/=M),O=DL(DL(k)-1)<PL||DL(o-f)<PL?(o+f)/2:FL(w,x),_=t(O,E),S=_[0],A=_[1],T=S-r,P=A-i,N=m*T-y*P;(N*N/b>e||DL((y*T+m*P)/b-.5)>.3||a*h+s*d+c*p<XR)&&(n(r,i,o,a,s,c,S,A,O,x/=M,w/=M,k,g,v),v.point(S,A),n(S,A,O,x,w,k,l,u,f,h,d,p,g,v))}}return function(e){var r,i,o,a,s,c,l,u,f,h,d,p,g={point:v,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){u=NaN,g.point=m,e.lineStart()}function m(r,i){var o=oj([r,i]),a=t(r,i);n(u,f,l,h,d,p,u=a[0],f=a[1],l=r,h=o[0],d=o[1],p=o[2],16,e),e.point(u,f)}function b(){g.point=v,e.lineEnd()}function x(){y(),g.point=w,g.lineEnd=k}function w(t,e){m(r=t,e),i=u,o=f,a=h,s=d,c=p,g.point=m}function k(){n(u,f,l,h,d,p,i,o,r,a,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return WR({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var KR=WR({point:function(t,e){this.stream.point(t*IL,e*IL)}});function QR(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=zL(o),s=YL(o),c=a*t,l=s*t,u=a/t,f=s/t,h=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(t,o){return[c*(t*=r)-l*(o*=i)+e,n-l*t-c*o]}return p.invert=function(t,e){return[r*(u*t-f*e+h),i*(d-f*t-u*e)]},p}function JR(t){return tI((function(){return t}))()}function tI(t){var e,n,r,i,o,a,s,c,l,u,f=150,h=480,d=250,p=0,g=0,v=0,y=0,m=0,b=0,x=1,w=1,k=null,M=Sj,E=null,O=Fj,_=.5;function S(t){return c(t[0]*IL,t[1]*IL)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*RL,t[1]*RL]}function T(){var t=QR(f,0,0,x,w,b).apply(null,e(p,g)),r=QR(f,h-t[0],d-t[1],x,w,b);return n=dj(v,y,m),s=fj(e,r),c=fj(n,s),a=ZR(s,_),P()}function P(){return l=u=null,S}return S.stream=function(t){return l&&u===t?l:l=KR(function(t){return WR({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(M(a(O(u=t)))))},S.preclip=function(t){return arguments.length?(M=t,k=void 0,P()):M},S.postclip=function(t){return arguments.length?(O=t,E=r=i=o=null,P()):O},S.clipAngle=function(t){return arguments.length?(M=+t?Aj(k=t*IL):(k=null,Sj),P()):k*RL},S.clipExtent=function(t){return arguments.length?(O=null==t?(E=r=i=o=null,Fj):Nj(E=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),P()):null==E?null:[[E,r],[i,o]]},S.scale=function(t){return arguments.length?(f=+t,T()):f},S.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],T()):[h,d]},S.center=function(t){return arguments.length?(p=t[0]%360*IL,g=t[1]%360*IL,T()):[p*RL,g*RL]},S.rotate=function(t){return arguments.length?(v=t[0]%360*IL,y=t[1]%360*IL,m=t.length>2?t[2]%360*IL:0,T()):[v*RL,y*RL,m*RL]},S.angle=function(t){return arguments.length?(b=t%360*IL,T()):b*RL},S.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},S.precision=function(t){return arguments.length?(a=ZR(s,_=t*t),P()):VL(_)},S.fitExtent=function(t,e){return YR(S,t,e)},S.fitSize=function(t,e){return qR(S,t,e)},S.fitWidth=function(t,e){return VR(S,t,e)},S.fitHeight=function(t,e){return UR(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,T()}}function eI(t){var e=0,n=NL/3,r=tI(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*IL,n=t[1]*IL):[e*RL,n*RL]},i}function nI(t,e){var n=YL(t),r=(n+YL(e))/2;if(DL(r)<PL)return function(t){var e=zL(t);function n(t,n){return[t*e,YL(n)/e]}return n.invert=function(t,n){return[t/e,ZL(n*e)]},n}(t);var i=1+n*(2*r-n),o=VL(i)/r;function a(t,e){var n=VL(i-2*r*YL(e))/r;return[n*YL(t*=r),o-n*zL(t)]}return a.invert=function(t,e){var n=o-e,a=FL(t,DL(n))*qL(n);return n*r<0&&(a-=NL*qL(t)*qL(n)),[a/r,ZL((i-(t*t+n*n)*r*r)/(2*r))]},a}function rI(){return eI(nI).scale(155.424).center([0,33.6442])}function iI(){return rI().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function oI(t){return function(e,n){var r=zL(e),i=zL(n),o=t(r*i);return o===1/0?[2,0]:[o*i*YL(e),o*YL(n)]}}function aI(t){return function(e,n){var r=VL(e*e+n*n),i=t(r),o=YL(i),a=zL(i);return[FL(e*o,r*a),ZL(r&&n*o/r)]}}var sI=oI((function(t){return VL(2/(1+t))}));sI.invert=aI((function(t){return 2*ZL(t/2)}));var cI=oI((function(t){return(t=XL(t))&&t/YL(t)}));function lI(t,e){return[t,GL(UL((CL+e)/2))]}function uI(t){var e,n,r,i=JR(t),o=i.center,a=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var o=NL*a(),s=i(function(t){function e(e){return(e=t(e[0]*IL,e[1]*IL))[0]*=RL,e[1]*=RL,e}return t=dj(t[0]*IL,t[1]*IL,t.length>2?t[2]*IL:0),e.invert=function(e){return(e=t.invert(e[0]*IL,e[1]*IL))[0]*=RL,e[1]*=RL,e},e}(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===lI?[[Math.max(s[0]-o,l),e],[Math.min(s[0]+o,n),r]]:[[l,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),u()):a()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(o(t),u()):o()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function fI(t){return UL((CL+t)/2)}function hI(t,e){var n=zL(t),r=t===e?YL(t):GL(n/zL(e))/GL(fI(e)/fI(t)),i=n*HL(fI(t),r)/r;if(!r)return lI;function o(t,e){i>0?e<-CL+PL&&(e=-CL+PL):e>CL-PL&&(e=CL-PL);var n=i/HL(fI(e),r);return[n*YL(r*t),i-n*zL(r*t)]}return o.invert=function(t,e){var n=i-e,o=qL(r)*VL(t*t+n*n),a=FL(t,DL(n))*qL(n);return n*r<0&&(a-=NL*qL(t)*qL(n)),[a/r,2*BL(HL(i/o,1/r))-CL]},o}function dI(t,e){return[t,e]}function pI(t,e){var n=zL(t),r=t===e?YL(t):(n-zL(e))/(e-t),i=n/r+t;if(DL(r)<PL)return dI;function o(t,e){var n=i-e,o=r*t;return[n*YL(o),i-n*zL(o)]}return o.invert=function(t,e){var n=i-e,o=FL(t,DL(n))*qL(n);return n*r<0&&(o-=NL*qL(t)*qL(n)),[o/r,i-qL(r)*VL(t*t+n*n)]},o}cI.invert=aI((function(t){return t})),lI.invert=function(t,e){return[t,2*BL(WL(e))-CL]},dI.invert=dI;var gI=1.340264,vI=-.081106,yI=893e-6,mI=.003796,bI=VL(3)/2;function xI(t,e){var n=ZL(bI*YL(e)),r=n*n,i=r*r*r;return[t*zL(n)/(bI*(gI+3*vI*r+i*(7*yI+9*mI*r))),n*(gI+vI*r+i*(yI+mI*r))]}function wI(t,e){var n=zL(e),r=zL(t)*n;return[n*YL(t)/r,YL(e)/r]}function kI(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function MI(t,e){return[zL(e)*YL(t),YL(e)]}function EI(t,e){var n=zL(e),r=1+zL(t)*n;return[n*YL(t)/r,YL(e)/r]}function OI(t,e){return[GL(UL((CL+e)/2)),-t]}xI.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(gI+vI*i+o*(yI+mI*i))-e)/(gI+3*vI*i+o*(7*yI+9*mI*i)))*r)*i*i,!(DL(n)<1e-12));++a);return[bI*t*(gI+3*vI*i+o*(7*yI+9*mI*i))/zL(r),ZL(YL(r)/bI)]},wI.invert=aI(BL),kI.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(DL(n)>PL&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},MI.invert=aI(ZL),EI.invert=aI((function(t){return 2*BL(t)})),OI.invert=function(t,e){return[-e,2*BL(WL(t))-CL]};var _I=Object.freeze({__proto__:null,geoAlbersUsa:function(){var t,e,n,r,i,o,a=iI(),s=rI().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rI().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){o=[t,e]}};function u(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},u.stream=function(n){return t&&e===n?t:t=function(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}([a.stream(e=n),s.stream(n),c.stream(n)])},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),c.precision(t),f()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),c.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,u-.238*e],[o+.455*e,u+.238*e]]).stream(l),r=s.translate([o-.307*e,u+.201*e]).clipExtent([[o-.425*e+PL,u+.12*e+PL],[o-.214*e-PL,u+.234*e-PL]]).stream(l),i=c.translate([o-.205*e,u+.212*e]).clipExtent([[o-.214*e+PL,u+.166*e+PL],[o-.115*e-PL,u+.234*e-PL]]).stream(l),f()},u.fitExtent=function(t,e){return YR(u,t,e)},u.fitSize=function(t,e){return qR(u,t,e)},u.fitWidth=function(t,e){return VR(u,t,e)},u.fitHeight=function(t,e){return UR(u,t,e)},u.scale(1070)},geoAlbers:iI,geoAzimuthalEqualArea:function(){return JR(sI).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:sI,geoAzimuthalEquidistant:function(){return JR(cI).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:cI,geoConicConformal:function(){return eI(hI).scale(109.5).parallels([30,30])},geoConicConformalRaw:hI,geoConicEqualArea:rI,geoConicEqualAreaRaw:nI,geoConicEquidistant:function(){return eI(pI).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:pI,geoEqualEarth:function(){return JR(xI).scale(177.158)},geoEqualEarthRaw:xI,geoEquirectangular:function(){return JR(dI).scale(152.63)},geoEquirectangularRaw:dI,geoGnomonic:function(){return JR(wI).scale(144.049).clipAngle(60)},geoGnomonicRaw:wI,geoIdentity:function(){var t,e,n,r,i,o,a,s=1,c=0,l=0,u=1,f=1,h=0,d=null,p=1,g=1,v=WR({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),y=Fj;function m(){return p=s*u,g=s*f,o=a=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(h){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+c,i+l]}return b.invert=function(n){var r=n[0]-c,i=n[1]-l;if(h){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/p,i/g]},b.stream=function(t){return o&&a===t?o:o=v(y(a=t))},b.postclip=function(t){return arguments.length?(y=t,d=n=r=i=null,m()):y},b.clipExtent=function(t){return arguments.length?(y=null==t?(d=n=r=i=null,Fj):Nj(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),m()):null==d?null:[[d,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,m()):s},b.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],m()):[c,l]},b.angle=function(n){return arguments.length?(e=YL(h=n%360*IL),t=zL(h),m()):h*RL},b.reflectX=function(t){return arguments.length?(u=t?-1:1,m()):u<0},b.reflectY=function(t){return arguments.length?(f=t?-1:1,m()):f<0},b.fitExtent=function(t,e){return YR(b,t,e)},b.fitSize=function(t,e){return qR(b,t,e)},b.fitWidth=function(t,e){return VR(b,t,e)},b.fitHeight=function(t,e){return UR(b,t,e)},b},geoProjection:JR,geoProjectionMutator:tI,geoMercator:function(){return uI(lI).scale(961/jL)},geoMercatorRaw:lI,geoNaturalEarth1:function(){return JR(kI).scale(175.295)},geoNaturalEarth1Raw:kI,geoOrthographic:function(){return JR(MI).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:MI,geoStereographic:function(){return JR(EI).scale(250).clipAngle(142)},geoStereographicRaw:EI,geoTransverseMercator:function(){var t=uI(OI),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:OI});function SI(t,e,n,r){const i=()=>{const t=e.filter(TI),n=t.find((t=>t.sphere));return n?{type:"Sphere"}:(r=t.filter((t=>!t.sphere)).flatMap((t=>t.data.value)),{type:"FeatureCollection",features:r.flatMap((t=>function(t){const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!t||!t.type)return null;const n=e[t.type];return n?"geometry"===n?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===n?{type:"FeatureCollection",features:[t]}:"featureCollection"===n?t:void 0:null}(t).features))});var r},{outline:o=i()}=r,{size:a="fitExtent"}=r;return"fitExtent"===a?function(t,e,n){const{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(t,o,n):"fitWidth"===a?function(t,e,n){const{width:r,height:i}=n,[[o,a],[s,c]]=$R(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-a),u=Math.min(Math.ceil(s-o),l),f=t.scale()*(u-1)/u,[h,d]=t.translate(),p=d+(i-l)/2;t.scale(f).translate([h,p]).precision(.2)}(t,o,n):void 0}function AI(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[jj()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function TI(t){return"geoPath"===t.type}const PI=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=Le(n,["type"]),o=function(t){if("function"==typeof t)return t;const e=`geo${G(t)}`,n=_I[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}(r),a=e.map(AI);let s;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const c=o();SI(c,a,{x:t,y:e,width:n,height:r},i),function(t,e){var n;for(const[r,i]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,i)}(c,i),s=$R(c);const l=new po({domain:[t,t+n]}),u=new po({domain:[e,e+r]});return{transform:t=>(t=>{const e=c(t);if(!e)return[null,null];const[n,r]=e;return[l.map(n),u.map(r)]})(t),untransform:t=>(t=>{if(!t)return null;const[e,n]=t,r=[l.invert(e),u.invert(n)];return c.invert(r)})(t)}}]]}},children:a.flatMap((t=>TI(t)?function(t){const{style:e,tooltip:n={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:CE(n,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},e),{d:t=>s(t)||[]})})}(t):t))})]};function NI(t,e,n,r=t=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);const{target:o}=i;if(!o)return;const{className:a}=o;if("plot"===a)return;const s=I$(o,(t=>"element"===t.className));const c=function(t){return I$(t,(t=>"component"===t.className))}(o),l=function(t){return I$(t,(t=>"label"===t.className))}(o),u=s||c||l;if(!u)return;const{className:f,markType:h}=u,d=Object.assign(Object.assign({},i),{nativeEvent:!0});"element"===f?(d.data={data:Go(u,e)},n.emit(`element:${t}`,d),n.emit(`${h}:${t}`,d)):"label"===f?(d.data={data:u.attributes.datum},n.emit(`label:${t}`,d),n.emit(`${a}:${t}`,d)):(n.emit(`component:${t}`,d),n.emit(`${a}:${t}`,d))}}function CI(){return(t,e,n)=>{const{container:r,view:i}=t,o=NI(fN.CLICK,i,n,(t=>1===t.detail)),a=NI(fN.DBLCLICK,i,n,(t=>2===t.detail)),s=NI(fN.POINTER_TAP,i,n),c=NI(fN.POINTER_DOWN,i,n),l=NI(fN.POINTER_UP,i,n),u=NI(fN.POINTER_OVER,i,n),f=NI(fN.POINTER_OUT,i,n),h=NI(fN.POINTER_MOVE,i,n),d=NI(fN.POINTER_ENTER,i,n),p=NI(fN.POINTER_LEAVE,i,n),g=NI(fN.POINTER_UPOUTSIDE,i,n),v=NI(fN.DRAG_START,i,n),y=NI(fN.DRAG,i,n),m=NI(fN.DRAG_END,i,n),b=NI(fN.DRAG_ENTER,i,n),x=NI(fN.DRAG_LEAVE,i,n),w=NI(fN.DRAG_OVER,i,n),k=NI(fN.DROP,i,n);return r.addEventListener("click",o),r.addEventListener("click",a),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",v),r.addEventListener("drag",y),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",k),()=>{r.removeEventListener("click",o),r.removeEventListener("click",a),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",v),r.removeEventListener("drag",y),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",k)}}}function LI(t,e){const n=Object.assign(Object.assign({},{"component.axisRadar":BA,"component.axisLinear":LA,"component.axisArc":jA,"component.legendContinuousBlock":UA,"component.legendContinuousBlockSize":ZA,"component.legendContinuousSize":XA,"interaction.event":CI,"composition.mark":tL,"composition.view":JC,"shape.label.label":lM}),e),r=e=>{if("string"!=typeof e)return e;const r=`${t}.${e}`;return n[r]||Uo(`Unknown Component: ${r}`)};return[(t,e)=>{const{type:n}=t,i=Le(t,["type"]);n||Uo("Plot type is required!");const o=r(n);return null==o?void 0:o(i,e)},r]}function jI(t){const{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||Uo("Cannot find library document")}function RI(t,e){const{coordinate:n={},coordinates:r}=t,i=Le(t,["coordinate","coordinates"]);if(r)return t;const{type:o,transform:a=[]}=n,s=Le(n,["type","transform"]);if(!o)return Object.assign(Object.assign({},i),{coordinates:a});const[,c]=LI("coordinate",e),{transform:l=!1}=c(o).props||{};if(l)throw new Error(`Unknown coordinate: ${o}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:o},s),...a]})}function II(t,e){return t.filter((t=>t.type===e))}function DI(t){return II(t,"polar").length>0}function BI(t){return II(t,"transpose").length%2==1}function FI(t){return II(t,"theta").length>0}function zI(t){return II(t,"radial").length>0}function $I(t){return II(t,"radar").length>0}function WI(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}PI.props={},CI.props={reapplyWhenUpdate:!0};var GI=WI("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),HI=WI("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),YI=WI("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),qI=WI("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),VI=WI("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),UI=WI("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),XI=WI("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ZI=WI("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),KI=WI("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),QI=WI("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),JI=WI("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function tD(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function eD(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function nD(){}var rD=.7,iD=1/rD,oD="\\s*([+-]?\\d+)\\s*",aD="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sD="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cD=/^#([0-9a-f]{3,8})$/,lD=new RegExp(`^rgb\\(${oD},${oD},${oD}\\)$`),uD=new RegExp(`^rgb\\(${sD},${sD},${sD}\\)$`),fD=new RegExp(`^rgba\\(${oD},${oD},${oD},${aD}\\)$`),hD=new RegExp(`^rgba\\(${sD},${sD},${sD},${aD}\\)$`),dD=new RegExp(`^hsl\\(${aD},${sD},${sD}\\)$`),pD=new RegExp(`^hsla\\(${aD},${sD},${sD},${aD}\\)$`),gD={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function vD(){return this.rgb().formatHex()}function yD(){return this.rgb().formatRgb()}function mD(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=cD.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?bD(e):3===n?new MD(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?xD(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?xD(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lD.exec(t))?new MD(e[1],e[2],e[3],1):(e=uD.exec(t))?new MD(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=fD.exec(t))?xD(e[1],e[2],e[3],e[4]):(e=hD.exec(t))?xD(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=dD.exec(t))?TD(e[1],e[2]/100,e[3]/100,1):(e=pD.exec(t))?TD(e[1],e[2]/100,e[3]/100,e[4]):gD.hasOwnProperty(t)?bD(gD[t]):"transparent"===t?new MD(NaN,NaN,NaN,0):null}function bD(t){return new MD(t>>16&255,t>>8&255,255&t,1)}function xD(t,e,n,r){return r<=0&&(t=e=n=NaN),new MD(t,e,n,r)}function wD(t){return t instanceof nD||(t=mD(t)),t?new MD((t=t.rgb()).r,t.g,t.b,t.opacity):new MD}function kD(t,e,n,r){return 1===arguments.length?wD(t):new MD(t,e,n,null==r?1:r)}function MD(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ED(){return`#${AD(this.r)}${AD(this.g)}${AD(this.b)}`}function OD(){const t=_D(this.opacity);return`${1===t?"rgb(":"rgba("}${SD(this.r)}, ${SD(this.g)}, ${SD(this.b)}${1===t?")":`, ${t})`}`}function _D(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function SD(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function AD(t){return((t=SD(t))<16?"0":"")+t.toString(16)}function TD(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ND(t,e,n,r)}function PD(t){if(t instanceof ND)return new ND(t.h,t.s,t.l,t.opacity);if(t instanceof nD||(t=mD(t)),!t)return new ND;if(t instanceof ND)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new ND(a,s,c,t.opacity)}function ND(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function CD(t){return(t=(t||0)%360)<0?t+360:t}function LD(t){return Math.max(0,Math.min(1,t||0))}function jD(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}tD(nD,mD,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:vD,formatHex:vD,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return PD(this).formatHsl()},formatRgb:yD,toString:yD}),tD(MD,kD,eD(nD,{brighter(t){return t=null==t?iD:Math.pow(iD,t),new MD(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?rD:Math.pow(rD,t),new MD(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new MD(SD(this.r),SD(this.g),SD(this.b),_D(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ED,formatHex:ED,formatHex8:function(){return`#${AD(this.r)}${AD(this.g)}${AD(this.b)}${AD(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:OD,toString:OD})),tD(ND,(function(t,e,n,r){return 1===arguments.length?PD(t):new ND(t,e,n,null==r?1:r)}),eD(nD,{brighter(t){return t=null==t?iD:Math.pow(iD,t),new ND(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rD:Math.pow(rD,t),new ND(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new MD(jD(t>=240?t-240:t+120,i,r),jD(t,i,r),jD(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ND(CD(this.h),LD(this.s),LD(this.l),_D(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_D(this.opacity);return`${1===t?"hsl(":"hsla("}${CD(this.h)}, ${100*LD(this.s)}%, ${100*LD(this.l)}%${1===t?")":`, ${t})`}`}}));const RD=Math.PI/180,ID=180/Math.PI;var DD=-.14861,BD=1.78277,FD=-.29227,zD=-.90649,$D=1.97294,WD=$D*zD,GD=$D*BD,HD=BD*FD-zD*DD;function YD(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof qD)return new qD(t.h,t.s,t.l,t.opacity);t instanceof MD||(t=wD(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(HD*r+WD*e-GD*n)/(HD+WD-GD),o=r-i,a=($D*(n-i)-FD*o)/zD,s=Math.sqrt(a*a+o*o)/($D*i*(1-i)),c=s?Math.atan2(a,o)*ID-120:NaN;return new qD(c<0?c+360:c,s,i,t.opacity)}(t):new qD(t,e,n,null==r?1:r)}function qD(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}tD(qD,YD,eD(nD,{brighter(t){return t=null==t?iD:Math.pow(iD,t),new qD(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rD:Math.pow(rD,t),new qD(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*RD,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new MD(255*(e+n*(DD*r+BD*i)),255*(e+n*(FD*r+zD*i)),255*(e+n*($D*r)),this.opacity)}}));var VD=t=>()=>t;function UD(t,e){return function(n){return t+n*e}}function XD(t){return 1===(t=+t)?ZD: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):VD(isNaN(e)?n:e)}}function ZD(t,e){var n=e-t;return n?UD(t,n):VD(isNaN(t)?e:t)}!function t(e){var n=XD(e);function r(t,e){var r=n((t=kD(t)).r,(e=kD(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ZD(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);var KD,QD=(KD=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return function(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}((n-r/e)*e,a,i,o,s)}},function(t){var e,n,r=t.length,i=new Array(r),o=new Array(r),a=new Array(r);for(e=0;e<r;++e)n=kD(t[e]),i[e]=n.r||0,o[e]=n.g||0,a[e]=n.b||0;return i=KD(i),o=KD(o),a=KD(a),n.opacity=1,function(t){return n.r=i(t),n.g=o(t),n.b=a(t),n+""}});function JD(t){return function e(n){function r(e,r){var i=t((e=YD(e)).h,(r=YD(r)).h),o=ZD(e.s,r.s),a=ZD(e.l,r.l),s=ZD(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}JD((function(t,e){var n=e-t;return n?UD(t,n>180||n<-180?n-360*Math.round(n/360):n):VD(isNaN(t)?e:t)}));var tB=JD(ZD),eB=t=>QD(t[t.length-1]),nB=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(WI),rB=eB(nB),iB=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(WI),oB=eB(iB),aB=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(WI),sB=eB(aB),cB=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(WI),lB=eB(cB),uB=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(WI),fB=eB(uB),hB=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(WI),dB=eB(hB),pB=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(WI),gB=eB(pB),vB=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(WI),yB=eB(vB),mB=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(WI),bB=eB(mB),xB=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(WI),wB=eB(xB),kB=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(WI),MB=eB(kB),EB=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(WI),OB=eB(EB),_B=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(WI),SB=eB(_B),AB=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(WI),TB=eB(AB),PB=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(WI),NB=eB(PB),CB=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(WI),LB=eB(CB),jB=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(WI),RB=eB(jB),IB=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(WI),DB=eB(IB),BB=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(WI),FB=eB(BB),zB=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(WI),$B=eB(zB),WB=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(WI),GB=eB(WB),HB=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(WI),YB=eB(HB),qB=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(WI),VB=eB(qB),UB=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(WI),XB=eB(UB),ZB=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(WI),KB=eB(ZB),QB=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(WI),JB=eB(QB),tF=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(WI),eF=eB(tF);var nF=tB(YD(300,.5,0),YD(-240,.5,1)),rF=tB(YD(-100,.75,.35),YD(80,1.5,.8)),iF=tB(YD(260,.75,.35),YD(80,1.5,.8)),oF=YD();var aF=kD(),sF=Math.PI/3,cF=2*Math.PI/3;function lF(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var uF=lF(WI("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),fF=lF(WI("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),hF=lF(WI("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),dF=lF(WI("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),pF=Object.freeze({__proto__:null,schemeCategory10:GI,schemeAccent:HI,schemeDark2:YI,schemeObservable10:qI,schemePaired:VI,schemePastel1:UI,schemePastel2:XI,schemeSet1:ZI,schemeSet2:KI,schemeSet3:QI,schemeTableau10:JI,interpolateBrBG:rB,schemeBrBG:nB,interpolatePRGn:oB,schemePRGn:iB,interpolatePiYG:sB,schemePiYG:aB,interpolatePuOr:lB,schemePuOr:cB,interpolateRdBu:fB,schemeRdBu:uB,interpolateRdGy:dB,schemeRdGy:hB,interpolateRdYlBu:gB,schemeRdYlBu:pB,interpolateRdYlGn:yB,schemeRdYlGn:vB,interpolateSpectral:bB,schemeSpectral:mB,interpolateBuGn:wB,schemeBuGn:xB,interpolateBuPu:MB,schemeBuPu:kB,interpolateGnBu:OB,schemeGnBu:EB,interpolateOrRd:SB,schemeOrRd:_B,interpolatePuBuGn:TB,schemePuBuGn:AB,interpolatePuBu:NB,schemePuBu:PB,interpolatePuRd:LB,schemePuRd:CB,interpolateRdPu:RB,schemeRdPu:jB,interpolateYlGnBu:DB,schemeYlGnBu:IB,interpolateYlGn:FB,schemeYlGn:BB,interpolateYlOrBr:$B,schemeYlOrBr:zB,interpolateYlOrRd:GB,schemeYlOrRd:WB,interpolateBlues:YB,schemeBlues:HB,interpolateGreens:VB,schemeGreens:qB,interpolateGreys:XB,schemeGreys:UB,interpolatePurples:KB,schemePurples:ZB,interpolateReds:JB,schemeReds:QB,interpolateOranges:eF,schemeOranges:tF,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:nF,interpolateRainbow:function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return oF.h=360*t-100,oF.s=1.5-1.5*e,oF.l=.8-.9*e,oF+""},interpolateWarm:rF,interpolateCool:iF,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,aF.r=255*(e=Math.sin(t))*e,aF.g=255*(e=Math.sin(t+sF))*e,aF.b=255*(e=Math.sin(t+cF))*e,aF+""},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:uF,interpolateMagma:fF,interpolateInferno:hF,interpolatePlasma:dF});function gF(t,e,n,r,i,o){const{guide:a={}}=n,s=function(t,e,n){const{type:r,domain:i,range:o,quantitative:a,ordinal:s}=n;if(void 0!==r)return r;if(function(t){return NF(t,na)}(e))return"identity";if("string"==typeof o)return"linear";if((i||o||[]).length>2)return _F(t,s);if(void 0!==i)return TF([i])?_F(t,s):PF(e)?"time":SF(t,o,a);return TF(e)?_F(t,s):PF(e)?"time":SF(t,o,a)}(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 AF(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)Zo(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 AF(function(t){let e=1/0,n=-1/0;for(const r of t)for(const t of r)Zo(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(kF({type:t}))return function(t,e,n){const r=t.map(Number),i=new po({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 MF({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=Ii,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?FI(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:o=i,paddingOuter:a=i}=r;return Object.assign(Object.assign({},r),{paddingInner:o,paddingOuter:a,padding:i,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=G(e),i=pF[`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:EF(s,t,e,n,l,i,o),expectedDomain:c,guide:a,name:t,type:s})}function vF(t,e){const n={};for(const r of t){const{values:t,name:i}=r,o=e[i];for(const e of t){const{name:t,value:r}=e;n[t]=r.map((t=>o.map(t)))}}return n}function yF(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:e}=r.getOptions();if(e in t){const i=n.filter((t=>t.startsWith(e))).map((t=>+(t.replace(e,"")||0))),o=vr(i)+1,a=`${e}${o}`;t[a]=r,r.getOptions().key=a}else t[e]=r}return t}function mF(t,e){const[n]=LI("scale",e),{relations:r}=t,[i]=function(t){if(!t||!Array.isArray(t))return[Yo,Yo];let e,n;return[r=>{var i;e=r.map.bind(r),n=null===(i=r.invert)||void 0===i?void 0:i.bind(r);const o=t.filter((([t])=>"function"==typeof t)),a=t.filter((([t])=>"function"!=typeof t)),s=new Map(a);if(r.map=t=>{for(const[e,n]of o)if(e(t))return n;return s.has(t)?s.get(t):e(t)},!n)return r;const c=new Map(a.map((([t,e])=>[e,t]))),l=new Map(o.map((([t,e])=>[e,t])));return r.invert=t=>l.has(t)?t:c.has(t)?c.get(t):n(t),r},t=>(null!==e&&(t.map=e),null!==n&&(t.invert=n),t)]}(r);return i(n(t))}function bF(t){const e=t.flatMap((t=>Array.from(t.values()))).flatMap((t=>t.channels.map((t=>t.scale))));wF(e,"x"),wF(e,"y")}function xF(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 wF(t,e){const n=t.filter((({name:t,facet:n=!0})=>n&&t===e)),r=n.flatMap((t=>t.domain)),i=n.every(kF)?Vn(r):n.every(MF)?Array.from(new Set(r)):null;if(null!==i)for(const t of n)t.domain=i}function kF(t){const{type:e}=t;if("string"!=typeof e)return!1;return["linear","log","pow","time"].includes(e)}function MF(t){const{type:e}=t;if("string"!=typeof e)return!1;return["band","point","ordinal"].includes(e)}function EF(t,e,n,r,i,o,a){const{range:s}=r;if("string"==typeof s)return function(t){return t.split("-")}(s);if(void 0!==s)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const t=OF(n,r,i,o,a),[s,u]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[sa(e),ca(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 OF(n,r,i,o,a);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function OF(t,e,n,r,i){const[o]=LI("palette",i),{category10:a,category20:s}=r,c=function(t){return Array.from(new Set(t))}(n).length<=a.length?a:s,{palette:l=c,offset:u}=e;if(Array.isArray(l))return l;try{return o({type:l})}catch(t){const e=function(t,e,n=t=>t){if(!t)return null;const r=G(t),i=pF[`scheme${r}`],o=pF[`interpolate${r}`];if(!i&&!o)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)=>o(n(r/e.length))))}(l,n,u);if(e)return e;throw new Error(`Unknown Component: ${l} `)}}function _F(t,e){return e||(function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal")}function SF(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function AF(t,e){if(0===t.length)return t;const{domainMin:n,domainMax:r}=e,[i,o]=t;return[null!=n?n:i,null!=r?r:o]}function TF(t){return NF(t,(t=>{const e=typeof t;return"string"===e||"boolean"===e}))}function PF(t){return NF(t,(t=>t instanceof Date))}function NF(t,e){for(const n of t)if(n.some(e))return!0;return!1}const CF={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},LF={threshold:"threshold",quantize:"quantize",quantile:"quantile"},jF={ordinal:"ordinal",band:"band",point:"point"},RF={constant:"constant"};function IF(t,e,n){const{coordinates:r=[],title:i}=e,[,o]=LI("component",n),a=t.filter((({guide:t})=>null!==t)),s=[],c=function(t,e,n){const[,r]=LI("component",n),{coordinates:i}=t;function o(t,e,n,o){const a=function(t,e,n=[]){return"x"===t?BI(n)?`${e}Y`:`${e}X`:"y"===t?BI(n)?`${e}X`:`${e}Y`:null}(e,t,i);if(!o||!a)return;const{props:s}=r(a),{defaultPosition:c,defaultSize:l,defaultOrder:u,defaultCrossPadding:[f]}=s;return Object.assign(Object.assign({position:c,defaultSize:l,order:u,type:a,crossPadding:f},o),{scales:[n]})}return e.filter((t=>t.slider||t.scrollbar)).flatMap((t=>{const{slider:e,scrollbar:n,name:r}=t;return[o("slider",r,t,e),o("scrollbar",r,t,n)]})).filter((t=>!!t))}(e,t,n);if(s.push(...c),i){const{props:t}=o("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:a,defaultCrossPadding:c}=t,l="string"==typeof i?{title:i}:i;s.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:c[0],defaultSize:a},l))}const l=function(t,e){const n=t.filter((t=>function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;const{type:e,domain:n,range:r,interpolator:i}=t,o=n&&n.length>0,a=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&o&&a)||!(!["sequential"].includes(e)||!o||!a&&!i)||!(!["constant","identity"].includes(e)||!a)}(t)));return[...FF(n),...$F(n,e)]}(a,r);return l.forEach((([t,e])=>{const{props:n}=o(t),{defaultPosition:i,defaultPlane:c="xy",defaultOrientation:l,defaultSize:u,defaultOrder:f,defaultLength:h,defaultPadding:d=[0,0],defaultCrossPadding:p=[0,0]}=n,g=Q({},...e),{guide:v,field:y}=g,m=Array.isArray(v)?v:[v];for(const n of m){const[o,g]=HF(t,i,l,n,e,a,r);if(!o&&!g)continue;const v="left"===o||"right"===o,m=v?d[1]:d[0],b=v?p[1]:p[0],{size:x,order:w=f,length:k=h,padding:M=m,crossPadding:E=b}=n;s.push(Object.assign(Object.assign({title:y},n),{defaultSize:u,length:k,position:o,plane:c,orientation:g,padding:M,order:w,crossPadding:E,size:x,type:t,scales:e}))}})),s}function DF(t,e,n,r,i){const[o]=LI("component",r),{scaleInstances:a,scale:s,bbox:c}=t,l={bbox:c,library:r};return o(Le(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:i,scales:a,theme:n,value:l,scale:s})}function BF(t,e){const n=["left","right","bottom","top"],r=tr(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=Tr(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=vr(t,(t=>t.size)),r=vr(t,(t=>t.order)),i=vr(t,(t=>t.crossPadding));return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}}))}function FF(t,e){const n=["shape","size","color","opacity"],r=t.filter((({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!((t,e)=>"constant"===t&&"size"===e)(t,e))),i=r.filter((({type:t})=>"constant"===t)),o=tr(r.filter((({type:t})=>"constant"!==t)),(t=>t.field?t.field:Symbol("independent"))).map((([t,e])=>[t,[...e,...i]])).filter((([,t])=>t.some((t=>"constant"!==t.type)))),a=new Map(o);if(0===a.size)return[];const s=t=>t.sort((([t],[e])=>t.localeCompare(e))),c=Array.from(a).map((([,t])=>{const e=function(t){if(1===t.length)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...ua(t,n));return e}(t).sort(((t,e)=>e.length-t.length)),n=e.map((t=>({combination:t,option:t.map((t=>[t.name,zF(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 RN)for(const{option:r,combination:i}of n)if(e.some((t=>et(s(t),s(r)))))return[t,i];return null})).filter(Zo);return c}function zF(t){const{type:e}=t;return"string"!=typeof e?null:e in CF?"continuous":e in jF?"discrete":e in LF?"distribution":e in RF?"constant":null}function $F(t,e){return t.map((t=>{const{name:n}=t;if(function(t){return II(t,"helix").length>0}(e)||FI(e))return null;if(BI(e)&&(DI(e)||zI(e)))return null;if(n.startsWith("x"))return DI(e)?["axisArc",[t]]:zI(e)?["axisLinear",[t]]:[BI(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return DI(e)?["axisLinear",[t]]:zI(e)?["axisArc",[t]]:[BI(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if($I(e))return["axisRadar",[t]];if(!DI(e))return["axisY",[t]]}return null})).filter(Zo)}function WF(t){const e=II(t,"polar");if(e.length){const t=e[e.length-1],{startAngle:r,endAngle:i}=n(t);return[r,i]}const r=II(t,"radial");if(r.length){const t=r[r.length-1],{startAngle:e,endAngle:n}=s(t);return[e,n]}return[-Math.PI/2,Math.PI/2*3]}function GF(t,e,n,r,i){const{name:o}=n[0];if("axisRadar"===t){const t=r.filter((t=>t.name.startsWith("position"))),e=function(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}(o);if(null===e)return[null,null];const[n,a]=WF(i);return["center",(a-n)/($I(i)?t.length:t.length-1)*e+n]}if("axisY"===t&&function(t){return II(t,"parallel").length>0}(i))return BI(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){const[t]=WF(i);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:DI(i)||zI(i)?["center",null]:"axisX"===t&&function(t){return II(t,"reflect").length>0}(i)||"axisX"===t&&function(t){return II(t,"reflectY").length>0}(i)?["top",null]:e}function HF(t,e,n,r,i,o,a){const[s]=WF(a),c=[r.position||e,null!=s?s:n];return"string"==typeof t&&t.startsWith("axis")?GF(t,c,i,o,a):"string"==typeof t&&t.startsWith("legend")&&DI(a)&&"center"===r.position?["center","vertical"]:c}function YF(t,e,n,r,i,o){const{type:a}=t;if(!["left","right","bottom","top"].includes(r))return;if("string"!=typeof a)return;const s=a;return(s.startsWith("axis")?ZF:s.startsWith("group")?qF:s.startsWith("legendContinuous")?KF:"legendCategory"===s?QF:s.startsWith("slider")?XF:"title"===s?UF:s.startsWith("scrollbar")?VF:()=>{})(t,e,n,r,i,o)}function qF(t,e,n,r,i,o){const{children:a}=t,s=vr(a,(t=>t.crossPadding));a.forEach((t=>t.crossPadding=s)),a.forEach((t=>YF(t,e,n,r,i,o)));const c=vr(a,(t=>t.size));t.size=c,a.forEach((t=>t.size=c))}function VF(t,e,n,r,i,o){const{trackSize:a=6}=Q({},i.scrollbar,t);t.size=a}function UF(t,e,n,r,i,o){const a=Q({},i.title,t),{title:s,subtitle:c,spacing:l=0}=a,u=Le(a,["title","subtitle","spacing"]);if(s){const e=iz(s,Qo(u,"title"));t.size=e.height}if(c){const e=iz(c,Qo(u,"subtitle"));t.size+=l+e.height}}function XF(t,e,n,r,i,o){const{trackSize:a,handleIconSize:s}=(()=>{const{slider:e}=i;return Q({},e,t)})(),c=Math.max(a,2.4*s);t.size=c}function ZF(t,e,n,r,i,o){var a;t.transform=t.transform||[{type:"hide"}];const s="left"===r||"right"===r,c=nz(t,r,i),{tickLength:l=0,labelSpacing:u=0,titleSpacing:f=0,labelAutoRotate:h}=c,d=Le(c,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),p=JF(t,o),g=tz(d,p),v=l+u;if(g&&g.length){const r=vr(g,(t=>t.width)),i=vr(g,(t=>t.height));if(s)t.size=r+v;else{const{tickFilter:o,labelTransform:s}=t;!function(t,e,n,r,i){const o=Tr(e,(t=>t.width));if(o>n)return!0;const a=t.clone();a.update({range:[0,n]});const s=rz(t,i),c=s.map((t=>a.map(t)+function(t,e){if(!t.getBandWidth)return 0;const n=t.getBandWidth(e)/2;return n}(a,t))),l=s.map(((t,e)=>e)),u=-r[0],f=n+r[1],h=(t,e)=>{const{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<l.length;t++){const n=c[t],[r,i]=h(n,e[t]);if(r<u||i>f)return!0;const o=c[t+1];if(o){const[n]=h(o,e[t+1]);if(i>n)return!0}}return!1}(p,g,e,n,o)||s||!1===h||null===h?(t.labelTransform=null!==(a=t.labelTransform)&&void 0!==a?a:"rotate(0)",t.size=i+v):(t.labelTransform="rotate(90)",t.size=r+v)}}else t.size=l;const y=ez(d);y&&(t.size+=s?f+y.width:f+y.height)}function KF(t,e,n,r,i,o){const a=(()=>{const{legendContinuous:e}=i;return Q({},e,t)})(),{labelSpacing:s=0,titleSpacing:c=0}=a,l=Le(a,["labelSpacing","titleSpacing"]),u="left"===r||"right"===r,f=Qo(l,"ribbon"),{size:h}=f,d=Qo(l,"handleIcon"),{size:p}=d,g=Math.max(h,2.4*p);t.size=g;const v=tz(l,JF(t,o));if(v){const e=u?"width":"height",n=vr(v,(t=>t[e]));t.size+=n+s}const y=ez(l);y&&(u?t.size=Math.max(t.size,y.width):t.size+=c+y.height)}function QF(t,e,n,r,i,o){const a=(()=>{const{legendCategory:e}=i,{title:n}=t,[r,o]=Array.isArray(n)?[n,void 0]:[void 0,n];return Q({title:r},e,Object.assign(Object.assign({},t),{title:o}))})(),{itemSpacing:s,itemMarkerSize:c,titleSpacing:l,rowPadding:u,colPadding:f,maxCols:h=1/0,maxRows:d=1/0}=a,p=Le(a,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:v}=t,y=t=>Math.min(t,d),m=t=>Math.min(t,h),b="left"===r||"right"===r,x=void 0===v?e+(b?0:n[0]+n[1]):v,w=ez(p),k=tz(p,JF(t,o),"itemLabel"),M=Math.max(k[0].height,c)+u,E=(t,e=0)=>c+t+s[0]+e;b?(()=>{let e=-1/0,n=0,r=1,i=0,o=-1/0,a=-1/0;const s=w?w.height:0,c=x-s;for(const{width:t}of k){const s=E(t,f);e=Math.max(e,s),n+M>c?(r++,o=Math.max(o,i),a=Math.max(a,n),i=1,n=M):(n+=M,i++)}r<=1&&(o=i,a=n),t.size=e*m(r),t.length=a+s,Q(t,{cols:m(r),gridRow:o})})():"number"==typeof g?(()=>{const e=Math.ceil(k.length/g),n=vr(k,(t=>E(t.width)))*g;t.size=M*y(e)-u,t.length=Math.min(n,x)})():(()=>{let e=1,n=0,r=-1/0;for(const{width:t}of k){const i=E(t,f);n+i>x?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=M*y(e)-u,t.length=r})(),w&&(b?t.size=Math.max(t.size,w.width):t.size+=l+w.height)}function JF(t,e){const[n]=LI("scale",e),{scales:r,tickCount:i,tickMethod:o}=t,a=r.find((t=>"constant"!==t.type&&"identity"!==t.type));return void 0!==i&&(a.tickCount=i),void 0!==o&&(a.tickMethod=o),n(a)}function tz(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:o=!0}=t,a=Le(t,["labelFormatter","tickFilter","label"]);if(!o)return null;const s=function(t,e,n){const r=rz(t,n),i=r.map((t=>"number"==typeof t?dy(t):t)),o=e?"string"==typeof e?dA(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return i.map(o)}(e,r,i),c=Qo(a,n),l=s.map(((t,e)=>Object.fromEntries(Object.entries(c).map((([n,r])=>[n,"function"==typeof r?r(t,e):r]))))),u=s.map(((t,e)=>iz(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 ez(t){const{title:e}=t,n=Le(t,["title"]);if((t=>!1===t||null===t)(e)||void 0===e)return null;const r=Qo(n,"title"),{direction:i,transform:o}=r,a=Array.isArray(e)?e.join(","):e;if("string"!=typeof a)return null;return iz(a,Object.assign(Object.assign({},r),{transform:o||("vertical"===i?"rotate(-90)":"")}))}function nz(t,e,n){const{title:r}=t,[i,o]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:a,[`axis${Vo(e)}`]:s}=n;return Q({title:i},a,s,Object.assign(Object.assign({},t),{title:o}))}function rz(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function iz(t,e){const n=function(t){return t instanceof Ng?t:new Zg({style:{text:`${t}`}})}(t),r=Le(e,["filter"]);n.attr(Object.assign(Object.assign({},r),{visibility:"none"}));return n.getBBox()}function oz(t,e,n,r){var i,o;const{width:a,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:y=(null!==(o=n.margin)&&void 0!==o?o:0),marginLeft:m=y,marginBottom:b=y,marginTop:x=y,marginRight:w=y,padding:k=n.padding,paddingBottom:M=k,paddingLeft:E=k,paddingRight:O=k,paddingTop:_=k}=function(t,e,n,r){const{coordinates:i}=e;if(!DI(i)&&!zI(i))return e;const o=t.filter((t=>"string"==typeof t.type&&t.type.startsWith("axis")));if(0===o.length)return e;const a=o.map((t=>nz(t,"axisArc"===t.type?"arc":"linear",n))),s=vr(a,(t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0})),c=o.flatMap(((t,e)=>tz(a[e],JF(t,r)))).filter(Zo),l=vr(c,(t=>t.height))+s,u=o.flatMap(((t,e)=>ez(a[e]))).filter((t=>null!==t)),f=0===u.length?0:vr(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),S=(t,n,r,i,o)=>{const{marks:a}=e;if(0===a.length)return[i,o];if(t-i-o-.25*t>0)return[i,o];const s=.75*t;return["auto"===n?s*i/(i+o):i,"auto"===r?s*o/(i+o):o]},A=t=>"auto"===t?20:null!=t?t:20,T=A(_),P=A(M),N=az(t,s-T-P,[T+x,P+b],["left","right"],e,n,r),{paddingLeft:C,paddingRight:L}=N,j=a-m-w,[R,I]=S(j,E,O,C,L),D=j-R-I,B=az(t,D,[R+m,I+w],["bottom","top"],e,n,r),{paddingTop:F,paddingBottom:z}=B,$=s-b-x,[W,G]=S($,M,_,z,F);return{width:a,height:s,depth:c,insetLeft:d,insetTop:p,insetBottom:g,insetRight:v,innerWidth:D,innerHeight:$-W-G,paddingLeft:R,paddingRight:I,paddingTop:G,paddingBottom:W,marginLeft:m,marginBottom:b,marginTop:x,marginRight:w,x:l,y:u,z:f}}function az(t,e,n,r,i,o,a){const s=Jn(t,(t=>t.position)),{padding:c=o.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:h=c}=i,d={paddingBottom:f,paddingLeft:l,paddingTop:h,paddingRight:u};for(const t of r){const r=`padding${Vo(pm(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=vr(t.children,(t=>t.size))):t.size=t.defaultSize},f=r=>{r.size||("auto"!==c?u(r):(YF(r,e,n,t,o,a),l(r)))},h=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},p="bottom"===t||"top"===t,g=mr(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=BF(i,p?e+n[0]+n[1]:e);t.forEach(f);const o=t.reduce(((t,{size:e,crossPadding:n=12})=>t+e+n),0);d[r]=o}}return d}function sz({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o,marginLeft:a,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:h,insetLeft:d,insetRight:p,insetTop:g}){const v=n+a,y=i+s,m=r+l,b=o+c,x=t-a-l,w=[v+d,y+g,f-d-p,u-g-h,"center",null,null];return{top:[v,0,f,y,"vertical",!0,Rn,a,x],right:[t-m,y,m,u,"horizontal",!1,Rn],bottom:[v,e-b,f,b,"vertical",!1,Rn,a,x],left:[0,y,v,u,"horizontal",!0,Rn],"top-left":[v,0,f,y,"vertical",!0,Rn],"top-right":[v,0,f,y,"vertical",!0,Rn],"bottom-left":[v,e-b,f,b,"vertical",!1,Rn],"bottom-right":[v,e-b,f,b,"vertical",!1,Rn],center:w,inner:w,outer:w}}function cz(t,e,n,r){const[i,o]=la(t,(t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))));!function(t,e,n,r){"center"===r?function(t){return el(t)&&Qc(t)}(e)?function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a},e.radar={index:t.indexOf(e),count:t.length}}(t,0,n):Qc(e)?function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,0,n):el(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){const[r,i,o]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter(((t,e)=>e%2==1)).map((t=>t+i));for(let e=0;e<t.length;e++){const n=t[e],i=c[e],a=c[e+1]-i;n.bbox={x:r,y:i,width:o,height:a}}}(t,e,n):"vertical"===r&&function(t,e,n){const[r,i,,o]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter(((t,e)=>e%2==0)).map((t=>t+r));for(let e=0;e<t.length;e++){const n=t[e],r=c[e],a=c[e+1]-r;n.bbox={x:r,y:i,width:a,height:o}}}(t,e,n)}(t,e,n,t[0].orientation):"inner"===r?function(t,e,n){const[r,i,,o]=n,[a,s]=e.getCenter(),[c]=il(e),l=o/2,u=c*l,f=a-u,h=s-u;for(let e=0;e<t.length;e++){t[e].bbox={x:r+f,y:i+h,width:2*u,height:2*u}}}(t,e,n):"outer"===r&&function(t,e,n){const[r,i,o,a]=n;for(const e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,0,n)}(i,e,n,r),function(t,e,n){if(0===t.length)return;const[r,i,o,a]=n,[s]=il(e),c=a/2*s/Math.sqrt(2),l=r+o/2,u=i+a/2;for(let e=0;e<t.length;e++){t[e].bbox={x:l-c,y:u-c,width:2*c,height:2*c}}}(o,e,n)}function lz(t,e,n){const[r,i,o,a,s,c,l,u,f]=n,[h,d,p,g,v,y,m,b]="vertical"===s?["y",i,"x",r,"height",a,"width",o]:["x",r,"y",i,"width",o,"height",a];t.sort(((t,e)=>null==l?void 0:l(t.order,e.order)));const x=t=>"title"===t||"group"===t||t.startsWith("legend"),w=(t,e,n)=>void 0===n?e:x(t)?n:e,k=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=c?d+y:d;e<t.length;e++){const r=t[e],{crossPadding:i=0,type:o}=r,{size:a}=r;r.bbox={[h]:c?n-a-i:n+i,[p]:k(o,g,u),[v]:a,[m]:w(o,b,f)},n+=(a+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[m],i=r/n.length,o=n.reduce(((t,e)=>{var n;const r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t}),"flex-start"),a=n.map(((t,e)=>{const{length:r=i,padding:o=0}=t;return r+(e===n.length-1?0:o)})),s=r-Tr(a),c="flex-start"===o?0:"center"===o?s/2:s;for(let t=0,r=e[p]+c;t<n.length;t++){const i=n[t],{padding:s=0}=i,c=t===n.length-1?0:s;i.bbox={[v]:e[v],[h]:e[h],[p]:r,[m]:a[t]-c},Q(i,{layout:{justifyContent:o}}),r+=a[t]}}}const uz=Symbol("CALLBACK_ITEM");function fz(t,e,n){const{encode:r={},scale:i={},transform:o=[]}=e,a=Le(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},a),{encode:r,scale:i,transform:o})]}function hz(t,e,n){return Re(this,void 0,void 0,(function*(){const{library:t}=n,{data:r}=e,[i]=LI("data",t),o=function(t){if(I(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=Le(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}(r),{transform:a=[]}=o,s=[Le(o,["transform"]),...a].map((t=>i(t,n))),c=yield function(t){return t.reduce(((t,e)=>n=>Re(this,void 0,void 0,(function*(){const r=yield t(n);return e(r)}))),Yo)}(s)(r),l=!r||Array.isArray(r)||Array.isArray(c)?c:{value:c};return[Array.isArray(c)?aa(c):[],Object.assign(Object.assign({},e),{data:l})]}))}function dz(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 pz(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const o=oa(r,(t=>{if(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;const{type:e}=t;return Zo(e)}(t))return t;const e=function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some((t=>void 0!==t[e]))}(t,e)?"field":"constant"}(i,t);return{type:e,value:t}}));return[t,Object.assign(Object.assign({},e),{encode:o})]}function gz(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=oa(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 vz(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:o}=n,a=function(t){const[e]=LI("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:Mz(n)})}(o),s=oa(r,(t=>a(i,t)));return[t,Object.assign(Object.assign({},e),{encode:s})]}function yz(t,e,n){const{tooltip:r={}}=e;return ra(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:na(r)&&LE(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function mz(t,e,n){const{data:r,encode:i,tooltip:o={}}=e;if(ra(o))return[t,e];const a=e=>{if(!e)return e;if("string"==typeof e)return t.map((t=>({name:e,value:r[t][e]})));if(na(e)){const{field:n,channel:o,color:a,name:s=n,valueFormatter:c=t=>t}=e,l="string"==typeof c?dA(c):c,u=o&&i[o],f=u&&i[o].field,h=s||f||o,d=[];for(const e of t){const t=n?r[e][n]:u?i[o].value[e]:null;d[e]={name:h,color:a,value:l(t)}}return d}if("function"==typeof e){const n=[];for(const o of t){const t=e(r[o],o,r,i);na(t)?n[o]=Object.assign(Object.assign({},t),{[uz]:!0}):n[o]={value:t}}return n}return e},{title:s,items:c=[]}=o,l=Le(o,["title","items"]),u=Object.assign({title:a(s),items:Array.isArray(c)?c.map(a):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function bz(t,e,n){const{encode:r}=e,i=Le(e,["encode"]);if(!r)return[t,e];const o=Object.entries(r),a=o.filter((([,t])=>{const{value:e}=t;return Array.isArray(e[0])})).flatMap((([e,n])=>{const r=[[e,new Array(t.length).fill(void 0)]],{value:i}=n,o=Le(n,["value"]);for(let n=0;n<i.length;n++){const o=i[n];if(Array.isArray(o))for(let i=0;i<o.length;i++){const a=r[i]||[`${e}${i}`,new Array(t).fill(void 0)];a[1][n]=o[i],r[i]=a}}return r.map((([t,e])=>[t,Object.assign({type:"column",value:e},o)]))})),s=Object.fromEntries([...o,...a]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function xz(t,e,n){const{axis:r={},legend:i={},slider:o={},scrollbar:a={}}=e,s=(t,e)=>{if("boolean"==typeof t)return t?{}:null;const n=t[e];return void 0===n||n?n:null},c="object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return Q(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map((t=>{const e=s(a,t);return[t,Object.assign({guide:s(r,t),slider:s(o,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]})))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function wz(t,e,n){const{animate:r}=e;return r||void 0===r||Q(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function kz(t,e,n){return Re(this,void 0,void 0,(function*(){const[r,i]=yield function(t,e,n){return Re(this,void 0,void 0,(function*(){const{library:r}=n,[i]=LI("transform",r),{preInference:o=[],postInference:a=[]}=e,{transform:s=[]}=t,c=[fz,hz,dz,pz,gz,vz,bz,wz,xz,yz,...o.map(i),...s.map(i),...a.map(i),mz];let l=[],u=t;for(const t of c)[l,u]=yield t(l,u,n);return[l,u]}))}(t,e,n),{encode:o,scale:a,data:s,tooltip:c}=i;if(!1===Array.isArray(s))return null;const{channels:l}=e,u=nr(Object.entries(o).filter((([,t])=>Zo(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:o,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=a[t]||{},{independent:h=!1,key:d=r||t,type:p=(u?"constant":l?"identity":n)}=f,g=Le(f,["independent","key","type"]),v="constant"===p,y=v?void 0:i;return{name:t,values:e,scaleKey:h||v?Symbol("independent"):d,scale:Object.assign(Object.assign({type:p,range:y},g),{quantitative:o,ordinal:s})}}))}));return[i,Object.assign(Object.assign({},e),{index:r,channels:f,tooltip:c})]}))}function Mz(t){const{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}function Ez(t,e,n){var r;return Re(this,void 0,void 0,(function*(){const{library:i}=n,[o]=LI("composition",i),[a]=LI("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(Zo)),c=new Set(Object.keys(i).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Zo)),l=t=>{const{type:e}=t;if("function"==typeof e){const{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||c.has(e)?"mark":e},u=t=>"mark"===l(t),f=t=>"standardView"===l(t),h=t=>{const{type:e}=t;return"string"==typeof e&&!!c.has(e)},d=t=>{if(f(t))return[t];const e=l(t);return o({type:e,static:h(t)})(t)},p=[],g=new Map,v=new Map,y=[t],m=[];for(;y.length;){const t=y.shift();if(f(t)){const e=v.get(t),[r,o]=e?Pz(e,t,i):yield Sz(t,n);g.set(r,t),p.push(r);const a=o.flatMap(d).map((t=>RI(t,i)));if(y.push(...a),a.every(f)){const t=yield Promise.all(a.map((t=>Az(t,n))));bF(t);for(let e=0;e<a.length;e++){const n=a[e],r=t[e];v.set(n,r)}}}else{const e=d(u(t)?t:yield Yz(t,n));Array.isArray(e)?y.push(...e):"function"==typeof e&&m.push(e())}}n.emitter.emit(fN.BEFORE_PAINT);const b=new Map,w=new Map,k=[];e.selectAll(Xz(WT)).data(p,(t=>t.key)).join((t=>t.append("g").attr("className",WT).attr("id",(t=>t.key)).call(Oz).each((function(t,e,r){Nz(t,uy(r),k,n),b.set(t,r)}))),(t=>t.call(Oz).each((function(t,e,r){Nz(t,uy(r),k,n),w.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,o])=>{const a=r||new Map,s=g.get(i),c=function(t,e,n){const{library:r}=n,i=function(t){const[,e]=LI("interaction",t);return t=>{const[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(r),o=t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate,a=Hz(e),s=a.map(i).filter(o).map((t=>t[0]));return(e,r,i)=>Re(this,void 0,void 0,(function*(){const o=[],[a,c]=yield Sz(e,n);Nz(a,t,o,n);for(const i of s.filter((t=>t!==r)))_z(i,t,e,a,n);for(const e of c)Ez(e,t,n);return i(),{options:e,view:a}}))}(uy(o),s,n);return{view:i,container:o,options:s,setState:(t,e=t=>t)=>a.set(t,e),update:(n,r)=>Re(this,void 0,void 0,(function*(){const i=qo(Array.from(a.values()))(s);return yield c(i,n,(()=>{x(r)&&e(t,r,a)}))}))}})),E=(t=w,e,r)=>{var i;const o=M(t,E,r);for(const t of o){const{options:r,container:s}=t,c=s.nameInteraction;let l=Hz(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=Tz(t.view,r,s,a)(t,o,n.emitter);c.set(r,{destroy:e})}}}},O=M(b,E);for(const t of O){const{options:e}=t,r=new Map;t.container.nameInteraction=r;for(const i of Hz(e)){const[e,o]=i;if(o){const i=Tz(t.view,e,o,a)(t,O,n.emitter);r.set(e,{destroy:i})}}}E();const{width:_,height:S}=t,A=[];for(const t of m){const r=new Promise((r=>Re(this,void 0,void 0,(function*(){for(const r of t){const t=Object.assign({width:_,height:S},r);yield Ez(t,e,n)}r()}))));A.push(r)}n.views=p,null===(r=n.animations)||void 0===r||r.forEach((t=>null==t?void 0:t.cancel())),n.animations=k,n.emitter.emit(fN.AFTER_PAINT);const T=k.filter(Zo).map(zz).map((t=>t.finished));return Promise.all([...T,...A])}))}function Oz(t){t.style("transform",(t=>`translate(${t.layout.x}, ${t.layout.y})`))}function _z(t,e,n,r,i){var o;const{library:a}=i,[s]=LI("interaction",a),c=e.node().nameInteraction,l=Hz(n).find((([e])=>e===t)),u=c.get(t);if(!u)return;if(null===(o=u.destroy)||void 0===o||o.call(u),!l[1])return;const f=Tz(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 Sz(t,e){return Re(this,void 0,void 0,(function*(){const{library:n}=e,r=yield function(t,e){return Re(this,void 0,void 0,(function*(){const{library:n}=e,[r,i]=LI("mark",n),o=new Set(Object.keys(n).map((t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]})).filter(Zo)),{marks:a}=t,s=[],c=[],l=[...a],{width:u,height:f}=function(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:o=r,paddingTop:a=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:h=c,inset:d=0,insetLeft:p=d,insetRight:g=d,insetTop:v=d,insetBottom:y=d}=t,m=t=>"auto"===t?20:t;return{width:n-m(i)-m(o)-l-u-p-g,height:e-m(a)-m(s)-f-h-v-y}}(t),h={options:t,width:u,height:f};for(;l.length;){const[t]=l.splice(0,1),n=yield Yz(t,e),{type:a=Uo("G2Mark type is required."),key:u}=n;if(o.has(a))c.push(n);else{const{props:t={}}=i(a),{composite:e=!0}=t;if(e){const{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),i=yield r(e,h),o=Array.isArray(i)?i:[i];l.unshift(...o.map(((t,e)=>Object.assign(Object.assign({},t),{key:`${u}-${e}`}))))}else s.push(n)}}return Object.assign(Object.assign({},t),{marks:s,components:c})}))}(t,e),i=function(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,o=Le(t,["coordinate","interaction","style","marks"]),a=i.map((t=>t.coordinate||{})),s=i.map((t=>t.interaction||{})),c=i.map((t=>t.viewStyle||{})),l=[...a,e].reduceRight(((t,e)=>Q(t,e)),{}),u=[n,...s].reduce(((t,e)=>Q(t,e)),{}),f=[...c,r].reduce(((t,e)=>Q(t,e)),{});return Object.assign(Object.assign({},o),{marks:i,coordinate:l,interaction:u,style:f})}(r);t.interaction=i.interaction,t.coordinate=i.coordinate,t.marks=[...i.marks,...i.components];const o=RI(i,n);return Pz(yield Az(o,e),o,n)}))}function Az(t,e){return Re(this,void 0,void 0,(function*(){const{library:n}=e,[r]=LI("theme",n),[,i]=LI("mark",n),{theme:o,marks:a,coordinates:s=[]}=t,c=r(Gz(o)),l=new Map;for(const t of a){const{type:n}=t,{props:r={}}=i(n),o=yield kz(t,r,e);if(o){const[t,e]=o;l.set(t,e)}}const u=Jn(Array.from(l.values()).flatMap((t=>t.channels)),(({scaleKey:t})=>t));for(const t of u.values()){const e=t.reduce(((t,{scale:e})=>Q(t,e)),{}),{scaleKey:r}=t[0],{values:i}=t[0],o=Array.from(new Set(i.map((t=>t.field)).filter(Zo))),a=Q({guide:{title:0===o.length?void 0:o},field:o[0]},e),{name:l}=t[0],u=t.flatMap((({values:t})=>t.map((t=>t.value)))),f=Object.assign(Object.assign({},gF(l,u,a,s,c,n)),{uid:Symbol("scale"),key:r});t.forEach((t=>t.scale=f))}return l}))}function Tz(t,e,n,r){const i=t.theme,o="string"==typeof e&&i[e]||{};return r(Q(o,Object.assign({type:e},n)))}function Pz(t,e,n){var r;const[i]=LI("mark",n),[o]=LI("theme",n),[a]=LI("labelTransform",n),{key:s,frame:c=!1,theme:l,clip:u,style:f={},labelTransform:h=[]}=e,d=o(Gz(l)),p=Array.from(t.values()),g=function(t,e){var n;const{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],o=Array.from(new Set(t.flatMap((t=>t.channels.map((t=>t.scale)))))),a=new Map(o.map((t=>[t.name,t])));for(const t of r){const e=xF(t);for(const r of e){const e=a.get(r),s=(null===(n=t.scale)||void 0===n?void 0:n[r])||{},{independent:c=!1}=s;if(e&&!c){const{guide:n}=e,r="boolean"==typeof n?{}:n;e.guide=Q({},r,t),Object.assign(e,s)}else{const e=Object.assign(Object.assign({},s),{expectedDomain:s.domain,name:r,guide:ot(t,i)});o.push(e)}}}return o}(p,e),v=function(t){return t.map((t=>{const e=Q(t,t.style);return delete e.style,e}))}(IF(function(t,e,n){var r;for(const[e]of n.entries())if("cell"===e.type)return t.filter((t=>"shape"!==t.name));if(1!==e.length||t.some((t=>"shape"===t.name)))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},a=(null===(r=t.find((t=>"color"===t.name)))||void 0===r?void 0:r.field)||null,s={field:a,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...t,s]}(Array.from(g),p,t),e,n)),y=oz(v,e,d,n),m=function(t,e,n){const[r]=LI("coordinate",n),{innerHeight:i,innerWidth:o,insetLeft:a,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=(h=u).find((t=>"cartesian"===t.type||"cartesian3D"===t.type))?h:[...h,{type:"cartesian"}];var h;const d="cartesian3D"===f[0].type,p=Object.assign(Object.assign({},t),{x:a,y:s,width:o-a-c,height:i-l-s,transformations:f.flatMap(r)});return d?new VC(p):new GC(p)}(y,e,n),b=c?Q({mainLineWidth:1,mainStroke:"#000"},f):f;!function(t,e,n){const r=Jn(t,(t=>`${t.plane||"xy"}-${t.position}`)),{paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:y,height:m,width:b,depth:x}=n,w={xy:sz({width:b,height:m,paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:h,innerWidth:d,insetBottom:p,insetLeft:g,insetRight:v,insetTop:y}),yz:sz({width:x,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:sz({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[t,n]of r.entries()){const[r,i]=t.split("-"),o=w[r][i],[a,s]=la(n,(t=>"string"==typeof t.type&&("center"===i||!(!t.type.startsWith("axis")||!["inner","outer"].includes(i)))));a.length&&cz(a,e,o,i),s.length&&lz(n,0,o)}}(BF(v),m,y),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,mF(t,n)]))})));!function(t,e){const n=Array.from(t.values()).flatMap((t=>t.channels)),r=nr(n,(t=>t.map((t=>e.get(t.scale.uid)))),(t=>t.name)).filter((([,t])=>t.some((t=>"function"==typeof t.getOptions().groupTransform))&&t.every((t=>t.getTicks)))).map((t=>t[1]));r.forEach((t=>{const e=t.map((t=>t.getOptions().groupTransform))[0];e(t)}))}(t,x);const w={};for(const t of v){const{scales:e=[]}=t,i=[];for(const t of e){const{name:e,uid:o}=t,a=null!==(r=x.get(o))&&void 0!==r?r:mF(t,n);i.push(a),"y"===e&&a.update(Object.assign(Object.assign({},a.getOptions()),{xScale:w.x})),yF(w,{[e]:a})}t.scaleInstances=i}const k=[],M=new Map;for(const[e,n]of t.entries()){const{children:t,dataDomain:r,modifier:o,key:a,data:c}=e;M.set(a,c);const{index:l,channels:u,tooltip:f}=n,h=Object.fromEntries(u.map((({name:t,scale:e})=>[t,e]))),d=oa(h,(({uid:t})=>x.get(t)));yF(w,d);const p=vF(u,d),g=i(e),[v,b,E]=Cz(g(l,d,p,m)),O=r||v.length,_=o?o(b,O,y):[],S=t=>{var e,n;return null===(n=null===(e=f.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},A=t=>f.items.map((e=>e[t])),T=v.map(((t,e)=>{const n=Object.assign({points:b[e],transform:_[e],index:t,markKey:a,viewKey:s,data:c[t]},f&&{title:S(t),items:A(t)});for(const[r,i]of Object.entries(p))n[r]=i[t],E&&(n[`series${G(r)}`]=E[e].map((t=>i[t])));return E&&(n.seriesIndex=E[e]),E&&f&&(n.seriesItems=E[e].map((t=>A(t))),n.seriesTitle=E[e].map((t=>S(t)))),n}));n.data=T,n.index=v;const P=null==t?void 0:t(T,d,y);k.push(...P||[])}return[{layout:y,theme:d,coordinate:m,markState:t,key:s,clip:u,scale:w,style:b,components:v,data:M,labelTransform:qo(h.map(a))},k]}function Nz(t,e,n,r){return Re(this,void 0,void 0,(function*(){const{library:i}=r,{components:o,theme:a,layout:s,markState:c,coordinate:l,key:u,style:f,clip:h,scale:d}=t,{x:p,y:g,width:v,height:y}=s,m=Le(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map(((t,e)=>e)),w=b.map((t=>Jo(Object.assign({},a.view,f),t))),k=["a","margin","padding","inset"].map((t=>Qo(m,t))),M=t=>t.style("x",(t=>A[t].x)).style("y",(t=>A[t].y)).style("width",(t=>A[t].width)).style("height",(t=>A[t].height)).each((function(t,e,n){!function(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}(uy(n),w[t])}));let E=0,O=0,_=v,S=y;const A=x.map((t=>{const e=k[t],{left:n=0,top:r=0,bottom:i=0,right:o=0}=e;return E+=n,O+=r,_-=n+o,S-=r+i,{x:E,y:O,width:_,height:S}}));e.selectAll(Xz(qT)).data(x.filter((t=>Zo(w[t]))),(t=>b[t])).join((t=>t.append("rect").attr("className",qT).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:o}=i,{enter:a={},update:s={},exit:c={}}=t,{type:l,duration:u=300,delay:f=0}=s,{type:h,duration:d=300,delay:p=0}=a,{type:g,duration:v=300,delay:y=0}=c;for(const t of o){const{updateType:r=l,updateDuration:i=u,updateDelay:o=f,enterType:a=h,enterDuration:s=d,enterDelay:c=p,exitDuration:m=v,exitDelay:b=y,exitType:x=g}=t;(void 0===r||r)&&(e=Math.max(e,i+o),n=Math.min(n,o)),(void 0===x||x)&&(e=Math.max(e,m+b),n=Math.min(n,b)),(void 0===a||a)&&(e=Math.max(e,s+c),n=Math.min(n,c))}}return e===-1/0?null:[n,e-n]}(c),P=!!T&&{duration:T[1]};for(const[,t]of tr(o,(t=>`${t.type}-${t.position}`)))t.forEach(((t,e)=>t.index=e));const N=e.selectAll(Xz(HT)).data(o,(t=>`${t.type}-${t.position}-${t.index}`)).join((t=>t.append("g").style("zIndex",(({zIndex:t})=>t||-1)).attr("className",HT).append((t=>DF(Q({animate:P,scale:d},t),l,a,i,c)))),(t=>t.transition((function(t,e,n){const{preserve:r=!1}=t;if(r)return;const o=DF(Q({animate:P,scale:d},t),l,a,i,c),{attributes:s}=o,[u]=n.childNodes;return u.update(s,!1)})))).transitions();n.push(...N.flat().filter(Zo));const C=e.selectAll(Xz(GT)).data([s],(()=>u)).join((t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",GT).call(qz).call(Uz,Array.from(c.keys())).call(Zz,h)),(t=>t.call(Uz,Array.from(c.keys())).call((t=>T?function(t,e){const[n,r]=e;t.transition((function(t,e,i){const{transform:o,width:a,height:s}=i.style,{paddingLeft:c,paddingTop:l,innerWidth:u,innerHeight:f,marginLeft:h,marginTop:d}=t,p=[{transform:o,width:a,height:s},{transform:`translate(${c+h}, ${l+d})`,width:u,height:f}];return i.animate(p,{delay:n,duration:r,fill:"both"})}))}(t,T):qz(t))).call(Zz,h))).transitions();n.push(...C.flat());for(const[o,a]of c.entries()){const{data:s}=a,{key:c,class:l,type:u}=o,f=e.select(`#${c}`),h=Iz(o,a,t,r),d=Fz(o,a,t,i),p=$z(o,a,t,i),g=Wz(o,a,t,i),v=jz(e,f,l,"element"),y=f.selectAll(Xz($T)).selectFacetAll(v).data(s,(t=>t.key),(t=>t.groupKey)).join((t=>t.append(h).attr("className",$T).attr("markType",u).transition((function(t,e,n){return d(t,[n])}))),(t=>t.call((t=>{const e=t.parent(),n=Ko((t=>{const[e,n]=t.getBounds().min;return[e,n]}));t.transition((function(t,r,i){Rz(i,e,n);const o=h(t,r),a=p(t,[i],[o]);return(null==a?void 0:a.length)||(i.nodeName===o.nodeName&&"g"!==o.nodeName?Xo(i,o):(i.parentNode.replaceChild(o,i),o.className=$T,o.markType=u,o.__data__=i.__data__)),a})).attr("markType",u).attr("className",$T)}))),(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",$T).attr("markType",u).transition((function(t,e,n){const{__fromElements__:r}=n,i=p(t,r,[n]);return new fy(r,null,n.parentNode).transition(i).remove(),i}))),(t=>t.transition((function(t,e,n){const r=new fy([],n.__toData__,n.parentNode).append(h).attr("className",$T).attr("markType",u).nodes();return p(t,[n],r)})).remove())).transitions();n.push(...y.flat())}!function(t,e,n,r,i){const[o]=LI("labelTransform",r),{markState:a,labelTransform:s}=t,c=e.select(Xz(zT)).node(),l=new Map,u=new Map,f=Array.from(a.entries()).flatMap((([n,o])=>{const{labels:a=[],key:s}=n,c=function(t,e,n,r,i){const[o]=LI("shape",r),{data:a,encode:s}=t,{data:c,defaultLabelShape:l}=e,u=c.map((t=>t.points)),f=oa(s,(t=>t.value)),{theme:h,coordinate:d}=n,p=Object.assign(Object.assign({},i),{document:jI(i),theme:h,coordinate:d});return t=>{const{index:e,points:n}=t,r=a[e],{formatter:i=t=>`${t}`,transform:s,style:c,render:d,selector:g,element:v}=t,y=Le(t,["formatter","transform","style","render","selector","element"]),m=oa(Object.assign(Object.assign({},y),c),(t=>Lz(t,r,e,a,{channel:f,element:v}))),{shape:b=l,text:x}=m,w=Le(m,["shape","text"]),k="string"==typeof i?dA(i):i,M=Object.assign(Object.assign({},w),{text:k(x,r,e,a),datum:r}),E=Object.assign({type:`label.${b}`,render:d},w);return o(E,p)(n,M,Dz(h,"label",b,"label"),u)}}(n,o,t,r,i),f=e.select(`#${s}`).selectAll(Xz($T)).nodes().filter((t=>!t.__removed__));return a.flatMap(((t,e)=>{const n=Le(t,["transform"]);return f.flatMap((r=>{const i=function(t,e,n){const{seriesIndex:r,seriesKey:i,points:o,key:a,index:s}=n.__data__,c=function(t){const e=t.cloneNode(!0),n=t.getAnimations();e.style.visibility="hidden",n.forEach((t=>{const n=t.effect.getKeyframes();e.attr(n[n.length-1])})),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:i,max:o}=r;return[i,o]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${a}-${e}`,bounds:c,index:s,points:o,dependentElement:n})];const l=function(t){const{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw new Error(`Unknown selector: ${e}`)}(t),u=r.map(((r,a)=>Object.assign(Object.assign({},t),{key:`${i[a]}-${e}`,bounds:[o[a]],index:r,points:o,dependentElement:n})));return l?l(u):u}(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=uy(c).selectAll(Xz(YT)).data(f,(t=>t.key)).join((t=>t.append((t=>l.get(t)(t))).attr("className",YT)),(t=>t.each((function(t,e,n){Xo(n,l.get(t)(t))}))),(t=>t.remove())).nodes(),d=Jn(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;qo(n.map(o))(e,v)}s&&s(h,v)}(t,e,0,i,r)}))}function Cz([t,e,n]){if(n)return[t,e,n];const r=[],i=[];for(let n=0;n<t.length;n++){const o=t[n],a=e[n];a.every((([t,e])=>Zo(t)&&Zo(e)))&&(r.push(o),i.push(a))}return[r,i]}function Lz(t,e,n,r,i){return"function"==typeof t?t(e,n,r,i):"string"!=typeof t?t:na(e)&&void 0!==e[t]?e[t]:t}function jz(t,e,n,r){const i=t.node().parentElement;return i&&"function"==typeof i.findAll?i.findAll((t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node())).flatMap((t=>t.getElementsByClassName(r))):[]}function Rz(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=e.parentNode,[o,a]=n(r),[s,c]=n(i);!function(t,e){const{transform:n}=t.style,r=(t=>"none"===t||void 0===t)(n)?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${o-s}, ${a-c})`),e.append(t)}function Iz(t,e,n,r){const{library:i}=r,[o]=LI("shape",i),{data:a,encode:s}=t,{defaultShape:c,data:l,shape:u}=e,f=oa(s,(t=>t.value)),h=l.map((t=>t.points)),{theme:d,coordinate:p}=n,{type:g,style:v={}}=t,y=Object.assign(Object.assign({},r),{document:jI(r),coordinate:p,theme:d});return e=>{const{shape:n=c}=v,{shape:r=n,points:i,seriesIndex:s,index:l}=e,p=Le(e,["shape","points","seriesIndex","index"]),m=Object.assign(Object.assign({},p),{index:l}),b=s?s.map((t=>a[t])):a[l],x=s||l,w=oa(v,(t=>Lz(t,b,x,a,{channel:f})));return(u[r]?u[r](w,y):o(Object.assign(Object.assign({},w),{type:Vz(t,r)}),y))(i,m,Dz(d,g,r,c),h)}}function Dz(t,e,n,r){if("string"!=typeof e)return;const{color:i}=t,o=t[e]||{},a=o[n]||o[r];return Object.assign({color:i},a)}function Bz(t,e,n,r,i){var o,a;const[,s]=LI("shape",i),[c]=LI("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:h}=r,d=`default${G(t)}Animation`,{[d]:p}=(null===(o=u[l])||void 0===o?void 0:o.props)||s(Vz(e,l)).props,{[t]:g={}}=f,v=(null===(a=e.animate)||void 0===a?void 0:a[t])||{},y={coordinate:h};return(e,n,r)=>{const{[`${t}Type`]:i,[`${t}Delay`]:o,[`${t}Duration`]:a,[`${t}Easing`]:s}=e,l=Object.assign({type:i||p},v);if(!l.type)return null;const u=c(l,y)(n,r,Q(g,{delay:o,duration:a,easing:s}));let f=[];return f=Array.isArray(u)?u:[u],f.filter(Boolean)}}function Fz(t,e,n,r){return Bz("enter",t,e,n,r)}function zz(t){return t.finished.then((()=>{t.cancel()})),t}function $z(t,e,n,r){return Bz("update",t,e,n,r)}function Wz(t,e,n,r){return Bz("exit",t,e,n,r)}function Gz(t={}){if("string"==typeof t)return{type:t};const{type:e="light"}=t,n=Le(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Hz(t){const{interaction:e={}}=t;return Object.entries(Q({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function Yz(t,e){return Re(this,void 0,void 0,(function*(){const{data:n}=t,r=Le(t,["data"]);if(null==n)return t;const[,{data:i}]=yield hz(0,{data:n},e);return Object.assign({data:i},r)}))}function qz(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 Vz(t,e){const{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function Uz(t,e){const n=t=>void 0!==t.class?`${t.class}`:"";if(0===t.nodes().length)return;t.selectAll(Xz(FT)).data(e,(t=>t.key)).join((t=>t.append("g").attr("className",FT).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(Xz(zT)).node()||t.append("g").attr("className",zT).style("zIndex",0)}function Xz(...t){return t.map((t=>`.${t}`)).join("")}function Zz(t,e){t.node()&&t.style("clipPath",(t=>{if(!e)return null;const{paddingTop:n,paddingLeft:r,marginLeft:i,marginTop:o,innerWidth:a,innerHeight:s}=t;return new Ug({style:{x:r+i,y:n+o,width:a,height:s}})}))}function Kz(t){const{style:e,scale:n,type:r}=t,i={},o=rt(e,"columnWidthRatio");return o&&"interval"===r&&(i.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-o})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),i)})}function Qz(t){const e=function(t){return function(...t){return e=>t.reduce(((t,e)=>e(t)),e)}(Kz)(t)}(t);return e.children&&Array.isArray(e.children)&&(e.children=e.children.map((t=>Qz(t)))),e}function Jz(t){const e=Q({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){const t=i.shift();if(void 0===t.key){const e=n.get(t),i=r.get(t),o=null===e?"0":`${e.key}-${i}`;t.key=o}const{children:e=[]}=t;if(Array.isArray(e))for(let o=0;o<e.length;o++){const a=Q({},e[o]);e[o]=a,n.set(a,t),r.set(a,o),i.push(a)}}return e}function t$(t,e){const n=new aN;return n.registerPlugin(new cN),new fv({width:t,height:e,container:document.createElement("div"),renderer:n})}function e$(t,e={},n=()=>{},r=t=>{throw t}){const i=jN(t),{width:o=640,height:a=480,depth:s=0}=i,c=Jz(Qz(i)),{canvas:l=t$(o,a),emitter:u=new uN,library:f}=e;e.canvas=l,e.emitter=u;const{width:h,height:d}=l.getConfig();h===o&&d===a||l.resize(o,a),u.emit(fN.BEFORE_RENDER);const p=uy(l.document.documentElement);return l.ready.then((()=>Ez(Object.assign(Object.assign({},c),{width:o,height:a,depth:s}),p,e))).then((()=>{if(s){const[t,e]=l.document.documentElement.getPosition();l.document.documentElement.setPosition(t,e,-s/2)}l.requestAnimationFrame((()=>{l.requestAnimationFrame((()=>{u.emit(fN.AFTER_RENDER),null==n||n()}))}))})).catch((t=>{null==r||r(t)})),"string"==typeof(g=l.getConfig().container)?document.getElementById(g):g;var g}function n$(t,e={},n=!1,r=!0){const{canvas:i,emitter:o}=e;i&&(!function(t){const e=t.getRoot().querySelectorAll(`.${WT}`);null==e||e.forEach((t=>{const{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach((t=>{null==t||t.destroy()}))}))}(i),n?i.destroy():i.destroyChildren()),r&&o.off()}function r$(t,e){if(e(t))return!0;if("g"===t.tagName){const{childNodes:n=[]}=t;for(const t of n)if(r$(t,e))return!0}return!1}const i$={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function o$(t,e){let n;return r$(t,(t=>{var r;return"g"!==t.tagName&&void 0!==(null===(r=t.style)||void 0===r?void 0:r[e])&&(n=t.style[e],!0)})),null!=n?n:i$[e]}function a$(t,e,n,r){t.style[e]=n,r&&t.children.forEach((t=>a$(t,e,n,r)))}function s$(t){a$(t,"visibility","hidden",!0)}function c$(t){a$(t,"visibility","visible",!0)}function l$(t){return uy(t).selectAll(`.${$T}`).nodes().filter((t=>!t.__removed__))}function u$(t,e){return f$(t,e).flatMap((({container:t})=>l$(t)))}function f$(t,e){return e.filter((e=>e!==t&&e.options.parentKey===t.options.key))}function h$(t){return uy(t).select(`.${GT}`).node()}function d$(t){if("g"===t.tagName)return t.getRenderBounds();const e=t.getGeometryBounds(),n=new uu;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function p$(t,e){const{offsetX:n,offsetY:r}=e,i=d$(t),{min:[o,a],max:[s,c]}=i;return n<o||n>s||(r<a||r>c)?null:[n-o,r-a]}function g$(t,e){const{offsetX:n,offsetY:r}=e,[i,o,a,s]=function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,o]}=e;return[n,r,i,o]}(t);return[Math.min(a,Math.max(i,n))-i,Math.min(s,Math.max(o,r))-o]}function v$(t){return t=>t.__data__.color}function y$(t){return t=>t.__data__.x}function m$(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap((t=>Array.from(t.markState.keys()).map((e=>[E$(t.key,e.key),e.data])))));return t=>{const{index:e,markKey:r,viewKey:i}=t.__data__;return n.get(E$(i,r))[e]}}const b$={selected:3,unselected:3,active:2,inactive:2,default:1},x$={selection:["selected","unselected"],highlight:["active","inactive"]},w$=(t,e,n)=>{r$(t,(t=>{"setAttribute"in t&&"function"==typeof t.setAttribute&&t.setAttribute(e,n)}))};function k$(t,e){return e.forEach((e=>{const n=e.__interactionStyle__;e.__interactionStyle__=n?Object.assign(Object.assign({},n),t):t})),(t=(t,e)=>t,e=w$)=>M$(void 0,t,e)}function M$(t,e=(t,e)=>t,n=w$){const r="__states__",i="__ordinal__",o=t=>b$[t]||b$.default,a=t=>{var e;return null===(e=Object.entries(x$).find((([e,n])=>n.includes(t))))||void 0===e?void 0:e[0]},s=a=>{var s;const{[r]:c=[],[i]:l={}}=a,u=[...c].sort(((t,e)=>o(e)-o(t))),f=new Map;for(const e of u){const n=(null===(s=null!=t?t:a.__interactionStyle__)||void 0===s?void 0:s[e])||{};for(const[t,e]of Object.entries(n))f.has(t)||f.set(t,e)}const h=Object.assign({},l);for(const[t,e]of f.entries())h[t]=e;if(0!==Object.keys(h).length){for(const[t,r]of Object.entries(h)){const i=o$(a,t),o=e(r,a);n(a,t,o),t in l||(l[t]=i)}a[i]=l}},c=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{c(t),t[r]=[...e],s(t)},updateState:(t,...e)=>{c(t);const n=t[r],i=new Set(e.map((t=>a(t))).filter((t=>void 0!==t))),o=n.filter((t=>!i.has(a(t))));t[r]=[...o,...e],s(t)},removeState:(t,...e)=>{c(t);for(const n of e){const e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}s(t)},hasState:(t,e)=>(c(t),-1!==t[r].indexOf(e))}}function E$(t,e){return`${t},${e}`}function O$(t,e){const n=(Array.isArray(t)?t:[t]).flatMap((t=>t.marks.map((e=>[E$(t.key,e.key),e.state])))),r={};for(const t of e){const[e,i]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce(((t,n)=>{const[r,o={}]=n,a=void 0===(s=o[e])||"object"==typeof s&&0===Object.keys(s).length?i:o[e];var s;for(const[e,n]of Object.entries(a)){const i=t[e],o=(t,e,o,a)=>{const s=E$(a.__data__.viewKey,a.__data__.markKey);return r!==s?null==i?void 0:i(t,e,o,a):"function"!=typeof n?n:n(t,e,o,a)};t[e]=o}return t}),{})}return r}function _$(t,e){const n=new Map(t.map(((t,e)=>[t,e]))),r=e?t.map(e):t;return(t,i)=>{if("function"!=typeof t)return t;const o=n.get(i);return t(e?e(i):i,o,r,i)}}function S$(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=Le(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const o=t=>t.__data__.points,a=(t,e)=>{const[,n,r]=t,[i,,,o]=e;return[n,i,o,r]};return[t=>{var e;if(t.length<=1)return;const r=ir(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=cc(),c=r[t-1],l=r[t],[u,f,h,d]=a(o(c),o(l));s.moveTo(...u),s.lineTo(...f),s.lineTo(...h),s.lineTo(...d),s.closePath();const p=oa(i,(t=>n(t,c))),{fill:g=c.getAttribute("fill")}=p,v=Le(p,["fill"]),y=new Gg({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(y),c.link=y}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function A$(t,e,n){const r=e=>{const{transform:n}=t.style;return n?`${n} ${e}`:e};if(Qc(n)){const{points:i}=t.__data__,[o,a]=Kc(n)?yy(i):i,s=n.getCenter(),c=_s(o,s),l=_s(a,s),u=Ts(c)+Ns(c,l)/2;return r(`translate(${e*Math.cos(u)}, ${e*Math.sin(u)})`)}return Kc(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function T$(t){var{document:e,background:n,scale:r,coordinate:i,valueof:o}=t,a=Le(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(t,e,n)=>{const r=t.invert(e),i=e+t.getBandWidth(r)/2,o=t.getStep(r)/2,a=o*n;return[i-o+a,i+o-a]},l=(t,n)=>{const{padding:o}=n,[a,s]=((t,e)=>{const{x:n}=r;if(!eT(n))return[0,1];const{__data__:i}=t,{x:o}=i,[a,s]=c(n,o,e);return[a,s]})(t,o),[l,u]=((t,e)=>{const{y:n}=r;if(!eT(n))return[0,1];const{__data__:i}=t,{y:o}=i,[a,s]=c(n,o,e);return[a,s]})(t,o),f=[[a,l],[s,l],[s,u],[a,u]].map((t=>i.map(t))),{__data__:h}=t,{y:d,y1:p}=h;return ky(e,f,{y:d,y1:p},i,n)},u=(t,e)=>{const{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,o=Le(e,["transform","transformOrigin","stroke"]),a=Object.assign({transform:n,transformOrigin:r,stroke:i},o),s=t.cloneNode(!0);for(const[t,e]of Object.entries(a))s.style[t]=e;return s};return[t=>{t.background&&t.background.remove();const e=oa(a,(e=>o(e,t))),{fill:n="#CCD6EC",fillOpacity:i=.3,zIndex:c=-2,padding:f=.001,lineWidth:h=0}=e,d=Le(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(eT)})()?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 P$(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 N$(t){P$(t,t.cursor)}function C$(t,e,n){return t.find((t=>Object.entries(e).every((([e,r])=>n(t)[e]===r))))}function L$(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function j$(t,e=!1){const n=y(t,(t=>!!t)).map(((t,e)=>[0===e?"M":"L",...t]));return e&&n.push(["Z"]),n}function R$(t){return t.querySelectorAll(".element")}function I$(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}const D$=["interval","point","density"];function B$({elementsof:t,root:e,coordinate:n,scale:r,validFindByXMarks:i=D$}){var o,a;let s=t(e);const c=t=>i.includes(t.markType);if(s.find(c)){s=s.filter(c);const t=r.x,i=r.series,l=null!==(a=null===(o=null==t?void 0:t.getBandWidth)||void 0===o?void 0:o.call(t))&&void 0!==a?a:0,u=i?t=>{var e,n;const r=Math.round(1/(null!==(e=i.valueBandWidth)&&void 0!==e?e:1));return t.__data__.x+(null!==(n=t.__data__.series)&&void 0!==n?n:0)*l+l/(2*r)}:t=>t.__data__.x+l/2;return s.sort(((t,e)=>u(t)-u(e))),t=>{const r=p$(e,t);if(!r)return;const[i]=n.invert(r),o=(0,Dn(u).center)(s,i);return s[o]}}return t=>{const{target:e}=t;return I$(e,(t=>!!t.classList&&t.classList.includes("element")))}}function F$(t){var{delay:e,createGroup:n,createRegionGroup:r,background:i=!1,link:o=!1}=t,a=Le(t,["delay","createGroup","createRegionGroup","background","link"]);return(t,s,c)=>{const{container:l,view:u,options:f}=t,{scale:h,coordinate:d}=u;return function(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:i=t=>t,link:o=!1,background:a=!1,delay:s=60,scale:c,coordinate:l,emitter:u,state:f={},region:h=!1,regionEleFilter:d=t=>D$.includes(t.markType)}){var p,g;const v=null!==(p=e(t))&&void 0!==p?p:[],y=h?v.filter(d):v,m=new Set(y),b=h?i:r,x=Jn(y,b),w=B$({elementsof:e,root:t,coordinate:l,scale:c}),k=_$(y,n),[M,E]=S$(Object.assign({elements:y,valueof:k,link:o,coordinate:l},Qo(f.active,"link"))),[O,_,S]=T$(Object.assign({document:t.ownerDocument,scale:c,coordinate:l,background:a,valueof:k},Qo(f.active,"background"))),A=Q(f,{active:Object.assign({},(null===(g=f.active)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=f.active.offset(...t),[,n]=t;return A$(y[n],e,l)}})}),T=k$(A,y),{updateState:P,removeState:N,hasState:C}=T(k);let L;const j=t=>{const{nativeEvent:e=!0}=t;let r=t.target;if(h&&(r=w(t)),!m.has(r))return;L&&clearTimeout(L);const i=b(r),o=x.get(i),a=new Set(o);for(const t of y)a.has(t)?C(t,"active")||P(t,"active"):(P(t,"inactive"),E(t)),t!==r&&_(t);O(r),M(o),e&&u.emit("element:highlight",{nativeEvent:e,data:{data:n(r),group:o.map(n)}})},R=()=>{L&&clearTimeout(L),L=setTimeout((()=>{I(),L=null}),s)},I=(t=!0)=>{for(const t of y)N(t,"active","inactive"),_(t),E(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},D=t=>{let e=t.target;h&&(e=w(t)),e?a&&!S(e)||(a||m.has(e))&&(s>0?R():I()):s>0?R():I()},B=()=>{I()};t.addEventListener("pointerover",j),t.addEventListener("pointermove",j),t.addEventListener("pointerout",D),t.addEventListener("pointerleave",B);const F=t=>{const{nativeEvent:e}=t;e||I(!1)},z=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,i=C$(y,r,n);i&&j({target:i,nativeEvent:!1})};return u.on("element:highlight",z),u.on("element:unhighlight",F),()=>{t.removeEventListener("pointerover",j),t.removeEventListener("pointermove",j),t.removeEventListener("pointerout",D),t.removeEventListener("pointerleave",B),u.off("element:highlight",z),u.off("element:unhighlight",F);for(const t of y)_(t),E(t)}}(h$(l),Object.assign({elements:l$,datum:m$(u),groupKey:n?n(u):void 0,regionGroupKey:r?r(u):t=>t.__data__.x,coordinate:d,scale:h,state:O$(f,[["active",i?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:i,link:o,delay:e,emitter:c},a))}}function z$(t){return F$(Object.assign(Object.assign({},t),{createGroup:y$}))}function $$(t){return F$(Object.assign(Object.assign({},t),{createGroup:v$}))}function W$(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:i=t=>t,link:o=!1,single:a=!1,multipleSelectHotkey:s,coordinate:c,background:l=!1,scale:u,emitter:f,state:h={},region:d=!1,regionEleFilter:p=t=>D$.includes(t.markType)}){var g;const v=e(t),y=new Set(v),m=B$({elementsof:e,root:t,coordinate:c,scale:u}),b=Jn(v,r),x=Jn(v,i),w=_$(v,n),[k,M]=S$(Object.assign({link:o,elements:v,valueof:w,coordinate:c},Qo(h.selected,"link"))),[E,O]=T$(Object.assign({document:t.ownerDocument,background:l,coordinate:c,scale:u,valueof:w},Qo(h.selected,"background"))),_=Q(h,{selected:Object.assign({},(null===(g=h.selected)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=h.selected.offset(...t),[,n]=t;return A$(v[n],e,c)}})}),S=k$(_,v),{updateState:A,removeState:T,hasState:P}=S(w);let N=!a,C=null;const L=(t=!0)=>{for(const t of v)T(t,"selected","unselected"),M(t),O(t);t&&f.emit("element:unselect",{nativeEvent:!0})},j=({event:t,element:e,nativeEvent:i=!0,filter:o=t=>!0,groupBy:a=r,groupMap:s=b})=>{const c=v.filter(o);if(P(e,"selected"))L();else{const r=a(e),o=s.get(r),l=new Set(o);for(const t of c)l.has(t)?A(t,"selected"):(A(t,"unselected"),M(t)),t!==e&&O(t);if(k(o),E(e),!i)return;f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...o.map(n)]}}))}},R=({event:t,element:e,nativeEvent:i=!0,filter:a=t=>!0,groupBy:s=r,groupMap:c=b})=>{const l=s(e),u=c.get(l),h=new Set(u),d=v.filter(a);if(P(e,"selected")){const t=v.some((t=>!h.has(t)&&P(t,"selected")));if(!t)return L();for(const t of u)A(t,"unselected"),M(t),O(t)}else{const t=u.some((t=>P(t,"selected")));for(const t of d)h.has(t)?A(t,"selected"):P(t,"selected")||A(t,"unselected");!t&&o&&k(u),E(e)}i&&f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:v.filter((t=>P(t,"selected"))).map(n)}}))},I=t=>{if(y.has(t))return t;for(const e of y){let n=null;if(r$(e,(r=>{r===t&&(n=e)})),n)return n}return t},D=t=>{const{target:e,nativeEvent:n=!0}=t,o=N?R:j;let a=e;const s=(t=>{if(y.has(t))return!0;for(const e of y)if(r$(e,(e=>e===t)))return!0;return!1})(e);return!d||s?s?o({event:t,element:I(a),nativeEvent:n,groupBy:r}):L():(a=m(t),y.has(a)?o({event:t,element:a,nativeEvent:n,filter:p,groupBy:i,groupMap:x}):L())},B=Array.isArray(s)?s:[s],F=t=>{B.includes(t.code)&&!C&&(C=t.code,N=!0)},z=t=>{t.code===C&&(C=null,N=!1)};t.addEventListener("click",D),s&&(N=!1,document.addEventListener("keydown",F),document.addEventListener("keyup",z));const $=t=>{const{nativeEvent:e,data:r}=t;if(e)return;const i=N?r.data:r.data.slice(0,1);for(const t of i){const e=C$(v,t,n);D({target:e,nativeEvent:!1})}},W=()=>{L(!1)};return f.on("element:select",$),f.on("element:unselect",W),()=>{for(const t of v)M(t);t.removeEventListener("click",D),s&&(document.removeEventListener("keydown",F),document.removeEventListener("keyup",z)),f.off("element:select",$),f.off("element:unselect",W)}}function G$(t){var{createGroup:e,createRegionGroup:n,background:r=!1,link:i=!1}=t,o=Le(t,["createGroup","createRegionGroup","background","link"]);return(t,a,s)=>{const{container:c,view:l,options:u}=t,{coordinate:f,scale:h}=l;return W$(h$(c),Object.assign({elements:l$,datum:m$(l),groupKey:e?e(l):void 0,regionGroupKey:n?n(l):t=>t.__data__.x,coordinate:f,scale:h,state:O$(u,[["selected",r?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:r,link:i,emitter:s},o))}}function H$(t){return G$(Object.assign(Object.assign({},t),{createGroup:y$}))}function Y$(t){return G$(Object.assign(Object.assign({},t),{createGroup:v$}))}function q$(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,o=Le(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{view:a,container:s,update:c,setState:l}=t,{markState:u,scale:f,coordinate:h}=a,d=function(t,e,n){const[r]=Array.from(t.entries()).filter((([t])=>t.type===e)).map((([t])=>{const{encode:e}=t;return Object.fromEntries(n.map((t=>{const n=e[t];return[t,n?n.value:void 0]})))}));return r}(u,"line",["x","y","series"]);if(!d)return;const{y:p,x:g,series:v=[]}=d,y=p.map(((t,e)=>e)),m=ir(y.map((t=>g[t]))),b=h$(s),x=s.getElementsByClassName($T),w=Jn(s.getElementsByClassName(YT),(t=>t.__data__.key.split("-")[0])),k=new $g({style:Object.assign({x1:0,y1:0,x2:0,y2:b.getAttribute("height"),stroke:"black",lineWidth:1},Qo(o,"rule"))}),M=new Zg({style:Object.assign({x:0,y:b.getAttribute("height"),text:"",fontSize:10},Qo(o,"label"))});k.append(M),b.appendChild(k);const E=(t,e,n)=>{const[r]=t.invert(n),i=e.invert(r);return m[Gn(m,i)]},O=(t,e)=>{k.setAttribute("x1",t[0]),k.setAttribute("x2",t[0]),M.setAttribute("text",i(e))};let _;const S=at((t=>{const e=p$(b,t);e&&(t=>{const{scale:e,coordinate:n}=_,{x:r,y:i}=e,o=E(n,r,t);O(t,o);for(const t of x){const{seriesIndex:e,key:r}=t.__data__,a=e[Dn((t=>g[+t])).center(e,o)],s=[0,i.map(1)],c=[0,i.map(p[a]/p[e[0]])],[,l]=n.map(s),[,u]=n.map(c),f=l-u;t.setAttribute("transform",`translate(0, ${f})`);const h=w.get(r)||[];for(const t of h)t.setAttribute("dy",f)}})(e)}),e,{leading:n,trailing:r});return(t=>{Re(this,void 0,void 0,(function*(){const{x:e}=f,n=E(h,e,t);O(t,n),l("chartIndex",(t=>{const e=Q({},t),r=e.marks.find((t=>"line"===t.type)),i=vr(er(y,(t=>vr(t,(t=>+p[t]))/mr(t,(t=>+p[t]))),(t=>v[t])).values());Q(r,{scale:{y:{domain:[1/i,i]}}});const o=function(t){const{transform:e=[]}=t,n=e.find((t=>"normalizeY"===t.type));if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);o.groupBy="color",o.basis=(t,e)=>e[t[Dn((t=>g[+t])).center(t,n)]];for(const t of e.marks)t.animate=!1;return e}));const r=yield c("chartIndex");_=r.view}))})([0,0]),b.addEventListener("pointerenter",S),b.addEventListener("pointermove",S),b.addEventListener("pointerleave",S),()=>{k.remove(),b.removeEventListener("pointerenter",S),b.removeEventListener("pointermove",S),b.removeEventListener("pointerleave",S)}}}function V$({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:o,setState:a,container:s}=r,c=h$(s),l=at((t=>{const e=p$(c,t);if(!e)return a("fisheye"),void o();a("fisheye",(t=>{const n=Q({},t,{interaction:{tooltip:{preserve:!0}}});for(const t of n.marks)t.animate=!1;const[r,i]=e,o=function(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find((t=>"fisheye"===t.type));if(r)return r;const i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}(n);return o.focusX=r,o.focusY=i,o.visual=!0,n})),o()}),t,{leading:e,trailing:n});return c.addEventListener("pointerenter",l),c.addEventListener("pointermove",l),c.addEventListener("pointerleave",l),()=>{c.removeEventListener("pointerenter",l),c.removeEventListener("pointermove",l),c.removeEventListener("pointerleave",l)}}}function U$(t,e){var n;if(e)return"string"==typeof e?document.querySelector(e):e;const r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r)return;return r.getContextService().getDomElement().parentElement}function X$(t,e,n,r,i,o,a,s={},c=[10,10]){const l=new nk({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:o,position:r,enterable:i,title:"",offset:c,template:{prefixCls:"g2-"},style:Q({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},s)}});return t.appendChild(l.HTMLTooltipElement),l}function Z$({root:t,data:e,x:n,y:r,render:i,event:o,single:a,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f,offset:h}){const d=U$(t,u),p=U$(t),g=a?p:t,v=f||function(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,o]}=e;return{x:n,y:r,width:i-n,height:o-r}}(t),y=function(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(p,d),{tooltipElement:m=X$(d,n,r,s,c,v,y,l,h)}=g,{items:b,title:x=""}=e;m.update(Object.assign({x:n,y:r,data:b,title:x,position:s,enterable:c,container:y},void 0!==i&&{content:i(o,{items:b,title:x})})),g.tooltipElement=m}function K$({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const o=U$(t),a=e?o:t,{tooltipElement:s}=a;s&&s.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY),oW(t),aW(t),sW(t)}function Q$({root:t,single:e}){const n=U$(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),oW(t),aW(t),sW(t)}function J$(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function tW(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=(e&&"transparent"!==e?e:n)}=r;return i}function eW(t,e=t=>t){const n=new Map(t.map((t=>[e(t),t])));return Array.from(n.values())}function nW(t,e,n,r=t.map((t=>t.__data__)),i={}){const o=t=>t instanceof Date?+t:t,a=eW(r.map((t=>t.title)),o).filter(Zo),s=r.flatMap(((r,o)=>{const a=t[o],{items:s=[],title:c}=r,l=s.filter(Zo),u=void 0!==n?n:s.length<=1;return l.map((t=>{var{color:n=tW(a)||i.color,name:o}=t,s=Le(t,["color","name"]);const l=Ho(e,r),f=u&&!(uz in s)?l||o:o||l;return Object.assign(Object.assign({},s),{color:n,name:f||c})}))})).map(J$);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:eW(s,(t=>`(${o(t.name)}, ${o(t.value)}, ${o(t.color)})`))})}function rW(t,e,n,r){var{plotWidth:i,plotHeight:o,mainWidth:a,mainHeight:s,startX:c,startY:l,transposed:u,polar:f,insetLeft:h,insetTop:d}=r,p=Le(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=>As(e,t))),r=br(n,(t=>t));return e[r]})(n,e);if(f){const[e,n,r]=(()=>{const t=c+h+a/2,e=l+d+s/2;return[t,e,As([t,e],v)]})(),i=t.ruleX||((e,n,r)=>{const i=new Cg({style:Object.assign({cx:e,cy:n,r:r},g)});return t.appendChild(i),i})(e,n,r);i.style.cx=e,i.style.cy=n,i.style.r=r,t.ruleX=i}else{const[e,n,r,a]=u?[c+v[0],c+v[0],l,l+o]:[c,c+i,v[1]+l,v[1]+l],s=t.ruleX||((e,n,r,i)=>{const o=new $g({style:Object.assign({x1:e,x2:n,y1:r,y2:i},g)});return t.appendChild(o),o})(e,n,r,a);s.style.x1=e,s.style.x2=n,s.style.y1=r,s.style.y2=a,t.ruleX=s}}function iW(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:o,mainHeight:a,startX:s,startY:c,transposed:l,polar:u,insetLeft:f,insetTop:h}=n,d=Le(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])),y=Er(g),m=Er(v),[b,x,w,k]=(()=>{if(u){const t=Math.min(o,a)/2,e=s+f+o/2,n=c+h+a/2,r=Ts(_s([m,y],[e,n]));return[e,e+t*Math.cos(r),n,n+t*Math.sin(r)]}return l?[s,s+r,y+c,y+c]:[m+s,m+s,c,c+i]})();if(v.length>0){const e=t.ruleY||(()=>{const e=new $g({style:Object.assign({x1:b,x2:x,y1:w,y2:k},p)});return t.appendChild(e),e})();e.style.x1=b,e.style.x2=x,e.style.y1=w,e.style.y2=k,t.ruleY=e}}function oW(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function aW(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function sW(t){t.markers&&(t.markers.forEach((t=>t.remove())),t.markers=[])}function cW(t,e){return Array.from(t.values()).some((t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]}))}function lW(t,e){return void 0===t?e:t}function uW(t){const{title:e,items:n}=t;return 0===n.length&&void 0===e}function fW({root:t,event:e,elements:n,coordinate:r,scale:i,shared:o}){var a,s;const c=n.every((t=>"interval"===t.markType))&&!Qc(r),l=i.x,u=i.series,f=null!==(s=null===(a=null==l?void 0:l.getBandWidth)||void 0===a?void 0:a.call(l))&&void 0!==s?s:0,h=u?t=>{const e=Math.round(1/u.valueBandWidth);return t.__data__.x+t.__data__.series*f+f/(2*e)}:t=>t.__data__.x+f/2;c&&n.sort(((t,e)=>h(t)-h(e)));const d=t=>{const{target:e}=t;return I$(e,(t=>!!t.classList&&t.classList.includes("element")))},p=c?e=>{const i=p$(t,e);if(!i)return;const[a]=r.invert(i),s=(0,Dn(h).center)(n,a),c=n[s];if(!o){const t=n.find((t=>t!==c&&h(t)===h(c)));if(t)return d(e)}return c}:d;return p(e)}function hW({root:t,event:e,elements:n,coordinate:r,scale:i,startX:o,startY:a}){const s=Kc(r),c=[],l=[];for(const t of n){const{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?c.push(t):(r||i)&&l.push(t)}const u=l.length&&l.every((t=>"interval"===t.markType))&&!Qc(r),f=t=>t.__data__.x,h=!!i.x.getBandWidth&&l.length>0;c.sort(((t,e)=>{const n=s?0:1,r=t=>t.getBounds().min[n];return s?r(e)-r(t):r(t)-r(e)}));const d=t=>{const e=s?1:0,{min:n,max:r}=t.getLocalBounds();return ir([n[e],r[e]])};u?n.sort(((t,e)=>f(t)-f(e))):l.sort(((t,e)=>{const[n,r]=d(t),[i,o]=d(e),a=(n+r)/2,c=(i+o)/2;return s?c-a:a-c}));const p=new Map(c.map((t=>{const{__data__:e}=t,{seriesX:n}=e,r=n.map(((t,e)=>e)),i=ir(r,(t=>n[+t]));return[t,[i,n]]}))),{x:g}=i,v=(null==g?void 0:g.getBandWidth)?g.getBandWidth()/2:0,y=t=>{const[e]=r.invert(t);return e-v},m=(t,e,n,r)=>{const{_x:i}=t,o=void 0!==i?g.map(i):y(e),a=r.filter(Zo),[s,c]=ir([a[0],a[a.length-1]]);if(!h&&(o<s||o>c)&&!(s===c))return null;const l=Dn((t=>r[+t])).center;return n[l(n,o)]},b=u?(t,e)=>{const n=e[(0,Dn(f).center)(e,y(t))];return Jn(e,f).get(f(n))}:(t,e)=>{const n=t[s?1:0],r=e.filter((t=>{const[e,r]=d(t);return n>=e&&n<=r}));if(!h||r.length>0)return r;const i=Dn((t=>{const[e,n]=d(t);return(e+n)/2})).center;return[e[i(e,n)]].filter(Zo)},x=(t,e)=>{const{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter((([t])=>t.startsWith("series")&&"series"!==t)).map((([t,n])=>{const r=n[e];return[W(t.replace("series","")),r]})))},w=p$(t,e);if(!w)return;const k=[w[0]-o,w[1]-a];if(!k)return;const M=b(k,l),E=[],O=[];for(const t of c){const[n,i]=p.get(t),o=m(e,k,n,i);if(null!==o){E.push(t);const e=x(t,o),{x:n,y:i}=e,a=r.map([(n||0)+v,i||0]);O.push([Object.assign(Object.assign({},e),{element:t}),a])}}const _=Array.from(new Set(O.map((t=>t[0].x)))),S=_[br(_,(t=>Math.abs(t-y(k))))],A=O.filter((t=>t[0].x===S)),T=[...A.map((t=>t[0])),...M.map((t=>t.__data__))];return{selectedElements:[...E,...M],selectedData:T,filteredSeriesData:A,abstractX:y}}function dW(t,e){var{elements:n,sort:r,filter:i,scale:o,coordinate:a,crosshairs:s,crosshairsX:c,crosshairsY:l,render:u,groupName:f,emitter:h,wait:d=50,leading:p=!0,trailing:g=!1,startX:v=0,startY:y=0,body:m=!0,single:b=!0,position:x,enterable:w,mount:k,bounding:M,theme:E,offset:O,disableNative:_=!1,marker:S=!0,preserve:A=!1,style:T={},css:P={}}=e,N=Le(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 C=n(t),L=Q(T,N),j=Qc(a),R=Kc(a),{innerWidth:I,innerHeight:D,width:B,height:F,insetLeft:z,insetTop:$}=a.getOptions(),W=at((e=>{var n;const d=p$(t,e);if(!d)return;const p=d$(t),g=p.min[0],_=p.min[1],{selectedElements:A,selectedData:T,filteredSeriesData:N,abstractX:W}=hW({root:t,event:e,elements:C,coordinate:a,scale:o,startX:v,startY:y}),H=nW(A,o,f,T,E);if(r&&H.items.sort(((t,e)=>r(t)-r(e))),i&&(H.items=H.items.filter(i)),0===A.length||uW(H))return void G(e);if(m&&Z$({root:t,data:H,x:d[0]+g,y:d[1]+_,render:u,event:e,single:b,position:x,enterable:w,mount:k,bounding:M,css:P,offset:O}),s||c||l){const e=Qo(L,"crosshairs"),n=Object.assign(Object.assign({},e),Qo(L,"crosshairsX")),r=Object.assign(Object.assign({},e),Qo(L,"crosshairsY")),i=N.map((t=>t[1]));c&&rW(t,i,d,Object.assign(Object.assign({},n),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:z,insetTop:$,startX:v,startY:y,transposed:R,polar:j})),l&&iW(t,i,Object.assign(Object.assign({},r),{plotWidth:I,plotHeight:D,mainWidth:B,mainHeight:F,insetLeft:z,insetTop:$,startX:v,startY:y,transposed:R,polar:j}))}if(S){const e=Qo(L,"marker");!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach((t=>t.remove()));const{type:i=""}=n,o=e.filter((t=>{const[{x:e,y:n}]=t;return Zo(e)&&Zo(n)})).map((t=>{const[{color:e,element:o},a]=t,s=e||o.style.fill||o.style.stroke||r.color,c="hollow"===i?"transparent":s,l="hollow"===i?s:"#fff";return new Cg({className:"g2-tooltip-marker",style:Object.assign({cx:a[0],cy:a[1],fill:c,r:4,stroke:l,lineWidth:2,pointerEvents:"none"},n)})}));for(const e of o)t.appendChild(e);t.markers=o}(t,{data:N,style:e,theme:E})}const Y=null===(n=N[0])||void 0===n?void 0:n[0].x,q=null!=Y?Y:W(focus);h.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},H),{data:{x:nT(o.x,q,!0)}})}))}),d,{leading:p,trailing:g}),G=e=>{K$({root:t,single:b,emitter:h,event:e})},H=()=>{Q$({root:t,single:b})},Y=e=>{var n,{nativeEvent:r,data:i,offsetX:s,offsetY:c}=e,l=Le(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;const u=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.x,f=o.x.map(u),[h,d]=a.map([f,.5]),p=t.getRenderBounds(),g=p.min[0],v=p.min[1];W(Object.assign(Object.assign({},l),{offsetX:void 0!==s?s:g+h,offsetY:void 0!==c?c:v+d,_x:u}))},q=()=>{K$({root:t,single:b,emitter:h,nativeEvent:!1})},V=()=>{Z(),H()},U=()=>{X()},X=()=>{_||(t.addEventListener("pointerdown",W),t.addEventListener("pointerenter",W),t.addEventListener("pointermove",W),t.addEventListener("pointerleave",(e=>{p$(t,e)||G(e)})),t.addEventListener("pointerup",G))},Z=()=>{_||(t.removeEventListener("pointerdown",W),t.removeEventListener("pointerenter",W),t.removeEventListener("pointermove",W),t.removeEventListener("pointerleave",G),t.removeEventListener("pointerup",G))};return X(),h.on("tooltip:show",Y),h.on("tooltip:hide",q),h.on("tooltip:disable",V),h.on("tooltip:enable",U),()=>{Z(),h.off("tooltip:show",Y),h.off("tooltip:hide",q),h.off("tooltip:disable",V),h.off("tooltip:enable",U),A?K$({root:t,single:b,emitter:h,nativeEvent:!1}):H()}}function pW(t,{elements:e,coordinate:n,scale:r,render:i,groupName:o,sort:a,filter:s,emitter:c,wait:l=50,leading:u=!0,trailing:f=!1,groupKey:h=t=>t,single:d=!0,position:p,enterable:g,datum:v,view:y,mount:m,bounding:b,theme:x,offset:w,shared:k=!1,body:M=!0,disableNative:E=!1,preserve:O=!1,css:_={}}){const S=e(t),A=Jn(S,h),T=at((e=>{const l=fW({root:t,event:e,elements:S,coordinate:n,scale:r,shared:k});if(!l)return void K$({root:t,single:d,emitter:c,event:e});const u=h(l),f=A.get(u);if(!f)return;const v=1!==f.length||k?nW(f,r,o,void 0,x):function(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(Zo).map((e=>{var{color:n=tW(t)}=e,r=Le(e,["color"]);return Object.assign(Object.assign({},r),{color:n})})).map(J$);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}(f[0]);if(a&&v.items.sort(((t,e)=>a(t)-a(e))),s&&(v.items=v.items.filter(s)),uW(v))return void K$({root:t,single:d,emitter:c,event:e});const{offsetX:E,offsetY:O}=e;M&&Z$({root:t,data:v,x:E,y:O,render:i,event:e,single:d,position:p,enterable:g,mount:m,bounding:b,css:_,offset:w}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},v),{data:Go(l,y)})}))}),l,{leading:u,trailing:f}),P=e=>{K$({root:t,single:d,emitter:c,event:e})},N=()=>{E||(t.addEventListener("pointerdown",T),t.addEventListener("pointermove",T),t.addEventListener("pointerleave",P),t.addEventListener("pointerup",P))},C=()=>{E||(t.removeEventListener("pointerdown",T),t.removeEventListener("pointermove",T),t.removeEventListener("pointerleave",P),t.removeEventListener("pointerup",P))},L=({nativeEvent:e,offsetX:n,offsetY:r,data:i})=>{if(e)return;const{data:o}=i,a=C$(S,o,v);if(!a)return;const s=a.getBBox(),{x:c,y:l,width:u,height:f}=s,h=t.getBBox();T({target:a,offsetX:void 0!==n?n+h.x:c+u/2,offsetY:void 0!==r?r+h.y:l+f/2})},j=({nativeEvent:e}={})=>{e||K$({root:t,single:d,emitter:c,nativeEvent:!1})};return c.on("tooltip:show",L),c.on("tooltip:hide",j),c.on("tooltip:enable",(()=>{N()})),c.on("tooltip:disable",(()=>{C(),Q$({root:t,single:d})})),N(),()=>{C(),c.off("tooltip:show",L),c.off("tooltip:hide",j),O?K$({root:t,single:d,emitter:c,nativeEvent:!1}):Q$({root:t,single:d})}}function gW(t){const{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:i,series:o,name:a,item:s=()=>({}),facet:c=!1}=t,l=Le(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,a,u)=>{const{container:f,view:h}=t,{scale:d,markState:p,coordinate:g,theme:v}=h,y=cW(p,"seriesTooltip"),m=cW(p,"crosshairs"),b=h$(f),x=lW(o,y),w=lW(n,m);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 dW(b,Object.assign(Object.assign({},l),{theme:v,elements:l$,scale:d,coordinate:g,crosshairs:w,crosshairsX:lW(lW(r,n),!1),crosshairsY:lW(i,w),item:s,emitter:u}));if(x&&c){const e=a.filter((e=>e!==t&&e.options.parentKey===t.options.key)),o=u$(t,a),c=e[0].view.scale,f=b.getBounds(),h=f.min[0],d=f.min[1];return Object.assign(c,{facet:!0}),dW(b.parentNode.parentNode,Object.assign(Object.assign({},l),{theme:v,elements:()=>o,scale:c,coordinate:g,crosshairs:lW(n,m),crosshairsX:lW(lW(r,n),!1),crosshairsY:lW(i,w),item:s,startX:h,startY:d,emitter:u}))}return pW(b,Object.assign(Object.assign({},l),{datum:m$(h),elements:l$,scale:d,coordinate:g,groupKey:e?t=>t.__data__.x:void 0,item:s,emitter:u,view:h,theme:v,shared:e}))}}F$.props={reapplyWhenUpdate:!0},z$.props={reapplyWhenUpdate:!0},$$.props={reapplyWhenUpdate:!0},G$.props={reapplyWhenUpdate:!0},H$.props={reapplyWhenUpdate:!0},Y$.props={reapplyWhenUpdate:!0},q$.props={reapplyWhenUpdate:!0},gW.props={reapplyWhenUpdate:!0};const vW="legend-category";function yW(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function mW(t){return t.getElementsByClassName("legend-category-item-label")[0]}function bW(t){return t.getElementsByClassName("items-item")}function xW(t){return t.getElementsByClassName(vW)}function wW(t){return t.getElementsByClassName("legend-continuous")}function kW(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function MW(t,{legend:e,channel:n,value:r,ordinal:i,channels:o,allChannels:a,facet:s=!1}){return Re(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(o.map((t=>[t,{domain:c.scale[t].getOptions().domain}])));return Q({},t,Object.assign(Object.assign({transform:f,scale:h},!i&&{animate:!1}),{legend:!s&&Object.fromEntries(a.map((t=>[t,{preserve:!0}])))}))}));return Object.assign(Object.assign({},t),{marks:l})})),yield l()}))}function EW(t,e){for(const n of t)MW(n,Object.assign(Object.assign({},e),{facet:!0}))}function OW(){return(t,e,n)=>{const{container:r}=t,i=e.filter((e=>e!==t)),o=i.length>0,a=t=>kW(t).scales.map((t=>t.name)),s=[...xW(r),...wW(r)],c=s.flatMap(a),l=at(o?EW:MW,50,{trailing:!0}),u=s.map((e=>{const{name:s,domain:u}=kW(e).scales[0],f={legend:e,channel:s,channels:a(e),allChannels:c};return e.className===vW?function(t,{legends:e,marker:n,label:r,datum:i,filter:o,emitter:a,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:Qo(h,"marker")},p={unselected:Qo(h,"label")},{setState:g,removeState:v}=M$(d,void 0),{setState:y,removeState:m}=M$(p,void 0),b=Array.from(e(t));let x=b.map(i);const w=()=>{for(const t of b){const e=i(t),o=n(t),a=r(t);x.includes(e)?(v(o,"unselected"),m(a,"unselected")):(g(o,"unselected"),y(a,"unselected"))}};for(const e of b){const n=()=>{P$(t,"pointer")},r=()=>{N$(t)},c=t=>Re(this,void 0,void 0,(function*(){const n=i(e),r=x.indexOf(n);-1===r?x.push(n):x.splice(r,1),yield o(x),w();const{nativeEvent:c=!0}=t;c&&(x.length===b.length?a.emit("legend:reset",{nativeEvent:c}):a.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 k=t=>Re(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 o(x),w())})),M=t=>Re(this,void 0,void 0,(function*(){const{nativeEvent:e}=t;e||(x=b.map(i),yield o(x),w())}));return a.on("legend:filter",k),a.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)),a.off("legend:filter",k),a.off("legend:reset",M)}}(r,{legends:bW,marker:yW,label:mW,datum:t=>{const{__data__:e}=t,{index:n}=e;return u[n]},filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});l(o?i:t,n)},state:e.attributes.state,channel:s,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:i}){const o=({detail:{value:t}})=>{n(t),r.emit({nativeEvent:!0,data:{channel:i,values:t}})};return e.addEventListener("valuechange",o),()=>{e.removeEventListener("valuechange",o)}}(0,{legend:e,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!1});l(o?i:t,n)},emitter:n,channel:s})}));return()=>{u.forEach((t=>t()))}}}function _W(){return(t,e,n)=>{const{container:r,view:i,options:o}=t,a=xW(r),s=l$(r),c=t=>kW(t).scales[0].name,l=t=>{const{scale:{[t]:e}}=i;return e},u=O$(o,["active","inactive"]),f=_$(s,m$(i)),h=[];for(const t of a){const e=e=>{const{data:n}=t.attributes,{__data__:r}=e,{index:i}=r;return n[i].label},r=c(t),i=bW(t),o=l(r),a=Jn(s,(t=>o.invert(t.__data__[r]))),{state:d={}}=t.attributes,{inactive:p={}}=d,{setState:g,removeState:v}=M$(u,f),y={inactive:Qo(p,"marker")},m={inactive:Qo(p,"label")},{setState:b,removeState:x}=M$(y),{setState:w,removeState:k}=M$(m),M=t=>{for(const e of i){const n=yW(e),r=mW(e);e===t||null===t?(x(n,"inactive"),k(r,"inactive")):(b(n,"inactive"),w(r,"inactive"))}},E=(t,i)=>{const o=e(i),c=new Set(a.get(o));for(const t of s)c.has(t)?g(t,"active"):g(t,"inactive");M(i);const{nativeEvent:l=!0}=t;l&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:l,data:{channel:r,value:o}}))},O=new Map;for(const t of i){const e=e=>{E(e,t)};t.addEventListener("pointerover",e),O.set(t,e)}const _=t=>{for(const t of s)v(t,"inactive","active");M(null);const{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},S=t=>{const{nativeEvent:n,data:o}=t;if(n)return;const{channel:a,value:s}=o;if(a!==r)return;const c=i.find((t=>e(t)===s));c&&E({nativeEvent:!1},c)},A=t=>{const{nativeEvent:e}=t;e||_({nativeEvent:!1})};t.addEventListener("pointerleave",_),n.on("legend:highlight",S),n.on("legend:unhighlight",A);const T=()=>{t.removeEventListener(_),n.off("legend:highlight",S),n.off("legend:unhighlight",A);for(const[t,e]of O)t.removeEventListener(e)};h.push(T)}return()=>h.forEach((t=>t()))}}function SW(t,e){const[n,r,i,o]=t,[a,s,c,l]=e;return!(a>i||c<n||s>o||l<r)}function AW(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function TW(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const PW=Py((t=>{const e=t.attributes,{x:n,y:r,width:i,height:o,class:a,renders:s={},handleSize:c=10,document:l}=e,u=Le(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||void 0===i||void 0===o||void 0===n||void 0===r)return;const f=c/2,h=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));const{handle:r}=t;return r.attr(e),r},d=Qo(ta(u,"handleNW","handleNE"),"handleN"),{render:p=h}=d,g=Le(d,["render"]),v=Qo(u,"handleE"),{render:y=h}=v,m=Le(v,["render"]),b=Qo(ta(u,"handleSE","handleSW"),"handleS"),{render:x=h}=b,w=Le(b,["render"]),k=Qo(u,"handleW"),{render:M=h}=k,E=Le(k,["render"]),O=Qo(u,"handleNW"),{render:_=h}=O,S=Le(O,["render"]),A=Qo(u,"handleNE"),{render:T=h}=A,P=Le(A,["render"]),N=Qo(u,"handleSE"),{render:C=h}=N,L=Le(N,["render"]),j=Qo(u,"handleSW"),{render:R=h}=j,I=Le(j,["render"]),D=t=>()=>{const e=Py((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=uy(t).attr("className",a).style("transform",`translate(${n}, ${r})`).style("draggable",!0);B.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(TW,Object.assign(Object.assign({width:i,height:o},ta(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(TW,g),B.maybeAppend("handle-e",D(y)).style("x",i-f).style("y",f).style("width",c).style("height",o-c).style("fill","transparent").call(TW,m),B.maybeAppend("handle-s",D(x)).style("x",f).style("y",o-f).style("width",i-c).style("height",c).style("fill","transparent").call(TW,w),B.maybeAppend("handle-w",D(M)).style("x",-f).style("y",f).style("width",c).style("height",o-c).style("fill","transparent").call(TW,E),B.maybeAppend("handle-nw",D(_)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(TW,S),B.maybeAppend("handle-ne",D(T)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(TW,P),B.maybeAppend("handle-se",D(C)).style("x",i-f).style("y",o-f).style("width",c).style("height",c).style("fill","transparent").call(TW,L),B.maybeAppend("handle-sw",D(R)).style("x",-f).style("y",o-f).style("width",c).style("height",c).style("fill","transparent").call(TW,I)}));function NW(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:o=()=>{},brushupdated:a=()=>{},extent:s=AW(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=Le(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let g=null,v=null,y=null,m=null,b=null,x=!1;const[w,k,M,E]=s;P$(t,"crosshair"),t.style.draggable=!0;const O=(t,e,n)=>{if(o(n),m&&m.remove(),b&&b.remove(),g=[t,e],l)return _();S()},_=()=>{b=new Gg({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:h,pointerEvents:"none"})}),m=new PW({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},S=()=>{m=new PW({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:h,draggable:!0}),className:"mask"}),t.appendChild(m)},A=(t=!0)=>{m&&m.remove(),b&&b.remove(),g=null,v=null,y=null,x=!1,m=null,b=null,r(t)},T=(t,e,r=!0)=>{const[i,o,a,u]=function(t,e,n,r,i){const[o,a,s,c]=i;return[Math.max(o,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[f,h,d,p]=c(i,o,a,u,s);return l?N(f,h,d,p):P(f,h,d,p),n(f,h,d,p,r),[f,h,d,p]},P=(t,e,n,r)=>{m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},N=(t,e,n,r)=>{b.style.d=`\n M${w},${k}L${M},${k}L${M},${E}L${w},${E}Z\n M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z\n `,m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},C={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},L=t=>R(t)||j(t),j=t=>{const{id:e}=t;return-1!==d.indexOf(e)&&new Set(Object.keys(C)).has(e)},R=t=>t===m.getElementById("selection"),I=e=>{const{target:n}=e,[r,i]=g$(t,e);if(!m||!L(n))return O(r,i,e),void(x=!0);L(n)&&(y=[r,i])},D=e=>{const{target:n}=e,r=g$(t,e);if(!g)return;if(!y)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]-y[0],r=t[1]-y[1],i=e(n,g[0],v[0],w,M),o=e(r,g[1],v[1],k,E),a=[g[0]+i,g[1]+o],s=[v[0]+i,v[1]+o];T(a,s)})(r);const[i,o]=[r[0]-y[0],r[1]-y[1]],{id:a}=n;if(C[a]){const[t,e,n,r]=C[a].vector;return T([g[0]+i*t,g[1]+o*e],[v[0]+i*n,v[1]+o*r])}},B=e=>{if(y){y=null;const{x:t,y:n,width:r,height:i}=m.style;return g=[t,n],v=[t+r,n+i],void a(t,n,t+r,n+i,e)}v=g$(t,e);const[n,r,o,s]=T(g,v);x=!1,i(n,r,o,s,e)},F=t=>{const{target:e}=t;m&&!L(e)&&A()},z=e=>{const{target:n}=e;m&&L(n)&&!x?R(n)?P$(t,"move"):j(n)&&P$(t,C[n.id].cursor):P$(t,"crosshair")},$=()=>{P$(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",$),{mask:m,move(t,e,n,r,i=!0){m||O(t,e,{}),g=[t,e],v=[n,r],T([t,e],[n,r],i)},remove(t=!0){m&&A(t)},destroy(){m&&A(!1),P$(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",$)}}}function CW(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 LW(t,e,n){return CW(t,e,n).map((t=>t.options))}function jW(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:o,brushRegion:a,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:h=t=>t,bboxOf:d=t=>{const{x:e,y:n,width:r,height:i}=t.style;return{x:e,y:n,width:r,height:i}},state:p={},emitter:g}=e,v=Le(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(t),m=i(t),b=m.flatMap(n),x=_$(y,o),w=Qo(v,"mask"),{setState:k,removeState:M}=M$(p,x),E=new Map,{width:O,height:_,x:S=0,y:A=0}=d(t),T=s||[0,0,O,_],P=()=>{for(const t of[...y,...b])M(t,"active","inactive")},N=(t,e,n,r)=>{var i;for(const t of m)null===(i=t.brush)||void 0===i||i.remove();const o=new Set;for(const i of y){const{min:a,max:s}=i.getLocalBounds(),[c,l]=a,[u,f]=s;SW([c,l,u,f],[t,e,n,r])?(k(i,"active"),o.add(h(i))):k(i,"inactive")}for(const t of b)o.has(h(t))?k(t,"active"):k(t,"inactive")},C=()=>{for(const t of y)M(t,"inactive");for(const t of E.values())t.remove();E.clear()},L=(e,n,r,i)=>{const o=t=>{const e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),E.set(t,e),e},a=new Ug({style:{x:e+S,y:n+A,width:r-e,height:i-n}});t.appendChild(a);for(const t of y){const e=E.get(t)||o(t);e.style.clipPath=a,k(t,"inactive"),k(e,"active")}},j=NW(t,Object.assign(Object.assign({},w),{extent:T,brushRegion:a,reverse:c,selectedHandles:r,brushended:t=>{const e=f?C:P;t&&g.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{const o=iT(t,e,n,r,l,u);i&&g.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}});(f?L:N)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{const o=iT(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushupdated:(t,e,n,r,i)=>{const o=iT(t,e,n,r,l,u);g.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushstarted:t=>{g.emit("brush:start",t)}})),R=({nativeEvent:t,data:e})=>{if(t)return;const{selection:n}=e,[r,i,o,a]=function(t,e,n){const{x:r,y:i}=e,[o,a]=t,s=oT(o,r),c=oT(a,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,h]=n.map(l),[d,p]=n.map(u);return[f,h,d,p]}(n,l,u);j.move(r,i,o,a,!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 RW(t){var{facet:e,brushKey:n}=t,r=Le(t,["facet","brushKey"]);return(t,i,o)=>{const{container:a,view:s,options:c}=t,l=h$(a),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:d}=s;if(e){const e=l.getBounds(),n=e.min[0],a=e.min[1],s=e.max[0],c=e.max[1];return jW(l.parentNode.parentNode,Object.assign(Object.assign({elements:()=>u$(t,i),datum:m$(f$(t,i).map((t=>t.view))),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,s,c],state:O$(f$(t,i).map((t=>t.options)),f),emitter:o,scale:h,coordinate:d,selectedHandles:void 0},u),r))}const p=jW(l,Object.assign(Object.assign({elements:l$,key:t=>t.__data__.key,siblings:()=>function(t,e,n){return CW(t,e,n).map((t=>h$(t.container)))}(t,i,n),datum:m$([s,...CW(t,i,n).map((t=>t.view))]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:O$([c,...LW(t,i,n)],f),emitter:o,scale:h,coordinate:d,selectedHandles:void 0},u),r));return l.brush=p,()=>p.destroy()}}function IW(t,e,n,r,i){const[,o,,a]=i;return[t,o,n,a]}function DW(t){return RW(Object.assign(Object.assign({},t),{brushRegion:IW,selectedHandles:["handle-e","handle-w"]}))}function BW(t,e,n,r,i){const[o,,a]=i;return[o,e,a,r]}function FW(t){return RW(Object.assign(Object.assign({},t),{brushRegion:BW,selectedHandles:["handle-n","handle-s"]}))}const zW="axis-hot-area";function $W(t){return t.getElementsByClassName("axis")}function WW(t){return t.getElementsByClassName("axis-line")[0]}function GW(t){return function(t){return t.getElementsByClassName("axis-main-group")[0]}(t).getLocalBounds()}function HW(t,e){var{cross:n,offsetX:r,offsetY:i}=e,o=Le(e,["cross","offsetX","offsetY"]);const a=GW(t),s=WW(t),[c]=s.getLocalBounds().min,[l,u]=a.min,[f,h]=a.max,d=2*(f-l);return{brushRegion:BW,hotZone:new Ug({className:zW,style:Object.assign({width:n?d/2:d,transform:`translate(${(n?l:c-d/2).toFixed(2)}, ${u})`,height:h-u},o)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,i)=>[Math.floor(l-r),e,Math.ceil(f-r),i]}}function YW(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,o=Le(e,["offsetY","offsetX","cross"]);const a=GW(t),s=WW(t),[,c]=s.getLocalBounds().min,[l,u]=a.min,[f,h]=a.max,d=h-u;return{brushRegion:IW,hotZone:new Ug({className:zW,style:Object.assign({width:f-l,height:i?d:2*d,transform:`translate(${l}, ${i?u:c-d})`},o)}),extent:i?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,i)=>[t,Math.floor(u-n),r,Math.ceil(h-n)]}}function qW(t){return(e,n,r)=>{const{container:i,view:o,options:a}=e,s=h$(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=o;return function(t,e){var{axes:n,elements:r,points:i,horizontal:o,datum:a,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:h}=e,d=Le(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),g=n(t),v=_$(p,a),{setState:y,removeState:m}=M$(u,v),b=new Map,x=Qo(d,"mask"),w=t=>Array.from(b.values()).every((([e,n,r,i])=>t.some((([t,o])=>t>=e&&t<=r&&o>=n&&o<=i)))),k=g.map((t=>t.attributes.scale)),M=t=>t.length>2?[t[0],t[t.length-1]]:t,E=new Map,O=()=>{E.clear();for(let t=0;t<g.length;t++){const e=k[t],{domain:n}=e.getOptions();E.set(t,M(n))}};O();const _=(t,e)=>{const n=[];for(const t of p){const e=i(t);w(e)?(y(t,"active"),n.push(t)):y(t,"inactive")}E.set(t,A(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!T)return Array.from(E.values());const t=[];for(const[e,n]of E){const r=k[e],{name:i}=r.getOptions();"x"===i?t[0]=n:t[1]=n}return t})()}})},S=t=>{for(const t of p)m(t,"active","inactive");O(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},A=(t,e)=>{const n=k[e],{name:r}=n.getOptions(),i=t.map((t=>{const e=t.__data__;return n.invert(e[r])}));return M(rT(n,i))},T=g.some(o)&&g.some((t=>!o(t))),P=[];for(let t=0;t<g.length;t++){const e=g[t],n=o(e)?YW:HW,{hotZone:r,brushRegion:i,extent:a}=n(e,{offsetY:s,offsetX:c,cross:T,zIndex:999,fill:"transparent"});e.parentNode.appendChild(r);const u=NW(r,Object.assign(Object.assign({},x),{reverse:l,brushRegion:i,brushended(n){b.delete(e),0===Array.from(b.entries()).length?S(n):_(t,n)},brushed(n,r,i,o,s){b.set(e,a(n,r,i,o)),_(t,s)}}));P.push(u)}const N=(t={})=>{const{nativeEvent:e}=t;e||P.forEach((t=>t.remove(!1)))},C=(t,e,n)=>{const[r,i]=t,a=L(r,e,n),s=L(i,e,n)+(t=>t.getStep?t.getStep():0)(e);return o(n)?[a,-1/0,s,1/0]:[-1/0,a,1/0,s]},L=(t,e,n)=>{const{height:r,width:i}=h.getOptions(),a=e.clone();return o(n)?a.update({range:[0,i]}):a.update({range:[r,0]}),a.map(t)},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=k[t];r.move(...C(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",N),f.on("brushAxis:highlight",j),()=>{P.forEach((t=>t.destroy())),f.off("brushAxis:remove",N),f.off("brushAxis:highlight",j)}}(i,Object.assign({elements:l$,axes:$W,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:m$(o),state:O$(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}function VW(t){var{hideX:e=!0,hideY:n=!0}=t,r=Le(t,["hideX","hideY"]);return(t,i,o)=>{const{container:a,view:s,options:c,update:l,setState:u}=t,f=h$(a);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:o,reverse:a,emitter:s,scale:c,coordinate:l,selection:u,series:f=!1}=e;const h=Qo(Le(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:d,height:p}=t.getBBox(),g=o||[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)}}(),y=NW(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:a,brushcreated:function(t,e,r,i,o){t===r&&e===i||(o.nativeEvent=!0,n(u(t,e,r,i),o),y.remove())}}));function m(t){v(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",m);const b=({nativeEvent:t,data:e})=>{if(t)return;const{selection:r}=e;n(r,{nativeEvent:!1})};return s.on("brush:filter",b),()=>{y.destroy(),s.off("brush:filter",b),t.removeEventListener("click",m)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{const{scale:i,coordinate:o}=p;return iT(t,e,n,r,i,o)},filter:(t,r)=>Re(this,void 0,void 0,(function*(){if(d)return;d=!0;const[i,a]=t;u("brushFilter",(t=>{const{marks:r}=t,o=r.map((t=>Q({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:i,nice:!1},y:{domain:a,nice:!1}}})));return Object.assign(Object.assign({},c),{marks:o,clip:!0})})),o.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[i,a]}}));const s=yield l();p=s.view,d=!1,h=!0})),reset:t=>{if(d||!h)return;const{scale:e}=s,{x:n,y:r}=e,i=n.getOptions().domain,a=r.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[i,a]}})),h=!1,p=s,u("brushFilter"),l()},extent:void 0,emitter:o,scale:g,coordinate:v},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function UW(t){return VW(Object.assign(Object.assign({hideX:!0},t),{brushRegion:IW}))}function XW(t){return VW(Object.assign(Object.assign({hideY:!0},t),{brushRegion:BW}))}function ZW(t,e,n,r=!1,i="x",o="y"){const{marks:a}=t,s=a.map((t=>{var a,s;return Q({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:e,[n]:Object.assign(Object.assign({},(null===(a=t[n])||void 0===a?void 0:a[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),(null===(s=t[n])||void 0===s?void 0:s[o])&&{[o]:{preserve:!0}}),animate:!1})}));return Object.assign(Object.assign({},t),{marks:s,clip:!0,animate:!1})}function KW(t,e,n){const[r,i]=t,o=n?t=>1-t:t=>t;return rT(e,[nT(e,o(r),!0),nT(e,o(i),!1)])}function QW(t){return[t[0],t[t.length-1]]}function JW({initDomain:t={},className:e="slider",prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:i=!1,wait:o=50,leading:a=!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 y=!1;const{scale:m,coordinate:b,layout:x}=d,{paddingLeft:w,paddingTop:k,paddingBottom:M,paddingRight:E}=x,{x:O,y:_}=m,S=Kc(b),A=t=>{const e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return S?[n,e]:[e,n]},T=new Map,P=new Set,N={x:t.x||O.getOptions().domain,y:t.y||_.getOptions().domain};for(const t of v){const{orientation:e}=t.attributes,[l,u]=A(e),h=`${n}${G(l)}:filter`,d="x"===l,{ratio:v}=O.getOptions(),{ratio:b}=_.getOptions(),x=t=>{if(t.data){const{selection:e}=t.data,[n=QW(N.x),r=QW(N.y)]=e;return d?[rT(O,n,v),rT(_,r,b)]:[rT(_,r,b),rT(O,n,v)]}const{value:n}=t.detail;return[KW(n,m[l],S&&"horizontal"===e),N[u]]},C=at((e=>Re(this,void 0,void 0,(function*(){const{initValue:r=!1}=e;if(y&&!r)return;y=!0;const{nativeEvent:o=!0}=e,[a,s]=x(e);if(N[l]=a,N[u]=s,o){const t=d?a:s,n=d?s:a;f.emit(h,Object.assign(Object.assign({},e),{nativeEvent:o,data:{selection:[QW(t),QW(n)]}}))}g(t,(t=>Object.assign(Object.assign({},ZW(t,{[l]:{domain:a,nice:!1}},n,i,l,u)),{paddingLeft:w,paddingTop:k,paddingBottom:M,paddingRight:E}))),yield p(),y=!1}))),o,{leading:a,trailing:s}),L=e=>{const{nativeEvent:n}=e;if(n)return;const{data:i}=e,{selection:o}=i,[a,s]=o;t.dispatchEvent(new Np("valuechange",{data:i,nativeEvent:!1}));const c=d?oT(a,O):oT(s,_);r(t,c)};f.on(h,L),t.addEventListener("valuechange",C),T.set(t,C),P.add([h,L]);const j=c(t);j&&t.dispatchEvent(new Np("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 tG="g2-scrollbar";function eG(t={}){return(e,n,r)=>{const{view:i,container:o}=e;if(!o.getElementsByClassName(tG).length)return()=>{};const{scale:a}=i,{x:s,y:c}=a,l={x:[...s.getOptions().domain],y:[...c.getOptions().domain]};s.update({domain:s.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain});return JW(Object.assign(Object.assign({},t),{initDomain:l,className:tG,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 nG(t,e,n){return`<${t} style="${Object.entries(n).map((([t,e])=>`${function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}(t)}:${e}`)).join(";")}">${e}</${t}>`}const rG={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 iG(t){return"text"===t.nodeName&&!!t.isOverflowing()}function oG(t){var{offsetX:e=8,offsetY:n=8}=t,r=Le(t,["offsetX","offsetY"]);return t=>{const{container:i}=t,[o,a]=i.getBounds().min,s=Qo(r,"tip"),c=new Set,l=t=>{const{target:r}=t;if(!iG(r))return void t.stopPropagation();const{offsetX:l,offsetY:u}=t,f=l+e-o,h=u+n-a;if(r.tip)return r.tip.style.x=f,void(r.tip.style.y=h);const{text:d}=r.style,p=new Bg({className:"poptip",style:{innerHTML:nG("div",d,Object.assign(Object.assign({},rG),s)),x:f,y:h}});i.appendChild(p),r.tip=p,c.add(p)},u=t=>{const{target:e}=t;iG(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()))}}}oG.props={reapplyWhenUpdate:!0};const aG={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function sG(t={}){const{originData:e=[],layout:n}=t,r=Le(t,["originData","layout"]),i=Q({},aG,r),o=Qo(i,"breadCrumb"),a=Qo(i,"active");return t=>{const{update:r,setState:i,container:s,options:c}=t,l=function(t){return uy(t).select(`.${GT}`).node()}(s),u=c.marks[0],{state:f}=u,h=new Ig;l.appendChild(h);const d=(t,c)=>Re(this,void 0,void 0,(function*(){if(h.removeChildren(),c){let e="",n=o.y,r=0;const i=[],s=l.getBBox().width,c=t.map(((a,c)=>{e=`${e}${a}/`,i.push(a);const l=new Zg({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:a,x:r,path:[...i],depth:c},o),{y:n})});h.appendChild(l),r+=l.getBBox().width;const u=new Zg({style:Object.assign(Object.assign({x:r,text:" / "},o),{y:n})});return h.appendChild(u),r+=u.getBBox().width,r>s&&(n=h.getBBox().height+o.y,r=0,l.attr({x:r,y:n}),r+=l.getBBox().width,u.attr({x:r,y:n}),r+=u.getBBox().width),c===lt(t)-1&&u.remove(),l}));c.forEach(((t,e)=>{if(e===lt(c)-1)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",(()=>{t.attr(a)})),t.addEventListener("mouseleave",(()=>{t.attr(n)})),t.addEventListener("click",(()=>{d(rt(t,["style","path"]),rt(t,["style","depth"]))}))}))}!function(t,e){[...xW(t),...wW(t)].forEach((t=>{e(t,(t=>t))}))}(s,i),i("treemapDrillDown",(r=>{const{marks:i}=r,o=t.join("/"),a=i.map((t=>{if("rect"!==t.type)return t;let r=e;if(c){const t=e.filter((t=>{const e=rt(t,["id"]);return e&&(e.match(`${o}/`)||o.match(e))})).map((t=>({value:0===t.height?rt(t,["value"]):void 0,name:rt(t,["id"])}))),{paddingLeft:i,paddingBottom:a,paddingRight:s}=n,l=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||h.getBBox().height+10)/(c+1),paddingLeft:i/(c+1),paddingBottom:a/(c+1),paddingRight:s/(c+1),path:t=>t.name,layer:t=>t.depth===c+1});r=n_(t,l,{value:"value"})[0]}else r=e.filter((t=>1===t.depth));const i=[];return r.forEach((({path:t})=>{i.push(j(t))})),Q({},t,{data:r,scale:{color:{domain:i}}})}));return Object.assign(Object.assign({},r),{marks:a})})),yield r(void 0,["legendFilter"])})),p=t=>{const n=t.target,{markType:r,nodeName:i,attributes:o}=n||{};if("rect"!==r&&i!==tu.TEXT)return;const a=i===tu.TEXT&&!0===rt(o,"isTreemapLabel")?(t=>t.attributes.key.split("-")[0])(n):(t=>rt(t,["__data__","key"]))(n),s=A(e,(t=>t.id===a));rt(s,"height")&&d(rt(s,"path"),rt(s,"depth"))};l.addEventListener("click",p);const g=M(Object.assign(Object.assign({},f.active),f.inactive)),v=()=>{R$(l).forEach((t=>{const n=rt(t,["style","cursor"]),r=A(e,(e=>e.id===rt(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){it.call(t,e)&&(n[e]=t[e])})),n}(t.attributes,g);t.addEventListener("mouseenter",(()=>{t.attr(f.active)})),t.addEventListener("mouseleave",(()=>{t.attr(Q(e,f.inactive))}))}}))};return v(),l.addEventListener("mousemove",v),()=>{h.remove(),l.removeEventListener("click",p),l.removeEventListener("mousemove",v)}}}const cG={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},lG="movePoint",uG=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")))},fG=t=>{const e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},hG=(t,e,n)=>{t.forEach(((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)}))},dG=(t,e,n,r)=>{const i=new Gg({style:n}),o=new Zg({style:r});return e.appendChild(o),t.appendChild(i),[i,o]},pG=(t,e)=>{if(!rt(t,["options","range","indexOf"]))return;const n=t.options.range.indexOf(e);return t.sortedDomain[n]},gG=(t,e,n)=>{const r=L$(t,e),i=L$(t,n)/r;return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]};function vG(t={}){const{selection:e=[],precision:n=2}=t,r=Le(t,["selection","precision"]),i=Object.assign(Object.assign({},cG),r||{}),o=Qo(i,"path"),a=Qo(i,"label"),s=Qo(i,"point");return(t,r,i)=>{const{update:c,setState:l,container:u,view:f,options:{marks:h,coordinate:d}}=t,p=h$(u);let g,v=R$(p),y=e;const{transform:m=[],type:b}=d,x=!!A(m,(({type:t})=>"transpose"===t)),w="polar"===b,k="theta"===b,M=!!A(v,(({markType:t})=>"area"===t));M&&(v=v.filter((({markType:t})=>"area"===t)));const E=new Ig({style:{zIndex:2}});p.appendChild(E);const O=()=>{i.emit("element-point:select",{nativeEvent:!0,data:{selection:y}})},_=t=>{const e=t.target;y=[e.parentNode.childNodes.indexOf(e)],O(),T(e)},S=t=>{const{data:{selection:e},nativeEvent:n}=t;if(n)return;y=e;const r=rt(v,[null==y?void 0:y[0]]);r&&T(r)},T=t=>{const{attributes:e,markType:r,__data__:d}=t,{stroke:p}=e,{points:v,seriesTitle:m,color:b,title:_,seriesX:S,y1:P}=d;if(x&&"interval"!==r)return;const{scale:N,coordinate:C}=(null==g?void 0:g.view)||f,{color:L,y:j,x:R}=N,I=C.getCenter();let D;E.removeChildren();const B=(t,e,n,r)=>Re(this,void 0,void 0,(function*(){return l("elementPointMove",(o=>{var a;const s=((null===(a=null==g?void 0:g.options)||void 0===a?void 0:a.marks)||h).map((o=>{if(!r.includes(o.type))return o;const{data:a,encode:s}=o,c=Object.keys(s).reduce(((r,i)=>{const o=s[i];return"x"===i&&(r[o]=t),"y"===i&&(r[o]=e),"color"===i&&(r[o]=n),r}),{}),l=((t,e,n)=>e.map((e=>{const r=["x","color"].reduce(((r,i)=>{const o=n[i];return o?e[o]===t[o]&&r:r}),!0);return r?Object.assign(Object.assign({},e),t):e})))(c,a,s);return((t,e)=>{i.emit("element-point:moved",{nativeEvent:!0,data:{changeData:t,data:e}})})(c,l),Q({},o,{data:l,animate:!1})}));return Object.assign(Object.assign({},o),{marks:s})})),yield c("elementPointMove")}));if(["line","area"].includes(r))v.forEach(((e,r)=>{const i=R.invert(S[r]);if(!i)return;const c=new Cg({name:lG,style:Object.assign({cx:e[0],cy:e[1],fill:p},s)}),l=((t,e)=>{const n=rt(t,["__data__","seriesItems",e,"0","value"]),r=rt(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:o,transform:a}}=t.parentNode,s=A(a,(({type:t})=>"normalizeY"===t)),c=rt(o,["y","field"]),l=i[r][c];return t=>s?1===n?t:t/(1-t)/(n/(1-n))*l:t})(t,r);c.addEventListener("mousedown",(f=>{const h=C.output([S[r],0]),d=null==m?void 0:m.length;u.attr("cursor","move"),y[1]!==r&&(y[1]=r,O()),hG(E.childNodes,y,s);const[p,x]=dG(E,c,o,a),k=t=>{const i=e[1]+t.clientY-D[1];if(M)if(w){const o=e[0]+t.clientX-D[0],[a,s]=gG(I,h,[o,i]),[,u]=C.output([1,j.output(0)]),[,f]=C.invert([a,u-(v[r+d][1]-s)]),g=(r+1)%d,y=j$([v[(r-1+d)%d],[a,s],m[g]&&v[g]]);x.attr("text",l(j.invert(f)).toFixed(n)),p.attr("d",y),c.attr("cx",a),c.attr("cy",s)}else{const[,t]=C.output([1,j.output(0)]),[,o]=C.invert([e[0],t-(v[r+d][1]-i)]),a=j$([v[r-1],[e[0],i],m[r+1]&&v[r+1]]);x.attr("text",l(j.invert(o)).toFixed(n)),p.attr("d",a),c.attr("cy",i)}else{const[,t]=C.invert([e[0],i]),o=j$([v[r-1],[e[0],i],v[r+1]]);x.attr("text",j.invert(t).toFixed(n)),p.attr("d",o),c.attr("cy",i)}};D=[f.clientX,f.clientY],window.addEventListener("mousemove",k);const _=()=>Re(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),window.removeEventListener("mousemove",k),u.removeEventListener("mouseup",_),Y(x.attr("text")))return;const e=Number(x.attr("text")),n=pG(L,b);g=yield B(i,e,n,["line","area"]),x.remove(),p.remove(),T(t)}));u.addEventListener("mouseup",_)})),E.appendChild(c)})),hG(E.childNodes,y,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]:k&&(e=v[0]);const i=(t=>{const e=rt(t,["__data__","y"]),n=rt(t,["__data__","y1"])-e,{__data__:{data:r,encode:i,transform:o},childNodes:a}=t.parentNode,s=A(o,(({type:t})=>"normalizeY"===t)),c=rt(i,["y","field"]),l=r[a.indexOf(t)][c];return(t,e=!1)=>s||e?t/(1-t)/(n/(1-n))*l:t})(t),c=new Cg({name:lG,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=pG(L,b),[f,h]=dG(E,c,o,a),d=t=>{if(x){const r=e[0]+t.clientX-D[0],[o]=C.output([j.output(0),j.output(0)]),[,a]=C.invert([o+(r-v[2][0]),e[1]]),s=j$([[r,v[0][1]],[r,v[1][1]],v[2],v[3]],!0);h.attr("text",i(j.invert(a)).toFixed(n)),f.attr("d",s),c.attr("cx",r)}else if(k){const r=e[1]+t.clientY-D[1],o=e[0]+t.clientX-D[0],[a,s]=gG(I,[o,r],e),[l,u]=gG(I,[o,r],v[1]),d=C.invert([a,s])[1],p=P-d;if(p<0)return;const g=function(t,e,n=0){const r=[["M",...e[1]]],i=L$(t,e[1]),o=L$(t,e[0]);return 0===i?r.push(["L",...e[3]],["A",o,o,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",o,o,0,n,1,...e[0]],["Z"]),r}(I,[[a,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",a),c.attr("cy",s)}else{const r=e[1]+t.clientY-D[1],[,o]=C.output([1,j.output(0)]),[,a]=C.invert([e[0],o-(v[2][1]-r)]),s=j$([[v[0][0],r],[v[1][0],r],v[2],v[3]],!0);h.attr("text",i(j.invert(a)).toFixed(n)),f.attr("d",s),c.attr("cy",r)}};D=[s.clientX,s.clientY],window.addEventListener("mousemove",d);const p=()=>Re(this,void 0,void 0,(function*(){if(u.attr("cursor","default"),u.removeEventListener("mouseup",p),window.removeEventListener("mousemove",d),Y(h.attr("text")))return;const e=Number(h.attr("text"));g=yield B(_,e,l,[r]),h.remove(),f.remove(),T(t)}));u.addEventListener("mouseup",p)})),E.appendChild(c)}};v.forEach(((t,e)=>{y[0]===e&&T(t),t.addEventListener("click",_),t.addEventListener("mouseenter",uG),t.addEventListener("mouseleave",fG)}));const P=t=>{const e=null==t?void 0:t.target;e&&(e.name===lG||v.includes(e))||(y=[],O(),E.removeChildren())};return i.on("element-point:select",S),i.on("element-point:unselect",P),u.addEventListener("mousedown",P),()=>{E.remove(),i.off("element-point:select",S),i.off("element-point:unselect",P),u.removeEventListener("mousedown",P),v.forEach((t=>{t.removeEventListener("click",_),t.removeEventListener("mouseenter",uG),t.removeEventListener("mouseleave",fG)}))}}}var yG={},mG={};function bG(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function xG(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 wG(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function kG(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+wG(-t,6):t>9999?"+"+wG(t,6):wG(t,4)}(t.getUTCFullYear())+"-"+wG(t.getUTCMonth()+1,2)+"-"+wG(t.getUTCDate(),2)+(i?"T"+wG(e,2)+":"+wG(n,2)+":"+wG(r,2)+"."+wG(i,3)+"Z":r?"T"+wG(e,2)+":"+wG(n,2)+":"+wG(r,2)+"Z":n||e?"T"+wG(e,2)+":"+wG(n,2)+"Z":"")}function MG(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,c=o<=0,l=!1;function u(){if(c)return mG;if(l)return l=!1,yG;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?c=!0:10===(r=t.charCodeAt(a++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(e=a++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=u())!==mG;){for(var f=[];r!==yG&&r!==mG;)f.push(r),r=u();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function o(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?kG(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=bG(t);return function(r,i){return e(n(r),i,t)}}(t,e):bG(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=xG(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=xG(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}function EG(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;OG&&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 OG=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),_G=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>Re(void 0,void 0,void 0,(function*(){const t=yield fetch(e);if("csv"===n){const e=yield t.text();return MG(r).parse(e,i?EG:Yo)}if("json"===n)return yield t.json();throw new Error(`Unknown format: ${n}.`)}))};_G.props={};const SG=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 AG(t){return null!=t&&!Number.isNaN(t)}SG.props={};const TG=t=>{const{callback:e=AG}=t;return t=>t.filter(e)};TG.props={};const PG=t=>{const{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};PG.props={};const NG=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)))};NG.props={};const CG=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)),{})))};CG.props={};const LG=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)))};LG.props={};const jG=t=>{const{value:e}=t;return()=>e};jG.props={};const RG=t=>{const{callback:e=Yo}=t;return t=>e(t)};RG.props={};const IG=t=>{const{callback:e=Yo}=t;return t=>Array.isArray(t)?t.map(e):t};IG.props={};const DG=Math.PI/180,BG=2048;function FG(t){return t.text}function zG(){return"serif"}function $G(){return"normal"}function WG(t){return t.value}function GG(){return 90*~~(2*Math.random())}function HG(){return 1}function YG(){}function qG(t,e,n,r){if(e.sprite)return;const i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,BG/o);let a=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,l=e.size<<1;if(e.rotate){const n=Math.sin(e.rotate*DG),r=Math.cos(e.rotate*DG),i=t*r,o=t*n,a=l*r,s=l*n;t=Math.max(Math.abs(i+s),Math.abs(i-s))+31>>5<<5,l=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(l>c&&(c=l),a+t>=2048&&(a=0,s+=c,c=0),s+l>=BG)break;i.translate((a+(t>>1))/o,(s+(l>>1))/o),e.rotate&&i.rotate(e.rotate*DG),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=l,e.xoff=a,e.yoff=s,e.x1=t>>1,e.y1=l>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}const u=i.getImageData(0,0,2048/o,BG/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;const t=e.width,i=t>>5;let o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(a=e.xoff,null==a)return;s=e.yoff;let c=0,l=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){const t=i*n+(e>>5),r=u[2048*(s+n)+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,c|=r}c?l=n:(e.y0++,o--,n--,s++)}e.y1=e.y0+l,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}function VG(t,e,n){n>>=5;const r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,s=32-a,c=t.y1-t.y0;let l,u=(t.y+t.y0)*n+(o>>5);for(let t=0;t<c;t++){l=0;for(let n=0;n<=i;n++)if((l<<s|(n<i?(l=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}function UG(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 XG(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function ZG(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function KG(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function QG(){return document.createElement("canvas")}function JG(t){return"function"==typeof t?t:function(){return t}}const tH={archimedean:ZG,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 eH(){let t=[256,256],e=FG,n=zG,r=WG,i=$G,o=GG,a=HG,s=ZG,c=Math.random,l=YG,u=[],f=null,h=1/0,d=QG;const p=$G,g={};function v(e,n,r){const i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=s(t),u=c()<.5?1:-1;let f,h,d,p=-u;for(;(f=l(p+=u))&&(h=~~f[0],d=~~f[1],!(Math.min(Math.abs(h),Math.abs(d))>=a));)if(n.x=i+h,n.y=o+d,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||!VG(n,e,t[0]))&&(!r||XG(n,r))){const r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),s=127&a,c=32-s,l=n.y1-n.y0;let u,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<l;t++){u=0;for(let n=0;n<=i;n++)e[f+n]|=u<<c|(n<i?(u=r[t*i+n])>>>s:0);f+=o}return delete n.sprite,!0}return!1}return g.start=function(){const[s,y]=t,m=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=BG/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:KG((t[0]>>5)*t[1]),x=u.length,w=[],k=u.map((function(t,s,c){return t.text=e.call(this,t,s,c),t.font=n.call(this,t,s,c),t.style=p.call(this,t,s,c),t.weight=i.call(this,t,s,c),t.rotate=o.call(this,t,s,c),t.size=~~r.call(this,t,s,c),t.padding=a.call(this,t,s,c),t})).sort((function(t,e){return e.size-t.size}));let M=-1,E=g.board?[{x:0,y:0},{x:s,y:y}]:void 0;function O(){const e=Date.now();for(;Date.now()-e<h&&++M<x;){const e=k[M];e.x=s*(c()+.5)>>1,e.y=y*(c()+.5)>>1,qG(m,e,k,M),e.hasText&&v(b,e,E)&&(l.call(null,"word",{cloud:g,word:e}),w.push(e),E?g.hasImage||UG(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}g._tags=w,g._bounds=E,M>=x&&(g.stop(),l.call(null,"end",{cloud:g,words:w,bounds:E}))}return f&&clearInterval(f),f=setInterval(O,0),O(),g},g.stop=function(){return f&&(clearInterval(f),f=null),g},g.createMask=e=>{const n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;const o=r>>5,a=KG((r>>5)*i);n.width=r,n.height=i;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,i);const c=s.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=o*t+(e>>5),i=t*r+e<<2,s=c[i]>=250&&c[i+1]>=250&&c[i+2]>=250?1<<31-e%32:0;a[n]|=s}g.board=a,g.hasImage=!0},g.timeInterval=function(t){h=null==t?1/0:t},g.words=function(t){u=t},g.size=function(e=[]){t=[+e[0],+e[1]]},g.text=function(t){e=JG(t)},g.font=function(t){n=JG(t)},g.fontWeight=function(t){i=JG(t)},g.rotate=function(t){o=JG(t)},g.canvas=function(t){d=JG(t)},g.spiral=function(t){s=tH[t]||t},g.fontSize=function(t){r=JG(t)},g.padding=function(t){a=JG(t)},g.random=function(t){c=JG(t)},g.on=function(t){l=JG(t)},g}const nH={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return 30*(~~(6*Math.random())-3)}};function rH(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 iH=(t,e)=>n=>Re(void 0,void 0,void 0,(function*(){const r=Object.assign({},nH,t,{canvas:e.createCanvas}),i=eH();var o,a;yield(o=i,a=r,{set(t,e,n){if(void 0===a[t])return this;const r=e?e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof o[t]?o[t](r):o[t]=r,this},setAsync(t,e,n){return Re(this,void 0,void 0,(function*(){if(void 0===a[t])return this;const r=e?yield e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof o[t]?o[t](r):o[t]=r,this}))}}).set("fontSize",(t=>{const e=n.map((t=>t.value));return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[i,o]=e;return o===i?()=>(r+n)/2:({value:t})=>(r-n)/(o-i)*(t-i)+n}return()=>t}(t,[mr(e),vr(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",rH,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=Le(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:y,y:m}]=f,b={text:"",value:0,opacity:0,fontSize:0};return p.push(Object.assign(Object.assign({},b),{x:d?0:g,y:d?0:v}),Object.assign(Object.assign({},b),{x:d?c:y,y:d?l:m})),p}));function oH(t){return"string"==typeof t?e=>e[t]:t}iH.props={};const aH=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:o=NaN}=t,[a,s]=n,c=oH(s),l=oH(a),u=er(e,(([t])=>t),(t=>c(t)));return t=>t.map((t=>{const e=u.get(l(t));return Object.assign(Object.assign({},t),r.reduce(((t,n,r)=>(t[i[r]]=e?e[n]:o,t)),{}))}))};aH.props={};const sH=t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)};sH.props={};var cH={exports:{}},lH={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}}(lH),function(t){var e=Math.log(2),n=t.exports,r=lH.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,o=r.isNumber(e.width)?e.width:2,a=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)/(a-1);return n&&(s-=2*o*l),i&&(c+=2*o*l),{min:s,max:c}},t.exports.create=function(t,e){if(e=e||{},!t||0===t.length)return[];var o=r.isNumber(e.size)?e.size:50,a=r.isNumber(e.width)?e.width:2,s=n.getUnifiedMinMax(t,{size:o,width:a,min:e.min,max:e.max}),c=s.min,l=s.max-c,u=l/(o-1);if(0===l)return[{x:c,y:1}];for(var f=[],h=0;h<o;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,a),p=d[a],g=d[a-1]-d[a-2],v=0;t.forEach((function(t){var e=function(t){return Math.floor((t-c)/u)}(t);if(!(e+a<0||e-a>=f.length)){var n=Math.max(e-a,0),i=e,o=Math.min(e+a,f.length-1),s=n-(e-a),l=e+a-o,h=d[-a-1+s]||0,y=d[-a-1+l]||0,m=p/(p-h-y);s>0&&(v+=m*(s-1)*g);var b=Math.max(0,e-a+1);r.inside(0,f.length-1,b)&&(f[b].y+=1*m*g),r.inside(0,f.length-1,i+1)&&(f[i+1].y-=2*m*g),r.inside(0,f.length-1,o+1)&&(f[o+1].y+=1*m*g)}}));var y=v,m=0,b=0;return f.forEach((function(t){m+=t.y,y+=m,t.y=y,b+=y})),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)}}}(cH);var uH=cH.exports;const fH=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:i,max:o,size:a=10,width:s}=t,[c,l]=r;return t=>{const r=Array.from(Jn(t,(t=>n.map((e=>t[e])).join("-"))).values());return r.map((t=>{const n=uH.create(t.map((t=>t[e])),{min:i,max:o,size:a,width:s}),r=n.map((t=>t.x)),u=n.map((t=>t.y));return Object.assign(Object.assign({},t[0]),{[c]:r,[l]:u})}))}};function hH(t){const e=new Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function dH(t,e){return hH(t).map((()=>hH(e)))}function pH(t,e){let n=0;for(let r=0;r<t.length;++r)n+=t[r]*e[r];return n}function gH(t){return Math.sqrt(pH(t,t))}function vH(t,e,n){for(let r=0;r<e.length;++r)t[r]=e[r]*n}function yH(t,e,n,r,i){for(let o=0;o<t.length;++o)t[o]=e*n[o]+r*i[o]}function mH(t,e,n,r,i,o,a){const s=n.fx,c=pH(n.fxprime,e);let l=s,u=s,f=c,h=0;function d(u,h,d){for(let p=0;p<16;++p)if(i=(u+h)/2,yH(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),f=pH(r.fxprime,e),l>s+o*i*c||l>=d)h=i;else{if(Math.abs(f)<=-a*c)return i;f*(h-u)>=0&&(h=u),u=i,d=l}return 0}i=i||1,o=o||1e-6,a=a||.1;for(let p=0;p<10;++p){if(yH(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),f=pH(r.fxprime,e),l>s+o*i*c||p&&l>=u)return d(h,i,u);if(Math.abs(f)<=-a*c)return i;if(f>=0)return d(i,h,l);u=l,h=i,i*=2}return i}function bH(t,e,n){let r={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const o=e.slice();let a,s=1;const c=(n=n||{}).maxIterations||20*e.length;r.fx=t(r.x,r.fxprime);const l=r.fxprime.slice();vH(l,r.fxprime,-1);for(let e=0;e<c;++e){if(s=mH(t,l,r,i,s),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),s){yH(o,1,i.fxprime,-1,r.fxprime);const t=pH(r.fxprime,r.fxprime);yH(l,Math.max(0,pH(o,i.fxprime)/t),l,-1,i.fxprime),a=r,r=i,i=a}else vH(l,r.fxprime,-1);if(gH(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),r}fH.props={};const xH=1e-10;function wH(t,e){const n=function(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=OH(t[n],t[r]);for(let t=0;t<i.length;++t){const o=i[t];o.parentIndex=[n,r],e.push(o)}}return e}(t),r=n.filter((function(e){return function(t,e){for(let n=0;n<e.length;++n)if(MH(t,e[n])>e[n].radius+xH)return!1;return!0}(e,t)}));let i,o=0,a=0;const s=[];if(r.length>1){const e=function(t){const e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}(r);for(i=0;i<r.length;++i){const t=r[i];t.angle=Math.atan2(t.x-e.x,t.y-e.y)}r.sort((function(t,e){return e.angle-t.angle}));let n=r[r.length-1];for(i=0;i<r.length;++i){const e=r[i];a+=(n.x+e.x)*(e.y-n.y);const c={x:(e.x+n.x)/2,y:(e.y+n.y)/2};let l=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.indexOf(e.parentIndex[r])>-1){const i=t[e.parentIndex[r]],o=Math.atan2(e.x-i.x,e.y-i.y),a=Math.atan2(n.x-i.x,n.y-i.y);let s=a-o;s<0&&(s+=2*Math.PI);const u=a-s/2;let f=MH(c,{x:i.x+i.radius*Math.sin(u),y:i.y+i.radius*Math.cos(u)});f>2*i.radius&&(f=2*i.radius),(null===l||l.width>f)&&(l={circle:i,width:f,p1:e,p2:n})}null!==l&&(s.push(l),o+=kH(l.circle.radius,l.width),n=e)}}else{let e=t[0];for(i=1;i<t.length;++i)t[i].radius<e.radius&&(e=t[i]);let n=!1;for(i=0;i<t.length;++i)if(MH(t[i],e)>Math.abs(e.radius-t[i].radius)){n=!0;break}n?o=a=0:(o=e.radius*e.radius*Math.PI,s.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-xH,y:e.y+e.radius},width:2*e.radius}))}return a/=2,e&&(e.area=o+a,e.arcArea=o,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),o+a}function kH(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function MH(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function EH(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=e-(n*n-t*t+e*e)/(2*n);return kH(t,t-(n*n-e*e+t*t)/(2*n))+kH(e,r)}function OH(t,e){const n=MH(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const o=(r*r-i*i+n*n)/(2*n),a=Math.sqrt(r*r-o*o),s=t.x+o*(e.x-t.x)/n,c=t.y+o*(e.y-t.y)/n,l=-(e.y-t.y)*(a/n),u=-(e.x-t.x)*(a/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function _H(t,e){(e=e||{}).maxIterations=e.maxIterations||500;const n=e.initialLayout||TH,r=e.lossFunction||PH;t=function(t){t=t.slice();const e=[],n={};let r,i,o,a;for(r=0;r<t.length;++r){const i=t[r];1==i.sets.length?e.push(i.sets[0]):2==i.sets.length&&(o=i.sets[0],a=i.sets[1],n[[o,a]]=!0,n[[a,o]]=!0)}for(e.sort(((t,e)=>t>e?1:-1)),r=0;r<e.length;++r)for(o=e[r],i=r+1;i<e.length;++i)a=e[i],[o,a]in n||t.push({sets:[o,a],size:0});return t}(t);const i=n(t,e),o=[],a=[];let s;for(s in i)i.hasOwnProperty(s)&&(o.push(i[s].x),o.push(i[s].y),a.push(s));const c=function(t,e,n){const r=(n=n||{}).maxIterations||200*e.length,i=n.nonZeroDelta||1.05,o=n.zeroDelta||.001,a=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=void 0!==n.rho?n.rho:1,l=void 0!==n.chi?n.chi:2,u=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5;let h;const d=e.length,p=new Array(d+1);p[0]=e,p[0].fx=t(e),p[0].id=0;for(let n=0;n<d;++n){const r=e.slice();r[n]=r[n]?r[n]*i:o,p[n+1]=r,p[n+1].fx=t(r),p[n+1].id=n+1}function g(t){for(let e=0;e<t.length;e++)p[d][e]=t[e];p[d].fx=t.fx}const v=(t,e)=>t.fx-e.fx,y=e.slice(),m=e.slice(),b=e.slice(),x=e.slice();for(let e=0;e<r;++e){if(p.sort(v),n.history){const t=p.map((t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e}));t.sort(((t,e)=>t.id-e.id)),n.history.push({x:p[0].slice(),fx:p[0].fx,simplex:t})}h=0;for(let t=0;t<d;++t)h=Math.max(h,Math.abs(p[0][t]-p[1][t]));if(Math.abs(p[0].fx-p[d].fx)<a&&h<s)break;for(let t=0;t<d;++t){y[t]=0;for(let e=0;e<d;++e)y[t]+=p[e][t];y[t]/=d}const e=p[d];if(yH(m,1+c,y,-c,e),m.fx=t(m),m.fx<p[0].fx)yH(x,1+l,y,-l,e),x.fx=t(x),x.fx<m.fx?g(x):g(m);else if(m.fx>=p[d-1].fx){let n=!1;if(m.fx>e.fx?(yH(b,1+u,y,-u,e),b.fx=t(b),b.fx<e.fx?g(b):n=!0):(yH(b,1-u*c,y,u*c,e),b.fx=t(b),b.fx<m.fx?g(b):n=!0),n){if(f>=1)break;for(let e=1;e<p.length;++e)yH(p[e],1-f,p[0],f,p[e]),p[e].fx=t(p[e])}}else g(m)}return p.sort(v),{fx:p[0].fx,x:p[0]}}((function(e){const n={};for(let t=0;t<a.length;++t){const r=a[t];n[r]={x:e[2*t],y:e[2*t+1],radius:i[r].radius}}return r(n,t)}),o,e),l=c.x;for(let t=0;t<a.length;++t)s=a[t],i[s].x=l[2*t],i[s].y=l[2*t+1];return i}const SH=1e-10;function AH(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+SH?Math.abs(t-e):function(t,e,n,r){const i=(r=r||{}).maxIterations||100,o=r.tolerance||1e-10,a=t(e),s=t(n);let c=n-e;if(a*s>0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===s)return n;for(let n=0;n<i;++n){c/=2;const n=e+c,r=t(n);if(r*a>=0&&(e=n),Math.abs(c)<o||0===r)return n}return e+c}((function(r){return EH(t,e,r)-n}),0,t+e)}function TH(t,e){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:PH,r={},i={};let o;for(let e=0;e<t.length;++e){const n=t[e];1==n.sets.length&&(o=n.sets[0],r[o]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:n.size,radius:Math.sqrt(n.size/Math.PI)},i[o]=[])}t=t.filter((function(t){return 2==t.sets.length}));for(let e=0;e<t.length;++e){const n=t[e];let o=n.hasOwnProperty("weight")?n.weight:1;const a=n.sets[0],s=n.sets[1];n.size+SH>=Math.min(r[a].size,r[s].size)&&(o=0),i[a].push({set:s,size:n.size,weight:o}),i[s].push({set:a,size:n.size,weight:o})}const a=[];for(o in i)if(i.hasOwnProperty(o)){let t=0;for(let e=0;e<i[o].length;++e)t+=i[o][e].size*i[o][e].weight;a.push({set:o,size:t})}function s(t,e){return e.size-t.size}a.sort(s);const c={};function l(t){return t.set in c}function u(t,e){r[e].x=t.x,r[e].y=t.y,c[e]=!0}u({x:0,y:0},a[0].set);for(let e=1;e<a.length;++e){const c=a[e].set,f=i[c].filter(l);if(o=r[c],f.sort(s),0===f.length)throw"ERROR: missing pairwise overlap information";const h=[];for(let t=0;t<f.length;++t){const e=r[f[t].set],n=AH(o.radius,e.radius,f[t].size);h.push({x:e.x+n,y:e.y}),h.push({x:e.x-n,y:e.y}),h.push({y:e.y+n,x:e.x}),h.push({y:e.y-n,x:e.x});for(let i=t+1;i<f.length;++i){const t=r[f[i].set],a=AH(o.radius,t.radius,f[i].size),s=OH({x:e.x,y:e.y,radius:n},{x:t.x,y:t.y,radius:a});for(let t=0;t<s.length;++t)h.push(s[t])}}let d=1e50,p=h[0];for(let e=0;e<h.length;++e){r[c].x=h[e].x,r[c].y=h[e].y;const i=n(r,t);i<d&&(d=i,p=h[e])}u(p,c)}return r}(t,e);const r=e.lossFunction||PH;if(t.length>=8){const i=function(t,e){e=e||{};const n=e.restarts||10,r=[],i={};let o;for(o=0;o<t.length;++o){const e=t[o];1==e.sets.length&&(i[e.sets[0]]=r.length,r.push(e))}const a=function(t,e,n){const r=dH(e.length,e.length),i=dH(e.length,e.length);return t.filter((function(t){return 2==t.sets.length})).map((function(t){const o=n[t.sets[0]],a=n[t.sets[1]],s=AH(Math.sqrt(e[o].size/Math.PI),Math.sqrt(e[a].size/Math.PI),t.size);r[o][a]=r[a][o]=s;let c=0;t.size+1e-10>=Math.min(e[o].size,e[a].size)?c=1:t.size<=1e-10&&(c=-1),i[o][a]=i[a][o]=c})),{distances:r,constraints:i}}(t,r,i);let s=a.distances;const c=a.constraints,l=gH(s.map(gH))/s.length;s=s.map((function(t){return t.map((function(t){return t/l}))}));const u=function(t,e){return function(t,e,n,r){let i,o=0;for(i=0;i<e.length;++i)e[i]=0;for(i=0;i<n.length;++i){const a=t[2*i],s=t[2*i+1];for(let c=i+1;c<n.length;++c){const l=t[2*c],u=t[2*c+1],f=n[i][c],h=r[i][c],d=(l-a)*(l-a)+(u-s)*(u-s),p=Math.sqrt(d),g=d-f*f;h>0&&p<=f||h<0&&p>=f||(o+=2*g*g,e[2*i]+=4*g*(a-l),e[2*i+1]+=4*g*(s-u),e[2*c]+=4*g*(l-a),e[2*c+1]+=4*g*(u-s))}}return o}(t,e,s,c)};let f,h;for(o=0;o<n;++o){h=bH(u,hH(2*s.length).map(Math.random),e),(!f||h.fx<f.fx)&&(f=h)}const d=f.x,p={};for(o=0;o<r.length;++o){const t=r[o];p[t.sets[0]]={x:d[2*o]*l,y:d[2*o+1]*l,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(o=0;o<e.history.length;++o)vH(e.history[o].x,l);return p}(t,e);r(i,t)+1e-8<r(n,t)&&(n=i)}return n}function PH(t,e){let n=0;for(let r=0;r<e.length;++r){const i=e[r];let o;if(1==i.sets.length)continue;if(2==i.sets.length){const e=t[i.sets[0]],n=t[i.sets[1]];o=EH(e.radius,n.radius,MH(e,n))}else o=wH(i.sets.map((function(e){return t[e]})));n+=(i.hasOwnProperty("weight")?i.weight:1)*(o-i.size)*(o-i.size)}return n}function NH(t,e,n,r){const i=[],o=[];for(const e in t)t.hasOwnProperty(e)&&(o.push(e),i.push(t[e]));e-=2*r,n-=2*r;const a=function(t){const e=function(e){const n=Math.max.apply(null,t.map((function(t){return t[e]+t.radius}))),r=Math.min.apply(null,t.map((function(t){return t[e]-t.radius})));return{max:n,min:r}};return{xRange:e("x"),yRange:e("y")}}(i),s=a.xRange,c=a.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=e/(s.max-s.min),u=n/(c.max-c.min),f=Math.min(u,l),h=(e-(s.max-s.min)*f)/2,d=(n-(c.max-c.min)*f)/2,p={};for(let t=0;t<i.length;++t){const e=i[t];p[o[t]]={radius:f*e.radius,x:r+h+(e.x-s.min)*f,y:r+d+(e.y-c.min)*f}}return p}const CH=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[o,a]=r;return t=>{const r=t.map((t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[o]:t.sets.join("&")})));r.sort(((t,e)=>t.sets.length-e.sets.length));const s=_H(r);let c;return r.map((t=>{const n=t[e];return Object.assign(Object.assign({},t),{[a]:({width:t,height:e})=>{c=c||NH(s,t,e,i);const r=n.map((t=>c[t]));let o=function(t){const e={};wH(t,e);const n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){const t=n[0].circle;return function(t,e,n){const r=[],i=t-n,o=e;return r.push("M",i,o),r.push("A",n,n,0,1,0,i+2*n,o),r.push("A",n,n,0,1,0,i,o),r.join(" ")}(t.x,t.y,t.radius)}{const t=["\nM",n[0].p2.x,n[0].p2.y];for(let e=0;e<n.length;++e){const r=n[e],i=r.circle.radius,o=r.width>i;t.push("\nA",i,i,0,o?1:0,1,r.p1.x,r.p1.y)}return t.join(" ")}}(r);return/[zZ]$/.test(o)||(o+=" Z"),o}})}))}};CH.props={};const LH=()=>t=>(console.log("G2 data section:",t),t);LH.props={};const jH=t=>{const{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{const i=t.map((t=>t[e])),o=function(t,e){if(e<0||e>1)throw new Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0];const r=[];for(const i of t){if(null==i){r.push(i),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=i);const o=n*e+(1-e)*i;r.push(o),n=o}return r}(i,n);return t.map(((t,e)=>Object.assign(Object.assign({},t),{[r]:o[e]})))}};jH.props={};function RH(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function IH(t,e,n=.01){const[r,i]=t,[o,a]=e;return r>=o[0]-n&&r<=a[0]+n&&i>=o[1]-n&&i<=a[1]+n}function DH(t,e,n=.01){const[r,i]=t;return!(IH(r,e,n)&&IH(i,e,n))}const BH=t=>{const{priority:e}=t;return t=>{const n=[];return e&&t.sort(e),t.forEach((t=>{c$(t);const e=t.getLocalBounds(),r=n.some((t=>function(t,e){const[n,r]=t,[i,o]=e;return n[0]<o[0]&&r[0]>i[0]&&n[1]<o[1]&&r[1]>i[1]}(RH(e),RH(t.getLocalBounds()))));r?s$(t):n.push(t)})),t}};function FH([t,e],[n,r]){return r>t&&e>n}function zH(){const t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function $H(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 WH=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{const i=t.length;if(i<=1)return t;const[o,a]=zH(),[s,c]=zH(),[l,u]=zH(),[f,h]=zH();for(const e of t){const{min:t,max:n}=$H(e),[r,i]=t,[o,s]=n;a(e,i),c(e,i),u(e,s-i),h(e,[r,o])}for(let o=0;o<e;o++){t.sort(((t,e)=>Rn(s(t),s(e))));let e=0;for(let n=0;n<i-1;n++){const i=t[n];let o,a=n+1;for(;(o=t[a])&&!FH(f(i),f(o));)a+=1;if(o){const t=s(i),n=l(i),a=s(o),u=a-(t+n);if(u<r){const n=(r-u)/2;e=Math.max(e,n),c(i,t-n),c(o,a+n)}}}if(e<n)break}for(const e of t)e.style.y+=s(e)-o(e);return t}};function GH(t){return"object"==typeof t?t:lh(t)}function HH(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function YH(t,e,n){return.2126*HH(t)+.7152*HH(e)+.0722*HH(n)}function qH(t,e){if(!t||!e||t===e)return 1;const{r:n,g:r,b:i}=t,{r:o,g:a,b:s}=e,c=YH(n,r,i),l=YH(o,a,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function VH(t,e){const n=yr(e,(e=>qH(t,GH(e))));return e[n]}function UH(t){var e;const n=t.getAnimations();if(!n||0===n.length)return d$(t);const r=t.cloneNode(!0);r.style.visibility="hidden",n.forEach((t=>{const e=t.effect.getKeyframes();e&&e.length>0&&r.attr(e[e.length-1])})),null===(e=t.parentNode)||void 0===e||e.appendChild(r);const i=d$(r);return r.destroy(),i}const XH=t=>{const{autoStroke:e=!1,threshold:n=4.5,palette:r=["#000","#fff"]}=t;return t=>(t.forEach((t=>{var i;const o=t.attr("dependentElement"),a=o.parsedStyle.fill;if(qH(t.parsedStyle.fill,a)<n){const n=VH(a,r);if(t.attr("fill",n),e){t.attr("_originalStyleSaved")||(t.attr("_originalStroke",t.attr("stroke")),t.attr("_originalLineWidth",t.attr("lineWidth")),t.attr("_originalStyleSaved",!0));if(DH(RH(UH(t)),RH(UH(o)))){const o=VH(GH(n),r);t.attr("stroke",o),t.attr("lineWidth",null!==(i=null==e?void 0:e.lineWidth)&&void 0!==i?i:1.6)}else t.attr({stroke:t.attr("_originalStroke"),lineWidth:t.attr("_originalLineWidth")}),Y(t.attr("_originalStroke"))&&t.removeAttribute("stroke"),Y(t.attr("_originalLineWidth"))&&t.removeAttribute("lineWidth")}}})),t)},ZH=()=>t=>(t.forEach((t=>{c$(t);const e=t.attr("bounds");DH(RH(t.getLocalBounds()),e)&&s$(t)})),t),KH=()=>(t,{canvas:e,layout:n})=>(t.forEach((t=>{c$(t);const{max:e,min:r}=t.getRenderBounds(),[i,o]=e,[a,s]=r,c=((t,e)=>{const[[n,r],[i,o]]=e,[[a,s],[c,l]]=t;let u=0,f=0;return a<n?u=n-a:c>i&&(u=i-c),s<r?f=r-s:l>o&&(f=o-l),[u,f]})([[a,s],[i,o]],[[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 QH(){return{"data.fetch":_G,"data.inline":jG,"data.sortBy":LG,"data.sort":PG,"data.filter":TG,"data.pick":NG,"data.rename":CG,"data.fold":SG,"data.slice":sH,"data.custom":RG,"data.map":IG,"data.join":aH,"data.kde":fH,"data.log":LH,"data.wordCloud":iH,"data.ema":jH,"transform.stackY":xa,"transform.binX":Fs,"transform.bin":Bs,"transform.dodgeX":Ha,"transform.jitter":Xa,"transform.jitterX":Za,"transform.jitterY":Ka,"transform.symmetryY":Qa,"transform.diffY":Ja,"transform.stackEnter":Ya,"transform.normalizeY":qa,"transform.select":is,"transform.selectX":os,"transform.selectY":as,"transform.groupX":ms,"transform.groupY":bs,"transform.groupColor":xs,"transform.group":ys,"transform.sortX":ks,"transform.sortY":Es,"transform.sortColor":Ms,"transform.flexX":Os,"transform.pack":Rs,"transform.sample":$s,"transform.filter":Ws,"coordinate.cartesian":e,"coordinate.polar":r,"coordinate.transpose":o,"coordinate.theta":a,"coordinate.parallel":l,"coordinate.fisheye":u,"coordinate.radial":c,"coordinate.radar":f,"coordinate.helix":i,"encode.constant":h,"encode.field":p,"encode.transform":d,"encode.column":g,"mark.interval":PM,"mark.rect":CM,"mark.line":IM,"mark.point":BM,"mark.text":zM,"mark.cell":WM,"mark.area":HM,"mark.link":qM,"mark.image":UM,"mark.polygon":ZM,"mark.box":QM,"mark.vector":tE,"mark.lineX":iE,"mark.lineY":nE,"mark.connector":aE,"mark.range":uE,"mark.rangeX":hE,"mark.rangeY":pE,"mark.path":ZE,"mark.shape":b_,"mark.density":SS,"mark.heatmap":TS,"mark.wordCloud":bS,"palette.category10":LS,"palette.category20":jS,"scale.linear":IS,"scale.ordinal":DS,"scale.band":RS,"scale.identity":BS,"scale.point":FS,"scale.time":zS,"scale.log":$S,"scale.pow":WS,"scale.sqrt":qS,"scale.threshold":GS,"scale.quantile":HS,"scale.quantize":YS,"scale.sequential":VS,"scale.constant":US,"theme.classic":QS,"theme.classicDark":eA,"theme.academy":rA,"theme.light":KS,"theme.dark":tA,"component.axisX":RA,"component.axisY":IA,"component.legendCategory":WA,"component.legendContinuous":VA,"component.legends":dT,"component.title":tT,"component.sliderX":cT,"component.sliderY":lT,"component.scrollbarX":fT,"component.scrollbarY":hT,"animation.scaleInX":pT,"animation.scaleOutX":gT,"animation.scaleInY":vT,"animation.scaleOutY":yT,"animation.waveIn":LT,"animation.fadeIn":mT,"animation.fadeOut":bT,"animation.zoomIn":jT,"animation.zoomOut":RT,"animation.pathIn":IT,"animation.morphing":CT,"animation.growInX":DT,"animation.growInY":BT,"interaction.elementHighlight":F$,"interaction.elementHighlightByX":z$,"interaction.elementHighlightByColor":$$,"interaction.elementSelect":G$,"interaction.elementSelectByX":H$,"interaction.elementSelectByColor":Y$,"interaction.fisheye":V$,"interaction.chartIndex":q$,"interaction.tooltip":gW,"interaction.legendFilter":OW,"interaction.legendHighlight":_W,"interaction.brushHighlight":RW,"interaction.brushXHighlight":DW,"interaction.brushYHighlight":FW,"interaction.brushAxisHighlight":qW,"interaction.brushFilter":VW,"interaction.brushXFilter":UW,"interaction.brushYFilter":XW,"interaction.sliderFilter":JW,"interaction.scrollbarFilter":eG,"interaction.poptip":oG,"interaction.treemapDrillDown":sG,"interaction.elementPointMove":vG,"composition.spaceLayer":KC,"composition.spaceFlex":QC,"composition.facetRect":pL,"composition.repeatMatrix":xL,"composition.facetCircle":_L,"composition.timingKeyframe":AL,"labelTransform.overlapHide":BH,"labelTransform.overlapDodgeY":WH,"labelTransform.overflowHide":ZH,"labelTransform.contrastReverse":XH,"labelTransform.exceedAdjust":KH}}function JH(){return{"composition.geoView":PI,"composition.geoPath":TL}}function tY(){return{"data.arc":GE,"data.cluster":hS,"mark.forceGraph":uS,"mark.tree":mS,"mark.pack":l_,"mark.sankey":FE,"mark.chord":UE,"mark.treemap":a_}}function eY(){return{"data.venn":CH,"mark.boxplot":m_,"mark.gauge":OS,"mark.wordCloud":bS,"mark.liquid":CS}}function nY(){return Object.assign(Object.assign(Object.assign(Object.assign({},JH()),tY()),eY()),QH())}function rY(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}const iY={};const oY=t=>t?parseInt(t):0;function aY(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 sY{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 aY(this,(n=>{t===n.attr("key")&&(e=n)})),e}getNodesByType(t){const e=[];return aY(this,(n=>{t===n.type&&e.push(n)})),e}getNodeByType(t){let e=null;return aY(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 cY=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],lY="__remove__",uY="__callback__";function fY(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function hY(t,e){const{width:n,height:r,autoFit:i,depth:o=0}=t;let a=640,s=480;if(i){const{width:t,height:n}=function(t){const e=getComputedStyle(t),n=t.clientWidth||oY(e.width),r=t.clientHeight||oY(e.height);return{width:n-(oY(e.paddingLeft)+oY(e.paddingRight)),height:r-(oY(e.paddingTop)+oY(e.paddingBottom))}}(e);a=t||a,s=n||s}return a=n||a,s=r||s,{width:Math.max(I(a)?a:1,1),height:Math.max(I(s)?s:1,1),depth:o}}function dY(t){const e=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];for(const n of cY)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,fY(e));n.length;){const t=n.pop(),e=r.get(t),{children:i=[]}=t;for(const t of i)if(t.type===uY)e.children=t.value;else{const i=fY(t),{children:o=[]}=e;o.push(i),n.push(t),r.set(t,i),e.children=o}}return r.get(e)}function pY(t,e,n,r,i){const{type:o}=t,{type:a=n||o}=e;if(function(t,e){return"function"!=typeof t&&new Set(Object.keys(e)).has(t)}(a,i)){for(const n of cY)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(function(t,e){return"function"==typeof t||new Set(Object.keys(e)).has(t)}(a,r)){const t={type:"view"},n=Object.assign({},e);for(const e of cY)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}function gY(t,e,n){if("function"==typeof t){const e=new sY;return e.value=t,e.type=uY,e}const{type:r,children:i}=t,o=Le(t,["type","children"]),a=function(t,e,n){if("function"==typeof t)return e.mark;const r=Object.assign(Object.assign({},e),n)[t];if(!r)throw new Error(`Unknown mark: ${t}.`);return r}(r,e,n),s=new a;return s.value=o,s.type=r,s}function vY(t,e){const{type:n,children:r}=e,i=Le(e,["type","children"]);t.type===n||void 0===n?ia(t.value,i):"string"==typeof n&&(t.type=n,t.value=i)}function yY(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[t,e]=i.shift(),o=gY(e,n,r);Array.isArray(t.children)&&t.push(o);const{children:a}=e;if(Array.isArray(a))for(const t of a)i.push([o,t]);else"function"==typeof a&&i.push([o,a])}}function mY(t,e,{key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function bY(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 xY(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 wY(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(na(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 kY(t,e,{ctor:n}){t.prototype[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}function MY(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function EY(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:t}=r;"value"===t?mY(e,n,r):"array"===t?bY(e,n,r):"object"===t?xY(e,n,r):"node"===t?kY(e,n,r):"container"===t?MY(e,n,r):"mix"===t&&wY(e,n)}return e}}function OY(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,{type:"node",ctor:e}])))}const _Y={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"}},SY=Object.assign(Object.assign({},_Y),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),AY=Object.assign(Object.assign({},_Y),{labelTransform:{type:"array"}});let TY=class extends sY{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()&&c$(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&s$(t)}};TY=je([EY(AY)],TY);let PY=class extends sY{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)}};PY=je([EY(SY)],PY);const NY="G2_CHART_KEY";class CY extends TY{constructor(t){const{container:e,canvas:n,renderer:r,plugins:i,lib:o,createCanvas:a}=t;super(Le(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=U((()=>{this.forceFit()}),300),this._renderer=r||new aN,this._plugins=i||[],this._container=function(t){if(void 0===t){const t=document.createElement("div");return t[lY]=!0,t}if("string"==typeof t)return document.getElementById(t);return t}(e),this._emitter=new uN,this._context={library:Object.assign(Object.assign({},o),iY),emitter:this._emitter,canvas:n,createCanvas:a},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const t=new Promise(((t,e)=>e$(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e)))),[e,n,r]=function(){let t,e;return[new Promise(((n,r)=>{e=n,t=r})),e,t]}();return t.then(n).then((()=>{if(this._trailingClear){const t=this.options();this._trailingClear(),this._trailing&&this.options(t)}})).catch(r).then((()=>{this._trailingClear=null,this._renderTrailing()})),e}options(t){if(0===arguments.length)return dY(this);const{type:e}=t;return e&&(this._previousDefinedType=e),function(t,e,n,r,i){const o=[[null,t,pY(t,e,n,r,i)]];for(;o.length;){const[t,e,n]=o.shift();if(e)if(n){vY(e,n);const{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++){const n=t[i],a=r[i];o.push([e,a,n])}}else"function"==typeof t&&o.push([e,null,t])}else e.remove();else yY(t,n,r,i)}}(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(t=!0){if(this._rendering)return this._trailingClear=()=>{this.clear(t)},void this._reset();this.options();this.emit(fN.BEFORE_CLEAR),this._reset(),n$(0,this._context,!1,t),this.emit(fN.AFTER_CLEAR)}destroy(){this.options();this.emit(fN.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),n$(0,this._context,!0),this._container[lY]&&function(t){const e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(fN.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:t,height:e}=hY(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(fN.BEFORE_CHANGE_SIZE);const n=this.render();return n.then((()=>{this.emit(fN.AFTER_CHANGE_SIZE)})),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(fN.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",e);const n=this.render();return n.then((()=>{this.emit(fN.AFTER_CHANGE_SIZE)})),n}getDataByXY(t,e={}){const{shared:n=!1,series:r,facet:i=!1,startX:o=0,startY:a=0}=e,{canvas:s,views:c}=this._context,{document:l}=s,{x:u,y:f}=t,{coordinate:h,scale:d,markState:p,data:g,key:v}=c[0],y=l.getElementsByClassName($T),m=n?t=>t.__data__.x:t=>t,b=Jn(y,m),x=h$(l.getElementsByClassName(WT)[0]),w=t=>Array.from(t.values()).some((t=>{var e,n;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)||(null===(n=t.channels)||void 0===n?void 0:n.some((t=>"series"===t.name&&void 0!==t.values)))})),k=lW(r,w(p)),M=t=>rt(t,"__data__.data",null);try{if(k&&w(p)&&!i){const{selectedData:t}=hW({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:h,scale:d,startX:o,startY:a}),e=g.get(`${v}-0`);return t.map((({index:t})=>e[t]))}const t=m(fW({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:h,scale:d,shared:n})),e=b.get(t);return e?e.map(M):[]}catch(t){const e=s.document.elementFromPointSync(u,f);return e?M(e):[]}}_create(){const{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter((t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t))];this._marks={};for(const t of e){const e=t.split(".").pop();class n extends PY{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 TY{constructor(){super({},e)}};return n=je([EY(OY(this._marks))],n),[e,n]})));for(const t of Object.values(this._compositions))EY(OY(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=NY}=t,{width:n,height:r,depth:i}=hY(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}=hY(this.options(),this._container);this._plugins.push(new cN),this._plugins.forEach((t=>this._renderer.registerPlugin(t))),this._context.canvas=new fv({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 LY=rY(CY,Object.assign({},nY()));t.AREA_CLASS_NAME=qT,t.Academy=rA,t.Bin=Bs,t.BinX=Fs,t.COMPONENT_CLASS_NAME=HT,t.Chart=LY,t.ChartEvent=fN,t.Classic=QS,t.ClassicDark=eA,t.Dark=tA,t.DiffY=Ja,t.DodgeX=Ha,t.ELEMENT_CLASS_NAME=$T,t.Filter=Ws,t.FlexX=Os,t.Group=ys,t.GroupColor=xs,t.GroupX=ms,t.GroupY=bs,t.Jitter=Xa,t.JitterX=Za,t.JitterY=Ka,t.LABEL_CLASS_NAME=YT,t.LABEL_LAYER_CLASS_NAME=zT,t.Light=KS,t.LinearAxis=LA,t.MAIN_LAYER_CLASS_NAME=FT,t.MASK_CLASS_NAME="mask",t.MaybeDefaultX=Ia,t.MaybeDefaultY=Da,t.MaybeFunctionAttribute=$a,t.MaybeGradient=Ga,t.MaybeIdentityX=Ra,t.MaybeIdentityY=ja,t.MaybeKey=Pa,t.MaybeSeries=Na,t.MaybeSize=Ta,t.MaybeStackY=ka,t.MaybeTitle=Oa,t.MaybeTooltip=Ba,t.MaybeTuple=Wa,t.MaybeTupleX=La,t.MaybeTupleY=Ca,t.MaybeVisualPosition=za,t.MaybeZeroPadding=Fa,t.MaybeZeroX=_a,t.MaybeZeroY=Sa,t.MaybeZeroY1=jn,t.MaybeZeroZ=Aa,t.NormalizeY=qa,t.PLOT_CLASS_NAME=GT,t.Pack=Rs,t.Runtime=CY,t.Sample=$s,t.Select=is,t.SelectX=os,t.SelectY=as,t.Selection=fy,t.SortColor=Ms,t.SortX=ks,t.SortY=Es,t.StackEnter=Ya,t.StackY=xa,t.SymmetryY=Qa,t.VIEW_CLASS_NAME=WT,t.corelib=QH,t.dataOf=Go,t.extend=rY,t.geolib=JH,t.graphlib=tY,t.plotlib=eY,t.register=function(t,e){var n,r;t.startsWith("symbol.")?(n=t.split(".").pop(),r=e,dm.set(n,r)):Object.assign(iY,{[t]:e})},t.render=e$,t.renderToMountedElement=function(t,e={},n=()=>{},r=t=>{throw t}){var i;const{width:o=640,height:a=480}=t,s=Jz(t),{group:c=new Ig,emitter:l=new uN,library:u}=e;(null==c?void 0:c.parentElement)||Uo("renderToMountedElement can't render chart to unmounted group.");const f=uy(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(fN.BEFORE_RENDER),Ez(Object.assign(Object.assign({},s),{width:o,height:a}),f,e).then((()=>{var t;null===(t=e.canvas)||void 0===t||t.requestAnimationFrame((()=>{l.emit(fN.AFTER_RENDER),null==n||n()}))})).catch((t=>{null==r||r(t)})),c},t.select=uy,t.selectG2Elements=l$,t.selectPlotArea=h$,t.seriesOf=function(t){const e=Wo(t).__data__,{scale:n}=e;return Ho(n,t.__data__)},t.stdlib=nY,Object.defineProperty(t,"__esModule",{value:!0})}));